[go: up one dir, main page]

CN119652975A - A method, device, equipment, storage medium and program product for distributing business requests - Google Patents

A method, device, equipment, storage medium and program product for distributing business requests Download PDF

Info

Publication number
CN119652975A
CN119652975A CN202411520408.1A CN202411520408A CN119652975A CN 119652975 A CN119652975 A CN 119652975A CN 202411520408 A CN202411520408 A CN 202411520408A CN 119652975 A CN119652975 A CN 119652975A
Authority
CN
China
Prior art keywords
information
determining
request
service request
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411520408.1A
Other languages
Chinese (zh)
Inventor
贾文华
陈进进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202411520408.1A priority Critical patent/CN119652975A/en
Publication of CN119652975A publication Critical patent/CN119652975A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a service request distribution method, a service request distribution device, service request distribution equipment, a storage medium and a program product. The invention relates to the technical field of computers. The method comprises the steps of obtaining a service request to be processed, analyzing the service request to be processed to obtain resource identification information and interface types, determining target information based on the interface types, determining client identifications according to the target information, inquiring a rule configuration table from a database based on the client identifications, determining a target system from the rule configuration table based on the resource identification information, and sending the service request to be processed to the target system for processing. According to the service request distribution method provided by the embodiment, the client identification is determined through the interface type analyzed from the service request to be processed, so that the target system is determined based on the client identification, the service request distribution is associated with the client identification, the service request can be accurately distributed to the target system, and normal processing of the service is ensured.

Description

