Distributed service routing method and apparatus

By determining storage partition units based on customer IDs in a distributed system and performing liveness checks and fault node management, the problem of escalating faults in unit resource domains is solved, thus ensuring the security and stability of the system.

CN116069855BActive Publication Date: 2026-06-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INDUSTRIAL AND COMMERCIAL BANK OF CHINA
Filing Date
2022-11-23
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In distributed systems, when a unit resource domain fails, the scope of the failure expands, threatening the system's security and stability.

Method used

By receiving distributed service call requests, the system determines the corresponding storage partition unit based on the customer number, performs liveness checks and determines the proportion of faulty nodes. If the threshold is exceeded, a backup unit is introduced, and a mapping relationship between the customer number and the storage partition unit is established to ensure that business processing operations are completed in the common unit.

🎯Benefits of technology

Effectively control the scope of the impact of resource domain failures to ensure system security and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069855B_ABST
    Figure CN116069855B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of distributed service routing method and device, method includes: receiving distributed service call request, and according to the customer number in the distributed service call request determines corresponding storage partition unit, wherein the storage partition unit includes the access unit for receiving distributed service call request, the common unit for storing the necessary parameter of execution business processing operation and the service partition unit of the application service node in which the application service node executes business processing operation;The distributed service call request is forwarded to the service partition unit in the storage partition unit, to make the application service node in the service partition unit according to the distributed service call request from the necessary parameter in the corresponding common unit to execute business processing operation;The application can effectively control unit resource domain failure influence range, guarantee system security, stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of distributed systems, specifically to a distributed service routing method and apparatus. Background Technology

[0002] In a distributed system, multiple applications are split according to the business domain dimension. A transaction needs to be processed in multiple application nodes, and each application is divided into databases according to certain rules based on the amount of data.

[0003] For example, a bank's system is divided into applications such as customer information, debit cards, and credit cards. The customer information application generates a customer ID for each customer and then uses a hash value to divide the data into 128 segments. Customer data within each segment is stored in a separate database; this is known as database sharding by customer ID. The debit card application shards its database by debit card number, and the credit card application shards its database by credit card number.

[0004] When a failure occurs in a certain device resource domain, since there may be customers of multiple applications within that resource domain, and the customer scope of each application is not the same, the proportion of affected customers may be much larger than the proportion of the failed resource domain, thus expanding the scope of the failure to the actual business. Summary of the Invention

[0005] To address the problems in the prior art, this application provides a distributed service routing method and apparatus that can effectively control the scope of impact of unit resource domain failures and ensure system security and stability.

[0006] To solve at least one of the above problems, this application provides the following technical solution:

[0007] Firstly, this application provides a distributed service routing method, including:

[0008] The system receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0009] The distributed service call request is forwarded to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0010] Further, after receiving the distributed service invocation request and determining the corresponding storage partition unit based on the client number in the distributed service invocation request, the process includes:

[0011] Perform a liveness check on each node in the storage partition unit;

[0012] If the liveness detection result is unsuccessful, the traffic of that node will be diverted to the corresponding backup unit.

[0013] Furthermore, after receiving the distributed service invocation request and determining the corresponding storage partition unit based on the client number in the distributed service invocation request, the method further includes:

[0014] Determine the proportion and range of faulty nodes in the storage partition unit;

[0015] If the proportion and range of faulty nodes exceed a preset threshold, the traffic of the faulty nodes will be diverted to the backup unit.

[0016] Further, determining the corresponding storage partition unit based on the client number in the distributed service call request includes:

[0017] A mapping relationship between customer IDs and storage partition units is pre-established, where different applications deploy the necessary parameters corresponding to the same customer ID in the same common unit;

[0018] The required parameters in the corresponding public unit are determined based on the mapping relationship and the client number in the distributed service call request.

[0019] Furthermore, the liveness check of each node in the storage partition unit includes:

[0020] Based on the IP address and port information of each node in the storage partition unit, a probe message is sent to the corresponding probed node;

[0021] If a response information carrying the service scope of the probed node is received from the probed node, the detection check result is determined to be passed.

[0022] Furthermore, determining the proportion and range of faulty nodes in the storage partition unit includes:

[0023] Nodes whose storage partition unit liveness detection test result fails are identified as faulty nodes;

[0024] The proportion of faulty nodes and the distribution range of faulty nodes within a set time period are statistically analyzed.

