Business request distribution method and device, equipment, storage medium and program product

By analyzing the resource identification information and interface categories in the business request, determining the customer identity and querying the rule configuration table, and finally determining the target system based on the resource identification information, the problem of business request distribution during data migration between the old system and the new system is solved, and the accurate distribution of business requests and normal handling of business is achieved.

CN119652975AActive Publication Date: 2025-03-18CHINA CONSTRUCTION BANK +1

Patent Information

Application Number
CN202411520408.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-18
Estimated Expiration
2044-10-29

AI Technical Summary

Technical Problem

During the data migration process between the old system and the new system, how to accurately distribute business requests to ensure the normal processing of the business is an important issue.

Method used

By obtaining the pending service request, analyzing its request header information, request body information, session information and request message, and obtaining resource identification information and interface categories. Determine the target information according to the interface category, determine the customer identity, and query the rule configuration table from the database based on the customer identity, and finally determine the target system based on the resource identification information and send the service request to the target system.

Benefits of technology

This method can accurately distribute business requests to the target system, ensure normal processing of services, and solve the problem of business request distribution during data migration between the old system and the new system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652975A_ABST
    Figure CN119652975A_ABST
Patent Text Reader

Abstract

The invention discloses a service request distribution method and device, equipment, a storage medium and a program product. The invention relates to the technical field of computers. Comprising the steps of obtaining a to-be-processed service request; analyzing the to-be-processed service request to obtain resource identification information and an interface category; determining target information based on the interface category; determining a customer identifier according to the target information, and querying a rule configuration table from a database based on the customer identifier; and determining a target system from the rule configuration table based on the resource identification information, and sending the to-be-processed service request to the target system for processing. According to the service request distribution method provided by the embodiment of the invention, the client identifier is determined through the interface category analyzed from the to-be-processed service request, the target system is determined based on the client identifier, and distribution of the service request is associated with the client identifier, so that the service request can be accurately distributed to the target system, and normal processing of the service is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method, apparatus, device, storage medium and program product for distributing a service request. Background Art

[0002] With the rapid development of computer technology, the degree of informatization of enterprises is getting higher and higher. By developing new systems with more complete functions to replace old systems, the system functions are becoming more and more perfect.

[0003] After the development of the new system is completed, the data in the old system needs to be migrated to the new system so that the new system can process the corresponding business requests. During the data migration process, in order to ensure the normal processing of the business, the business requests need to be distributed to the old system or the new system according to the progress of the data migration. Therefore, it is particularly important to accurately distribute the business requests to the target system. Summary of the invention

[0004] The embodiments of the present invention provide a method, device, equipment, storage medium and program product for distributing a service request, which can accurately distribute the service request to a target system and ensure the normal processing of the service.

[0005] In a first aspect, an embodiment of the present invention provides a method for distributing a service request, comprising:

[0006] Obtaining a pending business request; wherein the pending business request includes request header information, request body information, session information and request message;

[0007] Parsing the pending service request to obtain resource identification information and interface category;

[0008] Determine the target information based on the interface category; wherein the target information is any one of the resource identification information, the request header information, the request body information, the session information and the request message;

[0009] Determine the client identifier according to the target information, and query the rule configuration table from the database based on the client identifier;

[0010] A target system is determined from the rule configuration table based on the resource identification information, and the to-be-processed business request is sent to the target system for processing; wherein the target system is an old system or a new system.

[0011] In a second aspect, an embodiment of the present invention further provides a device for distributing a service request, including:

[0012] A pending business request acquisition module is used to acquire a pending business request; wherein the pending business request includes request header information, request body information, session information and request message;

[0013] A pending business request parsing module, used to parse the pending business request to obtain resource identification information and interface category;

[0014] A target information determination module, used to determine the target information based on the interface category; wherein the target information is any one of the resource identification information, the request header information, the request body information, the session information and the request message;

[0015] A client identification determination module, used to determine the client identification according to the target information, and query the rule configuration table from the database based on the client identification;

[0016] A target system determination module is used to determine a target system from the rule configuration table based on the resource identification information, and send the pending business request to the target system for processing; wherein the target system is an old system or a new system.

