Cloud service fault processing method and device, storage medium and computer program

By constructing temporary data lines in the deployment of dual -live cloud services, the database data caused by synchronous data line failures did not synchronize the problem of timely synchronization, realizing the sound and accuracy of database data, and avoiding duplicate data conflicts.

CN119341891AActive Publication Date: 2025-01-21GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411386191.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-21
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

In the deployment of dual active cloud service, a synchronous data line failure causes the master and slave database data to not be synchronized in time, and duplicate data conflicts and service interruptions may occur.

Method used

By detecting the cause of data synchronization failure, when a synchronization data line failure is discovered, a temporary data line is constructed so that the master server and the slave server can complete database data synchronization based on the temporary data line.

Benefits of technology

Effectively reduce the service problems caused by synchronous data line failures, ensure the sound and accuracy of database data, and avoid duplicate data conflict.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341891A_ABST
    Figure CN119341891A_ABST
Patent Text Reader

Abstract

The invention provides a cloud service fault processing method and device, a storage medium and a computer program.The method is applied to a cloud service system, the cloud service system comprises a master server provided with a master database and a slave server provided with a slave database, and database data synchronization is achieved between the master server and the slave server through a synchronous data line. The method comprises the following steps: in response to a user request, distributing the user request to a master server and a slave server according to a preset data distribution proportion; in response to a user request, the master server and the slave server perform database data synchronization; and when the reason of the data synchronization failure is a synchronous data line fault, constructing a temporary data line, so that database data synchronization between the master server and the slave server can be completed based on the temporary data line. The condition that the service goes wrong due to the fact that the data of the master database and the slave database cannot be synchronized in time when the synchronous data line breaks down is effectively reduced, and the integrity and accuracy of the service are guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a cloud service fault handling method, device, storage medium and computer program. Background Art

[0002] Smart home refers to the use of advanced information technology and Internet of Things (IoT) technology to connect traditional home appliances and systems with the Internet to achieve automated, intelligent and convenient home management and control systems.

[0003] In some technologies, when deploying cloud services, a dual-active solution is usually adopted, that is, a service is deployed on two cloud servers provided by different cloud service providers to relieve the pressure on a single server. When using the dual-active solution for deployment, a database is deployed on each server, and the two databases are backed up through a dedicated line.

[0004] However, when the dedicated line connecting the two databases fails, requests to access one of the servers cannot correctly access the data in the database of the other server. If the data is created, duplicate data conflicts may occur after the dedicated line is restored to normal. Summary of the invention

[0005] The present disclosure provides a cloud service fault handling method, device, storage medium and computer program to reduce the situation where service problems occur due to failure of synchronization data line to synchronize master and slave databases in time, thereby ensuring the integrity and accuracy of the service.

[0006] In a first aspect, the present disclosure provides a cloud service fault handling method, which is applied to a cloud service system, wherein the cloud service system includes a master server provided with a master database and a slave server provided with a slave database, wherein database data synchronization is implemented between the master server and the slave server via a synchronous data line, and the method includes:

[0007] In response to a user request, allocating the user request to the master server and the slave server according to a preset data allocation ratio;

[0008] In response to the user request, the master server synchronizes database data with the slave server;

[0009] When database data synchronization failure is detected, analyze the cause of the data synchronization failure;

[0010] When the reason for the failure of data synchronization is a failure of the synchronization data line, a temporary data line is constructed so that the master server and the slave server can complete database data synchronization based on the temporary data line.

[0011] In some embodiments, the method further comprises:

[0012] When the reason for the data synchronization failure is not a synchronous data line failure, determining whether the synchronous data line is in a congested state;

[0013] When the synchronous data line is in a congested state, readjusting the data allocation ratio requested by the user;

[0014] The user requests are reallocated to the master server and the slave server according to the readjusted data allocation ratio.

[0015] In some embodiments, the step of constructing a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes:

[0016] Establishing a temporary data line, and determining whether the temporary data line is in a congested state;

[0017] When the temporary data line is not in a congested state, the master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

[0018] In some embodiments, the method further comprises:

[0019] When the temporary data line is in a congested state, an identifier is added to the user request, the identifier is used to indicate a target server to which the user request is assigned when it is re-initiated, the target server being one of a master server and a slave server;

[0020] Based on the identifier, assigning the user request to the target server;

[0021] The data corresponding to the user request is stored in the database of the target server based on the public network, thereby completing the database data synchronization.

[0022] In some embodiments, the step of determining whether the data line is in a congested state includes:

[0023] Acquire a value of a relevant parameter characterizing the usage of the data line, and compare the value of the relevant parameter characterizing the usage of the data line with a corresponding threshold;

[0024] When the value of the relevant parameter characterizing the usage of the data line is greater than the corresponding threshold, it is determined that the data line is in a congested state.

[0025] In some embodiments, the step of constructing a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes:

[0026] Building the temporary data line based on a temporary virtual private network;

[0027] The master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

[0028] In some embodiments, the number of the user requests is multiple;

[0029] Before the step of synchronizing database data between the master server and the slave server in response to the user request, the method further includes:

[0030] Determining a processing order of each of the user requests based on the user identity information corresponding to the user requests;

[0031] According to the processing order of the user requests, each of the user requests is responded to and the user requests are allocated to a corresponding server, where the server is a master server or a slave server.

[0032] In a second aspect, the present disclosure provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the above aspect.

[0033] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the method described in the above aspects when executed by a processor.

[0034] In a fourth aspect, the present disclosure provides a computer program product, including a computer program / instructions, which implements the steps of the method described in the above aspects when the computer program is executed by a processor.

[0035] The present disclosure provides a cloud service fault handling method, device, storage medium and computer program, which respond to user requests, allocate user requests to the master server and the slave server according to a preset data allocation ratio, and synchronize database data with the slave server in response to the user request. When a failure in database data synchronization is detected, the cause of the failure in data synchronization is analyzed. When the cause of the data synchronization failure is a failure in the synchronization data line, a temporary data line is constructed so that the master server and the slave server can complete database data synchronization based on the temporary data line. In this way, by analyzing the cause of the data synchronization failure and then synchronizing the database data of the master server and the slave server through the temporary data line, the situation in which service problems occur due to the failure of the synchronization data line to synchronize the data of the master and slave databases in time is effectively reduced, thereby ensuring the integrity and accuracy of the service. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The present disclosure will be described in more detail below based on embodiments and with reference to the accompanying drawings:

[0037] Figure 1 A flowchart of a cloud service fault handling method provided by an embodiment of the present disclosure;

[0038] Figure 2 is a structural block diagram of a cloud service fault handling device in an embodiment;

[0039] Figure 3 is an internal structure diagram of an electronic device in an embodiment;

[0040] Figure 4 A flowchart of a cloud service fault handling method in another embodiment. DETAILED DESCRIPTION

[0041] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, and to fully understand and implement how the present disclosure applies technical means to solve technical problems and achieve the corresponding technical effects, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only embodiments of a part of the present disclosure, not all of the embodiments. The embodiments of the present disclosure and the various features in the embodiments can be combined with each other without conflict, and the technical solutions formed are all within the scope of protection of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.

[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0043] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0044] Embodiment 1

[0045] Figure 1 The following is a flow chart of a cloud service fault handling method provided by an embodiment of the present disclosure. Figure 1 As shown, a cloud service fault handling method is applied to a cloud service system, wherein the cloud service system includes a master server provided with a master database and a slave server provided with a slave database, wherein the master server and the slave server realize database data synchronization through a synchronous data line; when a user initiates a request, the parsed request is allocated to the master server and the slave server in a certain proportion. When a request is allocated to the master server, but the data of the slave server needs to be operated, and the master database on the master server has not synchronized this data at this time, the data will be operated on and synchronized to the two databases through the synchronous data line, and the subsequent process will be continued to complete the user's request, wherein the synchronous data line can also be called a data synchronization dedicated line.

[0046] The cloud service fault handling method includes:

[0047] Step 110, responding to the user request, and allocating the user request to the primary server and the secondary server according to a preset data allocation ratio.

[0048] In this embodiment, when a user initiates a request, in response to the user request, the resolved user request is allocated to the primary server and the secondary server according to a preset data allocation ratio through a DNS (Domain Name System) allocation method. In some embodiments, the data allocation ratio is modified according to the allocation frequency of the primary server and the secondary server in the historical allocation, and the data allocation ratio can be obtained through the fluctuation range training in the actual request.

[0049] Step 120: In response to the user request, the master server synchronizes database data with the slave server.

[0050] In this embodiment, when a user request is assigned to the master server, but needs to operate data in the slave server, and the master database has not yet synchronized the data, the data needs to be synchronized to the master database through the synchronous data line to synchronize the data in the databases of the master server and the slave server.

[0051] Step 130: When a database data synchronization failure is detected, the cause of the data synchronization failure is analyzed.

[0052] In this embodiment, when a failure in database data synchronization is detected, the cause of the data synchronization failure is analyzed, wherein the cause of the data synchronization failure includes a synchronization data line failure, high bandwidth pressure on the synchronization data line, etc. When the cause of the data synchronization failure is a synchronization data line failure, the database data of the master server and the slave server cannot be synchronized through the synchronization data line; when the cause of the data synchronization failure is high bandwidth pressure on the synchronization data line, frequent synchronization data operations or untimely data synchronization may occur.

[0053] Step 140: When the reason for the failure of data synchronization is a failure of the synchronization data line, a temporary data line is constructed so that the master server and the slave server can complete database data synchronization based on the temporary data line.

[0054] In this embodiment, when the reason for data synchronization failure is a failure of the synchronous data line, the database data of the master server and the slave server cannot be synchronized through the synchronous data line. At this time, a temporary data line needs to be built between the master database and the slave database. The master server accesses the slave server through the temporary data line, thereby synchronizing the database data of the master server and the slave server.

[0055] In the above embodiment, in response to user requests, the user requests are allocated to the master server and the slave server according to a preset data allocation ratio. In response to the user requests, the master server and the slave server synchronize database data. When a failure in database data synchronization is detected, the cause of the failure in data synchronization is analyzed. When the cause of the failure in data synchronization is a failure in the synchronization data line, a temporary data line is constructed so that the master server and the slave server can complete database data synchronization based on the temporary data line. In this way, by analyzing the cause of the failure in data synchronization and then synchronizing the database data of the master server and the slave server through the temporary data line, the situation in which service problems occur due to the failure of the synchronization data line to synchronize the data of the master and slave databases in time is effectively reduced, thereby ensuring the integrity and accuracy of the service.

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

[0057] When the reason for the data synchronization failure is not a synchronous data line failure, determining whether the synchronous data line is in a congested state;

[0058] When the synchronous data line is in a congested state, readjusting the data allocation ratio requested by the user;

[0059] The user requests are reallocated to the master server and the slave server according to the readjusted data allocation ratio.

[0060] In one embodiment, the step of constructing a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes:

[0061] Establishing a temporary data line, and determining whether the temporary data line is in a congested state;

[0062] When the temporary data line is not in a congested state, the master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

[0063] In this embodiment, after the temporary data line is constructed, the usage of the temporary data line needs to be detected, that is, to determine whether the temporary data line is in a congested state. When the temporary data line is not in a congested state, it indicates that the temporary data line is in normal use. The main server is controlled to access the slave server through the temporary data line to complete database data synchronization.

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

[0065] When the temporary data line is in a congested state, an identifier is added to the user request, the identifier is used to indicate a target server to which the user request is assigned when it is re-initiated, the target server being one of a master server and a slave server;

[0066] Based on the identifier, assigning the user request to the target server;

[0067] The data corresponding to the user request is stored in the database of the target server based on the public network, thereby completing the database data synchronization.

[0068] In this embodiment, when the temporary data line is in a congested state, the temporary data line has excessive bandwidth pressure or network interruption, etc., then the user request needs to be re-initiated to avoid the situation where the data is not synchronized to the master database and the slave database. In this embodiment, an identifier is attached to the user request to indicate the target server to be assigned to the re-initiated user request. The target server can be a master server or a slave server. After resolving the identifier through DNS, the target server to be assigned to the user request is obtained, and the user request is assigned to the target server. The target server stores the data requested by the user in the database corresponding to the target server, and then responds to the data synchronization request through the public network, and forwards the user request, thereby realizing database data synchronization.

