Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6161453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:28:56+00:00 2026-05-23T21:28:56+00:00

I want to make a system for URL matching. It will work in this

  • 0

I want to make a system for URL matching. It will work in this way:

The database will contains many patterns. and some metadata of the pattern like this:

pattern1, keyword 
pattern2, keyword
...
...

I have a input URL. like htttp://example.com/blabla/111/2222/detail.htm

The system will get the input and output the keyword of the most matched pattern for the input URL. There will be more than 20,000 requests per second.

The thing we need to design is the pattern and the database model. I’ve spend over 2 weeks in this system.

I’m thinking about match the URL in a tree.

All the nodes in the tree are able to do 2 kinds of output: Which node should continue matching the URL, or the node know which keyword should be applied to the URL.

Each node will be connected with a callback(a script stored in db). So different node will have different behavior.

But the thing we have is tons of patterns. I think I need to have a facility to convert patterns into thos “nodes”. Or at least can build a tree with existing nodes with the patterns in the db.

I’m still thinking about the tree generating. But there should be some better way.

Any ideas will be very helpful. Thank you!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:28:57+00:00Added an answer on May 23, 2026 at 9:28 pm

    You need one of the industrial-strength string matching algorithms: http://en.wikipedia.org/wiki/String_searching_algorithm. I don’t think a database-backed approach will work so well because it sounds like you need pattern matching, not exact prefix matching.

    But if you are using prefix matching (the longest match from the beginning), then you can use a prefix trie, a trie. If I were you, I would use the database as a persistent store, but keep my matching trie in memory.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want make a simple referral system. Basically referral URL structure something like this.
i want make my button visible after matching some pattern into url every thing
I want to make a URL shortener that has this URL format: http://myurlshortner.com/ {id}
I want to make a login system using ASP.NET (MVC). On the internet, I
I want to make a custom ASP.NET control that is a subclasse of System.Web.UI.WebControls.Calendar
I have an object of the type System.Drawing.Image and want to make every pixel
Let's say I want make some of my sources publicly available via my blog
I want to make a table in SqlServer that will add, on insert, a
I'm really struggling to make facebook connection working for my system. What I want
I'm trying to make a URL-safe version of a string. In my database I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.