[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a method for distributing service requests as described in any one of the embodiments of the present invention is implemented.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a method for distributing service requests as described in any one of the embodiments of the present invention.

[0019] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a method for distributing service requests as described in any one of the embodiments of the present invention.

[0020] The embodiment of the present invention discloses a method, device, equipment, storage medium and program product for distributing business requests, obtaining a pending business request; wherein the pending business request includes request header information, request body information, session information and request message; parsing the pending business request to obtain resource identification information and interface category; determining target information based on the interface category; wherein the target information is any one of resource identification information, request header information, request body information, session information and request message; determining a client identifier according to the target information, and querying a rule configuration table from a database based on the client identifier; determining a target system from the rule configuration table based on the resource identification information, and sending the pending business request to the target system for processing. The method for distributing business requests provided in this embodiment determines the client identifier from any one of resource identification information, request header information, request body information, session information and request message through the interface category parsed from the pending business request, so as to determine the target system based on the client identifier, associate the distribution of the business request with the client identifier, and accurately distribute the business request to the target system to ensure the normal processing of the business. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A flow chart of a method for distributing service requests provided by an embodiment of the present invention;

[0023] Figure 2 A flow chart of a method for distributing service requests provided by an embodiment of the present invention;

[0024] Figure 3 A schematic diagram of the structure of a device for distributing service requests provided by an embodiment of the present invention;

[0025] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0027] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of the present invention, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. The purpose is only to illustrate the feasibility of the implementation of the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.

[0028] Figure 1 The present invention provides a flowchart of a method for distributing a service request. The method is applicable to the case of distributing service requests. The method can be executed by a device for distributing service requests. The device can be implemented in the form of software and / or hardware. Optionally, the device can be implemented by an electronic device. The electronic device can be a mobile terminal, a PC or a server. Figure 1 As shown, the method includes:

[0029] S110, obtaining a pending service request.

[0030] The pending business request includes request header information, request body information, session information and request message. The pending business request can be a Hypertext Transfer Protocol (HTTP) request initiated by the business initiator to process a certain business in order to achieve a certain requirement or purpose. In this embodiment, after receiving the pending business request, the load balancing sends the pending business request directly to the web application, and the web application sends the pending business request to the subsequent business system after processing it.

[0031] S120, parsing the service request to be processed to obtain resource identification information and interface category.

[0032] Among them, the resource identification information can be understood as a uniform resource identifier (Uniform Resource Identifier, URI). The interface category can be understood as the interface category of the resource identification information, which is pre-defined and configured by the starter of the business system. In this embodiment, the distribution rules of business requests corresponding to different interface categories are different. The distribution rules are how to determine the customer identification (ID) and the rules for determining the target system based on the customer identification. In this application scenario, the interface category can include eleven categories, namely: the first category, the second category, the third category, the fourth category, the fifth category, the sixth category, the seventh category, the eighth category, the ninth category, the tenth category and the eleventh category. The interface category can be identified by a keyword, and the specific interface category can be determined by the value of the keyword. Exemplarily, assuming that the keyword is "Tp", when Tp=1, the interface category is the first category; when Tp=2, the interface category is the second category; when Tp=3, the interface category is the third category; when Tp=4, the interface category is the fourth category; when Tp=5, the interface category is the fifth category; when Tp=6, the interface category is the sixth category; when Tp=7, the interface category is the seventh category; when Tp=8, the interface category is the eighth category; when Tp=9, the interface category is the ninth category; when Tp=10, the interface category is the tenth category; when Tp=11, the interface category is the eleventh category.

[0033] S130, determining target information based on the interface category.

[0034] The target information is any one of resource identification information, request header information, request body information, session information and request message; the target information can be understood as information that can determine the market identification.

[0035] Specifically, the method of determining the target information based on the interface category can be: if the interface category is the first category, the determined target information is the request body information; if the interface category is the second category, the determined target information is the session information; if the interface category is the third category, the determined target information is the resource identification information; if the interface category is the fourth category, the determined target information is the request body information; if the interface category is the fifth category, the determined target information is the request message; if the interface category is the sixth category or the eighth category, the determined target system is the new system; if the interface category is the ninth category, the determined target system is the old system; if the interface category is the seventh category, the determined target information is the request message; if the interface category is the tenth category, the determined target information is the request message; if the interface category is the eleventh category, the determined target information is the request header information.

[0036] S140, determining the customer identifier according to the target information, and querying a rule configuration table from a database based on the customer identifier.

[0037] The rule configuration table configures the correspondence between resource identification information and the target system, and one customer identification corresponds to one rule configuration table. The correspondence between the customer identification and the rule configuration table is preset, and the correspondence between the resource identification information and the target system is also preset. The correspondence between the customer identification and the rule configuration table and the correspondence between the resource identification information and the target system will be updated as the business data corresponding to the customer identification is migrated from the old system to the new system.

