Data processing method, device and server

By dynamically updating the diversion ratio and using static business data to process requests, the problem of intricate data processing requests in the back-end server is solved, and the user experience is improved.

CN112433891BActive Publication Date: 2024-12-20CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011391170.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-02
Publication Date
2024-12-20
Estimated Expiration
2040-12-02

AI Technical Summary

Technical Problem

Existing data processing methods are not meticulous in handling data processing requests when an exception occurs on the backend server, which affects the user experience and lacks effective solutions.

Method used

By receiving data processing requests sent by the terminal device, querying the switch status of the disaster recovery and processing mode, and dynamically update the target diversion ratio according to the abnormal proportion parameters of the backend service, diversion of data processing requests to the corresponding backend server or preset capacity The disaster treatment module performs processing and uses static business data for emergency processing.

Benefits of technology

When an exception occurs on the backend server, the data processing requests are intelligently and reasonably diverted, and the disaster recovery processing module and the backend server respond to the requests are finely used to improve the user experience and avoid the problem of improper processing under the service circuit breaker method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112433891B_ABST
    Figure CN112433891B_ABST
Patent Text Reader

Abstract

This specification provides a data processing method, device and server. Based on this method, after receiving a data processing request carrying a URL address parameter related to a backend service, the server first queries the switch state of the current disaster recovery processing mode, and when it is determined to be in the on state, obtains the target diversion ratio that matches the URL address parameter by querying the preset shared memory, wherein the above target diversion ratio is updated regularly; the server can divert the data processing request to the backend server according to the above target diversion ratio, or the preset disaster recovery processing module corresponding to the backend service that pre-stores static business data related to the backend service for corresponding processing. Thereby, in the event of an abnormality in the backend server, the data processing request can be intelligently and reasonably diverted, and the preset disaster recovery processing module and the backend server can be used in a sophisticated manner to respond to the data processing request and complete the corresponding data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification belongs to the field of Internet technology, and in particular to data processing methods, devices and servers. Background Art

[0002] In some data processing scenarios (for example, bank transaction data processing scenarios), in order to avoid the inability to promptly process incoming data processing requests due to anomalies in the system backend server, a disaster recovery processing system is often configured in addition to the original data processing system to process incoming data processing requests when anomalies occur in the system server.

[0003] However, based on the existing data processing methods, when the system backend server handles data processing requests abnormally, it is often rough and not sophisticated enough. For example, when a backend server in the system is found to be abnormal and meets the preset trigger conditions, most existing methods will directly trigger the service fuse, that is, all the received data processing requests will be sent to the disaster recovery processing system for processing.

[0004] It can be seen that when the existing method is implemented, it is easy to encounter technical problems such as when an abnormality occurs in the backend server and the data processing request is not processed accurately, which affects the user experience.

[0005] To address the above problems, no effective solution has been proposed yet. Summary of the invention

[0006] This specification provides a data processing method, device and server, which can intelligently and reasonably divert data processing requests when an abnormality occurs in the back-end server, and can finely utilize the preset disaster recovery processing module and back-end server to respond to data processing requests, complete corresponding data processing, and improve the user experience.

[0007] A data processing method provided in this specification includes:

[0008] Receiving a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service;

[0009] Query the current switch status of the disaster recovery processing mode;

[0010] When it is found that the switch state of the current disaster recovery processing mode is turned on, query the preset shared memory to obtain the target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service;

[0011] According to the target diversion ratio, the data processing request is sent to a backend server corresponding to the backend service, or a preset disaster recovery processing module corresponding to the backend service for corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service;

[0012] The processing result is sent to the terminal device.

[0013] In one embodiment, after querying the switch status of the current disaster recovery processing mode, the method further includes:

[0014] When it is found that the switch state of the current disaster recovery processing mode is closed, the data processing request is sent to the backend server corresponding to the backend service for corresponding processing.

[0015] In one embodiment, after sending the data processing request to a backend server corresponding to the backend service for corresponding processing, the method further includes:

[0016] Detecting whether error information regarding the data processing request fed back by the back-end server is received;

[0017] When it is determined that the error message fed back by the back-end server is received, the data processing request is sent to a preset disaster recovery processing module for corresponding processing.

[0018] In one embodiment, the preset shared memory includes Nginx shared memory.

[0019] In one embodiment, the method further comprises:

[0020] At preset time intervals, regularly obtain the status log of the corresponding backend service according to the preset disaster recovery service list;

[0021] According to the status log of the backend service, the abnormal proportion parameter of the backend service is counted;

[0022] The switch state of the disaster recovery processing mode is determined according to the abnormal proportion parameter of the backend service and the preset disaster recovery rule.

[0023] In one embodiment, the method further comprises:

[0024] When it is determined that the switch state of the disaster recovery processing mode is in the on state, a switch identifier for indicating the on state is generated; or, when it is determined that the switch state of the disaster recovery processing mode is in the off state, a switch identifier for indicating the off state is generated;

[0025] The switch identifier is stored in a preset shared memory; or the switch identifier in the preset shared memory is updated.

[0026] In one embodiment, the querying of the switch status of the current disaster recovery processing mode includes:

[0027] Query the preset shared memory to obtain the current switch identifier;

[0028] The switch state of the current disaster recovery processing mode is determined according to the current switch identifier.

[0029] In one embodiment, when it is determined that the switch state of the disaster recovery processing mode is the on state, after generating a switch identifier for indicating the on state, the method further includes:

[0030] Generate a matching target diversion ratio according to the abnormal ratio parameter of the backend service and the preset disaster recovery rule;

[0031] The matched target diversion ratio is stored in a preset shared memory; or, according to the matched target diversion ratio, the target diversion ratio in the preset shared memory is updated.

[0032] In one embodiment, after sending the data processing request to a preset disaster recovery processing module corresponding to the backend service for corresponding processing, the method further includes:

[0033] Calling a built-in preset copy module to copy the data processing request to obtain a simulation request;

