Method and apparatus for processing service request
By parsing the characteristics of business requests and modifying the identifiers in the condition mapping table and rule mapping table, the target routing rule is selected to process the business requests, which solves the problem of low efficiency in traversal query in the civil aviation information system and realizes efficient routing operation.
Patent Information
- Application Number
- CN202411363490.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-09-27
AI Technical Summary
In existing technologies, the route determination method of civil aviation information systems when processing business requests is inefficient, resulting in low timeliness and efficiency.
By receiving business requests, parsing request characteristics, obtaining the target storage address from the condition mapping table and rule mapping table, modifying the identifier of the routing condition, selecting the target routing rule, and processing the business request according to the routing policy.
It improves the efficiency of determining routing rules, reduces repetitive operations, and enhances the timeliness and efficiency of business request processing.
Smart Images

Figure CN119135605B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, and more specifically, to a method and apparatus for processing business requests. Background Technology
[0002] The civil aviation sector is one of the earliest fields to apply information technology. Airlines and airports around the world access the civil aviation information system through various front-end systems to process business.
[0003] With the rapid development of the civil aviation industry and the rapid growth of air passenger volume, civil aviation information systems have evolved into distributed systems composed of various front-end and back-end services. Each component of the civil aviation information system is developing rapidly and independently while maintaining basic interface stability. The main task of business routing is to forward user requests from the front-end to the appropriate back-end service according to business needs.
[0004] When a routing service request is received, it is necessary to determine the routing rules that the routing service request must satisfy based on the routing requirements in the service request, and then perform the routing operation under the routing rules for the routing service request. For example, if the routing requirements in the service request are A and B, then the routing operation to be performed for the service request is the routing operation that satisfies the routing rules for A and B.
[0005] However, when selecting a routing operation, each routing operation is usually traversed in the routing operation table according to the routing requirements in the business request until a routing operation that meets the routing requirements is found. However, since the routing rules corresponding to different routing operations are different, and the number of routing operations is very large, there will be a large number of repeated comparison operations of routing requirements and routing rules during the traversal and search for routing operations, resulting in low timeliness and efficiency of the traversal operation.
[0006] There is currently no effective solution to the problem that the method of determining the routing of business requests by traversing and querying in related technologies is inefficient. Summary of the Invention
[0007] This application provides a method and apparatus for processing business requests to solve the problem that the efficiency of determining the routing operation of business requests using the traversal query method in related technologies is low.
[0008] According to one aspect of this application, a method for processing a service request is provided. The method includes: receiving a service request sent by a target user and parsing the service request to obtain M request features, where M is a positive integer; obtaining the storage address of a target routing condition matching each request feature from a condition mapping table to obtain M sets of target storage addresses, wherein the condition mapping table contains multiple routing conditions and at least one storage address in a rule mapping table for each routing condition, the rule mapping table contains P routing rules, each routing rule consists of zero or at least one routing condition, and each routing condition is stored in a storage space indicated by a storage address, where P is a positive integer; obtaining the routing condition stored in the storage space indicated by each target storage address from the rule mapping table, and changing the initial identifier carried by each routing condition to a target identifier; selecting a target routing rule according to the identifier of the routing condition in each routing rule, and processing the service request according to the routing policy carried in the target routing rule.
[0009] Optionally, parsing the business request to obtain M request features includes: obtaining the request content of the business request, and identifying M keywords in the request content according to a preset dictionary, wherein the preset dictionary contains multiple keywords; obtaining the feature value of each keyword in the request content, and combining each group of keywords and feature values to obtain M request features.
[0010] Optionally, changing the initial identifier carried by each routing condition to the target identifier includes: generating an identifier table according to a rule mapping table, wherein the identifier table contains multiple sets of initial identifiers, each set of initial identifiers being the identifier of each routing condition in a routing rule; determining the routing condition stored in the storage space indicated by each of the M sets of target storage addresses, and changing the initial identifier carried by each routing condition to the target identifier in the identifier table.
[0011] Optionally, selecting the target routing rule based on the identifier of the routing condition in each routing rule includes: obtaining routing rules where all routing conditions are identified as the target identifier, resulting in Q candidate routing rules, where Q is a positive integer; obtaining the priority of each candidate routing rule, resulting in Q priorities; and determining the candidate routing rule with the highest priority as the target routing rule.
[0012] Optionally, the rule mapping table is generated as follows: Receive an initial rule list sent by the operations and maintenance terminal, wherein the initial rule list contains multiple initial rules arranged in a preset priority order; sequentially determine whether each initial rule contains only preset logical operators; if the initial rule contains only preset logical operators, determine the initial rule as a routing rule; if the initial rule contains other logical operators, split the initial rule according to the other logical operators to obtain multiple routing rules, and arrange the multiple routing rules according to priority, wherein the routing rules contain only preset logical operators, and the other logical operators are operators other than preset logical operators; if all initial rules are changed to routing rules, determine the initial rule list as the rule mapping table.
[0013] Optionally, arranging multiple routing rules according to priority includes: obtaining the arrangement order of each routing rule in the initial rules, and arranging the multiple routing rules according to the arrangement order.
[0014] Optionally, selecting a target routing rule based on the identifier of the routing condition in each routing rule includes: in the rule mapping table, determining in descending order of priority whether the identifier of each routing condition in each routing rule is a target identifier; and determining the routing rule whose first routing condition identifier is a target identifier as the target routing rule.
[0015] Optionally, the condition mapping table is generated by: setting a first sequence number for each routing rule in the rule mapping table, and setting a second sequence number for each routing condition in each routing rule; generating the storage address of each routing condition in the rule mapping table based on the first and second sequence numbers; and generating the condition mapping table based on each routing condition and its corresponding at least one storage address.
[0016] Optionally, after obtaining a routing rule where all routing conditions have the target identifier, the method further includes: if no routing rule exists where all routing conditions have the target identifier, processing the business request according to the routing policy carried in the specified routing rule.
[0017] According to another aspect of this application, a service request processing apparatus is provided. The apparatus includes: a parsing unit, configured to receive a service request sent by a target user and parse the service request to obtain M request features, where M is a positive integer; an acquisition unit, configured to acquire the storage address of a target routing condition matching each request feature from a condition mapping table, obtaining M sets of target storage addresses, wherein the condition mapping table contains multiple routing conditions, and each routing condition has at least one storage address in a rule mapping table, the rule mapping table contains P routing rules, each routing rule consists of 0 or at least one routing condition, and each routing condition is stored in a storage space indicated by a storage address, where P is a positive integer; a modification unit, configured to acquire the routing condition stored in the storage space indicated by each target storage address from the rule mapping table, and modify the initial identifier carried by each routing condition to a target identifier; and a selection unit, configured to select a target routing rule according to the identifier of the routing condition in each routing rule, and process the service request according to the routing policy carried in the target routing rule.
[0018] According to another aspect of the present invention, a computer program product is also provided, comprising a computer program that, when executed by a processor, implements a method for processing a business request as described in this application.
[0019] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform a processing method for a business request.
[0020] This application employs the following steps: receiving a service request sent by a target user and parsing the service request to obtain M request features, where M is a positive integer; retrieving the storage address of the target routing condition matching each request feature from a condition mapping table, resulting in M sets of target storage addresses. The condition mapping table contains multiple routing conditions and at least one storage address for each routing condition in a rule mapping table. The rule mapping table contains P routing rules, each consisting of zero or at least one routing condition, and each routing condition is stored in a storage space indicated by a storage address, where P is a positive integer; retrieving the routing condition stored in the storage space indicated by each target storage address from the rule mapping table, and changing the initial identifier carried by each routing condition to a target identifier; selecting a target routing rule based on the identifier of the routing condition in each routing rule, and processing the service request according to the routing strategy carried in the target routing rule. This solves the problem of low efficiency in determining the routing operation of a service request using a traversal query method in related technologies. By identifying the request characteristics in a business request and determining the storage address of the target routing condition that matches the request characteristics, the location of the target routing condition matching the request characteristics is determined in the rule mapping table based on the storage address. The identifier of the target routing condition is then modified. Based on the modification of the identifier of the routing condition contained in the routing rules in the rule mapping table, the target routing rule that matches all the request characteristics in the business request is determined. The business request is then processed according to the routing strategy carried in the target routing rule, thereby achieving the technical effect of improving the efficiency of finding the target routing rule. Attached Figure Description
[0021] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0022] Figure 1 This is a flowchart of a service request processing method provided according to an embodiment of this application;
[0023] Figure 2 This is a flowchart of an optional service request processing method provided according to an embodiment of this application;
[0024] Figure 3 This is a schematic diagram of a service request processing apparatus provided according to an embodiment of this application;
[0025] Figure 4 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0029] It should be noted that the processing method and apparatus for business requests as defined in this disclosure can be used in the field of big data, or in any field other than big data. The application field of the processing method and apparatus for business requests as defined in this disclosure is not limited.
[0030] It should be noted that all information, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) used in this application are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with the relevant laws, regulations, and standards of the relevant regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose whether to authorize or refuse use. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface, and the relevant information is obtained only after receiving consent from the aforementioned user or organization.
[0031] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0032] Business routing: Based on business needs, user requests from the front end are forwarded to the appropriate backend service by examining the business parameters.
[0033] According to an embodiment of this application, a method for processing business requests is provided.
[0034] Figure 1 This is a flowchart of a service request processing method provided according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:
[0035] Step S101: Receive the service request sent by the target user and parse the service request to obtain M request features in the service request, where M is a positive integer.
[0036] It should be noted that the business request sent by the target user can be a request sent to the server when the target user needs to perform a certain business. After receiving the business request sent by the target user, the server needs to perform a business routing operation to determine the routing operation to be performed on the business request, thereby forwarding the business request to the corresponding backend server.
[0037] After receiving a business request, the specific server needs to parse the business request in order to accurately route it to the corresponding backend server. This process yields M request features, each of which is a business parameter in the request. Based on these M features, the server can determine the routing rule that the business request conforms to and then send the business request to the corresponding backend server according to the routing method corresponding to that rule.
[0038] For example, a service request initiated by a target user from a CA (CA being an airline code) has the following characteristics: service type is FUNC2, options are empty, application domain is 1, and the routing rule includes:
[0039] 2000ROUTING TO SRV20 SET PROTOCOL=1WHEN FUNC=FUNC2 AND AIRLINE=CA;
[0040] 3000ROUTING TO SRV21 SET PROTOCOL=1WHEN FUNC=FUNC2;
[0041] Based on the three request characteristics mentioned above, the routing rule corresponding to the service request can be determined to be 2000 (because it meets the requirement of AIRLINE=CA in routing rule 2000). Then, the service request is sent to the corresponding backend server according to the routing method corresponding to routing rule 2000. For example, the routing method can be: route to SRV20, use protocol 1 to convert the message, thereby completing the service routing operation of the service request.
[0042] Step S102: Obtain the storage address of the target routing condition that matches each request feature from the condition mapping table to obtain M sets of target storage addresses. The condition mapping table contains multiple routing conditions and at least one storage address in the rule mapping table for each routing condition. The rule mapping table contains P routing rules. Each routing rule consists of 0 or at least one routing condition. Each routing condition is stored in the storage space indicated by a storage address, where P is a positive integer.
[0043] It should be noted that the condition mapping table can be as shown in Table 1:
[0044] Table 1
[0045]
[0046]
[0047]
[0048] The routing conditions in the condition mapping table are the routing conditions contained in the routing rules. Based on the routing conditions, it can be determined whether the service request sent by the user meets the routing conditions. The address information is the routing rule corresponding to the routing condition in the condition mapping table and its position in the routing rule. For example, if the address information is 800101, it indicates that the routing condition is the first routing condition in the routing rule numbered 8001.
[0049] It should be noted that the rule mapping table is shown in Table 2:
[0050] Table 2
[0051]
[0052]
[0053] In Table 2, each number corresponds to a routing rule. Each routing rule consists of three parts: number, routing operation content, and multiple routing conditions. Taking routing rule 1000 as an example, the number is 1000, and the routing operation content is: ROUTING TO SRV10 SET PROTOCOL=1, which means routing to SRV10 and using Protocol 1 to convert the message. The address information of the routing condition "FUNC=FUNC1" of this routing rule is 100001. Therefore, the routing rule that the service request conforms to can be determined according to the condition mapping table and the rule mapping table.
[0054] It should be noted that routing rules may not contain routing conditions. For example, routing rule number 10000 in Table 2 does not contain routing conditions. This routing rule is used to uniformly process requests that do not conform to other routing rules in the table, thereby avoiding situations where a request cannot be processed because it does not conform to any of the routing rules.
[0055] Specifically, after obtaining multiple request characteristics of a business request, it is necessary to determine the routing conditions corresponding to each request characteristic, that is, the routing conditions that the request characteristic meets. For example, if a certain request characteristic in a business request is: business type FUNC2, then the routing condition that the request characteristic meets is: "FUNC=FUNC2".
[0056] Furthermore, after determining the routing conditions corresponding to each request feature, at least one storage address corresponding to each routing condition can be determined according to the condition mapping table. For example, in the case of routing condition “FUNC=FUNC2”, the corresponding storage addresses are 200001 and 300001. Then, the routing rule containing the routing condition and the location information of the routing condition in each routing rule can be determined according to the storage address.
[0057] It should be noted that when determining the routing condition corresponding to the request feature in the condition mapping table, it is not necessary to traverse each routing condition in the condition mapping table in turn to determine the routing condition corresponding to the request feature. Instead, the hash value of the request feature can be calculated, and the location of the routing condition corresponding to the request feature can be accurately located based on the storage address corresponding to the hash value in the condition routing table. This can improve the efficiency of obtaining the storage address corresponding to the routing condition of the request feature in the rule mapping table.
[0058] For example, if a request in a business request has the characteristic of "business type FUNC2", the routing condition can be determined as "FUNC=FUNC2". At this time, the hash value of "FUNC=FUNC2" can be calculated according to the preset hash algorithm, and the location of "FUNC=FUNC2" can be accurately determined in the conditional routing table based on the hash value. Thus, the storage address of "FUNC=FUNC2" in the rule mapping table can be directly obtained from the conditional routing table as 200001 or 300001.
[0059] Step S103: Obtain the routing conditions stored in the storage space indicated by each target storage address in the rule mapping table, and change the initial identifier carried by each routing condition to the target identifier.
[0060] Specifically, after determining the storage address of the routing condition corresponding to each request feature in the condition mapping table, the routing condition under the corresponding routing rule in the rule mapping table can be determined based on the storage address.
[0061] For example, if the request characteristics include: service type FUNC2, application domain 1, according to the condition mapping table, the storage addresses of the routing condition FUNC=FUNC2 corresponding to service type FUNC2 in the rule mapping table are 200001 and 300001, and the storage addresses of the routing condition "APP=1" corresponding to application domain 1 in the rule mapping table are 900101, 900201 to 901001. In this case, the preset identifier carried by the routing condition under each address can be changed to the target identifier. Table 3 is a schematic table of the preset identifiers carried by the routing condition under each address:
[0062] Table 3
[0063]
[0064] After determining the address corresponding to the request characteristics in the business request, the preset identifier "0" in each storage address can be changed to the target identifier "1", thus obtaining the rule mapping table as shown in Table 4:
[0065] Table 4
[0066]
[0067] At this point, the routing rules corresponding to the business request can be determined based on the identifier.
[0068] It should be noted that after the routing rules for each business request are identified, the initial identifiers of some routing conditions in the rule mapping table will be modified to the target identifier. Therefore, when identifying the routing rules for the next newly added business request, all identifiers in the rule mapping table can be initialized, or a copied rule mapping table can be used to change the identifiers. This avoids making changes to the initial rule mapping table, which could lead to abnormal phenomena in subsequent use.
[0069] Step S104: Select the target routing rule according to the identifier of the routing condition in each routing rule, and process the service request according to the routing policy carried in the target routing rule.
[0070] Specifically, after modifying the identifiers of some routing conditions in the rule mapping table, the identifier of the routing condition under each routing rule can be determined in the rule mapping table, and the routing rule corresponding to the business request can be determined based on the change of the identifier, thereby selecting the target routing rule.
[0071] For example, in the rule mapping table, the routing rule that changes all routing conditions to the target identifier is determined as the target routing rule. As shown in Table 4, the routing rule numbered 2000 is determined as the target routing rule. That is, changing all identifiers to the target identifier indicates that the routing rule conforms to all request characteristics in the business request, thereby ensuring the accuracy of business routing for the business request.
[0072] The service request processing method provided in this application embodiment receives a service request sent by a target user and parses the service request to obtain M request features, where M is a positive integer; it obtains the storage address of the target routing condition matching each request feature from a condition mapping table, resulting in M sets of target storage addresses. The condition mapping table contains multiple routing conditions and at least one storage address in a rule mapping table for each routing condition. The rule mapping table contains P routing rules, each consisting of zero or at least one routing condition, and each routing condition is stored in a storage space indicated by a storage address, where P is a positive integer; it obtains the routing condition stored in the storage space indicated by each target storage address from the rule mapping table and changes the initial identifier carried by each routing condition to a target identifier; it selects a target routing rule based on the identifier of the routing condition in each routing rule and processes the service request according to the routing strategy carried in the target routing rule. This solves the problem of low efficiency in determining the routing operation of a service request using a traversal query method in related technologies. By identifying the request characteristics in a business request and determining the storage address of the target routing condition that matches the request characteristics, the location of the target routing condition matching the request characteristics is determined in the rule mapping table based on the storage address. The identifier of the target routing condition is then modified. Based on the modification of the identifier of the routing condition contained in the routing rules in the rule mapping table, the target routing rule that matches all the request characteristics in the business request is determined. The business request is then processed according to the routing strategy carried in the target routing rule, thereby achieving the technical effect of improving the efficiency of finding the target routing rule.
[0073] In order to accurately identify and obtain request features from business requests, optionally, in the business request processing method provided in this application embodiment, parsing the business request to obtain M request features in the business request includes: obtaining the request content of the business request, and identifying M keywords in the request content according to a preset dictionary, wherein the preset dictionary contains multiple keywords; obtaining the feature value of each keyword in the request content, and combining each group of keywords and feature values to obtain M request features.
[0074] Specifically, when parsing business requests, since the business requests may carry request information, message headers, attribute information and other request content that is not related to the request characteristics, it is necessary to identify the request content of the business requests through a preset dictionary, filter the request content located in the preset dictionary and obtain the keywords related to the request content.
[0075] It's important to note that business requests can be sent from the client to the server in message format. The messages exchanged between the client and server have specific formats, such as XML (Extensible Markup Language) or binary, where fields or byte sequences have clearly defined business meanings. Parsing a business request involves retrieving its various business parameters according to the message format specification. These parameters can typically be viewed as a (key, value) set, where the key is the name of the business parameter and the value is its corresponding value.
[0076] For example, if a business request contains: message header + business type: FUNC2 + application domain: 1 + other content, then the keywords obtained by filtering through the preset dictionary are: business type and application domain.
[0077] Furthermore, after obtaining the keywords, it is necessary to extract the feature values of each keyword from the business request and combine the keywords and feature values to obtain the request features.
[0078] For example, if the characteristic value of the business type is FUNC2 and the characteristic value of the application domain is 1, then the combined request characteristics are: Business type: FUNC2, Application domain: 1, thereby achieving the technical effect of accurately obtaining the request characteristics in the business request.
[0079] Optionally, in the service request processing method provided in the embodiments of this application, changing the initial identifier carried by each routing condition to the target identifier includes: generating an identifier table according to a rule mapping table, wherein the identifier table contains multiple sets of initial identifiers, each set of initial identifiers being the identifier of each routing condition in a routing rule; determining the routing condition stored in the storage space indicated by each of the M sets of target storage addresses, and changing the initial identifier carried by each routing condition to the target identifier in the identifier table.
[0080] Specifically, when changing the identifier, an identifier table can be generated based on the rule mapping table. Each row in the identifier table corresponds to a routing rule, and each column corresponds to at least one routing condition in a routing rule. The storage address of each routing condition can be obtained by combining the routing rule number and the position of the routing condition in the routing rule, thus obtaining the coordinate table of the routing condition. Further, the identifier under each coordinate is set as the initial identifier, and the identifier table generated when the rule mapping table is used is obtained.
[0081] For example, in a routing rule of 3000ROUTING TO SRV21 SET PROTOCOL=1WHEN FUNC=FUNC2, the routing condition FUNC=FUNC2 is located at position 1 in the routing rule. Therefore, the storage address of the routing condition FUNC=FUNC2 can be represented as 300001.
[0082] It should be noted that the initial identifier table may consist only of the storage address of each routing condition and the initial identifier. Since the routing condition under each storage address can be determined in the condition mapping table, if the sub-feature in the business request meets a certain routing condition, the storage address of the routing condition can be determined according to the condition mapping table. Thus, the initial identifier that needs to be changed in the identifier table can be determined directly without adding the specific routing rules and routing conditions to the identifier table.
[0083] Furthermore, after determining the target storage address of the sub-feature corresponding to each request feature in the business request, the identifier under the corresponding address in the identifier table is changed from the initial identifier to the target identifier according to the target storage address. This allows for a direct determination in the identifier table of which routing rules have changed their routing condition identifiers, and also enables a quick and accurate determination of which routing rules have changed the identifiers of all routing conditions. This achieves the technical effect of improving the efficiency of routing rule query.
[0084] For example, the initial identification table can be shown in Table 5:
[0085] Table 5
[0086]
[0087] The received business request is: User A from CA initiated a business request, the business type is FUNC2, and the options are empty.
[0088] At this point, the addresses corresponding to sub-feature FUNC = FUNC2 can be determined from the condition mapping table as 200001 and 300001, and the addresses corresponding to sub-feature CA are 200002 and 400102. Then, the identifiers of these four addresses in the identifier table can be changed from the initial identifier 0 to the target identifier 1, thus completing the identifier table modification operation. The modified identifier table is shown in Table 6.
[0089] Table 6
[0090]
[0091]
[0092] At this point, it can be determined that all the identifiers in the second row are 1. Since there are identifiers of 0 in the first row, and each row in the identifier table corresponds to a rule in the rule mapping table, and since the rules in the rule mapping table are arranged in descending order of priority, the request does not satisfy the routing rule corresponding to the first row because there is an initial identifier in the first row. Since all the identifiers in the second row are the target identifier 0, it can be determined that the request satisfies the routing rule corresponding to the second row. Therefore, the request processing flow corresponding to the routing rule corresponding to the second row is used to process the request, thereby completing the request processing operation.
[0093] To ensure accurate processing of business requests, optionally, in the business request processing method provided in this application embodiment, selecting the target routing rule based on the identifier of the routing condition in each routing rule includes: obtaining routing rules where all routing conditions are identified as target identifiers, resulting in Q candidate routing rules, where Q is a positive integer; obtaining the priority of each candidate routing rule, resulting in Q priorities; and determining the candidate routing rule with the highest priority as the target routing rule.
[0094] Specifically, when determining the target routing rule, since a business request can only be processed by the routing policy corresponding to that routing rule if it meets all the routing conditions under that routing rule, it is necessary to determine which routing rules the business request meets all the routing conditions under in order to determine the target routing rule.
[0095] Furthermore, when determining which routing rules all routing conditions a business request meets, the determination can be made based on the changes in the identifiers of the routing conditions. Since the identifiers of the routing conditions corresponding to the request characteristics have been changed, it is only necessary to determine which routing rule all routing conditions have changed from the initial identifier to the target identifier. This indicates that the requested business meets that routing rule, and the routing strategy of that routing rule can be used to process the business request.
[0096] Furthermore, using integers to compactly represent the identifier table can significantly improve the efficiency of business routing. When using integers to represent the identifier table, all routing conditions can be arranged and each corresponds to a bit in a binary number. Routing conditions that are not present in any routing rule can be adjusted to the target identifier, for example, 1. Routing conditions that exist in the routing rule can be changed to the initial identifier, for example, 0. After changing the initial identifier to the target identifier in the identifier table, the binary number can be directly converted to a decimal number. By determining whether the decimal number is the target value, it can be quickly determined whether the routing rule matches the client's request. This allows for the rapid identification of the routing rule corresponding to the client's request, and the request can then be processed using the routing rule.
[0097] For example, using an 8-bit binary number, the identifier of each routing condition in a routing rule with no more than 8 routing conditions can be expressed. For the routing rule with rule number 2000 in Table 2, the number of routing conditions is 2. The 8-bit binary number S can be used to express each routing condition as follows: the 8 bits in the binary number S are represented as S[1] to S[8], where S[1] represents the identifier of the routing condition with address 200001 (corresponding to the routing condition FUNC=FUNC2), S[2] represents the identifier of the routing condition with address 200002 (corresponding to the routing condition AIRLINE=CA), and S[3] to S[8] are not used in the routing rule with rule number 2000. During initialization, the value of the integer S is first initialized to 255 (i.e., 2^8-1), that is, S[1] to S[8] are all set to 1. Then, S[1] and S[2] are set to 0, and the value of the integer S becomes 252, which is not equal to 255.
[0098] When a service request with service type FUNC2 and empty options is received from user A in CA, the routing conditions FUNC=FUNC2 and AIRLINE=CA are both matched, thereby changing the identifiers of the routing conditions for addresses 200001 and 200002. S[1] and S[2] are both modified to 1, and the value of the integer S becomes 255.
[0099] By determining whether S equals 255, it is possible to quickly determine whether all routing conditions in the routing rule have been matched, that is, whether all routing conditions have been changed from the initial identifier to the destination identifier.
[0100] When there are many routing conditions in the routing rules, you can choose a larger integer value, such as 16-bit, 32-bit, or 64-bit, to improve the efficiency of identifying whether a request conforms to the routing rules.
[0101] It should be noted that when a business request satisfies multiple routing rules simultaneously, it is necessary to obtain the priority of each routing rule, determine the routing rule with the highest priority as the target routing rule, and use the routing strategy of the target routing rule to process the business request, thereby ensuring the accuracy of the processing of the business request.
[0102] Optionally, in the service request processing method provided in this application embodiment, the rule mapping table is generated by the following method: receiving an initial rule list sent by the operation and maintenance terminal, wherein the initial rule list contains multiple initial rules, and the multiple initial rules are arranged in a preset priority order; sequentially determining whether each initial rule contains only a preset logical operator; if the initial rule contains only a preset logical operator, the initial rule is determined as a routing rule; if the initial rule contains other logical operators, the initial rule is split according to the other logical operators to obtain multiple routing rules, and the multiple routing rules are arranged according to priority, wherein the routing rules contain only preset logical operators, and the other logical operators are operators that are not preset logical operators; if all initial rules are changed to routing rules, the initial rule list is determined as a rule mapping table.
[0103] Specifically, when generating the rule mapping table, the initial rule list is as shown in Table 7:
[0104] Table 7
[0105]
[0106]
[0107] Since there are many logical operators in Table 7, in order to determine the target routing rule based on the identifier table, the initial rules in Table 7 need to be changed. The OR and NOT logical operators in Table 7 should be changed to AND. This way, when determining the target route based on the identifier, the routing rule that the service request satisfies can be quickly determined based on the identifier change of each routing rule.
[0108] Furthermore, when modifying initial rules, it is necessary to determine whether each initial rule contains only preset logical operators, i.e., whether it contains only "and". If it contains only preset logical operators, no changes are made. If it contains other preset logical operators besides "and", the initial rule needs to be decomposed according to the other preset logical operators. For example, if an initial rule is "routing condition A" or "routing condition B", it can be decomposed into: rule A, which contains "routing condition A", and rule B, which contains "routing condition B", thus ensuring that each rule contains only the preset logical operator "and". The initial rule is then decomposed to obtain routing rules, and the routing rules are sorted according to priority to obtain a rule mapping table.
[0109] It should be noted that since the initial rules in the initial rule list are already arranged in descending order of priority when the initial rules are received, the routing rules obtained after decomposing the initial rules are still arranged in the order of the initial rules in the initial rule list. Therefore, it is not necessary to determine the priority of each routing rule and arrange them according to the priority; they can be arranged simply according to the order in the initial rule list.
[0110] It should be noted that after changing the initial rule list to a rule mapping table, if the initial rule table is not updated or modified, then when determining routing rules later, it is not necessary to use the initial rule list again. Instead, the rule mapping table can be used directly to determine the routing rules. That is, only the initial rule list is parsed and changed once. In subsequent use, only the parsed rule mapping table is used to determine the routing rules, thereby improving the efficiency of obtaining routing rules.
[0111] Optionally, in the service request processing method provided in the embodiments of this application, arranging multiple routing rules according to priority includes: obtaining the arrangement order of each routing rule in the initial rules, and arranging the multiple routing rules according to the arrangement order.
[0112] Specifically, after breaking down the initial rule into routing rules, it is also necessary to determine the priority of the routing rules. Since there is an initial priority among each initial rule, the routing rules obtained from different initial rules can be sorted by priority directly according to the priority of the initial rule. However, for routing rules obtained from the same initial rule, the priority of each routing rule can be determined according to the order in which the routing conditions contained in the routing rule are arranged in the initial rule.
[0113] For example, if an initial rule is "routing condition A" or "routing condition B", it can be broken down into: rule A, which contains "routing condition A", and rule B, which contains "routing condition B". Since "routing condition A" is listed higher than "routing condition B" in the initial rule, the priority of the decomposed rule A is higher than that of rule B. However, the priorities of rule A and rule B are still between the previous and next initial rules of this initial rule, thus determining the priority of each routing rule. The routing rules are then arranged according to their priorities to obtain a rule mapping table.
[0114] For example, if the initial rule A contains the routing conditions "routing condition 1" and "routing condition 2", the initial rule B contains the routing conditions "routing condition 3" or "routing condition 4", and the initial rule C contains the routing condition "routing condition 5", then after breaking down and arranging the initial rules, the priority order of the resulting routing rules is: initial rule A, "routing condition 3", "routing condition 4", and initial rule C.
[0115] Optionally, in the service request processing method provided in the embodiments of this application, selecting the target routing rule according to the identifier of the routing condition in each routing rule includes: in the rule mapping table, determining in descending order of priority whether the identifier of each routing condition in each routing rule is a target identifier; and determining the routing rule whose first routing condition identifier is a target identifier as the target routing rule.
[0116] Specifically, after obtaining the rule mapping table, since the routing rules in the rule mapping table are sorted according to priority, when selecting the target routing rule based on the identifier of the routing conditions in each routing rule, we can start by determining the identifier of the first routing rule in the rule mapping table, and then determine whether all the routing conditions of each routing rule are the target identifier in descending order of priority. When it is detected that all the routing conditions of a certain routing rule are the target identifier, the routing rule can be determined as the target routing rule, without needing to determine the identifiers of subsequent routing rules, thereby improving the efficiency of selecting the target routing rule.
[0117] Optionally, in the service request processing method provided in the embodiments of this application, the condition mapping table is generated by the following method: setting a first sequence number for each routing rule in the rule mapping table, and setting a second sequence number for each routing condition in each routing rule; generating the storage address of each routing condition in the rule mapping table according to the first sequence number and the second sequence number; generating the condition mapping table according to each routing condition and its corresponding at least one storage address.
[0118] Specifically, when generating a condition mapping table based on a rule mapping table, it is necessary to determine the storage address of each routing condition in the rule mapping table. The method for determining the storage address is as follows: the storage address is obtained by adding the sequence number of the routing rule to which the routing condition belongs to the position sequence number of the routing condition in the routing rule. For example, if the number of routing rule K is 5000, and rule K consists of "routing condition K1" AND "routing condition K2", then the storage address of "routing condition K2" is 500002.
[0119] Since the same routing conditions may exist in different routing rules, after obtaining the storage address of each routing condition, the storage addresses need to be classified according to the dimension of the routing condition to obtain at least one storage address for each routing condition, thus forming a condition mapping table, as shown in Table 1.
[0120] Optionally, in the service request processing method provided in the embodiments of this application, after obtaining a routing rule in which all routing conditions are identified as the target identifier, the method further includes: in the case that there is no routing rule in which all routing conditions are identified as the target identifier, processing the service request according to the routing policy carried in the specified routing rule.
[0121] Specifically, after changing the identifier of the routing conditions, there may be a situation where there are no routing rules where all routing conditions have the target identifier. In this case, all the routing rules set by the identifier cannot process the business request. In this case, it is necessary to use the routing strategy carried in the specified routing rule to process the business request, so as to avoid the phenomenon that a certain business request cannot be processed.
[0122] Figure 2 This is a flowchart of an optional service request processing method provided according to an embodiment of this application. For example... Figure 2 As shown, upon receiving a business request, the system identifies the request characteristics within the request and obtains the storage address of the routing condition corresponding to that request characteristic. Based on the address information, the initial identifier of the routing condition under the storage address is changed in the rule mapping table. Then, the identifier of the routing condition in each routing policy in the rule mapping table is determined sequentially according to priority, until a routing policy in which all routing condition identifiers are the target identifier is obtained. The target routing policy is then obtained, and the routing policy carried in the target routing rule is used to process the business request, thus achieving the technical effect of improving the efficiency of finding the target routing rule.
[0123] For example, a service request is initiated by a user on flight CZ, with service type FUNC5, option J / HELLO, and application domain 3. According to Tables 1 and 2...
[0124] App conditions not matched;
[0125] Match the condition FUNC = FUNC5;
[0126] Match the condition AIRLINE=CZ;
[0127] Match the OPTION LIKE "J / .*" condition;
[0128] The first rule that matches exactly is numbered 6000.
[0129] Therefore, the routing strategy of using SRV40 and protocol 1 to convert messages is adopted to process the service request.
[0130] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0131] This application also provides a service request processing apparatus. It should be noted that the service request processing apparatus of this application can be used to execute the service request processing method provided in this application. The service request processing apparatus provided in this application will be described below.
[0132] Figure 3 This is a schematic diagram of a service request processing apparatus provided according to an embodiment of this application. For example... Figure 3 As shown, the device includes: a parsing unit 31, an acquisition unit 32, a modification unit 33, and a selection unit 34.
[0133] The parsing unit 31 is used to receive the service request sent by the target user and parse the service request to obtain M request features in the service request, where M is a positive integer.
[0134] The acquisition unit 32 is used to obtain the storage address of the target routing condition that matches each request feature in the condition mapping table, and obtain M sets of target storage addresses. The condition mapping table contains multiple routing conditions, and each routing condition has at least one storage address in the rule mapping table. The rule mapping table contains P routing rules, each routing rule consists of 0 or at least one routing condition, and each routing condition is stored in the storage space indicated by a storage address, where P is a positive integer.
[0135] The modification unit 33 is used to obtain the routing conditions stored in the storage space indicated by each target storage address in the rule mapping table, and change the initial identifier carried by each routing condition to the target identifier.
[0136] The selection unit 34 is used to select a target routing rule based on the identifier of the routing condition in each routing rule, and to process the service request according to the routing policy carried in the target routing rule.
[0137] The service request processing apparatus provided in this application embodiment receives a service request sent by a target user through a parsing unit 31 and parses the service request to obtain M request features in the service request, where M is a positive integer; an acquisition unit 32 obtains the storage address of the target routing condition matching each request feature from a condition mapping table to obtain M sets of target storage addresses, where the condition mapping table contains multiple routing conditions and at least one storage address in a rule mapping table for each routing condition, and the rule mapping table contains P routing rules, each routing rule consisting of 0 or at least one routing condition, and each routing condition is stored in a storage space indicated by a storage address, where P is a positive integer; a modification unit 33 obtains the routing condition stored in the storage space indicated by each target storage address from the rule mapping table and changes the initial identifier carried by each routing condition to a target identifier; a selection unit 34 selects a target routing rule according to the identifier of the routing condition in each routing rule and processes the service request according to the routing policy carried in the target routing rule. This invention addresses the inefficiency of using traversal queries to determine the routing of business requests in related technologies. It identifies request characteristics within the business request and determines the storage address of target routing conditions matching those characteristics. Based on this storage address, the location of the target routing condition matching the request characteristics is determined in the rule mapping table. The identifier of the target routing condition is then modified. Based on the modified identifiers of the routing rules in the rule mapping table, the target routing rule matching all request characteristics of the business request is determined. Finally, the business request is processed according to the routing strategy carried in the target routing rule, thus improving the efficiency of finding the target routing rule.
[0138] Optionally, in the business request processing apparatus provided in this application embodiment, the parsing unit 31 includes: a first acquisition module, used to acquire the request content of the business request, and identify M keywords in the request content according to a preset dictionary, wherein the preset dictionary contains multiple keywords; and a combination module, used to acquire the feature value of each keyword in the request content, and combine each group of keywords and feature values to obtain M request features.
[0139] Optionally, in the service request processing apparatus provided in this application embodiment, the modification unit 33 includes: a generation module, configured to generate an identifier table according to a rule mapping table, wherein the identifier table contains multiple sets of initial identifiers, each set of initial identifiers being the identifier of each routing condition in a routing rule; and a first determination module, configured to determine the routing condition stored in the storage space indicated by each of the M sets of target storage addresses, and change the initial identifier carried by each routing condition to a target identifier in the identifier table.
[0140] Optionally, in the service request processing apparatus provided in this application embodiment, the selection unit 34 includes: a second acquisition module, used to acquire routing rules whose identifiers are all target identifiers, to obtain Q candidate routing rules, where Q is a positive integer; a third acquisition module, used to acquire the priority of each candidate routing rule, to obtain Q priorities; and a second determination module, used to determine the candidate routing rule with the highest priority as the target routing rule.
[0141] Optionally, in the service request processing apparatus provided in this application embodiment, the rule mapping table is generated by the following method: a receiving unit, used to receive an initial rule list sent by the operation and maintenance terminal, wherein the initial rule list contains multiple initial rules, and the multiple initial rules are arranged in a preset priority order; a judging unit, used to sequentially judge whether each initial rule contains only a preset logical operator; a first determining unit, used to determine the initial rule as a routing rule when the initial rule contains only a preset logical operator; a splitting unit, used to split the initial rule according to the remaining logical operators to obtain multiple routing rules when the initial rule contains other logical operators, and arrange the multiple routing rules according to priority, wherein the routing rules contain only the preset logical operator, and the remaining logical operators are operators that are not preset logical operators; and a second determining unit, used to determine the initial rule list as a rule mapping table when all initial rules are changed to routing rules.
[0142] Optionally, in the business request processing apparatus provided in this application embodiment, the splitting unit includes: a layout module, used to obtain the layout order of each routing rule in the initial rule, and to arrange multiple routing rules according to the layout order.
[0143] Optionally, in the service request processing apparatus provided in this application embodiment, the selection unit 34 includes: a third determining module, used to determine in the rule mapping table whether the identifier of each routing condition in each routing rule is a target identifier in descending order of priority; and a fourth determining module, used to determine the routing rule whose first routing condition identifier is a target identifier as the target routing rule.
[0144] Optionally, in the service request processing apparatus provided in this application embodiment, the condition mapping table is generated by the following method: a setting unit, configured to set a first sequence number for each routing rule in the rule mapping table, and set a second sequence number for each routing condition in each routing rule; a first generation unit, configured to generate a storage address in the rule mapping table for each routing condition based on the first sequence number and the second sequence number; and a second generation unit, configured to generate a condition mapping table based on each routing condition and its corresponding at least one storage address.
[0145] Optionally, in the service request processing apparatus provided in the embodiments of this application, after obtaining a routing rule in which all routing conditions are identified as target identifiers, the apparatus further includes: a processing unit, used to process the service request according to the routing policy carried in the specified routing rule when there is no routing rule in which all routing conditions are identified as target identifiers.
[0146] The processing device for the aforementioned business requests includes a processor and a memory. The parsing unit 31, the acquisition unit 32, the modification unit 33, the selection unit 34, etc., are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.
[0147] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured; by adjusting kernel parameters, the inefficiency of determining the route of business requests using a traversal query method in related technologies can be addressed.
[0148] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0149] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a method for processing the business request.
[0150] This invention provides a processor for running a program, wherein the program executes a method for processing the business request during runtime.
[0151] Figure 4 This is a schematic diagram of an electronic device provided according to an embodiment of this application, such as... Figure 4 As shown, this embodiment of the invention provides an electronic device 40, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the above-mentioned service request processing method. The device in this document can be a server, PC, PAD, mobile phone, etc.
[0152] This application also provides a computer program product that, when executed on a data processing device, is adapted to perform the steps of initializing a processing method for the aforementioned business request.
[0153] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0154] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0155] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0156] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0157] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0158] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0159] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0160] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0161] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for processing business requests, characterized in that, include: Receive a service request sent by a target user, and parse the service request to obtain M request features in the service request, where M is a positive integer; Obtain the storage address of the target routing condition that matches each request feature from the condition mapping table to obtain M sets of target storage addresses. The condition mapping table contains multiple routing conditions and at least one storage address in the rule mapping table for each routing condition. The rule mapping table contains P routing rules, each routing rule consists of 0 or at least one routing condition, and each routing condition is stored in the storage space indicated by a storage address, where P is a positive integer. Obtain the routing conditions stored in the storage space indicated by each target storage address from the rule mapping table, and change the initial identifier carried by each routing condition to the target identifier; The target routing rule is selected based on the identifier of the routing condition in each routing rule, and the service request is processed according to the routing policy carried in the target routing rule.
2. The method according to claim 1, characterized in that, Parsing the business request yields M request features, including: Obtain the request content of the business request, and identify M keywords in the request content according to a preset dictionary, wherein the preset dictionary contains multiple keywords; The feature value of each keyword is obtained from the request content, and each group of keywords and feature values is combined to obtain the M request features.
3. The method according to claim 1, characterized in that, Changing the initial identifier carried in each routing condition to the destination identifier includes: An identifier table is generated based on the rule mapping table, wherein the identifier table contains multiple sets of initial identifiers, and each set of initial identifiers is an identifier of each routing condition in a routing rule; Determine the routing conditions stored in the storage space indicated by each of the M groups of target storage addresses, and change the initial identifier carried by each routing condition to the target identifier in the identifier table.
4. The method according to claim 1, characterized in that, The target routing rule is selected based on the identifier of the routing condition in each routing rule, including: Obtain all routing rules whose identifiers are the target identifier, resulting in Q candidate routing rules, where Q is a positive integer; Obtain the priority of each candidate routing rule, resulting in Q priorities; The candidate routing rule with the highest priority is determined as the target routing rule.
5. The method according to claim 1, characterized in that, The rule mapping table is generated using the following method: Receive an initial rule list sent by the operation and maintenance terminal, wherein the initial rule list contains multiple initial rules, and the multiple initial rules are arranged in a preset priority order; Determine in turn whether each initial rule contains only preset logical operators; If the initial rule contains only the preset logical operator, the initial rule is determined as the routing rule; If the initial rule contains other logical operators, the initial rule is split according to the other logical operators to obtain multiple routing rules, and the multiple routing rules are arranged according to priority. The routing rules contain only the preset logical operators, and the other logical operators are operators that are not the preset logical operators. If all initial rules are changed to routing rules, the list of initial rules is determined as the rule mapping table.
6. The method according to claim 5, characterized in that, Arranging the multiple routing rules according to priority includes: Obtain the arrangement order of each routing rule in the initial rule, and arrange the multiple routing rules according to the arrangement order.
7. The method according to claim 5, characterized in that, The target routing rule is selected based on the identifier of the routing condition in each routing rule, including: In the rule mapping table, the identifier of each routing condition in each routing rule is determined sequentially in descending order of priority to determine whether it is the target identifier. The routing rule whose first routing condition identifier is the target identifier is determined as the target routing rule.
8. The method according to claim 5, characterized in that, The condition mapping table is generated using the following method: Set a first sequence number for each routing rule in the rule mapping table, and set a second sequence number for each routing condition in each routing rule; The storage address of each routing condition in the rule mapping table is generated based on the first sequence number and the second sequence number; The condition mapping table is generated based on each routing condition and its corresponding at least one storage address.
9. The method according to claim 4, characterized in that, After obtaining the routing rules where all routing conditions have the identifier of the target identifier, the method further includes: If there is no routing rule where all routing conditions have the target identifier, the service request is processed according to the routing policy carried in the specified routing rule.
10. A processing apparatus for business requests, characterized in that, include: The parsing unit is used to receive a service request sent by the target user and parse the service request to obtain M request features in the service request, where M is a positive integer; The acquisition unit is used to acquire the storage address of the target routing condition that matches each request feature in the condition mapping table, and obtain M sets of target storage addresses. The condition mapping table contains multiple routing conditions and at least one storage address in the rule mapping table for each routing condition. The rule mapping table contains P routing rules, each routing rule consists of 0 or at least one routing condition, and each routing condition is stored in the storage space indicated by a storage address, where P is a positive integer. The modification unit is used to obtain the routing conditions stored in the storage space indicated by each target storage address in the rule mapping table, and change the initial identifier carried by each routing condition to the target identifier; The selection unit is used to select a target routing rule based on the identifier of the routing condition in each routing rule, and to process the service request according to the routing policy carried in the target routing rule.
Citation Information
Patent Citations
Routing information processing method and device, electronic equipment and storage medium
CN115225572A
Request routing method and device, routing equipment, storage medium and program product
CN118573628A