[0038] Optionally, if the interface category is the first category and the determined target information is request body information, the method of determining the client identifier according to the target information may be: extracting data corresponding to a preset key field from the request body information to obtain the client identifier.

[0039] The preset key field may be a pre-configured field for associating with the client identifier, such as “Rule_cntnt.” Specifically, when Tp=1, data corresponding to the key field “Rule_cntnt” is extracted from the request body information to obtain the client identifier.

[0040] Optionally, if the interface category is the second category, and the determined target information is session information; then the method of determining the customer identifier based on the target information can be: extracting data corresponding to a preset key field from the session information to obtain a first keyword; querying the customer information based on the first keyword and the customer login information; and parsing the customer information to obtain the customer identifier.

[0041] The method of querying the customer information according to the first keyword and the customer login information may be: concatenating the first keyword with the customer login information, and querying the customer information again from the session information based on the concatenated information. Specifically, when Tp=2, the data corresponding to the attribute Rule_cntnt, i.e., the first keyword (key1), is obtained from the current session information, and the customer information (UserInfoDo) is then queried from the session information using the customer login information (loginUserId) + the first keyword (key1) as the key, and finally the customer information is parsed to obtain the customer identifier.

[0042] Optionally, if the interface category is the third category, and the determined target information is resource identification information, then the method of determining the client identification according to the target information may be: performing path matching on the resource identification information to obtain the client identification.

[0043] The process of path matching the resource identification information may be: first determine the storage path corresponding to the resource identification information, and then obtain the client identification from the storage path. Specifically, when Tp=3, in this case, Rule_cntnt has no data, and path matching is performed on the resource identification information to obtain the client identification.

[0044] Optionally, if the interface category is the fourth category, and the determined target information is the request body information; then the method of determining the customer identification based on the target information can be: extracting data corresponding to preset key fields from the request body information; intercepting a set number of sub-data at a preset position from the data corresponding to the preset key fields to obtain the customer identification.

[0045] The preset position can be the front, back or middle, and the set number can be preset. For example, the first 15 bits of sub-data are intercepted from the data corresponding to the preset key field as the customer identification. Specifically, when Tp=4, the data corresponding to the key field "Rule_cntnt" is extracted from the request body information, and the first 15 bits are intercepted from the extracted data to obtain the customer identification.

[0046] Optionally, if the interface category is the fifth category, and the determined target information is a request message; then the method for determining the customer identification based on the target information can be: decrypting the request message; extracting data corresponding to a preset key field from the decrypted request message; querying the data corresponding to the second keyword from the database corresponding to the database ID to obtain the customer identification.

[0047] Among them, the data includes the second keyword and the database ID. In this embodiment, the request message is represented in the form of extensible markup language (XML), so the request message needs to be decrypted first. In the request message, the data corresponding to the preset key field is expressed in the form of "second keyword + preset separator + database ID". Among them, the preset separator can be "@". After obtaining the second keyword and database ID, the data corresponding to the second keyword is queried from the database corresponding to the database ID to obtain the customer identification. Specifically, when Tp=5, it is an employee channel request. After decrypting the request message, the data corresponding to Rule_cntnt is extracted: the second keyword@database ID; then the data corresponding to the second keyword is queried from the database corresponding to the database ID to obtain the customer identification.

[0048] Optionally, if the interface category is the seventh category, and the determined target information is a request message, the method for determining the customer identifier based on the target information may be: decrypting the request message; extracting data corresponding to preset key fields from the decrypted request message to obtain the customer identifier.

[0049] Specifically, when Tp=7, the request message in the XML format is first decrypted, and then the data corresponding to Rule_cntnt is extracted from the decrypted request message to obtain the client identifier.

[0050] Optionally, if the interface category is the tenth category, and the determined target information is a request message; then the method of determining the customer identifier based on the target information may be: extracting form data from the request message; extracting data corresponding to preset key fields from the form data to obtain the customer identifier.

[0051] Specifically, when Tp=10, it is a form submission, and the data corresponding to Rule_cntnt is extracted from the form data (form-data) in the request message to obtain the client identifier.

[0052] Optionally, if the interface category is the eleventh category, and the determined target information is the request header information; then the method of determining the customer identifier based on the target information can be: obtaining the token ID from the request header information; obtaining the customer information from the database based on the token ID; parsing the customer information to obtain the customer identifier.

[0053] Specifically, when Tp=11, the token ID (tokenId) is obtained from the request header information (header), and the customer information (UserInfoDo) is read from the database (redis) according to the tokenId, and the customer information is parsed to obtain the customer identifier.

