Rule configuration method and device and computer equipment

By obtaining and verifying the configuration rules of the target business in the first server, testing them in the second server to ensure the correctness of the rules, and then issuing the rules in the multi-active data center, the problem of incorrect rules in the existing technology is solved. The problem caused by the low success rate of business request execution has been achieved, and the effect of improving the success rate of business requests has been achieved.

CN119363591APending Publication Date: 2025-01-24BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411514046.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Existing rule configuration method If the target configuration rule is incorrect, the target gateway processes business requests based on the wrong rules, resulting in a low execution success rate.

Method used

Obtain the target configuration rules of the target service in the first server, determine the target data center, and deliver the rules to the data center. Then, send a test request to the second server to verify the correctness of the target configuration rules. If the test passes, the rules will be distributed to other data centers.

Benefits of technology

By verifying the correctness of the target configuration rules, the target gateway under the remaining data centers can handle business requests according to the correct rules and improve the success rate of business requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119363591A_ABST
    Figure CN119363591A_ABST
Patent Text Reader

Abstract

The invention relates to a rule configuration method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a target configuration rule of a target service; determining a target data center in the data centers, and issuing the target configuration rule to the target data center; sending a test request for the target configuration rule to a second server, and receiving a test result corresponding to the test request; and if the test result is that the test is passed, issuing the target configuration rule to other data centers in the data centers. By adopting the method, the execution success rate of the service request can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, and in particular to a rule configuration method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Multi-active data centers are multiple data centers deployed in different regions. By deploying a gateway in each data sub-center in each data center, the gateway forwards, filters, and performs address conversion operations on business requests according to the configuration rules, thereby ensuring the reliability of business requests entering the data sub-center. When the business changes or when the business is initialized, the configuration rules need to be sent to the gateway corresponding to the business through the rule configuration method, thereby completing the rule configuration of the gateway configuration rules.

[0003] In the current rule configuration method, the first server obtains the target configuration rules of the target business and sends the target configuration rules to the configuration center of each data center. The target gateway in each data center obtains the target configuration rules from the configuration center corresponding to the data center, and updates the original configuration rules of the target gateway based on the target configuration rules to complete the rule configuration of the target gateway.

[0004] However, in the current rule configuration method, if the target configuration rule is wrong, the target gateway processes the service request based on the wrong target configuration rule, which will cause execution errors of the target gateway and make the execution success rate of the service request low. Summary of the invention

[0005] Based on this, it is necessary to provide a rule configuration method, apparatus, computer device, computer-readable storage medium and computer program product to address the above technical issues.

[0006] In a first aspect, the present application provides a rule configuration method, which is applied to a first server and includes:

[0007] Obtain target configuration rules for target business;

[0008] Determine a target data center among the data centers, and send the target configuration rule to the target data center;

[0009] Sending a test request for the target configuration rule to the second server, and receiving a test result corresponding to the test request;

[0010] If the test result is that the test passes, the target configuration rule is sent to the remaining data centers in each of the data centers.

[0011] In one embodiment, sending a test request for the target configuration rule to the second server and receiving a test result corresponding to the test request includes:

[0012] Constructing a test request for the target configuration rule according to a target data center identifier of the target data center and a target business identifier of the target business;

[0013] Sending a test request of the target configuration rule to the second server; the test request is used to enable the second server to test whether the target configuration rule is correct and obtain a test result;

[0014] Receive a test result corresponding to the test request sent by the second server.

[0015] In one embodiment, determining a target data center among the data centers and sending the target configuration rule to the target data center includes:

[0016] Obtaining the traffic ratio of each data center, and determining the data center with the lowest traffic ratio among the data centers as the target data center;

[0017] Sending the target configuration rule to a target configuration center in the target data center;

[0018] The target configuration center sends the target configuration rule to the target gateway corresponding to the target service.

[0019] In one embodiment, the sending the target configuration rule to the remaining data centers in each of the data centers includes:

[0020] Send the target configuration rules in the first server to the remaining data centers in each of the data centers, or send a transmission instruction of the target configuration rules to the target data center, so that the target data center sends the target configuration rules to the remaining data centers according to the transmission instruction.

[0021] In a second aspect, the present application provides a rule configuration method, which is applied to a second server, and the method includes:

[0022] Receive a test request for a target configuration rule sent by the first server, and construct a target test request set corresponding to the target business;

[0023] Based on the target test request set, the target configuration rule configured in the target data center is tested to obtain a test result, and the test result is sent to the first server.

[0024] In one embodiment, the target configuration rule configured in the target data center is tested based on the target test request set to obtain the test result, including:

[0025] Determine a target data center corresponding to the target data center identifier in the test request;

[0026] Sending the target test request set to the target gateway corresponding to the target business in the target data center;

[0027] Receive a processing result set corresponding to the target test request returned by the target gateway, and determine a test result based on the processing result set; the processing result set is obtained by the target gateway processing the target test request set based on the target configuration rule.

[0028] In one embodiment, determining the test result based on the processing result set includes:

[0029] Determine whether the number of results of the processing results in the processing result set is the same as the number of target test requests in the target test request set;

[0030] In the case where the number of results is the same as the number of requests, determining whether each of the processing results satisfies a preset processing result condition;

[0031] When all the processing results satisfy the processing result condition, it is determined that the test result corresponding to the target configuration rule is a test pass.

[0032] In a third aspect, the present application also provides a rule configuration device, including:

[0033] An acquisition module, used to acquire target configuration rules for a target business;

[0034] A determination module, used to determine a target data center among the data centers, and send the target configuration rule to the target data center;

[0035] A first sending module, used to send a test request for the target configuration rule to the second server, and receive a test result corresponding to the test request;

[0036] The second sending module is used to send the target configuration rule to the remaining data centers in each of the data centers if the test result is that the test passes.

[0037] In a fourth aspect, the present application also provides a rule configuration device, including:

[0038] A construction module, configured to receive a test request for a target configuration rule sent by the first server, and to construct a target test request set corresponding to the target service;

[0039] The test module is used to test the target configuration rules configured in the target data center based on the target test request set, obtain the test results, and send the test results to the first server.

[0040] In a fifth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0041] Obtain target configuration rules for target business;

[0042] Determine a target data center among the data centers, and send the target configuration rule to the target data center;

[0043] Sending a test request for the target configuration rule to the second server, and receiving a test result corresponding to the test request;

[0044] If the test result is that the test passes, the target configuration rule is sent to the remaining data centers in each of the data centers.

[0045] In a sixth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0046] Receive a test request for a target configuration rule sent by the first server, and construct a target test request set corresponding to the target business;