[0034] The simulation request is sent to a backend server corresponding to the backend service for testing, so as to trigger the collection of status parameters of the backend server and generate a status log of the corresponding backend service.

[0035] In one embodiment, the state parameter includes an average value of the response time.

[0036] In one embodiment, the built-in preset replication module includes: ngx_http_mirror_module module.

[0037] In one embodiment, calling a built-in preset copy module to copy the data processing request to obtain a simulated request includes:

[0038] Detecting the type of the data processing request; wherein the type of the data processing request includes a user request and a crawler request;

[0039] When it is determined that the data processing request is a user request, a built-in preset copy module is called to copy the data processing request to obtain a simulated request.

[0040] This specification also provides a data processing device, including:

[0041] A receiving module, used to receive a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service;

[0042] The first query module is used to query the switch status of the current disaster recovery processing mode;

[0043] The second query module is used to query the preset shared memory to obtain the target diversion ratio matching the URL address parameter when the switch state of the current disaster recovery processing mode is found to be on; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service;

[0044] A processing module, configured to send the data processing request to a backend server corresponding to the backend service, or to a preset disaster recovery processing module corresponding to the backend service for corresponding processing according to the target diversion ratio, so as to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service;

[0045] A feedback module is used to send the processing result to the terminal device.

[0046] The present specification also provides a server, comprising a processor and a memory for storing processor executable instructions, wherein the processor executes the instructions to receive a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service; queries the switch state of the current disaster recovery processing mode; when it is found that the switch state of the current disaster recovery processing mode is on, queries a preset shared memory to obtain a target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to an abnormal ratio parameter of the backend service; according to the target diversion ratio, sends the data processing request to a backend server corresponding to the backend service, or to a preset disaster recovery processing module corresponding to the backend service for corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service; and sends the processing result to the terminal device.

[0047] The present specification also provides a computer-readable storage medium having computer instructions stored thereon, which, when executed, implement a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service; queries the switch state of the current disaster recovery processing mode; when it is found that the switch state of the current disaster recovery processing mode is on, queries the preset shared memory to obtain a target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service; according to the target diversion ratio, sends the data processing request to a backend server corresponding to the backend service, or, to a preset disaster recovery processing module corresponding to the backend service, performs corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service; and sends the processing result to the terminal device.

[0048] The data processing method, device and server provided in this specification, after receiving a data processing request carrying a URL address parameter related to a backend service, the server first queries the switch state of the current disaster recovery processing mode, and when it is determined to be in the on state, obtains the target diversion ratio that matches the URL address parameter by querying the preset shared memory, wherein the above target diversion ratio is updated regularly; the server can divert the data processing request to the corresponding backend server according to the above target diversion ratio, or the preset disaster recovery processing module corresponding to the backend service that pre-stores static business data related to the backend service for corresponding processing. Therefore, in the case of an abnormality in the backend server, the data processing request can be intelligently and reasonably diverted, and the preset disaster recovery processing module and the backend server can be used in a fine manner to respond to the data processing request, so as to better complete the corresponding data processing and improve the user experience. It solves the technical problem that the existing method does not process the data processing request in a fine manner when an abnormality occurs in the backend server, which affects the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of this specification, the drawings required for use in the embodiments 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.

[0050] Figure 1 It is a schematic diagram of an embodiment of the structure of a system using the data processing method provided in the embodiments of this specification;

[0051] Figure 2is a flowchart of a data processing method provided by an embodiment of this specification;

[0052] Figure 3 It is a schematic diagram of the structure of a server provided by an embodiment of this specification;

[0053] Figure 4 This is a schematic diagram of the structure of a data processing device provided by an embodiment of this specification.

[0054] Figure 5 It is a schematic diagram of an embodiment of applying the data processing method provided by the embodiments of this specification in a scenario example;

[0055] Figure 6 It is a schematic diagram of an embodiment of applying the data processing method provided by the embodiments of this specification in a scenario example;

[0056] Figure 7 It is a schematic diagram of an embodiment of applying the data processing method provided by the embodiments of this specification in a scenario example. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the technical solutions in this specification, 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, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0058] Considering that based on the existing data processing methods, when the preset trigger conditions are detected (for example, one or more backend servers in the system are detected to be abnormal), they are often not finely distinguished, and the disaster recovery processing system is directly triggered to access all data processing requests for data processing. This data processing method (i.e., the service fuse processing method) is relatively rough and not fine enough; and because all accessed data processing requests are simply processed by the disaster recovery processing system, the user experience is relatively poor.

[0059] In view of the root cause of the above problems, the present specification considers that first, the server can regularly detect and determine the abnormal proportion parameter of the backend service, and then can dynamically update the switch state of the disaster recovery processing mode according to the abnormal proportion constant of the above backend service, and the matching target diversion ratio when the switch state of the disaster recovery processing mode is in the on state; then, when the server receives a data processing request, it can first determine the switch state of the current disaster recovery processing mode by querying, and when the switch state of the current disaster recovery processing mode is found to be in the on state, it can further query the current matching target diversion ratio; then, the data processing request is diverted according to the target diversion ratio, and the data processing request is sent to the corresponding backend server, or the corresponding preset static processing module for processing. In this way, by using the service degradation method to process the user's data processing request, compared with the service fuse method adopted by the existing method, it can effectively combine the latest status of the backend server of the current system, and process the user's data processing request more finely and reasonably, thereby improving the user's experience. The technical problem that the existing method does not process the data processing request finely and affects the user's experience when the backend server is abnormal is solved.

[0060] Based on the above concept, an embodiment of the present specification provides a data processing method, which can be specifically applied to a system including a server, a terminal device, and a preset disaster recovery processing module.

[0061] For details, please refer to Figure 1 As shown. The above-mentioned server may include a front-end server and multiple back-end servers. Among them, the above-mentioned front-end server is connected to the terminal device used by the user. Multiple back-end servers are respectively connected to the front-end server, and are respectively used to respond to the user's data processing request for online processing under normal circumstances to provide the user with corresponding back-end services. The preset disaster recovery processing module is connected to the front-end server and stores static business data related to the back-end service, which is used to process the user's data processing request using the stored static business data under abnormal circumstances. The above-mentioned front-end server and multiple back-end servers are combined to form a server cluster (for example, Nginx cluster) responsible for processing data processing requests.

