A data transmission method, apparatus, computer device, and storage medium

By generating data scheduling plans in smart devices and distributing data storage in terminals within the gateway's coverage area, the limitations of encrypted storage devices and the increased losses associated with network backup methods are resolved, enabling rapid backup and reduced data transmission risks.

CN119183650BActive Publication Date: 2026-06-30BOE TECHNOLOGY GROUP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BOE TECHNOLOGY GROUP CO LTD
Filing Date
2023-04-21
Publication Date
2026-06-30

Smart Images

  • Figure CN119183650B_ABST
    Figure CN119183650B_ABST
Patent Text Reader

Abstract

This disclosure provides a data transmission method, apparatus, computer equipment, and storage medium, belonging to the field of data processing technology. The data transmission method includes a server responding to a data scheduling request sent by a first terminal; determining 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 its own stored terminal information; and sending this plan to the first terminal. The terminal information includes information about each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and a second data volume that each second terminal can receive. The second terminals are terminals different from the first terminal within the gateway coverage area. The first terminal receives the first data scheduling plan; divides the data to be transferred, which has the first data volume, into multiple parts based on the second data volume that each second terminal can receive, obtaining each part of sub-data; and sends each part of sub-data to the second terminal respectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of data processing technology, and specifically relates to a data transmission method, apparatus, computer equipment, and storage medium. Background Technology

[0002] With the widespread use of smart devices, more and more user information is stored on them. This includes sensitive facial recognition data stored locally by cameras, as well as confidential information involving user privacy. If a smart device is maliciously attacked by a third party or damaged intentionally, it could potentially leak user privacy and even threaten the user's financial security. Summary of the Invention

[0003] This disclosure aims to at least solve one of the technical problems existing in the prior art, and to provide a data transmission method, apparatus, computer device, and storage medium.

[0004] Firstly, the technical solution adopted to solve the technical problem of this disclosure is a data transmission method, including:

[0005] The server responds to a data scheduling request sent by the first terminal. Based on 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 its own database, the server determines a first data scheduling plan for the first terminal and sends it to the first terminal. The terminal information includes information about each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about 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 to transfer data, and the second terminals are terminals within the coverage area of ​​the gateway that are different from the first terminal.

[0006] The first terminal receives the first data scheduling plan; according to the amount of second data that each of the second terminals can receive, the data to be transferred with the first amount of data is divided into multiple parts to obtain each part of sub-data; and each part of sub-data is sent to the second terminal respectively.

[0007] In some embodiments, the server responds to a data scheduling request sent by the first terminal, and 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 its own stored terminal information, including:

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

[0009] The server responds to the memory exhaustion instruction indicated by the data scheduling request, and determines the first data scheduling plan 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.

[0010] 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:

[0011] Based on the memory remaining amount of each terminal in the terminal information, terminals with memory remaining amount greater than or equal to a second preset threshold are selected from the terminals and used as second terminals to wait to receive the data to be transferred.

[0012] Based on the ratio of the remaining memory of each of the second terminals and the first data volume of the data to be transferred, the second data volume of the data to be transferred that each of the second terminals can receive is determined.

[0013] In some embodiments, the first terminal and the second terminal communicate via Transmission Control Protocol (TCP) or Internet Protocol (IP).

[0014] In some embodiments, the server responds to a data scheduling request sent by the first terminal, and 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 its own stored terminal information, including:

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

[0016] The server responds to the physical attack command indicated by the data scheduling request, and determines the first data scheduling plan 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.

[0017] 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:

[0018] Based on the memory remaining amount of each terminal in the terminal information, terminals with memory remaining amount greater than or equal to a second preset threshold are selected from the terminals and used as second terminals to wait to receive the data to be transferred.

[0019] The data transmission duration of each second terminal is determined 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.

[0020] Based on the data transmission speed and data transmission duration of each second terminal, determine whether the amount of data that the second terminal is prepared to receive exceeds the memory capacity of the second terminal.

[0021] If the amount of data that any second terminal is prepared to receive does not exceed the memory capacity of that second terminal, the amount of data that each second terminal is prepared to receive is determined to be the second amount of the data to be transferred that it can receive.

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

[0023] If the amount of data that the second terminal is prepared to receive exceeds its own memory capacity, the second terminal whose amount of data prepared to receive exceeds its own memory capacity is taken as the target second terminal, and the amount of the second data that the target second terminal can receive is determined as its own memory capacity.

[0024] For the other second terminals besides 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 prepared to receive does not exceed the memory reserve 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.

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

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

[0027] For each piece of sub-data, a first preset identifier is added before the sub-data and a first preset identifier is added after the sub-data to obtain a data packet containing the preset identifier and the sub-data; the first preset identifier added to different sub-data indicates different splicing sequence numbers;

[0028] Each data packet corresponding to the sub-data is sent to the corresponding receiving second terminal.

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

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

[0031] The second terminal responds to the first data recovery request, determines the 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 sends the data packet to the first terminal;

[0032] The first terminal receives the data packets sent by each of 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 the recovered data.

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

[0034] The first terminal sends a first data recovery request to each terminal and 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 stored the data packet of the first terminal;

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

[0036] If the second preset identifier carried in the first data recovery request is not present in the data stored in the second terminal, then in response to the command sent by the server to restore the data of the second terminal, a second data recovery request is initiated to restore its own transferred data.

[0037] After the 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 by the second terminal.

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

[0039] If the data stored in the second terminal contains the second preset identifier carried in the first data recovery request, then determine whether the second preset identifier is encapsulated by other identifiers;

[0040] 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.

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

[0042] If the second preset identifier is encapsulated by the other identifier, the second terminal listens to 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.

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

[0044] In some embodiments, the server periodically determines a third terminal that needs to transfer data based on the remaining memory of each terminal; based on the third data volume of the data to be transferred by the third terminal and its own stored terminal information, the server determines a second data scheduling plan for the third terminal and sends 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; the fourth terminal is a terminal within the coverage area of ​​the gateway that is different from the third terminal;

[0045] The third terminal receives the second data scheduling plan; based on the amount of fourth data that each of the fourth terminals can receive, the data to be transferred containing the third amount of data is divided into multiple parts and sent to the fourth terminals respectively.

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

[0047] The server detects the remaining memory of each terminal and, if the total redundant space of the remaining memory is less than or equal to a third preset threshold, initiates a memory cleanup request to each terminal within the coverage area of ​​the gateway signal.

[0048] In response to the memory cleanup request, the terminal uploads the data to be cleaned from its own memory to the server.

[0049] Secondly, this disclosure also provides a data transmission method, including:

[0050] In response to a data scheduling request, the system determines a 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 about each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and the second data volume that each second terminal can receive. The second terminal is a terminal within the coverage area of ​​the gateway that is different from the first terminal. The first terminal is a terminal within the coverage area of ​​the gateway that sends a data scheduling request.

[0051] Based on the amount of second data that each second terminal can receive, the data to be transferred, which has the first amount of data, is divided into multiple parts to obtain each part of sub-data.

[0052] Each of the aforementioned sub-data is sent to the second terminal.

[0053] 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:

[0054] If the system detects that its own memory balance is less than or equal to a first preset threshold, it responds to the data scheduling request initiated by itself indicating that the memory is exhausted, obtains the 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 volume of the data to be transferred.

[0055] 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 includes:

[0056] Based on the memory remaining amount of each terminal in the terminal information, terminals with memory remaining amount greater than or equal to a second preset threshold are selected from the terminals and used as second terminals to wait to receive the data to be transferred.

[0057] Based on the ratio of the remaining memory of each of the second terminals and the first data volume of the data to be transferred, the second data volume of the data to be transferred that each of the second terminals can receive is determined.

[0058] 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:

[0059] Upon detecting an external attack, the system responds to a data scheduling request initiated by itself indicating a 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 volume of the data to be transferred.

[0060] 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 includes:

[0061] Based on the memory remaining amount of each terminal in the terminal information, terminals with memory remaining amount greater than or equal to a second preset threshold are selected from the terminals and used as second terminals to wait to receive the data to be transferred.

[0062] The data transmission duration of each second terminal is determined 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.

[0063] Based on the data transmission speed and data transmission duration of each second terminal, determine whether the amount of data that the second terminal is prepared to receive exceeds the memory capacity of the second terminal.

[0064] If the amount of data that any second terminal is prepared to receive does not exceed the memory capacity of that second terminal, the amount of data that each second terminal is prepared to receive is determined to be the second amount of the data to be transferred that it can receive.

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

[0066] If the amount of data that the second terminal is prepared to receive exceeds its own memory capacity, the second terminal whose amount of data prepared to receive exceeds its own memory capacity is taken as the target second terminal, and the amount of the second data that the target second terminal can receive is determined as its own memory capacity.

[0067] For the other second terminals besides 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 prepared to receive does not exceed the memory reserve 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.

[0068] Thirdly, embodiments of this disclosure also provide a data transmission apparatus, including:

[0069] The server is configured to respond to a data scheduling request sent by a first terminal. Based on the first data volume of data to be transferred by the first terminal carried in the data scheduling request and the terminal information stored in the server, the server determines a first data scheduling plan for the first terminal and sends it to the first terminal. The terminal information includes information about each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about 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 to transfer data, and the second terminals are terminals within the coverage area of ​​the gateway that are different from the first terminal.

[0070] The first terminal is configured to receive the first data scheduling plan; divide the data to be transferred, which has the first data volume, into multiple parts according to the amount of second data that each of the second terminals can receive, to obtain each part of sub-data; and send each part of sub-data to the second terminal respectively.

[0071] Fourthly, embodiments of this disclosure also provide a data transmission apparatus, comprising:

[0072] The first processing module is configured to respond to a data scheduling request and determine a 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 about each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and the second data volume that each second terminal can receive. The second terminal is a terminal within the coverage area of ​​the gateway that is different from the first terminal. The first terminal is a terminal within the coverage area of ​​the gateway that sends a data scheduling request.

[0073] The second processing module is configured to divide the data to be transferred, which has the first data volume, into multiple parts according to the second data volume that each second terminal can receive, to obtain each part of sub-data.

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

[0075] Fifthly, embodiments of this disclosure also provide a computer device, comprising: 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 communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps of the data transmission method as described in any of the above embodiments are performed.

[0076] In a sixth aspect, embodiments of this disclosure also provide a computer non-transient readable storage medium, wherein a computer program is stored on the computer non-transient readable storage medium, and the computer program is executed by a processor to perform the steps of the data transmission method as described in any of the above embodiments. Attached Figure Description

[0077] Figure 1 A flowchart illustrating a data transmission method provided in this embodiment of the disclosure;

[0078] Figure 2a A flowchart illustrating the process of formulating a first data scheduling plan in the event of a first terminal memory exhaustion, as provided in an embodiment of this disclosure;

[0079] Figure 2bA flowchart illustrating the formulation of a first data scheduling plan is provided for embodiments of this disclosure;

[0080] Figure 3a A flowchart illustrating the process of formulating a first data scheduling plan in the event of a physical attack on a first terminal, as provided in this embodiment of the disclosure;

[0081] Figure 3b A flowchart illustrating another exemplary method for formulating a first data scheduling plan, provided as an embodiment of this disclosure;

[0082] Figure 4 A schematic diagram of a network transmission architecture provided in an embodiment of this disclosure;

[0083] Figure 5 A detailed flowchart of a data transmission method provided in this embodiment of the disclosure;

[0084] Figure 6 This disclosure provides a schematic flowchart of a data transmission method according to an embodiment.

[0085] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0087] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an,” “a,” or “the,” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising,” “including,” or “including,” and similar terms mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects.

[0088] In this disclosure, "multiple or several" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0089] In related technologies, to protect user privacy data stored locally on smart terminals, existing technologies typically employ the following methods: 1) security module mechanism; 2) network backup mechanism. 1) The security module mechanism refers to setting up a separate encrypted storage device on the terminal to prevent the leakage of confidential data. However, the storage capacity of encrypted storage devices is usually limited, and it cannot guarantee long-term closed operation. Currently, most solutions involve periodic deletion, manual replacement, or periodic uploading to address problems, which is cumbersome. Furthermore, integrating encrypted storage devices on the terminal cannot cope with emergencies such as sudden fires or high-level cyberattacks, making it impossible to quickly transfer data. 2) The network backup mechanism refers to immediately uploading data collected by the terminal to the cloud and clearing local storage. However, this processing method requires smart devices to upload data frequently, increasing device wear and tear. It not only requires high-performance smart devices to implement, but also increases the risk of data theft due to the high frequency of data packet transmission between networks. In addition, the terminal and the cloud usually communicate via the HTTPS protocol, which has a slow data transmission speed and wastes bandwidth (bandwidth is proportional to cost), thus increasing transmission costs. Furthermore, storing data in the cloud can also cause inconvenience for local use on the terminal.

[0090] In view of this, the present disclosure provides a data transmission method that substantially eliminates one or more problems caused by the limitations and defects of related technologies. Specifically, in the embodiments of this disclosure, 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 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 it to the first terminal; the terminal information includes information of each terminal within the coverage area 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 first terminal is a terminal within the coverage area of ​​the gateway waiting to transfer data, and the second terminals are terminals within the coverage area of ​​the gateway that are different from the first terminal; the first terminal receives the first data scheduling plan; based on 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.

[0091] This disclosure employs a local storage mechanism, where "local" refers to the simulated memory space comprised of various terminals within the signal coverage area of ​​the same gateway. Data to be transferred from a first terminal under a gateway is stored in the local memory space of a second terminal under the same gateway, achieving distributed storage of the data. Furthermore, data transfer speeds between terminals are faster than those between terminals and the cloud, enabling rapid data backup. Additionally, compared to traditional technologies, this disclosure eliminates the need for encrypted storage devices and eliminates the need for terminals to frequently upload backup data, reducing the risk of network transmission theft.

[0092] The following is a detailed description of a data transmission method provided by an embodiment of this disclosure. The execution subject of this data transmission method can be a data transmission device with certain computing power. The data transmission device integrates a server and at least one terminal within the signal coverage area of ​​a gateway. The server can be a gateway, a cloud, or an advanced terminal. An advanced terminal refers to a terminal with strong computing power.

[0093] The data transmission method disclosed herein includes both a data transfer process and a data recovery process. First, the data transfer process will be described in detail. Figure 1 A flowchart of a data transmission method provided in this disclosure embodiment is shown below. Figure 1 As shown, steps S11 to S12 are included, wherein:

[0094] S11. The server responds to the data scheduling request sent by the first terminal, determines the first data scheduling plan of the first terminal based on 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.

[0095] In this step, the terminal information includes information about each terminal within the gateway's signal coverage area. This terminal information includes, for example, the terminal's Internet Protocol (IP) information, remaining memory space, redundancy space occupancy rate (i.e., the percentage of redundancy space in total memory), spare ports (i.e., reserved ports used for data transfer), and read / write functions (different terminals have different read / write functions; for a given terminal, a fixed read / write function is set to read data to be transferred from memory or write data to be transferred into memory).

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

[0097] This embodiment utilizes a high-performance server to generate a first data scheduling plan for the first terminal, which can avoid using edge computing mode and reduce the performance requirements of edge devices (terminals under the gateway).

[0098] In specific implementation, the server responds to a data scheduling request sent by the first terminal. This data scheduling request carries a first data volume of data to be transferred from the first terminal. Based on the first data volume and the remaining memory space of each terminal in the stored terminal information, the server formulates a first data scheduling plan for the first terminal, so that the first terminal transfers data according to the first data scheduling plan. Here, the process of generating the first data scheduling plan specifically involves distributing the data to be transferred, containing the first data volume, to different terminals (which can be all terminals under the gateway, or at least some terminals) according to the remaining memory space of each terminal. Here, the terminal that is prepared to receive the data to be transferred is selected as the second terminal.

[0099] For example, the first data volume of the data to be transferred from the first terminal is 100M. The remaining memory space of other terminals within the gateway coverage area, such as terminal A, terminal B, and terminal C, is 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 requires a fixed 20% remaining memory space. Therefore, the remaining memory of terminal A, terminal B, and terminal C (that is, the space of memory that can be used to receive data) is 20M, 40M, and 100M, respectively. At this time, a second terminal can be selected as needed. For example, terminal B and terminal C can be selected as the second terminal. The 40M+100M pseudo memory space is used to store 100M of the data to be transferred, and a first data scheduling plan is generated. The first data scheduling plan generated here includes at least the IP information of each second terminal, the spare 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, terminals A, B, and C can be selected as the second terminals, using a simulated memory space of 20M+40M+100M to store 100M of data to be transferred. Alternatively, only terminal C can be selected as the second terminal, using 100M of simulated memory space to store 100M of data to be transferred. This embodiment can select the second terminal passively receiving the data to be transferred according to actual needs, and this disclosure does not impose specific limitations in this regard.

[0100] 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 under the gateway defined by the system, but rather, for ease of understanding, a distinction is made between the terminal preparing to transfer data and the terminal subsequently preparing to receive data. "First" and "second" should not be used as limitations on the scope of protection of the embodiments of this disclosure.

[0101] For example, when the server is in the cloud, the cloud and the terminal can communicate and connect via the Message Queuing Telemetry Transport (MQTT) protocol. MQTT is a message protocol based on the publish / subscribe paradigm under the ISO standard. It operates 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 transport protocol. The MQTT protocol is lightweight, simple, open, and easy to implement. It should be noted that the MQTT protocol has a small data volume and cannot transmit data to be transferred (such as images). The MQTT protocol only carries the initial data scheduling plan, and its data volume is much smaller than the data to be transmitted, such as images.

[0102] S12. The first terminal receives the first data scheduling plan and, based on the second data volume that each second terminal can receive, divides the data to be transferred with the first data volume into multiple parts to obtain each sub-data.

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

[0104] S13, The first terminal sends each data element to the second terminal.

[0105] Continuing the previous example, the first terminal can send 20MB of sub-data to terminal B based on terminal B's IP information and spare port. Based on terminal C's IP information and spare port, it can send 80MB of sub-data to terminal C.

[0106] In some embodiments, the communication between the first terminal and the second terminal can be achieved using socket transmission, a method for fast data transfer within a local area network (LAN). However, socket transmission is not a communication protocol; it refers to communication via the terminal's IP address and port. For example, the first and second terminals can choose to communicate via User Datagram Protocol (UDP), which is faster than TCP / IP. Alternatively, they can choose to communicate via TCP / IP, which is more reliable than UDP. Preferably, UDP is used for transmission. TCP / IP requires establishing a stable connection, which is time-consuming, while UDP offers faster connection establishment and transmission speeds, making it more reliable in LAN applications.

[0107] Typically, when a first terminal initiates a data scheduling request in different scenarios, the server will generate a corresponding first data scheduling plan based on the scenario indicated by the data scheduling request. These are different scenarios as shown in Figures 2 and 3 below.

[0108] In some embodiments, Figure 2a A flowchart illustrating the process of formulating a first data scheduling plan in the event of a first terminal memory exhaustion, as provided in this embodiment of the disclosure, is shown below. Figure 2a As shown, steps S21 and S22 are included, wherein:

[0109] S21. When the first terminal detects that its own memory balance is less than or equal to the first preset threshold, it initiates a data scheduling request to the server.

[0110] The first terminal can automatically monitor its own memory balance. When the remaining memory is less than or equal to a first preset threshold, it indicates that the first terminal is about to run out of memory. This could mean there is no more memory available to store other data, or that storing other data would cause the first terminal to malfunction. In this case, the first terminal needs to actively initiate a data scheduling request to transfer the data in memory to another terminal. It should be noted that, depending on actual needs, the data to be transferred from the first terminal can be set to all data in memory or some sensitive data (such as user privacy data).

[0111] S22. The server responds to the memory exhaustion instruction of the data scheduling request and determines the first data scheduling plan 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.

[0112] It's important to note that different data transfer strategies are chosen by the terminals depending on the situation. When memory is exhausted, the need for emergency data caching is not high, so a slightly longer but less resource-intensive balanced transfer strategy can be chosen. In this case, the server responds to the memory exhaustion command and initiates a load balancing algorithm. Load balancing can be understood as balancing the amount of second data received by each terminal based on its available memory; the more memory available a second terminal has, the more second data it receives, and vice versa. Specifically, this load balancing algorithm can formulate a plan for evenly storing the data to be transferred by each second terminal based on its available memory, according to the memory availability of each terminal in the terminal information and the amount of the first data to be transferred carried in the data scheduling request, thus generating a first data scheduling plan.

[0113] For example, Figure 2b An exemplary flowchart for formulating a first data scheduling plan is provided for embodiments of this disclosure, such as... Figure 2b As shown, it includes S221 and S222, wherein:

[0114] S221. Based on the memory remaining amount of each terminal in the terminal information, select terminals with memory remaining amount greater than or equal to the second preset threshold from the terminals and use them as second terminals to wait to receive the data to be transferred.

[0115] In some scenarios, such as when the initial data volume to be transferred is large, the memory available on each terminal may not be sufficient. For some terminals with very low memory, using them as the second terminal to receive data would not only result in insufficient storage of the transferred data (i.e., reduced storage efficiency) but also increase additional system consumption. Therefore, this embodiment of the present disclosure dynamically selects a suitable second terminal from among the terminals to receive the transferred data based on the memory availability of each terminal in the terminal information. This improves data transfer efficiency and reduces system consumption.

[0116] It should be noted that 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, or even 0. This embodiment does not impose specific restrictions on this.

[0117] S222. Determine the second data amount of data to be transferred that each second terminal can receive based on the ratio of the memory remaining amount of each second terminal and the first data amount of the data to be transferred.

[0118] For example, the first terminal has 100MB of data to be transferred. The second terminals include terminal B and terminal C. Terminal B has 50MB of remaining memory, and terminal C has 125MB of remaining memory. Terminal B has 40MB of spare memory, and terminal C has 100MB of spare memory. The ratio of spare memory of terminal B to spare memory of terminal C is 2:5. A load balancing first data scheduling plan can be formulated based on the 2:5 ratio of spare memory of each second terminal. For example, the 100MB of data to be transferred can be divided into two parts. Terminal B can receive 100×2 / (2+5), approximately 29MB; terminal C can receive 100×5 / (2+5), approximately 71MB.

[0119] The embodiments disclosed herein employ a load balancing approach to distribute the data to be transferred across different second terminals, thereby maximizing the utilization of the simulated memory space without affecting the operating efficiency of the second terminals.

[0120] The above load balancing is just one of the methods for generating the first data scheduling plan after the server responds to the memory exhaustion command. Of course, after the server responds to the memory exhaustion command, 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 is only necessary to ensure that the data to be transferred in the first terminal is transferred to other terminals and the memory of the first terminal is released.

[0121] In some embodiments, when a first terminal detects that it is under a software attack, it initiates a data scheduling request to the server. Here, a software attack can be understood as the unauthorized access request to sensitive data. Sensitive data may include, for example, some user privacy data. The server responds to the software attack instruction indicated by the data scheduling request and determines a first data scheduling plan based on the memory remaining of each terminal in the terminal information and the first data volume of data to be transferred carried in the data scheduling request.

[0122] It should be noted that in the case of software attacks, the requirement for emergency data caching is not high. A load balancing strategy that takes a little longer but consumes less of the entire system can be selected, namely the load balancing strategy mentioned above. For the specific process of formulating the first data scheduling plan, please refer to steps S221 and S222 above. Repeated parts will not be repeated.

[0123] 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 through Transmission Control Protocol (TCP) or Internet Protocol (IP), making the data transmission more reliable.

[0124] In some embodiments, Figure 3aA flowchart illustrating the process of formulating a first data scheduling plan in the event of a physical attack on a first terminal, as provided in this embodiment of the disclosure, is shown below. Figure 3a As shown, steps S31 and S32 are included, wherein:

[0125] S31. When the first terminal detects that it has been subjected to a physical attack, it initiates a data scheduling request to the server.

[0126] In this step, a physical attack can be understood as the hardware of the first terminal being attacked or damaged. Specifically, detecting whether the first terminal has been subjected to a physical attack can be done through feedback signals from sensors such as illuminance, humidity, or proximity sensors on the first terminal.

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

[0128] S32. The server responds to the physical attack command indicated by the data scheduling request and determines the first data scheduling plan 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.

[0129] It's important to note that different data transfer strategies are selected for different situations encountered by the terminals. In cases of hardware attacks or damage, where the need for emergency data caching is high, a fast transfer strategy with short processing time can be chosen. In this situation, the server responds to the physical attack command, activates the fast transfer algorithm, and customizes a primary data scheduling plan that achieves the shortest data transfer time based on the memory availability of each terminal and the initial amount of data to be transferred carried in the data scheduling request. Fast transfer can be understood as transferring the data to be transferred to the second terminal in the shortest possible time.

[0130] For example, because different second terminals have different data transmission speeds, the time it takes for different second terminals to receive the same amount of sub-data will vary. According to a load balancing scheme, some second terminals may quickly receive and complete the storage of the sub-data, while others with slower data transmission speeds wait, thus affecting the data transfer speed and hindering data backup for the first terminal subjected to a physical attack. Therefore, for the first terminal subjected to a physical attack, the server needs to customize a first data scheduling plan for rapid data transfer.

[0131] Figure 3b Another exemplary flowchart for formulating a first data scheduling plan provided in this disclosure embodiment, such as Figure 3b As shown, it includes S321 to S326, wherein:

[0132] S321. Based on the memory remaining amount of each terminal in the terminal information, select terminals with memory remaining amount greater than or equal to the second preset threshold from the terminals and use them as second terminals to wait to receive the data to be transferred.

[0133] In some scenarios, such as when the initial data volume to be transferred is large, the memory available on each terminal may not be sufficient. For some terminals with very low memory, using them as the second terminal to receive data would not only result in insufficient storage of the transferred data (i.e., reduced storage efficiency) but also increase additional system consumption. Therefore, this embodiment of the present disclosure dynamically selects a suitable second terminal from among the terminals to receive the transferred data based on the memory availability of each terminal in the terminal information. This improves data transfer efficiency and reduces system consumption.

[0134] It should be noted that 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, or even 0. This embodiment does not impose specific restrictions on this.

[0135] S322. Determine the data transmission duration T1 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.

[0136] The data transmission duration T1 is equal for each of the second terminals.

[0137] For example, given 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 duration of each second terminal is determined to be T1 = Q / (Vi+Vj+Vt).

[0138] S323. Based on the data transmission speed and data transmission duration of each second terminal, determine whether the amount of data a second terminal is prepared to receive exceeds its memory capacity. If the amount of data a second terminal is prepared to receive does not exceed its memory capacity, proceed to S324; if a second terminal is prepared to receive data exceeding its own memory capacity, proceed to S325.

[0139] Continuing the example above, we know that the memory remaining of the second terminal A is X1, the data transmission speed of the second terminal B is X2, 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 C is prepared to receive is Vt×T1.

[0140] It should be noted that the amount of data that the second terminal is prepared to receive is not the actual amount of data to be stored as sub-data. It is a pre-given amount of data that can be stored quickly. This amount of data may or may not exceed the memory capacity of the corresponding second terminal.

[0141] S324. If the amount of data that any second terminal is prepared to receive does not exceed the memory capacity of the second terminal, determine the amount of data that each second terminal is prepared to receive as the second amount of data to be transferred that can be received.

[0142] Continuing the previous example, under the conditions that Vi×T1≤X1, Vj×T1≤X2, and Vt×T1≤X3, the second data quantity of the second terminal A is determined to be Vi×T1, the second data quantity of the second terminal B is determined to be Vj×T1, and the second data quantity of the second terminal C is determined to be Vt×T1.

[0143] S325. If the amount of data that a second terminal is prepared to receive exceeds its own memory capacity, the second terminal whose amount of data prepared to receive exceeds its own memory capacity shall be taken as the target second terminal, and the amount of second data that the target second terminal can receive shall be determined as its own memory capacity.

[0144] 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 other second terminals besides the target second terminal. In this case, the second amount of data that the target second terminal can receive is determined to be its own memory surplus, i.e., X1.

[0145] S326. For the other second terminals besides the target second terminal, return to step S322 until the amount of data that any other second terminal is prepared to receive does not exceed the memory capacity of the corresponding other second terminal, and determine the second amount of data to be transferred that the other second terminals can receive.

[0146] When returning to step S322, the other second terminals are equivalent to the second terminals in S322, and the 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.

[0147] Continuing with the previous 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 data volume Q of the data to be transferred, the data transmission time T2 of the other second terminals is determined to be (Q-X1) / (Vj+Vt). In this way, the backup of the data to be transferred can still be completed in the shortest possible time.

[0148] Given that Vj×T2≤X2 and Vt×T2≤X3, the second data quantity of the second terminal A is determined to be X1, the second data quantity of the second terminal B is determined to be Vj×T2, and the second data quantity of the second terminal C is determined to be Vt×T2.

[0149] In steps S321 to S326 above, the server can reduce the data receiving pressure on the low-speed second terminal and improve the data transfer speed by customizing a first data scheduling plan for rapid data transfer.

[0150] 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.

[0151] In some embodiments, the first terminal transfers memory data. In real-world applications, data transferred due to a physical attack on the first terminal may be recovered after the first terminal is repaired or an equivalent replacement is established. Therefore, it is necessary to tag the transferred sub-data to indicate the first terminal to which the sub-data belongs and the splicing order during recovery.

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

[0153] S131. For each piece of sub-data, add a first preset identifier before the sub-data and add a first preset identifier after the sub-data to obtain a data packet containing the preset identifier and the sub-data.

[0154] For example, the first preset identifier includes a second preset identifier, a first terminal IP address, and the concatenation sequence number of the corresponding sub-data; the second preset identifier is an identifier representing 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 concatenation sequence number of the corresponding sub-data. GGG represents the sub-data, so the resulting data packet is a set of data: XXXYYYZZZGGGXXXYYYZZZ.

[0155] Each sub-data segment is assigned a first preset identifier before transfer. The first preset identifier differs for different sub-data segments. Specifically, the first preset identifier indicates a different splicing sequence number. The splicing sequence numbers of the sub-data segments are arranged sequentially according to the order in which the data to be transferred was divided. For example, the splicing sequence number of the first segment is 01, the second segment is 02, ..., and the nth segment is n; or, the splicing sequence number of the nth segment is 01, the (n-1)th segment is 02, ..., and the first segment is n. In the subsequent data recovery stage, the sub-data segments are spliced ​​sequentially according to the splicing sequence numbers to obtain the complete recovered data (i.e., the data to be transferred in the data transfer stage).

[0156] S132. Send the data packets corresponding to each sub-data to the corresponding receiving second terminal.

[0157] 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 send the data packet back to the first terminal.

[0158] The data transmission method provided in this disclosure also includes a data recovery process. That is, the first terminal requests the recovery of data transmitted during the transfer phase into memory. In one scenario, after the second terminal receives the data packet from the first terminal, it does not schedule the data packet until it is recovered. In another scenario, to balance the memory availability of each terminal within the gateway's signal coverage area and to achieve rapid data transfer, the simulated memory space formed by each terminal is updated periodically. After the update, the memory availability of each terminal changes, and the data in memory is also adjusted. For example, a data packet from the first terminal is transmitted to the second terminal A. However, the second terminal A, as the terminal preparing to transfer the data, may transfer part of the data packet from the first terminal to the memory of another terminal (neither the first nor the second terminal) within the gateway's coverage area for storage. This results in a data "nested" phenomenon. For example, there may be a first terminal, a second terminal S1, a second terminal S2, and a second terminal S3. The first terminal transfers different sub-data to the second terminals S1, S2, and S3 respectively. The second terminal S1 then transfers part of its own data and some sub-data from the first terminal to the second terminal S2. At this point, the memory of the second terminal S2 stores both part of its own data and part of the first terminal's sub-data, thus exhibiting a data "nested" phenomenon.

[0159] In some embodiments, for cases where the second terminal does not schedule received data packets, such as... Figure 1As shown, the specific steps include S41 to S43, wherein:

[0160] S41. The first terminal sends a first data recovery request to each terminal within the signal 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.

[0161] Here, the first terminal broadcasts a first data recovery request within the gateway's signal coverage area. Each terminal within the gateway's signal coverage area responds to the first data recovery request. For each terminal, based on the second preset identifier carried in the first data recovery request, it determines whether its memory stores a data packet matching the second preset identifier. Specifically, it checks whether the second preset identifier carried in the first data recovery request matches the second preset identifier in the first preset identifier of the data packet. If they match, it indicates that the terminal is the second terminal receiving the data packet from the first terminal. If they do not match, it indicates that the terminal has not stored the data packet from the first terminal.

[0162] S42. The second terminal responds to the first data recovery request, determines the 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.

[0163] Since the second terminal stores data packets, when it responds to the first data recovery request, it can find the data packet that matches the first preset identifier in the data packet and send the data packet to the first terminal.

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

[0165] S43. The first terminal receives data packets sent by each second terminal, 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 the recovered data.

[0166] The first terminal can receive data packets sent by different second terminals, and concatenate the sub-data in each data packet in the order indicated by the concatenation sequence number in the received data packet to obtain the recovered data. This recovered data is the "data to be transferred" transferred out during the data transfer stage.

[0167] In some embodiments, for the case of data "nested" data, the specific steps include S51 to S57, wherein:

[0168] S51. The first terminal sends a first data recovery request to each terminal and 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 packets of the first terminal.

[0169] Here, the first terminal broadcasts a first data recovery request within the gateway's signal coverage area. Each terminal within the gateway's signal coverage area responds to the first data recovery request. For each terminal, based on the second preset identifier carried in the first data recovery request, it determines whether its memory stores a data packet matching the second preset identifier. Specifically, it checks whether the second preset identifier carried in the first data recovery request matches the second preset identifier in the first preset identifier of the data packet. If they match, it indicates that the terminal is the second terminal receiving the data packet from the first terminal. If they do not match, it indicates that the terminal has not stored the data packet from the first terminal.

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

[0171] The second terminal receives data packets forwarded by the first terminal. However, the second terminal may forward these data packets to other terminals, or split them and forward them along with some data in its own memory to other terminals. Therefore, the data stored in the second terminal may or may not contain data packets from the first terminal. The second terminal can determine whether data packets from the first terminal exist by checking if there is an identifier in its memory that matches the second preset identifier carried in the first data recovery request. If so, it means that the second terminal stores data packets from the first terminal, and step S55 is executed; otherwise, it means that data packets from the first terminal do not exist in the data stored in the second terminal, and step S53 is executed.

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

[0173] 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 with different sub-data to the second terminals S1, S2, and S3 respectively. The second terminal S1 then transfers some of its own data and the data packets stored in the first terminal to the second terminal S2. At this point, the first terminal's data packets are no longer present in the second terminal S1, and the second terminal S2 stores both some of the data from the second terminal S1 and the first terminal's data packets. The second terminal S3 then transfers some of its own data and some of the data packets stored in the first terminal to other terminals S0 (terminals other than the first and second terminals). At this point, the second terminal S3 contains some of the first terminal's data packets, and the other terminals S0 store both some of the data from the second terminal S3 and the first terminal's data packets.

[0174] S53. If the second preset identifier carried in the first data recovery request is not present in the data stored in the second terminal, then in response to the server, a second data recovery request is initiated to recover its own transferred data according to the policy information pinned at the top of the preset policy queue.

[0175] Theoretically, the second terminal should store the data packets of the first terminal. If the second preset identifier carried in the first data recovery request is not present in the data stored in the second terminal, it means that the second terminal has already transferred the data packets of the first terminal in this step. In this case, the data transferred out by the second terminal (including its own and the data of the first terminal) needs to be recovered first before the data recovery process of the first terminal can continue. Otherwise, due to the data "nesting" phenomenon, it is impossible to recover the incomplete data packets of the first terminal stored in other terminals.

[0176] The server stores data scheduling plans for any terminal and a second preset identifier corresponding to each plan. The data scheduling plans are stored sequentially in a plan queue according to the system timestamp in their respective second preset identifiers. The plan queue stores all data scheduling plans generated by the server, also ordered by the system timestamp in their corresponding second preset identifiers. The most recently generated plan is the one at the top of the plan queue. During the data recovery phase, the server broadcasts the data scheduling plans according to the order in the plan queue. This broadcast carries the second preset identifier corresponding to each plan, and the serial number (SN) in the second preset identifier identifies the terminal requesting data recovery.

[0177] Continuing the previous example, in step S53, the second terminal is the second terminal S1 in the example above (there is no sub-data from the first terminal). At this time, according to the currently prioritized data scheduling plan, when the SN number in the second preset identifier corresponding to the data scheduling plan is the SN number of the second terminal S1, the server sends a data recovery command to the second terminal S1; the second terminal S1 responds to the data recovery command and initiates a second data recovery request to each terminal within the coverage area of ​​the gateway signal to request the recovery of its own outgoing data (that is, part of the data of the second terminal S1 stored in the second terminal S2 and the data packets of the first terminal).

[0178] S54. After the 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 second preset identifier carried by the first data recovery request exists in the data stored in the second terminal" in S52.

[0179] Specifically, upon completion of data recovery at the second terminal S1, in response to the first data recovery request, it is determined whether the data stored in the second terminal S1 contains the second preset identifier carried in the first data recovery request. Since the second terminal S1 has recovered the data packets of the first terminal, there must exist data that matches the second preset identifier carried in the first data recovery request, so step S55 is then executed.

[0180] S55. If the data stored in the second terminal contains a second preset identifier carried in the first data recovery request, then determine whether the second preset identifier is encapsulated by other identifiers.

[0181] In this step, it is determined whether the second preset identifier is encapsulated by other identifiers. If yes, step S56 is executed; otherwise, step S57 is executed.

[0182] Continuing the previous example, the data stored by the second terminal S1 after data recovery is completed is, for example, W2-R1-W1-R1-W2, where W2 represents the data of the 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 by 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, and the second terminal S1 after data recovery continues to execute step S56.

[0183] S56. 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.

[0184] Continuing the previous example, for the second terminal S1 after the data recovery is completed, the data it stores is W2-R-W1-R-W2. Apart from the first preset identifier R, there are no other identifiers 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.

[0185] For example, in the second terminal S3, there is a portion of the data packet from the first terminal. Therefore, the second terminal S3 executes step S55. The data stored in the second terminal S3 contains a second preset identifier carried in the first data recovery request. The second terminal S3 determines whether the second preset identifier is encapsulated by other identifiers. Since the second terminal S3 has not received data from other terminals, it detects that the second preset identifier is not encapsulated by other identifiers, and proceeds sequentially to step S56.

[0186] S57. If the second preset identifier is encapsulated by other identifiers, the second terminal listens to 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.

[0187] For example, the second terminal S2 stores both a portion of the data from the second terminal S1 and the data packets from the first terminal. Therefore, the data stored in the second terminal S2 contains a second preset identifier carried by the first data recovery request. The second terminal S2 then determines whether this second preset identifier is encapsulated by other identifiers. Since the second terminal S2 contains nested portions of the data from the second terminal S1 and the data packets from the first terminal, 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 by the first data recovery request initiated by the first terminal; W2 represents a portion of the 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. Therefore, it is 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 second terminal S2 data W3-R2-W2-R1-W1-R1-W2-R2-W3 is encapsulated by another identifier R2, which corresponds to the second terminal S1. At this time, the second terminal S2 needs to listen to whether the second terminal S1 sends a third data recovery request (i.e., in the above embodiment, the second terminal S1 responds to the command to restore data sent by the server and initiates a second data recovery request to each terminal within the coverage area of ​​the gateway signal). 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 mentioned above; however, the terminal corresponding to the other identifier may be other terminals, in which case the third data recovery request is not equal to the second data recovery request. Then, 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.

[0188] For example, other terminal S0 stores both partial data from the second terminal S3 and partial data from the data packet of the first terminal. Therefore, the data stored in other terminal S0 contains a second preset identifier carried by the first data recovery request. Further determination is made as to whether the second preset identifier is encapsulated by other identifiers. Since other terminal S0 contains nested partial data from the second terminal S3 and partial data from the data packet of the first terminal, 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 by the first data recovery request initiated by the first terminal; W4 represents partial data from the second terminal S3, and R4 represents the first preset identifier corresponding to the second terminal S3; W0 represents the data of the other terminal S0 itself. Therefore, it is determined that the second preset identifier carried by the first data recovery request initiated by the first terminal in the data W0-R4-W4-R1-W1-R4-W0 of other terminal S0 (i.e., the second preset identifier in R1) is encapsulated by other identifier R4. At this point, other terminals S0 need to listen for 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 a third data recovery request to each terminal within the gateway's signal coverage area, other terminals S0 respond to the second terminal S3's third data recovery request and send the data R4-W4-R1-W1-R4 to the second terminal S3. Afterwards, for the second terminal S3 after data recovery is complete, its concatenated data is W4-R1-W1-R1-W4; the second terminal S3 returns to step S52 until it sends the data R1-W1-R1 to the first terminal.

[0189] In some embodiments, the data transmission method further includes the construction of terminal information. Specifically, the server receives terminal task and attribute information reported by each terminal and generates terminal information for each terminal.

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

[0191] The server generates a memory table (i.e., terminal information) based on the terminal tasks and attribute information reported by each terminal. The table contains information such as the IP address of each terminal, the remaining memory space, the redundancy space occupancy rate, the spare port, and the read / write functions.

[0192] The above embodiments include a first terminal actively initiating a data scheduling request in different scenarios to request 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 whose data needs to be transferred based on the memory availability of each terminal; based on the third data volume to be transferred from the third terminal and its own stored terminal information, a second data scheduling plan is determined and sent 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; the fourth terminal is a terminal within the gateway's coverage area that is different from the third terminal.

[0193] 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 embodiments. For example, referring to steps S221 and S222, specifically, based on the memory remaining amount of each terminal in the terminal information, terminals with memory remaining amount greater than or equal to a second preset threshold are selected from among the terminals to be used as fourth terminals waiting to receive the data to be transferred. Based on the ratio of the memory remaining amount of each fourth terminal and the third data amount of the data to be transferred from the third terminal, the fourth data amount of the data to be transferred that each fourth terminal can receive is determined.

[0194] The third terminal receives the second data scheduling plan; based on the amount of fourth data that each fourth terminal can receive, the data to be transferred with the third data amount is divided into multiple parts and sent to the fourth terminal respectively.

[0195] The third terminal can send data with different components to the fourth terminal based on the IP information and backup port of the fourth terminal indicated in the second data scheduling plan.

[0196] This embodiment periodically and proactively initiates load balancing requests from the server to monitor the memory space of each terminal and dynamically adjust the memory balance of each terminal to ensure that the memory balance of each terminal is balanced, thereby balancing the load pressure of each terminal.

[0197] In some embodiments, due to the continuous generation of stored data by the terminals, the occupancy rate of the pseudo-memory space of the system components may exceed the maximum value within a certain period of time, for example, when the pseudo-memory space is full. In this case, the user privacy data in memory can be uploaded to the cloud. Specifically, the server detects the remaining memory of each terminal. If the total redundant space of the remaining memory is less than or equal to a third preset threshold, the server initiates a memory cleanup request to each terminal within the coverage area of ​​the gateway signal. In response to the memory cleanup request, the terminal uploads the data to be cleaned from its memory to the server. Here, the data to be cleaned is also the user privacy data. The upload of this user privacy data can be encrypted before uploading, and this embodiment of the present disclosure does not impose any restrictions on this. After the data to be cleaned is uploaded to the server, the pseudo-memory space is released and continues to be used for distributed storage of data to be transferred by subsequent terminals.

[0198] In large-scale IoT systems, the increased connectivity of user privacy data stored on terminals increases the risk of leakage and attack. The above-described embodiments and their combinations constitute the data transmission method provided by this disclosure. Based on the characteristics of IoT systems, a solution is proposed that uses a local storage mechanism to achieve secure storage without adding security hardware. Furthermore, terminals can adopt different data scheduling plans in different application scenarios. For example, a balanced transfer strategy with slightly longer processing time but lower overall system consumption can be selected; or a fast transfer strategy with shorter processing time can be chosen.

[0199] This disclosure discloses embodiments of "distributed storage" among terminals within a local area network (LAN) based on the protocol layer, adapting to the distributed storage needs of underlying non-server devices (i.e., terminals). In some embodiments, a set of transmission protocols based on TCP / IP is involved in the LAN. Figure 4 This is a schematic diagram of a network transmission architecture provided in an embodiment of the present disclosure, such as... Figure 4 As shown, taking the cloud (i.e., the cloud management platform) as an example, the first terminal establishes a connection with the cloud via the MQTT protocol. The first terminal segments the data to be transferred according to the received first data scheduling plan, obtaining multiple sub-data sets. Then, the first terminal establishes a connection with the second terminal via the UDP protocol, and sends each sub-data set to the second terminal via socket transmission. Additionally, the first terminal sends a first data recovery request to the cloud via the MQTT protocol, and the cloud then distributes the first data recovery request to all terminals within the gateway's signal coverage area. When the second terminal responds to the first data recovery request, it returns the corresponding stored data packet to the first terminal via the UDP protocol. The first terminal receives the sub-data from each data packet and concatenates them to obtain the recovered data.

[0200] To facilitate understanding of the data transmission method provided in this disclosure, a complete example will be used to describe the data transmission method in detail below. Figure 5 A detailed flowchart of a data transmission method provided in this disclosure embodiment is shown below. Figure 5 As shown, ① Terminal factory settings: Report terminal task and attribute information, such as name, ID, IP, SN, memory space, network speed, port, etc. ② Server verifies the current terminal, such as verifying 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 is legitimate, and the current terminal can work. ④ New device in operation: Memory balance changes dynamically and is reported to the server. ⑤ The server monitors the memory balance of each terminal and updates the memory table simultaneously. In one case (including ⑥, ⑦, and ⑧), ⑥ When the first terminal runs out of memory, it initiates a data scheduling request indicating a memory exhaustion command. ⑦ The server responds to the memory exhaustion command indicated by the data scheduling request, formulates a first data scheduling plan based on the currently stored memory table and the first data volume to be transferred, and sends it to the first terminal. ⑧ First terminal data transfer: According to the first data scheduling plan, the TCP / IP backup port is activated to transfer redundant data. Or, in another case (including ⑨ and ⑩) ⑨ In the event of a physical attack on the first terminal, a data scheduling request instructing on the physical attack is initiated. ⑩ The server responds to the physical attack instructions in the data scheduling request, 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. First terminal data transfer: According to the first data scheduling plan, start the UDP backup port to transfer user privacy data. A new terminal replaces the first terminal as the new first terminal: the new first terminal reports terminal tasks and attribute information, such as name, ID, IP, SN, memory space, network speed, port, etc., and this information is the same as that of the first terminal it replaces. In one scenario (including...) ), The new first terminal initiates a first data recovery request to restore redundant data, and at the same time starts a TCP / IP backup port to receive data from the second terminal. The server sends the first data recovery request to all terminals within the gateway's coverage area. Alternatively, in another scenario (including...) ), The new first terminal initiates the first data recovery request to restore user privacy data, and at the same time starts a backup UDP port to receive data from the second terminal. The server sends the first data recovery request to each terminal within the gateway's coverage area. The server initiates a memory cleanup request. In response to the memory cleanup request, the terminal uploads the data to be cleaned from its own memory to the server.

[0201] Figure 6 This disclosure provides a schematic flowchart of a data transmission method, as shown in the following embodiment. Figure 6 As shown, taking the server as the gateway as an example, the system includes a device side and a gateway side. The device side includes the first terminal and the second terminal; other terminals are not illustrated here.

[0202] The device executes the following steps S61 to S67: S61: Monitor whether a data recovery request (including a first data recovery request and a second data recovery request) is broadcast on the local area network. If yes, execute S62; if no, repeat S61. S62: Determine whether the IP address in the first preset identifier corresponding to the data scheduling plan (first data scheduling plan and second data scheduling plan) is the local IP address. If no, execute S63; if yes, execute S66. S63: Determine whether the second preset identifier carried by the received data recovery request exists in memory. If yes, execute S64; if no, return to S61. S64: Determine whether the second preset identifier is encapsulated by other identifiers. If yes, return to S61; if no, execute S65. S65: According to the data scheduling plan, start the backup port corresponding to the protocol to prepare for data transmission. S66: According to the data scheduling plan, start the backup port corresponding to the protocol to prepare for data reception. S67: After reception is complete, broadcast a data recovery completion signal and execute step S74.

[0203] The gateway executes the following steps S71 to S77: S71: Listen for broadcast data recovery requests (including the first data recovery request and the second data recovery request) in the local area network. If yes, execute S72; otherwise, execute S74. S72: Determine whether the data scheduling plan matched by the second preset identifier carried by the currently broadcast data recovery request (each data scheduling plan is configured with a corresponding first preset identifier, and the first preset identifier contains the second preset identifier) ​​is the top plan in the plan queue. If yes, return to execute S71; otherwise, execute S73. S73: Broadcast the top data scheduling plan in the plan queue, and simultaneously broadcast the interruption of the ongoing splicing. S74: Listen for broadcast data recovery completion signals in the local area network. If yes, execute S75; otherwise, return to execute S71. S75: Delete the top plan in the plan queue.

[0204] The following describes in detail another data transmission method provided by the embodiments of this disclosure. The execution subject of this data transmission method can be a first terminal. Specifically, in response to a data scheduling request, a first data scheduling plan is determined based on the 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 area 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 within the coverage area of ​​the gateway that is different from the first terminal. The first terminal is a terminal within the coverage area of ​​the gateway that sends a data scheduling request. Based on 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 part. Each sub-data part is sent to the second terminal respectively.

[0205] The data transmission method provided in this embodiment uses a first terminal to generate a first data scheduling plan. However, it is based on the same principle as the data transmission method in the above embodiment that uses a server to generate a first data scheduling plan, and the repeated parts will not be described again.

[0206] The method by which the first terminal communicates with the second terminal and transmits the data to be transferred can be found in the detailed process of a data transmission method provided in the above embodiments; repeated parts will not be described again.

[0207] This embodiment employs a local storage mechanism, where "local" refers to the simulated memory space comprised of various terminals within the signal coverage area of ​​the same gateway. Data to be transferred from the first terminal is stored in the local memory space of a second terminal under the same gateway, achieving distributed storage of the data. Furthermore, data transfer speeds between terminals are faster than those between terminals and the cloud, enabling rapid data backup. Additionally, compared to traditional technologies, this embodiment eliminates the need for encrypted storage devices and eliminates the need for terminals to frequently upload backup data, reducing the risk of network transmission theft.

[0208] In some embodiments, a first data scheduling plan is determined based on a first data volume of data to be transferred and terminal information received from the server, including:

[0209] If the system detects that its own memory balance is less than or equal to a first preset threshold, it responds to the data scheduling request initiated by itself indicating that the memory is exhausted, obtains terminal information from the server, and determines the first data scheduling plan based on the memory balance of each terminal and the first data volume of data to be transferred in the terminal information.

[0210] In some embodiments, a first data scheduling plan is determined based on the remaining memory of each terminal and the first data volume of data to be transferred, as shown in the terminal information, including:

[0211] Based on the memory remaining amount of each terminal in the terminal information, select terminals with memory remaining amount greater than or equal to the second preset threshold from the terminals and use them as second terminals to wait to receive data to be transferred.

[0212] The second data volume of data to be transferred that each second terminal can receive is determined based on the ratio of the memory remaining of each second terminal and the first data volume of the data to be transferred.

[0213] In some embodiments, the first terminal and the second terminal communicate via Transmission Control Protocol (TCP) or Internet Protocol (IP).

[0214] In some embodiments, a first data scheduling plan is determined based on a first data volume of data to be transferred and terminal information received from the server, including:

[0215] If 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 terminal information from the server, and determines the first data scheduling plan based on the memory remaining of each terminal and the first data volume of data to be transferred in the terminal information.

[0216] In some embodiments, a first data scheduling plan is determined based on the remaining memory of each terminal and the first data volume of data to be transferred, as shown in the terminal information, including:

[0217] Based on the memory remaining amount of each terminal in the terminal information, select terminals with memory remaining amount greater than or equal to the second preset threshold from the terminals and use them as second terminals to wait to receive data to be transferred.

[0218] The data transmission duration of each second terminal is determined based on its data transmission speed and the initial data volume to be transferred; the data transmission duration of each second terminal is equal.

[0219] Based on the data transmission speed and data transmission duration of each second terminal, determine whether the amount of data that the second terminal is prepared to receive exceeds the memory capacity of the second terminal.

[0220] If the amount of data that any second terminal is prepared to receive does not exceed the memory capacity of that second terminal, the amount of data that each second terminal is prepared to receive is determined as the second amount of data to be transferred that it can receive.

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

[0222] If the amount of data that a second terminal is prepared to receive exceeds its own memory capacity, the second terminal whose amount of data prepared to receive exceeds its own memory capacity is taken as the target second terminal, and the amount of second data that the target second terminal can receive is determined as its own memory capacity.

[0223] For the other second terminals besides 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 data volume that any other second terminal is prepared to receive does not exceed the memory reserve of the corresponding other second terminal, and determine the second data volume of the data to be transferred that the other second terminals can receive.

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

[0225] In some embodiments, sending each sub-data volume to the second terminal includes: 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 preset identifiers and sub-data; the first preset identifiers added to different sub-data indicate different splicing sequence numbers; and sending the data packet corresponding to each sub-data to the corresponding receiving second terminal.

[0226] In addition, this disclosure also provides another data transmission method, the execution subject of which can be a data transmission device with certain computing power. The data transmission device integrates a server and at least one terminal within the signal coverage area 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 power.

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

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

[0229] In some embodiments, the first terminal sends a first data recovery request to each terminal within the coverage area 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.

[0230] If the second terminal responds to the first data recovery request, then the second terminal can determine the 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.

[0231] The first terminal receives data packets sent by each second terminal, 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 the recovered data.

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

[0233] In some embodiments, the first terminal sends a first data recovery request to each terminal and 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 packets of the first terminal.

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

[0235] If the second preset identifier carried in the first data recovery request is not present in the data stored in the second terminal, then in response to the command sent by the server for the second terminal to recover the data, a second data recovery request is initiated to request the recovery of its own transferred data.

[0236] After the 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 data stored in the second terminal contains the second preset identifier carried in the first data recovery request.

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

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

[0239] In some embodiments, in conjunction with the above embodiments, if the second preset identifier is encapsulated by other identifiers, the second terminal listens to 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.

[0240] It should be noted that the specific execution process of the above embodiments in combination with the request to restore data can be found in the execution process of steps S51 to S57 above, and the repeated parts will not be described again.

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

[0242] In some embodiments, the server periodically determines the third terminal that needs to transfer data based on the remaining memory of each terminal; determines the second data scheduling plan for the third terminal based on the third data volume of the data to be transferred and the terminal information stored in the third terminal, and sends it to the third terminal; the second data scheduling plan includes the information of each fourth terminal and the fourth data volume that each fourth terminal can receive; the fourth terminal is a terminal that is different from the third terminal within the coverage area 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 according to the fourth data volume that each fourth terminal can receive, and sends them to the fourth terminals respectively.

[0243] In some embodiments, the server detects the remaining memory of each terminal and, if the total redundant memory space is less than or equal to a third preset threshold, initiates a memory cleanup request to each terminal within the coverage area of ​​the gateway signal; in response to the memory cleanup request, the terminal uploads the data to be cleaned from its own memory to the server.

[0244] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply 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.

[0245] In addition, this disclosure also provides a data transmission device corresponding to the data transmission method. Since the principle of the device in this disclosure for solving the problem is similar to the data transmission method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and repeated details will not be repeated.

[0246] This disclosure provides a data transmission apparatus applied to a data transmission method where the executing entity is a terminal integrated with a server and at least one gateway within the signal coverage area. The server can be a gateway, a cloud platform, or an advanced terminal; an advanced terminal refers to a terminal with strong computing capabilities.

[0247] The server is configured to respond to a data scheduling request sent by the first terminal. Based on 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, the server determines a first data scheduling plan for the first terminal and sends it to the first terminal. The terminal information includes information about each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and the second data volume that each second terminal can receive. The first terminal is a terminal within the coverage area of ​​the gateway that is waiting to transfer data, and the second terminals are terminals within the coverage area of ​​the gateway that are different from the first terminal.

[0248] The first terminal is configured to receive 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.

[0249] In some embodiments, the first terminal is configured to initiate a data scheduling request to the server when it detects that its own memory balance is less than or equal to a first preset threshold.

[0250] The server is configured to respond to a memory exhaustion instruction indicating a data scheduling request, and determine a first data scheduling plan based on the memory remaining amount of each terminal in the terminal information and the first data amount of data to be transferred carried in the data scheduling request.

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

[0252] In some embodiments, the first terminal and the second terminal communicate via Transmission Control Protocol (TCP) or Internet Protocol (IP).

[0253] In some embodiments, the first terminal is configured to initiate a data scheduling request to the server upon detecting that it has been subjected to a physical attack.

[0254] The server is configured to respond to physical attack instructions indicated by the data scheduling request, and determines the first data scheduling plan 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.

[0255] In some embodiments, the server is specifically configured to: filter out terminals with remaining memory greater than or equal to a second preset threshold from the terminals based on the remaining memory of each terminal in the terminal information, and use these terminals as second terminals to wait to receive 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; ensure that the data transmission durations of each second terminal are equal; determine whether the amount of data that a second terminal is prepared to receive exceeds its remaining memory based on the data transmission speed and the data transmission duration of each second terminal; and determine that the amount of data that each second terminal is prepared to receive is the second data volume of the data to be transferred that it can receive if the amount of data that any second terminal is prepared to receive does not exceed its remaining memory.

[0256] In some embodiments, the server is further configured to, when the amount of data a second terminal is prepared to receive exceeds its own memory capacity, designate the second terminal whose prepared data amount exceeds its own memory capacity as the target second terminal, and determine the second amount of data that the target second terminal can receive as its own memory capacity; for other second terminals besides 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 amount of data to be transferred, until the amount of data prepared to receive by any other second terminal does not exceed the memory capacity of the corresponding other second terminal, and determine the second amount of data to be transferred that the other second terminals can receive.

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

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

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

[0260] The second terminal is configured to respond to the first data recovery request, determine the 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.

[0261] The first terminal is configured to receive data packets sent by each second terminal, and to concatenate the sub-data in each data packet according to the concatenation sequence number indicated by the first preset identifier in the data packet to obtain the recovered data.

[0262] In some embodiments, the first terminal is configured to send a first data recovery request to each terminal and 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 storing the data packet of the first terminal.

[0263] The second terminal is configured to respond to the first data recovery request and determine 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, then in response to the command sent by the server for the second terminal to recover data, it initiates a second data recovery request to recover its own transferred data; if the data recovery is completed, it 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.

[0264] In some embodiments, the second terminal is configured to determine whether the second preset identifier is encapsulated by other identifiers if the data stored in the second terminal contains a second preset identifier carried in the first data recovery request; 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.

[0265] In some embodiments, the second terminal is further configured to listen to 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 when responding to the third data recovery request.

[0266] In some embodiments, the server is further configured to receive terminal task and attribute information reported by each terminal and generate terminal information for each terminal.

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

[0268] The third terminal is configured to receive the second data scheduling plan; based on the amount of fourth data that each fourth terminal can receive, the data to be transferred with the third data amount is divided into multiple parts and sent to the fourth terminal respectively.

[0269] In some embodiments, the server is further configured to detect the remaining memory of each terminal stored therein, and if the total redundant space of the remaining memory is less than or equal to a third preset threshold, initiate a memory cleanup request to each terminal within the coverage area of ​​the gateway signal; the terminal is configured to respond to the memory cleanup request by uploading the data to be cleaned in its own memory to the server.

[0270] This disclosure also provides another data transmission apparatus applied to the data transmission method where the execution subject is a first terminal. The data transmission apparatus includes a first terminal, which comprises a first processing module, a second processing module, and a sending module, wherein:

[0271] The first processing module is configured to respond to data scheduling requests and determine a 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 on each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information on each second terminal and the second data volume that each second terminal can receive. The second terminal is a terminal within the coverage area of ​​the gateway that is different from the first terminal. The first terminal is a terminal within the coverage area of ​​the gateway that sends a data scheduling request.

[0272] The second processing module is configured to divide the data to be transferred, which has a first data volume, into multiple parts based on the second data volume that each second terminal can receive, thus obtaining each part of sub-data.

[0273] The sending module is configured to send each piece of data to the second terminal separately.

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

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

[0276] In some embodiments, the first terminal and the second terminal communicate via Transmission Control Protocol (TCP) or Internet Protocol (IP).

[0277] In some embodiments, the first processing module is specifically configured to, upon detecting that it has been subjected to an external attack, respond to a data scheduling request initiated by itself indicating that it has been subjected to a physical attack, obtain terminal information from the server, and determine a first data scheduling plan based on the memory remaining of each terminal and the first data volume of data to be transferred in the terminal information.

[0278] In some embodiments, the first processing module is specifically configured to: filter out terminals with memory remaining greater than or equal to a second preset threshold from the terminals based on the memory remaining of each terminal in the terminal information, and use these terminals as second terminals to wait to receive 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; ensure that the data transmission durations of each second terminal are equal; determine whether the amount of data that a second terminal is prepared to receive exceeds its memory remaining capacity based on the data transmission speed and the data transmission duration of each second terminal; and determine that the amount of data that each second terminal is prepared to receive is the second data volume of the data to be transferred that it can receive, in the case that the amount of data that any second terminal is prepared to receive does not exceed its memory remaining capacity.

[0279] In some embodiments, the first processing module is further configured to, when there is a second terminal that is prepared to receive data exceeding its own memory capacity, designate the second terminal whose prepared data exceeds its own memory capacity as the target second terminal, and determine the second data capacity that the target second terminal can receive as its own memory capacity; for other second terminals besides 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 capacity of the data to be transferred, until the data prepared to receive by any other second terminal does not exceed the memory capacity of the corresponding other second terminal, and determine the second data capacity of the data to be transferred that the other second terminals can receive.

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

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

[0282] Furthermore, the data transmission apparatus provided in this embodiment of the present disclosure also includes a second terminal and a server. The data transmission apparatus is also configured to recover data from the first terminal.

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

[0284] If the second terminal is configured to respond to the first data recovery request, then the second terminal can determine the 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.

[0285] The first terminal is configured to receive data packets sent by each second terminal, and to concatenate the sub-data in each data packet according to the concatenation sequence number indicated by the first preset identifier in the data packet to obtain the recovered data.

[0286] In some embodiments, the first terminal is configured to send a first data recovery request to each terminal and 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 storing the data packets of the first terminal.

[0287] The second terminal is configured to respond to the first data recovery request and determine 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, then in response to the command sent by the server for the second terminal to recover data, it initiates a second data recovery request to recover its own transferred data; if the data recovery is completed, it 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.

[0288] In some embodiments, the second terminal is further configured to determine whether the second preset identifier is encapsulated by other identifiers if the data stored in the second terminal contains a second preset identifier carried by the first data recovery request; 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.

[0289] In some embodiments, the second terminal is further configured to listen to 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 when responding to the third data recovery request.

[0290] In some embodiments, the server is further configured to receive terminal task and attribute information reported by each terminal and generate terminal information for each terminal.

[0291] In some embodiments, the server is further configured to periodically determine the third terminal that needs to transfer data based on the memory remaining of each terminal; determine the second data scheduling plan for the third terminal based on the third data volume of the data to be transferred and the terminal information stored in the third terminal, 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 that is different from the third terminal within the coverage area of ​​the gateway; the third terminal is configured to receive the second data scheduling plan; and divide 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 send them to the fourth terminals respectively.

[0292] In some embodiments, the server is further configured to detect the remaining memory of each terminal stored therein, and if the total redundant space of the remaining memory is less than or equal to a third preset threshold, initiate a memory cleanup request to each terminal within the coverage area of ​​the gateway signal; the terminal is configured to respond to the memory cleanup request by uploading the data to be cleaned in its own memory to the server.

[0293] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this disclosure. Figure 7 As shown, this disclosure provides a computer device including: 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, cause the one or more processors to implement any of the data transmission methods described in the above embodiments; the one or more I / O interfaces 703 are connected between the processor and the memory, configured to enable information interaction between the processor and the memory.

[0294] 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, enabling information exchange between the processor 701 and the memory 702, including but not limited to a data bus (Bus).

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

[0296] According to embodiments of this disclosure, a computer non-transient readable storage medium is also provided. This computer non-transient readable storage medium stores a computer program, wherein, when executed by a processor, the program implements the steps of any of the data transmission methods described in the above embodiments.

[0297] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a machine-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), it performs the functions defined above in the system of this disclosure.

[0298] It should be noted that the computer-readable non-transient readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any non-transient readable computer storage medium other than a computer-readable storage medium, which can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the non-transient readable computer storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0299] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two adjacent blocks may actually represent substantially parallel execution, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0300] It is understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of this disclosure, and this disclosure is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this disclosure, and these modifications and improvements are also considered to be within the scope of protection of this disclosure.

Claims

1. A data transmission method, wherein, include: The server responds to the data scheduling request sent by the first terminal, determines the first data scheduling plan for the first terminal based on 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 it to the first terminal; the terminal information includes information of each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and the amount of second data that each second terminal can receive; the first terminal is a terminal waiting to transfer data within the coverage area of ​​the gateway signal, and the second terminal is a terminal different from the first terminal within the coverage area of ​​the gateway signal; The first terminal receives the first data scheduling plan; Based on the amount of second data that each second terminal can receive, the data to be transferred, which has the first amount of data, is divided into multiple parts to obtain each part of sub-data. And each of the aforementioned sub-data is sent to the second terminal; The server responds to a data scheduling request sent by the first terminal, and determines a first data scheduling plan for the first terminal based on the first data volume of data to be transferred from the first terminal carried in the data scheduling request and the terminal information stored in the server itself, including: When the first terminal detects that it is under physical attack, it initiates the data scheduling request to the server. The server responds to the physical attack command indicated by the data scheduling request and determines the first data scheduling plan 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. The server responds to the physical attack command indicated by the data scheduling request, and determines the first data scheduling plan 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, including: The server responds to the physical attack command indicated by the data scheduling request, and selects terminals with memory remaining greater than or equal to a second preset threshold from the terminals according to the memory remaining of each terminal in the terminal information, and uses them as second terminals to wait to receive the data to be transferred. The data transmission duration of each second terminal is determined 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. Based on the data transmission speed and data transmission duration of each second terminal, determine whether the amount of data that the second terminal is prepared to receive exceeds the memory capacity of the second terminal. If the amount of data that any second terminal is prepared to receive does not exceed the memory capacity of that second terminal, the amount of data that each second terminal is prepared to receive is determined to be the second amount of the data to be transferred that it can receive.

2. The data transmission method according to claim 1, wherein, The server responds to a data scheduling request sent by the first terminal, and determines a first data scheduling plan for the first terminal based on the first data volume of data to be transferred from the first terminal carried in the data scheduling request and the terminal information stored in the server itself. The plan also includes: When the first terminal detects that its remaining memory is less than or equal to a first preset threshold, it 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 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.

3. The data transmission method according to claim 2, wherein, The server responds to the memory exhaustion instruction indicated by the data scheduling request, and determines the first data scheduling plan 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, including: The server responds to the memory exhaustion instruction indicated by the data scheduling request, and selects terminals with memory reserves greater than or equal to a second preset threshold from the terminals according to the memory reserves of each terminal in the terminal information, and uses them as second terminals to wait to receive the data to be transferred. Based on the ratio of the remaining memory of each of the second terminals and the first data volume of the data to be transferred, the second data volume of the data to be transferred that each of the second terminals can receive is determined.

4. The data transmission method according to claim 1, wherein, The data transmission method further includes: If the amount of data that the second terminal is prepared to receive exceeds its own memory capacity, the second terminal whose amount of data prepared to receive exceeds its own memory capacity is taken as the target second terminal, and the amount of the second data that the target second terminal can receive is determined as its own memory capacity. For the other second terminals besides 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 prepared to receive does not exceed the memory reserve 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.

5. The data transmission method according to any one of claims 1 to 4, wherein, The first terminal and the second terminal communicate via User Datagram Protocol (UDP); or, The first terminal and the second terminal communicate via Transmission Control Protocol (TCP) or Internet Protocol (IP).

6. The data transmission method according to claim 1, wherein, Sending each of the sub-data volumes to the second terminal includes: For each piece of sub-data, a first preset identifier is added before the sub-data and a first preset identifier is added after the sub-data to obtain a data packet containing the first preset identifier and the sub-data; the first preset identifier added to different sub-data indicates different splicing sequence numbers; Each data packet corresponding to the sub-data is sent to the corresponding receiving second terminal.

7. The data transmission method according to claim 6, wherein, The data transmission method further includes: The first terminal sends a first data recovery request to each terminal within the signal coverage area of ​​the gateway, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stored the data packet of the first terminal; The second terminal responds to the first data recovery request, determines the 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 sends the data packet to the first terminal; The first terminal receives the data packets sent by each of 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 the recovered data.

8. The data transmission method according to claim 6, wherein, The data transmission method further includes: The first terminal sends a first data recovery request to each terminal and server within the signal coverage area of ​​the gateway, so that each terminal responds to the first data recovery request and determines whether it is the terminal that stored the data packet of the first terminal; The second terminal responds to the first data recovery request and determines whether the data stored in the second terminal contains the second preset identifier carried in the first data recovery request; If the second preset identifier carried in the first data recovery request is not present in the data stored in the second terminal, then in response to the command sent by the server to restore the data of the second terminal, a second data recovery request is initiated to restore its own transferred data. After the 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 by the second terminal.

9. The data transmission method according to claim 8, wherein, The data transmission method further includes: If the data stored in the second terminal contains the second preset identifier carried in the first data recovery request, then determine 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.

10. The data transmission method according to claim 9, wherein, The data transmission method further includes: If the second preset identifier is encapsulated by the other identifier, the second terminal listens to 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.

11. The data transmission method according to claim 1, wherein, The data transmission method further includes: the server receiving terminal task and attribute information reported by each terminal, and generating terminal information for each terminal.

12. The data transmission method according to claim 1, wherein, The server periodically determines the third terminal that needs to transfer data based on the memory remaining of each terminal; based on the third data volume of the data to be transferred of the third terminal and its own stored terminal information, it determines the second data scheduling plan for the third terminal and sends 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 that is different from the third terminal within the coverage area of ​​the gateway signal. The third terminal receives the second data scheduling plan; based on the amount of fourth data that each of the fourth terminals can receive, the data to be transferred containing the third amount of data is divided into multiple parts and sent to the fourth terminals respectively.

13. The data transmission method according to claim 1, wherein, The data transmission method further includes: The server detects the remaining memory of each terminal and, if the total redundant space of the remaining memory is less than or equal to a third preset threshold, initiates a memory cleanup request to each terminal within the coverage area of ​​the gateway signal. In response to the memory cleanup request, the terminal uploads the data to be cleaned from its own memory to the server.

14. A data transmission method, wherein, include: In response to a data scheduling request, the system determines a first data scheduling plan based on the first data volume of the data to be transferred and the terminal information received from the server. The terminal information includes information about each terminal within the coverage area of ​​the gateway signal; The first data scheduling plan includes information about each second terminal and the amount of second data that each second terminal can receive; the second terminal is a terminal within the coverage area of ​​the gateway signal that is different from the first terminal; the first terminal is a terminal within the coverage area of ​​the gateway signal that sends a data scheduling request. Based on the amount of second data that each second terminal can receive, the data to be transferred, which has the first amount of data, is divided into multiple parts to obtain each part of sub-data. Each of the aforementioned sub-data is sent to the second terminal; The response data scheduling request, based on the first data volume of its own data to be transferred and the terminal information received from the server, determines a first data scheduling plan, including: Upon detecting an external attack, the system responds to a data scheduling request initiated by itself indicating a 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 volume of the data to be transferred. The response to the data scheduling request initiated by itself indicating that it has been subjected to a physical attack obtains the terminal information from the server, and determines the first data scheduling plan based on the memory remaining of each terminal and the first data volume of the data to be transferred, including: In response to a data scheduling request initiated by itself indicating that it has been subjected to a physical attack, the terminal information is obtained from the server, and based on the memory remaining of each terminal in the terminal information, the terminals with memory remaining greater than or equal to a second preset threshold are selected from the terminals to be used as second terminals waiting to receive the data to be transferred. The data transmission duration of each second terminal is determined 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. Based on the data transmission speed and data transmission duration of each second terminal, determine whether the amount of data that the second terminal is prepared to receive exceeds the memory capacity of the second terminal. If the amount of data that any second terminal is prepared to receive does not exceed the memory capacity of that second terminal, the amount of data that each second terminal is prepared to receive is determined to be the second amount of the data to be transferred that it can receive.

15. The data transmission method according to claim 14, wherein, The response to the data scheduling request, based on the first data volume of the data to be transferred and the terminal information received from the server, determines a first data scheduling plan, which further includes: If the system detects that its own memory balance is less than or equal to a first preset threshold, it responds to the data scheduling request initiated by itself indicating that the memory is exhausted, obtains the 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 volume of the data to be transferred.

16. The data transmission method according to claim 15, wherein, The data scheduling request initiated by itself to indicate that memory is exhausted 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 volume of the data to be transferred, including: In response to a data scheduling request initiated by itself indicating that the memory is exhausted, the terminal information is obtained from the server, and based on the memory remaining amount of each terminal in the terminal information, the terminals with memory remaining amount greater than or equal to a second preset threshold are selected from the terminals to be used as the second terminals waiting to receive the data to be transferred. Based on the ratio of the remaining memory of each of the second terminals and the first data volume of the data to be transferred, the second data volume of the data to be transferred that each of the second terminals can receive is determined.

17. The data transmission method according to claim 14, wherein, The data transmission method further includes: If the amount of data that the second terminal is prepared to receive exceeds its own memory capacity, the second terminal whose amount of data prepared to receive exceeds its own memory capacity is taken as the target second terminal, and the amount of the second data that the target second terminal can receive is determined as its own memory capacity. For the other second terminals besides 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 prepared to receive does not exceed the memory reserve 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.

18. A data transmission apparatus, wherein, include: The server is configured to respond to a data scheduling request sent by the first terminal, determine a first data scheduling plan for the first terminal based on 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 send it to the first terminal; the terminal information includes information of each terminal within the coverage area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and the amount of second data that each second terminal can receive; the first terminal is a terminal within the coverage area of ​​the gateway signal waiting to transfer data, and the second terminal is a terminal within the coverage area of ​​the gateway signal that is different from the first terminal; The first terminal is configured to receive the first data scheduling plan; Based on the amount of second data that each second terminal can receive, the data to be transferred, which has the first amount of data, is divided into multiple parts to obtain each part of sub-data; and each part of sub-data is sent to the second terminal respectively. The first terminal is also configured to initiate the data scheduling request to the server when it detects that it has been subjected to a physical attack. The response to the data scheduling request sent by the first terminal, based on 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 therein, determines the first data scheduling plan for the first terminal, specifically including: responding to the physical attack instruction indicated by the data scheduling request, and determining the first data scheduling plan 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; The physical attack command in response to the data scheduling request indicates that, based on the memory availability of each terminal in the terminal information and the first data volume of the data to be transferred carried in the data scheduling request, the first data scheduling plan is determined, specifically including: responding to the physical attack command in response to the data scheduling request, selecting terminals with memory availability greater than or equal to a second preset threshold from among the terminals to be used as second terminals waiting to receive the data to be transferred, based on the memory availability of each of the terminals in the terminal information; determining the data transmission duration of each of the second terminals based on the data transmission speed of each of the second terminals and the first data volume of the data to be transferred; ensuring that the data transmission duration of each of the second terminals is equal; determining whether the amount of data that the second terminal is prepared to receive exceeds its memory availability based on the data transmission speed and the data transmission duration of each of the second terminals; and determining that the amount of data that the second terminal is prepared to receive is the second data volume of the data to be transferred that it can receive, in the case that the amount of data that the second terminal is prepared to receive does not exceed its memory availability.

19. A data transmission apparatus, wherein, include: The first processing module is configured to respond to a data scheduling request and determine a 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 area of ​​the gateway signal. The first data scheduling plan includes information about each second terminal and the amount of second data that each second terminal can receive; the second terminal is a terminal within the coverage area of ​​the gateway signal that is different from the first terminal; the first terminal is a terminal within the coverage area of ​​the gateway signal that sends a data scheduling request. The second processing module is configured to divide the data to be transferred, which has the first data volume, into multiple parts according to the second data volume that each second terminal can receive, to obtain each part of sub-data. The sending module is configured to send each of the sub-data pieces to the second terminal respectively; The response to the data scheduling request determines a first data scheduling plan based on the first data volume of the data to be transferred and the terminal information received from the server. Specifically, it includes: when detecting that it is under external attack, responding to the data scheduling request initiated by itself indicating that it is under physical attack, obtaining the terminal information from the server, and determining the first data scheduling plan based on the memory remaining of each terminal in the terminal information and the first data volume of the data to be transferred. The process of responding to a data scheduling request initiated by itself indicating a physical attack involves obtaining terminal information from the server and determining the first data scheduling plan based on the memory availability of each terminal and the first data volume of the data to be transferred. Specifically, this includes: responding to a data scheduling request initiated by itself indicating a physical attack, obtaining terminal information from the server, and selecting terminals with memory availability greater than or equal to a second preset threshold from among the terminals to be used as second terminals waiting to receive the data to be transferred; determining the data transmission duration of each second terminal based on its data transmission speed and the first data volume of the data to be transferred; ensuring that the data transmission durations of each second terminal are equal; determining whether the amount of data a second terminal is prepared to receive exceeds its memory availability based on its data transmission speed and data transmission duration; and determining that the amount of data a second terminal is prepared to receive is the second data volume of the data to be transferred that it can receive, provided that the amount of data a second terminal is prepared to receive does not exceed its memory availability.

20. A computer device, wherein, include: The computer device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the data transmission method as described in any one of claims 1 to 13, and / or, perform the steps of the data transmission method as described in any one of claims 14 to 17.

21. A computer-defined non-transient readable storage medium, wherein, The computer non-transient readable storage medium stores a computer program that, when executed by a processor, performs the steps of the data transmission method as described in any one of claims 1 to 13, and / or performs the steps of the data transmission method as described in any one of claims 14 to 17.