CN110879819A - Method, device, server and storage medium for quickly and accurately identifying routing information - Google Patents

Method, device, server and storage medium for quickly and accurately identifying routing information Download PDF

Info

Publication number
CN110879819A
CN110879819A CN201911152616.XA CN201911152616A CN110879819A CN 110879819 A CN110879819 A CN 110879819A CN 201911152616 A CN201911152616 A CN 201911152616A CN 110879819 A CN110879819 A CN 110879819A
Authority
CN
China
Prior art keywords
information
routing
path
preset
routing information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911152616.XA
Other languages
Chinese (zh)
Inventor
刘晓虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911152616.XA priority Critical patent/CN110879819A/en
Publication of CN110879819A publication Critical patent/CN110879819A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method, a device, a server and a storage medium for quickly and accurately identifying routing information, and relates to the technical field of data processing. The method comprises the following steps: receiving request information, wherein the request information comprises path information of a target path and is used for requesting to call routing information corresponding to the target path; segmenting the path information to obtain a plurality of pieces of sub-path information after segmentation numbering, and generating an identifier of each piece of sub-path information; and inquiring a preset routing rule table according to the information of each sub-path to obtain the routing information corresponding to the target path, wherein the preset routing rule table is stored in the target application program in a distributed manner. The preset routing rule table is stored in the target application program in a distributed mode, the storage pressure of the server can be reduced, the request path is segmented, the preset routing rule table is inquired according to the segmented request path to determine the routing information, the efficiency of determining the routing information is improved, the request information is responded quickly, and the performance of the server is improved.

Description