[0047] Based on the target test request set, the target configuration rule configured in the target data center is tested to obtain a test result, and the test result is sent to the first server.

[0048] In a seventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0049] Obtain target configuration rules for target business;

[0050] Determine a target data center among the data centers, and send the target configuration rule to the target data center;

[0051] Sending a test request for the target configuration rule to the second server, and receiving a test result corresponding to the test request;

[0052] If the test result is that the test passes, the target configuration rule is sent to the remaining data centers in each of the data centers.

[0053] In an eighth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0054] Receive a test request for a target configuration rule sent by the first server, and construct a target test request set corresponding to the target business;

[0055] Based on the target test request set, the target configuration rule configured in the target data center is tested to obtain a test result, and the test result is sent to the first server.

[0056] In a ninth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0057] Obtain target configuration rules for target business;

[0058] Determine a target data center among the data centers, and send the target configuration rule to the target data center;

[0059] Sending a test request for the target configuration rule to the second server, and receiving a test result corresponding to the test request;

[0060] If the test result is that the test passes, the target configuration rule is sent to the remaining data centers in each of the data centers.

[0061] In a tenth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0062] Receive a test request for a target configuration rule sent by the first server, and construct a target test request set corresponding to the target business;

[0063] Based on the target test request set, the target configuration rule configured in the target data center is tested to obtain a test result, and the test result is sent to the first server.

[0064] The above-mentioned rule configuration method, device, computer equipment, computer-readable storage medium and computer program product obtain the target configuration rule of the target business; determine the target data center in each data center, and send the target configuration rule to the target data center; send a test request for the target configuration rule to the second server, and receive the test result corresponding to the test request; if the test result is that the test passes, send the target configuration rule to the remaining data centers in each of the data centers. With this method, by sending a test request to the second server, the second server tests whether the target configuration rule configured on the target data center is correct according to the test request, obtains the test result, and when the test result indicates that the target configuration rule is correct, sends the correct target configuration rule to the remaining data centers, ensuring that the target gateways under the remaining data centers can normally process the target business request according to the correct target configuration rule, thereby improving the execution success rate of the business request. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0066] Figure 1 An application environment diagram of a rule configuration method in an embodiment;

[0067] Figure 2 A schematic diagram of a flow chart of a rule configuration method in an embodiment;

[0068] Figure 3 A schematic diagram of a process of sending a test request in one embodiment;

[0069] Figure 4 A schematic diagram of a process of sending a target configuration rule to a target data center in one embodiment;

[0070] Figure 5 A schematic diagram of a flow chart of a rule configuration method in another embodiment;

[0071] Figure 6 A schematic diagram of a process for determining a test result based on a target test request set in one embodiment;

[0072] Figure 7 A schematic diagram of a process for determining a test result based on a processing result set in one embodiment;

[0073] Figure 8is an application environment diagram of a rule configuration method in an exemplary embodiment;

[0074] Fig. 9 A schematic diagram of an architecture for sending configuration rules in different modes in an embodiment;

[0075] Fig.10 A structural block diagram of a rule configuration device in an embodiment;

[0076] Fig.11 It is a structural block diagram of a rule configuration device in another embodiment;

[0077] FIG. 12 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0078] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0079] The rule configuration method provided in the embodiment of the present application can be applied to Figure 1 In the rule configuration system 100 shown. The rule configuration system 100 includes a first server 110, a second server 120 and a multi-active data center 130. Among them, the first server 110 is used to manage the configuration rules of each gateway in the multi-active data center 130. The second server 120 is used to test the target configuration rules. The multi-active data center 130 includes multiple data centers 131 deployed in different regions. Each data center 131 includes each data sub-center 131a and a configuration center 131b (which can also be a registration center). Each data sub-center 131a includes multiple processing devices to process business requests for the same business. In order to ensure the reliability of business requests entering the data sub-center 131a, a gateway is deployed in each data sub-center. The configuration center 131b is a medium for maintaining the data center. The configuration center 131b is used to accurately send the configuration rules to the gateway corresponding to the data sub-center. And multiple data sub-centers 131a will be classified into business domains of different business types according to different business types. That is, there will be multiple data sub-centers 131a processing different businesses under the same business domain. A business domain is used to process services of a business type.

[0080] The processing equipment of the data sub-center 131a includes but is not limited to various personal computers, laptops, smart phones, tablet computers, servers and databases. The configuration center 131b is a tool or service running on a server for managing and storing system configurations. The main function of the configuration center 131b is to centrally manage and maintain the configuration parameters of various systems, applications and services to ensure the consistency, maintainability and scalability of the system. Among them, the first server 110, the second server 120, the configuration center 131b and the servers in the data sub-center 131a can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers, or they can be cloud servers that provide cloud computing services.

[0081] In an exemplary embodiment, Figure 2 As shown, a rule configuration method is provided, which is applied to Figure 1 The first server 110 (hereinafter, the reference numeral is omitted, referred to as the first server) in the embodiment is used as an example to illustrate the method, which includes the following steps 202 to 208. Among them:

[0082] Step 202: Obtain target configuration rules for the target service.

[0083] The target configuration rule is a rule for a target gateway corresponding to a target service to process a target service request of the target service.

[0084] In implementation, the first server determines the updated or newly launched service as the target service. The first server determines the service information updated by the target service, and configures the target configuration rule according to the service information.

[0085] Specifically, if the target business is an updated business, the first server obtains the update information of the updated target business, and queries the business configuration rules of the target business in each configuration rule based on the target business identifier of the target business. Then, the first server updates the business configuration rules of the target business according to the update information of the target business to obtain the target configuration rules. If the target business is a newly launched business, the first server obtains the full business information of the target business and obtains the business configuration template. Then, the first server constructs the target configuration rules of the target business according to the business configuration template and the full business information.

[0086] In an exemplary embodiment, when an application or application platform is updated, functions will be optimized or new functions will be launched. When functions are optimized, the business processes corresponding to the functions will be updated. For example, the application is a mobile banking APP (Application). When the mobile banking APP is updated, the mobile banking APP optimizes the transfer function, and the transfer business process corresponding to the transfer function will be updated. The first server obtains update information of the transfer business. Among them, the update information of the transfer business includes the business identifier of the transfer business and the updated transfer process information. The first server obtains the business configuration information corresponding to the transfer business in each configuration rule of the database according to the business identifier of the transfer business. Then, the first server updates the business configuration information corresponding to the transfer business according to the update information of the transfer business, and obtains the target configuration rule corresponding to the transfer business.

