Data transmission method and apparatus

By using multiple data links for data transmission and deduplication in a multi-data center and multi-active architecture, the data synchronization abnormality caused by the degradation of the stability of a dedicated physical line is solved, and the stability and accuracy of data transmission are improved. .

WO2024240181A1PCT designated stage expired Publication Date: 2024-11-28DOUYIN VISION CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/094685
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-22
Filing Date
2024-05-22
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

The special physical lines between data centers in multi-data centers and multi-active architectures have reduced stability due to long distances, which is prone to data synchronization abnormalities.

Method used

By selecting at least two links between multiple data links for data transmission and deduplication processing at the receiving end, the stability and accuracy of data synchronization are ensured.

Benefits of technology

Even if some data links have abnormalities, it can ensure the normal transmission and reception of data to be synchronized, avoiding the stability of data transmission between data centers dependent on the stability of a single line, and ensuring the integrity of data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024094685_28112024_PF_FP_ABST
    Figure CN2024094685_28112024_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the technical field of data synchronization. Provided are a data transmission method and a server. The method comprises: receiving a destination address, which is sent by a third server at a second data center, wherein the destination address is the address of a fourth server at the second data center; according to the destination address, determining a plurality of data links between same and the third server; receiving data to be synchronized, which is sent by a second server; and respectively sending said data to the third server by means of at least two data links among the plurality of data links, so that the third server sends said data, which is received by the third server, to the fourth server, wherein said data which is sent to the fourth server is subjected to de-duplication processing by means of the fourth server, and data synchronization is performed at the second data center according to data to be synchronized, which is left after de-duplication processing. The embodiments of the present application are used for improving the stability of data synchronization between data centers of a multi-data-center multi-active architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method and device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims the benefit of Chinese Patent Application No. 202310582888.3 filed on May 22, 2023. The entire teachings of the above application are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a data transmission method and device. Background Art

[0004] A multi-data center, multi-active architecture provides services simultaneously across multiple data centers deployed in multiple locations. If a catastrophic failure occurs in one of the data centers, traffic from the failed data center can be redirected to other data centers, mitigating the impact and improving service stability.

[0005] A key technical point of the multi-data center multi-active architecture is to ensure the consistency of the data in the data centers. In the prior art, the method of synchronizing data between data centers in the multi-data center multi-active architecture is to lay dedicated physical lines between the data centers, and transmit the data that needs to be synchronized between the data centers through the laid dedicated physical lines, so as to achieve data synchronization between the data centers in the multi-data center multi-active architecture. With the development of globalization, the distance between different data centers in the multi-data center multi-active architecture may become very far. The longer distance between data centers makes the dedicated physical lines between the data centers longer, which leads to a decrease in the stability of the dedicated physical lines between the data centers, and it is very easy for the dedicated physical lines to be abnormal, and the data centers in the multi-data center multi-active architecture cannot be synchronized.

[0006] Summary of the Invention

[0007] In view of this, an embodiment of the present application provides a data transmission method and apparatus for improving the stability of data transmission between data centers in a multi-data center multi-active architecture.

[0008] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:

[0009] In a first aspect, an embodiment of the present application provides a data transmission method, applied to a first server deployed in a first data center, where a second server is also deployed. The method includes:

[0010] receiving a destination address sent by a third server of the second data center, where the destination address is an address of a fourth server of the second data center;

[0011] determining, according to the destination address, a plurality of data links with the third server;

[0012] receiving the data to be synchronized sent by the second server;

[0013] The data to be synchronized is sent to the third server respectively through at least two data links among the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, the data to be synchronized sent to the fourth server is deduplicated by the fourth server, and data synchronization is performed on the second data center based on the data to be synchronized retained after deduplication.

[0014] As an optional implementation of the embodiment of the present application, before receiving the destination address sent by the third server in the second data center, the method further includes:

[0015] An address request is sent to the third server, where the address request is used to request an address of a server that receives the data to be synchronized.

[0016] As an optional implementation of the embodiment of the present application, the method further includes:

[0017] determining a link quality of each of the plurality of data links;

[0018] The at least two data links are determined from the multiple data links according to the link qualities.

[0019] As an optional implementation of the embodiment of the present application, the first server includes: a system process, a work process for providing services, and a management process for managing the work process; the method further includes:

[0020] After triggering the update of the first server and completing the update of the executable file, sending a first instruction to the management process through the system process, wherein the first instruction is used to instruct the management process to create and start a new working process;

[0021] After completing the startup of the new work process, a second instruction is sent to the original work process through the new work process, wherein the second instruction is used to instruct the original work process to no longer receive new connections, monitor the number of existing connections, and exit when the number of existing connections is zero.

[0022] In a second aspect, an embodiment of the present application provides a data transmission method, which is applied to a third server deployed in a second data center, where a fourth server is also deployed. The method includes:

[0023] receiving an address request sent by a first server in a first data center;

[0024] Determine a destination address, where the destination address is the address of the fourth server;

[0025] Sending the destination address to the first server;

[0026] receiving the data to be synchronized sent by the first server through at least two of the multiple data links between the first server and the third server, respectively; the multiple data links are multiple data links between the first server and the third server determined based on the destination address;

[0027] The received data to be synchronized is sent to the fourth server, so that the fourth server performs deduplication processing on the received data to be synchronized, and synchronizes data with the second data center based on the data to be synchronized retained after the deduplication processing.

[0028] As an optional implementation of the embodiment of the present application, determining the destination address includes:

[0029] When the destination address is stored in the memory of the third server, reading the destination address from the memory of the third server;

[0030] When the destination address is not stored in the memory of the third server, a remote dictionary service is called to obtain the destination address.

[0031] As an optional implementation of the embodiment of the present application, the method further includes:

[0032] After successfully acquiring the destination address by calling the remote dictionary service, the destination address is written into the memory of the third server.

[0033] As an optional implementation of the embodiment of the present application, the method further includes:

[0034] In the case that the remote dictionary service call fails or the remote dictionary service call fails to obtain the destination address, the destination address is obtained based on a preset algorithm.

[0035] As an optional implementation of the embodiment of the present application, the method further includes:

[0036] In the case where the remote dictionary service call fails, after obtaining the destination address based on a preset algorithm, writing the destination address into the memory of the receiving-end synchronization server;

[0037] In the case that the destination address fails to be acquired by calling the remote dictionary service, after acquiring the destination address based on a preset algorithm, the destination address is updated into the remote dictionary service.

[0038] In a third aspect, an embodiment of the present application provides a server, which is deployed in a first data center. A second server is also deployed in the first data center. The server includes:

[0039] a receiving unit, configured to receive a destination address sent by a third server of the second data center, where the destination address is an address of a fourth server of the second data center;

[0040] a processing unit, configured to determine, based on the destination address, a plurality of data links between the server and the third server;

[0041] The receiving unit is further configured to receive the data to be synchronized sent by the second server;

[0042] A sending unit is used to send the data to be synchronized to the third server through at least two data links among the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, the data to be synchronized sent to the fourth server is deduplicated by the fourth server, and data synchronization is performed on the second data center based on the data to be synchronized retained after deduplication.

[0043] As an optional implementation of the embodiment of the present application, the sending unit is also used to send an address request to the third server before the receiving unit receives the destination address sent by the third server of the second data center, and the address request is used to request the address of the server that receives the data to be synchronized.

[0044] As an optional implementation of the embodiment of the present application, the sending unit is further used to determine the link quality of each data link in the multiple data links; and determine the at least two data links from the multiple data links based on the link quality.

[0045] As an optional implementation of an embodiment of the present application, the first server includes: a system process, a work process for providing services, and a management process for managing the work process; the processing unit is also used to trigger an update of the first server and complete the update of the executable file, and then send a first instruction to the management process through the system process, and the first instruction is used to instruct the management process to create and start a new work process; after completing the startup of the new work process, send a second instruction to the original work process through the new work process, and the second instruction is used to instruct the original work process to no longer receive new connections, monitor the number of existing connections, and exit when the number of existing connections is zero.

[0046] In a fourth aspect, an embodiment of the present application provides a server, wherein the server is deployed in a second data center, and a fourth server is further deployed in the second data center, and the server includes:

[0047] a receiving unit, configured to receive an address request sent by a first server in a first data center, wherein the address request is used to request an address of a server for receiving data to be synchronized;

[0048] a processing unit, configured to determine the destination address, where the destination address is the address of the fourth server;

[0049] a sending unit, configured to send the destination address to the first server;

[0050] The receiving unit is further configured to respectively receive the data to be synchronized sent by the first server through at least two of the multiple data links between the first server and the first server; the multiple data links are multiple data links between the first server and the server determined based on the destination address;

[0051] The sending unit is further used to send the received data to be synchronized to the fourth server, so that the fourth server deduplicates the received data to be synchronized, and synchronizes data with the second data center based on the data to be synchronized retained after deduplication.

[0052] As an optional implementation of an embodiment of the present application, the processing unit is specifically used to read the destination address from the memory of the third server when the destination address is stored in the memory of the third server; when the destination address is not stored in the memory of the third server, call the remote dictionary service to obtain the destination address.

[0053] As an optional implementation of the embodiment of the present application, the processing unit is further configured to write the destination address into the memory of the third server after successfully acquiring the destination address by calling the remote dictionary service.

[0054] As an optional implementation of the embodiment of the present application, the processing unit is further configured to obtain the destination address based on a preset algorithm when the remote dictionary service call fails or the call to the remote dictionary service fails to obtain the destination address.

[0055] As an optional implementation of an embodiment of the present application, the processing unit is also used to, when the remote dictionary service call fails, write the destination address into the memory of the receiving-end synchronization server after obtaining the destination address based on a preset algorithm; when the remote dictionary service call fails to obtain the destination address, after obtaining the destination address based on a preset algorithm, update the destination address to the remote dictionary service.

[0056] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the data transmission method described in any of the above embodiments when executing the computer program.

[0057] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which, when the computer program is executed by a computing device, enables the computing device to implement the data transmission method described in any of the above embodiments.

[0058] In a seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to implement the data transmission method described in any one of the above-mentioned embodiments.

[0059] In the data transmission method provided in the embodiment of the present application, the first server deployed in the first data center first receives the destination address of the fourth server of the second data center sent by the third server of the second data center, and then determines multiple data links between the first server and the third server based on the destination address. When receiving the data to be synchronized sent by the second server of the first data center, the first server sends the data to be synchronized to the third server through at least two of the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, and the fourth server performs deduplication processing on the received data to be synchronized, and synchronizes the data of the second data center based on the data to be synchronized retained after the deduplication processing. On the one hand, since the data transmission method provided in the embodiment of the present application sends the data to be synchronized to the fourth server through at least two data links when the first data center needs to send the data to be synchronized to the second data center, the embodiment of the present application can avoid the stability of data transmission between data centers being strongly dependent on the stability of a single line, and even if some data links are abnormal, the normal transmission of the data to be synchronized can be guaranteed. On the other hand, the embodiment of the present application will first obtain the address of the fourth server of the second data center, and determine multiple data links between the fourth server and the third server based on the address of the fourth server. Therefore, the data to be synchronized sent through the at least two data links will all be sent to the fourth server, avoiding the need to send the data to be synchronized to different servers of the second data center through the at least two data links respectively, and ensuring that only one data to be synchronized will be retained after deduplication processing of the data to be synchronized received through the at least two data links. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0062] FIG1 is a scenario architecture diagram of a data transmission method provided in an embodiment of the present application;

[0063] FIG2 is a flowchart of the steps of the data transmission method provided in an embodiment of the present application;

[0064] FIG3 is an interactive flow chart of a data transmission method provided in an embodiment of the present application;

[0065] FIG4 is a flowchart of a method for obtaining a destination address provided in an embodiment of the present application;

[0066] FIG5 is a software architecture diagram of a server provided in an embodiment of the present application;

[0067] FIG6 is a schematic diagram of a server update process provided in an embodiment of the present application;

[0068] FIG7 is a schematic diagram of the structure of a server provided in an embodiment of the present application;

[0069] FIG8 is a schematic diagram of the structure of another server provided in an embodiment of the present application;

[0070] FIG9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to more clearly understand the above-mentioned objectives, features and advantages of the present application, the scheme of the present application will be further described below. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.

[0072] The following description sets forth many specific details to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only a portion of the embodiments of the present application, not all of them.

[0073] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.

[0074] The following first describes the scenario architecture of the data transmission method provided in the embodiment of the present application.

[0075] As shown in Figure 1, the scenario architecture of the data transmission method provided in the embodiment of the present application includes: a first data center 100 and a second data center 200. The first data center 100 is deployed with multiple business servers 101 and a first synchronization server 102; the second data center 200 is deployed with multiple business servers 201 and a second synchronization server 202, and multiple data links are established between the first synchronization server 102 and the second synchronization server 202. When any business server 101 in the first data center 100 needs to send data to be synchronized to the second data center 200, the business server 101 first sends the data to be synchronized to the first synchronization server 102; then the first synchronization server 102 sends the data to be synchronized to the second synchronization server 202 through multiple data links between the first synchronization server 101 and the second synchronization server 202; the second synchronization server 202 forwards the received data to be synchronized to the designated business server 201, and finally the designated business server 201 performs deduplication processing on all the received data to be synchronized, and synchronizes data with the second data center 200 based on the data to be synchronized retained after the deduplication processing.

[0076] The synchronization server in the embodiment of the present application refers to a server in a data center used to implement data transmission between the data center and other data centers. It should be noted that Figure 1 shows an example in which the first synchronization server 102 and the second synchronization server 202 are both independent servers, but the embodiment of the present application is not limited to this. In some embodiments, the first synchronization server 102 can also be integrated into one or more business servers 101 of the first data center 100, and / or the second synchronization server 202 can be integrated into one or more business servers 201 of the second data center 200.

[0077] In the embodiments of the present application, a business server refers to a server in a data center that implements specific business functions or provides specific business services. For example, a business server may be a server that forwards messages in a communication service. Another example is a server that manages resources in a resource transfer service.

[0078] An embodiment of the present application provides a data transmission method, which is applied to a first server deployed in a first data center. The first data center also has a second server deployed therein. As shown in FIG. 2 , the data transmission method includes the following steps S21 to S24:

[0079] S21. Receive a destination address sent by a third server in the second data center.

[0080] The destination address is the address of the fourth server in the second data center.

[0081] The second server in the embodiment of the present application can be any business server selected by the second data center from the various business servers of the second data center based on a preset rule or algorithm, and the embodiment of the present application is not limited to this.

[0082] In some embodiments, the first server may obtain the destination address in the following manner:

[0083] Sending an address request to the third server, where the address request is used to request an address of a server that receives the data to be synchronized;

[0084] Receive the destination address sent by the third server of the second data center.

[0085] That is, the first server obtains the destination address from the second data center.

[0086] S22. Determine multiple data links with the third server according to the destination address.

[0087] In the embodiment of the present application, the multiple data links between the first server and the third server may include: data links established based on one or more of a physical dedicated line, a local area network, a metropolitan area network, a wide area network, etc.

[0088] In some embodiments, the plurality of data links are all long-connection data links, that is, the data links will not be disconnected immediately when there is no data to be transmitted.

[0089] When the multiple data links are all long connection data links, the embodiment of the present application can avoid frequent establishment of data links, thereby reducing performance consumption and data transmission delay.

[0090] S23: Receive the data to be synchronized sent by the second server.

[0091] The second server in the embodiment of the present application can be any business server in the first data center that needs to send data to be synchronized to the second data center.

[0092] S24. Send the data to be synchronized to the third server respectively through at least two data links among the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, the data to be synchronized sent to the fourth server is deduplicated by the fourth server, and data synchronization is performed on the second data center based on the data to be synchronized retained after deduplication.

[0093] In the data transmission method provided in the embodiment of the present application, the first server deployed in the first data center first receives the destination address of the fourth server of the second data center sent by the third server of the second data center, and then determines multiple data links between the first server and the third server based on the destination address. When receiving the data to be synchronized sent by the second server of the first data center, the first server sends the data to be synchronized to the third server through at least two of the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, and the fourth server performs deduplication processing on the received data to be synchronized, and synchronizes the data of the second data center based on the data to be synchronized retained after the deduplication processing. On the one hand, since the data transmission method provided in the embodiment of the present application sends the data to be synchronized to the fourth server through at least two data links when the first data center needs to send the data to be synchronized to the second data center, the embodiment of the present application can avoid the stability of data transmission between data centers being strongly dependent on the stability of a single line, and even if some data links are abnormal, the normal transmission of the data to be synchronized can be guaranteed. On the other hand, the embodiment of the present application will first obtain the address of the fourth server of the second data center, and determine multiple data links between the fourth server and the third server based on the address of the fourth server. Therefore, the data to be synchronized sent through the at least two data links will all be sent to the fourth server, avoiding the need to send the data to be synchronized to different servers of the second data center through the at least two data links respectively, and ensuring that only one data to be synchronized will be retained after deduplication processing of the data to be synchronized received through the at least two data links.

[0094] As an extension and refinement of the above embodiment, the embodiment of the present application provides another data transmission method. As shown in FIG3 , the data transmission method includes the following steps S301 to S311:

[0095] S301. A first server deployed in a first data center sends an address request to a third server deployed in the second data center.

[0096] Correspondingly, the third server deployed in the second data center receives the address request sent by the first server deployed in the first data center.

[0097] The address request is used to request the address of the server that receives the data to be synchronized.

[0098] S302: The third server determines the destination address.

[0099] The destination address is the address of the fourth server deployed in the second data center.

[0100] In some embodiments, as shown in FIG. 4 , the implementation method of the third server acquiring the destination address may include the following steps S41 to S44:

[0101] S41: Determine whether the destination address is stored in the memory of the third server.

[0102] In the above step S41, if the destination address is stored in the memory of the third server, the following step S42 is executed:

[0103] S42: Read the destination address from the memory of the third server.

[0104] In the above step S41, if the destination address is not stored in the memory of the third server, the following step S43 is executed:

[0105] S43: Call the remote dictionary service (Redis) to obtain the destination address.

[0106] In the above step S43, if the remote dictionary service is called to successfully obtain the destination address, the following step S44 is executed:

[0107] S44. Write the destination address into the memory of the third server.

[0108] Since the above embodiment writes the destination address into the memory of the third server after successfully obtaining the destination address by calling the remote dictionary service, the above embodiment can directly read the destination address from the memory of the third server the next time the destination address is obtained, thereby avoiding frequent calls to the remote dictionary service to obtain the destination address, and further reducing the performance overhead brought by determining the destination address.

[0109] In the above step S43, if the destination address cannot be obtained by calling the remote dictionary service, the following steps S45 and S46 are executed:

[0110] S45. Obtain the destination address based on a preset algorithm.

[0111] In some embodiments, the above step S45 (obtaining the destination address based on a preset algorithm) includes: selecting a server from the servers of the second data center based on a consistent hashing algorithm (such as the Ketama algorithm), and determining the address of the selected server as the destination address.

[0112] In some embodiments, the above-mentioned step S45 (obtaining the destination address based on a preset algorithm) includes: obtaining the resource occupancy rate (such as computing resource occupancy rate, memory resource occupancy rate, etc.) of each server in the second data center, and determining the address of the server with the smallest resource occupancy rate among the servers in the second data center as the destination address.

[0113] Since the destination address cannot be obtained by calling the remote dictionary service, the destination address is likely not recorded in the remote dictionary service. Therefore, the present application further performs the following step S46:

[0114] S46: Update the destination address to the remote dictionary service.

[0115] Exemplarily, the destination address may be updated to the remote dictionary service through a Redis Hsetnx command (a command used to assign a value to a field that does not exist in a hash table).

[0116] In the above step S43, if the remote dictionary service call fails, the following steps S47 and S48 are executed:

[0117] S47. Obtain the destination address based on a preset algorithm.

[0118] S48. Write the destination address into the memory of the third server.

[0119] Since the above embodiment writes the destination address into the memory of the third server after obtaining the destination address based on a preset algorithm, the above embodiment can directly read the destination address from the memory of the third server the next time the destination address is obtained, thereby avoiding frequent calls to the remote dictionary service to obtain the destination address, and thereby reducing the performance overhead brought about by determining the destination address.

[0120] S303: The third server sends the destination address to the first server.

[0121] Correspondingly, the first server receives the destination address sent by the third server.

[0122] S304: The first server determines multiple data links with the third server according to the destination address.

[0123] S305: The second server deployed in the first data center sends the data to be synchronized to the first server.

[0124] Correspondingly, the first server receives the data to be synchronized sent by the second server deployed in the first data center.

[0125] S306: The first server obtains link qualities of the multiple data links respectively.

[0126] The link quality of the data link in the embodiment of the present application may include: one or more of: a signal to interference plus noise ratio (SINR) of the data link, a delay of the data link, a received power of the data link, and the like.

[0127] S307: The first server determines the at least two data links from the multiple data links according to the link qualities.

[0128] In some implementations, the first server may select N data links with the best signal quality from the multiple data links as the at least two data links based on the link quality, where N is an integer greater than or equal to 2.

[0129] S308. The first server sends the data to be synchronized to the third server through the at least two data links respectively.

[0130] Correspondingly, the third server receives the data to be synchronized sent by the first server through the at least two data links respectively.

[0131] It should be noted that, since one of the at least two data links may fail, the number of data to be synchronized received by the third server is less than or equal to the number of data links used to send the data to be synchronized. For example, if the first server sends the data to be synchronized via five data links and all five data links are normal, the third server can receive five data to be synchronized. However, if one of the five data links fails, the third server can only receive four data to be synchronized.

[0132] S309: The third server sends the received data to be synchronized to the fourth server.

[0133] Correspondingly, the fourth server receives the data to be synchronized sent by the third server.

[0134] S310: The fourth server performs deduplication processing on the received data to be synchronized.

[0135] In some embodiments, the second server deduplicating the received data to be synchronized includes:

[0136] The identifiers of the received data to be synchronized are obtained, and only one of the data to be synchronized with the same identifier is retained.

[0137] Exemplarily, the identifier of the data to be synchronized may be an identification code (Identity document, ID) of the data to be synchronized.

[0138] S311. The fourth server synchronizes data with the second data center based on the data to be synchronized that is retained after deduplication processing.

[0139] As shown in FIG5 , in some embodiments, the synchronization server (including the first server and the third server) in the embodiment of the present application includes: a system process (systemctl) 51, a worker process (worker) 53 for providing services, and a management process (master) 52 for managing the worker process. The data transmission method provided in the embodiment of the present application also includes:

[0140] After triggering the update of the server and completing the update of the executable file, sending a first instruction to the management process through the system process, wherein the first instruction is used to instruct the management process to create and start a new working process;

[0141] After completing the startup of the new work process, a second instruction is sent to the original work process through the new work process, wherein the second instruction is used to instruct the original work process to no longer receive new connections, monitor the number of existing connections, and exit when the number of existing connections is zero.

[0142] Exemplarily, the first instruction may be a SIGHUP signal, and the second instruction may be a SIGTERM signal.

[0143] That is, as shown in FIG6 , the process of updating the first server includes the following steps a to g:

[0144] Step a: The system process obtains a new executable file and replaces the original executable file with the new executable file.

[0145] Step b: The system process sends a first instruction to the management process (master).

[0146] Step c: The management process creates (forks) and starts a new worker process (worker2).

[0147] Step d: The new worker process (worker2) sends a second instruction to the original worker process (worker1).

[0148] Step e: The original worker process (worker1) stops listening to the port, no longer accepts new connections, and monitors the number of existing connections.

[0149] Step f: The original working process (worker1) exits when the number of the existing connections is zero, and sends a notification message to the management process (master).

[0150] Step g: After receiving the notification message that the original working process (worker1) has exited, the management process (master) clears the process identifier (PID) of the old original working process (worker1).

[0151] The above embodiment, after triggering the update of the synchronization server and completing the update of the executable file, first creates and starts a new work process, and after completing the startup of the new work process, controls the original work process to no longer receive new connections, monitors the number of existing connections, and exits when the number of existing connections is zero. Therefore, the above embodiment can avoid affecting the data transmission on the established connection during the update of the server, and further avoid the update server affecting the stability of data synchronization between data centers. Therefore, the above embodiment can further improve the stability of data synchronization between data centers in a multi-data center multi-active architecture.

[0152] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides a server, which corresponds to the above method embodiment. For ease of reading, this embodiment will no longer repeat the details of the above method embodiment one by one, but it should be clear that the server in this embodiment can correspond to and implement all the contents of the above method embodiment.

[0153] An embodiment of the present application provides a server, which is deployed in a first data center. A second server is also deployed in the first data center. FIG7 is a schematic diagram of the structure of the server. As shown in FIG7 , the server 700 includes:

[0154] A receiving unit 71 is configured to receive a destination address sent by a third server in a second data center, where the destination address is an address of a fourth server in the second data center;

[0155] a processing unit 72, configured to determine, based on the destination address, a plurality of data links with the third server;

[0156] The receiving unit 71 is further used to receive the data to be synchronized sent by the second server;

[0157] The sending unit 73 is used to send the data to be synchronized to the third server through at least two data links among the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, the data to be synchronized sent to the fourth server is deduplicated by the fourth server, and the second data center is synchronized according to the data to be synchronized retained after deduplication.

[0158] As an optional implementation of an embodiment of the present application, the sending unit 73 is also used to send an address request to the third server before the receiving unit receives the destination address sent by the third server of the second data center, and the address request is used to request the address of the server that receives the data to be synchronized.

[0159] As an optional implementation of the embodiment of the present application, the sending unit 73 is further used to determine the link quality of each data link in the multiple data links; and determine the at least two data links from the multiple data links based on the link quality.

[0160] As an optional implementation of an embodiment of the present application, the first server includes: a system process, a work process for providing services, and a management process for managing the work process; the processing unit is also used to trigger an update of the first server and complete the update of the executable file, and then send a first instruction to the management process through the system process, and the first instruction is used to instruct the management process to create and start a new work process; after completing the startup of the new work process, send a second instruction to the original work process through the new work process, and the second instruction is used to instruct the original work process to no longer receive new connections, monitor the number of existing connections, and exit when the number of existing connections is zero.

[0161] An embodiment of the present application provides another server, which is deployed in a second data center. A fourth server is also deployed in the second data center. FIG8 is a schematic diagram of the structure of the server. As shown in FIG8 , the server 800 includes:

[0162] The receiving unit 81 is configured to receive an address request sent by a first server in a first data center, wherein the address request is used to request an address of a server for receiving data to be synchronized;

[0163] a processing unit 82, configured to determine the destination address, where the destination address is the address of the fourth server;

[0164] A sending unit 83 is configured to send the destination address to the first server;

[0165] The receiving unit 81 is further configured to receive the data to be synchronized sent by the first server through at least two of the multiple data links between the first server and the first server; the multiple data links are multiple data links between the first server and the server determined based on the destination address;

[0166] The sending unit 83 is further used to send the received data to be synchronized to the fourth server, so that the fourth server deduplicates the received data to be synchronized, and synchronizes data with the second data center based on the data to be synchronized retained after deduplication.

[0167] As an optional implementation of an embodiment of the present application, the processing unit 82 is specifically used to read the destination address from the memory of the third server when the destination address is stored in the memory of the third server; when the destination address is not stored in the memory of the third server, call the remote dictionary service to obtain the destination address.

[0168] As an optional implementation of the embodiment of the present application, the processing unit 82 is further configured to write the destination address into the memory of the third server after successfully acquiring the destination address by calling the remote dictionary service.

[0169] As an optional implementation of the embodiment of the present application, the processing unit 82 is further configured to obtain the destination address based on a preset algorithm when the remote dictionary service call fails or the call to the remote dictionary service fails to obtain the destination address.

[0170] As an optional implementation of the embodiment of the present application, the processing unit 82 is further configured to write the destination address into the memory of the fourth server after obtaining the destination address based on a preset algorithm.

[0171] The server provided in this embodiment can execute the data transmission method provided in the above method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0172] Based on the same inventive concept, an embodiment of the present application further provides an electronic device. FIG9 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As shown in FIG9 , the electronic device provided in this embodiment includes: a memory 901 and a processor 902. The memory 901 is used to store a computer program, and the processor 902 is used to execute the data transmission method provided in the above embodiment when executing the computer program.

[0173] Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the computing device implements the data transmission method provided in the above embodiment.

[0174] Based on the same inventive concept, an embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computing device implements the data transmission method provided in the above embodiment.

[0175] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0176] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0177] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0178] Computer-readable media includes both permanent and non-permanent, removable and non-removable storage media. Storage media can implement any method or technology for storing information, which can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some or all of the technical features therein, and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A data transmission method, It is characterized in that Applied to a first server deployed in a first data center, where a second server is also deployed in the first data center, the method includes: receiving a destination address sent by a third server of the second data center, where the destination address is an address of a fourth server of the second data center; Determining, according to the destination address, a plurality of data links with the third server; Receiving the data to be synchronized sent by the second server; The data to be synchronized are respectively sent to the third server through at least two of the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, the data to be synchronized sent to the fourth server is deduplicated by the fourth server, and data synchronization is performed on the second data center based on the data to be synchronized retained after deduplication.

2. The method according to claim 1, It is characterized in that Before receiving the destination address sent by the third server of the second data center, the method further includes: An address request is sent to the third server, where the address request is used to request an address of a server that receives the data to be synchronized.

3. The method according to claim 1, It is characterized in that The method further comprises: determining a link quality of each of the plurality of data links; The at least two data links are determined from the multiple data links according to the link qualities.

4. The method according to any one of claims 1 to 3, It is characterized in that The first server includes: a system process, a work process for providing services, and a management process for managing the work process; the method further includes: After triggering the update of the first server and completing the update of the executable file, the system process sends a first instruction to the management process, and the first instruction Used to instruct the management process to create and start a new working process; After completing the startup of the new work process, a second instruction is sent to the original work process through the new work process, wherein the second instruction is used to instruct the original work process to no longer receive new connections, monitor the number of existing connections, and exit when the number of existing connections is zero.

5. A data transmission method, It is characterized in that Applied to a third server deployed in a second data center, where a fourth server is also deployed in the second data center, the method includes: Receiving an address request sent by a first server in a first data center, wherein the address request is used to request an address of a server for receiving data to be synchronized; Determine a destination address, where the destination address is the address of the fourth server; Sending the destination address to the first server; Receiving the data to be synchronized sent by the first server through at least two of the multiple data links between the first server and the third server respectively; the multiple data links are multiple data links between the first server and the third server determined based on the destination address; The received data to be synchronized is sent to the fourth server, so that the fourth server performs deduplication processing on the received data to be synchronized, and performs data synchronization on the second data center according to the data to be synchronized retained after the deduplication processing.

6. The method according to claim 5, It is characterized in that The determining the destination address includes: When the destination address is stored in the memory of the third server, reading the destination address from the memory of the third server; When the destination address is not stored in the memory of the third server, a remote dictionary service is called to acquire the destination address.

7. The method according to claim 6, It is characterized in that The method further comprises: After the remote dictionary service is called and the destination address is successfully acquired, the destination address is written into the memory of the third server.

8. The method according to claim 6, It is characterized in that The method further comprises: In the case that the remote dictionary service call fails or the remote dictionary service call fails to obtain the destination address, the destination address is obtained based on a preset algorithm.

9. The method according to claim 8, It is characterized in that The method further comprises: In the case where the remote dictionary service call fails, after obtaining the destination address based on a preset algorithm, writing the destination address into the memory of the receiving-end synchronization server; In the case that the destination address cannot be acquired by calling the remote dictionary service, after acquiring the destination address based on a preset algorithm, the destination address is updated to the remote dictionary service.

10. A server, wherein the server is deployed in a first data center, and a second server is also deployed in the first data center. It is characterized in that The server comprises: a receiving unit, configured to receive a destination address sent by a third server of the second data center, wherein the destination address is an address of a fourth server of the second data center; a processing unit, configured to determine, according to the destination address, a plurality of data links between the server and the third server; The receiving unit is further configured to receive the data to be synchronized sent by the second server; A sending unit is used to send the data to be synchronized to the third server respectively through at least two data links among the multiple data links, so that the third server sends the received data to be synchronized to the fourth server, the data to be synchronized sent to the fourth server is deduplicated by the fourth server, and data synchronization is performed on the second data center based on the data to be synchronized retained after deduplication.

11. A server, wherein the server is deployed in a second data center, and a fourth server is also deployed in the second data center. It is characterized in that The server comprises: A receiving unit, configured to receive an address request sent by a first server in a first data center, wherein the address request is used to request an address of a server for receiving data to be synchronized; a processing unit, configured to determine a destination address, wherein the destination address is an address of the fourth server; A sending unit, configured to send the destination address to the first server; The receiving unit is further configured to respectively receive the data to be synchronized sent by the first server through at least two of the multiple data links between the first server and the first server; the multiple data links are multiple data links between the first server and the server determined based on the destination address; The sending unit is further used to send the received data to be synchronized to the fourth server, so that the fourth server deduplicates the received data to be synchronized, and synchronizes data with the second data center based on the data to be synchronized retained after deduplication.

12. An electronic device, It is characterized in that include: A memory and a processor, wherein the memory is used to store a computer program and the processor is used to enable the electronic device to implement the data transmission method according to any one of claims 1 to 9 when executing the computer program.

13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the data transmission method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Multi-place multi-center data center dual-enabling method and system

    CN106506588A

  • Methods and systems for deploying multi-active data centers

    CN109819004A

  • Remote multi-activity disaster recovery method, system, device and readable storage medium

    CN110348826A

  • Data synchronization method and multi-active system

    CN116069860A

  • Systems and methods for obtaining ultra-high data availability and geographic disaster tolerance

    US20070195692A1