Method, device, server and storage medium for quickly and accurately identifying routing information
Technical Field
The invention relates to the technical field of data processing, in particular to a method, a device, a server and a storage medium for quickly and accurately identifying routing information.
Background
With the development of internet technology, routing rule information is more and more, and it becomes more and more important to effectively store the routing rule information and accurately match the routing rule information corresponding to the request according to the received request.
In the related art, a routing rule is registered, a routing registry is cached in a server, and routing rule information is traversed by adopting a preset algorithm according to request information to determine routing information.
However, in the related art, both the routing registry memory and the pattern matching algorithm execution memory depend on the server, and when the request information is excessive, the efficiency of determining the routing information is reduced, so that the request information cannot be responded quickly, and the performance of the server is reduced.
Disclosure of Invention
The present invention aims to provide a method, an apparatus, a server and a storage medium for quickly and accurately identifying routing information, so as to solve the problems in the related art that both the routing registry memory and the pattern matching algorithm execution memory depend on the server, and when the request information is excessive, the efficiency of determining the routing information is reduced, the request information cannot be quickly responded, and the performance of the server is reduced.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment of the present invention provides a method for quickly and accurately identifying routing information, where the method includes:
receiving request information, wherein the request information comprises path information of a target path and is used for requesting to call routing information corresponding to the target path;
segmenting the path information and adding marks to obtain a plurality of segmented sub-path information;
and inquiring a preset routing rule table according to the sub-path information to acquire routing information corresponding to the target path, wherein the preset routing rule table is stored in a target application program in a distributed mode.
Further, before the receiving the request information, the method further includes:
loading all routing information, wherein the routing information comprises non-mode information and mode information;
segmenting the non-mode information of each routing information and generating a corresponding identifier to obtain a plurality of fields;
and establishing an inverted index for the plurality of fields to obtain the preset routing rule table, wherein each field has a corresponding identifier.
Further, the loading all routing information includes:
loading all routing configuration information from a routing rule storage layer;
adopting a routing rule loading analysis layer to analyze the routing configuration information to obtain initial routing rule information;
and updating the initial routing rule information to obtain all routing information.
Further, the querying a preset routing rule table according to the sub-path information to obtain the routing information corresponding to the target path includes:
inquiring a preset routing rule table according to the sub-path information to obtain a plurality of routing information with matching degrees meeting preset conditions;
if the routing information with the highest matching degree does not comprise the mode information, taking the routing information with the highest matching degree as the routing information corresponding to the target path;
and if the routing information with the highest matching degree comprises the mode information, determining the routing information corresponding to the target path in the routing information with a plurality of matching degrees meeting preset conditions by adopting a preset algorithm.
Further, the querying a preset routing rule table according to the information of each sub-path to obtain a plurality of routing information with matching degrees meeting preset conditions includes:
and inquiring a preset routing rule table according to the sub-path information to obtain a preset number of routing information with the matching degree from high to low.
In a second aspect, an embodiment of the present invention further provides a device for quickly and accurately identifying routing information, where the device includes:
the receiving module is used for receiving request information, wherein the request information comprises path information of a target path and is used for requesting to call routing information corresponding to the target path;
the segmentation module is used for segmenting the path information and adding an identifier to obtain a plurality of segmented sub-path information;
and the acquisition module is used for inquiring a preset routing rule table according to the information of each sub-path and acquiring the routing information corresponding to the target path, wherein the preset routing rule table is stored in a target application program in a distributed mode.
Further, the apparatus further comprises:
the loading module is used for loading all routing information, and the routing information comprises non-mode information and mode information;
the processing module is used for segmenting the non-mode information of each routing information and generating a corresponding identifier to obtain a plurality of fields;
and the establishing module is used for establishing inverted indexes for the fields to obtain the preset routing rule table, wherein each field has a corresponding identifier.
Further, the loading module is specifically configured to load all routing configuration information from the routing rule storage layer; adopting a routing rule loading analysis layer to analyze the routing configuration information to obtain initial routing rule information; and updating the initial routing rule information to obtain all routing information.
Further, the obtaining module is specifically configured to query a preset routing rule table according to the sub-path information to obtain a plurality of pieces of routing information with matching degrees meeting preset conditions; if the routing information with the highest matching degree does not comprise the mode information, taking the routing information with the highest matching degree as the routing information corresponding to the target path; and if the routing information with the highest matching degree comprises the mode information, determining the routing information corresponding to the target path in the routing information with a plurality of matching degrees meeting preset conditions by adopting a preset algorithm.
Further, the obtaining module is specifically configured to query a preset routing rule table according to the sub-path information to obtain a preset number of pieces of routing information with a matching degree from high to low.
In a third aspect, an embodiment of the present invention provides a server, including a memory and a processor, where the memory stores a computer program executable by the processor, and the processor implements the method according to any one of the above first aspects when executing the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and when the computer program is read and executed, the method according to the first aspect is implemented.
The invention has the beneficial effects that: the embodiment of the invention provides a method for accurately identifying routing information, which comprises the steps of receiving request information, wherein the request information comprises path information of a target path and is used for requesting to call the routing information corresponding to the target path; segmenting the path information to obtain a plurality of pieces of sub-path information after segmentation numbering, and generating an identifier of each piece of sub-path information; and inquiring a preset routing rule table according to the information of each sub-path to obtain the routing information corresponding to the target path, wherein the preset routing rule table is stored in the target application program in a distributed manner. The preset routing rule table is stored in the target application program in a distributed mode, storage pressure of the server can be reduced, the request path is segmented, and the preset routing rule table is inquired according to the segmented request path to determine routing information, so that efficiency in determining the routing information can be improved, the request information can be responded quickly, and performance of the server is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic flow chart of a method for accurately identifying routing information according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for accurately identifying routing information according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a method for accurately identifying routing information according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for accurately identifying routing information according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for accurately identifying routing information according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an apparatus for accurately identifying routing information according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention.
In the method for accurately identifying routing information provided in the embodiment of the present invention, the execution subject may be an API (Application Programming Interface) gateway server, and may also be another server that needs to store and match routing information.
Fig. 1 is a schematic flow chart of a method for accurately identifying routing information according to an embodiment of the present invention; as shown in fig. 1, the method includes:
s101, request information is received, and the request information comprises path information of a target path.
The request information is used for requesting to call the routing information corresponding to the target path.
In some embodiments, the client, the browser, or the third-party service background may send request information to the server, and the server may receive the request information and parse the request information to obtain path information including the target path in the request information.
For example, the request information may be:
“http//:www.gateway.com/dssp/user/query/id/1001”
the server may analyze the request information, and the path information for obtaining the request information may be:
“/dssp/user/query/id/1001”
s102, segmenting the path information and adding the identification to obtain a plurality of segmented sub-path information.
Wherein each routing information has a corresponding identity.
In a possible implementation manner, the routing information is segmented by a preset rule to obtain a plurality of segmented sub-path information, and the plurality of segmented sub-path information are sequentially added with identifiers to obtain a plurality of segmented sub-path information. The mark may be added according to a sequence, such as a number, a letter, and the like, or may be added according to other rules, which is not limited herein.
For example, when the path information is "/dssp/user/query/id/1001", the sub-path information after splitting and adding the identifier may be:
"0": "dssp"; "1": "user"; "2": "query"; "3": "id"; "4": "1001". Wherein, 0-4 is the mark of each sub-path information.
S103, inquiring a preset routing rule table according to the information of each sub-path, and acquiring the routing information corresponding to the target path.
The preset routing rule table is stored in a target application program in a distributed manner, the target application program may be a third-party application program, and the third-party application program may be integrated on a server, or may be integrated on another server.
In addition, the preset routing rule table may include a plurality of fields, each field having a corresponding number and an identifier of corresponding routing information, that is, being stored in the target application program in a distributed manner.
In a possible implementation manner, for each piece of sub-path information, the server may simultaneously perform distributed lookup on a field matching each piece of sub-route information in the preset routing rule table, so that the route information corresponding to the target path may be obtained.
It should be noted that, the server receives a plurality of request messages, and may also segment the plurality of request messages and query the preset routing rule table at the same time.
In summary, an embodiment of the present invention provides a method for accurately identifying routing information, where the method receives request information, where the request information includes path information of a target path, and is used to request to invoke routing information corresponding to the target path; segmenting the path information to obtain a plurality of pieces of sub-path information after segmentation numbering, and generating an identifier of each piece of sub-path information; and inquiring a preset routing rule table according to the information of each sub-path to obtain the routing information corresponding to the target path, wherein the preset routing rule table is stored in the target application program in a distributed manner. The preset routing rule table is stored in the target application program in a distributed mode, storage pressure of the server can be reduced, the request path is segmented, and the preset routing rule table is inquired according to the segmented request path to determine routing information, so that efficiency in determining the routing information can be improved, the request information can be responded quickly, and performance of the server is improved.
Fig. 2 is a schematic flow chart of a method for accurately identifying routing information according to an embodiment of the present invention; as shown in fig. 2, before receiving the request information in S101, the method may further include:
s201, loading all routing information, wherein the routing information comprises non-mode information and mode information.
The non-mode information may be specific field information, and the mode information may be non-field information. The server may load all routing information from a cache or database.
For example, when the routing information is: "1002: when/dssp/user/delete/, the non-mode information may be "dssp", "user", "delete", the mode information may be "", and the corresponding identifier of the routing information may be "1002".
Of course, the mode information may also be "+" or "? ", other types of non-field information may also be used, and the embodiment of the present invention does not specifically limit this.
S202, segmenting the non-mode information of each routing information and generating corresponding identification to obtain a plurality of fields.
Wherein each routing information has a corresponding identification.
In a possible implementation manner, for each piece of routing information, the server may perform segmentation, sequentially number a plurality of pieces of segmented routing information to obtain a plurality of fields, and generate an identifier of each field according to the identifier of the routing information.
It should be noted that each field may have at least one corresponding identifier, and each field has a corresponding number.
For example, when the routing information is "1: when/dssp/user/query/id/1001 ", the sub-path information after the splitting numbering may be: "0": "dssp"; "1": "user"; "2": "query"; "3": "id"; "4": "1001"; "id": "1". When the routing information is "1002: when/dssp/user/delete/", the sub-path information after splitting the number may be: "0": "dssp"; "1": "user"; "2": "delete"; "id": "1002". Then "0": the identifiers "dssp" are "1" and "1002", "1": the identifiers corresponding to "user" are also "1" and "1002", "2": "query", "3": "id" and "4": the identifier corresponding to "1001" is "1", "2": the label corresponding to "delete" is "1002".
S203, establishing an inverted index for the plurality of fields to obtain a preset routing rule table.
Wherein each field has a corresponding identification.
In some embodiments, the server may sort the multiple fields in the forward order or the reverse order according to the number corresponding to each field, and establish a reverse index to form the preset routing rule table. The preset routing rule table may include a plurality of fields, each field having a corresponding number and a corresponding at least one identification.
For example, the routing information is "1: /dssp/user/query/id/1001 "and" 1002: when/dssp/user/delete/", the preset routing rule table may be: "0": "dssp"; "1": "user"; "2": "query"; "2": "delete"; "3": "id"; "4": "1001".
Wherein, the ratio of "0": the identifiers "dssp" are "1" and "1002", "1": the identifiers corresponding to "user" are also "1" and "1002", "2": the identifiers corresponding to "delete" are "1002", "2": "query", "3": "id" and "4": the label corresponding to "1001" is "1".
In summary, in the embodiment of the present invention, by loading all the routing information, the routing information includes non-mode information and mode information; segmenting the non-mode information of each routing information and generating a corresponding identifier to obtain a plurality of fields; and establishing an inverted index for the plurality of fields to obtain a preset routing rule table, wherein each field has a corresponding identifier. The reverse index can improve the efficiency of quick matching, save the running memory of a server, store the preset routing rule table in a distributed manner, improve the storage fault tolerance, reduce the data loading time delay and improve the retrieval efficiency of a target path.
Fig. 3 is a schematic flow chart of a method for accurately identifying routing information according to an embodiment of the present invention; as shown in fig. 3, the loading all the routing information in S201 may include:
s301, all routing configuration information is loaded from the routing rule storage layer.
In one possible embodiment, the routing rule storage layer may include: a routing rule file, a relational database, a routing rule caching service, other storage forms of routing rules, etc., and the server may load all routing configuration information from the routing rule storage layer.
S302, a routing rule loading analysis layer is adopted to analyze the routing configuration information to obtain initial routing rule information.
The routing rule loading and analyzing layer can comprise a file loading analyzer, a relational database loading analyzer, a cache loading analyzer and other loading analyzers.
In some embodiments, the server may analyze the routing configuration information in the routing rule file, the relational database, the routing rule cache service, and the routing rule in other storage forms respectively through the file load parser, the relational database load parser, the cache load parser, and the other form load parser to obtain the initial routing rule information.
S303, updating the initial routing rule information to obtain all routing information.
In a possible embodiment, for all the initial routing information, when the server detects that the initial routing rule information of the same identifier changes, the initial routing rule information may be updated, so that all the routing information may be obtained.
Fig. 4 is a schematic flowchart of a method for accurately identifying routing information according to an embodiment of the present invention; as shown in fig. 4, the querying the preset routing rule table according to the sub-path information in S103 to obtain the routing information corresponding to the target path may include:
s401, inquiring a preset routing rule table according to the sub-path information to obtain a plurality of routing information with matching degrees meeting preset conditions.
In some embodiments, the server may search a field that is the same as each sub-path information in a preset routing rule table, so as to obtain a plurality of matched routing information, then calculate a matching degree between each matched routing information and the routing information corresponding to the target path, and use the routing information of which the matching degree is greater than a preset matching threshold as the routing information meeting the preset condition.
Of course, the server may also select a preset number of pieces of matching routing information with a higher matching degree from the multiple pieces of matching routing information as the routing information meeting the preset condition, which is not specifically limited in the embodiment of the present invention.
It should be noted that, the server may determine the matching degree between each matched routing information and the routing information corresponding to the target path according to the similarity between each matched routing information and the routing information corresponding to the target path.
For example, the server may determine the matching degree between the matched routing information and the routing information corresponding to the target path according to a ratio of the number of fields in each matched routing information to the number of sub-path information. Of course, the matching degree may also be determined by multiplying the comparison value by a preset value.
For example, when the routing information corresponding to the target path is "/dssp/user/delete/" and the matched routing information is "/dssp/user/delete/", the matching degree between the two may be eighty-nine percent.
Optionally, the preset routing rule table is queried according to the sub-path information to obtain a preset number of routing information with matching degree from high to low.
S402, if the routing information with the highest matching degree does not include the mode information, the routing information with the highest matching degree is used as the routing information corresponding to the target path.
Wherein the mode information may include non-field information.
It should be noted that the routing information meeting the preset condition may be arranged from top to bottom according to the matching degree, or may be arranged from top to bottom according to the matching degree, which is not specifically limited in the embodiment of the present invention. When the routing information of the preset condition is arranged from high to low according to the matching degree, the first routing information can be used as the routing information corresponding to the target path.
And S403, if the routing information with the highest matching degree comprises mode information, determining the routing information corresponding to the target path in the routing information with the matching degrees meeting the preset conditions by adopting a preset algorithm.
In some possible embodiments, if the server determines that the routing information with the highest matching degree includes pattern information, a pattern matching algorithm is adopted to traverse a plurality of routing information with matching degrees meeting preset conditions according to the target path, and determine information that is most matched with the target path information, that is, determine the routing information corresponding to the target path.
The Pattern matching algorithm may be an Ant Pattern algorithm, and may also be other types of algorithms, which is not specifically limited in the embodiment of the present invention.
In the embodiment of the invention, the server quickly and accurately positions the routing information corresponding to the target path in the routing information with the matching degrees meeting the preset conditions through the pattern matching algorithm, so that the matching range through the pattern matching algorithm is reduced, the efficiency of determining the routing information corresponding to the target path is improved, and the performance of the server is also improved.
Fig. 5 is a schematic structural diagram of an apparatus for accurately identifying routing information according to an embodiment of the present invention; as shown in fig. 5, the apparatus may include:
a receiving module 501, configured to receive request information, where the request information includes path information of a target path and is used to request to invoke routing information corresponding to the target path;
a segmentation module 502, configured to segment the path information and add an identifier to the path information, so as to obtain multiple pieces of segmented sub-path information;
the obtaining module 503 is configured to query a preset routing rule table according to the sub-path information, and obtain routing information corresponding to the target path, where the preset routing rule table is stored in the target application in a distributed manner.
Optionally, as shown in fig. 6, the apparatus further includes:
a loading module 504, configured to load all routing information, where the routing information includes non-mode information and mode information;
the processing module 505 is configured to segment the non-mode information of each piece of routing information and generate a corresponding identifier, so as to obtain a plurality of fields;
the establishing module 506 is configured to establish an inverted index for the multiple fields to obtain a preset routing rule table, where each field has a corresponding identifier.
Optionally, the loading module 504 is specifically configured to load all the routing configuration information from the routing rule storage layer; adopting a routing rule loading analysis layer to analyze the routing configuration information to obtain initial routing rule information; and updating the initial routing rule information to obtain all routing information.
Optionally, the obtaining module 503 is specifically configured to query a preset routing rule table according to the sub-path information, so as to obtain a plurality of routing information whose matching degrees meet preset conditions; if the routing information with the highest matching degree does not comprise the mode information, taking the routing information with the highest matching degree as the routing information corresponding to the target path; and if the routing information with the highest matching degree comprises the mode information, determining the routing information corresponding to the target path in the routing information with the matching degrees meeting the preset conditions by adopting a preset algorithm.
Optionally, the obtaining module 503 is further specifically configured to query a preset routing rule table according to the sub-path information, so as to obtain a preset number of pieces of routing information with a matching degree from high to low.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a processing element scheduler code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server includes: a processor 701, a memory 702.
The memory 702 is used for storing programs, and the processor 701 calls the programs stored in the memory 702 to execute the above method embodiments. The specific implementation and technical effects are similar, and are not described herein again.
Optionally, the invention also provides a program product, for example a computer-readable storage medium, comprising a program which, when being executed by a processor, is adapted to carry out the above-mentioned method embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