[0087] In an exemplary embodiment, when a new function is launched, it indicates that a new service is launched on an application or application platform. For example, the application platform is a hospital registration platform. When the hospital registration platform is updated, the hospital registration platform adds a doctor query function. That is, the hospital registration platform adds a doctor query service. The first server obtains the full service information of the doctor query service and obtains the service configuration template. Then, the first server constructs a target configuration rule for the query service based on the service configuration template and the full service information of the query service.

[0088] In an optional embodiment, if the target business is an updated business, the first server displays the updated information and detailed information of the business configuration information corresponding to the target business, so that the target object can edit and modify the business configuration information according to the updated information of the target business to obtain the target configuration information. If the target business is a newly launched business, the first server displays the full business information and business configuration template of the target business, so that the target object can process the business configuration template according to the full business information to obtain the target configuration rules of the target business.

[0089] Optionally, the target object may be, but is not limited to, a business developer or a backend manager, and the embodiment of the present application does not limit the target object.

[0090] Step 204: determine a target data center among the data centers, and send the target configuration rule to the target data center.

[0091] In implementation, the first server obtains the traffic ratio of each data center in the multi-active data center. Then, the first server determines the target data center in each data center according to each traffic ratio, and sends the target configuration rule to the target configuration center in the target data center, so that the target gateway in the target data center obtains the target configuration rule from the target configuration center.

[0092] Step 206: Send a test request for the target configuration rule to the second server, and receive a test result corresponding to the test request.

[0093] In implementation, the first server constructs a test request for the target configuration rule based on the information of the target business and the information of the target data center. Then, the first server sends the test request to the second server, so that the second server tests the target configuration rule configured on the target data center based on the test request to obtain a test result. Then, the second server returns the test result to the first server. The first server receives the test result corresponding to the test request sent by the second server.

[0094] In an optional embodiment, if the test result is that the test fails, the first server determines that the target configuration rule is wrong, and updates the target configuration rule according to the full business information of the target business to obtain a new target configuration rule. Then, the first server executes the steps of determining the target data center in each data center and sending the new target configuration rule to the target data center until the test result is that the test passes.

[0095] In an optional embodiment, if the test result is that the test fails, the first server determines that the target configuration rule is incorrect, and feeds back information that the target configuration rule is incorrect to the target object. After the target object receives the information that the target configuration rule is incorrect, the target object updates the target configuration rule according to the business information updated by the target business, and obtains a new target configuration rule. Then, the first server executes the steps of determining the target data center in each data center and sending the new target configuration rule to the target data center until the test result is that the test passes.

[0096] Step 208: If the test result is that the test passes, the target configuration rule is sent to the remaining data centers in each data center.

[0097] The remaining data centers in each data center are data centers other than the target data center in each data center. The target configuration rule includes a target business identifier of the target business.

[0098] In implementation, the second server is pre-set with the address of the configuration center of each data center. If the test result is that the test passes, the second server sends the target configuration rule to the configuration centers in the remaining data centers according to the addresses of the configuration centers in the remaining data centers.

[0099] Specifically, if the test result is that the test passes, the first server determines that the target configuration rule is correct. Then, the first server determines the remaining data centers in each data center, and sends the correct target configuration rule to the configuration center of each of the remaining data centers. Each of the remaining data centers contains multiple gateways. Each gateway in each data center will monitor whether the information in the configuration center changes. Since the first server sends the target configuration rule to the configuration center. Therefore, the information in the configuration center will change, and the changed information is the target configuration rule. Each gateway only handles one business, and the business identifier of the business is pre-set in the gateway. The gateway determines whether the business identifier and the target business identifier are the same. If the business identifier and the target business identifier are the same, the gateway obtains the target configuration rule from the configuration center, and updates the business configuration rule according to the target configuration rule, thereby completing the configuration of the target configuration rule.

[0100] In an exemplary embodiment, the multi-active data center includes data center A, data center B, and data center C. Among them, data center A is the target data center, and data center B and data center C are the remaining data centers. If the test result is that the test passes, the first server determines that the target configuration rule is correct. Then, the first server determines data center B and data center C in each data center, and sends the correct target configuration rule to the configuration center of data center B and the configuration center of data center C. Each gateway in data center B and data center C is provided with monitoring software, and the monitoring software monitors whether the information in the configuration center changes. Since the first server sends the target configuration rule to the configuration center. Therefore, the information in the configuration center will change, and the changed information is the target configuration rule. The monitoring software of each gateway in data center B and data center C determines whether the preset service identifier is the same as the target service identifier in the target configuration rule. If the service identifier and the target service identifier are the same, the gateway obtains the target configuration rule from the configuration center, and updates the service configuration rule according to the target configuration rule, thereby completing the configuration of the target configuration rule of data center B and data center C.

[0101] The above-mentioned rule configuration method sends a test request to the second server, so that the second server tests whether the target configuration rule configured in the target data center is correct according to the test request, obtains the test result, and when the test result indicates that the target configuration rule is correct, sends the correct target configuration rule to the remaining data centers, thereby ensuring that the target gateways under the remaining data centers can normally process the target business request according to the correct target configuration rule, thereby improving the execution success rate of the business request.

[0102] In an exemplary embodiment, Figure 3 As shown, the specific processing process of step 206 includes steps 302 to 306. Among them:

[0103] Step 302: construct a test request for a target configuration rule according to a target data center identifier of a target data center and a target business identifier of a target business.

[0104] The target configuration rule includes a target service identifier of the target service. The target data center identifier is used to determine the target data center during the test. The target service identifier is used to send the target test request to the target gateway under the target data center during the test.

[0105] In implementation, the first server is pre-set with data center identifiers of each data center. The first server determines the target data center identifier corresponding to the target data center from the data center identifiers. Then, the first server constructs a test request for the target configuration rule according to the target data center identifier and the target business identifier.

[0106] Specifically, since each of the data centers is distributed in a different region, the address of each data center is different, and the address of each data center represents the data center. The target data center identifier of the target data center is the address of the target data center. The first server determines the address of the target data center from the addresses of each data center, and constructs a test request for the target configuration rule according to the address of the target data center and the target business identifier.

[0107] In an exemplary embodiment, the target service is a transfer service, and the target service identifier is Transfer. The target data center is data center A. The first server constructs a test request of the target configuration rule according to the target service identifier Transfer and the address of data center A.

[0108] Step 304: Send a test request for the target configuration rule to the second server.

[0109] The test request is used to enable the second server to test whether the target configuration rule is correct and obtain a test result.