Service request distribution method, device, equipment, storage medium and program product
Technical Field
Embodiments of the present invention relate to the field of computer technologies, and in particular, to a service request distribution method, apparatus, device, storage medium, and program product.
Background
With the rapid development of computer technology, the informatization degree of enterprises is higher and higher, and the new system with more perfect functions is developed to replace the old system, so that the system functions are more and more perfect.
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 service request. In the data migration process, in order to ensure normal processing of the service, the service request needs to be distributed to an old system or a new system according to the progress of data migration, so that the service request is accurately distributed to a target system.
Disclosure of Invention
The embodiment of the invention provides a service request distribution method, device, equipment, storage medium and program product, which can accurately distribute service requests to a target system and ensure normal processing of services.
In a first aspect, an embodiment of the present invention provides a service request distributing method, including:
Acquiring a service request to be processed, wherein the service request to be processed comprises request header information, request body information, session information and a request message;
Analyzing the service request to be processed to obtain resource identification information and interface types;
determining 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;
Determining a client identifier according to the target information, and inquiring a rule configuration table from a database based on the client identifier;
and determining a target system from the rule configuration table based on the resource identification information, and sending the service request to be processed to the target system for processing, wherein the target system is an old system or a new system.
In a second aspect, an embodiment of the present invention further provides a service request distributing apparatus, including:
The system comprises a service request acquisition module, a service request processing module and a service request processing module, wherein the service request acquisition module is used for acquiring a service request to be processed, and the service request to be processed comprises request header information, request body information, session information and a request message;
The service request analysis module to be processed is used for analyzing the service request to be processed to obtain resource identification information and interface types;
The target information determining module is used for determining target information based on the interface type, 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;
The client identification determining module is used for determining a client identification according to the target information and inquiring a rule configuration table from a database based on the client identification;
And the target system determining module is used for determining a target system from the rule configuration table based on the resource identification information and sending the service request to be processed to the target system for processing, wherein the target system is an old system or a new system.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements a service request distribution method according to any one of the embodiments of the present invention when the processor executes the program.
In a fourth aspect, an embodiment of the present invention further provides a computer readable storage medium, where a computer program is stored, where the program when executed by a processor implements a service request distributing method according to any one of the embodiments of the present invention.
In a fifth aspect, embodiments of the present invention further provide a computer program product comprising a computer program which, when executed by a processor, implements a method of distributing service requests according to any of the embodiments of the present invention.
The embodiment of the invention discloses a service request distribution method, device, equipment, storage medium and program product, wherein the service request to be processed comprises request header information, request body information, session information and request message, the service request to be processed is analyzed to obtain resource identification information and interface type, target information is determined based on the interface type, 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 is determined according to the target information, a rule configuration table is queried from a database based on the client identification, a target system is determined from the rule configuration table based on the resource identification information, and the service request to be processed is sent to the target system for processing. According to the service request distribution method provided by the embodiment, the client identifier is determined from any one of the resource identifier information, the request header information, the request body information, the session information and the request message through the interface type analyzed from the service request to be processed, so that the target system is determined based on the client identifier, the service request is distributed in association with the client identifier, the service request can be accurately distributed to the target system, and normal processing of the service is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a service request distributing method provided in an embodiment of the present invention;
fig. 2 is a flowchart of a service request distributing method according to an embodiment of the present invention;
Fig. 3 is a schematic structural diagram of a service request distributing device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
It should be noted that like reference numerals and letters refer to like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance. The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations. It should be noted that, in the embodiments of the present application, some existing solutions in the industry such as software, components, models, etc. may be mentioned, and they should be regarded as exemplary, only for illustrating the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or must not use the solution.
Fig. 1 is a flowchart of a service request distributing method according to an embodiment of the present invention, where the method may be applicable to a service request distributing device, and the method may be performed by a service request distributing device, where the service request distributing device may be implemented in software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC side, a server, or the like. As shown in fig. 1, the method includes:
s110, obtaining a service request to be processed.
The service request to be processed comprises request header information, request body information, session information and request messages. The service request to be processed may be a hypertext transfer protocol (Hypertext Transfer Protocol, HTTP) request initiated by the service initiator to process a service for a certain requirement or purpose. In this embodiment, after receiving a service request to be processed, load balancing directly sends the service request to be processed to a web application, and the web application sends the service request to be processed to a subsequent service system after processing the service request to be processed.
S120, analyzing the service request to be processed to obtain the resource identification information and the interface category.
Wherein the resource identification information may be understood as a uniform resource identifier (Uniform Resource Identifier, URI). The interface class may be understood as an interface class of the resource identification information, predefined and configured by a start person of the service system. In this embodiment, the distribution rules of the service requests corresponding to different interface types are different, and the distribution rules are rules of how to determine the client Identification (ID) and determine the target system based on the client identification. Under the application scene, the interface categories can comprise ten categories, namely a first category, a second category, a third category, a fourth category, a fifth category, a sixth category, a seventh category, an eighth category, a ninth category, a tenth category and an eleventh category, the interface categories can be identified by a keyword, and the specific interface category can be determined through the value of the keyword. By way of example, assume that the keyword is "Tp", when tp=1, the interface class is the first class, when tp=2, the interface class is the second class, when tp=3, the interface class is the third class, when tp=4, the interface class is the fourth class, when tp=5, the interface class is the fifth class, when tp=6, the interface class is the sixth class, when tp=7, the interface class is the seventh class, when tp=8, the interface class is the eighth class, when tp=9, the interface class is the ninth class, when tp=10, the interface class is the tenth class, and when tp=11, the interface class is the eleventh class.
And S130, determining target information based on the interface type.
The target information is any one of resource identification information, request header information, request body information, session information and request message, and can understand information capable of determining market identification.
Specifically, the mode of determining the target information based on the interface class may be that if the interface class is the first class, the determined target information is request body information, if the interface class is the second class, the determined target information is session information, if the interface class is the third class, the determined target information is resource identification information, if the interface class is the fourth class, the determined target information is request body information, if the interface class is the fifth class, the determined target information is request message, if the interface class is the sixth class or the eighth class, the determined target system is new system, if the interface class is the ninth class, the determined target system is old system, if the interface class is the seventh class, the determined target information is request message, if the interface class is the tenth class, the determined target information is request message, and if the interface class is the eleventh class, the determined target information is request header information.
S140, determining a client identification according to the target information, and inquiring a rule configuration table from a database based on the client identification.
The rule configuration table is configured with the corresponding relation between the resource identification information and the target system, and one client identification corresponds to one rule configuration table. The corresponding relation between the client identification and the rule configuration table is preset, and the corresponding relation between the resource identification information and the target system is preset. And the corresponding relation between the client identifier and the rule configuration table and the corresponding relation between the resource identifier information and the target system are updated along with the migration progress of the business data corresponding to the client identifier from the old system to the new system.
Optionally, if the interface type is the first type and the determined target information is the request body information, the method of determining the client identifier according to the target information may be that data corresponding to a preset key field is extracted from the request body information to obtain the client identifier.
The preset key field may be a field configured in advance for associating with the customer identifier, for example, "rule_ cntnt". Specifically, when tp=1, data corresponding to a key field (key) of "rule_ cntnt" is extracted from the request body information, so as to obtain the client identifier.
Optionally, if the interface class is the second class and the determined target information is the session information, the method for determining the client identifier according to the target information may be that data corresponding to a preset key field is extracted from the session information to obtain a first key word, client information is queried according to the first key word and client login information, and the client information is analyzed to obtain the client identifier.
The client information is queried according to the first keyword and the client login information by splicing the first keyword and the client login information, and querying the client information from the session information again based on the spliced information. Specifically, when tp=2, data corresponding to rule_ cntnt, namely a first key (key 1), is obtained from the current session information, then client information (UserInfoDo) is queried from the session information by using the client login information (loginUserId) +the first key (key 1) as a key, and finally the client information is analyzed to obtain a client identifier.
Optionally, if the interface class is the third class and the determined target information is the resource identification information, the method for determining the client identification according to the target information may be that path matching is performed on the resource identification information to obtain the client identification.
The process of path matching the resource identification information may be that a storage path corresponding to the resource identification information is first determined, and then a client identification is obtained from the storage path. Specifically, when tp=3, rule_ cntnt has no data in this case, and path matching is performed on the resource identification information to obtain the client identification.
Optionally, if the interface class is the fourth class and the determined target information is the request body information, the method for determining the client identifier according to the target information may be that data corresponding to a preset key field is extracted from the request body information, and a set number of sub-data in a preset position is intercepted from the data corresponding to the preset key field to obtain the client identifier.
The preset positions may be front, back or middle, and the preset number may be preset. For example, the sub data of the first 15 bits is intercepted from the data corresponding to the preset key field and used as the customer identification. Specifically, when tp=4, 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, so as to obtain the client identifier.
Optionally, if the interface class is the fifth class and the determined target information is the request message, the method for determining the client identifier according to the target information may be that the request message is decrypted, data corresponding to a preset key field is extracted from the decrypted request message, and data corresponding to the second key word is queried from a database corresponding to the database ID to obtain the client identifier.
The data comprises a second keyword and a database ID. In this embodiment, the request message is characterized 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 a second key word, a preset separator and a database ID. Wherein the preset separator may be "@". After the second keyword and the database ID are obtained, inquiring data corresponding to the second keyword from a database corresponding to the database ID, and obtaining the client identifier. Specifically, when tp=5, the employee channel requests, decrypts the request message, extracts data corresponding to rule_ cntnt, namely a second keyword @ database ID, and then queries data corresponding to the second keyword from a database corresponding to the database ID to obtain the client identifier.
Optionally, if the interface class is the seventh class and the determined target information is the request message, the method for determining the client identifier according to the target information may be that the request message is decrypted, and data corresponding to a preset key field is extracted from the decrypted request message to obtain the client identifier.
Specifically, when tp=7, firstly, the xml format request message is decrypted, and then the data corresponding to rule_ cntnt is extracted from the decrypted request message, so as to obtain the client identifier.
Optionally, if the interface class is the tenth class and the determined target information is the request message, the method for determining the client identifier according to the target information may be extracting form data from the request message, extracting data corresponding to a preset key field from the form data, and obtaining the client identifier.
Specifically, when tp=10, for form submission, data corresponding to rule_ cntnt is extracted from form data (form-data) in the request message, and a client identifier is obtained.
Optionally, if the interface class is the eleventh class and the determined target information is the request header information, the method for determining the client identifier according to the target information may be that a token ID is obtained from the request header information, client information is obtained from a database according to the token ID, and the client information is analyzed to obtain the client identifier.
Specifically, when tp=11, the token ID (token ID) is obtained from the request header information (header), and the client information (UserInfoDo) is read from the database (redis) according to tokenId, and the client information is parsed to obtain the client identifier.
S150, determining a target system from the rule configuration table based on the resource identification information, and sending the service request to be processed to the target system for processing.
Wherein the target system is an old system or a new system.
Specifically, the method for determining the target system from the rule configuration table based on the resource identification information may be that a transmission channel of the service request to be processed is determined based on the resource identification information, if the transmission channel is a preset channel, the real resource identification information is extracted from the request message, and the target system is determined from the rule configuration table based on the real resource identification information.
The preset channel may be a 68 interface from P5. If the transmission channel is a preset channel, the request message needs to be decrypted, then real resource identification information is extracted from the decrypted request message, and 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, determining the target system from the rule configuration table directly based on the resource identification information.
Optionally, before the rule configuration table is queried from the database based on the client identifier, the method further comprises the steps of determining a switching state of data corresponding to the client identifier, discarding the service request to be processed and generating an error code if the switching state is in switching.
The switching state is switching, switching completion and non-switching. The "in-handoff" may be understood as that the data corresponding to the client identifier is still in the process of migrating from the old system to the new system, that is, some data is migrated to the new system, and another part of data is still in the old system. A "handoff completion" may be understood as the fact that the data corresponding to the customer identification has been completely migrated from the old system to the new system. "not switched" is understood to mean that the data corresponding to the customer identity is also all present in the old system. If the switching state is in switching, the new system and the old system cannot process the service request, so the service request to be processed is discarded, and an error code is generated. And if the switching state is switching completion or non-switching, distributing the service request according to the determined target system.
The technical scheme of the embodiment includes that a service request to be processed is obtained, wherein the service request to be processed comprises request header information, request body information, session information and a request message, the service request to be processed is analyzed to obtain resource identification information and interface types, target information is determined based on the interface types, 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 is determined according to the target information, a rule configuration table is queried from a database based on the client identification, a target system is determined from the rule configuration table based on the resource identification information, and the service request to be processed is sent to the target system for processing. According to the service request distribution method provided by the embodiment, the client identifier is determined from any one of the resource identifier information, the request header information, the request body information, the session information and the request message through the interface type analyzed from the service request to be processed, so that the target system is determined based on the client identifier, the service request is distributed in association with the client identifier, the service request can be accurately distributed to the target system, and normal processing of the service is ensured.
On the basis of the foregoing embodiment, fig. 2 is a flowchart of a service request distributing method according to a second embodiment of the present invention, as shown in fig. 2, where the method includes the following steps:
S201, obtaining a service request to be processed.
S202, analyzing the service request to be processed to obtain the resource identification information and the interface category.
And S203, determining target information based on the interface type, and determining a client identifier according to the target information.
S204, determining the switching state of the data corresponding to the client identifier.
S205, if the switching state is in switching, discarding the service request to be processed and generating an error code.
S206, if the switching state is switching completion or non-switching, inquiring a rule configuration table from the database based on the client identification.
S207, determining a transmission channel of the service request to be processed based on the resource identification information.
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.
S209, if the transmission channel is not the preset channel, determining the target system from the rule configuration table based on the resource identification information.
S210, the service request to be processed is sent to the target system for processing.
Fig. 3 is a schematic structural diagram of a service request distributing device according to an embodiment of the present invention, where, as shown in fig. 3, the device includes:
a pending service request acquiring module 310, configured to acquire a pending service request, where the pending service request includes request header information, request body information, session information, and a request packet;
The pending service request parsing module 320 is configured to parse the pending service request to obtain resource identification information and interface class;
the target information determining module 330 is configured to determine target information based on an interface class, where the target information is any one of resource identification information, request header information, request body information, session information, and a request packet;
A client identifier determining module 340, configured to determine a client identifier according to the target information, and query a rule configuration table from a database based on the client identifier;
The target system determining module 350 is configured to determine a target system from the rule configuration table based on the resource identification information, and send the service request to be processed to the target system for processing, where the target system is an old system or a new system.
Optionally, the target information determining module 330 is further configured to:
If the interface class is the first class, the determined target information is the request body information;
Optionally, the client identifier determining module 340 is further configured to:
and extracting data corresponding to the preset key field from the request body information to obtain the client identification.
Optionally, the target information determining module 330 is further configured to:
if the interface class is the second class, the determined target information is session information;
Optionally, the client identifier determining module 340 is further configured to:
Extracting data corresponding to a preset key field from session information to obtain a first key word;
inquiring the client information according to the first keyword and the client login information;
and analyzing the client information to obtain the client identification.
Optionally, the target information determining module 330 is further configured to:
determining target information based on interface class, comprising:
if the interface class is the third class, the determined target information is the resource identification information;
Optionally, the client identifier determining module 340 is further configured to:
and carrying out path matching on the resource identification information to obtain the client identification.
Optionally, the target information determining module 330 is further configured to:
if the interface class is the fourth class, the determined target information is the request body information;
Optionally, the client identifier determining module 340 is further configured to:
Extracting data corresponding to a preset key field from the request body information;
intercepting the sub data of the set number at the preset position from the data corresponding to the preset key field to obtain the client identifier.
Optionally, the target information determining module 330 is further configured to:
If the interface class is the fifth class, the determined target information is a request message;
Optionally, the client identifier determining module 340 is further configured to:
Decrypting the request message;
extracting data corresponding to a preset key field from the decrypted request message, wherein the data comprises a second key word and a database ID;
And inquiring data corresponding to the second key words from a database corresponding to the database ID to obtain the client identification.
Optionally, the method further comprises:
if the interface class is the sixth class or the eighth class, the determined target system is a new system;
If the interface class is the ninth class, the determined target system is the old system.
Optionally, the target information determining module 330 is further configured to:
If the interface class is the seventh class, the determined target information is a request message;
Optionally, the client identifier determining module 340 is further configured to:
Decrypting the request message;
and extracting data corresponding to the preset key field from the decrypted request message to obtain the client identifier.
Optionally, the target information determining module 330 is further configured to:
if the interface class is the tenth class, the determined target information is a request message;
Optionally, the client identifier determining module 340 is further configured to:
Extracting form data from the request message;
and extracting data corresponding to the preset key field from the form data to obtain the client identifier.
Optionally, the target information determining module 330 is further configured to:
if the interface class is the eleventh class, the determined target information is request header information;
Optionally, the client identifier determining module 340 is further configured to:
Obtaining a token ID from the request header information;
acquiring client information from a database according to the token ID;
and analyzing the client information to obtain the client identification.
Optionally, the target system determining module 350 is further configured to:
Determining a transmission channel of a service request to be processed based on the resource identification information;
if the transmission channel is a preset channel, extracting real resource identification information from the request message;
the target system is determined from the rule configuration table based on the real resource identification information.
Optionally, the method further comprises a switching state determining module for:
determining a switching state of data corresponding to the client identifier, wherein the switching state is switching, switching completion and non-switching;
if the switching state is in switching, discarding the service request to be processed and generating an error code.
The device can execute the method provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the invention.
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may 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 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including an input unit 16, such as a keyboard, mouse, etc., an output unit 17, such as various types of displays, speakers, etc., a storage unit 18, such as a magnetic disk, optical disk, etc., and a communication unit 19, such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the distribution method of service requests.
In some embodiments, the method of distributing service requests may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the service request distribution method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the distribution method of the service request in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be a special or general purpose programmable processor, operable to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can 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 a trackball) by which the user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user, for example, 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, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can 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.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
The embodiments of the present application also provide a computer program product comprising a computer program which, when executed by a processor, implements a method of distributing service requests as provided by any of the embodiments of the present application.
Computer program product in the implementation, the computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (16)