Claims (10)

1. A method for quickly and accurately identifying routing information is characterized by comprising the following steps:
receiving request information, wherein the request information comprises path information of a target path and is used for requesting to call routing information corresponding to the target path;
segmenting the path information and adding marks to obtain a plurality of segmented sub-path information;
and inquiring a preset routing rule table according to the sub-path information to acquire routing information corresponding to the target path, wherein the preset routing rule table is stored in a target application program in a distributed mode.
2. The method of claim 1, wherein prior to said receiving the request information, the method further comprises:
loading all routing information, wherein the routing information comprises non-mode information and mode information;
segmenting the non-mode information of each routing information and generating a corresponding identifier to obtain a plurality of fields;
and establishing an inverted index for the plurality of fields to obtain the preset routing rule table, wherein each field has a corresponding identifier.
3. The method of claim 2, wherein said loading all routing information comprises:
loading all routing configuration information from a routing rule storage layer;
adopting a routing rule loading analysis layer to analyze the routing configuration information to obtain initial routing rule information;
and updating the initial routing rule information to obtain all routing information.
4. The method according to claim 2, wherein the querying a preset routing rule table according to the sub-path information to obtain the routing information corresponding to the target path comprises:
inquiring a preset routing rule table according to the sub-path information to obtain a plurality of routing information with matching degrees meeting preset conditions;
if the routing information with the highest matching degree does not comprise the mode information, taking the routing information with the highest matching degree as the routing information corresponding to the target path;
and if the routing information with the highest matching degree comprises the mode information, determining the routing information corresponding to the target path in the routing information with a plurality of matching degrees meeting preset conditions by adopting a preset algorithm.
5. The method according to claim 4, wherein the querying a preset routing rule table according to each piece of sub-path information to obtain a plurality of pieces of routing information with matching degrees satisfying a preset condition comprises:
and inquiring a preset routing rule table according to the sub-path information to obtain a preset number of routing information with the matching degree from high to low.
6. A device for quickly and accurately identifying routing information is characterized by comprising:
the receiving module is used for receiving request information, wherein the request information comprises path information of a target path and is used for requesting to call routing information corresponding to the target path;
the segmentation module is used for segmenting the path information and adding an identifier to obtain a plurality of segmented sub-path information;
and the acquisition module is used for inquiring a preset routing rule table according to the information of each sub-path and acquiring the routing information corresponding to the target path, wherein the preset routing rule table is stored in a target application program in a distributed mode.
7. The apparatus of claim 6, wherein prior to said receiving the request information, the apparatus further comprises:
the loading module is used for loading all routing information, and the routing information comprises non-mode information and mode information;
the processing module is used for segmenting the non-mode information of each routing information and generating a corresponding identifier to obtain a plurality of fields;
and the establishing module is used for establishing inverted indexes for the fields to obtain the preset routing rule table, wherein each field has a corresponding identifier.
8. The apparatus according to claim 7, wherein the loading module is specifically configured to load all routing configuration information from the routing rule storage layer; adopting a routing rule loading analysis layer to analyze the routing configuration information to obtain initial routing rule information; and updating the initial routing rule information to obtain all routing information.
9. A server, comprising: a memory storing a computer program executable by the processor, and a processor implementing the method of any of the preceding claims 1-5 when executing the computer program.
10. A storage medium having stored thereon a computer program which, when read and executed, implements the method of any of claims 1-5.
CN201911152616.XA 2019-11-20 2019-11-20 Method, device, server and storage medium for quickly and accurately identifying routing information Pending CN110879819A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911152616.XA CN110879819A (en) 2019-11-20 2019-11-20 Method, device, server and storage medium for quickly and accurately identifying routing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911152616.XA CN110879819A (en) 2019-11-20 2019-11-20 Method, device, server and storage medium for quickly and accurately identifying routing information