[0110] In implementation, the first server sends a test request for the target configuration rule to the second server based on the address of the second server. The second server receives the test request for the target configuration rule, and constructs a target test request set corresponding to the target business according to the test request. The second server tests the target configuration rule configured in the target data center based on the target test request set, and obtains a test result that characterizes whether the target configuration rule is correct. Among them, the specific processing process of the second server testing the target configuration rule can be found in the following step 504 or step 602 to step 706. The test process is not repeated in the embodiment of the present application.

[0111] Step 306: Receive the test result corresponding to the test request sent by the second server.

[0112] In implementation, after completing the test of the target configuration rule, the second server obtains a test result indicating whether the target configuration rule is correct. The second server sends the test result to the first server. The first server receives the test result of the test request returned by the second server.

[0113] In an exemplary embodiment, the first server receives a test result corresponding to a test request sent by the second server. The first server determines whether the test result is a test pass. If the test result is a test pass, the first server determines that the target configuration rule is correct and executes step 208. If the test result is not a test pass, the first server determines that the target configuration rule is wrong and updates the target configuration rule. Then, the second server executes the steps of determining a target data center in each data center and sending the updated target configuration rule to the target data center until the test result is a test pass.

[0114] In this embodiment, a test request is constructed by using the target data center identifier and the target service identifier, and the test request is sent to the second server, so that the second server tests whether the target configuration rule configured on the target data center is correct based on the test request, and obtains a test result. This facilitates the subsequent sending of the target configuration rule to the remaining data centers when the test result indicates that the target configuration rule is a correct configuration rule, thereby improving the accuracy of the target configuration rule and thus the execution success rate of the service request.

[0115] In an exemplary embodiment, Figure 4 As shown, the specific processing process of step 204 includes steps 402 to 406. Among them:

[0116] Step 402, obtaining the traffic ratio of each data center, and determining the data center with the lowest traffic ratio among the data centers as the target data center.

[0117] The traffic ratio is the ratio of the traffic value received by each data center in the multi-active data center to the total traffic value received by the multi-active data center. The traffic value received by the data center is the data volume of the service request received by the data center. The execution device in the target data center must be able to process the target service.

[0118] In implementation, the first server obtains the flow ratio of each data center in each data center, then determines the target flow ratio with the lowest value among the flow ratios, and determines the data center corresponding to the target flow ratio as the target data center.

[0119] Specifically, the first server obtains the flow value of each data center from the database, and performs addition operation on the flow value of each data center to obtain the total flow value of each data center. Then, for each data center, the first server performs a ratio operation on the flow value of the data center and the total flow value to obtain the flow ratio of the data center. Then, the first server determines the target flow ratio with the lowest value among the flow ratios, and determines the data center corresponding to the target flow ratio as the target data center.

[0120] In an exemplary embodiment, the data centers in the multi-active data center, i.e., each data center, are respectively data center A, data center B, and data center C. The first server obtains the traffic ratio of each data center. The traffic ratio of data center A is 10%, the traffic ratio of data center B is 30%, and the traffic ratio of data center C is 60%. The first server determines the target traffic ratio of 10% with the lowest value among the traffic ratios, and determines that data center A corresponding to 10% is the target data center.

[0121] In an optional embodiment, if there are multiple target services, a data center that can process multiple target services simultaneously is determined as the target data center among multiple data centers.

[0122] In an optional embodiment, the target data center is determined by the target object due to the needs of the target business. Specifically, the first server obtains the traffic ratio of each data center and the business information of each business that each data center can handle. Then, the first server sends the traffic ratio of each data center and the business information of each business corresponding to each data center to the terminal, so that the terminal displays the traffic ratio of each data center and the business information of each business corresponding to each data center. Then, the target object determines the target data center in each data center based on the displayed traffic ratio of each data center and the business information of each business corresponding to each data center. The terminal sends the name of the target data center to the first server.

[0123] Step 404, sending the target configuration rules to the target configuration center in the target data center.

[0124] In implementation, the first server obtains the address of the configuration center in each data center. Then, the first server determines the address of the target configuration center from the addresses of each configuration center, and sends the target configuration rule to the target configuration center according to the address of the target configuration center. The target configuration center receives and saves the target configuration rule.

[0125] Specifically, the target object transmits the address of the medium (configuration center or registration center) of each data center to the first server. The first server receives and saves the address of the medium of each data center. Then, the first server determines the address of the target medium from the addresses of each medium, and sends the target configuration rule to the target medium according to the address of the target medium. The target medium receives and saves the target configuration rule.

[0126] In an exemplary embodiment, the target data center is data center A, and the target configuration center in the target data center is configuration center A. The first server obtains the address of the configuration center in each data center. Then, the first server determines the address of configuration center A from the addresses of each configuration center, and sends the target configuration rule to configuration center A according to the address of configuration center A. Configuration center A receives and saves the target configuration rule.

[0127] Step 406: Send the target configuration rules to the target gateway corresponding to the target business through the target configuration center.

[0128] The target configuration rule includes a target service identifier of the target service.

[0129] In implementation, the first server transmits the target configuration rule to the target gateway corresponding to the target service through the target configuration center and the target service identifier.

[0130] Specifically, each gateway in the target data center monitors the information of the target configuration center. When the information of the target configuration center changes, that is, after the target configuration center saves the target configuration rules, the gateway will listen to the target configuration center for new target configuration rules. The gateway determines whether the target business identifier in the target configuration rule is the same as the preset business identifier. Among them, the preset business identifier in the gateway is the business identifier of the business that the gateway needs to execute. If the target business identifier is the same as the business identifier, the gateway is represented as the target gateway corresponding to the target business. The target gateway obtains the target configuration rules from the target configuration center and updates the original business configuration rules in the gateway according to the target configuration rules. If the target business identifier is different from the business identifier, the gateway is not the target gateway corresponding to the target business, and the gateway does not perform subsequent processing.

[0131] In an exemplary embodiment, the target business is a transfer business, and the target business identifier corresponding to the target business is Transfer. The target data center is Data Center A, and the target configuration center is Configuration Center A. Data Center A contains three gateways, namely Gateway A1, Gateway A2, and Gateway A3. The business identifier set in Gateway A1 is Transfer, and the business identifier set in Gateway A2 is Loan. The business identifier set in Gateway A3 is Withdrawals. Gateway A1, Gateway A2, and Gateway A3 will monitor whether the information in Configuration Center A changes. When the first server sends the target configuration rule to Configuration Center A, a new target configuration rule will be added to Configuration Center A, that is, Configuration Center A will change. Gateway A1 determines that the target business identifier Transfer in the target configuration rule is the same as the preset business identifier Transfer. Then, Gateway A1 obtains the target configuration rule from Configuration Center A, and updates the original business configuration rule in Gateway A1 based on the target configuration rule. Gateway A2 determines that the target business identifier Transfer in the target configuration rule is not the same as the preset business identifier Loan, and does not perform subsequent processing. Gateway A3 determines that the target service identifier Transfer in the target configuration rule is different from the preset service identifier Withdrawals, and does not perform any subsequent processing.

