Data transmission method and device, computer equipment and storage medium

CN119183650AActive Publication Date: 2024-12-24BOE TECHNOLOGY GROUP CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202380008734.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2024-12-24
Estimated Expiration
2043-04-21

AI Technical Summary

Technical Problem

When existing technologies store user sensitive data in smart devices, there are problems of data leakage and property security threats, especially in the case of malicious attacks or physical damage. The limitations of traditional encrypted storage devices and network backup mechanisms are inefficient and risky. high problem.

Method used

Using a distributed storage mechanism, the server generates a data scheduling plan, divides the data to be transferred into multiple copies, and quickly transmits it between terminals within the coverage of the gateway signal, achieving local storage and data recovery, and reducing network transmission risks and equipment burden.

Benefits of technology

It achieves fast backup and secure storage of data, reduces the need for encrypted storage devices and network transmission risks, and improves data transmission efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119183650A_ABST
    Figure CN119183650A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, computer equipment and a storage medium, and belongs to the technical field of data processing.The data transmission method comprises the steps that a server side responds to a data scheduling request sent by a first terminal, and the first data volume of to-be-transferred data of the first terminal is obtained according to the first data volume, carried in the data scheduling request, of the to-be-transferred data of the first terminal; determining a first data scheduling plan of the first terminal according to the received data and terminal information stored in the first terminal, and sending the first data scheduling plan to the first terminal; the terminal information comprises information of each terminal in a gateway signal coverage range; the first data scheduling plan comprises information of each second terminal and a second data volume which can be received by each second terminal; the second terminal is a terminal different from the first terminal in the coverage range of the gateway; the first terminal receives a first data scheduling plan; according to a second data volume which can be received by each second terminal, dividing the to-be-transferred data with the first data volume into a plurality of parts to obtain each part of sub-data; and respectively sending each part of sub-data to the second terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method, device, computer equipment and storage medium Technical Field

[0001] The present disclosure belongs to the field of data processing technology, and particularly relates to a data transmission method, apparatus, computer equipment, and storage medium. Background Art

[0002] With the increasing prevalence of smart devices, more and more user information is being stored on them. For example, cameras store sensitive facial recognition data and confidential information that may affect user privacy. If a smart device is attacked by a third party or damaged, it could leak a user's privacy and even threaten their property.

[0003] Summary of the Invention

[0004] The present disclosure aims to solve at least one of the technical problems existing in the prior art and provides a data transmission method, apparatus, computer equipment and storage medium.

[0005] In a first aspect, the technical solution adopted to solve the technical problem of the present disclosure is a data transmission method, comprising:

[0006] The server responds to a data scheduling request sent by a first terminal, determines a first data scheduling plan for the first terminal based on a first data volume of data to be transferred from the first terminal carried in the data scheduling request and terminal information stored in the server, and sends the plan to the first terminal; the terminal information includes information of each terminal within a coverage area of ​​a gateway signal; the first data scheduling plan includes information of each second terminal and a second data volume that each second terminal can receive; the first terminal is a terminal within the coverage area of ​​the gateway waiting for data transfer, and the second terminal is a terminal within the coverage area of ​​the gateway different from the first terminal;

[0007] The first terminal receives the first data scheduling plan; divides the data to be transferred having the first data volume into multiple parts according to the second data volume that each second terminal can receive, to obtain each sub-data; and sends each sub-data to the second terminal respectively.

[0008] In some embodiments, the server responds to a data scheduling request sent by a first terminal, and determines a first data scheduling plan for the first terminal based on a first amount of data to be transferred by the first terminal carried in the data scheduling request and terminal information stored in the server, including:

[0009] When the first terminal detects that the remaining memory of the first terminal is less than or equal to a first preset threshold, the first terminal initiates the data scheduling request to the server;

[0010] The server responds to the memory exhaustion instruction indicated by the data scheduling request, and determines the first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

[0011] In some embodiments, determining the first data scheduling plan based on the remaining memory of each terminal in the terminal information and the first data volume of the data to be transferred carried in the data scheduling request includes:

[0012] According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal to be used as a second terminal waiting to receive the data to be transferred;

[0013] The second data volume of the data to be transferred that can be received by each of the second terminals is determined according to a ratio of the remaining memory capacity of each of the second terminals and the first data volume of the data to be transferred.

[0014] In some embodiments, the first terminal and the second terminal communicate with each other via the Transmission Control Protocol TCP or the Internet Protocol IP.

[0015] In some embodiments, the server responds to a data scheduling request sent by a first terminal, and determines a first data scheduling plan for the first terminal based on a first amount of data to be transferred by the first terminal carried in the data scheduling request and terminal information stored in the server, including:

[0016] When the first terminal detects that it is under physical attack, the first terminal initiates the data scheduling request to the server;

[0017] The server responds to the physical attack instruction indicated by the data scheduling request and determines the first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

[0018] In some embodiments, determining the first data scheduling plan based on the remaining memory of each terminal in the terminal information and the first data volume of the data to be transferred carried in the data scheduling request includes:

[0019] According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal to be used as a second terminal waiting to receive the data to be transferred;

[0020] determining, based on the data transmission speed of each second terminal and the first amount of the data to be transferred, a data transmission duration of each second terminal; wherein the data transmission duration of each second terminal is equal;

[0021] determining, based on the data transmission speed and data transmission duration of each second terminal, whether the amount of data to be received by the second terminal exceeds the remaining memory capacity of the second terminal;

[0022] In a case where the amount of data to be received by any second terminal does not exceed the remaining memory capacity of the second terminal, the amount of data to be received by each second terminal is determined to be the second amount of data to be transferred that can be received.

[0023] In some embodiments, the data transmission method further includes:

[0024] If the amount of data that the second terminal is ready to receive exceeds its own memory reserve, the second terminal whose amount of data is ready to receive exceeds its own memory reserve is used as a target second terminal, and the second amount of data that the target second terminal can receive is determined to be the memory reserve of the second terminal;

[0025] For the remaining second terminals except the target second terminal, the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred is returned to the step until the amount of data to be received by any other second terminal does not exceed the memory remaining capacity of the corresponding other second terminal, thereby determining the second data volume of the data to be transferred that the other second terminals can receive.

[0026] In some embodiments, the first terminal and the second terminal communicate with each other via the User Datagram Protocol (UDP).

[0027] In some embodiments, sending each of the sub-data volumes to the second terminal separately includes:

[0028] For each piece of sub-data, a set of first preset identifiers is added before the sub-data, and a set of first preset identifiers is added after the sub-data, to obtain a data packet containing the preset identifiers and the sub-data; the splicing sequence numbers indicated by the first preset identifiers added to different sub-data are different;

[0029] The data packets corresponding to the respective sub-data are sent to the corresponding receiving second terminals.

[0030] In some embodiments, the data transmission method further includes:

[0031] The first terminal sends a first data recovery request to each terminal within the signal coverage of the gateway, so that each terminal responds to the first data recovery request and determines whether it is a terminal that stores the data packet of the first terminal;

[0032] The second terminal responds to the first data recovery request, determines, based on the first preset identifier in the data packet, the data packet that matches the second preset identifier carried in the first data recovery request, and sends the data packet to the first terminal;

[0033] The first terminal receives the data packets sent by the second terminals, and splices the sub-data in each of the data packets according to the splicing sequence number indicated by the first preset identifier in the data packet to obtain restored data.

[0034] In some embodiments, the data transmission method further includes:

[0035] The first terminal sends a first data recovery request to each terminal and a server within the coverage of the gateway, so that each terminal responds to the first data recovery request and determines whether it is a terminal that stores the data packet of the first terminal;

[0036] The second terminal responds to the first data recovery request and determines whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal;

[0037] If the second preset identifier carried in the first data recovery request does not exist in the data stored by the second terminal, in response to the data recovery command sent by the server to the second terminal, initiate a second data recovery request to recover the transferred data;

[0038] When data recovery is completed, the second terminal continues to respond to the first data recovery request and repeats the step of determining whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal.

[0039] In some embodiments, the data transmission method further includes:

[0040] If the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal, determining whether the second preset identifier is encapsulated by other identifiers;

[0041] If the second preset identifier is not encapsulated by the other identifiers, the data packet corresponding to the second preset identifier is sent to the first terminal.

[0042] In some embodiments, the data transmission method further includes:

[0043] If the second preset identifier is encapsulated by the other identifier, the second terminal monitors whether the terminal corresponding to the other identifier sends a third data recovery request, so as to send the data packet corresponding to the other identifier to the terminal corresponding to the other identifier in response to the third data recovery request.

[0044] In some embodiments, the data transmission method further includes: the server receiving terminal tasks and attribute information reported by each of the terminals, and generating terminal information of each of the terminals.

[0045] In some embodiments, the server periodically determines a third terminal to which data needs to be transferred based on the remaining memory capacity of each terminal; determines a second data scheduling plan for the third terminal based on a third amount of data to be transferred from the third terminal and the terminal information stored in the server, and sends the plan to the third terminal; the second data scheduling plan includes information about each fourth terminal and a fourth amount of data that each fourth terminal can receive; the fourth terminal is a terminal different from the third terminal within the coverage area of ​​the gateway;

[0046] The third terminal receives the second data scheduling plan; and divides the to-be-transferred data having the third data volume into multiple parts according to the fourth data volume that each of the fourth terminals can receive, and sends the multiple parts to the fourth terminals respectively.

[0047] In some embodiments, the data transmission method further includes:

[0048] The server detects the stored memory remaining of each of the terminals, and initiates a memory cleanup request to each terminal within the coverage of the gateway signal when the total redundant space of the memory remaining is less than or equal to a third preset threshold;

[0049] In response to the memory cleaning request, the terminal uploads the data to be cleaned in its own memory to the server.

[0050] In a second aspect, an embodiment of the present disclosure further provides a data transmission method, including:

[0051] In response to the data scheduling request, determining a first data scheduling plan based on a first data volume of its own data to be transferred and terminal information received from the server; the terminal information includes information of each terminal within the coverage of the gateway signal; the first data scheduling plan includes information of each second terminal and a second data volume that each second terminal can receive; the second terminal is a terminal different from the first terminal within the coverage of the gateway; the first terminal is a terminal within the coverage of the gateway that sends the data scheduling request;

[0052] dividing the data to be transferred having the first data volume into a plurality of portions according to the second data volume that can be received by each second terminal, to obtain sub-data for each portion;

[0053] Send each of the sub-data to the second terminal respectively.

[0054] In some embodiments, determining the first data scheduling plan based on the first data volume of the data to be transferred and the terminal information received from the server includes:

[0055] When detecting that its own memory remaining amount is less than or equal to a first preset threshold, responding to the data scheduling request indicating memory exhaustion instruction initiated by itself, obtaining the terminal information from the server, and determining the first data scheduling plan based on the memory remaining amount of each terminal in the terminal information and the first data amount of the data to be transferred.

[0056] In some embodiments, determining the first data scheduling plan based on the remaining memory of each terminal in the terminal information and the first amount of data to be transferred includes:

[0057] According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal to be used as a second terminal waiting to receive the data to be transferred;

[0058] The second data volume of the data to be transferred that can be received by each of the second terminals is determined according to a ratio of the remaining memory capacity of each of the second terminals and the first data volume of the data to be transferred.

[0059] In some embodiments, determining the first data scheduling plan based on the first data volume of the data to be transferred and the terminal information received from the server includes:

[0060] In the event that it detects that it is under external attack, it responds to the data scheduling request initiated by itself indicating that it is under physical attack, obtains the terminal information from the server, and determines the first data scheduling plan based on the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred.

[0061] In some embodiments, determining the first data scheduling plan based on the remaining memory of each terminal in the terminal information and the first amount of data to be transferred includes:

[0062] According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal to be used as a second terminal waiting to receive the data to be transferred;

[0063] determining, based on the data transmission speed of each second terminal and the first amount of the data to be transferred, a data transmission duration of each second terminal; wherein the data transmission duration of each second terminal is equal;

[0064] determining, based on the data transmission speed and data transmission duration of each second terminal, whether the amount of data to be received by the second terminal exceeds the remaining memory capacity of the second terminal;

[0065] In a case where the amount of data to be received by any second terminal does not exceed the remaining memory capacity of the second terminal, the amount of data to be received by each second terminal is determined to be the second amount of data to be transferred that can be received.

[0066] In some embodiments, the data transmission method further includes:

[0067] If the amount of data that the second terminal is ready to receive exceeds its own memory reserve, the second terminal whose amount of data is ready to receive exceeds its own memory reserve is used as a target second terminal, and the second amount of data that the target second terminal can receive is determined to be the memory reserve of the second terminal;

[0068] For the remaining second terminals except the target second terminal, the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred is returned to the step until the amount of data to be received by any other second terminal does not exceed the memory remaining capacity of the corresponding other second terminal, thereby determining the second data volume of the data to be transferred that the other second terminals can receive.

[0069] In a third aspect, an embodiment of the present disclosure further provides a data transmission device, including:

[0070] The server is configured to respond to a data scheduling request sent by a first terminal, determine a first data scheduling plan for the first terminal based on a first data volume of data to be transferred by the first terminal carried in the data scheduling request and terminal information stored in the server, and send the plan to the first terminal; the terminal information includes information of each terminal within a coverage area of ​​a gateway signal; the first data scheduling plan includes information of each second terminal and a second data volume that each second terminal can receive; the first terminal is a terminal within the coverage area of ​​the gateway waiting for data transfer, and the second terminal is a terminal within the coverage area of ​​the gateway different from the first terminal;

[0071] The first terminal is configured to receive the first data scheduling plan; divide the data to be transferred with the first data volume into multiple parts according to the second data volume that each second terminal can receive, to obtain each sub-data; and send each sub-data to the second terminal respectively.

[0072] In a fourth aspect, an embodiment of the present disclosure further provides a data transmission device, comprising:

[0073] The first processing module is configured to respond to the data scheduling request and determine a first data scheduling plan based on a first data volume of its own data to be transferred and terminal information received from the server; the terminal information includes information of each terminal within the coverage of the gateway signal; the first data scheduling plan includes information of each second terminal and a second data volume that each second terminal can receive; the second terminal is a terminal different from the first terminal within the coverage of the gateway; the first terminal is a terminal within the coverage of the gateway that sends the data scheduling request;

[0074] a second processing module configured to divide the data to be transferred having the first data volume into a plurality of portions according to the second data volume that can be received by each second terminal, to obtain sub-data for each portion;

[0075] The sending module is configured to send each portion of the sub-data to the second terminal respectively.

[0076] In a fifth aspect, an embodiment of the present disclosure further provides a computer device, which includes: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the data transmission method as described in any one of the above embodiments are performed.

[0077] In a sixth aspect, an embodiment of the present disclosure further provides a computer non-volatile readable storage medium, wherein a computer program is stored on the computer non-volatile readable storage medium, and when the computer program is executed by a processor, the steps of the data transmission method as described in any one of the above embodiments are executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] FIG1 is a flow chart of a data transmission method provided by an embodiment of the present disclosure;

[0079] FIG2a is a schematic diagram of a process for formulating a first data scheduling plan when the memory of a first terminal is exhausted according to an embodiment of the present disclosure;

[0080] FIG2 b is a flowchart of an exemplary method of formulating a first data scheduling plan according to an embodiment of the present disclosure;

[0081] FIG3a is a schematic diagram of a process for formulating a first data scheduling plan when a first terminal is subjected to a physical attack according to an embodiment of the present disclosure;

[0082] FIG3 b is another exemplary flowchart of formulating a first data scheduling plan provided by an embodiment of the present disclosure;

[0083] FIG4 is a schematic diagram of a network transmission architecture provided by an embodiment of the present disclosure;

[0084] FIG5 is a specific flow chart of a data transmission method provided by an embodiment of the present disclosure;

[0085] FIG6 is a schematic diagram of a specific flow of a data transmission method provided by an embodiment of the present disclosure;

[0086] FIG7 is a schematic structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0087] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

[0088] Unless otherwise defined, the technical or scientific terms used in this disclosure should have the usual meanings understood by people with ordinary skills in the field to which this disclosure belongs. The "first", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, similar words such as "one", "an" or "the" do not indicate a quantitative limitation, but rather indicate the presence of at least one. Similar words such as "include" or "comprise" mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0089] In this disclosure, "multiple or several" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0090] In the related art, in order to protect the user privacy data stored locally on the smart terminal, the existing technology usually adopts the following processing methods: 1) security module mechanism; 2) network backup mechanism. Among them, 1) security module mechanism refers to setting up a separate encrypted storage device on the terminal to prevent the leakage of confidential data. However, under normal circumstances, the storage capacity of the encrypted storage device is limited, and the long-term closed operation of the encrypted storage device cannot be guaranteed. Currently, most problems are solved by regular deletion, manual replacement or regular uploading, and the operation process is cumbersome. In addition, the encrypted storage device integrated on the terminal cannot cope with emergencies, such as a sudden fire, or a sudden high-level network attack, and the data cannot be transferred quickly. 2) Network backup mechanism refers to uploading the data collected by the terminal to the cloud immediately and clearing the local storage. However, this processing method requires frequent uploads from smart devices, which increases device wear and tear. It not only requires high-performance smart devices to implement, but also the high frequency of data packet transmission between networks also increases the risk of data theft. In addition, in general, the terminal and the cloud communicate through the https protocol, which has a slow data transmission speed and wastes bandwidth (bandwidth is proportional to cost), thereby increasing transmission costs. In addition, storing data in the cloud will also make it inconvenient for the terminal to use locally.

[0091] In view of this, the embodiment of the present disclosure provides a data transmission method, which substantially eliminates one or more of the problems caused by the limitations and defects of the relevant technologies. Specifically, in the embodiment of the present disclosure, the server responds to the data scheduling request sent by the first terminal, determines the first data scheduling plan of the first terminal according to the first data volume of the data to be transferred by the first terminal carried in the data scheduling request, and the terminal information stored in itself, and sends it to the first terminal; the terminal information includes the information of each terminal within the coverage range of the gateway signal; the first data scheduling plan includes the information of each second terminal and the second data volume that each second terminal can receive; the first terminal is a terminal waiting to transfer data within the coverage range of the gateway, and the second terminal is a terminal different from the first terminal within the coverage range of the gateway; the first terminal receives the first data scheduling plan; according to the second data volume that each second terminal can receive, the data to be transferred with the first data volume is divided into multiple parts to obtain each sub-data; and each sub-data is sent to the second terminal respectively.

[0092] The embodiment of the present disclosure adopts a local storage mechanism, where "local" refers to the mimetic memory space formed by various terminals within the signal coverage range of the same gateway. The data to be transferred in a first terminal under a gateway is stored in the local memory space of the second terminal under the gateway, realizing distributed storage of the data to be transferred. At the same time, the data transmission speed between terminals is faster than the transmission speed between the terminal and the cloud, that is, local storage can realize rapid backup of data. In addition, compared with traditional technologies, the embodiment of the present disclosure saves the setting of encrypted storage devices, does not require terminals to frequently upload backup data, and reduces the risk of network transmission being stolen.

[0093] A data transmission method provided by an embodiment of the present disclosure is described in detail below. The executor of the data transmission method may be a data transmission device with certain computing capabilities, which integrates a server and at least one terminal within the coverage range of a gateway signal, wherein the server may be a gateway, a cloud, or an advanced terminal; the so-called advanced terminal refers to a terminal with strong computing capabilities.

[0094] The data transmission method provided by the present disclosure includes both a data transfer process and a data recovery process. First, the data transfer process is described in detail. FIG1 is a flow chart of a data transmission method provided by an embodiment of the present disclosure, as shown in FIG1 , including steps S11 to S12, wherein:

[0095] S11. The server responds to the data scheduling request sent by the first terminal, determines a first data scheduling plan for the first terminal based on the first data volume of the first terminal to be transferred carried in the data scheduling request and the terminal information stored in the server, and sends the plan to the first terminal.

[0096] In this step, the terminal information includes information about each terminal within the gateway signal coverage area. This terminal information includes, for example, the terminal's Internet Protocol (IP), remaining memory space, redundant space usage (i.e., the percentage of redundant space in total memory space), standby ports (i.e., the reserve port for data transfer), and read / write functions (different terminals have different read / write functions; for a particular terminal, a fixed read / write function is set for reading or writing data to be transferred from memory).

[0097] In this step, the first data scheduling plan includes information of each second terminal and the amount of second data that each second terminal can receive; the first terminal is a terminal waiting for data transfer within the coverage of the gateway, and the second terminal is a terminal different from the first terminal within the coverage of the gateway.

[0098] The embodiment of the present disclosure utilizes a server with relatively strong performance to generate a first data scheduling plan for the first terminal, which can avoid the use of an edge computing mode and reduce the performance requirements for edge devices (terminals under the gateway).

[0099] During specific implementation, the server responds to a data scheduling request sent by the first terminal, which carries a first data volume of data to be transferred by the first terminal. The server can formulate a first data scheduling plan for the first terminal based on the first data volume and the remaining memory space of each terminal in the stored terminal information, so that the first terminal transfers data according to the first data scheduling plan. Here, the process of generating the first data scheduling plan can specifically distribute the data to be transferred with the first data volume across different terminals (which can be all terminals under the gateway or at least some terminals) based on the remaining memory space of each terminal. Here, the terminal that is to receive the data to be transferred is selected as the second terminal.

[0100] For example, the first data volume of the data to be transferred of the first terminal is 100M, and the remaining memory space of other terminals within the coverage area of ​​the gateway except the first terminal, such as terminal A, terminal B and terminal C, are 25M, 50M and 125M respectively. It should be noted that in order to avoid affecting the operation of the terminal in the state of memory exhaustion, the system usually stipulates that the memory needs to have a fixed remaining space of 20%. Therefore, the memory margin of terminal A, terminal B and terminal C (that is, the memory space available for receiving data) is 20M, 40M and 100M respectively. At this time, the second terminal can be screened out as needed, for example, terminal B and terminal C are screened as the second terminal, and 100M of the data to be transferred is stored in the 40M+100M mimetic memory space to generate a first data scheduling plan. The first data scheduling plan generated here includes at least the IP information of each second terminal, the backup port of each second terminal and the second data volume that each second terminal can receive (for example, the second data volume that terminal B can receive is 20M, and the second data volume that terminal C can receive is 80M). Alternatively, Terminal A, Terminal B, and Terminal C can be selected as the second terminal, using the 20MB + 40MB + 100MB mimetic memory space to store 100MB of data to be transferred. Alternatively, only Terminal C can be selected as the second terminal, using the 100MB mimetic memory space to store 100MB of data to be transferred. This embodiment allows for selecting the second terminal that passively receives the data to be transferred based on actual needs, and this disclosure does not impose specific limitations on this.

[0101] Here, the first terminal is a terminal within the gateway's coverage area that is waiting to transfer data, and the second terminal is a terminal within the gateway's coverage area that is different from the first terminal. It should be noted that the first terminal is not a fixed terminal within the system's specified gateway. Instead, for ease of understanding, it distinguishes between a terminal preparing to transfer data and a terminal subsequently preparing to receive data. The terms "first" and "second" should not be used to limit the scope of protection of the embodiments of this disclosure.

[0102] For example, when the server is in the cloud, the cloud and the terminal can publish and connect through the Message Queuing Telemetry Transport (MQTT) protocol. MQTT is a message protocol based on the publish / subscribe paradigm under the ISO standard. It works on the Transmission Control Protocol / Internet Protocol (TCP / IP) and is a publish / subscribe message protocol designed for remote devices with low hardware performance and poor network conditions. MQTT is a client-server based message publish / subscribe transmission protocol. The MQTT protocol is lightweight, simple, open and easy to implement. It should be noted that the data volume of the MQTT protocol is small and cannot transmit data to be transferred (such as pictures and other data). The MQTT protocol only carries the first data scheduling plan, and its data volume is much smaller than the data volume of pictures and other data to be transmitted.

[0103] S12. The first terminal receives the first data scheduling plan, and divides the data to be transferred having the first data volume into multiple parts according to the second data volume that each second terminal can receive, to obtain sub-data for each part.

[0104] Continuing with the above example, the first terminal determines that the second data volume that terminal B can receive is 20M, and the second data volume that terminal C can receive is 80M based on the received first data scheduling plan. The 100M data to be transferred is divided into two parts, one of which has a data volume of 20M and the other has a data volume of 80M.

[0105] S13. The first terminal sends each molecular data to the second terminal respectively.

[0106] Continuing with the above example, the first terminal can send 20M sub-data to terminal B based on the IP information and standby port of terminal B. Based on the IP information and standby port of terminal C, the first terminal can send 80M sub-data to terminal C.

[0107] In some embodiments, the communication method between the first terminal and the second terminal can adopt socket transmission, which is a transmission method that can quickly transmit data within a local area network. However, socket transmission is not a communication protocol. Socket transmission refers to a method of communicating through the IP and port of the terminal. Exemplarily, the first terminal and the second terminal can choose to communicate through the User Datagram Protocol (UDP), which is faster than TCP / IP communication. Exemplarily, the first terminal and the second terminal can choose to communicate through TCP / IP, which is more reliable than UDP communication. Preferably, the UDP protocol is used for transmission. The TCP / IP protocol requires the establishment of a stable connection, which is relatively time-consuming. The UDP protocol has a relatively fast establishment and transmission speed, and its application in a local area network is also relatively reliable.

[0108] Typically, when a first terminal initiates a data scheduling request in different scenarios, the server generates a corresponding first data scheduling plan according to the scenario indicated by the data scheduling request, such as the different scenarios shown in FIG2 and FIG3 below.

[0109] In some embodiments, FIG2a is a schematic diagram of a process for formulating a first data scheduling plan when the memory of the first terminal is exhausted, as provided in an embodiment of the present disclosure. As shown in FIG2a , the process includes steps S21 and S22, wherein:

[0110] S21. When the first terminal detects that the remaining memory of the first terminal is less than or equal to a first preset threshold, the first terminal initiates a data scheduling request to the server.

[0111] The first terminal can automatically monitor its own memory remaining. When the memory remaining is less than or equal to the first preset threshold, it means that the memory of the first terminal is about to run out. For example, there is no remaining memory to store other data, or storing other data will cause the first terminal to be unable to operate. At this time, the first terminal needs to actively initiate a data scheduling request to transfer the data in the memory to other terminals. It should be noted that the data to be transferred of the first terminal can be set to all the data in the memory, or some sensitive data (such as the user's privacy data, etc.) according to actual needs.

[0112] S22. The server responds to the memory exhaustion instruction indicated by the data scheduling request and determines a first data scheduling plan according to the remaining memory of each terminal in the terminal information and the first amount of data to be transferred carried in the data scheduling request.

[0113] It should be noted that the terminal selects different data transfer strategies when encountering different situations. In the case of memory exhaustion, the requirement for emergency data caching is not high, and a balanced transfer strategy can be selected, which takes a slightly longer time but has a lower consumption for the entire system. At this time, the server responds to the memory exhaustion instruction and starts the load balancing algorithm. The so-called load balancing can be understood as the second terminal receiving more second data according to the size of the memory margin according to the size of the second terminal's memory margin, and vice versa. Specifically, the load balancing algorithm can formulate a plan for each second terminal to evenly store the data to be transferred according to the size of the memory margin based on the memory margin of each terminal in the terminal information and the first data volume of the data to be transferred carried in the data scheduling request, and generate a first data scheduling plan.

[0114] For example, FIG2b is a flowchart of an exemplary method of formulating a first data scheduling plan provided by an embodiment of the present disclosure. As shown in FIG2b , the flowchart includes S221 and S222, wherein:

[0115] S221. According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal to be used as a second terminal waiting to receive the data to be transferred.

[0116] In some scenarios, such as when the amount of first data to be transferred is large, each terminal may not have sufficient memory. For some terminals with very low memory, if they are used as second terminals to receive data, not only will they be unable to store much of the data to be transferred, thus reducing storage efficiency, but also increasing additional system consumption. Therefore, the disclosed embodiments dynamically select qualified second terminals from each terminal to receive the data to be transferred based on the memory remaining of each terminal in the terminal information, thereby improving data transfer efficiency and reducing system consumption.

[0117] It should be noted that the setting of the second preset threshold can be set according to actual needs. For example, if the first data volume of the data to be transferred is large, the second preset threshold is relatively high; conversely, if the first data volume of the data to be transferred is small, the second preset threshold is relatively small, and can even be 0. The embodiments of the present disclosure do not impose specific restrictions on this.

[0118] S222: Determine a second amount of the data to be transferred that can be received by each second terminal according to a ratio of the remaining memory amounts of each second terminal and the first amount of the data to be transferred.

[0119] For example, the first terminal has a first amount of data to be transferred of 100MB. The second terminals include terminal B and terminal C. Terminal B has 50MB of free memory space, while terminal C has 125MB of free memory space. Terminal B has a memory margin of 40MB, while terminal C has a memory margin of 100MB. Terminal B's memory margin: Terminal C's memory margin = 2:5. A load-balanced first data scheduling plan can be formulated based on the 2:5 ratio of the memory margins of the second terminals. For example, the 100MB of data to be transferred can be split into two parts. The second amount of data that terminal B can receive is 100×2 / (2+5), approximately 29MB; and the second amount of data that terminal C can receive is 100×5 / (2+5), approximately 71MB.

[0120] The embodiment of the present disclosure adopts a load balancing method to distribute and store the data to be transferred on different second terminals, thereby maximizing the utilization rate of the mimetic memory space without affecting the operating efficiency of the second terminals.

[0121] The above-mentioned load balancing is only one of the methods for generating the first data scheduling plan after the server responds to the memory exhaustion instruction. Of course, after the server responds to the memory exhaustion instruction, it can also formulate other different scheduling plans based on the memory remaining of each terminal in the terminal information and the first data volume of the data to be transferred carried in the data scheduling request. It only needs to ensure that the data to be transferred in the first terminal is transferred to other terminals to release the memory of the first terminal.

[0122] In some embodiments, upon detecting that a first terminal is under a software attack, it initiates a data scheduling request to a server. A software attack can be understood as an illegal access request to sensitive data. Sensitive data may include, for example, private user data. In response to the software attack indication indicated by the data scheduling request, the server determines a first data scheduling plan based on the remaining memory of each terminal in the terminal information and the first amount of data to be transferred contained in the data scheduling request.

[0123] It should be noted that the situation of software attacks does not require a high degree of emergency data caching, and a balanced transfer strategy that takes a slightly longer time but consumes less energy for the entire system can be selected, that is, the above-mentioned load balancing strategy. The specific process of formulating the first data scheduling plan can be found in the above steps S221 and S222, and the repeated parts will not be repeated.

[0124] In some embodiments, when the above embodiments use a load balancing strategy to transfer data, since the data transmission situation is not urgent, the first terminal and the second terminal can communicate via the Transmission Control Protocol TCP or the Internet Protocol IP, making data transmission more secure.

[0125] In some embodiments, FIG3a is a flow chart of formulating a first data scheduling plan when a first terminal is subjected to a physical attack according to an embodiment of the present disclosure. As shown in FIG3a , the process includes steps S31 and S32, wherein:

[0126] S31. When the first terminal detects that it is under physical attack, it initiates a data scheduling request to the server.

[0127] In this step, physical attack can be understood as the hardware of the first terminal being attacked or damaged. Specifically, whether the first terminal is under physical attack can be determined by feedback signals from an illumination sensor, a humidity sensor, or a proximity sensor on the first terminal.

[0128] At this time, in order to ensure data integrity, the data to be transferred is all the data in the memory of the first terminal.

[0129] S32. The server responds to the physical attack instruction indicated by the data scheduling request and determines a first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

[0130] It should be noted that different data transfer strategies are selected based on the terminal's situation. For example, if the hardware is attacked or damaged, a more urgent data cache is required, and a fast transfer strategy with a shorter duration can be selected. In this case, the server responds to the physical attack instruction and initiates a fast transfer algorithm. Based on the remaining memory of each terminal in the terminal information and the first amount of data to be transferred carried in the data scheduling request, it customizes a first data scheduling plan that achieves the shortest data transfer time. Fast transfer can be understood as transferring the data to be transferred to the second terminal in the shortest possible time.

[0131] For example, due to the varying data transmission speeds of different second terminals, different second terminals may take different amounts of time to receive the same unit of sub-data. According to the load balancing solution, some second terminals may quickly receive and store the sub-data, while waiting for other second terminals with slower data transmission speeds. This slows down data transfer and hinders data backup for first terminals that are vulnerable to physical attacks. Therefore, the server needs to customize a first data scheduling plan for rapid data transfer for first terminals that are vulnerable to physical attacks.

[0132] FIG3 b is another exemplary flow chart of formulating a first data scheduling plan provided by an embodiment of the present disclosure. As shown in FIG3 b , the flow chart includes S321 to S326 , wherein:

[0133] S321. According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal to be used as a second terminal waiting to receive the data to be transferred.

[0134] In some scenarios, such as when the amount of first data to be transferred is large, each terminal may not have sufficient memory. For some terminals with very low memory, if they are used as second terminals to receive data, not only will they be unable to store much of the data to be transferred, thus reducing storage efficiency, but also increasing additional system consumption. Therefore, the disclosed embodiments dynamically select qualified second terminals from each terminal to receive the data to be transferred based on the memory remaining of each terminal in the terminal information, thereby improving data transfer efficiency and reducing system consumption.

[0135] It should be noted that the setting of the second preset threshold can be set according to actual needs. For example, if the first data volume of the data to be transferred is large, the second preset threshold is relatively high; conversely, if the first data volume of the data to be transferred is small, the second preset threshold is relatively small, and can even be 0. The embodiments of the present disclosure do not impose specific restrictions on this.

[0136] S322: Determine a data transmission duration T1 for each second terminal according to the data transmission speed of each second terminal and the first data volume of the data to be transferred.

[0137] The data transmission durations T1 of the second terminals are equal.

[0138] For example, it is known that the data transmission speed of the second terminal A is Vi, the data transmission speed of the second terminal B is Vj, the data transmission speed of the second terminal C is Vt, and the first data volume of the data to be transferred is Q. The data transmission time length T1 = Q / (Vi+Vj+Vt) of each second terminal is determined.

[0139] S323: Determine, based on the data transmission speed and data transmission duration of each second terminal, whether the amount of data to be received by each second terminal exceeds the remaining memory capacity of the second terminal. If the amount of data to be received by any second terminal does not exceed the remaining memory capacity of the second terminal, execute S324; if the amount of data to be received by any second terminal exceeds the remaining memory capacity of the second terminal, execute S325.

[0140] Continuing with the previous example, it is known that the memory remaining of the second terminal A is X1, the data transmission speed of the second terminal B is X2, and the data transmission speed of the second terminal C is X3. The amount of data that the second terminal A is prepared to receive is Vi×T1, the amount of data that the second terminal B is prepared to receive is Vj×T1, and the amount of data that the second terminal CA is prepared to receive is Vt×T1.

[0141] It should be noted that the amount of data that the second terminal is ready to receive is not the second amount of data actually required to store the sub-data, but a predetermined theoretical amount of data that can be quickly stored. This amount of data may or may not exceed the memory remaining of the corresponding second terminal.

[0142] S324: When the amount of data to be received by any second terminal does not exceed the remaining memory capacity of the second terminal, determine the amount of data to be received by each second terminal as the second amount of data to be transferred that can be received.

[0143] Continuing with the above example, when Vi×T1≤X1, Vj×T1≤X2, and Vt×T1≤X3, the second data volume of the second terminal A is determined to be Vi×T1, the second data volume of the second terminal B is determined to be Vj×T1, and the second data volume of the second terminal C is determined to be Vt×T1.

[0144] S325. When the amount of data to be received by the second terminal exceeds its own memory margin, the second terminal whose amount of data to be received exceeds its own memory margin is used as the target second terminal, and the second amount of data that the target second terminal can receive is determined to be its own memory margin.

[0145] For example, if Vi×T1>X1, Vj×T1≤X2, and Vt×T1≤X3, then second terminal A is determined to be the target second terminal, and second terminal B and second terminal C are the remaining second terminals excluding the target second terminal. In this case, the amount of second data that the target second terminal can receive is determined to be its own memory reserve, that is, X1.

[0146] S326: For the remaining second terminals except the target second terminal, return to step S322 and continue until the amount of data to be received by any other second terminal does not exceed the remaining memory capacity of the corresponding other second terminal, thereby determining the second amount of data to be transferred that can be received by the other second terminals.

[0147] When this step returns to step S322, the other second terminals are equivalent to the second terminals in S322, and the specific principle for determining the data transmission duration is the same. In specific implementation, the data transmission duration T2 of the other second terminals can be determined based on the remaining memory of the target second terminal, the data transmission speed of the other second terminals, and the first data volume of the data to be transferred; the data transmission duration T2 of the other second terminals is equal.

[0148] Continuing with the above example, given the remaining memory X1 of the target second terminal, the data transmission speed Vj of the second terminal B, the data transmission speed Vt of the second terminal C, and the first amount of data to be transferred Q, the data transmission time T2 of the other second terminals is determined to be (Q-X1) / (Vj+Vt). This still allows the backup of the data to be transferred to be completed in the shortest possible time.

[0149] When Vj×T2≤X2 and Vt×T2≤X3, the second data amount of the second terminal A is determined to be X1, the second data amount of the second terminal B is determined to be Vj×T2, and the second data amount of the second terminal C is determined to be Vt×T2.

[0150] In the above steps S321 to S326, the server can reduce the data receiving pressure of the second terminal with low network speed and improve the data transfer speed by customizing the first data scheduling plan for fast data transfer.

[0151] In some embodiments, when the above embodiments adopt a fast transfer strategy, the first terminal and the second terminal can communicate via UDP. UDP communication is faster than TCP / IP communication, thereby further improving the data transfer speed.

[0152] In some embodiments, the first terminal transfers memory data. In practical application scenarios, if the first terminal is physically attacked and the transferred data is recovered, it is possible to restore the data after the first terminal is repaired or an equivalent terminal is installed to replace it. Therefore, it is necessary to tag the transferred sub-data to indicate the first terminal to which the sub-data belongs and the order in which it will be restored.

[0153] Step S13 specifically includes S131 and S132, wherein:

[0154] S131 . For each piece of sub-data, add a set of first preset identifiers before the sub-data and add a set of first preset identifiers after the sub-data to obtain a data packet including the preset identifiers and the sub-data.

[0155] Exemplarily, the first preset identifier includes the second preset identifier, the first terminal IP address, and the concatenated sequence number of the corresponding sub-data. The second preset identifier is an identifier that represents the first data adjustment plan. For example, the first preset identifier is XXXYYYZZZ, where "XXX" represents the second preset identifier, "YYY" represents the first terminal IP address, and "ZZZ" represents the concatenated sequence number of the corresponding sub-data. GGG represents the sub-data, and the resulting data packet is a set of data XXXYYYZZZGGGXXXYYYZZZ.

[0156] Before being transferred, a first preset identifier is added to each sub-data. Different sub-data have different first preset identifiers added. Specifically, different sub-data have different splicing sequence numbers indicated by the first preset identifiers added. The splicing sequence numbers of the sub-data are arranged in sequence according to the order in which the data to be transferred is divided. The splicing sequence number of the first segment of sub-data is 01, the splicing sequence number of the second segment of sub-data is 02, ..., and the splicing sequence number of the nth segment of sub-data is n; or, the splicing sequence number of the nth segment of sub-data is 01, the splicing sequence number of the n-1th segment of sub-data is 02, ..., and the splicing sequence number of the first segment of sub-data is n; in the subsequent data recovery stage, it is only necessary to splice the sub-data in sequence according to the order of the splicing sequence numbers to obtain complete recovered data (that is, the data to be transferred in the data transfer stage).

[0157] S132: Send the data packets corresponding to each molecular data to the corresponding receiving second terminal.

[0158] Here, the first terminal sends the data packets corresponding to each sub-data to the corresponding receiving second terminal. In the subsequent data recovery stage, the second terminal can find the data packet requesting data recovery based on the first preset identifier carried in the data packet and feed the data packet back to the first terminal.

[0159] The data transmission method provided by the present disclosure also includes a data recovery process. That is, the first terminal requests that the data transmitted during the transfer phase be restored to the memory. In one case, after the second terminal receives the data packet from the first terminal, the data packet is not scheduled before it is restored. In another case, in order to meet the balance of the memory margins of each terminal within the coverage area of ​​the gateway signal and to achieve rapid transfer of the data to be transferred, the simulated memory space formed by each terminal will be updated from time to time. After the update, the memory margin of each terminal will change, and the data in the memory will also be adjusted. For example, a data packet from a first terminal is transmitted to a second terminal A. However, as a terminal preparing to transfer data, the second terminal A is likely to transfer part of the data packet from the first terminal to the memory of another terminal (not the first terminal nor the second terminal) within the coverage of the gateway for storage, thus resulting in a data "nesting doll" phenomenon. For example, there are a first terminal, a second terminal S1, a second terminal S2, and a second terminal S3, wherein the first terminal transfers different sub-data to the second terminal S1, the second terminal S2, and the second terminal S3 respectively; the second terminal S1 then transfers part of its own data and part of the sub-data of the first terminal to the second terminal S2. At this time, the memory of the second terminal S2 stores both part of the data of the second terminal S2 and part of the sub-data of the first terminal, thus resulting in a data "nesting doll" phenomenon.

[0160] In some embodiments, in the case where the second terminal does not schedule the received data packet, as shown in FIG1 , the process specifically includes steps S41 to S43, wherein:

[0161] S41. The first terminal sends a first data recovery request to each terminal within the coverage of the gateway signal, so that each terminal responds to the first data recovery request and determines whether it is a terminal that stores the data packet of the first terminal.

[0162] Here, the first terminal broadcasts a first data recovery request within the coverage area of ​​the gateway signal. Each terminal within the coverage area of ​​the gateway signal responds to the first data recovery request. Each terminal determines whether a data packet matching the second preset identifier carried in the first data recovery request is stored in its own memory. Specifically, the terminal detects whether the second preset identifier carried in the first data recovery request matches the second preset identifier in the first preset identifier in the data packet. If so, the terminal is the second terminal that received the data packet from the first terminal. If not, the terminal does not store the data packet from the first terminal.

[0163] S42: The second terminal responds to the first data recovery request, determines a data packet that matches the second preset identifier carried in the first data recovery request according to the first preset identifier in the data packet, and sends the data packet to the first terminal.

[0164] Since the second terminal stores the data packet, when it responds to the first data recovery request, it can find the data packet matching the first preset identifier according to the first preset identifier in the data packet and send the data packet to the first terminal.

[0165] The second preset identifier is an identifier that represents the first data adjustment plan, and may include the serial number (SN) of the first terminal that adopts the first data adjustment plan, the system timestamp for generating the first data adjustment plan, and the number of times the first terminal initiates a data scheduling request.

[0166] S43: The first terminal receives the data packets sent by the second terminals, and splices the sub-data in each data packet according to the splicing sequence number indicated by the first preset identifier in the data packet to obtain restored data.

[0167] The first terminal can receive data packets sent by different second terminals, and splice the sub-data in each data packet in sequence according to the splicing order indicated by the splicing sequence number in the received data packet to obtain restored data. The restored data is the "data to be transferred" transferred out during the data transfer phase.

[0168] In some embodiments, for the case of data "nesting dolls", steps S51 to S57 are specifically included, wherein:

[0169] S51. A first terminal sends a first data recovery request to each terminal and a server within the coverage of a gateway, so that each terminal responds to the first data recovery request and determines whether it is a terminal that stores the data packet of the first terminal.

[0170] Here, the first terminal broadcasts a first data recovery request within the coverage area of ​​the gateway signal. Each terminal within the coverage area of ​​the gateway signal responds to the first data recovery request. Each terminal determines whether a data packet matching the second preset identifier carried in the first data recovery request is stored in its own memory. Specifically, the terminal detects whether the second preset identifier carried in the first data recovery request matches the second preset identifier in the first preset identifier in the data packet. If so, the terminal is the second terminal that received the data packet from the first terminal. If not, the terminal does not store the data packet from the first terminal.

[0171] S52: The second terminal responds to the first data recovery request and determines whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal.

[0172] The second terminal is the terminal that receives the data packet transferred from the first terminal. However, the second terminal may transfer the data packet to another terminal, or split the data packet and transfer it to another terminal along with some of the data in its own memory. Therefore, the data packet of the first terminal may or may not be present in the data stored by the second terminal. The second terminal can determine whether the data packet of the first terminal exists by detecting whether the data in its memory contains an identifier that matches the second preset identifier carried in the first data recovery request. If so, it indicates that the second terminal stores the data packet of the first terminal, and step S55 is executed. Otherwise, it indicates that the data packet of the first terminal is not present in the data stored by the second terminal, and step S53 is executed.

[0173] The second preset identifier is an identifier that represents the first data adjustment plan, and may include the serial number (SN) of the first terminal that adopts the first data adjustment plan, the system timestamp for generating the first data adjustment plan, and the number of times the first terminal initiates a data scheduling request. For example, the second preset identifier is 0000012022102715341101, where "000001" represents the SN number of the first terminal, and "20221027153411" represents the system timestamp for generating the first data adjustment plan, including year, month, day, hour, minute, and second, that is, 15:34:11 on October 27, 2022. "01" indicates that the first terminal initiates a data scheduling request for the first time.

[0174] For example, there are a first terminal, a second terminal S1, a second terminal S2, and a second terminal S3. The first terminal transfers data packets containing different sub-data to the second terminal S1, the second terminal S2, and the second terminal S3, respectively. The second terminal S1 then transfers part of its own data and the data packets stored on its own first terminal to the second terminal S2. At this time, the data packets of the first terminal do not exist in the second terminal S1, and the second terminal S2 stores both part of the data of the second terminal S1 and the data packets of the first terminal. The second terminal S3 transfers part of its own data and part of the data of the data packets stored on its own first terminal to another terminal S0 (a terminal other than the first and second terminals). At this time, the second terminal S3 contains part of the data of the data packets of the first terminal, and the other terminal S0 stores both part of the data of the second terminal S3 and part of the data of the data packets of the first terminal.

[0175] S53: If the second preset identifier carried in the first data recovery request does not exist in the data stored in the second terminal, the server initiates a second data recovery request to recover its own transferred data in response to the policy information at the top of the preset policy queue.

[0176] In theory, the second terminal should store the data packet of the first terminal. If the second preset identifier carried by the first data recovery request does not exist in the data stored in the second terminal, it means that the second terminal in this step has transferred the data packet of the first terminal. Then, it is necessary to first restore the data transferred out by the second terminal (including its own and that of the first terminal) before the data recovery process of the first terminal can continue. Otherwise, due to the data "nesting doll" phenomenon, the incomplete data packet of the first terminal stored in other terminals cannot be restored.

[0177] The server stores the data scheduling plan of any terminal and the second preset identifier corresponding to the data scheduling plan. The data scheduling plan is stored in the plan queue in order according to the system timestamp in the second preset identifier corresponding to it. The plan queue stores all data scheduling plans generated by the server, and stores them in order according to the system timestamp in the second preset identifier corresponding to the data scheduling plan, wherein the data scheduling plan at the top of the plan queue is the most recently generated data scheduling plan. In the data recovery stage, the server broadcasts the data scheduling plan in the order of the plan queue. The broadcast carries the second preset identifier corresponding to the data scheduling plan. The SN number in the second preset identifier can represent the terminal requesting data recovery.

[0178] Continuing with the previous example, the second terminal in step S53 is the second terminal S1 in the above example (no sub-data for the first terminal exists). At this point, based on the currently-topped data scheduling plan, the server sends a data recovery command to second terminal S1 when the SN number in the second preset identifier corresponding to the data scheduling plan is the SN number of second terminal S1. In response to the data recovery command, second terminal S1 initiates a second data recovery request to each terminal within the gateway's signal coverage area, requesting the recovery of its own transferred data (i.e., the partial data of second terminal S1 stored in second terminal S2 and the data packet of the first terminal).

[0179] S54. When data recovery is completed, the second terminal S1 continues to respond to the first data recovery request and repeats the step of "determining whether the data stored in the second terminal contains the second preset identifier carried in the first data recovery request" in S52.

[0180] Specifically, when data recovery is complete at the second terminal S1, the second terminal S1 responds to the first data recovery request and determines whether the second preset identifier carried in the first data recovery request exists in the data stored by the second terminal S1. Since the second terminal S1 has recovered the data packet of the first terminal, data matching the second preset identifier carried in the first data recovery request must exist, and the process then proceeds to step S55.

[0181] S55: If the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal, determine whether the second preset identifier is encapsulated by other identifiers.

[0182] In this step, it is determined whether the second preset identifier is encapsulated by other identifiers. If so, step S56 is executed; if not, step S57 is executed.

[0183] Continuing with the previous example, the data stored by second terminal S1 after data recovery is complete is, for example, W2-R1-W1-R1-W2, where W2 represents the data of second terminal S1 itself, W1 represents the sub-data of the first terminal, and R1 represents the first preset identifier corresponding to the first terminal. R1 contains the second preset identifier carried in the first data recovery request initiated by the first terminal, and the data W2-R1-W1-R1-W2 contains no other identifiers besides the first preset identifier R1. Therefore, the first preset identifier R1 is not encapsulated by other identifiers. After data recovery is complete, second terminal S1 proceeds to step S56.

[0184] S56: If the second preset identifier is not encapsulated by other identifiers, send the data packet corresponding to the second preset identifier to the first terminal.

[0185] Continuing with the above example, for the second terminal S1 after data recovery is completed, the data stored is W2-R-W1-R-W2. Except for the first preset identifier R, there is no other identifier on the outside (that is, the side where R points to W2). Therefore, the second terminal S1 can send the data packet R-W1-R corresponding to the second preset identifier to the first terminal.

[0186] Exemplarily, the second terminal S3 stores partial data from the first terminal's data packet. Therefore, the second terminal S3 executes step S55. The data stored by the second terminal S3 contains the second preset identifier carried in the first data recovery request. The second terminal S3 determines whether the second preset identifier is encapsulated by another identifier. Since the second terminal S3 does not receive data from other terminals, it detects that the second preset identifier is not encapsulated by another identifier and then executes step S56.

[0187] S57. If the second preset identifier is encapsulated by other identifiers, the second terminal monitors whether the terminal corresponding to the other identifier sends a third data recovery request, so as to send the data packet corresponding to the other identifier to the terminal corresponding to the other identifier in response to the third data recovery request.

[0188] Exemplarily, the second terminal S2 stores both partial data from the second terminal S1 and the data packet from the first terminal. Therefore, the data stored by the second terminal S2 contains the second preset identifier carried in the first data recovery request. The second terminal S2 then determines whether the second preset identifier is encapsulated by another identifier. Since the partial data from the second terminal S1 and the data packet from the first terminal are nested in the second terminal S2, for example, W3-R2-W2-R1-W1-R1-W2-R2-W3, where W1 represents the sub-data of the first terminal, R1 represents the first preset identifier corresponding to the first terminal, and R1 contains the second preset identifier carried in the first data recovery request initiated by the first terminal; W2 represents partial data from the second terminal S1, R2 represents the first preset identifier corresponding to the second terminal S1; and W3 represents the data of the second terminal S2 itself. Based on this, it can be determined that the second preset identifier (i.e., the second preset identifier in R1) carried in the first data recovery request initiated by the first terminal in the data W3-R2-W2-R1-W1-R1-W2-R2-W3 of the second terminal S2 is encapsulated by the other identifier R2, and R2 corresponds to the second terminal S1. At this point, the second terminal S2 needs to monitor whether the second terminal S1 sends a third data recovery request (i.e., the second data recovery request initiated by the second terminal S1 in response to the data recovery command sent by the server to each terminal within the coverage area of ​​the gateway signal in the above embodiment). The second terminal S2 responds to the second data recovery request of the second terminal S1 and sends the data R2-W2-R1-W1-R1-W2-R2 to the second terminal S1. It should be noted that since the terminal corresponding to the other identifier is the second terminal S1, the third data recovery request is also the second data recovery request described above; however, the terminal corresponding to the other identifier may also be another terminal, and in this case, the third data recovery request is not equal to the second data recovery request. Afterwards, the second terminal S1 concatenates the data to obtain data W2-R1-W1-R1-W2. The second terminal S1 returns to execute step S52 until the data R1-W1-R1 is sent to the first terminal.

[0189] For example, for another terminal S0, both partial data from the second terminal S3 and partial data from the first terminal's data packet are stored. Therefore, the data stored by the other terminal S0 contains the second preset identifier carried in the first data recovery request. The determination continues to determine whether the second preset identifier is encapsulated by the other identifier. Since the other terminal S0 contains partial data from the second terminal S3 and partial data from the first terminal's data packet, for example, W0-R4-W4-R1-W1-R4-W0, where W1 represents the sub-data of the first terminal, R1 represents the first preset identifier corresponding to the first terminal, and R1 contains the second preset identifier carried in the first data recovery request initiated by the first terminal; W4 represents partial data from the second terminal S3, R4 represents the first preset identifier corresponding to the second terminal S3; and W0 represents the data of the other terminal S0 itself. Therefore, it is determined that the second preset identifier carried in the first data recovery request initiated by the first terminal (i.e., the second preset identifier in R1) in the other terminal S0 data W0-R4-W4-R1-W1-R4-W0 is encapsulated by the other identifier R4. At this point, the other terminal S0 needs to monitor whether the second terminal S3 sends a third data recovery request. If the second terminal S3 responds to the data recovery command sent by the server and initiates the third data recovery request to all terminals within the gateway signal coverage area, the other terminal S0 responds to the third data recovery request from the second terminal S3 and sends the data R4-W4-R1-W1-R4 to the second terminal S3. After the data recovery is completed, the spliced ​​data for the second terminal S3 is W4-R1-W1-R1-W4. The second terminal S3 returns to step S52 until the data R1-W1-R1 is sent to the first terminal.

[0190] In some embodiments, the data transmission method further includes constructing terminal information. Specifically, the server receives terminal tasks and attribute information reported by each terminal, and generates terminal information of each terminal.

[0191] The terminal tasks and attribute information reported by each terminal include, for example, the terminal name, the terminal identity document (ID), the terminal device attributes, the remaining space and redundant space occupancy of the terminal memory, the storage path of the terminal information, the memory read and write start pointer, the read and write function, etc.

[0192] The server generates a memory table (also known as terminal information) based on the terminal tasks and attribute information reported by each terminal, which includes information such as the IP address corresponding to each terminal, the remaining memory space, the redundant space occupancy rate, the backup port, the read and write functions, etc.

[0193] The above-described embodiments include a first terminal proactively initiating a data scheduling request in different scenarios, requesting the transfer of its own data. Of course, in some embodiments, to improve the load balance of each terminal in a distributed storage scenario, the server can periodically determine a third terminal to which data needs to be transferred based on the remaining memory capacity of each terminal; determine a second data scheduling plan based on the third terminal's third data volume to be transferred and its own stored terminal information, and send it to the third terminal; the second data scheduling plan includes information about each fourth terminal and the fourth data volume that each fourth terminal can receive; and the fourth terminal is a terminal different from the third terminal within the gateway's coverage area.

[0194] Here, the method for determining the second data scheduling plan can refer to the method for generating the first data scheduling plan in the above embodiment. For example, referring to steps S221 and S222, specifically, based on the remaining memory of each terminal in the terminal information, terminals with remaining memory greater than or equal to a second preset threshold are screened from each terminal to be used as fourth terminals waiting to receive the data to be transferred. Based on the ratio of the remaining memory of each fourth terminal and the third amount of data to be transferred of the third terminal, the fourth amount of data to be transferred that each fourth terminal can receive is determined.

[0195] The third terminal receives the second data scheduling plan; and divides the data to be transferred having the third data volume into multiple parts according to the fourth data volume that each fourth terminal can receive, and sends them to the fourth terminals respectively.

[0196] The third terminal can send data with different molecules to the fourth terminal according to the IP information and the backup port of the fourth terminal indicated in the second data scheduling plan.

[0197] In this embodiment, the server periodically initiates load balancing requests, monitors the memory space of each terminal, and dynamically adjusts the memory margin of each terminal to ensure that the memory margin of each terminal is balanced, thereby balancing the load pressure of each terminal.

[0198] In some embodiments, since the terminal continuously generates and stores data, the occupancy rate of the mimetic memory space of the system component is greater than the maximum value within a certain period of time. For example, the mimetic memory space is full, and at this time, the user privacy data in the memory can be uploaded to the cloud. Specifically, the server detects the memory remainder of each stored terminal, and when the total redundant space of the memory remainder is less than or equal to the third preset threshold, it initiates a memory cleanup request to each terminal within the coverage range of the gateway signal; the terminal responds to the memory cleanup request and uploads the data to be cleaned in its own memory to the server. Here, the data to be cleaned is also user privacy data, and the uploading of the user privacy data can be encrypted before uploading, which is not limited in the embodiments of the present disclosure. After uploading the data to be cleaned to the server, the mimetic memory space is released and continues to be used for the distributed storage of data to be transferred by subsequent terminals.

[0199] In large-scale IoT systems, the increased connectivity of user privacy data stored on terminals increases the risk of leakage and attack. The aforementioned embodiments, combined with their respective implementations, constitute the data transmission method provided by the disclosed embodiments. Based on the inherent characteristics of IoT systems, this method proposes a local storage mechanism that enables secure storage without the need for additional security hardware. Furthermore, terminals can employ different data scheduling plans in different application scenarios. For example, they can choose a balanced transfer strategy, which takes a longer time but has a lower impact on the overall system, or a fast transfer strategy, which takes less time.

[0200] The embodiment of the present disclosure is based on the protocol layer to achieve "distributed storage" between various terminals under the coverage of the local area network, which adapts to the distributed storage requirements of the underlying non-server devices (i.e., terminals). In some embodiments, a set of transmission protocols is involved in the local area network based on TCP / IP. Figure 4 is a schematic diagram of a network transmission architecture provided by the embodiment of the present disclosure. As shown in Figure 4, taking the server as the cloud (i.e., the cloud management platform) as an example, the first terminal establishes a connection with the cloud through the MQTT protocol; the first terminal divides the data to be transferred according to the received first data scheduling plan to obtain multiple sub-data; then, the first terminal establishes a connection with the second terminal through the UDP protocol, and the first terminal sends each sub-data to the second terminal through the socket transmission method. In addition, the first terminal sends a first data recovery request to the cloud through the MQTT protocol, and the cloud then sends the first data recovery request to each terminal within the coverage range of the gateway signal; when the second terminal responds to the first data recovery request, it returns the corresponding stored data packet to the first terminal through the UDP protocol. The first terminal receives the sub-data in each data packet and splices them to obtain recovered data.

[0201] To facilitate understanding of a data transmission method provided by an embodiment of the present disclosure, the data transmission method is described in detail below using a complete example. FIG5 is a specific flow chart of a data transmission method provided by an embodiment of the present disclosure. As shown in FIG5 , ① Terminal factory settings: Report terminal tasks and attribute information, such as name, ID, IP, SN, memory space, network speed, port, etc. ② The server verifies the current terminal, such as whether the current terminal is legitimate, and updates the stored terminal information (i.e., updates the original memory table and adds the current terminal's information). ③ Verification of legitimacy indicates that the current terminal is operational. ④ During operation of the new device: The memory remaining dynamically changes and is reported to the server. ⑤ The server monitors the memory remaining of each terminal and updates the memory table simultaneously. In one scenario (including ⑥, ⑦, and ⑧), ⑥ When the first terminal runs out of memory, a data scheduling request indicating a memory exhaustion instruction is initiated. ⑦ In response to the memory exhaustion instruction indicated in the data scheduling request, the server formulates a first data scheduling plan based on the currently stored memory table and the first amount of data to be transferred, and sends it to the first terminal. ⑧ Data transfer for the first terminal: According to the first data scheduling plan, a TCP / IP backup port is activated to transfer redundant data. Or, in another case (including ⑨⑩ ), ⑨ In the event that the first terminal is under physical attack, initiating a data scheduling request indicating a physical attack instruction. ⑩ In response to the physical attack instruction indicated in the data scheduling request, the server formulates a first data scheduling plan based on the currently stored memory table and the first amount of data to be transferred, and sends the plan to the first terminal. First terminal data transfer: According to the first data scheduling plan, the UDP backup port is started to transfer user privacy data. The new terminal replaces the first terminal as the new first terminal: the new first terminal reports the terminal task and attribute information, such as name, ID, IP, SN, memory space, network speed, port, etc. The information of the new first terminal is the same as the information of the first terminal it replaces. In one case (including ), The new first terminal initiates a first data recovery request for recovering redundant data, and simultaneously starts a TCP / IP standby port for receiving data fed back by the second terminal. The server sends the first data recovery request to each terminal within the coverage of the gateway. Or, in another case (including ), The new first terminal initiates a first data recovery request for recovering the user's private data, and simultaneously starts the UDP standby port for receiving data fed back by the second terminal. The server sends the first data recovery request to each terminal within the coverage area of ​​the gateway. The server initiates a memory cleanup request. In response to the memory cleanup request, the terminal uploads the data to be cleaned in its own memory to the server.

[0202] FIG6 is a schematic diagram of a specific flow chart of a data transmission method provided by an embodiment of the present disclosure. As shown in FIG6 , the server is used as a gateway for example. The system includes a device side and a gateway side. The device side includes a first terminal and a second terminal. Other terminals are not shown here.

[0203] The device side executes the following steps S61 to S67: S61, monitors whether the data recovery request (including the first data recovery request and the second data recovery request) is broadcast in the local area network. If so, execute S62; if not, repeat S61; S62, determines whether the IP in the first preset identifier corresponding to the data scheduling plan (the first data scheduling plan and the second data scheduling plan) is the local IP. If not, execute S63; if so, execute S66; S63, determines whether the second preset identifier carried by the received data recovery request exists in the memory. If so, execute S64; if not, return to execute S61; S64, determines whether the second preset identifier is encapsulated by other identifiers. If so, return to S61; if not, execute S65; S65, according to the data scheduling plan, start the backup port corresponding to the protocol to prepare for sending data. S66, according to the data scheduling plan, start the backup port corresponding to the protocol to prepare for receiving data; S67, after receiving is completed, broadcast the data recovery completion signal and execute step S74.

[0204] The gateway side executes the following steps S71 to S77: S71, monitors whether the data recovery request (including the first data recovery request and the second data recovery request) is broadcast in the local area network. If so, execute S72; if not, execute S74; S72, determines whether the data scheduling plan (each data scheduling plan is configured with a corresponding first preset identifier, and the first preset identifier contains the second preset identifier) ​​matched by the second preset identifier carried by the currently broadcast data recovery request is the top plan in the plan queue. If so, return to execute S71, if not, execute S73; S73, broadcast the data scheduling plan at the top of the plan queue, and at the same time, broadcast to interrupt the ongoing splicing. S74, monitors whether the data recovery completion signal is broadcast in the local area network. If so, execute S75, if not, return to execute S71; S75, delete the top plan in the plan queue.

[0205] Another data transmission method provided by an embodiment of the present disclosure is described in detail below. The execution subject of the data transmission method can be a first terminal. Specifically, in response to a data scheduling request, the first data scheduling plan is determined based on the first data volume of its own data to be transferred and the terminal information received from the service end; the terminal information includes the information of each terminal within the coverage range of the gateway signal; the first data scheduling plan includes the information of each second terminal and the second data volume that each second terminal can receive; the second terminal is a terminal different from the first terminal within the coverage range of the gateway; the first terminal is a terminal within the coverage range of the gateway that sends a data scheduling request; according to the second data volume that each second terminal can receive, the data to be transferred with the first data volume is divided into multiple parts to obtain each sub-data; and each sub-data is sent to the second terminal respectively.

[0206] The data transmission method provided in the embodiment of the present disclosure utilizes a first terminal to generate a first data scheduling plan. However, the principle is the same as that of a data transmission method in the above embodiment that utilizes a server to generate a first data scheduling plan, and the repeated parts will not be repeated.

[0207] The manner in which the first terminal communicates with the second terminal and transmits the data to be transferred can refer to the detailed process of a data transmission method provided in the above embodiment, and the repeated parts will not be repeated.

[0208] The embodiment of the present disclosure adopts a local storage mechanism, where "local" refers to the mimetic memory space formed by each terminal within the signal coverage range of the same gateway. The data to be transferred in the first terminal is stored in the local memory space of the second terminal under the gateway, realizing distributed storage of the data to be transferred. At the same time, the data transmission speed between the terminals is faster than the transmission speed between the terminal and the cloud, that is, local storage can realize rapid backup of data. In addition, compared with traditional technologies, the embodiment of the present disclosure saves the setting of encrypted storage devices, does not require terminals to frequently upload backup data, and reduces the risk of network transmission being stolen.

[0209] In some embodiments, determining a first data scheduling plan based on a first amount of data to be transferred and terminal information received from a server includes:

[0210] When detecting that its own memory balance is less than or equal to a first preset threshold, it responds to the data scheduling request indicating memory exhaustion instruction initiated by itself, obtains terminal information from the server, and determines the first data scheduling plan based on the memory balance of each terminal in the terminal information and the first data amount of the data to be transferred.

[0211] In some embodiments, determining the first data scheduling plan based on the remaining memory of each terminal and the first amount of data to be transferred in the terminal information includes:

[0212] According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal, and used as a second terminal waiting to receive the data to be transferred;

[0213] The second data volume of the data to be transferred that can be received by each second terminal is determined according to the ratio of the remaining memory capacity of each second terminal and the first data volume of the data to be transferred.

[0214] In some embodiments, the first terminal and the second terminal communicate with each other via the Transmission Control Protocol TCP or the Internet Protocol IP.

[0215] In some embodiments, determining a first data scheduling plan based on a first amount of data to be transferred and terminal information received from a server includes:

[0216] In the case of detecting that it is under external attack, it responds to the data scheduling request initiated by itself indicating that it is under physical attack, obtains terminal information from the server, and determines the first data scheduling plan based on the memory remaining of each terminal and the first data amount of data to be transferred in the terminal information.

[0217] In some embodiments, determining the first data scheduling plan based on the remaining memory of each terminal and the first amount of data to be transferred in the terminal information includes:

[0218] According to the memory remaining amount of each terminal in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each terminal, and used as a second terminal waiting to receive the data to be transferred;

[0219] Determining a data transmission duration for each second terminal according to a data transmission speed of each second terminal and a first amount of data to be transferred; the data transmission duration for each second terminal is equal;

[0220] determining, based on the data transmission speed and data transmission duration of each second terminal, whether the amount of data to be received by the second terminal exceeds the remaining memory capacity of the second terminal;

[0221] When the amount of data to be received by any second terminal does not exceed the remaining memory capacity of the second terminal, the amount of data to be received by each second terminal is determined to be the second amount of receivable data to be transferred.

[0222] In some embodiments, the data transmission method further includes:

[0223] In a case where the amount of data to be received by the second terminal exceeds the remaining memory of the second terminal, the second terminal whose amount of data to be received exceeds the remaining memory of the second terminal is used as the target second terminal, and the second amount of data that the target second terminal can receive is determined to be the remaining memory of the second terminal;

[0224] For the remaining second terminals except the target second terminal, the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred is returned to the step until the data volume to be received by any other second terminal does not exceed the memory remaining of the corresponding other second terminal, and the second data volume of the data to be transferred that the other second terminals can receive is determined.

[0225] In some embodiments, the first terminal and the second terminal communicate via the User Datagram Protocol (UDP).

[0226] In some embodiments, each sub-data volume is sent separately to the second terminal, including: for each sub-data, adding a set of first preset identifiers before the sub-data, and adding a set of first preset identifiers after the sub-data to obtain a data packet containing the preset identifiers and the sub-data; the splicing sequence numbers indicated by the first preset identifiers added to different sub-data are different; and the data packets corresponding to each sub-data are sent separately to the corresponding receiving second terminal.

[0227] In addition, the embodiment of the present disclosure also provides another data transmission method, the execution subject of which can be a data transmission device with certain computing capabilities, which integrates a server and at least one terminal within the coverage range of the gateway signal, wherein the server can be a gateway, a cloud or an advanced terminal; the so-called advanced terminal refers to a terminal with strong computing capabilities.

[0228] The data transmission method utilizes the first terminal to generate a first data scheduling plan. For details, please refer to the above-mentioned data transmission method with the first terminal as the execution subject, and the repeated parts will not be repeated.

[0229] The data transmission method also includes a data recovery process, wherein:

[0230] In some embodiments, the first terminal sends a first data recovery request to each terminal within the coverage of the gateway signal, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stores the data packet of the first terminal.

[0231] The second terminal responds to the first data recovery request, and the second terminal can determine a data packet that matches the second preset identifier carried in the first data recovery request according to the first preset identifier in the data packet, and send the data packet to the first terminal.

[0232] The first terminal receives the data packets sent by the second terminals, and splices the sub-data in each data packet according to the splicing sequence number indicated by the first preset identifier in the data packet to obtain restored data.

[0233] It should be noted that the specific execution process of this embodiment can refer to the execution process of steps S41 to S43 above, and the repeated parts will not be repeated.

[0234] In some embodiments, the first terminal sends a first data recovery request to each terminal and the service end within the coverage of the gateway, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stores the data packet of the first terminal.

[0235] The second terminal responds to the first data recovery request and determines whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal.

[0236] If the second preset identifier carried in the first data recovery request does not exist in the data stored in the second terminal, a second data recovery request is initiated to recover the transferred data in response to the data recovery command sent by the server to the second terminal.

[0237] When data recovery is completed, the second terminal continues to respond to the first data recovery request and repeats the step of determining whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal.

[0238] In some embodiments, in combination with the above embodiments, if the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal, it is determined whether the second preset identifier is encapsulated by other identifiers.

[0239] If the second preset identifier is not encapsulated by other identifiers, the data packet corresponding to the second preset identifier is sent to the first terminal.

[0240] In some embodiments, in combination with the above embodiments, if the second preset identifier is encapsulated by other identifiers, the second terminal monitors whether the terminal corresponding to the other identifier sends a third data recovery request, so that when responding to the third data recovery request, the data packet corresponding to the other identifier is sent to the terminal corresponding to the other identifier.

[0241] It should be noted that the specific execution process of requesting to restore data in each of the above embodiments can refer to the execution process of the above steps S51 to S57, and the repeated parts will not be repeated.

[0242] In some embodiments, the data transmission method further includes: the server receiving terminal tasks and attribute information reported by each terminal, and generating terminal information of each terminal.

[0243] In some embodiments, the server periodically determines a third terminal to which data needs to be transferred based on the memory remaining of each terminal; determines a second data scheduling plan for the third terminal based on the third data volume of the data to be transferred of the third terminal and the terminal information stored in the server, and sends the plan to the third terminal; the second data scheduling plan includes information of each fourth terminal and the fourth data volume that each fourth terminal can receive; the fourth terminal is a terminal different from the third terminal within the coverage range of the gateway; the third terminal receives the second data scheduling plan; and divides the data to be transferred with the third data volume into multiple parts based on the fourth data volume that each fourth terminal can receive, and sends them to the fourth terminal respectively.

[0244] In some embodiments, the server detects the memory remaining of each terminal stored, and when the total redundant space of the memory remaining is less than or equal to a third preset threshold, initiates a memory cleaning request to each terminal within the coverage of the gateway signal; the terminal responds to the memory cleaning request and uploads the data to be cleaned in its own memory to the server.

[0245] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0246] In addition, the embodiment of the present disclosure also provides a data transmission device corresponding to the data transmission method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned data transmission method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0247] The present disclosure provides a data transmission device for use in the aforementioned data transmission method, which integrates a server and at least one terminal within the signal coverage of a gateway. The server can be a gateway, a cloud, or an advanced terminal; the so-called advanced terminal refers to a terminal with strong computing capabilities.

[0248] The server is configured to respond to a data scheduling request sent by a first terminal, determine a first data scheduling plan for the first terminal based on a first data volume of data to be transferred from the first terminal carried in the data scheduling request and terminal information stored in the server, and send the plan to the first terminal; the terminal information includes information of each terminal within a coverage area of ​​a gateway signal; the first data scheduling plan includes information of each second terminal and a second data volume that each second terminal can receive; the first terminal is a terminal within the coverage area of ​​the gateway waiting for data transfer, and the second terminal is a terminal within the coverage area of ​​the gateway different from the first terminal;

[0249] The first terminal is configured to receive a first data scheduling plan; divide the data to be transferred having the first data volume into multiple parts according to the second data volume that each second terminal can receive, to obtain each sub-data; and send each sub-data to the second terminal respectively.

[0250] In some embodiments, the first terminal is configured to initiate a data scheduling request to the server when detecting that the remaining memory of the first terminal is less than or equal to a first preset threshold.

[0251] The server is configured to respond to the memory exhaustion instruction indicated by the data scheduling request and determine a first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

[0252] In some embodiments, the server is configured to screen out terminals with memory remaining greater than or equal to a second preset threshold from each terminal based on the memory remaining of each terminal in the terminal information, and use them as second terminals waiting to receive the data to be transferred; and determine the second data volume of the data to be transferred that each second terminal can receive based on the ratio of the memory remaining of each second terminal and the first data volume of the data to be transferred.

[0253] In some embodiments, the first terminal and the second terminal communicate with each other via the Transmission Control Protocol TCP or the Internet Protocol IP.

[0254] In some embodiments, the first terminal is configured to initiate a data scheduling request to the server when detecting that the first terminal is under physical attack.

[0255] The server is configured to respond to the physical attack instruction indicated by the data scheduling request and determine a first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

[0256] In some embodiments, the server is specifically configured to screen out terminals with memory remaining greater than or equal to a second preset threshold from each terminal based on the memory remaining of each terminal in the terminal information, and use them as second terminals waiting to receive the data to be transferred; determine the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred; the data transmission duration of each second terminal is equal; determine whether the amount of data to be received by the second terminal exceeds the memory remaining of the second terminal based on the data transmission speed of each second terminal and the data transmission duration of each second terminal; and when the amount of data to be received by any second terminal does not exceed the memory remaining of the second terminal, determine the amount of data to be received by each second terminal as the second data volume of the data to be transferred that can be received.

[0257] In some embodiments, the server is further configured to, when there is a second terminal with an amount of data that the second terminal is ready to receive that exceeds its own memory margin, use the second terminal with an amount of data that the target second terminal can receive as the target second terminal, and determine the second amount of data that the target second terminal can receive as its own memory margin; for the remaining second terminals except the target second terminal, return to the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data amount of the data to be transferred, until the amount of data that any other second terminal is ready to receive does not exceed the memory margin of the corresponding other second terminal, and determine the second data amount of the data to be transferred that the other second terminals can receive.

[0258] In some embodiments, the first terminal and the second terminal communicate via the User Datagram Protocol (UDP).

[0259] In some embodiments, the first terminal is specifically configured to add a set of first preset identifiers before each piece of sub-data and a set of first preset identifiers after the sub-data to obtain a data packet containing the preset identifiers and the sub-data; the splicing sequence numbers indicated by the first preset identifiers added to different sub-data are different; and the data packets corresponding to each piece of sub-data are respectively sent to the corresponding receiving second terminal.

[0260] In some embodiments, the first terminal is further configured to send a first data recovery request to each terminal within the coverage of the gateway signal, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stores the data packet of the first terminal.

[0261] The second terminal is configured to respond to the first data recovery request, determine a data packet matching the second preset identifier carried in the first data recovery request according to the first preset identifier in the data packet, and send the data packet to the first terminal.

[0262] The first terminal is configured to receive data packets sent by each second terminal, and splice sub-data in each data packet according to a splicing sequence number indicated by a first preset identifier in the data packet to obtain restored data.

[0263] In some embodiments, the first terminal is configured to send a first data recovery request to each terminal and the server within the coverage area of ​​the gateway, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stores the data packet of the first terminal;

[0264] The second terminal is configured to respond to the first data recovery request and determine whether the second preset identifier carried by the first data recovery request exists in the data stored by the second terminal; if the second preset identifier carried by the first data recovery request does not exist in the data stored by the second terminal, then in response to the command sent by the server to the second terminal to recover data, initiate a second data recovery request requesting recovery of its own transferred data; when data recovery is completed, continue to respond to the first data recovery request and repeat the step of determining whether the second preset identifier carried by the first data recovery request exists in the data stored by the second terminal.

[0265] In some embodiments, the second terminal is configured to determine whether the second preset identifier carried by the first data recovery request is encapsulated by other identifiers if the second preset identifier is present in the data stored in the second terminal; if the second preset identifier is not encapsulated by other identifiers, the data packet corresponding to the second preset identifier is sent to the first terminal.

[0266] In some embodiments, the second terminal is also configured to monitor whether the terminal corresponding to the other identifier sends a third data recovery request if the second preset identifier is encapsulated by other identifiers, so as to send the data packet corresponding to the other identifier to the terminal corresponding to the other identifier in response to the third data recovery request.

[0267] In some embodiments, the server is further configured to receive terminal tasks and attribute information reported by each terminal, and generate terminal information of each terminal.

[0268] In some embodiments, the server is also configured to periodically determine a third terminal to which data needs to be transferred based on the memory remaining of each terminal; determine a second data scheduling plan for the third terminal based on the third data volume of the data to be transferred of the third terminal and the terminal information stored in itself, and send it to the third terminal; the second data scheduling plan includes information of each fourth terminal and the fourth data volume that each fourth terminal can receive; the fourth terminal is a terminal different from the third terminal within the coverage range of the gateway.

[0269] The third terminal is configured to receive the second data scheduling plan; and divide the data to be transferred having the third data volume into multiple parts according to the fourth data volume that can be received by each fourth terminal, and send them to the fourth terminals respectively.

[0270] In some embodiments, the server is also configured to detect the memory remaining of each stored terminal, and when the total redundant space of the memory remaining is less than or equal to a third preset threshold, initiate a memory clearing request to each terminal within the coverage of the gateway signal; the terminal is configured to respond to the memory clearing request and upload the data to be cleared in its own memory to the server.

[0271] The present disclosure also provides another data transmission device, which is applied to the data transmission method described above in which the execution subject is a first terminal. The data transmission device includes a first terminal, which includes a first processing module, a second processing module, and a sending module, wherein:

[0272] The first processing module is configured to respond to the data scheduling request and determine the first data scheduling plan based on the first data volume of its own data to be transferred and the terminal information received from the server; the terminal information includes information of each terminal within the coverage of the gateway signal; the first data scheduling plan includes information of each second terminal and the second data volume that each second terminal can receive; the second terminal is a terminal different from the first terminal within the coverage of the gateway; the first terminal is a terminal within the coverage of the gateway that sends the data scheduling request.

[0273] The second processing module is configured to divide the data to be transferred having the first data volume into multiple parts according to the second data volume that can be received by each second terminal, to obtain sub-data for each part.

[0274] The sending module is configured to send each piece of sub-data to the second terminal respectively.

[0275] In some embodiments, the first processing module is specifically configured to respond to a data scheduling request indicating a memory exhaustion instruction initiated by itself when it detects that its own memory remaining is less than or equal to a first preset threshold, obtain terminal information from the server, and determine a first data scheduling plan based on the memory remaining of each terminal in the terminal information and the first data amount of data to be transferred.

[0276] In some embodiments, the first processing module is specifically configured to screen out terminals with memory remaining greater than or equal to a second preset threshold from each terminal based on the memory remaining of each terminal in the terminal information, and use them as second terminals waiting to receive the data to be transferred; and determine the second data volume of the data to be transferred that each second terminal can receive based on the ratio of the memory remaining of each second terminal and the first data volume of the data to be transferred.

[0277] In some embodiments, the first terminal and the second terminal communicate with each other via the Transmission Control Protocol TCP or the Internet Protocol IP.

[0278] In some embodiments, the first processing module is specifically configured to respond to a data scheduling request initiated by itself indicating that it is under physical attack when it detects that it is under external attack, obtain terminal information from the server, and determine a first data scheduling plan based on the memory remaining of each terminal in the terminal information and the first data amount of data to be transferred.

[0279] In some embodiments, the first processing module is specifically configured to screen out terminals with memory remaining greater than or equal to a second preset threshold from each terminal based on the memory remaining of each terminal in the terminal information, and use them as second terminals waiting to receive the data to be transferred; determine the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred; the data transmission duration of each second terminal is equal; determine whether the amount of data to be received by the second terminal exceeds the memory remaining of the second terminal based on the data transmission speed of each second terminal and the data transmission duration of each second terminal; and when the amount of data to be received by any second terminal does not exceed the memory remaining of the second terminal, determine that the amount of data to be received by each second terminal is the second data volume of the data to be transferred that can be received.

[0280] In some embodiments, the first processing module is further configured to, when there is a second terminal whose amount of data to be received exceeds its own memory margin, use the second terminal whose amount of data to be received exceeds its own memory margin as the target second terminal, and determine the second amount of data that the target second terminal can receive as its own memory margin; for the other second terminals remaining except the target second terminal, return to the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data amount of the data to be transferred, until the amount of data to be received by any other second terminal does not exceed the memory margin of the corresponding other second terminal, and determine the second data amount of the data to be transferred that the other second terminals can receive.

[0281] In some embodiments, the first terminal and the second terminal communicate via the User Datagram Protocol (UDP).

[0282] In some embodiments, the sending module is specifically configured to add a set of first preset identifiers before each sub-data and a set of first preset identifiers after the sub-data to obtain a data packet containing the preset identifiers and the sub-data; the splicing sequence numbers indicated by the first preset identifiers added to different sub-data are different; and the data packets corresponding to each sub-data are respectively sent to the corresponding receiving second terminal.

[0283] Furthermore, the data transmission device provided in the embodiment of the present disclosure further includes a second terminal and a server, and is further configured to implement data recovery of the first terminal.

[0284] In some embodiments, the first terminal is configured to send a first data recovery request to each terminal within the coverage of the gateway signal, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stores the data packet of the first terminal.

[0285] The second terminal is configured to respond to the first data recovery request. The second terminal can determine a data packet that matches the second preset identifier carried in the first data recovery request based on the first preset identifier in the data packet, and send the data packet to the first terminal.

[0286] The first terminal is configured to receive data packets sent by each second terminal, and splice sub-data in each data packet according to a splicing sequence number indicated by a first preset identifier in the data packet to obtain restored data.

[0287] In some embodiments, the first terminal is configured to send a first data recovery request to each terminal and the service end within the coverage of the gateway, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stores the data packet of the first terminal.

[0288] The second terminal is configured to respond to the first data recovery request and determine whether the second preset identifier carried by the first data recovery request exists in the data stored by the second terminal; if the second preset identifier carried by the first data recovery request does not exist in the data stored by the second terminal, then in response to the command sent by the server to the second terminal to recover data, initiate a second data recovery request requesting recovery of its own transferred data; when data recovery is completed, continue to respond to the first data recovery request and repeat the step of determining whether the second preset identifier carried by the first data recovery request exists in the data stored by the second terminal.

[0289] In some embodiments, the second terminal is also configured to determine whether the second preset identifier is encapsulated by other identifiers if the second preset identifier carried by the first data recovery request exists in the data stored in the second terminal; if the second preset identifier is not encapsulated by other identifiers, the data packet corresponding to the second preset identifier is sent to the first terminal.

[0290] In some embodiments, the second terminal is also configured to monitor whether the terminal corresponding to the other identifier sends a third data recovery request if the second preset identifier is encapsulated by other identifiers, so as to send the data packet corresponding to the other identifier to the terminal corresponding to the other identifier in response to the third data recovery request.

[0291] In some embodiments, the server is further configured to receive terminal tasks and attribute information reported by each terminal, and generate terminal information of each terminal.

[0292] In some embodiments, the server is also configured to periodically determine a third terminal to which data needs to be transferred based on the memory remaining of each terminal; determine a second data scheduling plan for the third terminal based on the third data volume of the data to be transferred of the third terminal and the terminal information stored in itself, and send it to the third terminal; the second data scheduling plan includes information of each fourth terminal and the fourth data volume that each fourth terminal can receive; the fourth terminal is a terminal different from the third terminal within the coverage range of the gateway; the third terminal is configured to receive the second data scheduling plan; according to the fourth data volume that each fourth terminal can receive, the data to be transferred with the third data volume is divided into multiple parts and sent to the fourth terminals respectively.

[0293] In some embodiments, the server is also configured to detect the memory remaining of each stored terminal, and when the total redundant space of the memory remaining is less than or equal to a third preset threshold, initiate a memory clearing request to each terminal within the coverage of the gateway signal; the terminal is configured to respond to the memory clearing request and upload the data to be cleared in its own memory to the server.

[0294] Figure 7 is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. As shown in Figure 7, an embodiment of the present disclosure provides a computer device comprising: one or more processors 701, a memory 702, and one or more I / O interfaces 703. The memory 702 stores one or more programs, which, when executed by the one or more processors, enable the one or more processors to implement any of the data transmission methods described in the above embodiments; one or more I / O interfaces 703 are connected between the processor and the memory and are configured to enable information exchange between the processor and the memory.

[0295] Among them, the processor 701 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 702 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read-write interface) 703 is connected between the processor 701 and the memory 602, and can realize information interaction between the processor 701 and the memory 702, including but not limited to a data bus (Bus), etc.

[0296] In some embodiments, the processor 701 , the memory 702 , and the I / O interface 703 are connected to each other via a bus 704 , and further connected to other components of the computing device.

[0297] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium is further provided, wherein the non-transitory computer-readable storage medium stores a computer program, wherein when the program is executed by a processor, the steps of the data transmission method in any of the above embodiments are implemented.

[0298] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), the above-mentioned functions defined in the system of the present disclosure are executed.

[0299] It should be noted that the computer non-transitory readable medium shown in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any non-transitory computer-readable storage medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the non-transitory computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination thereof.

[0300] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architectures, functions and operations of the devices, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the aforementioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two connected boxes can actually represent execution in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0301] It is understood that the above embodiments are merely exemplary embodiments for illustrating the principles of the present disclosure, and the present disclosure is not limited thereto. Those skilled in the art may make various modifications and improvements without departing from the spirit and substance of the present disclosure, and such modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A data transmission method, wherein: include: The server responds to the data scheduling request sent by the first terminal, determines a first data scheduling plan for the first terminal according to the first data volume of the data to be transferred by the first terminal carried in the data scheduling request and the terminal information stored in the server, and sends the plan to the first terminal; the terminal information includes information of each terminal within the coverage of the gateway signal; The first data scheduling plan includes information of each second terminal and the amount of second data that each second terminal can receive; the first terminal is a terminal waiting for data transfer within the coverage area of ​​the gateway, and the second terminal is a terminal different from the first terminal within the coverage area of ​​the gateway; The first terminal receives the first data scheduling plan; According to the second data volume that can be received by each second terminal, the to-be-transferred data having the first data volume is divided into a plurality of portions to obtain sub-data of each portion; And each copy of the sub-data is sent to the second terminal respectively.

2. The data transmission method according to claim 1, wherein: The server responds to the data scheduling request sent by the first terminal, and determines a first data scheduling plan for the first terminal according to the first data volume of the data to be transferred by the first terminal carried in the data scheduling request and the terminal information stored in the server, including: When the first terminal detects that the remaining memory of the first terminal is less than or equal to the first preset threshold, the first terminal initiates the data scheduling request to the server; The server responds to the memory exhaustion instruction indicated by the data scheduling request, and determines the first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

3. The data transmission method according to claim 2, wherein: The determining the first data scheduling plan according to the memory remaining amount of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request includes: According to the memory remaining amount of each of the terminals in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each of the terminals, and used as a second terminal waiting to receive the data to be transferred; The second data volume of the data to be transferred that can be received by each of the second terminals is determined according to the ratio of the remaining memory volume of each of the second terminals and the first data volume of the data to be transferred.

4. The data transmission method according to any one of claims 1 to 3, wherein: The first terminal and the second terminal communicate with each other via the transmission control protocol TCP or the Internet protocol IP.

5. The data transmission method according to claim 1, wherein: The server responds to the data scheduling request sent by the first terminal, and determines a first data scheduling plan for the first terminal according to the first data volume of the data to be transferred by the first terminal carried in the data scheduling request and the terminal information stored in the server, including: When the first terminal detects that it is under physical attack, the first terminal initiates the data scheduling request to the server; The server responds to the physical attack instruction indicated by the data scheduling request, and determines the first data scheduling plan according to the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request.

6. The data transmission method according to claim 5, wherein: The determining the first data scheduling plan according to the memory remaining amount of each terminal in the terminal information and the first data amount of the data to be transferred carried in the data scheduling request includes: According to the memory remaining amount of each of the terminals in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each of the terminals, and used as a second terminal waiting to receive the data to be transferred; Determine the data transmission duration of each second terminal according to the data transmission speed of each second terminal and the first data volume of the data to be transferred; the data transmission duration of each second terminal is equal; determining, according to the data transmission speed of each of the second terminals and the data transmission duration of each of the second terminals, whether the amount of data to be received by the second terminal exceeds the remaining memory capacity of the second terminal; In the case that the amount of data to be received by any of the second terminals does not exceed the memory remaining of the second terminal, determining that the amount of data to be received by each of the second terminals is the amount of data that can be received A second amount of data to be transferred.

7. The data transmission method according to claim 6, wherein: The data transmission method further includes: In the case that the amount of data to be received by the second terminal exceeds the remaining memory of the second terminal, the second terminal whose amount of data to be received exceeds the remaining memory of the second terminal is taken as the target second terminal, and the second amount of data that the target second terminal can receive is determined to be the remaining memory of the second terminal; For the remaining second terminals except the target second terminal, return to the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred, until the amount of data that any other second terminal is ready to receive does not exceed the corresponding memory remaining capacity of the other second terminal, and determine the second data volume of the data to be transferred that the other second terminals can receive.

8. The data transmission method according to any one of claims 5 to 7, wherein: The first terminal and the second terminal communicate with each other via the User Datagram Protocol UDP.

9. The data transmission method according to claim 1, wherein: The sending each of the sub-data volumes to the second terminal separately includes: For each of the sub-data, a group of first preset identifiers is added before the sub-data, and a group of first preset identifiers is added after the sub-data, to obtain a data packet including the preset identifiers and the sub-data; the splicing sequence numbers indicated by the first preset identifiers added to different sub-data are different; The data packets corresponding to the respective sub-data are respectively sent to the corresponding receiving second terminals.

10. The data transmission method according to claim 9, wherein: The data transmission method further comprises: The first terminal sends a first data recovery request to each terminal within the coverage of the gateway signal, so that each terminal responds to the first data recovery request and determines whether it is a terminal storing the data packet of the first terminal; The second terminal responds to the first data recovery request, according to the first preset identifier, determining the data packet matching the second preset identifier carried by the first data recovery request, and sending the data packet to the first terminal; The first terminal receives the data packets sent by the second terminals, and splices the sub-data in each of the data packets according to the splicing sequence number indicated by the first preset identifier in the data packet to obtain restored data.

11. The data transmission method according to claim 9, wherein: The data transmission method further comprises: The first terminal sends a first data recovery request to each terminal and a server within the coverage of the gateway, so that each terminal responds to the first data recovery request and determines whether it is a terminal storing the data packet of the first terminal; The second terminal responds to the first data recovery request and determines whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal; If the second preset identifier carried in the first data recovery request does not exist in the data stored in the second terminal, in response to the command for the second terminal to recover data sent by the server, a second data recovery request is initiated to recover the transferred data; When data recovery is completed, the second terminal continues to respond to the first data recovery request and repeatedly executes the step of determining whether the second preset identifier carried in the first data recovery request exists in the data stored in the second terminal.

12. The data transmission method according to claim 11, wherein: The data transmission method further comprises: If the second preset identifier carried by the first data recovery request exists in the data stored in the second terminal, determining whether the second preset identifier is encapsulated by other identifiers; If the second preset identifier is not encapsulated by the other identifiers, the data packet corresponding to the second preset identifier is sent to the first terminal.

13. The data transmission method according to claim 12, wherein: The data transmission method further comprises: If the second preset identifier is encapsulated by the other identifier, the second terminal monitors the Whether the terminal corresponding to the other identifier sends a third data recovery request, so that when responding to the third data recovery request, the data packet corresponding to the other identifier is sent to the terminal corresponding to the other identifier.

14. The data transmission method according to claim 1, wherein: The data transmission method further includes: the server receiving terminal tasks and attribute information reported by each of the terminals, and generating terminal information of each of the terminals.

15. The data transmission method according to claim 1, wherein: The server periodically determines a third terminal to which data needs to be transferred based on the remaining memory of each terminal; determines a second data scheduling plan for the third terminal based on the third data volume of the data to be transferred of the third terminal and the terminal information stored in the server, and sends the plan to the third terminal; the second data scheduling plan includes information of each fourth terminal and the fourth data volume that each fourth terminal can receive; the fourth terminal is a terminal different from the third terminal within the coverage of the gateway; The third terminal receives the second data scheduling plan; and divides the to-be-transferred data having the third data volume into a plurality of portions according to the fourth data volume that each of the fourth terminals can receive, and sends the portions to the fourth terminals respectively.

16. The data transmission method according to claim 1, wherein: The data transmission method further comprises: The server detects the memory remaining of each of the terminals, and initiates a memory cleanup request to each terminal within the coverage of the gateway signal when the total redundant space of the memory remaining is less than or equal to a third preset threshold; In response to the memory cleaning request, the terminal uploads the data to be cleaned in its own memory to the server.

17. A data transmission method, wherein: include: In response to the data scheduling request, determine a first data scheduling plan according to a first data volume of the data to be transferred and the terminal information received from the server; The terminal information includes information of each terminal within the coverage of the gateway signal; The first data scheduling plan includes information of each second terminal and the amount of second data that each second terminal can receive; a terminal different from the first terminal within the coverage of the gateway; the first terminal is a terminal sending a data scheduling request within the coverage of the gateway; According to the second data volume that can be received by each second terminal, the to-be-transferred data having the first data volume is divided into a plurality of portions to obtain sub-data of each portion; Send each of the sub-data to the second terminal respectively.

18. The data transmission method according to claim 17, wherein: The step of determining a first data scheduling plan according to a first data volume of the data to be transferred and the terminal information received from the server includes: When detecting that its own memory balance is less than or equal to a first preset threshold, responding to the data scheduling request indicating memory exhaustion instruction initiated by itself, obtaining the terminal information from the server, and determining the first data scheduling plan according to the memory balance of each terminal in the terminal information and the first data amount of the data to be transferred.

19. The data transmission method according to claim 18, wherein: The determining the first data scheduling plan according to the memory remaining amount of each terminal in the terminal information and the first data amount of the data to be transferred includes: According to the memory remaining amount of each of the terminals in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each of the terminals, and used as a second terminal waiting to receive the data to be transferred; The second data volume of the data to be transferred that can be received by each of the second terminals is determined according to the ratio of the remaining memory volume of each of the second terminals and the first data volume of the data to be transferred.

20. The data transmission method according to claim 17, wherein: The step of determining a first data scheduling plan according to the first data volume of the data to be transferred and the terminal information received from the server includes: When detecting that it is under external attack, it responds to the data scheduling request initiated by itself indicating that it is under physical attack, obtains the terminal information from the server, and determines the first data scheduling plan based on the memory remaining of each terminal in the terminal information and the first data amount of the data to be transferred.

21. The data transmission method according to claim 20, wherein: The determining the first data scheduling plan according to the memory remaining amount of each terminal in the terminal information and the first data amount of the data to be transferred includes: According to the memory remaining amount of each of the terminals in the terminal information, a terminal having a memory remaining amount greater than or equal to a second preset threshold is screened out from each of the terminals, and used as a second terminal waiting to receive the data to be transferred; Determine the data transmission duration of each second terminal according to the data transmission speed of each second terminal and the first data volume of the data to be transferred; the data transmission duration of each second terminal is equal; determining, according to the data transmission speed of each of the second terminals and the data transmission duration of each of the second terminals, whether the amount of data to be received by the second terminal exceeds the remaining memory capacity of the second terminal; When the amount of data to be received by any second terminal does not exceed the remaining memory capacity of the second terminal, the amount of data to be received by each second terminal is determined to be the second amount of data to be transferred that can be received.

22. The data transmission method according to claim 21, wherein: The data transmission method further includes: In the case that the amount of data to be received by the second terminal exceeds the remaining memory of the second terminal, the second terminal whose amount of data to be received exceeds the remaining memory of the second terminal is taken as the target second terminal, and the second amount of data that the target second terminal can receive is determined to be the remaining memory of the second terminal; For the remaining second terminals except the target second terminal, return to the step of determining the data transmission duration of each second terminal based on the data transmission speed of each second terminal and the first data volume of the data to be transferred, until the amount of data that any other second terminal is ready to receive does not exceed the corresponding memory remaining capacity of the other second terminal, and determine the second data volume of the data to be transferred that the other second terminals can receive.

23. A data transmission device, wherein: include: The server is configured to respond to a data scheduling request sent by a first terminal, determine a first data scheduling plan for the first terminal according to a first data volume of data to be transferred by the first terminal carried in the data scheduling request and terminal information stored in the server, and send the plan to the first terminal; the terminal information includes information of each terminal within the coverage of a gateway signal; The first data scheduling plan includes information of each second terminal and the amount of second data that each second terminal can receive; the first terminal is a terminal waiting for data transfer within the coverage area of ​​the gateway, and the second terminal is a terminal different from the first terminal within the coverage area of ​​the gateway; The first terminal is configured to receive the first data scheduling plan; According to the second data volume that can be received by each second terminal, the to-be-transferred data having the first data volume is divided into a plurality of portions to obtain sub-data of each portion; And each copy of the sub-data is sent to the second terminal respectively.

24. A data transmission device, wherein: include: A first processing module is configured to respond to the data scheduling request and determine a first data scheduling plan according to a first data volume of its own data to be transferred and terminal information received from the server; the terminal information includes information of each terminal within the coverage of the gateway signal; The first data scheduling plan includes information of each second terminal and the amount of second data that each second terminal can receive; the second terminal is a terminal different from the first terminal within the coverage of the gateway; the first terminal is a terminal that sends a data scheduling request within the coverage of the gateway; A second processing module is configured to divide the to-be-transferred data having the first data volume into a plurality of portions according to the second data volume that can be received by each of the second terminals, to obtain sub-data for each portion; The sending module is configured to send each portion of the sub-data to the second terminal respectively.

25. A computer device, wherein: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the data transmission method according to any one of claims 1 to 16 are executed, and / or the steps of the data transmission method according to any one of claims 17 to 22 are executed.

26. A computer non-transitory readable storage medium, wherein: The computer non-volatile readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the data transmission method as described in any one of claims 1 to 16, and / or executes the steps of the data transmission method as described in any one of claims 17 to 22.

Citation Information

Patent Citations

  • Resource scheduling method, intelligent front-end equipment, intelligent gateway and distributed system

    CN112422598A

  • Resource transfer processing method and device, storage medium and electronic equipment

    CN113283893A

  • Data processing method and device, computer equipment and storage medium

    CN113835902A

  • Systems, devices, techniques, and methods for data migration

    US20200159434A1