[0054] S150, determining a target system from the rule configuration table based on the resource identification information, and sending the to-be-processed business request to the target system for processing.

[0055] The target system is an old system or a new system.

[0056] Specifically, the method of determining the target system from the rule configuration table based on the resource identification information can be: determining the transmission channel of the business request to be processed based on the resource identification information; if the transmission channel is a preset channel, extracting the real resource identification information from the request message; determining the target system from the rule configuration table based on the real resource identification information.

[0057] The preset channel may be the 68 interface from P5. If the transmission channel is the preset channel, the request message needs to be decrypted, and then the real resource identification information is extracted from the decrypted request message, and then the target system is determined from the rule configuration table based on the real resource identification information. If the transmission channel is not the preset channel, the target system is directly determined from the rule configuration table based on the resource identification information.

[0058] Optionally, before querying the rule configuration table from the database based on the customer identifier, the following steps are also included: determining the switching state of the data corresponding to the customer identifier; if the switching state is switching, discarding the pending service request and generating an error code.

[0059] Among them, the switching status is switching in progress, switching completed and not switched. Among them, "switching in progress" can be understood as the data corresponding to the customer ID is still in the process of migrating from the old system to the new system, that is, some data has been migrated to the new system, and the other part of the data is still in the old system. "Switching completed" can be understood as the data corresponding to the customer ID has been completely migrated from the old system to the new system. "Not switched" can be understood as the data corresponding to the customer ID is still all in the old system. If the switching status is switching in progress, neither the new system nor the old system can process the business request, so the pending business request is discarded and an error code is generated. If the switching status is switching completed or not switched, the business request is distributed according to the determined target system.

[0060] The technical solution of this embodiment is to obtain a pending business request; wherein the pending business request includes request header information, request body information, session information and request message; parse the pending business request to obtain resource identification information and interface category; determine target information based on interface category; wherein the target information is any one of resource identification information, request header information, request body information, session information and request message; determine the client identifier according to the target information, and query the rule configuration table from the database based on the client identifier; determine the target system from the rule configuration table based on the resource identification information, and send the pending business request to the target system for processing. The method for distributing business requests provided in this embodiment determines the client identifier from any one of resource identification information, request header information, request body information, session information and request message through the interface category parsed from the pending business request, so as to determine the target system based on the client identifier, associate the distribution of business requests with the client identifier, and accurately distribute business requests to the target system to ensure the normal processing of the business.

[0061] Based on the above embodiments, Figure 2 is a flow chart of a method for distributing a service request provided in Embodiment 2 of the present invention, such as Figure 2 , the method comprises the following steps:

[0062] S201, obtaining a pending business request.

[0063] S202, parsing the service request to be processed to obtain resource identification information and interface category.

[0064] S203, determining target information based on the interface category, and determining a client identifier according to the target information.

[0065] S204, determining the switching state of the data corresponding to the customer identification.

[0066] S205: If the switching state is in progress, the pending service request is discarded and an error code is generated.

[0067] S206: If the switching state is switching completed or not switched, query the rule configuration table from the database based on the customer identification.

[0068] S207: Determine a transmission channel for the service request to be processed based on the resource identification information.

[0069] S208, if the transmission channel is a preset channel, extracting real resource identification information from the request message; and determining the target system from the rule configuration table based on the real resource identification information.

[0070] S209: If the transmission channel is not a preset channel, determine the target system from the rule configuration table based on the resource identification information.

[0071] S210, sending the pending business request to the target system for processing.

[0072] Figure 3 is a schematic diagram of the structure of a distribution device for service requests provided by an embodiment of the present invention, such as Figure 3 As shown, the device comprises:

[0073] The pending business request acquisition module 310 is used to acquire the pending business request; wherein the pending business request includes request header information, request body information, session information and request message;

[0074] A pending business request parsing module 320 is used to parse the pending business request to obtain resource identification information and interface category;

[0075] The target information determination module 330 is used to determine the target information based on the interface category; wherein the target information is any one of resource identification information, request header information, request body information, session information and request message;

[0076] A client identification determination module 340 is used to determine the client identification according to the target information, and query the rule configuration table from the database based on the client identification;

[0077] The target system determination module 350 is used to determine the target system from the rule configuration table based on the resource identification information, and send the pending business request to the target system for processing; wherein the target system is an old system or a new system.

[0078] Optionally, the target information determination module 330 is further configured to:

[0079] If the interface category is the first category, the determined target information is the request body information;