1. A method for distributing service requests, comprising:
Acquiring a service request to be processed, wherein the service request to be processed comprises request header information, request body information, session information and a request message;
Analyzing the service request to be processed to obtain resource identification information and interface types;
determining 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;
Determining a client identifier according to the target information, and inquiring a rule configuration table from a database based on the client identifier;
and determining a target system from the rule configuration table based on the resource identification information, and sending the service request to be processed to the target system for processing, wherein the target system is an old system or a new system.
2. The method of claim 1, wherein determining target information based on the interface class comprises:
if the interface class is the first class, the determined target information is the request body information;
correspondingly, determining the client identifier according to the target information comprises the following steps:
and extracting data corresponding to a preset key field from the request body information to obtain a client identifier.
3. The method of claim 1, wherein determining target information based on the interface class comprises:
If the interface class is the second class, the determined target information is session information;
correspondingly, determining the client identifier according to the target information comprises the following steps:
Extracting data corresponding to a preset key field from the session information to obtain a first key word;
inquiring client information according to the first keyword and the client login information;
and analyzing the client information to obtain a client identifier.
4. The method of claim 1, wherein determining target information based on the interface class comprises:
Determining target information based on the interface class, including:
if the interface class is the third class, the determined target information is resource identification information;
correspondingly, determining the client identifier according to the target information comprises the following steps:
and carrying out path matching on the resource identification information to obtain a client identification.
5. The method of claim 1, wherein determining target information based on the interface class comprises:
if the interface class is the fourth class, the determined target information is the request body information;
correspondingly, determining the client identifier according to the target information comprises the following steps:
Extracting data corresponding to a preset key field from the request body information;
Intercepting the sub data with the set number at the preset position from the data corresponding to the preset key field to obtain the client identifier.
6. The method of claim 1, wherein determining target information based on the interface class comprises:
if the interface class is a fifth class, determining that the target information is a request message;
correspondingly, determining the client identifier according to the target information comprises the following steps:
decrypting the request message;
extracting data corresponding to a preset key field from the decrypted request message, wherein the data comprises a second key word and a database ID;
And inquiring the data corresponding to the second key word from the database corresponding to the database ID to obtain the client identifier.
7. The method as recited in claim 1, further comprising:
If the interface class is the sixth class or the eighth class, the determined target system is a new system;
and if the interface class is the ninth class, determining that the target system is an old system.
8. The method of claim 1, wherein determining target information based on the interface class comprises:
if the interface class is a seventh class, determining target information as a request message;
correspondingly, determining the client identifier according to the target information comprises the following steps:
decrypting the request message;
And extracting data corresponding to a preset key field from the decrypted request message to obtain a client identifier.
9. The method of claim 1, wherein determining target information based on the interface class comprises:
if the interface class is a tenth class, determining target information as a request message;
correspondingly, determining the client identifier according to the target information comprises the following steps:
Extracting form data from the request message;
And extracting data corresponding to a preset key field from the form data to obtain a client identifier.
10. The method of claim 1, wherein determining target information based on the interface class comprises:
If the interface class is the eleventh class, the determined target information is request header information;
correspondingly, determining the client identifier according to the target information comprises the following steps:
Obtaining a token ID from the request header information;
obtaining client information from a database according to the token ID;
And analyzing the client information to obtain the client identification.
11. The method of claim 1, wherein determining a target system from the rule configuration table based on the resource identification information comprises:
determining a transmission channel of the service request to be processed based on the resource identification information;
If the transmission channel is a preset channel, extracting real resource identification information from the request message;
and determining a target system from the rule configuration table based on the real resource identification information.
12. The method of claim 1, further comprising, prior to querying a rule configuration table from a database based on the customer identification:
determining a switching state of data corresponding to the client identifier, wherein the switching state is switching, switching completion and non-switching;
and if the switching state is in switching, discarding the service request to be processed and generating an error code.
13. A service request distributing apparatus, comprising:
The system comprises a service request acquisition module, a service request processing module and a service request processing module, wherein the service request acquisition module is used for acquiring a service request to be processed, and the service request to be processed comprises request header information, request body information, session information and a request message;
The service request analysis module to be processed is used for analyzing the service request to be processed to obtain resource identification information and interface types;
The target information determining module is used for determining target information based on the interface type, 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;
The client identification determining module is used for determining a client identification according to the target information and inquiring a rule configuration table from a database based on the client identification;
And the target system determining module is used for determining a target system from the rule configuration table based on the resource identification information and sending the service request to be processed to the target system for processing, wherein the target system is an old system or a new system.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of distributing service requests according to any of claims 1-12 when executing the computer program.
15. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of distributing service requests according to any of claims 1-12.
16. A computer program product comprising a computer program which, when executed by a processor, implements the service request distribution method according to any of claims 1-12.
CN202411520408.1A 2024-10-29 2024-10-29 A method, device, equipment, storage medium and program product for distributing business requests Pending CN119652975A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411520408.1A CN119652975A (en) 2024-10-29 2024-10-29 A method, device, equipment, storage medium and program product for distributing business requests

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411520408.1A CN119652975A (en) 2024-10-29 2024-10-29 A method, device, equipment, storage medium and program product for distributing business requests