[0069] In one embodiment, the step of determining whether the data line is in a congested state includes:

[0070] Acquire a value of a relevant parameter characterizing the usage of the data line, and compare the value of the relevant parameter characterizing the usage of the data line with a corresponding threshold;

[0071] When the value of the relevant parameter characterizing the usage of the data line is greater than the corresponding threshold, it is determined that the data line is in a congested state.

[0072] In this embodiment, when the reason for the failure of data synchronization is not a synchronous data line failure, it is determined whether the synchronous data line is in a congested state. Specifically, the value of the relevant parameter representing the usage of the synchronous data line is obtained, and the value of the relevant parameter representing the usage of the synchronous data line is compared with the corresponding threshold value; when the value of the relevant parameter representing the usage of the synchronous data line is greater than the corresponding threshold value, the data allocation ratio of the user request is readjusted; according to the readjusted data allocation ratio, the user request is reallocated to the master server and the slave server.

[0073] In this embodiment, when the reason for data synchronization failure is not a synchronous data line failure, that is, the reason is that the bandwidth pressure of the synchronous data line is high, it will lead to frequent synchronous data operations or untimely data synchronization. At this time, the usage of the synchronous data line needs to be detected. That is to say, in a certain period of time, the frequency of the master server accessing the slave database through the synchronous data line is much higher than other times, or the frequency of the master server accessing the slave database is higher than the frequency of the slave server accessing the master database. At this time, the usage of the synchronous data line is abnormal, and it can be determined that the bandwidth pressure of the synchronous data line is high. In this embodiment, by comparing the value of the relevant parameter characterizing the usage of the synchronous data line with the corresponding threshold, when the value of the relevant parameter characterizing the usage of the synchronous data line is greater than the corresponding threshold, the data allocation ratio of the user request, that is, the DNS allocation ratio, is adjusted, and the user request is redistributed to the master server and the slave server according to the readjusted data allocation ratio. In some embodiments, a part of the request to the master server is allocated to the slave server to improve the average response speed of the service while alleviating the pressure of the dedicated line and ensuring the robustness of the service.

[0074] In this embodiment, the step of building a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes:

[0075] Constructing a temporary data line, obtaining a value of a relevant parameter characterizing a usage condition of the temporary data line, and comparing the value of the relevant parameter characterizing the usage condition of the temporary data line with a corresponding threshold value;

[0076] When the value of the relevant parameter characterizing the usage of the temporary data line is less than the corresponding threshold, the master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

[0077] In this embodiment, after the temporary data line is constructed, the usage of the temporary data line needs to be detected. Therefore, the value of the relevant parameter characterizing the usage of the temporary data line is compared with the corresponding threshold value. When the value of the relevant parameter characterizing the usage of the temporary data line is less than the corresponding threshold value, it indicates that the temporary data line is in normal use. The main server is controlled to access the slave server through the temporary data line to complete database data synchronization.

[0078] In some embodiments, when the master server accesses the slave server through a temporary data line, the operations involved include query or modification. If the operation involved is query, the value of the relevant parameter characterizing the usage of the temporary data line required for the temporary data line (such as bandwidth pressure) is small, and the database data of the master server and the slave server are synchronized through the temporary data line; if the operation involved is modification, the value of the relevant parameter characterizing the usage of the temporary data line required for the temporary data line (such as bandwidth pressure) is large, but still less than the corresponding threshold, and the database data of the master server and the slave server are also synchronized through the temporary data line.

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

[0080] When the value of the relevant parameter characterizing the usage of the temporary data line is greater than or equal to the corresponding threshold, an identifier is added to the user request, the identifier is used to indicate the target server to which the user request is assigned when it is re-initiated, and the target server is one of a master server and a slave server;

[0081] Based on the identifier, assigning the user request to the target server;

[0082] The data corresponding to the user request is stored in the database of the target server based on the public network, thereby completing the database data synchronization.