[0080] Optionally, the customer identification determination module 340 is further configured to:

[0081] Extract the data corresponding to the preset key fields from the request body information to obtain the customer ID.

[0082] Optionally, the target information determination module 330 is further configured to:

[0083] If the interface category is the second category, the determined target information is session information;

[0084] Optionally, the customer identification determination module 340 is further configured to:

[0085] Extract data corresponding to a preset key field from the session information to obtain a first keyword;

[0086] Search customer information based on the first keyword and customer login information;

[0087] Parse the customer information to obtain the customer ID.

[0088] Optionally, the target information determination module 330 is further configured to:

[0089] Determines target information based on interface category, including:

[0090] If the interface category is the third category, the determined target information is the resource identification information;

[0091] Optionally, the customer identification determination module 340 is further configured to:

[0092] Perform path matching on the resource identification information to obtain the customer identification.

[0093] Optionally, the target information determination module 330 is further configured to:

[0094] If the interface category is the fourth category, the determined target information is the request body information;

[0095] Optionally, the customer identification determination module 340 is further configured to:

[0096] Extract data corresponding to preset key fields from the request body information;

[0097] A set number of sub-data at a preset position is intercepted from the data corresponding to the preset key field to obtain a customer identification.

[0098] Optionally, the target information determination module 330 is further configured to:

[0099] If the interface category is the fifth category, the determined target information is a request message;

[0100] Optionally, the customer identification determination module 340 is further configured to:

[0101] Decrypt the request message;

[0102] Extracting data corresponding to a preset key field from the decrypted request message; wherein the data includes a second keyword and a database ID;

[0103] The data corresponding to the second keyword is queried from the database corresponding to the database ID to obtain the customer identification.

[0104] Optionally, also include:

[0105] If the interface category is Category 6 or Category 8, the determined target system is a new system;

[0106] If the interface category is category 9, the determined target system is an old system.

[0107] Optionally, the target information determination module 330 is further configured to:

[0108] If the interface category is the seventh category, the determined target information is a request message;

[0109] Optionally, the customer identification determination module 340 is further configured to:

[0110] Decrypt the request message;

[0111] The data corresponding to the preset key field is extracted from the decrypted request message to obtain the customer identification.

[0112] Optionally, the target information determination module 330 is further configured to:

[0113] If the interface category is the tenth category, the determined target information is a request message;

[0114] Optionally, the customer identification determination module 340 is further configured to:

[0115] Extract form data from the request message;

[0116] Extract the data corresponding to the preset key fields from the form data to obtain the customer ID.

[0117] Optionally, the target information determination module 330 is further configured to:

[0118] If the interface category is category 11, the determined target information is the request header information;

[0119] Optionally, the customer identification determination module 340 is further configured to:

[0120] Get the token ID from the request header information;

[0121] Get customer information from the database based on the token ID;

[0122] Parse the customer information and obtain the customer ID.

[0123] Optionally, the target system determination module 350 is further configured to:

[0124] Determine a transmission channel for the pending service request based on the resource identification information;

[0125] If the transmission channel is a preset channel, extracting the real resource identification information from the request message;

[0126] The target system is determined from the rule configuration table based on the real resource identification information.

[0127] Optionally, the method further includes: a switching state determination module, configured to:

[0128] Determine the switching state of the data corresponding to the customer identifier; wherein the switching state is switching in progress, switching completed, and not switched;

[0129] If the switching status is switching in progress, the pending service request is discarded and an error code is generated.

[0130] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.

[0131] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0132] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0133] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0134] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for distributing business requests.

[0135] In some embodiments, the method for distributing service requests may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for distributing service requests described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for distributing service requests in any other appropriate manner (e.g., by means of firmware).

[0136] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0138] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0140] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0141] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0142] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements a method for distributing service requests as provided in any embodiment of the present application.

[0143] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0144] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for distributing a service request, characterized in that: include: Obtaining a pending business request; wherein the pending business request includes request header information, request body information, session information and request message; Parsing the pending service request to obtain resource identification information and interface category; Determine the target information based on the interface category; wherein the target information is any one of the resource identification information, the request header information, the request body information, the session information and the request message; Determine the client identifier according to the target information, and query the rule configuration table from the database based on the client identifier; A target system is determined from the rule configuration table based on the resource identification information, and the to-be-processed business request is sent to the target system for processing; wherein the target system is an old system or a new system.

2. The method according to claim 1, characterized in that Determining target information based on the interface category includes: If the interface category is the first category, the determined target information is the request body information; Accordingly, determining the customer identifier according to the target information includes: Data corresponding to preset key fields are extracted from the request body information to obtain a customer identifier.

