Service request processing method, device and computer equipment

By dynamically adjusting the routing policy, routing exception service requests are processed to another device, solving the problem of degradation of device stability caused by abnormal service nodes, and achieving the effect of improving device stability and performance.

CN116074387BActive Publication Date: 2025-03-25INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310269279.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2025-03-25
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

In the prior art, abnormalities may occur in the service nodes, resulting in reduced device stability and affecting the performance and throughput of other services.

Method used

By dynamically adjusting the routing policy, obtaining the status data of the service node, selecting exception service requests, and routing them to another device for processing, thereby isolating exception services and improving device stability.

Benefits of technology

Effectively control the impact range of abnormal services and improve the stability of the equipment, such as improving performance and throughput.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074387B_ABST
    Figure CN116074387B_ABST
Patent Text Reader

Abstract

The embodiments of this specification disclose a method, apparatus and computer device for processing a service request. The method comprises: obtaining first status data of a first device, the first device is used to process a service request routed according to a routing policy, the first status data is used to indicate the processing status of at least one service request; selecting an abnormal service request from the at least one service request according to the first status data; adjusting the routing policy to route the abnormal service request to a second device. The embodiments of this specification can improve the stability of the first device by dynamically adjusting the routing policy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and in particular, to a method, apparatus and computer device for processing a service request. Background Art

[0002] Currently, services are usually provided externally in a cluster manner. A device cluster includes multiple service nodes. Each service node is used to provide one or more services and can process service requests for the one or more services. Through routing strategies, service requests for the same or similar services can be routed to the same service node in the device cluster to achieve load balancing.

[0003] In the related art, the routing strategy is static. However, the services of the service node may be abnormal. If some services of a service node are abnormal, the stability of the service node will be reduced and other services of the service node will be affected. Summary of the invention

[0004] The embodiments of this specification provide a method, apparatus and computer device for processing a service request to dynamically adjust a routing strategy and improve device stability. The technical solution of the embodiments of this specification is as follows.

[0005] A first aspect of an embodiment of this specification provides a method for processing a service request, including:

[0006] Acquire first status data of a first device, the first device being used to process a service request routed according to a routing policy, the first status data being used to indicate a processing status of at least one service request;

[0007] selecting an abnormal service request from the at least one service request according to the first status data;

[0008] The routing policy is adjusted to route the abnormal service request to the second device.

[0009] A second aspect of the embodiments of this specification provides a method for processing a service request, including:

[0010] After receiving the service request, routing the service request to the first device according to the routing policy;

[0011] Acquire an adjusted routing policy; wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request;

[0012] After receiving the service request, the service request is routed to the second device according to the adjusted routing policy.

[0013] A third aspect of the embodiments of this specification provides a device for processing a service request, including:

[0014] an acquisition module, configured to acquire first status data of a first device, wherein the first device is configured to process a service request routed according to a routing policy, and the first status data is configured to indicate a processing status of at least one service request;

[0015] A selection module, configured to select an abnormal service request from the at least one service request according to the first status data;

[0016] The adjustment module is used to adjust the routing strategy to route the abnormal service request to the second device.

[0017] A fourth aspect of the embodiments of this specification provides a device for processing a service request, including:

[0018] A routing module, configured to, after receiving a service request, route the service request to the first device according to a routing policy; after receiving the service request, route the service request to the second device according to an adjusted routing policy;

[0019] The acquisition module is used to acquire an adjusted routing policy, wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request.

[0020] According to a fifth aspect of the embodiments of this specification, a computer device is provided, including:

[0021] processor;

[0022] a memory for storing processor-executable instructions;

[0023] The processor implements the method according to the first aspect or the second aspect by executing the instructions.

[0024] The technical solution provided in the embodiments of this specification can obtain the first status data of the first device, the first device is used to process the service request routed according to the routing policy, and the first status data is used to represent the processing status of at least one service request; an abnormal service request can be selected from the at least one service request according to the first status data; the routing policy can be adjusted to route the abnormal service request to the second device. In this way, when some services of the first device are abnormal, the service requests of these services can be routed to the second device by dynamically adjusting the routing policy, so as to be processed by the second device. By isolating the abnormal services, the impact range of the abnormal services is effectively controlled, and the stability of the first device is improved, for example, the performance and throughput of the first device are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. The drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 It is a functional structure diagram of a device cluster in the related technology;