[0025] Secondly, this application provides a distributed service routing apparatus, comprising:

[0026] The partition determination module is used to receive distributed service call requests and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving distributed service call requests, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0027] The business execution module is used to forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0028] Furthermore, the partition determination module includes:

[0029] The liveness detection unit is used to perform liveness detection on each node in the storage partition unit.

[0030] A backup switching unit is used to redirect the traffic of a node to the corresponding backup unit if the liveness detection result is unsuccessful.

[0031] Furthermore, the partition determination module includes:

[0032] The fault determination unit is used to determine the proportion and range of faulty nodes in the storage partition unit.

[0033] The backup switching unit is used to redirect the traffic of the faulty node to the backup unit if the proportion and range of the faulty nodes exceed a preset threshold.

[0034] Furthermore, the partition determination module includes:

[0035] The mapping relationship establishment unit is used to pre-establish the mapping relationship between customer number and each storage partition unit. Different applications deploy the necessary parameters corresponding to the same customer number in the same common unit.

[0036] The public parameter determination unit is used to determine the required parameters in the corresponding public unit based on the mapping relationship and the customer number in the distributed service call request.

[0037] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the distributed service routing method described above.

[0038] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the distributed service routing method described above.

[0039] Fifthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the distributed service routing method described above.

[0040] As can be seen from the above technical solution, this application provides a distributed service routing method and apparatus. It receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding common unit according to the distributed service call request to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is one of the flowcharts illustrating the distributed service routing method in the embodiments of this application;

[0043] Figure 2 This is the second flowchart illustrating the distributed service routing method in this application embodiment;

[0044] Figure 3 This is the third flowchart illustrating the distributed service routing method in this application embodiment;

[0045] Figure 4 This is the fourth flowchart illustrating the distributed service routing method in the embodiments of this application;

[0046] Figure 5 This is one of the structural diagrams of the distributed service routing device in the embodiments of this application;

[0047] Figure 6This is the second structural diagram of the distributed service routing device in the embodiments of this application;

[0048] Figure 7 This is the third structural diagram of the distributed service routing device in the embodiments of this application;

[0049] Figure 8 This is the fourth structural diagram of the distributed service routing device in the embodiments of this application;

[0050] Figure 9 This is a schematic diagram of the structure of the electronic device in the embodiments of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.

[0053] In view of the problems existing in the prior art, this application provides a distributed service routing method and apparatus. It receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding common unit to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability.

[0054] To effectively control the scope of impact of system resource domain failures and ensure system security and stability, this application provides an embodiment of a distributed service routing method, see [link to embodiment]. Figure 1 The distributed service routing method specifically includes the following:

[0055] Step S101: Receive a distributed service call request and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing the parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0056] Optionally, in this application, the overall system resource domain is divided into multiple units, with network resources, storage resources, and computing resources within each unit isolated from each other. Based on the nature of the application nodes within the unit, the units are divided into three categories: access units, partition units, and common units. Nodes interacting with the external network are deployed in access units, customer-related nodes are deployed in partition units, and public data unrelated to customers (such as product data) are deployed in common units.

[0057] Optionally, in this application, special resources can be planned for each unit according to its nature. For example, access units need to introduce hardware and software devices such as firewalls and load balancers; public units need to introduce distributed caches; and partitioned units need to strengthen the primary and backup deployment of databases.

[0058] Specifically, all applications within the system uniformly use "customer ID" + "unified hash algorithm" as the database sharding rule, where the number of databases can vary depending on the data volume of each application. Customers are divided into N groups based on the hash algorithm, and each application deploys the databases of customers in the same group within the same unit. A unified mapping relationship between hash values ​​and partition units is established within the system.

[0059] Step S102: Forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0060] Optionally, in this application, when a distributed service call occurs, a unified customer number field is set in the message. After the entry application obtains the customer number, this field is transmitted among each application node. The distributed service routing framework calculates the hash value using a hash algorithm based on the customer number in the message, obtains its corresponding partition unit, and forwards the message to the application service node of that partition unit for business processing.

[0061] In the feasible embodiments of this application, the high availability design under the architecture of this application adopts the following rules to achieve multi-level automatic health checks and fault switching logic from a single node within the application, the entire application, and all applications within the entire unit.