[0132] In this embodiment, by determining the data center with the smallest traffic ratio as the target data center and sending the target configuration rules to the target data center, the impact scope of the target configuration rules is reduced, so that the remaining data centers can process business requests according to the original configuration rules, thereby improving the processing efficiency of business requests.

[0133] In an exemplary embodiment, the specific process of sending the target configuration rule to the remaining data centers in each data center in step 208 includes:

[0134] The target configuration rule in the first server is sent to the remaining data centers in each data center, or a transmission instruction of the target configuration rule is sent to the target data center, so that the target data center sends the target configuration rule to the remaining data centers according to the transmission instruction.

[0135] Among them, the remaining data centers are data centers other than the target data center.

[0136] In implementation, the target configuration rules can be sent to the remaining data centers through two configuration methods. The first configuration method is that the first server directly sends the target configuration rules to the remaining configuration centers in the remaining data centers. The remaining configuration centers will transmit the target configuration rules to the remaining target gateways of the target services in the remaining data centers. The second configuration method is that the first server sends a transmission instruction of the target configuration rules to the target data center. The target gateway in the target data center receives the transmission instruction of the target configuration rules and sends the target configuration rules to the remaining configuration centers in the remaining data centers. The remaining configuration centers transmit the target configuration rules to the remaining target gateways of the target services in the remaining data centers.

[0137] Specifically, the first server determines the traffic transmission type of the data center. If the traffic transmission type is unidirectional transmission, the first server determines that the configuration method of the target configuration rule is the first configuration method, that is, the first server directly sends the target configuration rule to the remaining configuration centers in the remaining data centers. Among them, unidirectional transmission is a unidirectional transmission method of traffic from top to bottom in which only the first server can transmit data to the configuration center, and the configuration center transmits data to the gateway. The remaining gateways in the remaining data centers will monitor whether the configuration rules in the remaining configuration centers will change, that is, monitor the target configuration rules. The remaining gateways determine whether the target business identifier in the target configuration rule is consistent with the business identifier in the remaining gateways. If the target business identifier is consistent with the business identifier in the remaining gateways, the remaining gateways obtain the target configuration rules from the remaining configurations and update the configuration rules in the remaining gateways based on the target configuration rules.

[0138] If the traffic transmission type is a two-way transmission type, the first server determines that the configuration method of the target configuration rule is the first configuration method or the second configuration method. Among them, the two-way transmission type is a one-way transmission method in which the first server transmits data to the configuration center, and the configuration center transmits data to the first server, or the configuration center transmits data to the gateway, and the gateway transmits data to the configuration center. If the first server determines the second configuration method as the configuration method of the target configuration rule, the first server will send a transmission instruction of the target configuration rule to the target gateway in the target data center. The target gateway in the target data center receives the transmission instruction of the target configuration rule and sends the target configuration rule to the remaining configuration centers in each remaining data center. Each remaining configuration center transmits the target configuration rule to the remaining target gateways of the target business in the remaining data centers.

[0139] In this embodiment, by directly sending the target configuration rule to other data centers or sending the target configuration rule to other data centers through the target data center, different configuration modes of the target configuration rule are implemented, and the application scope of the rule configuration method is expanded.

[0140] In an exemplary embodiment, Figure 5 As shown, a rule configuration method is provided, which is applied to Figure 1 The second server 120 (hereinafter, the reference numeral is omitted, referred to as the second server) in the embodiment is used as an example to illustrate the method, which includes the following steps 502 to 504. Among them:

[0141] Step 502: Receive a test request for a target configuration rule sent by a first server, and construct a target test request set corresponding to a target service.

[0142] The test request includes a target data center identifier and a target business identifier of a target business.

[0143] In implementation, the second server receives a test request for a target configuration rule sent by the first server, and constructs a target test request set corresponding to the target service based on the test request.

[0144] Specifically, the second server receives a test request for a target configuration rule sent by the first server. Then, the second server obtains the attribute information and feature information of the target business according to the target business identifier, and constructs a target test request set corresponding to the target business according to the attribute information and feature information. In particular, the target test request set needs to completely cover the business process of the target business. The target test request set is a collection of test cases for the target business.

[0145] In an exemplary embodiment, the target business is a transfer business. The target business identifier is a transfer business identifier. A test case generation tool is pre-set in the second server. The second server receives a test request for a target configuration rule sent by the first server. Then, the second server obtains attribute information and feature information of the transfer business according to the transfer business identifier in the test request. The feature information includes business process information of the transfer business. The test case generation tool in the second server generates each test case of the transfer business according to the attribute information and feature information of the transfer business, and constructs a target test area request set of the transfer business according to each test case.

[0146] Step 504: Based on the target test request set, the target configuration rule configured in the target data center is tested to obtain a test result, and the test result is sent to the first server.

[0147] In implementation, the second server sends the target test request set to the target gateway in the target data center according to the target data center identifier, so that the target gateway processes the target test request set according to the target configuration rule to obtain a processing result set. Then, the target gateway returns the processing result to the second server. The second server receives the processing result set and determines the test result of the target configuration rule according to the processing result set of the target gateway. Then, the second server sends the test result to the first server.

[0148] In this embodiment, by constructing a target test request set corresponding to the target business, and testing the target configuration rules configured in the target data center based on the target test request set, a test result is obtained to clarify whether the target configuration rules are correct. Then, the test result is returned to the first server, so that when the test result is that the test passes, that is, when the target configuration rules are correct, the server sends the target configuration rules to the remaining data centers, so that the remaining data centers process the business requests according to the correct target configuration rules, thereby improving the execution success rate of the business requests.

[0149] In an exemplary embodiment, Figure 6 As shown, in step 504, based on the target test request set, the target configuration rules configured in the target data center are tested, and the specific processing process of obtaining the test result includes steps 602 to 606. Among them:

[0150] Step 602: Determine the target data center corresponding to the target data center identifier in the test request.

[0151] In implementation, the second server determines the target data center by identifying the target data center in each data center.

[0152] Specifically, the target data center identifier is the address of the target data center, that is, the target data center address. The second server is pre-set with an association relationship between the data center and the data center address. The second server determines the target data center corresponding to the target data center address according to the association relationship between the data center and the data center address.

[0153] In an exemplary embodiment, the target data center identifier is the address of data center A. The second server determines data center A among the data centers according to the address of data center A and the association relationship between the data center and the data center address.