[0027] Figure 2 A functional structure diagram of a system for processing service requests in an embodiment of this specification;

[0028] Figure 3 A flowchart of a method for processing a service request in an embodiment of this specification;

[0029] Figure 4 A flowchart of a method for processing a service request in an embodiment of this specification;

[0030] Figure 5 A functional structure diagram of a service request processing device in an embodiment of this specification;

[0031] Figure 6 Schematic diagram of the functional structure of a device for processing service requests in an embodiment of this specification. DETAILED DESCRIPTION

[0032] The technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, rather than all of the embodiments. The specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. Based on the described embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art are within the scope of protection of the present disclosure. In addition, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0033] In the related art, a device cluster may include a routing device and at least one service node. A routing policy may be set in the routing device. The routing device may receive a service request sent by a terminal device or an upstream device; and may route the service request to a service node in the device cluster according to the routing policy. The service node is used to provide one or more services. The service node may specifically process the service request forwarded by the routing device to obtain a processing result; and may feed back the processing result to the routing device. The routing device may receive and feed back the processing result to the terminal device or the upstream device.

[0034] The routing strategy is used to forward routing requests to the service nodes in the device cluster. Through the routing strategy, the load between the service nodes in the device cluster can be balanced. In the related art, the routing strategy is static. The services corresponding to the service nodes are relatively fixed, and the service requests processed are also relatively fixed. However, the services of the service nodes may be abnormal. If some services of a service node are abnormal, the stability of the service node will be reduced, such as reducing the performance and throughput of the service node, and affecting other services of the service node. For example, see Figure 1 The device cluster includes routing devices, service node A, service node B, and service node C. Among them, service node A is used to provide services A1, A2, A3, etc. Service A1 can be a transfer service, service A2 can be a query service, and service A3 can be a commodity order service. In some cases, service A3 is abnormal, such as a large number of service requests in a short period of time. Due to the abnormality of service A3, the performance and throughput of service node A will be reduced, which will in turn affect services A1 and A2 provided by service node A.

[0035] If the routing strategy can be adjusted dynamically, the impact of abnormal services on other normal services of the service node can be reduced, thereby improving the stability of the service node. To this end, the embodiment of this specification provides a system for processing service requests.

[0036] See also Figure 2 . The processing system of the service request may include an upstream device, a device cluster and a routing policy adjustment device. The upstream device may include a user-oriented terminal device, a backend-oriented server, etc. The device cluster may include a routing device, at least one first device, at least one second device, etc. A routing policy may be set in the routing device. According to the routing policy, the routing device can achieve the role of load balancing. Specifically, the routing device may receive a service request sent by an upstream device; according to the routing policy, the service request may be forwarded to a device in the device cluster, for example, the service request may be forwarded to the first device or the second device in the device cluster. The first device and the second device may be understood as service nodes in the device cluster. The first device includes a service node for processing normal service requests, and the second device includes a service node for processing abnormal service requests. After processing the service request routed by the routing device, the first device and / or the second device may feedback the processing result to the routing device. The routing device may receive and feedback the processing result to the upstream device.

[0037] The routing policy adjustment device is used to collect the first status data of each first device when processing a service request; the abnormal service request of each first device can be selected according to the first status data; the routing policy can be adjusted to route the abnormal service request to the second device; the adjusted routing policy can be sent to the routing device. The routing device can receive the adjusted routing policy. In this way, when some services of the first device are abnormal, the service requests of these services can be routed to the second device by dynamically adjusting the routing policy, so as to be processed by the second device. By isolating the abnormal services, the impact range of the abnormal services is effectively controlled, and the stability of the first device is improved, for example, the performance and throughput of the first device are improved.

[0038] Of course, the routing policy adjustment device can also collect the second state data of the second device when processing the abnormal service request; according to the second state data, it can be determined whether the abnormal service request has returned to normal; if so, the adjusted routing policy can be adjusted to route the abnormal service request that has returned to normal to the first device; the adjusted routing policy can be sent to the routing device. The routing device can receive the adjusted routing policy. In this way, after the abnormal service returns to normal, the first device can continue to process its service request. This avoids the second device from having to process too many service requests and too much load.