[0062] In this embodiment, the front-end server and the back-end server may specifically include a background server applied to the service platform side and capable of realizing functions such as data transmission and data processing. Specifically, the front-end server and the back-end server may be, for example, an electronic device with data computing, storage and network interaction functions. Alternatively, the front-end server and the back-end server may also be software programs running in the electronic device to provide support for data processing, storage and network interaction.

[0063] In this embodiment, the terminal device may specifically include an electronic device applied to the user side and capable of realizing functions such as data collection and data transmission. Specifically, the terminal device may be, for example, a desktop computer, a tablet computer, a laptop computer, a smart phone, etc. Alternatively, the terminal device may also be a software application that can be run in the above electronic devices. For example, it may be an APP running on a smart phone.

[0064] In specific implementation, the user may initiate a data processing request (eg, a transaction data processing request) to the front-end server through a terminal device, wherein the data processing request carries at least a URL address parameter related to the requested back-end service.

[0065] The front-end server receives the data processing request, responds to the data processing request, and queries the switch status of the current disaster recovery processing mode.

[0066] When the front-end server finds that the switch state of the current disaster recovery processing mode is turned on, it can further query the preset shared memory to obtain the target diversion ratio that matches the URL address parameter. The target diversion ratio stored in the preset shared memory is updated regularly according to the abnormal ratio parameter of the back-end service.

[0067] Furthermore, the front-end server can divert the data processing request according to the target diversion ratio, that is, determine whether to send the data processing request to the back-end server corresponding to the back-end service for corresponding processing, or send the data processing request to the preset disaster recovery processing module corresponding to the back-end service for corresponding processing.

[0068] Specifically, for example, if the target diversion ratio is large, there is a relatively high probability that the data processing request will be sent to the preset disaster recovery processing module to use static business data for emergency processing. On the contrary, if the target diversion ratio is small, there is a relatively high probability that the data processing request will be sent to the backend server for normal processing.

[0069] The front-end server receives the processing result fed back by the back-end server or the preset disaster recovery processing module, and then feeds back the processing result to the terminal device.

[0070] The terminal device displays the processing results to the user.

[0071] Based on the above system, when an abnormality occurs in the backend server, data processing requests can be intelligently and reasonably diverted, and the preset disaster recovery processing module and the backend server can be used to respond to data processing requests and complete the corresponding data processing. This can effectively avoid the technical problems of rough processing using service fuses like the existing method, which leads to imprecise processing and poor user experience.

[0072] See also Figure 2 As shown, the embodiment of this specification provides a data processing method. Among them, the method is specifically applied to the server side. When implemented specifically, the method may include the following contents.

[0073] S201: receiving a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service.

[0074] In this embodiment, the terminal device can receive and respond to the corresponding operation of the user, generate and send a corresponding data processing request to the server. Among them, the above-mentioned data processing request can specifically be a transaction data processing request, for example, an order query request, an order payment request, an account balance query request, etc. Of course, it should be noted that the data processing requests listed above are only a schematic description. During specific implementation, according to the specific application scenario and processing needs, the above-mentioned data processing request may also include other types of data processing requests. For example, the above-mentioned data processing request may be a web page access request, an account login request, etc. This specification does not limit this.

[0075] In this embodiment, the above data processing request can be specifically used to request the corresponding back-end server to perform relevant data processing to provide corresponding back-end services.

[0076] In this embodiment, the data processing request may also carry a URL (Uniform Resource Locator) address parameter related to the requested backend service. The URL address parameter may be used to determine the specific backend service requested by the data processing request and the backend server providing the backend service.

[0077] S202: Query the switch status of the current disaster recovery processing mode.

[0078] In this embodiment, the above-mentioned disaster recovery processing mode can be specifically understood as an emergency data processing mode that is triggered only when an abnormality occurs in the backend server and the degree of the abnormality is relatively serious.

[0079] Specifically, under normal circumstances, the switch state of the disaster recovery processing mode is closed, and the data processing requests received by the server will be sent to the corresponding back-end server for processing. When an abnormality occurs in the back-end service, and the abnormality ratio is high, for example, higher than a preset abnormality ratio threshold, the switch state of the disaster recovery processing mode will be turned on. At this time, the server will intelligently divert the received data processing requests according to the specific status of the back-end server, and send part of the data processing requests to the back-end server for processing according to the matching target diversion ratio, and send the other part of the data processing requests to the corresponding preset disaster recovery processing module for processing, that is, the service degradation method is used to reasonably process the received data processing requests.

[0080] The preset disaster recovery processing module may store static business data related to the backend service in advance. When the preset disaster recovery processing module receives a data processing request diverted from the server, it may respond to the data processing request and perform data processing using the stored static business data to generate and feed back relevant data results to the user in a timely manner.

[0081] In one embodiment, the query of the switch status of the current disaster recovery processing mode may include the following contents when implemented: querying the preset shared memory to obtain the current switch identifier; and determining the switch status of the current disaster recovery processing mode according to the current switch identifier.

[0082] The switch identifier is used to indicate whether the current disaster recovery processing mode is in an on state or an off state.

[0083] In one embodiment, the preset shared memory may specifically include Nginx shared memory. The Nginx may specifically be understood as an open source Web server known for high performance and high concurrency, supporting HTTP (HyperTextTransfer Protocol) reverse proxy, TCP (Transmission Control Protocol) proxy, load balancing, HTTP cache, Web development, etc.

[0084] S203: When it is found that the switch state of the current disaster recovery processing mode is on, query the preset shared memory to obtain the target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service.

[0085] In one embodiment, the preset shared memory also stores target diversion ratios corresponding to various URL address parameters, wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service.