[0154] Step 604: Send the target test request set to the target gateway corresponding to the target business in the target data center.

[0155] In implementation, the second server determines the target gateway corresponding to the target business in each gateway in the target data center. Then, the second server sends the target test request set to the target gateway corresponding to the target business in the target data center. The target gateway processes the target test request set according to the target configuration rule to obtain a processing result set. Then, the target gateway sends the processing result set to the second server.

[0156] Specifically, the second server is pre-set with the correspondence between each service identifier and each gateway address. The second server determines the target gateway address corresponding to the target service identifier based on the correspondence between each service identifier and each gateway address. Then, the second server sends the target test request set to the target gateway corresponding to the target service under the target data center based on the target gateway address. The target gateway will perform format conversion, verification and other processing on each target test request in the target test request set according to the target configuration rules, and send the processed target test requests to each target processing device under the target gateway. Each target processing device receives each target test request and determines each processing result determined by each target test request. Then, each target processing device returns each processing result to the target gateway. The target gateway constructs a processing result set based on each processing result, and returns the processing result set to the second server.

[0157] In an exemplary embodiment, during the process of the target gateway processing the target test request set, if the target configuration rule is wrong, the target gateway will process the target test request set according to the wrong target configuration rule, resulting in a format conversion error, interception of a normal target test request, and the target processing device being unable to receive the target test request or obtaining an erroneous processing result. When the target processing device is unable to receive the target test request, the target processing device is unable to return the processing result, resulting in the number of processing results in the processing result set being inconsistent with the number of target test requests in the target test request set. When the target device returns an erroneous processing result, the processing result cannot meet the preset processing result condition.

[0158] In an exemplary embodiment, the target business is a transfer business, and the target business identifier corresponding to the target business is Transfer. The target data center is data center A. Data center A contains three gateways, namely gateway A1, gateway A2 and gateway A3. The business identifier set in gateway A1 is Transfer, and the business identifier set in gateway A2 is Loan. The business identifier set in gateway A3 is Withdrawals. The second server is pre-set with the correspondence between each business identifier and each gateway address. The second server determines the target business address corresponding to Transfer, that is, the address of gateway A1, according to the correspondence between each business identifier and each gateway address. Then, the second server sends the target test request set to gateway A1 under data center A according to the address of gateway A1. Gateway A1 will perform format conversion, verification and other processing on each target test request in the target test request set according to the target configuration rule, and send the processed target test requests to each target processing device under the target gateway. Each target processing device receives each target test request and determines each processing result determined by each target test request. Then, each target processing device returns each processing result to gateway A1. Gateway A1 constructs a processing result set according to each processing result, and returns the processing result set to the second server.

[0159] Step 606: Receive a processing result set corresponding to the target test request returned by the target gateway, and determine the test result based on the processing result set.

[0160] The processing result set is obtained by the target gateway processing the target test request set based on the target configuration rules.

[0161] In implementation, the second server receives a processing result set corresponding to the target test request returned by the target gateway, and then determines the processing result of the target configuration rule according to the number of processing results in the processing result set and each processing result.

[0162] In this embodiment, the target test request set is sent to the target gateway so that the target gateway and the processing device corresponding to the target gateway process the target test request set, thereby facilitating the subsequent determination of the test result based on the processing result and clarifying whether the target configuration rule is correct.

[0163] In an exemplary embodiment, Figure 7 As shown, the specific processing process of determining the test result based on the processing result set in step 606 includes steps 702 to 706. Among them:

[0164] Step 702, determining whether the number of results of the processing results in the processing result set is the same as the number of target test requests in the target test request set.

[0165] In implementation, the second server determines the number of results of the processing results in the processing result set and determines the number of requests of the target test requests in the target test request set. Then, the second server determines whether the number of results is the same as the number of requests.

[0166] Specifically, the second server counts the processing results in the processing result set to obtain the number of processing results in the processing result set. At the same time, the second server counts the target test requests in the target test request set to obtain the number of target test requests in the target test request set. Then, the second server determines whether the number of results is the same as the number of requests.

[0167] In an optional embodiment, if the number of requests is different from the number of results, the second server determines that the test fails. Then, the second server constructs the test result based on the information that the test fails and the number of results is abnormal.

[0168] Step 704: When the number of results and the number of requests are the same, determine whether each processing result meets a preset processing result condition.

[0169] In implementation, the second server is pre-set with a processing result condition. When the number of results and the number of requests are the same, the second server determines, for each processing result in the processing result set, whether the processing result satisfies the preset processing result condition.

[0170] Specifically, the processing result condition is that the processing result is the expected processing result. The second server is pre-set with the expected processing results corresponding to each target test request in the target test request set. The second server determines whether the processing result is the expected processing result corresponding to the target test request for each processing result corresponding to the target test request in the processing result set. If the processing result is the expected processing result, the second server determines that the processing result meets the preset processing result condition. If the processing result is not also the expected processing result, the second server determines that the processing result does not meet the preset processing result condition.

[0171] In an exemplary embodiment, the target business is a transfer business, the target test request is to transfer the virtual resources of user a to user b, and the expected processing result corresponding to the target test request is a successful transfer or a failed transfer. The second server determines whether the processing result corresponding to the target test request is a successful transfer, and determines whether the processing result is a failed transfer. If the processing result is a successful transfer or a failed transfer, the second server determines that the processing result meets the preset processing result condition. If the processing result is an access error or a stack overflow error, the second server determines that the processing result does not meet the processing result condition.

[0172] For example, the target service is a registration service, the target test request is to make an appointment for user c with doctor d, and the appointment time is the target time period. The expected result corresponding to the target test request is a successful appointment or a failed appointment. The second server determines whether the processing result corresponding to the target test request is a successful appointment, and determines whether the processing result is a failed appointment. If the processing result is a successful appointment or a failed appointment, the second server determines that the processing result meets the preset processing result condition. If the processing result is a data conversion error or a connection timeout, the second server determines that the processing result does not meet the processing result condition.

[0173] In an optional embodiment, if there is a processing result that does not meet the processing result condition, the second server determines that the test fails. Then, the second server constructs a test result based on the information of the test failure, the processing result that does not meet the processing result condition, and the target test request corresponding to the processing result, and returns the test result to the first server.

[0174] Step 706: When all processing results satisfy the processing result condition, determine that the test result corresponding to the target configuration rule is a test pass.

[0175] In implementation, when all processing results meet the processing result conditions, it indicates that the target gateway correctly processes the target test request set according to the correct target configuration rule, and the second server determines that the test result corresponding to the target configuration rule is a test pass.