[0062] Specifically, the target unit and the consumer deployment unit are mutually redundant. The target unit is adjusted to this unit, that is, the RPC protocol is used to close the loop within this unit first. In this way, the backup node can be kept fresh.

[0063] For example, at the granularity of a single node, a liveness check mechanism is established for each node within the unit. When the service health check of a single node within the target unit fails, the system switches to the backup unit. Specifically, this application can send probe packets to the corresponding probed node based on the IP address and port information of each node in the storage partition unit. If a response information carrying the service scope of the probed node is received from the probed node, the liveness check result is determined to be successful.

[0064] For example, at the application level, a health check is performed on the proportion and range of faulty nodes within the application. If the standard is not met, the traffic of the entire application is redirected to the backup unit through a load balancing mechanism. Specifically, this application can determine that nodes whose storage partition unit liveness detection results are not passed are faulty nodes; and the proportion of the number of faulty nodes and the distribution range of faulty nodes within a set time period are statistically analyzed.

[0065] It also includes, at the unit level, performing health checks on the proportion and scope of faulty nodes within the unit, and if the standards are not met, diverting the traffic of the entire unit to the backup unit through a load balancing mechanism.

[0066] As described above, the distributed service routing method provided in this application embodiment can receive distributed service call requests and determine the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving distributed service call requests, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding common unit to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability.

[0067] In one embodiment of the distributed service routing method of this application, see [link to relevant documentation]. Figure 2 It can also specifically include the following:

[0068] Step S201: Perform a liveness check on each node in the storage partition unit.

[0069] Step S202: If the liveness detection result is unsuccessful, then the traffic of the node is directed to the corresponding backup unit.

[0070] Specifically, the target unit and the consumer deployment unit are mutually redundant. The target unit is adjusted to this unit, that is, the RPC protocol is used to close the loop within this unit first. In this way, the backup node can be kept fresh.

[0071] For example, at the granularity of a single node, a liveness check mechanism is established for each node within the unit. When the service health check of a single node within the target unit fails, the system switches to the backup unit for invocation.

[0072] In one embodiment of the distributed service routing method of this application, see [link to relevant documentation]. Figure 3 It can also specifically include the following:

[0073] Step S301: Determine the proportion and range of faulty nodes in the storage partition unit.

[0074] Step S302: If the proportion and range of faulty nodes exceed a preset threshold, the traffic of the faulty nodes will be diverted to the backup unit.

[0075] For example, at the application level, a health check is performed on the proportion and scope of faulty nodes within the application. If the standard is not met, the traffic of the entire application is redirected to the backup unit through a load balancing mechanism.

[0076] It also includes, at the unit level, performing health checks on the proportion and scope of faulty nodes within the unit, and if the standards are not met, diverting the traffic of the entire unit to the backup unit through a load balancing mechanism.

[0077] In one embodiment of the distributed service routing method of this application, see [link to relevant documentation]. Figure 4 It can also specifically include the following:

[0078] Step S401: Establish a mapping relationship between customer number and each storage partition unit in advance, wherein different applications deploy the necessary parameters corresponding to the same customer number in the same common unit.

[0079] Step S402: Determine the required parameters in the corresponding public unit based on the mapping relationship and the client number in the distributed service call request.

[0080] Specifically, all applications within the system uniformly use "customer ID" + "unified hash algorithm" as the database sharding rule, where the number of databases can vary depending on the data volume of each application. Customers are divided into N groups based on the hash algorithm, and each application deploys the databases of customers in the same group within the same unit. A unified mapping relationship between hash values ​​and partition units is established within the system.

[0081] To effectively control the impact range of system resource domain failures and ensure system security and stability, this application provides an embodiment of a distributed service routing apparatus for implementing all or part of the aforementioned distributed service routing method. See [link to relevant documentation]. Figure 5 The distributed service routing device specifically includes the following components:

[0082] The partition determination module 10 is used to receive distributed service call requests and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving distributed service call requests, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0083] The business execution module 20 is used to forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0084] As described above, the distributed service routing device provided in this application embodiment can receive distributed service call requests and determine the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving distributed service call requests, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding common unit according to the distributed service call request to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability.

[0085] In one embodiment of the distributed service routing apparatus of this application, see [link to application]. Figure 6 The partition determination module 10 includes:

[0086] The liveness detection unit 11 is used to perform liveness detection checks on each node in the storage partition unit.