[0086] Specifically, according to the preset disaster recovery rules, when the switch state of the disaster recovery processing mode is turned on, the larger the abnormal ratio parameter of the backend service, the larger the value of the target diversion ratio; accordingly, the data processing request will have a higher probability of being reflowed to the preset disaster recovery processing module for processing. On the contrary, the smaller the abnormal ratio parameter of the backend server, the smaller the value of the target diversion ratio; accordingly, the data processing request will have a lower probability of being reflowed to the preset disaster recovery processing module for processing.

[0087] S204: According to the target diversion ratio, the data processing request is sent to the back-end server corresponding to the back-end service, or the preset disaster recovery processing module corresponding to the back-end service performs corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the back-end service.

[0088] In this embodiment, during specific implementation, the server can divert the data processing request to the corresponding processing end (backend server or preset disaster recovery processing module) for processing according to the target diversion ratio.

[0089] Specifically, for example, when a batch data processing request is currently received, the server can randomly select data processing requests that meet the target diversion ratio from the batch data processing requests and send them to a preset disaster recovery processing module for processing, and send the remaining data processing requests to the back-end server for processing.

[0090] For another example, if a single data processing request is currently received, the server may randomly send the data processing request to a backend server or a preset disaster recovery processing module for processing according to a target diversion ratio.

[0091] After receiving the above data processing request, the back-end server can process the data processing request online, generate and feed back the corresponding processing result to the server.

[0092] After receiving the above data processing request, the preset disaster recovery processing module can use the pre-stored static business data to process the data processing request, generate and feed back the corresponding processing result to the server.

[0093] S205: Send the processing result to the terminal device.

[0094] In this embodiment, after receiving the processing result fed back from the back-end server or the preset disaster recovery processing module, the server can send the processing result to the terminal device. Correspondingly, the terminal device can display the processing result to the user.

[0095] In this embodiment, after receiving a data processing request carrying a URL address parameter related to a backend service, the server first queries the switch state of the current disaster recovery processing mode. When it is determined to be in the on state, the preset shared memory can be queried to obtain a target diversion ratio that matches the URL address parameter, wherein the above target diversion ratio is updated regularly; the server can divert the data processing request to the backend server according to the above target diversion ratio, or the preset disaster recovery processing module corresponding to the backend service that pre-stores static business data related to the backend service for corresponding processing. Thus, in the case of an abnormality in the backend server, the data processing request can be intelligently and reasonably diverted, and the preset disaster recovery processing module and the backend server can be used in a sophisticated manner to respond to the data processing request, so as to better complete the corresponding data processing and improve the user experience.

[0096] In one embodiment, after querying the switch status of the current disaster recovery processing mode, the method may also include the following contents when it is implemented: when it is queried that the switch status of the current disaster recovery processing mode is off, the data processing request is sent to the back-end server corresponding to the back-end service for corresponding processing.

[0097] In one embodiment, after the data processing request is sent to the back-end server corresponding to the back-end service for corresponding processing, the method may also include the following contents when it is implemented: detecting whether error information regarding the data processing request is received from the back-end server; if it is determined that error information is received from the back-end server, sending the data processing request to a preset disaster recovery processing module for corresponding processing.

[0098] In this embodiment, the above error message may be, for example, an error message in the form of "5xx" used to indicate an abnormality.

[0099] In this embodiment, the server can promptly discover a back-end server that has suddenly become abnormal and has not been discovered before through the above method, and then promptly forward the data processing request to the preset disaster recovery processing module for processing, so that the corresponding processing results can be generated and fed back to the user in a timely manner, thereby improving the user experience.

[0100] In one embodiment, the method may further include the following contents when it is implemented.

[0101] S1: At preset time intervals, periodically obtain the status log of the corresponding backend service according to the preset disaster recovery service list;

[0102] S2: Counting abnormal proportion parameters of the backend service according to the status log of the backend service;

[0103] S3: Determine the switch state of the disaster recovery processing mode according to the abnormal proportion parameter of the backend service and the preset disaster recovery rule.

[0104] In this embodiment, the preset disaster recovery service list may specifically include URL address parameters of the backend service that requires disaster recovery.

[0105] Before specific implementation, the server can display the disaster recovery parameter configuration interface to the user through the terminal device. The user can enter the corresponding setting parameters on the disaster recovery parameter configuration interface according to the specific application scenario, combined with the real-time requirements of each back-end service, the degree of importance and other factors. For example, the name, number, or URL address of the back-end service that needs disaster recovery. The server can receive the above setting parameters through the disaster recovery parameter configuration interface, and generate a corresponding preset disaster recovery service list according to the above setting parameters.

[0106] Furthermore, the server may store the preset disaster recovery service list in a preset shared memory. Accordingly, the server may subsequently obtain the preset disaster recovery service list by accessing the preset shared memory.

[0107] In this embodiment, the server can periodically obtain the status log of the corresponding backend service at preset time intervals according to the URL address parameters of the backend service included in the disaster recovery service list; and then, based on the status log of the above backend service, the abnormal proportion parameter of the backend service can be counted.

[0108] Further, the server can determine the switch state of the disaster recovery processing mode according to the abnormal proportion parameter of the back-end service and the preset disaster recovery rule. Specifically, a preset abnormal proportion threshold (for example, 5%) is determined according to the preset disaster recovery rule. Then the abnormal proportion parameter of the back-end service is compared with the preset abnormal proportion threshold to obtain a comparison result. According to the comparison result, when it is determined that the abnormal proportion parameter is greater than or equal to the preset abnormal proportion threshold, the switch state of the disaster recovery processing mode is determined to be the on state. According to the comparison result, when it is determined that the abnormal proportion parameter is less than the preset abnormal proportion threshold, the switch state of the disaster recovery processing mode is determined to be the off state.

[0109] In one embodiment, when the method is implemented, it may also include the following contents: when it is determined that the switch state of the disaster recovery processing mode is the on state, generating a switch identifier for indicating the on state; or, when it is determined that the switch state of the disaster recovery processing mode is the off state, generating a switch identifier for indicating the off state; storing the switch identifier in a preset shared memory; or, updating the switch identifier in the preset shared memory.

[0110] In this embodiment, if the switch identifier is not previously stored in the preset shared memory, the server may send and store the switch identifier in the preset shared memory to establish a new switch identifier. If the switch identifier is already stored in the preset shared memory, the server may update the existing switch identifier stored in the preset shared memory according to the switch identifier.

[0111] By storing the switch identifier in the preset shared memory, other servers can more efficiently determine the switch status of the current disaster recovery processing mode by querying the switch identifier stored in the preset shared memory.

[0112] In one embodiment, when it is determined that the switch state of the disaster recovery processing mode is on, after generating a switch identifier for indicating the on state, the method may also include the following contents when implemented: generating a matching target diversion ratio based on the abnormal proportion parameter of the back-end service and a preset disaster recovery rule; storing the matching target diversion ratio in a preset shared memory; or updating the target diversion ratio in the preset shared memory based on the matching target diversion ratio.

[0113] In this embodiment, after generating a switch identifier for indicating the on state, based on the preset disaster recovery rules, the server can estimate the overall health status of the back-end server according to the abnormal proportion parameters of the back-end service; and then predict the processing volume of data processing requests that the back-end server can currently support; and then based on the above processing volume, combined with factors such as the importance and real-time requirements of the back-end service, determine the target diversion ratio that matches the current health status of the back-end server.

[0114] Specifically, for example, when the abnormal proportion parameter of the back-end service is relatively small and the overall health of the back-end server is relatively good, the value of the matching target diversion ratio can be set to be relatively small. For example, the matching target diversion ratio can be set to 30%, which means that 30% of the data processing requests will be diverted to the preset disaster recovery processing module for processing, or, it means that there is a 30% probability that the data processing requests will be diverted to the preset disaster recovery processing module for processing.

[0115] When the abnormal ratio parameter of the backend service is relatively large and the overall health of the backend server is relatively poor, the value of the matching target diversion ratio can be set relatively large. For example, the matching target diversion ratio can be set to 80%, which means that 80% of the data processing requests will be diverted to the preset disaster recovery processing module for processing, or, it means that there is an 80% probability that the data processing requests will be diverted to the preset disaster recovery processing module for processing.

[0116] When the abnormal ratio parameter of the backend service is particularly large and the backend server as a whole is unable to support the processing of newly received data processing requests, the value of the above-mentioned matching target diversion ratio can be set to 100%, that is, it means that all received data processing requests will be diverted to the preset disaster recovery processing module for processing to avoid placing any more burden on the backend server.

[0117] Based on the above embodiment, by adjusting and setting the specific target diversion ratio according to the abnormal ratio parameters of the backend service, dynamic service degradation can be flexibly and intelligently implemented in combination with the overall health status of the backend server, so that the received data processing requests can be processed more finely.

[0118] In this embodiment, if the target diversion ratio is not previously stored in the preset shared memory, the server may send and store the above-mentioned matched target diversion ratio in the preset shared memory to establish a new target diversion ratio in the preset shared memory. If the target diversion ratio is already stored in the preset shared memory, the server may update the existing target diversion ratio stored in the preset shared memory according to the above-mentioned matched target diversion ratio.

[0119] In one embodiment, after the data processing request is sent to the preset disaster recovery processing module corresponding to the back-end service for corresponding processing, the method may also include the following contents when implemented: calling the built-in preset replication module to replicate the data processing request to obtain a simulation request; sending the simulation request to the back-end server corresponding to the back-end service for testing to trigger the collection of status parameters of the back-end server and generate a status log of the corresponding back-end service.

[0120] In one embodiment, the above-mentioned state parameter may specifically include an average value of (backend server) response time.

[0121] In the embodiment, when the switch state of the disaster recovery processing mode is turned on, the data processing request to the corresponding backend server is reduced or stopped. In order to timely understand the recovery status of the backend server, the above method can also be used to generate corresponding simulated requests according to the real data processing request, and send the above simulated request to the backend server for status testing, so as to more realistically simulate the scene when the backend server processes the data processing request in the current recovery status. In this way, the state parameters with relatively higher reference value can be collected to generate the status log of the backend service, and the switch state of the current disaster recovery processing mode can be more accurately judged according to the state parameters recorded in the status log of the backend service.

[0122] In one embodiment, the built-in preset replication module may specifically include: ngx_http_mirror_module module.

[0123] In one embodiment, during implementation, the server may generate a mirror request for the data processing request by calling the ngx_http_mirror_module module as the simulation request.

[0124] In this embodiment, by using the ngx_http_mirror_module module to generate simulated requests, it is not necessary to introduce other third-party modules, and it is not necessary to spend time and resources to monitor and manage the other third-party modules, thereby reducing processing costs and improving overall processing efficiency.

[0125] In one embodiment, the calling of the built-in preset copy module to copy the data processing request to obtain a simulated request may include the following contents during specific implementation: detecting the type of the data processing request; wherein the type of the data processing request includes a user request and a crawler request; and when it is determined that the data processing request is a user request, calling the built-in preset copy module to copy the data processing request to obtain a simulated request.

[0126] In this embodiment, during specific implementation, it can be detected whether the data processing request carries a preset tag field to determine whether the data processing request is a crawler request.

[0127] In this embodiment, the crawler request and the user request can be distinguished by the above method, and only the user request of more concern is copied to generate a simulated request to be sent to the back-end server, which can make the status test of the back-end server more targeted, and the status log of the back-end service obtained later is more valuable for reference. By the above method, the processing pressure of the back-end server can be reduced, the interference of non-real user requests on problem location can be reduced, and the processing efficiency can be improved.

[0128] In one embodiment, when the switch state of the current disaster recovery processing mode is on, the server diverts the received data processing request according to the target diversion ratio. At the same time, the server can also obtain the status log of the corresponding back-end service according to the preset disaster recovery service list at every preset time interval; according to the status log of the back-end service, count the abnormal proportion parameters of the back-end service; and determine the switch state of the disaster recovery processing mode according to the abnormal proportion parameters of the back-end service and the preset disaster recovery rules.