[0176] In this embodiment, the test result is determined by processing the processing results in the processing result set and the processing quantity of the processing results, and it is clarified whether the target gateway performs correct processing according to the target configuration rule, which facilitates the subsequent issuance of the target configuration rule based on the test result.

[0177] In an exemplary embodiment, Figure 8 FIG. 1 is an application environment diagram of a rule configuration method in an exemplary embodiment. Figure 8As shown, the rule configuration method is applied in a rule configuration system 800. The rule configuration system 800 includes a first server 810, a second server 820, and a multi-active data center 830. The multi-active data center 830 includes a data center X, a data center Y, and a data center Z. The data center X includes a configuration center X, a gateway X1, a gateway X2, a gateway X3, each processing device corresponding to the gateway X1, each processing device corresponding to the gateway X2, and each processing device corresponding to the gateway X3. The preset service identifier in the gateway X1 is Regd, and the preset service identifier in the gateway X2 is transfer. The preset service identifier in the gateway X3 is PO. The data center Y includes a configuration center Y, a gateway Y1, a gateway Y2, a gateway Y3, each processing device corresponding to the gateway Y1, each processing device corresponding to the gateway Y2, and each processing device corresponding to the gateway Y3. The preset service identifier in the gateway Y1 is Regd, and the preset service identifier in the gateway Y2 is transfer. The preset service identifier in the gateway Y3 is PO. The data center Z includes the configuration center Z, the gateway Z1, the gateway Z2, the gateway Z3, the processing devices corresponding to the gateway Z1, the processing devices corresponding to the gateway Z2, and the processing devices corresponding to the gateway Z3. The service identifier preset in the gateway Z1 is Regd, and the service identifier preset in the gateway Z2 is transfer. The service identifier preset in the gateway Z3 is PO. The first server 810 obtains the target configuration rule of the target service. The target service is the registration service, and the target configuration rule is the registration configuration rule. The registration configuration rule includes the registration service identifier, namely Regd.

[0178] The first server 810 obtains the traffic ratio of each data center. The traffic ratios of data center X, data center Y, and data center Z are 10%, 20%, and 70%, respectively. The first server 810 determines that data center X with the smallest traffic ratio is the target data center, and sends the registration configuration rule to configuration center X in data center X. Gateway X1, gateway X2, and gateway X3 monitor changes in information in data center X. Gateway X1 determines that the preset service identifier Regd is the same as the registration service identifier Regd in the registration configuration rule. Then, gateway X1 obtains the registration configuration rule from configuration center X, and updates the original configuration rule in gateway X1 according to the registration configuration rule. At the same time, gateway X2 determines that the preset service identifier transfer is different from the registration service identifier Regd in the registration configuration rule, and determines that the changed registration configuration rule has nothing to do with gateway X2. Gateway X2 does not process. Gateway X3 determines that the preset service identifier PO is different from the registration service identifier Regd in the registration configuration rule, and determines that the changed registration configuration rule has nothing to do with gateway X3. Gateway X3 does not process.

[0179] The first server 810 sends a test request for the registration configuration rule to the second server 820. The second server 820 receives the test request and obtains the attribute information and feature information of the registration service according to the registration service identifier in the test request. Then, the second server 820 constructs a target test request set according to the attribute information and feature information of the registration service, and sends the test request set to the gateway X1. The gateway X1 processes the target test request set according to the registration configuration rule, obtains a processing result set, and returns the processing result set to the second server 820. The second server 820 determines the test result according to the processing result set, and returns the test result to the first server 810. The first server 810 determines whether the test result is passed. If the test result is passed, the first server 810 sends the registration configuration rule to the configuration center Y and the configuration center Z, so that the configuration center Y and the configuration center Z send the registration configuration rule to the gateway Y1 and the gateway Z1. Or the first server 810 sends a transmission instruction of the target configuration rule to the data center X, so that the data center X sends the target configuration rule to the data center Y and the data center Z.

[0180] In an exemplary embodiment, the target object selects a rule configuration mode according to the needs of the target business. If the target object determines that the target configuration rule is a correct configuration rule, the full data center delivery mode is adopted. If the target object is not sure that the target configuration rule is a correct configuration rule, the single data center delivery mode is adopted. After verifying that the target configuration rule is a correct configuration rule through the single data center delivery mode, the target configuration rule is delivered to the remaining data centers using the remaining data center delivery mode. Fig. 9 FIG. 1 is a schematic diagram of an architecture for sending configuration rules in different modes in an embodiment. Fig. 9 As shown, the multi-active data center includes computer room A and computer room B. The gateway control is the first server, and the medium is the configuration center. Each computer room contains business domains and databases (DB) for processing different business types. The business domains in each computer room are the same, that is, each computer room contains a core business domain and an Internet financial business domain. Each business domain contains multiple gateway engine clusters, and each gateway engine cluster is used to process a type of business. The gateway engine cluster contains a gateway and multiple processing devices.