[0083] In this embodiment, when the value of the relevant parameter characterizing the use of the temporary data line is greater than or equal to the corresponding threshold value, the temporary data line has excessive bandwidth pressure or network interruption, and the user request needs to be re-initiated to avoid the situation where the data is not synchronized to the master database and the slave database. In this embodiment, an identifier is added to the user request to indicate the target server to be assigned to the re-initiated user request. The target server can be a master server or a slave server. After resolving the identifier through DNS, the target server to be assigned to the user request is obtained, and the user request is assigned to the target server. The target server stores the data requested by the user in the database corresponding to the target server, and then responds to the data synchronization request through the public network and forwards the user request, thereby realizing database data synchronization.

[0084] In some embodiments, an identifier is attached to the user request, and the identifier indicates that the target server to be assigned to the re-initiated user request is the master server. The user request is then assigned to the master server through DNS. After the master server stores the data requested by the user in the master database, a data synchronization request is sent to the public network, and the user request is forwarded to the slave server through the public network. The data requested by the user is then stored in the slave database by the slave server, thereby achieving database data synchronization. In some embodiments, an identifier is attached to the user request, and the identifier indicates that the target server to be assigned to the re-initiated user request is the slave server. The user request is then assigned to the slave server through DNS. After the slave server stores the data requested by the user in the slave database, a data synchronization request is sent to the public network, and the user request is forwarded to the master server through the public network. The data requested by the user is then stored in the master database by the master server, thereby achieving database data synchronization.

[0085] In some embodiments, when an identifier is added to a user request, the target server assigned to the re-initiated user request may be a primary server or a secondary server, regardless of the server to which the user request was most recently assigned. That is, when the server to which the user request was most recently assigned is the primary server, when an identifier is added to the user request, the identifier may indicate assignment to the primary server or to the secondary server.

[0086] In some embodiments, in order to facilitate subsequent statistics on the frequency of access to the main server and the slave server, the DNS allocation ratio is modified according to the frequency of access. Preferably, when the server to which the most recent user request is assigned is the main server, an identifier is attached to the user request, which is an identifier indicating that the user request is assigned to the slave server. That is to say, when the server to which the most recent user request is assigned is the main server, the target server is the slave server, and the user request is assigned to the slave server through DNS. After the slave server stores the data requested by the user in the slave database, it sends a data synchronization request to the public network, forwards the user request to the main server through the public network, and then stores the data requested by the user in the main database through the main server, thereby realizing database data synchronization. Similarly, when the server to which the most recent user request was assigned is a slave server, an identifier is attached to the user request, which is an identifier indicating that the user request is assigned to the master server. That is to say, when the server to which the most recent user request was assigned is a slave server, the target server is the master server, and the user request is assigned to the master server through DNS. After the master server stores the data requested by the user in the master database, it sends a data synchronization request to the public network, forwards the user request to the slave server through the public network, and then stores the data requested by the user in the slave database through the slave server, thereby realizing database data synchronization.

[0087] In one embodiment, the step of constructing a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes:

[0088] Building the temporary data line based on a temporary virtual private network;

[0089] The master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

[0090] In this embodiment, a temporary VPN (Virtual Private Network) entrance is set in the cloud service system, and a temporary data line is constructed using the temporary VPN entrance. The main server is controlled to access the slave server through the temporary data line through temporary authorization to obtain data information from the slave database, thereby completing database data synchronization.

[0091] In one embodiment, before the step of synchronizing database data between the master server and the slave server in response to the user request, the method further includes:

[0092] Determining a processing order of each of the user requests based on the user identity information corresponding to the user requests;

[0093] According to the processing order of the user requests, each of the user requests is responded to and the user requests are allocated to a corresponding server, where the server is a master server or a slave server.

[0094] In this embodiment, since the temporary data line constructed by the temporary virtual private network is not as stable as the synchronous data line, its service response speed is reduced. Therefore, it is necessary to determine the processing order of each user request based on the user identity information corresponding to the user request, that is, to sort each user request according to the priority, and respond to the user request according to the processing order of the user request, so as to give priority to and synchronize the user requests with a higher priority, and assign the user request to the corresponding server. In some embodiments, when a more serious fault occurs, such as the value of the relevant parameter characterizing the use of the temporary data line (such as bandwidth pressure) is large, but still less than the corresponding threshold, at this time, the temporary data line has a certain bandwidth pressure, and therefore, it can be processed and synchronized with priority or only the user requests with a higher priority (higher priority) can be processed and synchronized.