[0087] The mutual backup switching unit 12 is used to redirect the traffic of the node to the corresponding mutual backup unit if the detection liveness check result is unsuccessful.

[0088] In one embodiment of the distributed service routing apparatus of this application, see [link to application]. Figure 7 The partition determination module 10 includes:

[0089] The fault determination unit 13 is used to determine the proportion and range of fault nodes in the storage partition unit.

[0090] The backup switching unit 14 is used to introduce the traffic of the faulty node to the backup unit if the proportion and range of the faulty nodes exceed a preset threshold.

[0091] In one embodiment of the distributed service routing apparatus of this application, see [link to application]. Figure 8 The partition determination module 10 includes:

[0092] The mapping relationship establishment unit 15 is used to pre-establish the mapping relationship between customer number and each storage partition unit, wherein different applications deploy the necessary parameters corresponding to the same customer number in the same common unit.

[0093] The public parameter determination unit 16 is used to determine the required parameters in the corresponding public unit based on the mapping relationship and the customer number in the distributed service call request.

[0094] To further illustrate this solution, this application also provides a specific application example of implementing the distributed service routing method using the above-mentioned distributed service routing device, which specifically includes the following:

[0095] 1. When Customer A makes a credit card repayment transaction, funds need to be deducted from the customer's debit card and transferred to the credit card account. The transaction is completed within the system through three applications: mobile banking, personal settlement, and credit card.

[0096] 2. Mobile banking nodes are deployed in the access unit; nodes related to personal settlement, credit cards and customer accounts are deployed in the partition unit; debit card product parameters and credit card product parameters are deployed in the public unit, and a distributed caching middleware is used to cache frequently read records.

[0097] 3. In the personal settlement account and credit card account nodes, the national customer data is divided into 128 databases according to the customer number and a unified hash algorithm. These databases are evenly distributed across 4 partition units, with 32 databases deployed in each unit. This ensures that customer A's personal settlement account and credit card account data are within the same unit. The application also needs to record the segmentation mapping relationship between the hash value and the 128 partitioned databases.

[0098] 4. The database and application server deployed in partition unit RZ01 are used as a standby database and application server in partition unit RZ03. The standby database uses a database synchronization mechanism to maintain data consistency with the primary database.

[0099] 5. When a service call occurs, the mobile bank obtains the customer number based on the customer's card number and sends it along with the message to the personal settlement account and credit card account nodes. The distributed service routing framework calculates the hash value based on the customer number and forwards the data to the partition unit where the data is located for processing based on the mapping relationship between the hash value and the partition unit.

[0100] 6. When the personal settlement account and credit card account nodes receive a message in this partition unit, they further obtain the specific sub-database through the hash value and update the balance data.

[0101] From a hardware perspective, in order to effectively control the impact range of unit resource domain failures and ensure system security and stability, this application provides an embodiment of an electronic device for implementing all or part of the distributed service routing method, wherein the electronic device specifically includes the following:

[0102] The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the distributed service routing device and core business systems, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the distributed service routing method and the distributed service routing device in the embodiments, the content of which is incorporated herein, and repeated details will not be described again.

[0103] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.

[0104] In practical applications, the distributed service routing method can be partially executed on the electronic device side as described above, or all operations can be completed on the client device. The choice can be made based on the processing power of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed on the client device, the client device may further include a processor.

[0105] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0106] Figure 9 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 9 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 9 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.

[0107] In one embodiment, the distributed service routing method functionality can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:

[0108] Step S101: Receive a distributed service call request and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing the parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0109] Step S102: Forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0110] As described above, the electronic device provided in this application embodiment receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit obtains the necessary parameters from the corresponding common unit according to the distributed service call request to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability.

[0111] In another embodiment, the distributed service routing device can be configured separately from the central processing unit 9100. For example, the distributed service routing device can be configured as a chip connected to the central processing unit 9100, and the distributed service routing method function can be implemented through the control of the central processing unit.

[0112] like Figure 9 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 9 All components shown; in addition, the electronic device 9600 may also include Figure 9 For components not shown, please refer to existing technologies.

[0113] like Figure 9 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.

[0114] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.

[0115] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.

[0116] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.

[0117] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0118] The communication module 9110 is a transmitter / receiver 9110 that transmits and receives signals via the antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which can be the same as in a conventional mobile communication terminal.

[0119] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Additionally, the audio processor 9130 is coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.