[0181] When the rule configuration mode is the full data center delivery mode, the gateway control will deliver the target configuration rules to the media in computer room A and the media in computer room B at the same time (such as Fig. 9The target configuration rules are sent to the target gateways in room A and room B at the same time (black bold arrow in the middle), so that the medium in room A and the medium in room B can simultaneously send the target configuration rules to the target gateways in room A and room B. By sending the target configuration rules to all target gateways at the same time in the full data center delivery mode, all target gateways can complete the configuration of the target configuration rules at one time, thereby improving the efficiency of the rule configuration method.

[0182] When the rule configuration mode is the single data center delivery mode, the gateway control will send the target configuration rules to the media in room A (such as Fig. 9 The target configuration rule is sent to the target gateway in room A by the medium in room A. Gateway control sends a test request for the target configuration rule to the second server and receives a test result corresponding to the test request. If the test result is that the test passes, the gateway control determines that the target configuration rule is the correct configuration rule and sends the target configuration rule to the medium in room B (such as Fig. 9 The target configuration rules are sent to the target gateway in room B by the medium in room B (arrow 2). The correct target configuration rules are sent to each data center through the single data center sending mode and the remaining data center sending mode, so that the target gateway in each data center can process the service request according to the correct target configuration rules, thereby improving the execution success rate of the service request.

[0183] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0184] Based on the same inventive concept, the embodiment of the present application also provides a rule configuration device for implementing the rule configuration method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more rule configuration device embodiments provided below can refer to the limitations on the rule configuration method above, and will not be repeated here.

[0185] In an exemplary embodiment, Fig.10As shown, a rule configuration device 1000 is provided, comprising: an acquisition module 1001, a determination module 1002, a first sending module 1003 and a second sending module 1004, wherein:

[0186] The acquisition module 1001 is used to acquire the target configuration rule of the target service.

[0187] The determination module 1002 is used to determine a target data center among the data centers and send the target configuration rule to the target data center.

[0188] The first sending module 1003 is used to send a test request for a target configuration rule to the second server, and receive a test result corresponding to the test request.

[0189] The second sending module 1004 is used to send the target configuration rule to other data centers in each data center if the test result is that the test passes.

[0190] In an exemplary embodiment, the first sending module 1003 includes:

[0191] The first construction submodule is used to construct a test request of a target configuration rule according to a target data center identifier of a target data center and a target business identifier of a target business.

[0192] The first sending submodule is used to send a test request of the target configuration rule to the second server; the test request is used to enable the second server to test whether the target configuration rule is correct and obtain a test result.

[0193] The first receiving submodule is used to receive the test result corresponding to the test request sent by the second server.

[0194] In an exemplary embodiment, the determination module 1002 includes:

[0195] The first acquisition submodule is used to acquire the traffic ratio of each data center, and determine the data center with the lowest traffic ratio among the data centers as the target data center.

[0196] The second sending submodule is used to send the target configuration rule to the target configuration center in the target data center.

[0197] The third sending submodule is used to send the target configuration rules to the target gateway corresponding to the target business through the target configuration center.

[0198] In an exemplary embodiment, the second sending module 1004 is used to send the target configuration rules in the first server to the remaining data centers in each data center, or to send a transmission instruction of the target configuration rules to the target data center so that the target data center sends the target configuration rules to the remaining data centers according to the transmission instruction.

[0199] In an exemplary embodiment, Fig.11 As shown, a rule configuration device 1100 is provided, comprising: a construction module 1101 and a test module 1102, wherein:

[0200] The construction module 1101 is used to receive a test request for a target configuration rule sent by the first server, and to construct a target test request set corresponding to a target service.

[0201] The testing module 1102 is used to test the target configuration rules configured in the target data center based on the target test request set, obtain the test results, and send the test results to the first server.

[0202] In an exemplary embodiment, the testing module 1102 includes:

[0203] The first determination submodule is used to determine the target data center corresponding to the target data center identifier in the test request.

[0204] The third sending submodule is used to send the target test request set to the target gateway corresponding to the target business in the target data center.

[0205] The second receiving submodule is used to receive a processing result set corresponding to the target test request returned by the target gateway, and determine the test result based on the processing result set; the processing result set is obtained by the target gateway processing the target test request set based on the target configuration rule.

[0206] In an exemplary embodiment, the second receiving submodule includes a third receiving submodule and a second determining submodule. The second determining submodule includes:

[0207] The first judgment submodule is used to judge whether the result quantity of the processing results in the processing result set is the same as the request quantity of the target test requests in the target test request set.

[0208] The second judgment submodule is used to judge whether each processing result meets a preset processing result condition when the number of results and the number of requests are the same.

[0209] The third determination submodule is used to determine that the test result corresponding to the target configuration rule is a test pass when all processing results meet the processing result condition.

[0210] Each module in the above rule configuration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0211] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG12. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data used for the rule configuration method. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a rule configuration method is implemented.

[0212] Those skilled in the art will understand that the structure shown in FIG. 12 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0213] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0214] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0215] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0216] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0217] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0218] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A rule configuration method, characterized in that: The method is applied to a first server, and the method includes: Obtain target configuration rules for target business; Determine a target data center among the data centers, and send the target configuration rule to the target data center; Sending a test request for the target configuration rule to the second server, and receiving a test result corresponding to the test request; If the test result is that the test passes, the target configuration rule is sent to the remaining data centers in each of the data centers.

2. The method according to claim 1, characterized in that: The sending a test request for the target configuration rule to the second server and receiving a test result corresponding to the test request includes: Constructing a test request for the target configuration rule according to a target data center identifier of the target data center and a target business identifier of the target business; Sending a test request of the target configuration rule to the second server; the test request is used to enable the second server to test whether the target configuration rule is correct and obtain a test result; Receive a test result corresponding to the test request sent by the second server.

3. The method according to claim 1, characterized in that The determining a target data center among the data centers and sending the target configuration rule to the target data center includes: Obtaining the traffic ratio of each data center, and determining the data center with the lowest traffic ratio among the data centers as the target data center; Sending the target configuration rule to a target configuration center in the target data center; The target configuration center sends the target configuration rule to the target gateway corresponding to the target service.

4. The method according to claim 1, characterized in that: The sending the target configuration rule to the remaining data centers in the data centers includes: Send the target configuration rules in the first server to the remaining data centers in each of the data centers, or send a transmission instruction of the target configuration rules to the target data center, so that the target data center sends the target configuration rules to the remaining data centers according to the transmission instruction.

5. A rule configuration method, characterized in that: The method is applied to the second server, and the method includes: Receive a test request for a target configuration rule sent by the first server, and construct a target test request set corresponding to the target business; Based on the target test request set, the target configuration rule configured in the target data center is tested to obtain a test result, and the test result is sent to the first server.

6. The method according to claim 5, characterized in that The step of testing the target configuration rule configured in the target data center based on the target test request set to obtain a test result includes: Determine a target data center corresponding to the target data center identifier in the test request; Sending the target test request set to the target gateway corresponding to the target business in the target data center; Receive a processing result set corresponding to the target test request returned by the target gateway, and determine a test result based on the processing result set; the processing result set is obtained by the target gateway processing the target test request set based on the target configuration rule.

7. The method according to claim 6, characterized in that Determining the test result based on the processing result set includes: Determine whether the number of results of the processing results in the processing result set is the same as the number of target test requests in the target test request set; In the case where the number of results is the same as the number of requests, determining whether each of the processing results satisfies a preset processing result condition; When all the processing results satisfy the processing result condition, it is determined that the test result corresponding to the target configuration rule is a test pass.

8. A rule configuration device, characterized in that: The device comprises: An acquisition module, used to acquire target configuration rules for a target business; A determination module, used to determine a target data center among the data centers, and send the target configuration rule to the target data center; A first sending module, used to send a test request for the target configuration rule to the second server, and receive a test result corresponding to the test request; The second sending module is used to send the target configuration rule to the remaining data centers in each of the data centers if the test result is that the test passes.

9. A rule configuration device, characterized in that: The device comprises: A construction module, configured to receive a test request for a target configuration rule sent by the first server, and to construct a target test request set corresponding to the target service; The test module is used to test the target configuration rules configured in the target data center based on the target test request set, obtain the test results, and send the test results to the first server.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method of any one of claims 1 to 4 or claims 5 to 7 are implemented.