[0095] It should be understood that although Figure 1The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0096] Embodiment 2

[0097] In this embodiment, Figure 4 As shown, a cloud service fault handling method is provided, including:

[0098] When the user initiates a request, the resolved request is allocated to service S1 and service S2 in a certain proportion by allocating DNS. When the request is allocated to service S1, but the data of service S2 needs to be operated, and the database D1 on service S1 has not synchronized this data, the data will be operated and synchronized to the two databases D1 and D2 through the synchronous data line, and the subsequent process will continue to complete the user's request. Among them, the cloud service system is deployed on cloud servers S1 and S2 respectively in a master-slave active-active manner. The cloud service system is equipped with a temporary VPN entrance, which can obtain information from another database through temporary authorization. The database D1 of service S1 and the database D2 of S2 are connected through a synchronous data line, and the data will be synchronized after certain instructions or time slices are triggered. Among them, when the master server is S1, the slave server is S2, and when the master server is S2, the slave server is S1.

[0099] In this embodiment, it is assumed that cloud service S1 is the master server and cloud service S2 is the slave server. The databases deployed on them are also divided into master databases and slave databases. The failures described here are all based on the example of DNS resolving user requests to service S1. If DNS resolves to service S2, the same applies.

[0100] In this embodiment, when the bandwidth pressure of the synchronous data line is high, the synchronous data operations are frequent or the data synchronization is not timely, the dedicated line usage is first detected. That is, within a certain period of time, the frequency of service S1 accessing database D2 through the dedicated line is significantly higher than other times, or the frequency of service S1 accessing D2 is much higher than the frequency of service S2 accessing D1, that is, the DNS resolution allocation is unreasonable. The DNS allocation ratio is modified through the script, and a part of the requests to server S1 is allocated to server S2, thereby improving the average response speed of the service while alleviating the dedicated line pressure and ensuring the robustness of the service.

[0101] In this embodiment, when the synchronous data line fails and data cannot be synchronized through the dedicated line, if service S1 detects that it cannot access the data of database D2 through the dedicated line, some preset temporary encryption schemes can be used (such as whether the user information, token, and temporary VPN conditions of the service that initiated the request are met). Specifically, based on the user identity information corresponding to the user request, the processing order of each user request is determined, that is, each user request is sorted according to the priority, and the user request is responded to and controlled according to the processing order of the user request, so as to give priority to and synchronize the user request with the front (high priority). A temporary data line is constructed through a temporary VPN entrance to synchronize the database data of service S1 and service S2 through the temporary data line. After the synchronous data line is repaired, the temporary data line is closed. Among them, the database access behavior is divided into two situations: query and modify (add / delete / modify and other operations). If it is just a query, it does not involve changing the database content; if it is add / delete / modify and involves modifying the database content, the operation consumes more time than the query, and the pressure on the dedicated line bandwidth is greater. In addition, the authorization information of the temporary data line is persisted in the server's cache. When the authorization information of the temporary data line is persisted and the dedicated line fails, service S1 is directly controlled to access service S2 through the temporary data line to synchronize the databases of service S1 and service S2. When the authorization information of the temporary data line is persisted and the dedicated line is normal, the temporary data line is closed.

[0102] After the temporary data line is built, the usage of the temporary data line is checked. If the bandwidth pressure of the temporary data line is too high or there is a network interruption, etc., an identification bit is added to the user request and the user request is re-initiated. When the DNS resolves the identification bit, it is directed to the corresponding server (assuming it is assigned to S2). After S2 operates D2, the data synchronization request is forwarded to S1 through the public network, and then the data requested by the user is stored in D1 through S1, thereby realizing database data synchronization. It should be noted that the cause of failure in this method does not include failures caused by system reasons. Such failures can be repaired by configuring restart and other methods.