[0120] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the distributed service routing method with a server or client as the execution subject in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the distributed service routing method with a server or client as the execution subject in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:

[0121] Step S101: Receive a distributed service call request and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing the parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0122] Step S102: Forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0123] As described above, the computer-readable storage medium provided in this application embodiment receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit obtains the necessary parameters from the corresponding common unit according to the distributed service call request to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability.

[0124] Embodiments of this application also provide a computer program product capable of implementing all steps of the distributed service routing method with the execution subject being a server or client in the above embodiments. When executed by a processor, this computer program / instruction implements the steps of the distributed service routing method. For example, the computer program / instruction implements the following steps:

[0125] Step S101: Receive a distributed service call request and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing the parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located.

[0126] Step S102: Forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations.

[0127] As described above, the computer program product provided in this application embodiment receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operation is located. The distributed service call request is forwarded to the service partition unit within the storage partition unit, so that the application service node in the service partition unit obtains the necessary parameters from the corresponding common unit according to the distributed service call request to perform the business processing operation. This effectively controls the scope of control resource domain failures and ensures system security and stability.

[0128] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0129] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0132] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A distributed service routing method, characterized in that, The method includes: The system receives a distributed service call request and determines the corresponding storage partition unit based on the client number in the distributed service call request. The storage partition unit includes an access unit for receiving the distributed service call request, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located. The distributed service call request is forwarded to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations; The process of determining the corresponding storage partition unit based on the customer number in the distributed service call request includes: pre-establishing a mapping relationship between the customer number and each storage partition unit, wherein different applications deploy the necessary parameters corresponding to the same customer number in the same common unit, and the mapping relationship is determined based on a preset database sharding rule, which includes calculating the hash value of the customer number using a hash algorithm and grouping customers based on the hash value; and determining the necessary parameters in the corresponding common unit based on the mapping relationship and the customer number in the distributed service call request.

2. The distributed service routing method according to claim 1, characterized in that, After receiving the distributed service call request and determining the corresponding storage partition unit based on the client number in the distributed service call request, the process includes: Perform a liveness check on each node in the storage partition unit; If the liveness detection result is unsuccessful, the traffic of that node will be diverted to the corresponding backup unit.

3. The distributed service routing method according to claim 1, characterized in that, After receiving the distributed service call request and determining the corresponding storage partition unit based on the client number in the distributed service call request, the method further includes: Determine the proportion and range of faulty nodes in the storage partition unit; If the proportion and range of faulty nodes exceed a preset threshold, the traffic of the faulty nodes will be diverted to the backup unit.

4. The distributed service routing method according to claim 2, characterized in that, The liveness check of each node in the storage partition unit includes: Based on the IP address and port information of each node in the storage partition unit, a probe message is sent to the corresponding probed node; If a response information carrying the service scope of the probed node is received from the probed node, the detection check result is determined to be passed.

5. The distributed service routing method according to claim 3, characterized in that, Determining the proportion and range of faulty nodes in the storage partition unit includes: Nodes whose storage partition unit liveness detection test result fails are identified as faulty nodes; The proportion of faulty nodes and the distribution range of faulty nodes within a set time period are statistically analyzed.

6. A distributed service routing device, characterized in that, include: The partition determination module is used to receive distributed service call requests and determine the corresponding storage partition unit according to the client number in the distributed service call request. The storage partition unit includes an access unit for receiving distributed service call requests, a common unit for storing parameters necessary for performing business processing operations, and a service partition unit where the application service node performing the business processing operations is located. The business execution module is used to forward the distributed service call request to the service partition unit in the storage partition unit, so that the application service node in the service partition unit can obtain the necessary parameters from the corresponding public unit according to the distributed service call request to perform business processing operations; Specifically, the partition determination module is used to pre-establish a mapping relationship between customer numbers and each storage partition unit. Different applications deploy the necessary parameters corresponding to the same customer number in the same common unit. The mapping relationship is determined based on preset database sharding rules. The preset database sharding rules include using a hash algorithm to calculate the hash value of the customer number and grouping customers based on the hash value. The necessary parameters in the corresponding common unit are determined according to the mapping relationship and the customer number in the distributed service call request.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the distributed service routing method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the distributed service routing method according to any one of claims 1 to 5.

9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the distributed service routing method according to any one of claims 1 to 5.