[0129] Specifically, for example, when the server compares the latest abnormality ratio parameter of the backend service with the preset abnormality ratio threshold according to the preset disaster recovery rule, it is found that the abnormality ratio parameter is already less than the preset abnormality ratio threshold, and the switch state of the disaster recovery processing mode can be determined to be the closed state. Then, a closed flag for indicating the closed state can be generated, and the switch flag stored in the preset shared memory can be updated according to the closed flag, so that the switch state of the current disaster recovery processing mode is updated to the closed state.

[0130] As can be seen from the above, the data processing method provided by the embodiment of this specification, after receiving the data processing request carrying the URL address parameter related to the back-end service, the server first queries the switch state of the current disaster recovery processing mode, and when it is determined to be in the on state, the preset shared memory can be queried to obtain the target diversion ratio that matches the URL address parameter, wherein the above target diversion ratio is updated regularly; the server can divert the data processing request to the back-end server according to the above target diversion ratio, or the preset disaster recovery processing module corresponding to the back-end service that pre-stores the static business data related to the back-end service for corresponding processing. Thus, in the case of an abnormality in the back-end server, the data processing request can be intelligently and reasonably diverted, and the preset disaster recovery processing module and the back-end server can be finely used to respond to the data processing request, complete the corresponding data processing, and improve the user experience. It solves the technical problem that the existing method does not process the data processing request finely when the back-end server is abnormal, which affects the user experience. After sending the data processing request to the preset disaster recovery processing module corresponding to the back-end service for corresponding processing, the built-in preset replication module is called to replicate the data processing request to obtain a simulation request; the simulation request is then sent to the back-end server corresponding to the back-end service for testing to trigger the collection of status parameters of the back-end server and generate a corresponding status log of the back-end service; and subsequently, the latest health status of the back-end server can be determined in a timely and accurate manner based on the status log of the back-end service obtained at a regular interval, so as to intelligently make targeted adjustments to the switch status and target diversion ratio of the disaster recovery processing mode to improve the processing effect.

[0131] The embodiment of the present specification also provides a server, including a processor and a memory for storing processor executable instructions, and the processor can perform the following steps according to the instructions when it is implemented: receiving a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service; querying the switch state of the current disaster recovery processing mode; when it is found that the switch state of the current disaster recovery processing mode is on, querying the preset shared memory to obtain a target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service; according to the target diversion ratio, sending the data processing request to the backend server corresponding to the backend service, or, to the preset disaster recovery processing module corresponding to the backend service for corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service; and sending the processing result to the terminal device.

[0132] In order to complete the above instructions more accurately, refer to Figure 3 As shown, the embodiment of this specification also provides another specific server, wherein the server includes a network communication port 301, a processor 302 and a memory 303, and the above structures are connected through internal cables so that each structure can perform specific data interaction.

[0133] The network communication port 301 may be specifically used to receive a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service.

[0134] The processor 302 can be specifically used to query the switch state of the current disaster recovery processing mode; when it is found that the switch state of the current disaster recovery processing mode is on, query the preset shared memory to obtain the target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the back-end service; according to the target diversion ratio, send the data processing request to the back-end server corresponding to the back-end service, or, the preset disaster recovery processing module corresponding to the back-end service performs corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the back-end service; and send the processing result to the terminal device.

[0135] The memory 303 may be specifically used to store corresponding instruction programs.

[0136] In this embodiment, the network communication port 301 can be a virtual port that is bound to different communication protocols so that different data can be sent or received. For example, the network communication port can be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for email data communication. In addition, the network communication port can also be a physical communication interface or communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

[0137] In this embodiment, the processor 302 may be implemented in any appropriate manner. For example, the processor may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) executable by the (micro)processor, a logic gate, a switch, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, etc. This specification does not limit this.

[0138] In this embodiment, the memory 303 may include multiple levels. In a digital system, anything that can store binary data can be a memory; in an integrated circuit, a circuit with a storage function but no physical form is also called a memory, such as RAM, FIFO, etc.; in a system, a storage device with a physical form is also called a memory, such as a memory stick, TF card, etc.

[0139] The embodiment of the present specification also provides a computer storage medium based on the above-mentioned data processing method, wherein the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the following are achieved: receiving a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service; querying the switch state of the current disaster recovery processing mode; when it is found that the switch state of the current disaster recovery processing mode is on, querying the preset shared memory to obtain a target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service; according to the target diversion ratio, sending the data processing request to the backend server corresponding to the backend service, or, to the preset disaster recovery processing module corresponding to the backend service for corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service; and sending the processing result to the terminal device.

[0140] In this embodiment, the storage medium includes, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a cache, a hard disk (HDD), or a memory card. The memory may be used to store computer program instructions. The network communication unit may be an interface for network connection communication set in accordance with the standard specified by the communication protocol.

[0141] In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other implementations and will not be described in detail here.

[0142] See also Figure 4 As shown, at the software level, the embodiments of this specification also provide a data processing device, which may specifically include the following structural modules.

[0143] The receiving module 401 may be specifically configured to receive a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service;

[0144] The first query module 402 may be used to query the switch status of the current disaster recovery processing mode;

[0145] The second query module 403 may be specifically configured to query a preset shared memory to obtain a target diversion ratio that matches the URL address parameter when it is found that the switch state of the current disaster recovery processing mode is turned on; wherein the target diversion ratio is updated regularly according to an abnormal ratio parameter of the backend service;

[0146] The processing module 404 may be specifically configured to send the data processing request to a backend server corresponding to the backend service, or to a preset disaster recovery processing module corresponding to the backend service for corresponding processing according to the target diversion ratio, so as to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service;

[0147] The feedback module 405 may be specifically configured to send the processing result to the terminal device.

[0148] It should be noted that the units, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. For the convenience of description, the above devices are described separately by functions divided into various modules. Of course, when implementing this specification, the functions of each module can be implemented in the same or more software and / or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0149] As can be seen from the above, the data processing device provided in the embodiment of this specification can intelligently and reasonably divert data processing requests when an abnormality occurs in the back-end server, and can finely utilize the preset disaster recovery processing module and the back-end server to respond to data processing requests, complete the corresponding data processing, and improve the user experience.

[0150] In a specific scenario example, the data processing method provided in this specification can be applied to perform disaster recovery processing on user requests.

[0151] Specifically, in this scenario example, a static disaster recovery intelligent management system is established. Figure 5 As shown, the system includes four modules, namely, reverse proxy module, management analysis module, log analysis module, and disaster recovery cache module.

[0152] The reverse proxy module is responsible for diverting user requests (eg, data processing requests) and determining whether to send the user requests to a backend server or to a static disaster recovery system.

[0153] See also Figure 6 As shown, when a user request (e.g., a data processing request) is received, the processing flow when the above reverse proxy module is applied may include the following contents:

[0154] 1. Determine the switch status of the static disaster recovery system (for example, the switch status of the disaster recovery processing mode, which can be referred to as the disaster recovery switch);

[0155] 2. If the switch status is "on" and the user request URL has been configured with disaster recovery status, it is determined to provide disaster recovery services; according to the parameters, part of the request may be proxied to the disaster recovery cache module (for example, the preset disaster recovery processing module) for processing;

[0156] 3. If the switch status is "on", but the user request URL is not configured with disaster recovery status, the reverse proxy is sent to the backend server for processing;

[0157] 4. If the switch status is "off", but the backend server returns a result such as a 5xx error, some requests can be reverse proxied to the disaster recovery cache module according to the parameters;

[0158] 5. If the switch status is "off" and the backend server returns a normal result, the result can be returned to the user.

[0159] The above management and analysis module can be specifically understood as a core module for realizing intelligent management of static disaster recovery. By means of scheduled tasks, the proportion parameters (for example, target diversion ratio) of the disaster recovery service are updated to realize the function of service degradation / recovery.

[0160] See also Figure 7 As shown, the processing flow when applying the above management analysis module may include the following contents when it is implemented:

[0161] 1. Read the disaster recovery resource list, that is, the disaster recovery URL service list (for example, the preset disaster recovery service list), and process them one by one;

[0162] 2. Obtain abnormal proportion data through the log analysis system. Specifically, the abnormal percentage data (such as slow response or error response) of the corresponding URL service can be obtained (for example, the abnormal proportion parameter of the backend service);

[0163] 3. Send a request to modify the Nginx shared memory in the reverse proxy module, and pass in the abnormal percentage data as a parameter. For example, p=30 means that 30% of the services are abnormal, and 30% of the requests need to be reverse proxied to the disaster recovery system. This allows the reverse proxy module parameters to be updated.

[0164] The data processing is terminated until it is determined that the list has been processed; if the list has not been processed, the abnormal proportion data is continued to be obtained.

[0165] In actual applications, the upper and lower exception thresholds will be configured according to actual business requirements. When the exception percentage data is lower than the lower threshold (for example, 5%), the backend service is considered normal and static disaster recovery processing is closed; when the exception percentage is higher than the upper threshold (for example, 80%), the backend service is considered to be unable to provide a response, and all user requests are sent to the static disaster recovery system for processing.

[0166] The log analysis module is responsible for the unified collection, centralized management and analysis of access logs (e.g., status logs of backend services), and its function is to monitor the real-time status of URL services, such as the average value of response time (a status parameter), tp90, tp99, etc. Specifically, for example, tp99 is generally used to reflect the responsiveness of the service, that is, 99% of the requests can be responded to within this time point.

[0167] The above-mentioned disaster recovery cache module is used to store cache data. When a user requests to enter the disaster recovery cache module, it means that there is an abnormal state in the backend service and the static disaster recovery system is in the enabled state.

[0168] In order to maintain real traffic for the backend service and facilitate the R&D team to locate and handle problems, it is necessary to copy the user's request and send it back to the backend service. In actual applications, in order to reduce the number of maintenance components, you can use Nginx's ngx_http_mirror_module module (for example, the built-in preset copy module) to achieve high-fidelity simulation of user requests through simple configuration.

[0169] Note that the requests entering the disaster recovery cache module include client requests (for example, user requests) and crawler requests. Only the client requests need to be copied and sent to the backend service, so a certain method is needed to distinguish the two types of requests.

[0170] Among them, the configuration of the ngx_http_mirror_module module can be divided into two parts, namely source address configuration and mirror address configuration. The settings of key configurations can refer to the following content.

[0171] Source address configuration:

[0172]

[0173] Mirror address configuration:

[0174]

[0175] In addition, in this scenario example, the relevant software used in the specific implementation can be found in Table 1.

[0176] Table 1

[0177] operating system CentOS 7.4 Web Server Nginx 1.13.4 Lua Just-in-time Compiler LuaJIT-2.1.0-beta3 Nginx third-party modules lua-nginx-module Nginx modules ngx_http_mirror_module

[0178] Through the above scenario examples, it is verified that the intelligent management system for static disaster recovery constructed based on the data processing method provided in this specification can provide a unified and intelligent static disaster recovery management solution to solve the two key problems of service degradation and recovery. Specifically, first, the module composition and sub-module responsibilities of the above-mentioned static disaster recovery intelligent management system: the static disaster recovery intelligent management system proposed in this solution is divided into 4 system modules with clear responsibilities, high cohesion and low coupling, realizing a static disaster recovery system management solution with intelligent degradation and recovery. Secondly, after switching to static disaster recovery, a solution to maintain the authenticity and credibility of service health monitoring: this solution proposes to implement request mirror replication based on the Nginx module, without increasing the complexity of the system composition, to achieve high-fidelity replication of user requests, maintain backend service traffic, and make the health monitoring after switching to static disaster recovery still authentic and credible. In addition, a technical solution for fine-tuning service degradation / recovery: this solution proposes to update the Nginx shared memory parameters based on the service abnormality percentage, combined with the upper / lower limit threshold of the business, to achieve service degradation and recovery at the level of user request quantity, and provide a solution for fine-tuning the management of static disaster recovery system.

[0179] Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent a unique execution order. When the device or client product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. The first, second, etc. words are used to represent the name, and do not represent any particular order.

[0180] Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code, the controller can be made to implement the same function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the devices for implementing various functions included therein can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.

[0181] 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, classes, 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.

[0182] Through the description of the above embodiments, it can be known that those skilled in the art can clearly understand that the present specification can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present specification can essentially be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a mobile terminal, a server, or a network device, etc.) to execute the methods described in each embodiment of the present specification or some parts of the embodiments.

[0183] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc.

[0184] Although the present specification is described through embodiments, those skilled in the art will appreciate that there are many modifications and changes to the present specification without departing from the spirit of the present specification, and it is intended that the appended claims include these modifications and changes without departing from the spirit of the present specification.

Claims

1. A data processing method, It is characterized in that include: Receiving a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service; Query the current switch status of the disaster recovery processing mode; When it is found that the switch state of the current disaster recovery processing mode is turned on, query the preset shared memory to obtain the target diversion ratio that matches the URL address parameter; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service; According to the target diversion ratio, the data processing request is sent to a backend server corresponding to the backend service, or a preset disaster recovery processing module corresponding to the backend service for corresponding processing to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service; Sending the processing result to the terminal device; After sending the data processing request to the preset disaster recovery processing module corresponding to the back-end service for corresponding processing, the method also includes: calling the built-in preset replication module to replicate the data processing request to obtain a simulation request; sending the simulation request to the back-end server corresponding to the back-end service for testing to trigger the collection of status parameters of the back-end server and generate a status log of the corresponding back-end service; and judging the switch status of the current disaster recovery processing mode according to the status parameters recorded in the back-end service status log, the status parameters including the average value of the response time.

2. The method according to claim 1, It is characterized in that After querying the switch status of the current disaster recovery processing mode, the method further includes: When it is found that the switch state of the current disaster recovery processing mode is closed, the data processing request is sent to the backend server corresponding to the backend service for corresponding processing.

3. The method according to claim 2, It is characterized in that After sending the data processing request to a backend server corresponding to the backend service for corresponding processing, the method further includes: Detecting whether error information regarding the data processing request fed back by the back-end server is received; When it is determined that the error message fed back by the back-end server is received, the data processing request is sent to a preset disaster recovery processing module for corresponding processing.

4. The method according to claim 1, It is characterized in that The preset shared memory includes Nginx shared memory.

5. The method according to claim 2, It is characterized in that The method further comprises: At preset time intervals, regularly obtain the status log of the corresponding backend service according to the preset disaster recovery service list; According to the status log of the backend service, the abnormal proportion parameter of the backend service is counted; The switch state of the disaster recovery processing mode is determined according to the abnormal proportion parameter of the backend service and the preset disaster recovery rule.

6. The method according to claim 5, It is characterized in that The method further comprises: When it is determined that the switch state of the disaster recovery processing mode is in the on state, a switch identifier for indicating the on state is generated; or when it is determined that the switch state of the disaster recovery processing mode is in the off state, a switch identifier for indicating the off state is generated; The switch identifier is stored in a preset shared memory; or the switch identifier in the preset shared memory is updated.

7. The method according to claim 6, It is characterized in that The querying of the switch status of the current disaster recovery processing mode includes: Query the preset shared memory to obtain the current switch identifier; The switch state of the current disaster recovery processing mode is determined according to the current switch identifier.

8. The method according to claim 6, It is characterized in that When it is determined that the switch state of the disaster recovery processing mode is the on state, after generating a switch identifier for indicating the on state, the method further includes: Generate a matching target diversion ratio according to the abnormal ratio parameter of the backend service and the preset disaster recovery rule; The matched target diversion ratio is stored in a preset shared memory; or the matched target diversion ratio is updated in the preset shared memory according to the matched target diversion ratio.

9. The method according to claim 1, It is characterized in that The built-in preset replication module includes: ngx_http_mirror_module module.

10. The method according to claim 1, It is characterized in that The calling of the built-in preset copy module to copy the data processing request to obtain a simulation request includes: Detecting the type of the data processing request; wherein the type of the data processing request includes a user request and a crawler request; When it is determined that the data processing request is a user request, a built-in preset copy module is called to copy the data processing request to obtain a simulated request.

11. A data processing device, It is characterized in that include: A receiving module, used to receive a data processing request sent by a terminal device; wherein the data processing request carries a URL address parameter related to the requested backend service; The first query module is used to query the switch status of the current disaster recovery processing mode; The second query module is used to query the preset shared memory to obtain the target diversion ratio matching the URL address parameter when the switch state of the current disaster recovery processing mode is found to be on; wherein the target diversion ratio is updated regularly according to the abnormal ratio parameter of the backend service; A processing module, configured to send the data processing request to a backend server corresponding to the backend service, or a preset disaster recovery processing module corresponding to the backend service, for corresponding processing according to the target diversion ratio, so as to obtain a corresponding processing result; wherein the preset disaster recovery processing module pre-stores static business data related to the backend service; A feedback module, used for sending the processing result to the terminal device; After sending the data processing request to the preset disaster recovery processing module corresponding to the back-end service for corresponding processing, the device is also used to: call the built-in preset replication module to replicate the data processing request to obtain a simulation request; send the simulation request to the back-end server corresponding to the back-end service for testing to trigger the collection of status parameters of the back-end server and generate a status log of the corresponding back-end service; and determine the switch state of the current disaster recovery processing mode according to the status parameters recorded in the back-end service status log, the status parameters including the average value of the response time.

12. A server, It is characterized in that The invention comprises a processor and a memory for storing instructions executable by the processor, wherein the steps of the method according to any one of claims 1 to 10 are implemented when the processor executes the instructions.

13. A computer-readable storage medium, It is characterized in that Computer instructions are stored thereon, and when the instructions are executed, the steps of the method according to any one of claims 1 to 10 are implemented.