[0103] In this embodiment, it is possible to avoid service problems caused by failure to synchronize the data of the master and slave libraries in time due to network interruption failure of the dedicated line during service active-active deployment, thereby ensuring the integrity and accuracy of the service. In the process of active-active deployment of cloud services, when a synchronization data line fails, the dedicated line failure type is analyzed through data analysis methods, and the access policy of the slave service is adjusted by building a temporary data line, adjusting the DNS resolution allocation ratio, etc., so that the data can be successfully acquired / operated while ensuring the response speed and stability of the service.

[0104] Embodiment 3

[0105] In this embodiment, Figure 2 As shown, a cloud service fault handling device is provided, comprising:

[0106] A request allocation module 210, configured to respond to user requests and allocate the user requests to the master server and the slave server according to a preset data allocation ratio;

[0107] A synchronization module 220, configured to synchronize database data between the master server and the slave server in response to the user request;

[0108] The fault acquisition module 230 is used to analyze the cause of the data synchronization failure when a database data synchronization failure is detected;

[0109] The control module 240 is used to build a temporary data line when the reason for the failure of data synchronization is a failure of the synchronization data line, so that the master server and the slave server can complete database data synchronization based on the temporary data line.

[0110] In one embodiment, the cloud service fault handling device further includes:

[0111] A dedicated line judgment module, used to judge whether the synchronous data line is in a congested state when the reason for the data synchronization failure is not a synchronous data line failure;

[0112] A ratio adjustment module, used for readjusting the data allocation ratio requested by the user when the synchronous data line is in a congested state;

[0113] The reallocation module is used to reallocate the user request to the master server and the slave server according to the readjusted data allocation ratio.

[0114] In one embodiment, the control module 240 includes:

[0115] A first construction unit, configured to construct a temporary data line and determine whether the temporary data line is in a congested state;

[0116] The control unit is used to control the master server to access the slave server through the temporary data line to complete database data synchronization when the temporary data line is not in a congested state.

[0117] In one embodiment, the control module 240 further includes:

[0118] an identification unit, used for adding an identification to the user request when the temporary data line is in a congested state, the identification being used for indicating a target server to which the user request is assigned when it is re-initiated, the target server being one of a master server and a slave server;

[0119] an allocating unit, configured to allocate the user request to the target server based on the identifier;

[0120] The storage unit is used to store the data corresponding to the user request in the database of the target server based on the public network, thereby completing the database data synchronization.

[0121] In one embodiment, the cloud service fault handling device further includes:

[0122] a comparing unit, configured to obtain a value of a relevant parameter characterizing the usage of the data line, and compare the value of the relevant parameter characterizing the usage of the data line with a corresponding threshold;

[0123] The judging unit is configured to judge that the data line is in a congested state when the value of the relevant parameter characterizing the usage of the data line is greater than a corresponding threshold value.

[0124] In one embodiment, the control module 240 further includes:

[0125] A second construction unit, configured to construct the temporary data line based on a temporary virtual private network;

[0126] The synchronization unit is used to control the master server to access the slave server through the temporary data line to complete database data synchronization.

[0127] In one embodiment, the cloud service fault handling device further includes:

[0128] An order determination unit, configured to determine a processing order of each of the user requests based on user identity information corresponding to the user requests;

[0129] A response control unit is used to respond to each user request according to the processing order of the user requests, and allocate the user request to a corresponding server, where the server is a master server or a slave server.

[0130] Embodiment 4

[0131] On the basis of the above embodiments, this embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method described in the above embodiments.

[0132] In some implementations of this embodiment, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.

[0133] In some implementations of this embodiment, a computer program product is provided, including a computer program / instructions, characterized in that when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.

[0134] The processor may include, but is not limited to, one or more processors or microprocessors, etc. Each processor may be an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a controller, a microcontroller, a microprocessor or other electronic components to execute the methods in the above embodiments.

[0135] The computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, and the computer-readable storage medium may include but is not limited to, for example, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (e.g., hard disk, floppy disk, solid-state drive, removable disk, CD-ROM, DVD-ROM, Blu-ray disc, etc.).