[0039] It is worth noting that in the device cluster, the service node can process a service request of at least one service. Therefore, the service node can be understood as a service group in the device cluster. The service group can be used to process service requests for the same or similar services. The service node can be a single device, or a cluster including multiple devices.

[0040] In addition, the routing policy adjustment device and the routing device may be the same device or different devices.

[0041] See also Figure 3 Based on the service request processing system of the embodiment of this specification, the embodiment of this specification provides a service request processing method. The method can be applied to a routing policy adjustment device, and specifically can include the following steps.

[0042] Step S10: Acquire first status data of a first device, where the first device is used to process a service request routed according to a routing policy, and the first status data is used to indicate a processing status of at least one service request.

[0043] In some embodiments, the first device includes a service node in the device cluster for processing normal service requests. The first device can provide at least one service; and can process service requests for the at least one service routed according to the routing strategy. The services include but are not limited to transfer services, query services, recharge services, and product ordering services.

[0044] The routing strategy is used to route the service request. The routing strategy may include routing information of at least one service request. The routing information is used to indicate the corresponding relationship between the service request and the service node. Thus, the corresponding routing information can be queried from the routing strategy according to the service request; the service request can be routed to the service node according to the queried routing information. For example, the service request of the transfer service can be routed to the service node A, the service request of the query service can be routed to the service node B, and the service request of the recharge service can be routed to the service node C.

[0045] In some embodiments, at least one first state data of the first device may be obtained. Each first state data may correspond to a service request and is used to indicate the processing state of the service request. The first state data may include at least one sub-data. The at least one sub-data may describe the processing state of the service request from at least one dimension. The sub-data may include request type data, response type data, result type data, etc. The request type data is used to indicate the number of service requests received, such as the number per unit time, the total number within a period of time, etc. The response type data is used to indicate the processing time of the service request, such as the processing time of a single service request, the average processing time of multiple service requests, etc. Alternatively, the response type data may also include the error rate of the service request, etc. The result type data is used to indicate the type of the service request processing result, which may specifically include success, failure, etc. The success is used to indicate that the service request processing is successful, and the failure is used to indicate that the service request processing fails. The failure may also include processing timeout, null pointer, etc. In some embodiments, the data type of the first state data may be a numerical value. Specifically, the request type data, the response type data, the result type data, etc. may be quantified to obtain the first state data of numerical type. For example, for result type data, a value of 0 may be used to indicate success, a value of -1 may be used to indicate a processing timeout, and a value of -2 may be used to indicate a null pointer. In other implementations, the first status data may also be of other types, such as text type.

[0046] In some embodiments, the first status data of the first device can be obtained in real time. Alternatively, the first status data of the first device can also be obtained at a set interval. In some embodiments, the first status data sent by the first device can be received. Specifically, the first device in the device cluster can actively send the first status data to the routing policy adjustment device. For example, the first device in the device cluster can actively send the first status data to the routing policy adjustment device at a set interval. Alternatively, the routing policy adjustment device can also send a request to the first device in the device cluster. The first device can send the first status data to the routing policy adjustment device according to the request. For example, the routing policy adjustment device can send a request to the first device in the device cluster at a set interval. In other embodiments, the first status data sent by other devices can also be received. For example, the first device can send the first status data to the routing device. The routing device can receive and send the first status data to the routing policy adjustment device. The routing policy adjustment device can receive the first status data.

[0047] In some embodiments, the device cluster may include at least one first device. Each first device may process at least one service request, so that for each first device, at least one first status data of the first device may be obtained.

[0048] Step S12: selecting an abnormal service request from the at least one service request according to the first status data.

[0049] In some embodiments, an abnormal value of at least one service request may be determined based on at least one first state data; one or more abnormal service requests may be selected from the at least one service request based on the at least one abnormal value. The abnormal value is used to indicate the abnormal degree of the service request. The abnormal value may be positively correlated or negatively correlated with the abnormal degree.

[0050] The first state data includes at least one sub-data. The sub-data is used to calculate the component of the abnormal value, and the component of the abnormal value is used to calculate the abnormal value. Specifically, the sub-data may correspond to a weight. Then, the component of the abnormal value may be calculated based on the sub-data and the reference data corresponding to the sub-data. The reference data includes sub-data of the same period in history. The components of the abnormal value may be weighted and added according to the weight to obtain the abnormal value. For example, according to the formula Calculate the outlier value. α is the weight of the sub-data req, req 历史同期 is the reference data of sub-data req, β is the weight of sub-data resp, resp 历史同期 is the reference data of the sub-data resp, and γ is the weight of the sub-data status.