3. The method according to claim 1, characterized in that Determining target information based on the interface category includes: If the interface category is the second category, the determined target information is session information; Accordingly, determining the customer identifier according to the target information includes: Extracting data corresponding to a preset key field from the session information to obtain a first keyword; Query customer information according to the first keyword and customer login information; The customer information is parsed to obtain a customer identifier.

4. The method according to claim 1, characterized in that: Determining target information based on the interface category includes: Determining target information based on the interface category includes: If the interface category is the third category, the determined target information is resource identification information; Accordingly, determining the customer identifier according to the target information includes: Perform path matching on the resource identification information to obtain a client identification.

5. The method according to claim 1, characterized in that Determining target information based on the interface category includes: If the interface category is the fourth category, the determined target information is the request body information; Accordingly, determining the customer identifier according to the target information includes: Extracting data corresponding to preset key fields from the request body information; A set number of sub-data at a preset position is intercepted from the data corresponding to the preset key field to obtain a customer identification.

6. The method according to claim 1, characterized in that Determining target information based on the interface category includes: If the interface category is the fifth category, the determined target information is a request message; Accordingly, determining the customer identifier according to the target information includes: Decrypting the request message; Extracting data corresponding to a preset key field from the decrypted request message; wherein the data includes a second keyword and a database ID; The data corresponding to the second keyword is queried from the database corresponding to the database ID to obtain the customer identification.

7. The method according to claim 1, characterized in that Also includes: If the interface category is the sixth category or the eighth category, the determined target system is a new system; If the interface category is the ninth category, the determined target system is an old system.

8. The method according to claim 1, characterized in that Determining target information based on the interface category includes: If the interface category is the seventh category, the determined target information is a request message; Accordingly, determining the customer identifier according to the target information includes: Decrypting the request message; The data corresponding to the preset key field is extracted from the decrypted request message to obtain the customer identification.

9. The method according to claim 1, characterized in that: Determining target information based on the interface category includes: If the interface category is the tenth category, the determined target information is a request message; Accordingly, determining the customer identifier according to the target information includes: Extracting form data from the request message; Data corresponding to preset key fields are extracted from the form data to obtain a customer identifier.

10. The method according to claim 1, characterized in that Determining target information based on the interface category includes: If the interface category is the eleventh category, the determined target information is the request header information; Accordingly, determining the customer identifier according to the target information includes: Get the token ID from the request header information; Obtain customer information from the database according to the token ID; The customer information is parsed to obtain a customer identifier.

11. The method according to claim 1, characterized in that: Determining a target system from the rule configuration table based on the resource identification information includes: Determining a transmission channel for the pending service request based on the resource identification information; If the transmission channel is a preset channel, extracting real resource identification information from the request message; A target system is determined from the rule configuration table based on the real resource identification information.

12. The method according to claim 1, characterized in that Before querying the rule configuration table from the database based on the customer identifier, the method further includes: Determine the switching state of the data corresponding to the customer identification; wherein the switching state is switching in progress, switching completed, and not switched; If the switching state is switching in progress, the pending service request is discarded and an error code is generated.

13. A device for distributing service requests, characterized in that: include: A pending business request acquisition module is used to acquire a pending business request; wherein the pending business request includes request header information, request body information, session information and request message; A pending business request parsing module, used to parse the pending business request to obtain resource identification information and interface category; A target information determination module, used to determine the target information based on the interface category; wherein the target information is any one of the resource identification information, the request header information, the request body information, the session information and the request message; A client identification determination module, used to determine the client identification according to the target information, and query the rule configuration table from the database based on the client identification; A target system determination module is used to determine a target system from the rule configuration table based on the resource identification information, and send the pending business request to the target system for processing; wherein the target system is an old system or a new system.

14. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method for distributing service requests as described in any one of claims 1 to 12 when executing the computer program.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for distributing service requests as described in any one of claims 1 to 12 is implemented.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the method for distributing service requests according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and device for identifying data

    CN113779616A

  • Data synchronization method, device and system

    CN114900531A

  • System switching method and device, electronic equipment and computer readable medium

    CN115269261A

  • Service request distribution method and device, equipment and medium

    CN115529271A

  • Data processing method and device

    CN116233244A

Cited By

  • Business processing method, device and equipment under parallel architecture of new and old systems

    CN121658034A

  • Business processing method, device and equipment under parallel architecture of new and old systems

    CN121658034B