Publications (1)

Publication Number Publication Date
CN119652975A true CN119652975A (en) 2025-03-18

Family

ID=94951629

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411520408.1A Pending CN119652975A (en) 2024-10-29 2024-10-29 A method, device, equipment, storage medium and program product for distributing business requests

Country Status (1)

Country Link
CN (1) CN119652975A (en)

Similar Documents

Publication Publication Date Title
CN110019350A (en) Data query method and apparatus based on configuration information
WO2021023149A1 (en) Method and apparatus for dynamically returning message
US12177310B2 (en) Method and apparatus for processing notification trigger message
US9294372B2 (en) Status determination in computer network-based communications system
CN113590447B (en) Buried point processing method and device
CN112052152A (en) A method and device for simulating testing
CN112948138B (en) A method and device for processing messages
CN115529271B (en) Service request distribution method, device, equipment and medium
CN117407584A (en) Method, device, electronic equipment and storage medium for determining recommended content
CN119652975A (en) A method, device, equipment, storage medium and program product for distributing business requests
CN117093627A (en) Information mining method, device, electronic equipment and storage medium
CN114218313B (en) Data management method, device, electronic device, storage medium and product
CN117040799A (en) Page interception rule generation and page access control method and device and electronic equipment
CN113779018B (en) A data processing method and device
CN111178696B (en) Service processing duration timeout early warning method and device
CN114430395A (en) Flow control method, device and equipment and intelligent traffic management equipment
CN115118787B (en) A service control method, system, storage medium and electronic device
CN117499873B (en) Short message processing method, device, electronic device and storage medium
CN115840604B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN118250341B (en) Form request processing method, device, equipment and storage medium
CN113595870B (en) Push message processing method and device, electronic equipment and storage medium
CN113986661B (en) Log output method, device, electronic device and storage medium
CN115220722A (en) Method, device, equipment and medium for back-end internationalization
CN115129673A (en) Log processing method and device, electronic equipment and storage medium
CN117081939A (en) Traffic data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination