A data transmission system, method, apparatus, device and medium

By sending data processing requests from the target cluster server to the database server, and the database server locating and sending the target data based on the target identifier, the problems of high load on the cluster server and slow data transmission speed are solved, achieving more efficient data transmission.

CN115567528BActive Publication Date: 2026-03-24CHINA CONSTRUCTION BANK +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing multi-cluster systems, cluster servers need to cache a large amount of data over the network to obtain data from other cluster servers, resulting in high load pressure and slow data transmission speed.

Method used

The target cluster server sends a data processing request carrying the target data identifier to the database server. The database server searches for and sends the target data locally, and determines whether there are other cluster servers performing write processing. If not, it sends the target data directly; otherwise, it retrieves the modified target data and sends it.

Benefits of technology

It reduced the load on the target cluster servers and improved data transmission speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567528B_ABST
    Figure CN115567528B_ABST
Patent Text Reader

Abstract

The application relates to the distributed technical field, in particular to a data transmission system, method, device, equipment and medium. The data transmission system comprises a target cluster server and a database server. The target cluster server sends a data processing request to the database server, wherein the data processing request carries a target identifier of target data to be acquired. The database server receives the data processing request, finds the target data corresponding to the target identifier in locally saved data, and sends the target data to the target cluster server. Since the target cluster server sends the data processing request carrying the target identifier to the database server, the database server can determine the target data according to the target identifier and send the target data to the target cluster server, thereby avoiding the target cluster server from acquiring a large amount of data, reducing the load pressure of the target cluster server, and improving the data transmission speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of distributed technology, and in particular to a data transmission system, method, apparatus, device, and medium. Background Technology

[0002] Existing multi-cluster systems consist of multiple clusters, each containing a cluster server and at least one electronic device. These cluster servers may be located in different regions, use different networks, and store different data. During operation, the electronic devices within the clusters may need to access data stored on other cluster servers.

[0003] Specifically, each cluster server's caching system stores a large amount of data, and the data stored on each cluster server may differ. Therefore, when a cluster server needs to access data stored on other cluster servers, it accesses the caching system of those other cluster servers over the network, caches all the data in that system locally, and then retrieves the required data from its local cache. This data retrieval method requires the cluster servers to cache a large amount of data over the network, increasing the load on the cluster servers and also affecting data transmission speed. Summary of the Invention

[0004] This application provides a data transmission system, method, apparatus, device, and medium to solve the problems of high load pressure and slow data transmission speed of cluster servers in the prior art.

[0005] This application provides a data transmission system, the system comprising:

[0006] The target cluster server is used to send a data processing request to the database server, wherein the data processing request carries a target identifier of the target data to be acquired.

[0007] The database server is used to receive the data processing request, search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server;

[0008] The target cluster server is also used to receive the target data.

[0009] Furthermore, the database server is also used to determine whether there are other cluster servers currently writing the target data; if not, it executes the subsequent step of sending the target data to the target cluster server.

[0010] Furthermore, the database server is also configured to send a request to the other cluster server to return the modified target data if other cluster servers are currently writing to the target data.

[0011] The other cluster servers are also used to receive the return request; if the other cluster servers have completed the write processing of the target data, they send the modified target data information to the database server.

[0012] The database server is also configured to receive information about the modified target data; determine the target data to be sent to the target cluster server based on the information about the target data; and execute subsequent steps to send the target data to the target cluster server.

[0013] Furthermore, the database server is specifically configured to determine, if the target data is in a dedicated state, that there are other cluster servers currently performing write processing on the target data.

[0014] Furthermore, the other cluster servers are specifically used to send the modified target data and a first notification message of write processing completion to the database server if the other cluster servers have completed the write processing of the target data.

[0015] The database server is also configured to receive the modified target data, update the locally stored target data using the modified target data, and execute the subsequent step of sending the target data by the target cluster server; and modify the status corresponding to the target data to a shared status.

[0016] Furthermore, the database server is also configured to modify the state corresponding to the target data to a dedicated state if the data processing request is a write processing request and there are no other cluster servers performing write processing on the target data.

[0017] The target cluster server is further configured to send the modified target data and a second notification message to stop writing the target data to the database server if it is determined that the write processing of the target data has been completed.

[0018] The database server is also configured to update the locally stored target data using the modified target data, and modify the status corresponding to the target data to a shared status according to the second notification message.

[0019] Furthermore, the database server is also configured to, if the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state; if not, modify the state corresponding to the target data to a shared state.

[0020] The target cluster server is also used to determine if the read processing of the target data has been completed, and then send a third notification message to the database server to stop the read processing of the target data.

[0021] The database server is also used to determine whether there are other cluster servers currently performing read and write processing on the target data; if not, the state of the target data is changed to stateless according to the third notification message; if there are other cluster servers performing read processing on the target data, the state of the target data is kept unchanged.

[0022] Furthermore, the target cluster server is specifically configured to determine that the write processing of the target data has been completed if it receives an indication that the write processing is complete; or, if the target data has not been modified within a set time period, determine that the write processing of the target data has been completed.

[0023] This application embodiment also provides a data transmission method applied to a target cluster server, the method comprising:

[0024] Send a data processing request to the database server, wherein the data processing request carries the target identifier of the target data to be acquired;

[0025] Receive the target data.

[0026] Furthermore, the method also includes:

[0027] If the data processing request is a read processing request, and it is determined that the write processing of the target data has been completed, then the modified target data and a second notification message to stop writing the target data are sent to the database server.

[0028] Furthermore, the method also includes:

[0029] If the data processing request is a read processing request, and it is determined that the read processing of the target data has been completed, a third notification message to stop the read processing of the target data will be sent to the database server.

[0030] Furthermore, the determination that the write processing of the target data has been completed includes:

[0031] If an instruction indicating that the write process is complete is received, it is determined that the write process on the target data has been completed; or, if the target data has not been modified within a set time period, it is determined that the write process on the target data has been completed.

[0032] This application also provides a data transmission method applied to a database server, the method comprising:

[0033] Receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired;

[0034] The target data corresponding to the target identifier is searched in the locally stored data, and the target data is sent to the target cluster server.

[0035] Furthermore, before sending the target data to the target cluster server, the method further includes:

[0036] Determine whether there are other cluster servers currently writing to the target data;

[0037] If not, proceed with the subsequent step of sending the target data to the target cluster server.

[0038] Furthermore, before sending the target data to the target cluster server, the method further includes:

[0039] If other cluster servers are currently writing to the target data, a request to return the modified target data is sent to those other cluster servers.

[0040] Receive information about the modified target data sent by the other cluster servers;

[0041] Based on the information in the target data, determine the target data to be sent to the target cluster server, and then execute the subsequent steps of sending the target data to the target cluster server.

[0042] Furthermore, the process of determining that there are other cluster servers currently writing the target data includes:

[0043] If the target data is in a dedicated state, then it is determined that there are other cluster servers currently writing to the target data.

[0044] Furthermore, the information regarding receiving the modified target data sent by the other cluster servers includes:

[0045] If the other cluster servers have completed the write processing of the target data, then receive the modified target data and the first notification message of the completion of the write processing sent by the other cluster servers;

[0046] Based on the information in the target data, the target data to be sent to the target cluster server includes:

[0047] The modified target data is used to update the locally stored target data, and the updated target data is determined as the target data to be sent to the target cluster server. The status corresponding to the target data is then modified to a shared status.

[0048] Furthermore, the method also includes:

[0049] If the data processing request is a write processing request, and there are no other cluster servers performing write processing on the target data, then the status corresponding to the target data is changed to exclusive status;

[0050] Receive the modified target data and the second notification message to stop writing the target data sent by the target cluster server;

[0051] The locally stored target data is updated using the modified target data, and the status corresponding to the target data is changed to a shared status according to the second notification message.

[0052] Furthermore, the method also includes:

[0053] If the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state. If not, change the state corresponding to the target data to a shared state.

[0054] Receive a third notification message from the target cluster server indicating that it will stop reading the target data;

[0055] Determine whether other cluster servers are currently reading or writing the target data; if not, modify the state of the target data to stateless according to the third notification message; if other cluster servers are reading the target data, keep the state of the target data unchanged.

[0056] This application embodiment also provides a data transmission device applied to a target cluster server, the device comprising:

[0057] The first sending and processing module is used to send a data processing request to the database server, wherein the data processing request carries a target identifier of the target data to be acquired.

[0058] The first receiving and processing module receives the target data.

[0059] Furthermore, the first sending processing module is also configured to send the modified target data and a second notification message to the database server if the data processing request is a read processing request and it is determined that the write processing of the target data has been completed.

[0060] Furthermore, the first sending processing template is also used to send a third notification message to the database server to stop reading the target data if the data processing request is a read processing request and it is determined that the read processing of the target data has been completed.

[0061] Furthermore, the first sending processing module is specifically used to determine that the write processing of the target data has been completed if an instruction indicating that the write processing is complete is received; or, if the target data has not been modified within a set time period, to determine that the write processing of the target data has been completed.

[0062] This application also provides a data transmission apparatus for use with a database server, the apparatus comprising:

[0063] The second receiving and processing module is used to receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired.

[0064] The second sending processing module is used to search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server.

[0065] Furthermore, the second sending processing module is also used to determine whether there are other cluster servers currently performing write processing on the target data; if not, then the subsequent step of sending the target data to the target cluster server is executed.

[0066] Furthermore, the second sending processing module is also used to send a return request to the other cluster server to return the modified target data if there is another cluster server currently performing write processing on the target data;

[0067] The second receiving and processing module is also used to receive information about the modified target data sent by the other cluster servers;

[0068] The second sending processing module is further configured to determine the target data to be sent to the target cluster server based on the information of the target data, and to execute subsequent steps for sending the target data to the target cluster server.

[0069] Furthermore, the second sending processing module is specifically used to determine that if the state corresponding to the target data is a dedicated state, there are currently other cluster servers performing write processing on the target data.

[0070] Furthermore, the second receiving and processing module is specifically used to receive the modified target data and the first notification message of write processing completion sent by the other cluster server if the other cluster server has completed the write processing of the target data.

[0071] The second sending processing module is specifically used to update the locally stored target data using the modified target data, determine the updated target data as the target data to be sent to the target cluster server, and modify the status corresponding to the target data to a shared status.

[0072] Furthermore, the second receiving and processing module is also used to modify the status of the target data to a dedicated status if the data processing request is a write processing request and there are no other cluster servers performing write processing on the target data.

[0073] The second receiving and processing module is further configured to receive the modified target data sent by the target cluster server and a second notification message to stop writing to the target data;

[0074] The second sending processing module is further configured to update the locally stored target data using the modified target data, and modify the status corresponding to the target data to a shared status according to the second notification message.

[0075] Furthermore, the second receiving and processing module is also configured to, if the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state; if not, modify the state corresponding to the target data to a shared state; and receive a third notification message from the target cluster server to stop reading processing on the target data.

[0076] The second sending processing module is further configured to determine whether there are other cluster servers currently performing read and write processing on the target data; if not, the state of the target data is modified to stateless according to the third notification message; if there are other cluster servers performing read processing on the target data, the state of the target data is kept unchanged.

[0077] This application also provides an electronic device, which includes a processor for executing a computer program stored in a memory to implement the steps of any of the data transmission methods described above.

[0078] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the data transmission methods described above.

[0079] This application also provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to perform the steps of any of the data transmission methods described above.

[0080] In this embodiment, the data transmission system includes a target cluster server and a database server. The target cluster server sends a data processing request to the database server, the request carrying a target identifier for the target data to be acquired. The database server receives the data processing request, searches for the target data corresponding to the target identifier in its locally stored data, and sends the target data to the target cluster server. The target cluster server also receives the target data. Because in this embodiment, the target cluster server sends a data processing request carrying a target identifier to the database server, the database server can determine the target data based on the target identifier and send it to the target cluster server. This avoids the target cluster server acquiring large amounts of data, reduces its load, and improves data transmission speed. Attached Figure Description

[0081] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0082] Figure 1 This is a schematic diagram of the structure of a data transmission system provided in an embodiment of this application;

[0083] Figure 2 This is an architecture diagram of the data transmission system provided in the embodiments of this application;

[0084] Figure 3 A schematic diagram illustrating the interaction between the target cluster server, database server, and other cluster servers provided in this application embodiment;

[0085] Figure 4 A schematic diagram of a data transmission process provided in an embodiment of this application;

[0086] Figure 5 A schematic diagram of a data transmission process provided in an embodiment of this application;

[0087] Figure 6 This is a schematic diagram of a data transmission device structure provided in an embodiment of this application;

[0088] Figure 7 This is a schematic diagram of a data transmission device structure provided in an embodiment of this application;

[0089] Figure 8 This is a schematic diagram of an electronic device structure provided in an embodiment of this application. Detailed Implementation

[0090] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0091] To reduce the load on cluster servers and improve data transmission speed, embodiments of this application provide a data transmission system, method, apparatus, device, and medium.

[0092] In this embodiment of the application, the data transmission system includes at least a target cluster server and a database server. The target cluster server is used to send a data processing request to the database server, wherein the data processing request carries a target identifier of the target data to be acquired. The database server is used to receive the data processing request, search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server. The target cluster server is also used to receive the target data.

[0093] Example 1:

[0094] Figure 1 This application provides a schematic diagram of a data transmission system, which includes:

[0095] The target cluster server 101 is used to send a data processing request to the database server 102, wherein the data processing request carries a target identifier of the target data to be acquired.

[0096] The database server 102 is used to receive the data processing request, search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server 101.

[0097] The target cluster server 101 is also used to receive the target data.

[0098] This application provides a data transmission system, which includes a database server and at least one cluster server.

[0099] In this embodiment, when an electronic device in a cluster needs to process certain data, the electronic device can send a data processing request to the cluster server of its cluster. The cluster server retrieves the data from its local cache or from a database server and sends the data to the electronic device. In this embodiment, the cluster server can be referred to as the target cluster server, and the data can be referred to as the target data.

[0100] Specifically, in this embodiment, the target cluster server receives a data processing request sent by an electronic device within the cluster. This data processing request carries a target identifier for the target data to be acquired. The target cluster server first determines whether the target data is stored in its local cache. If the target cluster server determines that the target data is not stored in its local cache, it sends the data processing request to the database server.

[0101] After receiving a data processing request from the target cluster server, the database server determines the target identifier of the target data carried in the request. Based on this identifier, the database server locates the corresponding target data and sends it to the target cluster server. The target cluster server receives the target data and forwards it to the electronic device.

[0102] It should be noted that, in this embodiment of the application, the target cluster server and the database server use the same caching system.

[0103] Figure 2 This is an architecture diagram of the data transmission system provided in the embodiments of this application, as shown below. Figure 2 As shown, the data transmission system includes cluster server A, cluster server B, cluster server C and a database server. Each cluster server and database server contains a caching system. Data stored in the database server is stored in the database server's caching system, and target data obtained by the cluster server from the database server is stored in the cluster server's caching system.

[0104] In this embodiment, the target cluster server sends a data processing request carrying a target identifier to the database server. The database server can determine the target data based on the target identifier and send the target data to the target cluster server. This avoids the target cluster server acquiring a large amount of data, reduces the load pressure on the target cluster server, and also improves the data transmission speed.

[0105] Example 2:

[0106] In order to send target data to the target cluster server, based on the above embodiments, in this embodiment of the application, the database server 102 is further configured to determine whether there are other cluster servers currently performing write processing on the target data. If not, the subsequent step of sending the target data to the target cluster server 101 is executed.

[0107] In this embodiment, since the database server can communicate with multiple cluster servers, other cluster servers may already be processing the target data before the database server receives a data processing request for the target data. If another cluster server is reading the target data, the database server can directly send the target data to the target cluster server. However, if another cluster server is writing to the target data, i.e., modifying the target data, the database server needs to send the modified target data to the target cluster server.

[0108] Based on this, in this embodiment of the application, before sending the target data to the target cluster server, the database server determines whether there are other cluster servers currently performing write processing on the target data. If not, the database server then sends the target data to the target cluster server.

[0109] Example 3:

[0110] In order to enable the database server to send target data to the target cluster server, based on the above embodiments, in this embodiment of the application, the database server 102 is further configured to send a return request to the other cluster server 103 to return the modified target data if there is another cluster server 103 currently performing write processing on the target data.

[0111] The other cluster server 103 is also used to receive the return request; if the other cluster server 103 has completed the write processing of the target data, it sends the modified target data information to the database server 102.

[0112] The database server 102 is also configured to receive information about the modified target data; determine the modified target data to be sent to the target cluster server 101 based on the information about the target data; and execute subsequent steps to send the target data to the target cluster server 101.

[0113] In this embodiment of the application, if the database server determines that there are other cluster servers writing to the target data, in order to ensure data consistency, the database server needs to obtain the information of the modified target data from the other cluster servers, and determine the modified target data to be sent to the target cluster server based on the information.

[0114] Based on this, in this embodiment, the database server can send a return request to other cluster servers to retrieve the modified target data. To ensure that the modified target data sent by the database server to the target cluster server is consistent with the data in the other cluster servers, in this embodiment, the other cluster server, upon receiving the return request, will respond to the return request after completing the write processing of the target data.

[0115] Specifically, upon receiving the response request, the other cluster server determines whether it has completed the write operation on the target data. If the other cluster server determines that it has completed the write operation, it sends the modified target data information to the database server. The database server can then use this information to determine the modified target data to send to the target cluster server and forward it accordingly. If the other cluster server has not completed the write operation on the target data, it will continue writing until the write operation is complete before sending the modified target data information to the database server.

[0116] Figure 3 This is a schematic diagram illustrating the interaction between the target cluster server, database server, and other cluster servers provided in the embodiments of this application. Figure 3 As shown, the process includes:

[0117] S301: The target cluster server sends a data processing request to the database server.

[0118] S302: The database server receives the data processing request.

[0119] S303: The database server determines whether there are other cluster servers currently writing to the target data. If yes, it executes S304; otherwise, it executes S307.

[0120] S304: The database server sends a request to the other cluster servers to return the modified target data.

[0121] S305: If other cluster servers receive this return request and have already completed the write processing of the target data, they send the modified target data information to the database server.

[0122] S306: The database server is also used to receive information about the modified target data; based on the information about the target data, determine to send the modified target data to the target cluster server, or based on the information about the target data, determine the modified target data, update the target data using the modified target data, and send the updated target data to the target cluster server.

[0123] S307: The database server sends the target data to the target cluster server.

[0124] Example 4:

[0125] In order to enable the database server to further determine whether there are other cluster servers writing to the target data, based on the above embodiments, in this embodiment of the application, the database server 102 is specifically used to determine that there are other cluster servers 103 writing to the target data if the state corresponding to the target data is a dedicated state.

[0126] In order to enable the database server to quickly and accurately determine whether other cluster servers are currently writing to each piece of data, in this embodiment of the application, the database server saves the state of each piece of data. The database server can determine whether other cluster servers are currently writing to the target data based on the state of the target data.

[0127] Specifically, in this embodiment, when one cluster server is writing data, other cluster servers cannot read or write that data. In this case, the data can be set to a dedicated state. That is, if other cluster servers are writing data, the database server sets the data to a dedicated state.

[0128] Based on this, in this embodiment of the application, when the database server determines whether there are other cluster servers writing to the target data, the database server obtains the status of the saved target data. If the status is a dedicated status, it is determined that there are other cluster servers writing to the target data.

[0129] Example 5:

[0130] In order to further enable the database server to obtain the modified target data, based on the above embodiments, in this embodiment of the application, the other cluster server 103 is specifically used to send the modified target data and the first notification message of the completion of the write processing to the database server 102 if the other cluster server 103 has completed the write processing of the target data.

[0131] The database server 102 is also used to receive the modified target data, update the locally stored target data using the modified target data, and perform the subsequent step of the target cluster server 101 sending the target data; and modify the status corresponding to the target data to a shared status.

[0132] In this embodiment, after completing the write processing of the target data, other cluster servers send information about the modified target data to the database server. This information may include the specific write processing details of the target data. The database server can then modify the locally stored target data accordingly to obtain the modified target data. Furthermore, when sending this information to the database server, the other cluster servers may also send a first notification message indicating that the write processing is complete.

[0133] If another cluster server sends the modified target data to the database server, and also sends a first notification message that the write process is complete to the database server, the other cluster server can add the first notification message to the database server and then send the database server the information containing the first notification message.

[0134] Based on this, in this embodiment, after receiving the information, the database server obtains the modified target data or the specific write processing content of the target data carried in the information. The database server determines the modified target data based on the information, updates the locally stored target data with the modified target data, and uses the updated target data as the target data to be sent to the target cluster server. Furthermore, if the information also carries a first notification message, the database server will also determine, based on the first notification message, that the other cluster server has completed the write processing, and then modify the state of the target data. Specifically, the database server modifies the state of the target data to a shared state.

[0135] In this embodiment of the application, after other cluster servers return the modified target data to the database server, the other cluster servers mark the locally stored target data as invalid or delete the locally stored target data.

[0136] Furthermore, in this embodiment, other cluster servers also store the state of the target data. If one of these other cluster servers performs write processing on the target data, the state of the target data stored on that other cluster server is a dedicated state. However, to better reflect the write processing status of the target data by other cluster servers, in this embodiment, the dedicated state is further divided into two sub-states: a modification sub-state and a synchronization sub-state. The modification sub-state refers to the state of the target data from the time the other cluster server receives the target data sent by the database server until it completes a modification of the target data. The synchronization sub-state occurs when the other cluster server has completed a modification of the target data and sent the modified target data to the database server, but after synchronizing the modified target data, it receives a waiting modification instruction. This means the other cluster server will perform another modification on the target data, but has not yet received the specific content of the next modification; in this case, the state of the target data is changed to the synchronization sub-state.

[0137] It should be noted that, in this embodiment of the application, after the database server sends the target data to other cluster servers, the database server changes the status of the saved target data to a dedicated state. The database server will only modify the status of the target data again after receiving a second notification message from other cluster servers to stop writing to the target data.

[0138] In other words, in this embodiment of the application, when other cluster servers perform write processing on the target data, the state of the target data in the database server is different from the state of the target data in the other cluster servers. Specifically, when other cluster servers perform write processing on the target data, the state of the target data in the database server is a dedicated state, while the state of the target data in the other cluster servers is a modified sub-state or a synchronized sub-state.

[0139] If other cluster servers receive a return request from the database server and determine that the target data is currently in a synchronized sub-state, the target data information carried in the first notification message sent by the other cluster server to the database server can be information about the target data that has been synchronized and modified with the database server. Furthermore, to enable the database server to identify the modified target data, this message can also carry information about the target data from the latest synchronization. If other cluster servers receive a return request from the database server and determine that the target data is currently in a modified sub-state, the other cluster server can wait until the target data is modified before returning the modified target data to the database server.

[0140] Example 6:

[0141] In order to enable the database server to better manage the data, based on the above embodiments, in this embodiment of the application, the database server 102 is further configured to modify the state corresponding to the target data to a dedicated state if the data processing request is a write processing request and there are no other cluster servers 103 performing write processing on the target data.

[0142] The target cluster server 101 is further configured to send the modified target data and a second notification message to stop writing the target data to the database server 102 if it is determined that the write processing of the target data has been completed.

[0143] The database server 102 is also used to update the locally stored target data with the modified target data, and to modify the status corresponding to the target data to a shared status according to the second notification message.

[0144] In this embodiment, the database server receives a data processing request from the target cluster server. The database server determines whether the data processing request is a read processing request or a write processing request. If the data processing request is a write processing request, it means that the target cluster server needs to modify the target data. During the process of the target cluster server modifying the target data, other cluster servers cannot perform read or write processing on the target data.

[0145] Based on this, in this embodiment of the application, if the data processing request received by the database server is a write processing request, the database server determines whether there are other cluster servers currently performing write processing on the target data. If not, the database server modifies the status of the target data to a dedicated status and sends the target data to the target cluster server.

[0146] In this embodiment, after receiving target data from the database server, the target cluster server can modify the target data according to the received modification operation. Furthermore, the target cluster server will determine whether the write processing of the target data is complete. If it is complete, it will send the modified target data and a second notification message indicating that the write processing of the target data has stopped to the database server.

[0147] After receiving the modified target data and the second notification message, the database server updates the locally stored target data with the modified target data and changes the status of the stored target data to a shared state.

[0148] In addition, in this embodiment of the application, if the data processing request of the target cluster server for the target data is a write processing request, after the database server modifies the state of the target data to a dedicated state, before the database server sends the target data to the target cluster server, the database server will also send information that the target data has been written by the target cluster server to other cluster servers that have read processing operations or write processing operations on the target data. After receiving the information, the other cluster servers will stop processing the locally stored target data and delete or set the locally stored target data to an unusable state, so as to prevent other cluster servers from using the target data during the process of the target cluster server modifying the target data.

[0149] Example 7:

[0150] In order to enable the database server to better manage the data, based on the above embodiments, in this embodiment of the application, the database server 102 is further configured to determine whether the state corresponding to the target data is a shared state if the data processing request is a read processing request and there are no other cluster servers 103 performing write processing on the target data; if not, modify the state corresponding to the target data to a shared state.

[0151] The target cluster server 101 is also used to determine that the read processing of the target data has been completed, and then send a third notification message to the database server 102 to stop the read processing of the target data.

[0152] The database server 102 is also used to determine whether there are other cluster servers currently performing read and write processing on the target data; if not, the state of the target data is changed to stateless according to the third notification message; if there are other cluster servers performing read processing on the target data, the state of the target data is kept unchanged.

[0153] In this embodiment, the database server receives a data processing request from the target cluster server. The database server determines whether the data processing request is a read processing request or a write processing request. If the data processing request is a read processing request, it means that the target cluster server needs to perform read processing on the target data. During the process of the target cluster server performing read processing on the target data, other cluster servers can also perform read processing on the target data.

[0154] Based on this, in this embodiment of the application, if the data processing request received by the database server is a read processing request, the database server determines whether there are other cluster servers currently performing write processing on the target data. If not, the database server determines the state of the saved target data. If the state is not a shared state, the database server modifies the state of the target data to a shared state and sends the target data to the target cluster server.

[0155] In this embodiment, after receiving the target data sent by the database server, the target cluster server can perform read processing based on the target data. Furthermore, the target cluster server will determine whether the read processing of the target data is complete. If it is complete, it will send a third notification message to the database server to stop reading the target data.

[0156] After receiving the third notification message, the database server determines whether there are other cluster servers currently reading and writing the target data. If not, the state of the target data is changed to stateless. If there are other cluster servers reading the target data, the state of the target data is kept unchanged.

[0157] Example 8:

[0158] In order to enable the target cluster server to determine whether the write processing of the target data has been completed, based on the above embodiments, in this embodiment of the application, the target cluster server 101 is specifically used to determine that the write processing of the target data has been completed if it receives an indication that the write processing has been completed; or, if the target data has not been modified within a set time period, it is determined that the write processing of the target data has been completed.

[0159] In this embodiment, if the target cluster server receives an indication that the write processing is complete, it determines that the write processing of the target data has been completed. This indication may be sent from an electronic device in the cluster where the target cluster server resides to the target cluster server. Alternatively, if the target data has not been modified within a set time period, it is determined that the write processing of the target data has been completed.

[0160] Example 9:

[0161] Figure 4 A schematic diagram of a data transmission process provided in this application embodiment, the process including:

[0162] S401: Send a data processing request to the database server, wherein the data processing request carries the target identifier of the target data to be acquired.

[0163] The data transmission method provided in this application embodiment is applied to a cluster server in a cluster.

[0164] S402: Receive the target data.

[0165] In one possible implementation, the method further includes:

[0166] If the data processing request is a read processing request, and it is determined that the write processing of the target data has been completed, then the modified target data and a second notification message to stop writing the target data are sent to the database server.

[0167] In one possible implementation, the method further includes:

[0168] If the data processing request is a read processing request, and it is determined that the read processing of the target data has been completed, a third notification message to stop the read processing of the target data will be sent to the database server.

[0169] In one possible implementation, determining that the write process for the target data has been completed includes:

[0170] If an instruction indicating that the write process is complete is received, it is determined that the write process on the target data has been completed; or, if the target data has not been modified within a set time period, it is determined that the write process on the target data has been completed.

[0171] Example 10:

[0172] Figure 5 A schematic diagram of a data transmission process provided in this application embodiment, the process including:

[0173] S501: Receive a data processing request sent by the target cluster server, wherein the data processing request carries the target identifier of the target data to be acquired.

[0174] The data transmission method provided in this application embodiment is applied to a clustered database server.

[0175] S502: Locate the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server.

[0176] In one possible implementation, before sending the target data to the target cluster server, the method further includes:

[0177] Determine whether there are other cluster servers currently writing to the target data;

[0178] If not, proceed with the subsequent step of sending the target data to the target cluster server.

[0179] In one possible implementation, before sending the target data to the target cluster server, the method further includes:

[0180] If other cluster servers are currently writing to the target data, a request to return the modified target data is sent to those other cluster servers.

[0181] Receive information about the modified target data sent by the other cluster servers;

[0182] Based on the information in the target data, determine the target data to be sent to the target cluster server, and then execute the subsequent steps of sending the target data to the target cluster server.

[0183] In one possible implementation, the process of determining whether other cluster servers are currently writing the target data includes:

[0184] If the target data is in a dedicated state, then it is determined that there are other cluster servers currently writing to the target data.

[0185] In one possible implementation, the information for receiving the modified target data sent by the other cluster servers includes:

[0186] If the other cluster servers have completed the write processing of the target data, then receive the modified target data and the first notification message of the completion of the write processing sent by the other cluster servers;

[0187] Based on the information in the target data, the target data to be sent to the target cluster server includes:

[0188] The modified target data is used to update the locally stored target data, and the updated target data is determined as the target data to be sent to the target cluster server. The status corresponding to the target data is then modified to a shared status.

[0189] In one possible implementation, the method further includes:

[0190] If the data processing request is a write processing request, and there are no other cluster servers performing write processing on the target data, then the status corresponding to the target data is changed to exclusive status;

[0191] Receive the modified target data and the second notification message to stop writing the target data sent by the target cluster server;

[0192] The locally stored target data is updated using the modified target data, and the status corresponding to the target data is changed to a shared status according to the second notification message.

[0193] In one possible implementation, the method further includes:

[0194] If the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state. If not, change the state corresponding to the target data to a shared state.

[0195] Receive a third notification message from the target cluster server indicating that it will stop reading the target data;

[0196] Determine whether other cluster servers are currently reading or writing the target data; if not, modify the state of the target data to stateless according to the third notification message; if other cluster servers are reading the target data, keep the state of the target data unchanged.

[0197] Example 11:

[0198] Figure 6 This application provides a schematic diagram of a data transmission device structure, which includes:

[0199] The first sending and processing module 601 is used to send a data processing request to the database server, wherein the data processing request carries a target identifier of the target data to be acquired.

[0200] The first receiving and processing module 602 receives the target data.

[0201] In one possible implementation, the first sending processing module 601 is further configured to send the modified target data and a second notification message to the database server if the data processing request is a read processing request and it is determined that the write processing of the target data has been completed.

[0202] In one possible implementation, the first sending processing template 601 is further configured to send a third notification message to the database server to stop reading the target data if the data processing request is a read processing request and it is determined that the read processing of the target data has been completed.

[0203] In one possible implementation, the first sending processing module 601 is specifically configured to determine that the writing process on the target data has been completed if an instruction indicating that the writing process is complete is received; or, if the target data has not been modified within a set time period, determine that the writing process on the target data has been completed.

[0204] In this embodiment of the application, the data transmission device is deployed in the cluster server of the cluster.

[0205] Example 12:

[0206] Figure 7 This application provides a schematic diagram of a data transmission device structure, which includes:

[0207] The second receiving and processing module 701 is used to receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired.

[0208] The second sending processing module 702 is used to search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server.

[0209] In one possible implementation, the second sending processing module 702 is further configured to determine whether there are other cluster servers currently performing write processing on the target data; if not, then execute the subsequent step of sending the target data to the target cluster server.

[0210] In one possible implementation, the second sending processing module 702 is further configured to send a return request for the modified target data to the other cluster server if there is currently another cluster server performing write processing on the target data.

[0211] The second receiving and processing module 701 is also used to receive information about the modified target data sent by the other cluster servers;

[0212] The second sending processing module 702 is further configured to determine the target data to be sent to the target cluster server based on the information of the target data, and to execute subsequent steps for sending the target data to the target cluster server.

[0213] In one possible implementation, the second sending processing module 702 is specifically used to determine that if the state corresponding to the target data is a dedicated state, there are currently other cluster servers performing write processing on the target data.

[0214] In one possible implementation, the second receiving and processing module 701 is specifically used to receive the modified target data and the first notification message of write processing completion sent by the other cluster server if the other cluster server has completed the write processing of the target data.

[0215] The second sending processing module 702 is specifically used to update the locally stored target data using the modified target data, determine the updated target data as the target data to be sent to the target cluster server, and modify the status corresponding to the target data to a shared status.

[0216] In one possible implementation, the second receiving and processing module 701 is further configured to, if the data processing request is a write processing request and no other cluster server is performing write processing on the target data, modify the state corresponding to the target data to a dedicated state; and receive the modified target data and a second notification message from the target cluster server to stop writing processing on the target data.

[0217] The second sending processing module 702 is further configured to update the locally stored target data using the modified target data, and modify the status corresponding to the target data to a shared status according to the second notification message.

[0218] In one possible implementation, the second receiving and processing module 701 is further configured to: if the data processing request is a read processing request and no other cluster server is performing write processing on the target data, determine whether the state corresponding to the target data is a shared state; if not, modify the state corresponding to the target data to a shared state; and receive a third notification message from the target cluster server to stop reading the target data.

[0219] The second sending processing module 702 is further configured to determine whether there are other cluster servers currently performing read and write processing on the target data; if not, the state of the target data is modified to stateless according to the third notification message; if there are other cluster servers performing read processing on the target data, the state of the target data is kept unchanged.

[0220] In this embodiment of the application, the data transmission device is deployed in the database server of the cluster.

[0221] Example 13:

[0222] Based on the above embodiments, this application also provides an electronic device. Figure 8 This application provides a schematic diagram of an electronic device structure, such as... Figure 8As shown, it includes: processor 801, communication interface 802, memory 803 and communication bus 804, wherein processor 801, communication interface 802 and memory 803 communicate with each other through communication bus 804.

[0223] The memory 803 stores a computer program. When the program is executed by the processor 801, the processor 801 performs the following steps:

[0224] Send a data processing request to the database server, wherein the data processing request carries the target identifier of the target data to be acquired;

[0225] Receive the target data.

[0226] In one possible implementation, the processor is further configured to:

[0227] If the data processing request is a read processing request, and it is determined that the write processing of the target data has been completed, then the modified target data and a second notification message to stop writing the target data are sent to the database server.

[0228] In one possible implementation, the processor is further configured to:

[0229] If the data processing request is a read processing request, and it is determined that the read processing of the target data has been completed, a third notification message to stop the read processing of the target data will be sent to the database server.

[0230] In one possible implementation, the processor is further configured to:

[0231] If an instruction indicating that the write process is complete is received, it is determined that the write process on the target data has been completed; or, if the target data has not been modified within a set time period, it is determined that the write process on the target data has been completed.

[0232] Since the principle of the above-mentioned electronic device in solving the problem is similar to that of the data transmission method, the implementation of the above-mentioned electronic device can be found in the embodiments of the method, and repeated details will not be described again.

[0233] The communication bus mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface 802 is used for communication between the aforementioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0234] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0235] The memory 803 stores a computer program, which, when executed by the processor 801, causes the processor 801 to also perform the following steps:

[0236] Receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired;

[0237] The target data corresponding to the target identifier is searched in the locally stored data, and the target data is sent to the target cluster server.

[0238] In one possible implementation, the processor is further configured to:

[0239] Determine whether there are other cluster servers currently writing to the target data;

[0240] If not, proceed with the subsequent step of sending the target data to the target cluster server.

[0241] In one possible implementation, the processor is further configured to:

[0242] If other cluster servers are currently writing to the target data, a request to return the modified target data is sent to those other cluster servers.

[0243] Receive information about the modified target data sent by the other cluster servers;

[0244] Based on the information in the target data, determine the target data to be sent to the target cluster server, and then execute the subsequent steps of sending the target data to the target cluster server.

[0245] In one possible implementation, the processor is further configured to:

[0246] If the target data is in a dedicated state, then it is determined that there are other cluster servers currently writing to the target data.

[0247] In one possible implementation, the processor is further configured to:

[0248] If the other cluster servers have completed the write processing of the target data, then receive the modified target data and the first notification message of the completion of the write processing sent by the other cluster servers;

[0249] Based on the information in the target data, the target data to be sent to the target cluster server includes:

[0250] The modified target data is used to update the locally stored target data, and the updated target data is determined as the target data to be sent to the target cluster server. The status corresponding to the target data is then modified to a shared status.

[0251] In one possible implementation, the processor is further configured to:

[0252] If the data processing request is a write processing request, and there are no other cluster servers performing write processing on the target data, then the status corresponding to the target data is changed to exclusive status;

[0253] Receive the modified target data and the second notification message to stop writing the target data sent by the target cluster server;

[0254] The locally stored target data is updated using the modified target data, and the status corresponding to the target data is changed to a shared status according to the second notification message.

[0255] In one possible implementation, the processor is further configured to:

[0256] If the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state. If not, change the state corresponding to the target data to a shared state.

[0257] Receive a third notification message from the target cluster server indicating that it will stop reading the target data;

[0258] Determine whether other cluster servers are currently reading or writing the target data; if not, modify the state of the target data to stateless according to the third notification message; if other cluster servers are reading the target data, keep the state of the target data unchanged.

[0259] Since the principle of the above-mentioned electronic device in solving the problem is similar to that of the data transmission method, the implementation of the above-mentioned electronic device can be found in the embodiments of the method, and repeated details will not be described again.

[0260] The communication bus mentioned in the aforementioned electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface 802 is used for communication between the aforementioned electronic device and other devices. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0261] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0262] Example 14:

[0263] Based on the above embodiments, this invention also provides a computer-readable storage medium storing a computer program executable by a processor. When the program runs on the processor, it causes the processor to perform the following steps:

[0264] Send a data processing request to the database server, wherein the data processing request carries the target identifier of the target data to be acquired;

[0265] Receive the target data.

[0266] In one possible implementation, the method further includes:

[0267] If the data processing request is a read processing request, and it is determined that the write processing of the target data has been completed, then the modified target data and a second notification message to stop writing the target data are sent to the database server.

[0268] In one possible implementation, the method further includes:

[0269] If the data processing request is a read processing request, and it is determined that the read processing of the target data has been completed, a third notification message to stop the read processing of the target data will be sent to the database server.

[0270] In one possible implementation, determining that the write process for the target data has been completed includes:

[0271] If an instruction indicating that the write process is complete is received, it is determined that the write process on the target data has been completed; or, if the target data has not been modified within a set time period, it is determined that the write process on the target data has been completed.

[0272] Since the principle of the computer-readable storage medium in solving the problem is similar to that of the data transmission method, the implementation of the computer-readable storage medium can be found in the embodiments of the method, and repeated details will not be described again.

[0273] Based on the above embodiments, this invention also provides a computer-readable storage medium storing a computer program executable by a processor. When the program is run on the processor, the processor can perform the following steps:

[0274] Receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired;

[0275] The target data corresponding to the target identifier is searched in the locally stored data, and the target data is sent to the target cluster server.

[0276] In one possible implementation, before sending the target data to the target cluster server, the method further includes:

[0277] Determine whether there are other cluster servers currently writing to the target data;

[0278] If not, proceed with the subsequent step of sending the target data to the target cluster server.

[0279] In one possible implementation, before sending the target data to the target cluster server, the method further includes:

[0280] If other cluster servers are currently writing to the target data, a request to return the modified target data is sent to those other cluster servers.

[0281] Receive information about the modified target data sent by the other cluster servers;

[0282] Based on the information in the target data, determine the target data to be sent to the target cluster server, and then execute the subsequent steps of sending the target data to the target cluster server.

[0283] In one possible implementation, the process of determining whether other cluster servers are currently writing the target data includes:

[0284] If the target data is in a dedicated state, then it is determined that there are other cluster servers currently writing to the target data.

[0285] In one possible implementation, the information for receiving the modified target data sent by the other cluster servers includes:

[0286] If the other cluster servers have completed the write processing of the target data, then receive the modified target data and the first notification message of the completion of the write processing sent by the other cluster servers;

[0287] Based on the information in the target data, the target data to be sent to the target cluster server includes:

[0288] The modified target data is used to update the locally stored target data, and the updated target data is determined as the target data to be sent to the target cluster server. The status corresponding to the target data is then modified to a shared status.

[0289] In one possible implementation, the method further includes:

[0290] If the data processing request is a write processing request, and there are no other cluster servers performing write processing on the target data, then the status corresponding to the target data is changed to exclusive status;

[0291] Receive the modified target data and the second notification message to stop writing the target data sent by the target cluster server;

[0292] The locally stored target data is updated using the modified target data, and the status corresponding to the target data is changed to a shared status according to the second notification message.

[0293] In one possible implementation, the method further includes:

[0294] If the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state. If not, change the state corresponding to the target data to a shared state.

[0295] Receive a third notification message from the target cluster server indicating that it will stop reading the target data;

[0296] Determine whether other cluster servers are currently reading or writing the target data; if not, modify the state of the target data to stateless according to the third notification message; if other cluster servers are reading the target data, keep the state of the target data unchanged.

[0297] Since the principle of the computer-readable storage medium in solving the problem is similar to that of the data transmission method, the implementation of the computer-readable storage medium can be found in the embodiments of the method, and repeated details will not be described again.

[0298] Example 15:

[0299] This application also provides a computer program product that, when executed by a computer, implements the data transmission method described in any of the method embodiments applied to electronic devices.

[0300] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof, or in whole or in part, as a computer program product. The computer program product includes one or more computer instructions, which, when loaded and executed on a computer, generate, in whole or in part, the processes or functions described in the embodiments of this application.

[0301] In this embodiment, the target cluster server sends a data processing request carrying a target identifier to the database server. The database server can determine the target data based on the target identifier and send the target data to the target cluster server. This avoids the target cluster server acquiring a large amount of data, reduces the load pressure on the target cluster server, and also improves the data transmission speed.

[0302] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0303] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0304] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0305] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0306] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A data transmission system, characterized in that, The system includes: The target cluster server is used to send a data processing request to the database server, wherein the data processing request carries a target identifier of the target data to be acquired. The database server is used to receive the data processing request, search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server; The target cluster server is also used to receive the target data; The database server is further configured to, if the data processing request is a write processing request and no other cluster server is performing write processing on the target data, modify the state corresponding to the target data to a dedicated state; and send information that the target data has been written by the target cluster server to other cluster servers that have read processing operations or write processing operations on the target data. The other cluster servers are used to receive information that the target data has been written by the target cluster server, stop processing the target data stored locally, and delete or set the target data stored locally to an unusable state. The target cluster server is further configured to send the modified target data and a second notification message to stop writing the target data to the database server if it is determined that the write processing of the target data has been completed. The database server is also configured to update the locally stored target data using the modified target data, and modify the status corresponding to the target data to a shared status according to the second notification message. The database server is further configured to determine that other cluster servers are currently writing to the target data if the target data stored by other cluster servers is in a dedicated state; the dedicated state includes a synchronization sub-state or a modification sub-state. The database server is also used to send a return request for the modified target data to the other cluster servers; The other cluster servers are also used to receive the return request; if it is determined that the current state of the target data is a synchronization sub-state, then send information to the database server carrying the target data that has been synchronized and modified with the database server, the information carrying the information of the latest synchronized target data; if it is determined that the current state of the target data is a modification sub-state, then wait for the target data to be modified before returning the modified target data to the database server. The synchronization sub-state is when the other cluster server has completed one modification of the target data and has sent the modified target data to the database server, and the other cluster server has received a waiting modification instruction after synchronizing the modified target data; the modification sub-state is the state of the target data from the time the other cluster server receives the target data sent by the database server until the completion of one modification of the target data. The database server is also configured to receive information about the modified target data; determine the target data to be sent to the target cluster server based on the information about the target data; and execute subsequent steps to send the target data to the target cluster server.

2. The system according to claim 1, characterized in that, The other cluster servers are specifically used to send the modified target data and a first notification message of write completion to the database server if the other cluster servers have completed the write processing of the target data. The database server is also configured to receive the modified target data, update the locally stored target data using the modified target data, and execute the subsequent step of sending the target data by the target cluster server; and modify the status corresponding to the target data to a shared status.

3. The system according to claim 1, characterized in that, The database server is further configured to, if the data processing request is a read processing request and there are no other cluster servers performing write processing on the target data, determine whether the state corresponding to the target data is a shared state; if not, modify the state corresponding to the target data to a shared state. The target cluster server is also used to determine if the read processing of the target data has been completed, and then send a third notification message to the database server to stop the read processing of the target data. The database server is also used to determine whether there are other cluster servers currently performing read and write processing on the target data; if not, the state of the target data is changed to stateless according to the third notification message; if there are other cluster servers performing read processing on the target data, the state of the target data is kept unchanged.

4. The system according to claim 1, characterized in that, The target cluster server is specifically configured to determine that the write processing of the target data has been completed if it receives an indication that the write processing is complete; or, if the target data has not been modified within a set time period, determine that the write processing of the target data has been completed.

5. A data transmission method, characterized in that, Applied to a target cluster server, the method includes: Send a data processing request to the database server, wherein the data processing request carries the target identifier of the target data to be acquired; Receive the target data; If the data processing request is a write processing request and no other cluster server is performing write processing on the target data, then the database server modifies the status corresponding to the target data to a dedicated status and sends information to other cluster servers that have read or write processing operations on the target data that the target data has been written by the target cluster server, causing the other cluster servers to stop processing the target data stored locally and delete or set the target data stored locally to an unusable status. The method further includes: If it is determined that the write processing of the target data has been completed, the modified target data and a second notification message to stop writing the target data are sent to the database server, so that the database server updates the locally stored target data with the modified target data, and changes the status of the target data to the shared status according to the second notification message. If other cluster servers are writing to the target data, then the target data is obtained by the database server from those other cluster servers; The process by which the database server obtains the target data from the other cluster servers includes: The database server sends a request to the other cluster servers to return the modified target data; The other cluster servers receive the return request; if it is determined that the current state of the target data is a synchronization sub-state, then they send information to the database server carrying the target data that has been synchronized and modified with the database server, the information carrying the information of the latest synchronized target data; if it is determined that the current state of the target data is a modification sub-state, then they wait for the target data to be modified before returning the modified target data to the database server. The synchronization sub-state is when the other cluster server has completed one modification of the target data and has sent the modified target data to the database server, and the other cluster server has received a waiting modification instruction after synchronizing the modified target data; the modification sub-state is the state of the target data from the time the other cluster server receives the target data sent by the database server until the completion of one modification of the target data. The database server receives the modified target data information; based on the target data information, it determines the target data to be sent to the target cluster server; The process of determining whether other cluster servers are writing to the target data includes: If the database server determines that the target data stored by the other cluster server is in a dedicated state, then it determines that there are currently other cluster servers writing to the target data; the dedicated state includes a synchronization sub-state or a modification sub-state.

6. The method according to claim 5, characterized in that, The determination that the write process for the target data has been completed includes: If an instruction indicating that the write process is complete is received, it is determined that the write process on the target data has been completed; or, if the target data has not been modified within a set time period, it is determined that the write process on the target data has been completed.

7. The method according to claim 5, characterized in that, The method further includes: If the data processing request is a read processing request, and it is determined that the read processing of the target data has been completed, a third notification message to stop the read processing of the target data will be sent to the database server.