[0051] The abnormal service request may be a service request with a high degree of abnormality. The abnormal service request may be selected according to a set threshold. Specifically, an abnormal value greater than or equal to the set threshold may be selected from at least one abnormal value; the service request corresponding to the selected abnormal value may be used as the abnormal service request. Alternatively, an abnormal value less than or equal to the set threshold may be selected from at least one abnormal value; the service request corresponding to the selected abnormal value may be used as the abnormal service request. Of course, the abnormal service request may also be selected according to a numerical range. Specifically, an abnormal value located in an abnormal numerical range may be selected from at least one abnormal value; the service request corresponding to the selected abnormal value may be used as the abnormal service request.

[0052] In some embodiments, abnormal service requests can also be selected by machine learning. Specifically, the first state data can be input into an abnormal service request identification model to obtain an output of the abnormal service request identification model. The output can be used to indicate whether the service request is a normal service request or an abnormal service request. In practical applications, the abnormal service request identification model can include a neural network model, a support vector machine model, a linear regression model, a nonlinear regression model, etc.

[0053] Step S14: adjusting the routing strategy to route the abnormal service request to the second device.

[0054] In some embodiments, the routing information of the abnormal service request can be obtained from the routing policy, and the routing information of the abnormal service request can be adjusted in the routing policy. Specifically, the correspondence between the abnormal service request and the first device can be adjusted to the correspondence between the abnormal service request and the second device.

[0055] In this way, when some services of the first device are abnormal, the service requests of these services can be routed to the second device by dynamically adjusting the routing strategy, so that the second device can process them. By isolating the abnormal services, the impact range of the abnormal services is effectively controlled, and the stability of the first device is improved, for example, the performance and throughput of the first device are improved.

[0056] The second device may include a service node in a device cluster for processing abnormal service requests.

[0057] In some embodiments, the number of second devices may be one. By adjusting the routing policy, abnormal service requests of various abnormal types may be routed to the second device. The abnormal types may include processing timeout, null pointer, etc. Of course, the number of second devices may also be multiple. The second device corresponds to the abnormal type of the abnormal service request. For example, the second device may include three second devices, node1, node2, and node3. The second device node1 corresponds to the processing timeout, the second device node2 corresponds to the null pointer, and the second device node3 corresponds to other abnormal types except processing timeout and null pointer. Then, after selecting the abnormal service request, the second device may be selected from multiple second devices according to the abnormal type of the abnormal service request; the routing policy may be adjusted to route the abnormal service request to the selected second device.

[0058] In practical applications, the first state data may include sub-data, and the sub-data may include result type data. The abnormal type of the abnormal service request can be determined based on the result type data. Of course, the routing policy adjustment device can also obtain at least one result type data of the first device. The result type data is used to indicate the type of the service request processing result, which may specifically include success, failure, etc. Each result type data may correspond to a service request. The way in which the routing policy adjustment device obtains the result type data can refer to the way in which the first state data is obtained, and will not be repeated here.

[0059] In some embodiments, the adjusted routing policy may also be sent to the routing device, so that the routing device can forward the abnormal service request sent by the upstream device to the second device according to the adjusted routing policy.

[0060] In some embodiments, the second state data of the second device can also be obtained; based on the second state data, it can be determined whether the abnormal service request has returned to normal; if so, the adjusted routing policy can be adjusted to route the abnormal service request that has returned to normal to the first device. Among them, at least one second state data of the second device can be obtained. The second state data can correspond to the abnormal service request and is used to indicate the processing status of the abnormal service request. For each second state data, it can be determined whether the corresponding abnormal service request has returned to normal. If so, the adjusted routing policy can be adjusted to route the abnormal service request that has returned to normal to the first device. Regarding the method of obtaining the second state data, reference can be made to the method of obtaining the first state data. The introduction of the second state data can also refer to the first state data. No further details will be given here.

[0061] The abnormal value of the abnormal service request can be determined based on the second state data; and whether the abnormal service request has returned to normal can be determined based on the abnormal value. Among them, the method of calculating the abnormal value based on the second state data can refer to the method of calculating the abnormal value based on the first state data. It can be judged whether the abnormal service request has returned to normal based on the set threshold. If the abnormal value is greater than or equal to the set threshold, it can be judged that the abnormal service request has returned to normal. Alternatively, if the abnormal value is less than or equal to the set threshold, it can be judged that the abnormal service request has returned to normal. Of course, it is also possible to judge whether the abnormal service request has returned to normal based on the numerical interval. If the abnormal value is not in the abnormal numerical interval, it can be judged that the abnormal service request has returned to normal. Of course, it is also possible to use machine learning to judge whether the abnormal service request has returned to normal. The second state data can be input into the abnormal service request recognition model to obtain the output of the abnormal service request recognition model. The output is used to indicate whether the abnormal service request has returned to normal.

[0062] Regarding the manner of adjusting the adjusted routing policy, reference may be made to step S14, which will not be described in detail here.

[0063] The adjusted routing policy may be sent to the routing device, so that the routing device may forward the abnormal service restoration request sent by the upstream device to the first device according to the adjusted routing policy.

[0064] The number of first devices can be multiple. In the process of adjusting the adjusted routing policy, the abnormal service request to return to normal can be routed to any first device. Alternatively, the routing policy adjustment device can also record the correspondence between the service request and the first device. In the process of adjusting the adjusted routing policy, the first device corresponding to the abnormal service request to return to normal can be selected according to the correspondence, and the abnormal service request to return to normal can be routed to the selected first device. In this way, the abnormal service request to return to normal can be routed to the original first device. The original first device can be the first device used to process the abnormal service request when the abnormal service request is normal. This is conducive to load balancing of the first device.

[0065] The method for processing service requests in the embodiments of this specification can obtain first status data of a first device, the first device is used to process service requests routed according to a routing policy, and the first status data is used to represent the processing status of at least one service request; an abnormal service request can be selected from the at least one service request according to the first status data; the routing policy can be adjusted to route the abnormal service request to a second device. In this way, when some services of the first device are abnormal, the service requests of these services can be routed to the second device by dynamically adjusting the routing policy, so as to be processed by the second device. By isolating abnormal services, the scope of influence of abnormal services is effectively controlled, and the stability of the first device is improved, for example, the performance and throughput of the first device are improved.

[0066] See also Figure 4 Based on the service request processing system of the embodiment of this specification, the embodiment of this specification also provides another service request processing method. The method can be applied to a routing device, and specifically can include the following steps.

[0067] Step S20: after receiving the service request, routing the service request to the first device according to the routing policy.

[0068] Step S22: obtaining an adjusted routing policy; wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request;

[0069] Step S24: after receiving the service request, routing the service request to the second device according to the adjusted routing policy.

[0070] In some embodiments, a service request sent by an upstream device may be received. After receiving the service request, the service request may be routed to the first device according to a routing policy. For example, corresponding routing information may be queried from the routing policy according to the service request; and the service request may be routed to the first device according to the queried routing information.

[0071] In some embodiments, the adjusted routing policy sent by the routing policy adjustment device may be received. For the adjustment process of the routing policy, please refer to Figure 3 The corresponding embodiments will not be described in detail here.

[0072] In some embodiments, the service request sent by the upstream device may continue to be received. After receiving the service request again, the service request may be routed to the second device according to the adjusted routing strategy.

[0073] The method for processing service requests of the embodiments of the present specification, after receiving a service request, can route the service request to the first device according to the routing policy; can obtain an adjusted routing policy; wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request; after receiving the service request, the service request can be routed to the second device according to the adjusted routing policy. In this way, when some services of the first device are abnormal, the service requests of these services can be routed to the second device by dynamically adjusting the routing policy, so as to be processed by the second device. By isolating the abnormal services, the scope of influence of the abnormal services is effectively controlled, and the stability of the first device is improved, for example, the performance and throughput of the first device are improved.

[0074] See also Figure 5 The embodiment of the present specification also provides a service request processing device, which is applied to a routing policy adjustment device. The device may include the following modules.

[0075] An acquisition module 30, configured to acquire first status data of a first device, wherein the first device is configured to process a service request routed according to a routing policy, and the first status data is configured to indicate a processing status of at least one service request;

[0076] A selection module 32, configured to select an abnormal service request from the at least one service request according to the first status data;

[0077] The adjustment module 34 is used to adjust the routing policy to route the abnormal service request to the second device.

[0078] See also Figure 6The embodiment of this specification also provides another device for processing service requests, which is applied to a routing device. The device may include the following modules.

[0079] The routing module 40 is used to route the service request to the first device according to the routing policy after receiving the service request; and to route the service request to the second device according to the adjusted routing policy after receiving the service request;

[0080] The acquisition module 42 is used to acquire an adjusted routing policy, wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request.

[0081] The embodiments of this specification also provide a computer storage medium. The computer storage medium itself can be implemented in any appropriate manner. Specifically, for example, the computer storage medium includes but is not limited to: magnetic memory, digital memory, ROM / RAM, magnetic disk, optical disk, etc. The computer storage medium stores computer program instructions.

[0082] In some embodiments, when the computer program instructions are executed, the following steps may be implemented:

[0083] Acquire first status data of a first device, the first device being used to process a service request routed according to a routing policy, the first status data being used to indicate a processing status of at least one service request;

[0084] selecting an abnormal service request from the at least one service request according to the first status data;

[0085] The routing policy is adjusted to route the abnormal service request to the second device.

[0086] In some embodiments, when the computer program instructions are executed, the following steps may be implemented:

[0087] After receiving the service request, routing the service request to the first device according to the routing policy;

[0088] Acquire an adjusted routing policy; wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request;

[0089] After receiving the service request, the service request is routed to the second device according to the adjusted routing policy.

[0090] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0091] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. The computer may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0092] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0093] Those skilled in the art will understand that the description of each embodiment has its own emphasis, and for parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. In addition, it is understood that after reading this specification, those skilled in the art can think of any combination of some or all of the embodiments listed in this specification without creative work, and these combinations are also within the scope of disclosure and protection of this specification.

[0094] Although the present specification has been described by way of embodiments, persons skilled in the art will appreciate that there are many modifications and variations to the present specification, and it is intended that the appended claims include such modifications and variations without departing from the spirit of the present specification.

Claims

1. A method for processing a service request, characterized in that: Applicable to routing policy adjustment devices, including: Acquire first status data of a first device in the device cluster, the first device being used to process multiple service requests routed according to a routing policy, the first status data being used to indicate processing status of the multiple service requests; selecting an abnormal service request from the multiple service requests according to the first status data; The routing policy is adjusted to route the abnormal service request to a second device in the device cluster; the adjusting the routing policy comprises: adjusting routing information of the abnormal service request in the routing policy; Sending the adjusted routing policy to the routing device in the device cluster, the routing device being configured to forward the abnormal service request sent by the upstream device to the second device according to the adjusted routing policy; The device cluster includes a plurality of first devices and a plurality of second devices, the first devices are used to process normal service requests, the second devices are used to process abnormal service requests, and the second devices correspond to the abnormal types of the abnormal service requests; the step of adjusting the routing strategy includes: selecting a corresponding second device from the plurality of second devices according to the abnormal type of the selected abnormal service request, and adjusting the routing strategy to route the selected abnormal service request to the selected second device; Acquire second status data of the second device, where the second status data is used to indicate a processing status of the abnormal service request; Determining whether the abnormal service request has returned to normal according to the second status data; If so, the adjusted routing policy is adjusted to route the abnormal service request that has returned to normal to the first device.

2. The method according to claim 1, characterized in that The first device includes a service node in the cluster for processing normal service requests, the second device includes a service node in the cluster for processing abnormal service requests, and the routing strategy is used to route the service request to the service node in the cluster.

3. The method according to claim 1, characterized in that: The step of acquiring the first state data includes: Acquire at least one first status data of the first device, where the first status data corresponds to the service request; The steps of selecting an abnormal service request include: Determining an abnormal value of the service request according to the first status data, wherein the abnormal value is used to indicate an abnormal degree of the service request; An abnormal service request is selected from the multiple service requests according to the abnormal value.

4. A method for processing a service request, characterized in that: Applicable to routing devices, including: After receiving the service request, routing the service request to the first device according to the routing policy; Acquire an adjusted routing policy; wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request; After receiving the service request, routing the service request to the second device according to the adjusted routing policy; The adjusted routing policy is obtained by the routing policy adjustment device in the following ways: Acquire first status data of a first device in the device cluster, where the first device is used to process multiple service requests routed according to the routing policy, and the first status data is used to indicate the processing status of the multiple service requests; selecting an abnormal service request from the plurality of service requests according to the first status data; The routing policy is adjusted to route the abnormal service request to a second device in the device cluster; the adjusting the routing policy comprises: adjusting routing information of the abnormal service request in the routing policy; The device cluster includes a plurality of first devices and a plurality of second devices, the first devices are used to process normal service requests, the second devices are used to process abnormal service requests, and the second devices correspond to the abnormal types of the abnormal service requests; the step of adjusting the routing strategy includes: selecting a corresponding second device from the plurality of second devices according to the abnormal type of the selected abnormal service request, and adjusting the routing strategy to route the selected abnormal service request to the selected second device; The routing policy adjustment device is used to obtain second status data of the second device, where the second status data is used to indicate the processing status of the abnormal service request; based on the second status data, it is determined whether the abnormal service request has returned to normal; if so, the adjusted routing policy is adjusted to route the abnormal service request that has returned to normal to the first device.

5. A service request processing device, characterized in that: Applicable to routing policy adjustment devices, including: An acquisition module, used to acquire first status data of a first device in the device cluster, the first device being used to process multiple service requests routed according to a routing policy, and the first status data being used to indicate processing status of the multiple service requests; A selection module, configured to select an abnormal service request from the multiple service requests according to the first status data; An adjustment module is used to adjust the routing strategy to route the abnormal service request to a second device in the device cluster; the adjustment of the routing strategy includes: adjusting routing information of the abnormal service request in the routing strategy; A sending module, used to send the adjusted routing policy to the routing device in the device cluster, and the routing device is used to forward the abnormal service request sent by the upstream device to the second device according to the adjusted routing policy; The device cluster includes a plurality of first devices and a plurality of second devices, the first devices are used to process normal service requests, the second devices are used to process abnormal service requests, and the second devices correspond to the abnormal types of the abnormal service requests; the step of adjusting the routing strategy includes: selecting a corresponding second device from the plurality of second devices according to the abnormal type of the selected abnormal service request, and adjusting the routing strategy to route the selected abnormal service request to the selected second device; The service request processing device is also used to obtain second status data of the second device, and the second status data is used to indicate the processing status of the abnormal service request; based on the second status data, it is determined whether the abnormal service request has returned to normal; if so, the adjusted routing strategy is adjusted to route the abnormal service request that has returned to normal to the first device.

6. A service request processing device, characterized in that: Applicable to routing devices, including: A first routing module is used to route the service request to the first device according to the routing policy after receiving the service request; and to route the service request to the second device according to the adjusted routing policy after receiving the service request; An acquisition module, configured to acquire an adjusted routing policy, wherein the adjusted routing policy is obtained by adjusting the service request to be routed to the second device under the condition that the service request is an abnormal service request; A second routing module is used to route the service request to a second device according to the adjusted routing strategy after receiving the service request; The adjusted routing policy is obtained by the routing policy adjustment device in the following ways: Acquire first status data of a first device in the device cluster, where the first device is used to process multiple service requests routed according to the routing policy, and the first status data is used to indicate the processing status of the multiple service requests; selecting an abnormal service request from the multiple service requests according to the first status data; The routing policy is adjusted to route the abnormal service request to a second device in the device cluster; the adjusting the routing policy comprises: adjusting routing information of the abnormal service request in the routing policy; The device cluster includes a plurality of first devices and a plurality of second devices, the first devices are used to process normal service requests, the second devices are used to process abnormal service requests, and the second devices correspond to the abnormal types of the abnormal service requests; the step of adjusting the routing strategy includes: selecting a corresponding second device from the plurality of second devices according to the abnormal type of the selected abnormal service request, and adjusting the routing strategy to route the selected abnormal service request to the selected second device; The routing policy adjustment device is used to obtain second status data of the second device, where the second status data is used to indicate the processing status of the abnormal service request; based on the second status data, it is determined whether the abnormal service request has returned to normal; if so, the adjusted routing policy is adjusted to route the abnormal service request that has returned to normal to the first device.

7. A computer device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 4 by executing the instructions.

Citation Information

Patent Citations

  • Service processing method, device and equipment and storage medium

    CN110022227A