[0136] The computer-readable storage medium may also store at least one computer executable program / instruction, which may be, for example, a computer-readable instruction. The computer-readable storage medium includes, but is not limited to, for example, a volatile memory and / or a non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The computer-readable storage medium may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. For example, a non-transitory computer-readable storage medium may be connected to a computing device such as a computer, and then, when the computing device runs the computer-readable instructions stored on the computer-readable storage medium, the various methods described above may be performed.

[0137] In addition, the computer device may also include (but not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (eg, keyboard, mouse, speaker, etc.), etc.

[0138] The processor may communicate with external devices via an I / O bus via a wired or wireless network.

[0139] In one embodiment, the at least one computer executable instruction may also be compiled into or constitute a software product / computer program product, wherein one or more computer executable instructions are executed by a processor to perform the various functions and / or method steps in the embodiments described in the present technology.

[0140] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] It should be noted that in the present disclosure, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element limited by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0142] Although the embodiments disclosed in the present disclosure are as above, the above contents are only embodiments adopted for facilitating the understanding of the present disclosure and are not intended to limit the present disclosure. Any technician in the technical field to which the present disclosure belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present disclosure, but the scope of patent protection of the present disclosure shall still be subject to the scope defined in the attached claims.

Claims

1. A cloud service fault handling method, applied to a cloud service system, characterized in that: The cloud service system includes a master server provided with a master database and a slave server provided with a slave database, wherein database data synchronization is achieved between the master server and the slave server via a synchronous data line, and the method includes: In response to a user request, allocating the user request to the master server and the slave server according to a preset data allocation ratio; In response to the user request, the master server synchronizes database data with the slave server; When database data synchronization failure is detected, analyze the cause of the data synchronization failure; When the reason for the failure of data synchronization is a failure of the synchronization data line, a temporary data line is constructed so that the master server and the slave server can complete database data synchronization based on the temporary data line.

2. The cloud service fault handling method according to claim 1, characterized in that: The method further comprises: When the reason for the data synchronization failure is not a synchronous data line failure, determining whether the synchronous data line is in a congested state; When the synchronous data line is in a congested state, readjusting the data allocation ratio requested by the user; The user requests are reallocated to the master server and the slave server according to the readjusted data allocation ratio.

3. The cloud service fault handling method according to claim 1, characterized in that: The step of constructing a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes: Establishing a temporary data line, and determining whether the temporary data line is in a congested state; When the temporary data line is not in a congested state, the master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

4. The cloud service fault handling method according to claim 3, characterized in that: The method further comprises: When the temporary data line is in a congested state, an identifier is added to the user request, the identifier is used to indicate a target server to which the user request is assigned when it is re-initiated, the target server being one of a master server and a slave server; Based on the identifier, assigning the user request to the target server; The data corresponding to the user request is stored in the database of the target server based on the public network, thereby completing the database data synchronization.

5. The cloud service fault handling method according to any one of claims 2 to 4, characterized in that: The steps of determining whether the data line is in a congested state include: Acquire a value of a relevant parameter characterizing the usage of the data line, and compare the value of the relevant parameter characterizing the usage of the data line with a corresponding threshold; When the value of the relevant parameter characterizing the usage of the data line is greater than the corresponding threshold, it is determined that the data line is in a congested state.

6. The cloud service fault handling method according to claim 1, characterized in that: The step of constructing a temporary data line so that the master server and the slave server can complete database data synchronization based on the temporary data line includes: Building the temporary data line based on a temporary virtual private network; The master server is controlled to access the slave server through the temporary data line to complete database data synchronization.

7. The cloud service fault handling method according to claim 1, characterized in that: The number of user requests is multiple; Before the step of synchronizing database data between the master server and the slave server in response to the user request, the method further includes: Determining a processing order of each of the user requests based on the user identity information corresponding to the user requests; According to the processing order of the user requests, each of the user requests is responded to and the user requests are allocated to a corresponding server, where the server is a master server or a slave server.

8. A computer device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Double-link double-server voice dispatching system and redundant backup method

    CN103944697A

  • Message processing method and device

    CN110855465A

  • State management method, master and backup application server switching method, and electronic device

    EP4068099A1