Publications (1)

Publication Number Publication Date
CN110879819A true CN110879819A (en) 2020-03-13

Family

ID=69729448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911152616.XA Pending CN110879819A (en) 2019-11-20 2019-11-20 Method, device, server and storage medium for quickly and accurately identifying routing information

Country Status (1)

Country Link
CN (1) CN110879819A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685417A (en) * 2020-12-30 2021-04-20 京东数字科技控股股份有限公司 Database operation method, system, device, server and storage medium
CN115225572A (en) * 2022-07-13 2022-10-21 阿里巴巴(中国)有限公司 Routing information processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453407A (en) * 2007-12-03 2009-06-10 华为技术有限公司 Router and method for route message processing
US20100165997A1 (en) * 2008-12-26 2010-07-01 Takehiko Matsumoto Path switching method, communication system, communication device, and program
US20120163797A1 (en) * 2009-09-03 2012-06-28 Zte Corporation Apparatus and method for rerouting multiple traffics
CN103605704A (en) * 2013-11-08 2014-02-26 深圳大学 Mass url (uniform resource locator) data any field indexing and retrieving method
US20180159765A1 (en) * 2015-07-31 2018-06-07 Huawei Technologies Co., Ltd. Routing rule obtaining method, device, and system
CN108881448A (en) * 2018-06-27 2018-11-23 杭州贝购科技有限公司 The processing method and processing device of API request

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101453407A (en) * 2007-12-03 2009-06-10 华为技术有限公司 Router and method for route message processing
US20100165997A1 (en) * 2008-12-26 2010-07-01 Takehiko Matsumoto Path switching method, communication system, communication device, and program
US20120163797A1 (en) * 2009-09-03 2012-06-28 Zte Corporation Apparatus and method for rerouting multiple traffics
CN103605704A (en) * 2013-11-08 2014-02-26 深圳大学 Mass url (uniform resource locator) data any field indexing and retrieving method
US20180159765A1 (en) * 2015-07-31 2018-06-07 Huawei Technologies Co., Ltd. Routing rule obtaining method, device, and system
CN108881448A (en) * 2018-06-27 2018-11-23 杭州贝购科技有限公司 The processing method and processing device of API request

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685417A (en) * 2020-12-30 2021-04-20 京东数字科技控股股份有限公司 Database operation method, system, device, server and storage medium
CN112685417B (en) * 2020-12-30 2024-04-05 京东科技控股股份有限公司 Database operation method, system, device, server and storage medium
CN115225572A (en) * 2022-07-13 2022-10-21 阿里巴巴(中国)有限公司 Routing information processing method and device, electronic equipment and storage medium
CN115225572B (en) * 2022-07-13 2023-05-26 阿里巴巴(中国)有限公司 Processing method and device of routing information, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Muckell et al. SQUISH: an online approach for GPS trajectory compression
US11775501B2 (en) Trace and span sampling and analysis for instrumented software
US9189280B2 (en) Tracking large numbers of moving objects in an event processing system
US8631007B1 (en) Disambiguating keywords and other query terms used to select sponsored content
US20150310644A1 (en) Efficient representations of graphs with multiple edge types
US8527503B2 (en) Processing search queries in a network of interconnected nodes
US10496645B1 (en) System and method for analysis of a database proxy
CN106156088B (en) Index data processing method, data query method and device
US9251227B2 (en) Intelligently provisioning cloud information services
CN105005567B (en) Interest point query method and system
US20130103678A1 (en) Processing Search Queries Using A Data Structure
CN110674427B (en) Method, device, equipment and storage medium for responding to webpage access request
CN110879819A (en) Method, device, server and storage medium for quickly and accurately identifying routing information
CN114900546B (en) Data processing method, device and equipment and readable storage medium
CN111221742B (en) Test case updating method and device, storage medium and server
CN107835132A (en) A kind of method and device of traffic source tracking
CN109471874A (en) Data analysis method, device and storage medium
US9092338B1 (en) Multi-level caching event lookup
CN110704481A (en) Method and device for displaying data
CN108804502A (en) Big data inquiry system, method, computer equipment and storage medium
CN112507198A (en) Method, apparatus, device, medium, and program for processing query text
CN110505238A (en) The processing unit and method of message queue based on EDR
CN113256301B (en) Data shielding method, device, server and medium
CN104679808A (en) Method and system for performing search queries using and building a block-level index
CN114528313A (en) Data processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200313