Data transmission system
By dividing shared memory on the first client and recording data location information using the server, distributed transmission of image data in optical automatic detection is realized, solving the problem of inefficient transmission efficiency and reducing the server memory usage and copying times.
Patent Information
- Application Number
- CN202310985374.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-04
- Publication Date
- 2025-02-14
AI Technical Summary
When the prior art transmits image data through Socket communication technology in optical automatic detection, a large amount of memory is required to be divided on the central server, and multiple copies are required during the data transmission process, resulting in low transmission efficiency.
By dividing the first shared memory for storing the data to be transmitted on the first client, the server records the location information of the data to be transmitted on the first shared memory, and forwards the storage information to the receiving end through the server, which is based on the storage information. Obtain target data, thereby realizing distributed transmission of data.
It reduces memory usage on the server, reduces the number of copies during data transmission, improves the transmission efficiency of image data, and is suitable for transmission scenarios of massive image data.
Smart Images

Figure CN119449889A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission system. Background Art
[0002] With the continuous development of the optical automatic detection industry, the industrial cameras used in optical automatic detection have high resolution and high frame rate, and the clarity of the captured images is very high. Therefore, the amount of image data is becoming larger and larger. The massive image data generated by these optical automatic detections usually needs to be transmitted to various application devices through the network, or needs to be transmitted between different processes of the distributed system on the same application device. Generally, Socket communication technology is used to transmit optical detection image data. During the transmission of image data, both the sender and the receiver need to establish a Socket connection with the central server. The sender reads the image data and sends it to the central server through the Socket connection channel. The central server receives the image data and writes it to the local disk or reads it into the memory, and then sends it to the receiver through the Socket connection channel.
[0003] It can be seen that the transmission of optical detection image data through Socket communication technology requires a large amount of memory to be allocated on the central server to store massive image data, and the image data needs to be copied multiple times during the transmission process. Due to the large amount of data, each copy of the image data will take a lot of time, so there is also the problem of slow data transmission rate. Summary of the invention
[0004] In order to overcome the problems existing in the related technology, the present application provides a data transmission system, which realizes the distributed transmission of image data. The same image data occupies less memory on the server or client, and the number of copies during the transmission of the image data is less, thereby improving the transmission efficiency of the image data.
[0005] The embodiment of the present application provides a data transmission system, including: a first client, a server, and a second client; the first client and the second client are both connected to the server for communication, and the second client is connected to the first client for communication;
[0006] In response to the data sending operation, the first client determines, on its memory, a first shared memory for storing the data to be transmitted, and stores the data to be transmitted in the first shared memory;
[0007] The first client uploads storage information of the data to be transmitted to the server, wherein the storage information at least includes a data identifier of the data to be transmitted and location information of the data to be transmitted in the first shared memory;
[0008] The server receives and stores the storage information, and sends the storage information to the second client;
[0009] The second client receives the storage information, and acquires target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory.
[0010] Another embodiment of the present application provides a data transmission method, including:
[0011] In response to the data sending operation, the first client determines, on its memory, a first shared memory for storing the data to be transmitted, and stores the data to be transmitted in the first shared memory;
[0012] The first client uploads storage information of the data to be transmitted to the server, wherein the storage information at least includes a data identifier of the data to be transmitted and location information of the data to be transmitted in the first shared memory;
[0013] The server receives and stores the storage information, and sends the storage information to the second client;
[0014] The second client receives the storage information, and acquires target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory.
[0015] The technical solution in the above embodiment of the present application is to divide a first shared memory for storing the data to be transmitted on the first client, and record the location information of the data to be transmitted on the first shared memory through the server. During the data transmission process, the sending end forwards the storage information of the data to be transmitted to the receiving end through the server, and then the receiving end obtains the target data based on the received storage information, thereby realizing the network transmission of data. In this data transmission method, the data transmission does not rely on the server, and the data to be transmitted does not need to be copied to the hard disk or memory of the server first, thereby reducing the memory usage on the server; and, during the data transmission process, multiple copies are not required, which improves the data transmission efficiency and can be better applied to the scenario of large-scale image data transmission.
[0016] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
[0017] For better understanding and implementation, the present application is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A block diagram of the data transmission system provided in the embodiment of the present application;
[0019] Figure 2 A flow chart of a first method for obtaining target data provided in an embodiment of the present application;
[0020] Figure 3 A flow chart of a second method for obtaining target data provided in an embodiment of the present application;
[0021] Figure 4 A first application scenario diagram of the data transmission system provided in an embodiment of the present application;
[0022] Figure 5 A second application scenario diagram of the data transmission system provided in an embodiment of the present application;
[0023] Figure 6 A third application scenario diagram of the data transmission system provided in an embodiment of the present application;
[0024] Figure 7 A fourth application scenario diagram of the data transmission system provided in an embodiment of the present application;
[0025] Figure 8 A fifth application scenario diagram of the data transmission system provided in an embodiment of the present application;
[0026] Fig. 9 A flowchart of a data transmission method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0029] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".
[0030] According to a first aspect of an embodiment of the present application, a data transmission system is provided, which realizes distributed transmission of image data. The image data does not need to occupy memory on the server, and the same image data occupies less memory on each client device. The number of copies during the transmission of the image data is less, thereby improving the transmission efficiency of the image data.
[0031] See also Figure 1 , Figure 1 This is a functional block diagram of the data transmission system provided in Example 1 of the present application.
[0032] The data transmission system includes: a first client 11, a server 12, and a second client 13; the first client 11 and the second client 13 both establish a network communication connection with the server 12. The second client 13 and the first client 11 can directly establish a network communication connection. Optionally, the server 12 can be a Redis server or other servers, and the embodiment of the present application takes the Redis server as an example for description.
[0033] Redis (Remote Dictionary Server), or remote dictionary service, is an open source, network-based, memory-based, and persistent log-type, Key-Value database written in ANSI C, and provides application programming interfaces in multiple languages. Redis server can be used to store Redis database servers.
[0034] The first client 11 responds to the data sending operation, that is, the first client 11 responds to the data sending operation input by the user, determines a first shared memory for storing the data to be transmitted on its memory, and copies and stores the data to be transmitted on the first shared memory. Optionally, a unique first shared memory is determined on the client device, and all the data to be transmitted are stored in the first shared memory.
[0035] The first client 11 uploads storage information of the data to be transmitted to the server 12 , where the storage information at least includes a data identifier of the data to be transmitted and location information of the data to be transmitted in the first shared memory.
[0036] The server 12 receives and stores the storage information, and sends the storage information to the second client 13; the second client 13 receives the storage information, and obtains target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory.
[0037] The technical solution in the above embodiment of the present application is to divide a first shared memory for storing the data to be transmitted on the first client, and record the location information of the data to be transmitted on the first shared memory through the server. During the data transmission process, the sending end forwards the storage information of the data to be transmitted to the receiving end through the server, and then the receiving end obtains the target data based on the received storage information, thereby realizing the network transmission of data. In this data transmission method, the data transmission does not rely on the server, and the data to be transmitted does not need to be copied to the hard disk or memory of the server first, thereby reducing the memory usage on the server; and, during the data transmission process, multiple copies are not required, which improves the data transmission efficiency and can be better applied to the transmission of massive image data in automatic optical detection scenes.
[0038] Optionally, after receiving the storage information, the Redis server stores it in the local memory and actively forwards the storage information to the second client; or, the Redis server pre-receives the storage information and stores it in the local memory, and then forwards the storage information to the second client after responding to the storage information acquisition instruction sent by the second client. In this embodiment, the first client 11 and the second client 13 can be located on the same device or on different devices. The first client 11 and the second client 13 can be applications running on an electronic device, or web pages opened on the electronic device based on a preset link address.
[0039] Optionally, the first shared memory is a temporary shared memory with a life cycle, and can be released after the data to be transmitted is transmitted, thereby reducing the memory occupancy of the data on the client device and making effective use of the memory on the client device.
[0040] In an optional embodiment, if the second client and the first client are located on the same device.
[0041] like Figure 2 As shown, the second client receives the storage information, and acquires the target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory, including the following steps:
[0042] S101: The second client receives the storage information forwarded by the server, and obtains the data identifier of the data to be transmitted and the location information of the data to be transmitted in the first shared memory from the storage information.
[0043] In this embodiment, the server is a Redis server, and only the storage information of the data to be transmitted is forwarded through the Redis server. After obtaining the storage information of the data to be transmitted, the second client directly obtains the target data from the local computer or the first client according to the storage information, instead of directly transmitting the data through the Redis server. Therefore, unlike the Socket communication technology, there is no need to store the data to be transmitted in the hardware storage or memory of the Socket server, thereby reducing the memory usage on the server and reducing the copying of the data to be transmitted, which helps to improve the transmission efficiency of massive data.
[0044] S102: Searching for target data in a first shared memory of the local machine based on the data identifier of the data to be transmitted and the location information.
[0045] On the same device, only one copy of data is stored based on the same data identifier. After the target data is found in the first shared memory of the local machine, the target data can be directly called without multiple copies, thereby reducing the number of copies and the occupation of the local memory.
[0046] S103: If target data identical to the data identifier in the storage information is found in the first shared memory of the local computer, a data transmission success signaling is generated and reported to the server.
[0047] Taking the Redis server as an example, the data transmission success signaling includes the data identifier of the target data and its location information in the first shared memory, so that the Redis server can make a good transmission record, or issue a notification of releasing the first shared memory in a timely manner.
[0048] When the second client and the first client are located on the same device, when the first client sends data to be transmitted to the second client, only the location information of the data to be transmitted in the first shared memory is forwarded through the server. The second client can directly find the data on the local computer according to the storage information of the data to be transmitted, without the need for data transmission through the server. Since the data to be transmitted is on the local computer, it does not need to be copied again, thereby reducing the memory usage of the server and the client device, and the data does not need to be actually transmitted between the two clients, thereby improving the data interaction efficiency.
[0049] In an optional embodiment, if Figure 3 and Figure 4As shown, the second client (Computer B) and the first client (Computer A) are located on different devices, and a second shared memory for storing received data is set on the memory of the device where the second client (Computer B) is located. The server takes a Redis server as an example.
[0050] The second client (Computer B) receives the storage information, and acquires the target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory of the first client (Computer A), including:
[0051] S201: The second client receives the storage information forwarded by the server, and obtains the data identifier of the data to be transmitted and the location information of the data to be transmitted in the first shared memory from the storage information.
[0052] S202: Searching for target data in the second shared memory of the local machine based on the data identifier in the storage information.
[0053] S203: If the target data identical to the data identifier in the storage information is not found in the second shared memory of the local computer, the target data is obtained from the first shared memory of the first client based on the data identifier, and the target data is stored in the second shared memory of the local computer;
[0054] S204: Generate a data transmission success signaling and report it to the server, wherein the data transmission success signaling includes the data identifier of the target data and the location information of the target data in the second shared memory.
[0055] In this embodiment, only the storage information of the data to be transmitted is forwarded through the Redis server. After obtaining the storage information of the data to be transmitted, the second client (Computer B) directly obtains the target data from the first client (Computer A) according to the storage information, instead of directly transmitting the data through the Redis server. Therefore, unlike the Socket communication technology, it is not necessary to store the data to be transmitted in the hardware storage or memory of the Socket server, thereby reducing the memory usage on the server and reducing the copy of the data to be transmitted, which helps to improve data transmission efficiency.
[0056] Since only unique data is stored on the same device based on the same data identifier, if the target data is found in the second shared memory of the local machine, it is no longer necessary to obtain the target data from the first shared memory of the first client, thereby reducing the number of data copies and improving data transmission efficiency.
[0057] Optional, such as Figure 5As shown, the target data is obtained from the first shared memory of the first client based on the data identifier, including: establishing network communication with the first client (Computer A), receiving a data packet transmitted by the first client (Computer A) in the form of a network notification, the data packet is created by a sending process of the first client (Computer A) as a network notification sample, the data to be transmitted is put into the network notification sample and then packaged to obtain, the data to be transmitted in the data packet is the data stored in the first shared memory, and the storage information of the data to be transmitted in the data packet is stored on the Redis server.
[0058] Based on the above embodiments, the first shared memory is released after the data to be transmitted is transmitted, and the first client releases the first shared memory after receiving the notification of releasing the first shared memory; the second shared memory is released after the data to be transmitted is transmitted, and the second client releases the second shared memory after receiving the notification of releasing the second shared memory, thereby reducing the memory occupied by a large amount of data on the client device.
[0059] After the Redis server receives and stores the storage information, it also includes: marking the data identifier of the storage information; the Redis server receives the data transmission success signaling, and if the data identifier in the data transmission success signaling is a marked data identifier, it is determined that the data transmission is successful, the mark is cleared, and a notification of releasing the first shared memory is sent to the first client, thereby further reducing the memory occupancy of the data on the client device.
[0060] If the storage information is sent by the second client 13, the Redis server receives the data transmission success signaling. If the data identifier in the data transmission success signaling is a marked data identifier, the data transmission is determined to be successful, the mark is cleared, and a notification of releasing the second shared memory is sent to the second client 13, thereby further reducing the memory occupancy of the data on the client device.
[0061] In an optional embodiment, the above-mentioned data transmission method can be applied to a distributed system. In the distributed system, multiple processes can be running on the same device. The multiple processes can be data sending processes or data receiving processes. Therefore, the data to be transmitted may need to be transmitted between different processes of the same device.
[0062] like Figure 6As shown, a first process (Process 1) and a second process (Process 2) are running on a first client (Computer A), wherein the first process (Process 1) is a data sending process, and the second process (Process 2) is a data receiving process.
[0063] The first process of the first client generates storage information of data to be transmitted and uploads it to the Redis server. The Redis server receives and stores the storage information and sends the storage information to the second process of the first client. The second process of the first client receives the storage information and searches for target data from the first shared memory of the first client based on the data identifier in the storage information and the location information of the data to be transmitted in the first shared memory.
[0064] Therefore, when the data sending process and the data receiving process are different processes on the client of the same device, multiple copies of the data to be transmitted can be avoided, the data transmission efficiency can be improved, and the same data does not need to be stored in multiple copies on the same device, thereby reducing the memory occupation of the data on the same device. When the second process searches for target data in the first shared memory, the first process generates a data sample of the data to be transmitted through the sending interface, identifies the data sample to obtain a unique identification code, packages the unique identification code of the data sample into a notification message, and sends it to the second process from the sending interface through the network;
[0065] The second process obtains the notification message from the network through the receiving interface, obtains the unique identification code in the notification message, and then obtains the target data in the first shared memory through the unique identification code.
[0066] Specifically, the unique identifier is UUID, which is the abbreviation of Universally Unique Identifier. It is a standard for software construction and is also part of the Open Software Foundation in the field of distributed computing environments. Its purpose is to allow all elements in a distributed system to have unique identification information without the need for a central control terminal to specify the identification information.
[0067] In an optional embodiment, if Figure 7 As shown, a third process and a fourth process are running on the second client (Computer B), and both the third process and the fourth process are data receiving processes.
[0068] If the storage information received by the third process and the fourth process is consistent, the target data is obtained from the first shared memory of the same first client (Computer A) at one time, thereby reducing the number of data transmissions and improving data transmission efficiency; if the storage information received by the third process and the fourth process is different, the target data is respectively obtained from the first shared memory on different first clients based on different storage information.
[0069] In an optional embodiment, if Figure 8 As shown, sometimes the second client transmits the received data back to the first client. At this time, since the data to be transmitted has been stored in the first shared memory of the device where the first client is located, it does not need to be transmitted again.
[0070] Specifically, a fifth process and a sixth process are running on the first client, the fifth process is a data sending process, and the sixth process is a data receiving process; a seventh process and an eighth process are running on the second client, the seventh process is a data sending process, and the eighth process is a data receiving process; and the storage information includes first storage information and second storage information.
[0071] The eighth process running on the second client receives the first storage information sent by the fifth process, and then obtains the target data from the first shared memory of the first client; the second client sends the second storage information to the sixth process running on the first client through its seventh process, and after the sixth process receives the second storage information, if the target data corresponding to the data identifier in the second storage information is stored in the first shared memory of the local machine, the target data is directly obtained from the first shared memory of the local machine, thereby reducing repeated data transmission and improving data transmission efficiency.
[0072] On the basis of the above embodiments, based on the same data identifier, the first shared memory is configured with a limited number of write operations, such as one write operation or two write operations, and is configured with an unlimited number of read operations, so that the utilization rate of the shared memory is higher. Similarly, based on the same data identifier, the second shared memory is configured with a limited number of write operations, such as one write operation or two write operations, and is configured with an unlimited number of read operations.
[0073] Based on the above embodiments, the data transmission system can be applied to the distributed system of automatic optical detection. At this time, the data to be transmitted is high-definition image data collected by the automatic optical detection equipment, and the data volume is large. Using the above method to transmit large amounts of data can better improve the data transmission efficiency and reduce the memory usage on the server and client devices.
[0074] The technical solution in the above-mentioned embodiment of the present application is to divide a first shared memory for storing the data to be transmitted on the first client, and record the location information of the data to be transmitted on the first shared memory through the server. During the data transmission process, the sending end forwards the storage information of the data to be transmitted to the receiving end through the server, and then the receiving end obtains the target data based on the received storage information, thereby realizing the network transmission of data. In this data transmission method, the data transmission does not rely on the server for data transmission, and the data to be transmitted does not need to be copied to the hard disk or memory of the server first, thereby reducing the memory usage on the server; and, during the data transmission process, multiple copies are not required, which improves the data transmission efficiency, can be better applied to the image data transmission in the automatic optical detection scene, helps to reduce hardware requirements, saves data transmission costs, and the data transmission method of the present application has more obvious data transmission efficiency in the massive data transmission scene.
[0075] Furthermore, when two processes are located on the same client device, they can directly call the data in the first shared memory on the local machine. The data to be transmitted does not need to be actually transmitted between the two processes, so it does not need to be copied, thereby reducing the memory occupancy on the client device and having a higher data transmission efficiency, which is particularly suitable for massive data transmission scenarios.
[0076] Furthermore, if different processes on the second client need to obtain data to be transmitted from the first client, the data only needs to be transmitted once, thereby improving data transmission efficiency; and only unique data needs to be stored on the second client, reducing the memory usage of the data on the client device, which helps to reduce device hardware requirements.
[0077] According to a second aspect of the embodiment of the present application, a data transmission method is provided, and the data transmission method is applied to a data transmission system, such as Figure 1 As shown, the system includes: a first client 11, a server 12, and a second client 13; the first client 11 and the second client 13 are both connected to the server 12 for communication, and the second client 13 is connected to the first client 11 for communication. The data transmission system can be applied to the application scenario of mass image data transmission of the optical automatic detection system. The data to be transmitted can be the mass high-definition image data collected in the optical automatic detection system.
[0078] like Fig. 9 As shown, the data transmission method can be implemented by the following steps:
[0079] S301: In response to a data sending operation, the first client determines, on its memory, a first shared memory for storing data to be transmitted, and stores the data to be transmitted in the first shared memory;
[0080] S302: The first client uploads storage information of the data to be transmitted to the server, where the storage information at least includes a data identifier of the data to be transmitted and location information of the data to be transmitted in the first shared memory;
[0081] S303: The server receives and stores the storage information, and sends the storage information to the second client;
[0082] S304: The second client receives the storage information, and acquires target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory.
[0083] In this embodiment, the server can be a Redis server, and the data transmission method can be applied to the transmission of high-definition image data in an automatic optical inspection system. During the transmission process, there is no need to frequently copy and transmit the high-definition image data, which reduces the memory occupation of the image data, improves data transmission efficiency, and occupies less memory on the server and each client device, which helps to reduce hardware requirements and save data transmission costs.
[0084] The data transmission method in the above embodiment of the present application is to divide a first shared memory for storing the data to be transmitted on the first client, and record the location information of the data to be transmitted on the first shared memory through the server. During the data transmission process, the sending end forwards the storage information of the data to be transmitted to the receiving end through the server, and then the receiving end obtains the target data based on the received storage information, thereby realizing the network transmission of data. In this data transmission method, the data transmission does not rely on the server, and the data to be transmitted does not need to be copied to the hard disk or memory of the server first, thereby reducing the memory usage on the server; and, during the data transmission process, multiple copies are not required, which improves the data transmission efficiency and can be better applied to the transmission application scenario of massive image data.
[0085] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0086] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A data transmission system, characterized in that: include: A first client, a server, and a second client; the first client and the second client are both connected to the server for communication, and the second client is connected to the first client for communication; In response to the data sending operation, the first client determines, on its memory, a first shared memory for storing the data to be transmitted, and stores the data to be transmitted on the first shared memory; The first client uploads storage information of the data to be transmitted to the server, wherein the storage information at least includes a data identifier of the data to be transmitted and location information of the data to be transmitted in the first shared memory; The server receives and stores the storage information, and sends the storage information to the second client; The second client receives the storage information, and acquires target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory.
2. The data transmission system according to claim 1, characterized in that: If the second client and the first client are located on the same device, The second client receives the storage information, and acquires the target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory, including: The second client receives the storage information forwarded by the server, and obtains the data identifier of the data to be transmitted and the location information of the data to be transmitted in the first shared memory from the storage information; Based on the data identifier of the data to be transmitted and the location information, searching for the target data in the first shared memory of the local machine; If target data with the same data identifier as the data in the storage information is found in the first shared memory of the local machine, a data transmission success signaling is generated and reported to the server, wherein the data transmission success signaling includes the data identifier of the target data and its location information in the first shared memory.
3. The data transmission system according to claim 2, characterized in that: If the second client and the first client are located on different devices, a second shared memory for storing received data is provided on the memory of the device where the second client is located. The second client receives the storage information, and acquires the target data based on the data identifier of the data to be transmitted in the storage information and the location information of the data to be transmitted in the first shared memory, including: The second client receives the storage information forwarded by the server, and obtains the data identifier of the data to be transmitted and the location information of the data to be transmitted in the first shared memory from the storage information; Based on the data identifier in the storage information, searching for target data in the second shared memory of the local machine; If the target data identical to the data identifier in the storage information is not found in the second shared memory of the local computer, the target data is obtained from the first shared memory of the first client based on the data identifier, and the target data is stored in the second shared memory of the local computer; A data transmission success signaling is generated and reported to the server, wherein the data transmission success signaling includes a data identifier of the target data and location information of the target data in the second shared memory.
4. The data transmission system according to claim 3, characterized in that: The acquiring target data from the first shared memory of the first client based on the data identifier includes: Establish network communication with the first client, receive a data packet transmitted by the first client in the form of a network notification, the data packet is created by a network notification sample by the sending process of the first client, the data to be transmitted is put into the network notification sample and then packaged, the data to be transmitted in the data packet is the data stored in the first shared memory, and the storage information of the data to be transmitted in the data packet is stored on the server.
5. The data transmission system according to claim 2 or 3, characterized in that: After the server receives and stores the storage information, the server further includes: marking the data identifier of the stored information; The server receives the data transmission success signaling, and if the data identifier in the data transmission success signaling is a marked data identifier, determines that the data transmission is successful, clears the mark, and sends a notification of releasing the first shared memory to the first client.
6. The data transmission system according to claim 1, characterized in that: The first shared memory is released after the data to be transmitted is transmitted. After receiving the notification of releasing the first shared memory, the first client releases the first shared memory.
7. The data transmission system according to claim 2, characterized in that: A first process and a second process are running on the first client, the first process is a data sending process, and the second process is a data receiving process, the first process generates a data sample of data to be transmitted through a sending interface, identifies the data sample to obtain a unique identification code, packages the unique identification code of the data sample into a notification message, and sends it from the sending interface to the second process through the network; The second process obtains a notification message from the network through a receiving interface, obtains a unique identification code in the notification message, and obtains target data in the first shared memory through the unique identification code.
8. The data transmission system according to claim 2, characterized in that: A third process and a fourth process are running on the second client, and the third process and the fourth process are data receiving processes. If the storage information received by the third process and the fourth process is consistent, then acquiring the target data from the first shared memory of the same first client at one time; If the storage information received by the third process and the fourth process is different, the target data is respectively obtained from the first shared memory on different first clients based on the different storage information.
9. The data transmission system according to claim 1, characterized in that: A fifth process and a sixth process are running on the first client, the fifth process is a data sending process, and the sixth process is a data receiving process; a seventh process and an eighth process are running on the second client, the seventh process is a data sending process, and the eighth process is a data receiving process; the storage information includes first storage information and second storage information, The eighth process running on the second client obtains the target data from the first shared memory of the first client after receiving the first storage information sent by the fifth process; The second client sends second storage information to the sixth process running on the first client through the seventh process. After the sixth process receives the second storage information, if the target data corresponding to the data identifier in the second storage information is stored in the first shared memory of the local computer, the target data is obtained from the first shared memory of the local computer.
10. The data transmission system according to any one of claims 1 to 9, characterized in that: Based on the same data identifier, the first shared memory configures a limited number of write operations and an unlimited number of read operations.
Citation Information
Cited By
Data transmission method and device, storage medium and computer program product
CN120631662A