8. A data transmission method, characterized in that, Applied to a database server, the method includes: Receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired; Search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server; The method further includes: If the data processing request is a write processing request, and there are no other cluster servers performing write processing on the target data, then the status corresponding to the target data is changed to exclusive status; Send information that the target data has been written to the target cluster server to other cluster servers that have read or write operations on the target data, so that the other cluster servers stop processing the target data stored locally and delete or set the target data stored locally to an unusable state; Receive the modified target data and the second notification message to stop writing the target data sent by the target cluster server; The locally stored target data is updated using the modified target data, and the status corresponding to the target data is changed to a shared status according to the second notification message; Before sending the target data to the target cluster server, the method further includes: Determine whether there are other cluster servers currently writing to the target data; If other cluster servers are writing to the target data, a return request for the modified target data is sent to those other cluster servers, and the other cluster servers receive the return request; if it is determined that the current state of the target data is in a synchronization sub-state, information carrying the target data that has been synchronized and modified with the database server is sent to the database server, and the information carries the information of the latest synchronized target data; if it is determined that the current state of the target data is in a modification sub-state, the modified target data is returned to the database server after the target data has been modified. The synchronization sub-state is when the other cluster server has completed one modification of the target data and has sent the modified target data to the database server, and the other cluster server has received a waiting modification instruction after synchronizing the modified target data; the modification sub-state is the state of the target data from the time the other cluster server receives the target data sent by the database server until the completion of one modification of the target data. Receive the modified target data information; determine the target data to be sent to the target cluster server based on the target data information, and execute the subsequent steps of sending the target data to the target cluster server; The process of determining whether other cluster servers are currently writing the target data includes: If the target data stored by the other cluster servers is in a dedicated state, it is determined that there are currently other cluster servers writing to the target data; the dedicated state includes a synchronization sub-state or a modification sub-state.

9. The method according to claim 8, characterized in that, Before sending the target data to the target cluster server, the method further includes: If other cluster servers are currently writing to the target data, a request to return the modified target data is sent to those other cluster servers. Receive information about the modified target data sent by the other cluster servers; Based on the information in the target data, determine the target data to be sent to the target cluster server, and then execute the subsequent steps of sending the target data to the target cluster server.

10. The method according to claim 8, characterized in that, The information received from the other cluster servers includes: If the other cluster servers have completed the write processing of the target data, then receive the modified target data and the first notification message of the completion of the write processing sent by the other cluster servers; Based on the information in the target data, the target data to be sent to the target cluster server includes: The modified target data is used to update the locally stored target data, and the updated target data is determined as the target data to be sent to the target cluster server. The status corresponding to the target data is then modified to a shared status.

11. The method according to claim 8, characterized in that, The method further includes: If the data processing request is a read processing request and there are no other cluster servers writing to the target data, determine whether the state corresponding to the target data is a shared state. If not, change the state corresponding to the target data to a shared state. Receive a third notification message from the target cluster server indicating that it will stop reading the target data; Determine whether other cluster servers are currently reading or writing the target data; if not, change the state of the target data to stateless according to the third notification message; if other cluster servers are reading the target data, keep the state of the target data unchanged.

12. A data transmission device, characterized in that, The device, applied to a target cluster server, includes: The first sending and processing module is used to send a data processing request to the database server, wherein the data processing request carries a target identifier of the target data to be acquired. The first receiving and processing module receives the target data; If the data processing request is a write processing request and no other cluster server is performing write processing on the target data, then the database server modifies the status corresponding to the target data to a dedicated status and sends information to other cluster servers that have read or write processing operations on the target data that the target data has been written by the target cluster server, causing the other cluster servers to stop processing the target data stored locally and delete or set the target data stored locally to an unusable status. The first sending processing module is further configured to, if it is determined that the writing process of the target data has been completed, send the modified target data and a second notification message to stop writing the target data to the database server, so that the database server updates the locally stored target data with the modified target data, and modifies the status corresponding to the target data to the shared status according to the second notification message. If other cluster servers are writing to the target data, then the target data is obtained by the database server from those other cluster servers; The process by which the database server obtains the target data from the other cluster servers includes: The database server sends a request to the other cluster servers to return the modified target data; The other cluster servers receive the return request; if it is determined that the current state of the target data is a synchronization sub-state, then they send information to the database server carrying the target data that has been synchronized and modified with the database server, the information carrying the information of the latest synchronized target data; if it is determined that the current state of the target data is a modification sub-state, then they wait for the target data to be modified before returning the modified target data to the database server. The synchronization sub-state is when the other cluster server has completed one modification of the target data and has sent the modified target data to the database server, and the other cluster server has received a waiting modification instruction after synchronizing the modified target data; the modification sub-state is the state of the target data from the time the other cluster server receives the target data sent by the database server until the completion of one modification of the target data. The database server receives the modified target data information; based on the target data information, it determines the target data to be sent to the target cluster server; The process of determining whether other cluster servers are writing to the target data includes: If the database server determines that the target data stored by the other cluster server is in a dedicated state, then it determines that there are currently other cluster servers writing to the target data; the dedicated state includes a synchronization sub-state or a modification sub-state.

13. A data transmission device, characterized in that, The device, applied to a database server, includes: The second receiving and processing module is used to receive a data processing request sent by the target cluster server, wherein the data processing request carries a target identifier of the target data to be acquired. The second sending processing module is used to search for the target data corresponding to the target identifier in the locally stored data, and send the target data to the target cluster server; The second receiving and processing module is further configured to modify the status of the target data to a dedicated status if the data processing request is a write processing request and there are no other cluster servers performing write processing on the target data. The second sending processing module is further configured to send information that the target data has been written by the target cluster server to other cluster servers that have read or write operations on the target data, so that the other cluster servers stop processing the target data stored locally and delete or set the target data stored locally to an unusable state. The second receiving and processing module is further configured to receive the modified target data and the second notification message to stop writing to the target data sent by the target cluster server; update the locally stored target data using the modified target data; and modify the status of the target data to the shared status according to the second notification message. The second sending processing module is further configured to determine whether other cluster servers are currently writing to the target data; if other cluster servers are writing to the target data, a return request for the modified target data is sent to the other cluster servers, so that the other cluster servers receive the return request; if the target data is determined to be in a synchronization sub-state, information carrying the target data that has been synchronized and modified with the database server is sent to the database server, the information carrying the information of the latest synchronized target data; if the target data is determined to be in a modification sub-state, the modified target data is returned to the database server after the target data has been modified. The synchronization sub-state is when the other cluster server has completed one modification of the target data and has sent the modified target data to the database server, and the other cluster server has received a waiting modification instruction after synchronizing the modified target data; the modification sub-state is the state of the target data from the time the other cluster server receives the target data sent by the database server until the completion of one modification of the target data. The second receiving and processing module is further configured to receive information about the modified target data; determine the target data to be sent to the target cluster server based on the information about the target data; and execute subsequent steps to send the target data to the target cluster server. Specifically, the second sending processing module is used to determine that there is currently another cluster server writing to the target data if the target data stored by the other cluster server is in a dedicated state; the dedicated state includes a synchronization sub-state or a modification sub-state.

14. An electronic device, characterized in that, The electronic device includes a processor that executes a computer program stored in a memory to implement the steps of the data transmission method as described in any one of claims 5-11.

15. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the data transmission method as described in any one of claims 5-11.

16. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the steps of the data transmission method as described in any one of claims 5-11.

Citation Information

Patent Citations

  • Method and system for improving resource effectiveness of server cluster

    CN104573428A

  • Data acquisition method and device for server

    CN110147368A