Distributed information management system and method based on Internet of Things
By hashing and integrity verification of data packets in the Internet of Things system, the problem of low data transmission efficiency is solved, and the same data is avoided and repeated transmission is improved.
Patent Information
- Application Number
- CN202510251390.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-05-13
AI Technical Summary
Data transmission efficiency in the Internet of Things is low, especially when the receiver makes multiple data requests in succession, the sender needs to respond to each data request, affecting the overall channel transmission efficiency.
By hashing the data packets on the server side, a list of data packets and hash values is established, and integrity verification is performed after the requesting terminal receives the data packet. If the data packet has been successfully transmitted, the server can detect and avoid repeated transmissions by comparing the hash value list.
It effectively avoids repeated transmission of the same data, reduces unnecessary data transmission, improves channel transmission efficiency, and reduces network load and server processing pressure.
Smart Images

Figure CN119996333A_ABST
Abstract
Description
Technical Field
[0001] This solution belongs to the field of Internet of Things, and specifically relates to a distributed information management system and method based on the Internet of Things. Background Art
[0002] The Internet of Things (IoT) is an important part of the new generation of information technology and an important development stage in the "informatization" era. In network file transfer protocols (such as FTP, HTTP, etc.), data can be transmitted from the server to the client in the form of blocks. The sender divides the file into several data blocks. After receiving the data blocks, the receiver verifies the integrity of the data blocks. After the verification, it sends a request to send the next data block to the sender based on the verification result, or resends the request to send the data block. After receiving the request, the sender sends the next data block to the receiver according to the content of the request. Although this process improves the reliability of data transmission, the transmission efficiency is low.
[0003] In order to solve the problem of low efficiency in the transmission process, Chinese patent CN109936588A proposes an IoT data transmission method, in which a terminal device (receiver) sends the number N of continuously receivable data packets and the time interval T between two continuous data packets to a server (sender); the server continuously sends N data packets to the terminal device, wherein the N data packets include at least one resource-constrained application layer protocol data packet that does not require confirmation, and the time interval between two consecutive data packets in the N data packets is the time interval T.
[0004] In an IoT data transmission method disclosed in Chinese patent CN109936588A, the sender does not need to wait for the receiver's sending request. The sender only needs to send the data packet to the receiver at an interval T, which reduces the time the sender waits for receiving response information (i.e., feedback information on whether the data packet has received complete information), thereby improving transmission efficiency.
[0005] However, in the above process, the receiver needs to check and verify the data packet after each data request, and then respond to the verification status of the data packet one by one. That is, if the receiver makes multiple data requests in succession, after the sender completes the sending of the data packet (one data request corresponds to one data packet combination, and multiple data requests may correspond to several data packet combinations), the receiver needs to send the sender a response message for each data request (including feedback information that the data packet has been successfully received and incompletely received), and multiple response messages need to be fed back. The sender needs to check the response messages one by one and resend the incomplete data packets according to the content of the response messages.
[0006] In the above process, when the receiver makes multiple consecutive data requests, the sender needs to respond to each data request, which affects the overall channel transmission efficiency and leads to the problem of insufficient data transmission efficiency. Summary of the invention
[0007] The purpose of this solution is to provide a distributed information management system and method based on the Internet of Things to solve the problem of low efficiency of data transmission in the Internet of Things.
[0008] In order to achieve the above purpose, this solution provides a distributed information management system based on the Internet of Things, including a request terminal and a server. The request terminal is used to send a first data request A to the server; The server is used to include a first module, receiving a first data request A and putting it into the first module, the first module assigning a data identifier to the first data corresponding to the first data request A, then dividing the first data into a plurality of data packets, performing a hash operation on each data packet to obtain a hash value, and then establishing a list A of each data packet and its corresponding hash value; generating a sequence number according to the total number of data packets corresponding to the first data, and then adding the data identifier and the sequence number of the divided data packet to each data packet, determining whether the first data request B sent by the requesting terminal is received again, if the first data request B received again is the same as the first data request A, then writing the tail identifier into the last data packet and sending it to the requesting terminal; if they are different, then putting the first data request B into the first module to establish the list B; Generate a sequence number according to the total number of data packets corresponding to the first data, and then add a data identifier and a sequence number for dividing the data packets to each data packet. If the first request C sent by the request terminal is not received within a preset time, compare whether the hash value in list B exists in the same data packet in list A. If the same hash value exists, read the sequence number of the data packet H and record it as sequence number K as a data index, then write the tail identifier into the last data packet and send it to the request terminal; if not, write the tail identifier into the last data packet and send it to the request terminal; The request terminal is also used to receive and merge data packets with the same data identifier. After receiving a data packet without a tail identifier, the request terminal does not need to send a reception response to the server. After receiving the data packet, the request terminal performs an integrity check on the data packet. If an incomplete data packet exists, the sequence number of the incomplete data packet is obtained, and a status report is generated as a reception response and sent to the server.
[0009] And a distributed information management method based on the Internet of Things using a distributed information management system based on the Internet of Things.
[0010] The principle and technical effect of this scheme are as follows: First, when the server receives the same data request as before again, it will detect whether there is the same data packet by comparing the hash value list. If there is the same hash value, it means that the data packet has been successfully transmitted and does not need to be sent again. This can effectively avoid repeated transmission of the same data, reduce unnecessary data transmission, and improve the transmission efficiency of the channel. In addition, when processing data requests, the server will assign a data identifier to each data request, and process and transmit it in an orderly manner according to the sequence number of the data packet. The requesting terminal receives and merges the data packets in the order of the sequence number. This orderly data processing method reduces the disorderly transmission and repeated processing of the data packets, and further improves the efficiency of data transmission. At the same time, the requesting terminal does not need to send a receiving response to the server after receiving a data packet without a tail identifier, which reduces invalid communication interactions, reduces network load and server processing pressure, and makes the data transmission process more efficient.
[0011] Secondly, the server performs a hash operation on each data packet, obtains the hash value corresponding to each data packet, and establishes a corresponding list of data packets and hash values. After receiving the data packet, the requesting terminal performs an integrity check on the data packet. If the data packet is incomplete, the requesting terminal will record the sequence number of the incomplete data packet and generate a status report to send to the server so that the server can perform corresponding processing, such as retransmitting the data packet, etc., thereby improving the reliability of data transmission. At the same time, when the server receives the same data request as before again, it will compare the newly generated hash value list with the previous list to detect whether there is a data packet with the same hash value. If there is an identical hash value, it means that the data packet has been successfully transmitted and does not need to be sent repeatedly, avoiding redundant data transmission and potential error accumulation, and further improving the reliability of data transmission.
[0012] In summary, this solution solves the problem of low efficiency of data transmission in the Internet of Things.
[0013] Furthermore, when the requesting terminal performs an integrity check on the data packet, if there is a data packet with sequence number K, it accesses data packet H with a unique sequence number that is the same as its hash value, and replaces the data packet with sequence number K with data packet H; the data identifier and sequence number of the incomplete data packet are recorded, and after the requesting terminal receives the data packet with a tail identifier, it obtains the sequence number of the incomplete data packet according to the data identifier and generates a status report as a reception response and sends it to the server.
[0014] By comparing the hash value of the data packet with the hash value in the list, it is possible to accurately determine whether the data packet is damaged or lost during transmission, thereby ensuring the integrity of the data.
[0015] Furthermore, the server is also used to establish a data index table for the first data corresponding to the first data request A after receiving the first data request A sent by the request terminal, the data index table containing information such as a data identifier, a data packet sequence number, and a hash value. When the first data request B sent by the request terminal is received again, the data index table is first queried to determine whether there is the same data identifier and data packet sequence number as the first data request B. If so, the corresponding data packet and its hash value are directly obtained from the data index table without the need to perform data packet division and hash operation again, and the tail identifier is written into the last data packet and sent to the request terminal; the server is also used to, after allocating a data identifier for the first data corresponding to the first data request A, associate the data identifier with the identification information of the request terminal and store it. When the first data request B sent by the request terminal is received again, the corresponding data packet and its hash value list A of the first data request A are quickly matched according to the associated stored data identifier and the identification information of the request terminal. If the match is successful and the first data request B is the same as the first data request A, the tail identifier is directly written into the last data packet and sent to the request terminal without the need to perform data packet division and hash operation again.
[0016] When the first data request B sent by the requesting terminal is received again, the server can quickly match the corresponding first data request A's data packet and its hash value list A based on the associated stored data identifier and the identification information of the requesting terminal, without having to re-retrieve or traverse a large amount of data, thereby greatly reducing the time for data retrieval and improving data retrieval efficiency. In addition, through the associated storage of data identifiers, repeated storage and transmission of data can be effectively avoided. When the requesting terminal requests the same data again, the server can directly provide the data packet corresponding to the stored data identifier, without having to generate, store and transmit the data again, reducing data redundancy and further improving the utilization of storage and transmission resources.
[0017] The data index table contains information such as data identification, data packet sequence number, hash value, etc. When the first data request B sent by the request terminal is received again, the server can directly query the data index table to quickly locate the data packet and its hash value corresponding to the same data identification and data packet sequence number as request B, avoiding the time-consuming process of traversing and searching in a large amount of data, and significantly improving the efficiency of data retrieval. At the same time, in the Internet of Things, devices may frequently request the same data. Through the data index table, the server can quickly determine whether there is the same data identification and data packet sequence number as request B, thereby avoiding repeated retrieval and transmission of the same data, reducing data redundancy, and further improving the accuracy and efficiency of data retrieval.
[0018] Furthermore, when the server divides the first data corresponding to the first data request A into several data packets, it dynamically adjusts the size of the data packet according to the size and type of the first data, so that the size of each data packet is within a preset range. When dividing the data packets, it ensures that the starting position and the ending position of each data packet are aligned with the logical boundaries of the data to avoid incomplete data due to the segmentation of the data packets. When the server performs a hash operation on each data packet, it adopts a segmented hash algorithm to divide the data packet into multiple sub-segments, performs a hash operation on each sub-segment separately to obtain a hash value of each sub-segment, and then combines the hash values of all sub-segments to obtain a final data packet hash value.
[0019] This method can dynamically adjust the size of the data packet so that the size of each data packet is within the preset range, which can avoid transmission delays caused by data packets that are too large and increased transmission overhead caused by data packets that are too small, thereby reducing the total time for data transmission; at the same time, by ensuring that the starting and ending positions of each data packet are aligned with the logical boundaries of the data, the incompleteness of the data caused by the segmentation of the data packet is avoided, thereby reducing the time for data packet reassembly and improving the efficiency of data transmission. In addition, this scheme adopts a segmented hash algorithm to divide the data packet into multiple sub-segments, perform hash operations on each sub-segment separately, and then combine the hash values of all sub-segments to obtain the final data packet hash value. This method can decompose complex hash operations into multiple smaller sub-tasks, reduce the complexity of a single hash operation, and thus reduce the overhead of data processing.
[0020] Furthermore, when the server divides the first data corresponding to the first data request B into several data packets, it adopts a data packet size adaptive algorithm to adjust the size of the data packet in real time according to the network bandwidth, transmission delay and data transmission rate, so that the size of the data packet matches the current network environment. When the server performs a hash operation on each data packet, it adopts a multi-level hash algorithm to first perform a preliminary hash operation on the data packet to obtain a preliminary hash value, and then perform further hash operations based on the preliminary hash value and characteristic information of the data packet to obtain the final data packet hash value.
[0021] The packet size adaptive algorithm adjusts the size of the packet in real time according to the network bandwidth, transmission delay and data transmission rate, so that the size of the packet matches the current network environment. When the network bandwidth is large and the transmission delay is low, the size of the packet can be increased to reduce the total number of packets transmitted and the transmission time; when the network bandwidth is small or the transmission delay is high, the size of the packet can be reduced to reduce the risk of packet loss and the number of retransmissions, thereby improving the efficiency of data transmission. In addition, the multi-level hash algorithm first performs a preliminary hash operation on the packet to obtain a preliminary hash value, and then performs further hash operations based on the preliminary hash value and the characteristic information of the packet to obtain the final packet hash value. This hierarchical hash operation method can decompose complex hash operations into multiple smaller subtasks, reducing the complexity of a single hash operation, and increasing the speed of the hash operation, thereby reducing the overhead of data processing.
[0022] Further, when the requesting terminal sends a first data request to the server, the requesting terminal sends a first data request to the first server, and the requesting terminal compares the completeness of the data packets sent by the server and the first server. If the completeness is different, a suspension sending application is sent to the server with the lower completeness; if the completeness is the same, a suspension sending application is sent to the server with a later receiving time.
[0023] When the requesting terminal finds that the data packets sent by the server and the first server have different degrees of completeness or different reception times, it sends a suspension request to the server with lower completeness or later reception time, which can avoid repeatedly receiving the same data packet from the server, thereby reducing redundant data transmission and improving data transmission efficiency.
[0024] Furthermore, the request terminal stores a communication list of several other request terminals. When the request terminal is used to send a first data request to the server, if the data packet sent by the server is not received within a preset time, then an assistance request is sent to some request terminals according to the stored list of other request terminals; the request terminal is also used to receive an assistance request, and after receiving the assistance request, obtain the current unfinished work tasks and task load, calculate the workload after accepting the assistance request according to the unfinished work tasks, the workload of the assistance request and the current task load, and if the workload after accepting the assistance request exceeds the preset maximum load, the assistance request is ignored; if the workload after accepting the assistance request does not exceed the preset maximum load, the acceptance of the assistance request is sent to the corresponding request terminal as a reception response of the assistance request; after sending the assistance request, the request terminal selects the request terminal corresponding to the reception response with the earliest end time from the received reception responses as the assistance terminal, and sends a data request to the assistance terminal; after sending the assistance request, if the request terminal does not receive a reception response within a preset time, then the assistance request is sent to some request terminals in the communication list that have not received the assistance request.
[0025] When the requesting terminal sends a request for assistance, it sends the assistance request to some requesting terminals in the communication list, rather than to all requesting terminals in the communication list, which alleviates network congestion and provides space for more data requests and transmissions. In addition, the requesting terminal sends the assistance request to other requesting terminals, rather than directly sending the first data request. This method can protect the security of the first data and select the requesting terminal with the fastest response (most suitable) from multiple requesting terminals that may exist.
[0026] Furthermore, the request terminal stores the device level and task level of each different request terminal. When receiving an assistance request, the request terminal sets a delay time for sending and accepting the assistance request based on the total difference between the device level of the assistance request and the local device level and the difference between the task level of the assistance request and the task level of the current work task, and combines the difference with a preset reply time.
[0027] By setting the delay time for sending and receiving assistance requests based on the difference between the device level and the task level combined with the preset reply time, the requesting terminal can effectively avoid responding immediately to multiple consecutive data requests in a short period of time. This intelligent delay mechanism allows the requesting terminal to reasonably arrange the response time according to its own processing capacity and current workload, avoiding the immediate processing of each request under high load or low priority conditions, thereby reducing unnecessary channel occupation and improving the overall channel transmission efficiency. In addition, by setting the delay time, the requesting terminal can give priority to those more urgent or important data requests, and appropriately delay the response to some requests that can be processed later. This ensures that channel resources are used more effectively, and data that has a greater impact on system operation and user experience is transmitted first, further improving the efficiency of data transmission and the overall performance of the system. Secondly, through intelligent delayed response, the requesting terminal can avoid accepting too many assistance requests under high load, thereby preventing itself from being overloaded. Furthermore, through the device and task level division and delay setting mechanism, this solution can adapt to mixed scenarios of requesting terminals with different performance and task types. When two devices both accept assistance requests, the requesting terminal with a larger task gap and device level gap responds more slowly. Therefore, the requesting terminal with a smaller task gap and device level gap is more likely to be selected as the assisting terminal, allowing high-end devices to focus on complex tasks and low-end devices to undertake simple auxiliary work. Each can play to its own strengths, reduce terminal freezes, freezes and other failures caused by mismatched task allocation, enhance the overall stability of the system, and be more at ease in the face of complex and changing data request environments.
[0028] Further, the assisting terminal can be used to send a data packet to the requesting terminal. If the same data request sent by the requesting terminal is received successively, a delayed assistance request is sent to the requesting terminal, and the data packet is temporarily stored in a buffer area. When the requesting terminal receives the delayed assistance request, the network congestion level is obtained. If the network congestion level is higher than a preset congestion value, a recovery assistance request is sent to the assisting terminal when the network congestion level is reduced to the preset congestion value. If the network congestion level is not higher than the preset congestion value, a preset assistance waiting time is counted down, and a recovery assistance request is sent to the assisting terminal at the end of the countdown, and the preset time is counted down. If the data packet sent by the assisting terminal is not received after the countdown, a recovery assistance request is sent to the assisting terminal again, and the preset time is counted down again. If the data packet sent by the assisting terminal is not received after the countdown, an assistance request is sent to some requesting terminals in the communication list that have not received the assistance request. When the assisting terminal receives the recovery assistance request, the data packet in the buffer area is sent to the requesting terminal. If the assisting terminal receives the same recovery assistance request sent by the requesting terminal successively, the data packet in the buffer area is deleted.
[0029] After receiving the delay assistance request, the requesting terminal will decide the subsequent action according to the degree of network congestion. If the network congestion is high, it will wait until the congestion is relieved before sending the recovery assistance request; if the congestion is not high, the data packet will be obtained in an orderly manner through mechanisms such as countdown. This flexible processing method based on the actual network situation avoids forcibly transmitting data when the network is not good, causing problems such as data backlog and transmission jams, and helps to maintain a relatively stable and efficient transmission rhythm, further improving data transmission efficiency. In addition, the mechanism of assisting the terminal to temporarily store data packets and send them according to rules enables data resources to be transmitted at the right time, avoiding waste of resources. For example, it avoids occupying too many channel resources due to repeated transmission of the same data. At the same time, the requesting terminal decides when to obtain the data packet according to the network situation, and also ensures that its own processing resources can better process the received data, realizing the optimal utilization of network resources, terminal processing resources and other resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a schematic diagram of the structure of each request terminal and server in the embodiment of the present application.
[0031] Figure 2 This is a flowchart of requesting a terminal and a server in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will clearly and completely describe the concept and technical effects of the present invention in combination with the embodiments, so as to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by those skilled in the art without creative work are all within the scope of protection of the present invention: A distributed information management system based on the Internet of Things, including terminals and servers.
[0033] The request terminal is used to send a first data request A to the server; The server is used to receive a first data request A, assign a data identifier to the first data corresponding to the first data request A, then divide the first data corresponding to the first data request A into several data packets, and perform a hash operation on each data packet to obtain a hash value corresponding to each data packet, and then establish a list A of each data packet and its corresponding hash value; generate a sequence number according to the total number of data packets corresponding to the first data, and then add the data identifier and the sequence number of the divided data packet to each data packet, and then determine whether the first data request B sent by the requesting terminal is received again. If the first data request B received again is the same as the first data request A, the tail identifier is written into the last data packet and sent to the requesting terminal.
[0034] If the first data request B received again is different from the first data request A, a data identifier is assigned to the first data corresponding to the first data request B, the first data corresponding to the first data request B is divided into several data packets, and each data packet is hashed again to obtain a hash value corresponding to each data packet, and then a list B of each data packet and its corresponding hash value is established.
[0035] A serial number is generated according to the total number of data packets corresponding to the first data, and then a data identifier and a serial number for dividing the data packets are added to each data packet. If the first request C sent by the requesting terminal is not received within a preset time (set by the administrator), the hash value in list B is compared to see whether it exists in the same data packet in list A. If the same hash value exists, the serial number of the data packet H is read and recorded as serial number K as a data index, and then the tail identifier is written into the last data packet and sent to the requesting terminal; if the same hash value does not exist, the tail identifier is directly written into the last data packet and sent to the requesting terminal.
[0036] The request terminal is also used to perform a verification reception operation, which includes: receiving and merging data packets with the same data identifier. After the request terminal receives a data packet without a tail identifier, it does not need to send a reception response to the server. After receiving the data packet, the request terminal performs an integrity check on the data packet. If there is a data packet with sequence number K, access data packet H with a unique sequence number that is the same as its hash value, and replace the data packet with sequence number K with data packet H; record the data identifier and sequence number of the incomplete data packet. After receiving the data packet with a tail identifier, the request terminal obtains the sequence number of the incomplete data packet according to the data identifier and generates a status report as a reception response and sends it to the server.
[0037] Among them, the server is also used to, after assigning a data identifier to the first data corresponding to the first data request A, associate and store the data identifier with the identification information of the requesting terminal. When the first data request B sent by the requesting terminal is received again, the server quickly matches the corresponding data packet of the first data request A and its hash value list A according to the associated stored data identifier and the identification information of the requesting terminal. If the match is successful and the first data request B is the same as the first data request A, the tail identifier is directly written into the last data packet and sent to the requesting terminal without the need to perform data packet division and hash operation again.
[0038] Among them, the server is also used to establish a data index table for the first data corresponding to the first data request A after receiving the first data request A sent by the request terminal. The data index table contains information such as data identification, data packet sequence number, hash value, etc. When the first data request B sent by the request terminal is received again, the data index table is first queried to determine whether there is the same data identification and data packet sequence number as the first data request B. If so, the corresponding data packet and its hash value are directly obtained from the data index table without the need to perform data packet division and hash operation again. The tail identification is written into the last data packet and sent to the request terminal.
[0039] Among them, when the server divides the first data corresponding to the first data request A into several data packets, it dynamically adjusts the size of the data packet according to the size and type of the first data, so that the size of each data packet is within a preset range (set by the administrator according to the network bandwidth). When dividing the data packets, it ensures that the starting position and the ending position of each data packet are aligned with the logical boundary of the data to avoid incomplete data caused by the segmentation of the data packet. When the server performs a hash operation on each data packet, it adopts a segmented hash algorithm to divide the data packet into multiple sub-segments, and performs a hash operation on each sub-segment separately to obtain the hash value of each sub-segment, and then combines the hash values of all sub-segments to obtain the final data packet hash value.
[0040] Among them, when the server divides the first data corresponding to the first data request B into several data packets, it adopts a data packet size adaptive algorithm to adjust the size of the data packet in real time according to the network bandwidth, transmission delay and data transmission rate, so that the size of the data packet matches the current network environment. When the server performs a hash operation on each data packet, it adopts a multi-level hash algorithm to first perform a preliminary hash operation on the data packet to obtain a preliminary hash value, and then perform further hash operations based on the preliminary hash value and the characteristic information of the data packet to obtain the final data packet hash value.
[0041] Among them, when the requesting terminal sends a first data request to the server, the first data request is sent to the first server, and the requesting terminal compares the completeness of the data packets sent by the server and the first server. If the completeness is different, a suspension sending application is sent to the server with a lower completeness; if the completeness is the same, a suspension sending application is sent to the server with a later receiving time.
[0042] Among them, a communication list of several other requesting terminals is stored in the requesting terminal. When the requesting terminal is used to send a first data request to the server, if the data packet sent by the server is not received within a preset time, then an assistance request is sent to some requesting terminals according to the stored list of other requesting terminals; the requesting terminal is also used to receive the assistance request, and after receiving the assistance request, obtain the current unfinished work tasks and task load, calculate the workload after accepting the assistance request according to the unfinished work tasks, the workload of the assistance request and the current task load, if the workload after accepting the assistance request exceeds the preset maximum load (set by the administrator according to the processing capacity of the requesting terminal), the assistance request is ignored; if the workload after accepting the assistance request does not exceed the preset maximum load, the acceptance of the assistance request is sent to the corresponding requesting terminal as a receiving response of the assistance request; after sending the assistance request, the requesting terminal selects the requesting terminal corresponding to the receiving response with the earliest end time from the received receiving responses as the assistance terminal, and sends a data request to the assistance terminal; after sending the assistance request, if the requesting terminal does not receive a receiving response within a preset time, then the assistance request is sent to some requesting terminals in the communication list that have not received the assistance request.
[0043] Among them, the requesting terminal stores the equipment level and task level of each different requesting terminal. When receiving an assistance request, the requesting terminal sets the delay time for sending and accepting the assistance request based on the total difference between the difference between the equipment level of the assistance request and the local equipment level and the difference between the task level of the assistance request and the task level of the current work task, and combines the difference with a preset response time (set by the administrator, which can be adjusted according to the network delay or set according to the task level of the first data request).
[0044] Among them, when the assisting terminal can be used to send a data packet to the requesting terminal, if the same data request sent by the requesting terminal is received successively, a delayed assistance request is sent to the requesting terminal, and the data packet is temporarily stored in the buffer area; when the requesting terminal receives the delayed assistance request, the network congestion level is obtained. If the network congestion level is higher than a preset congestion value (set by the administrator according to the network situation), a recovery assistance request is sent to the assisting terminal when the network congestion level is reduced to the preset congestion value; if the network congestion level is not higher than the preset congestion value, a preset assistance waiting time (set by the administrator, which can be adjusted according to the delay situation of the network, or according to the first data request) is counted down. The task level setting requested is set), at the end of the countdown, a recovery assistance request is sent to the assisting terminal, and a preset time is counted down. If no data packet sent by the assisting terminal is received after the countdown, a recovery assistance request is sent to the assisting terminal again, and the preset time is counted down again. If no data packet sent by the assisting terminal is received after the countdown, assistance requests are sent to some requesting terminals in the communication list that have not received assistance requests. When the assisting terminal receives the recovery assistance request, it sends the data packet in the buffer area to the requesting terminal. If the assisting terminal receives the same recovery assistance request sent by the requesting terminal one after another, the data packet in the buffer area is deleted.
[0045] This embodiment also provides a distributed information management method based on the Internet of Things using a distributed information management system based on the Internet of Things.
[0046] When implementing like Figure 1 As shown, the smart light bulb, smart curtain controller and smart oven are used as request terminals, and the smart light bulb, smart curtain controller and smart oven are respectively connected to the two servers for communication.
[0047] The smart bulb detects that there is a new lighting mode algorithm update and needs to send a first data request A to the server to obtain upgrade data that can achieve various lighting effects such as "party mode" and "reading mode".
[0048] After receiving the request, the server assigns a unique data identifier to the lighting upgrade data, such as "LIGHTING_UPGRADE_001". Considering that smart bulbs may be distributed in different rooms and the network conditions may vary, the server divides the data into multiple data packets based on their size and type, using a strategy to dynamically adjust the size of the data packet. For each data packet, the segmented hash algorithm is used to subdivide the data packet into sub-segments, hash them separately, and combine them to obtain a hash value. A list A of data packets and hash values is established, and a serial number is generated at the same time, and a data identifier and serial number are added to each data packet.
[0049] Due to a brief network interruption, the smart light bulb did not receive the data packet in time and resent the first data request B. The server determines that B is the same as A, and directly writes the tail identifier into the last data packet and sends it to the smart light bulb, avoiding repeated data packet division and hash operations, saving resources. If B is different from A, such as a new data request for a special color lighting adjustment algorithm, the server reallocates the identifier "LIGHTING_UPGRADE_002" and repeats the data packet processing process to generate list B. If no new request C is received within the preset time, compare list B and A to find the same hash value data packet. If there is one, mark the serial number K as the data index and send it, otherwise send it directly.
[0050] The smart bulb receives data packets, merges data packets with the same identifier, does not respond to packets without a tail identifier, and verifies the integrity after receiving. If a data packet with sequence number K is encountered, the corresponding unique sequence number data packet H is found based on the hash value and replaced. When a data packet with a tail identifier is received, the incomplete packet sequence number is recorded according to the data identifier, and a status report is generated and fed back to the server.
[0051] The smart curtain controller sends a first data request A to the server, hoping to update the motor drive algorithm to achieve more accurate opening and closing control, and also sends this request to the first server. The server receives and processes it as before, generating a data packet, etc. The smart curtain compares the integrity of the data packets received from the two servers. If the integrity of the data packet from the first server is low, it sends a suspension request to it and focuses on receiving the data packet from the main server.
[0052] Due to the high load of the main server, the smart curtain did not receive the data packet within the preset time. Based on the stored communication list of smart window sensors, smart air purifiers, etc., it sent assistance requests to some terminals. If the smart window sensor receives the request, it evaluates its own task load of monitoring outdoor light and temperature, and combines the amount of assistance tasks of the curtain. If the load after acceptance does not exceed the preset maximum load (set according to its own processing capacity), it will respond to acceptance. The smart curtain selects the smart window sensor that ends the earliest as the assistance terminal to send data requests.
[0053] When the assisting terminal sends a data packet, if the smart curtains repeat the request multiple times, the assisting terminal sends a delayed assistance request and caches the data packet. The smart curtains receive the delayed request, check the network congestion, and send a recovery assistance request after the preset congestion value is reduced; if it does not exceed the preset congestion value, it will count down the assistance waiting time, and if the packet is not received, it will repeatedly urge multiple times. If it still fails, it will ask for help from the terminal that has not been asked for help. The assisting terminal receives the recovery request and sends a cached packet. If it receives the same recovery request multiple times, it will delete the cached packet The smart oven sends the first data request A to the server to obtain new baking recipes and temperature control program update data. After the server processes, if there are idle resources in the smart microwave ovens and smart rice cookers around the smart oven, the smart oven can calculate the delay time for receiving the assistance request based on their equipment level and task level. For example, if the level of the smart microwave oven is close to that of the oven and the task is simple, the delay is short; if the level of the smart rice cooker is low and it is cooking rice, the delay is long.
[0054] If the network fluctuates and the smart oven fails to receive the server packet on time, it will ask for help from the surrounding appliances. When it receives a response, it will select the assisting terminal to send a data request. When receiving the data packet, it will check and record the incomplete packet information. When there is a tail identification packet, it will generate a status report. At the same time, the server will create an index table for data A. When the smart oven resends similar request B later, it will directly retrieve the data packet and hash value if there is a match in the query table, avoiding repeated processing, ensuring efficient collaboration of smart kitchen appliances and bringing users a convenient smart cooking experience.
[0055] The above is only an embodiment of the present invention, and the common knowledge such as the known specific structure and characteristics in the scheme is not described in detail here. It should be pointed out that for those skilled in the art, several deformations and improvements can be made without departing from the structure of the present invention, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A distributed information management system based on the Internet of Things, including a terminal and a server, characterized in that: The request terminal is used to send a first data request A to the server; The server is used to include a first module, receiving a first data request A and putting it into the first module, the first module assigning a data identifier to the first data corresponding to the first data request A, dividing the first data into a plurality of data packets, performing a hash operation on each data packet to obtain a hash value, and then establishing a list A of each data packet and its corresponding hash value; generating a sequence number according to the total number of data packets corresponding to the first data, adding the data identifier and the sequence number of the divided data packet to each data packet, and then determining whether the first data request B sent by the requesting terminal is received again, and if the first data request B received again is the same as the first data request A, writing the tail identifier into the last data packet and sending it to the requesting terminal; If they are different, the first data request B is put into the first module to establish list B; Generate a sequence number according to the total number of data packets corresponding to the first data, and then add a data identifier and a sequence number for dividing the data packets to each data packet. If the first request C sent by the request terminal is not received within a preset time, compare whether the hash value in list B exists in the same data packet in list A. If the same hash value exists, read the sequence number of the data packet H and record it as sequence number K as a data index, then write the tail identifier into the last data packet and send it to the request terminal; if not, write the tail identifier into the last data packet and send it to the request terminal; The request terminal is also used to receive and merge data packets with the same data identifier. After receiving a data packet without a tail identifier, the request terminal does not need to send a reception response to the server. After receiving the data packet, the request terminal performs an integrity check on the data packet. If an incomplete data packet exists, the sequence number of the incomplete data packet is obtained, and a status report is generated as a reception response and sent to the server.
2. The distributed information management system based on the Internet of Things according to claim 1 is characterized in that: When the request terminal performs integrity check on the data packet, if there is a data packet with sequence number K, it accesses data packet H with the same unique sequence number as its hash value, and replaces the data packet with sequence number K with data packet H; records the data identifier and sequence number of the incomplete data packet, and after the request terminal receives the data packet with a tail identifier, obtains the sequence number of the incomplete data packet according to the data identifier, generates a status report as a reception response and sends it to the server.
3. The distributed information management system based on the Internet of Things according to claim 1 is characterized in that: The server is also used to, after allocating a data identifier for the first data corresponding to the first data request A, associate and store the data identifier with the identification information of the requesting terminal, and when receiving the first data request B sent by the requesting terminal again, quickly match the corresponding data packet of the first data request A and its hash value list A according to the associated stored data identifier and the identification information of the requesting terminal, and if the match is successful and the first data request B is the same as the first data request A, directly write the tail identifier into the last data packet and send it to the requesting terminal without performing data packet division and hash operation again; The server is also used to establish a data index table for the first data corresponding to the first data request A after receiving the first data request A sent by the requesting terminal. The data index table includes information such as data identification, data packet sequence number, hash value, etc. When the server receives the first data request B sent by the requesting terminal again, it first queries the data index table to determine whether there is the same data identification and data packet sequence number as the first data request B. If so, the corresponding data packet and its hash value are directly obtained from the data index table without the need to perform data packet division and hash operation again. The tail identification is written into the last data packet and sent to the requesting terminal.
4. The distributed information management system based on the Internet of Things according to claim 2 or claim 3, characterized in that: When the server divides the first data corresponding to the first data request A into several data packets, it dynamically adjusts the size of the data packet according to the size and type of the first data, so that the size of each data packet is within a preset range. When dividing the data packets, it ensures that the starting position and the ending position of each data packet are aligned with the logical boundary of the data to avoid incomplete data caused by the segmentation of the data packet. When the server performs a hash operation on each data packet, it adopts a segmented hash algorithm to divide the data packet into multiple sub-segments, performs a hash operation on each sub-segment separately to obtain a hash value of each sub-segment, and then combines the hash values of all sub-segments to obtain a final data packet hash value.
5. The distributed information management system based on the Internet of Things according to claim 2 or claim 3, characterized in that: When the server divides the first data corresponding to the first data request B into several data packets, it adopts a data packet size adaptive algorithm to adjust the size of the data packet in real time according to the network bandwidth, transmission delay and data transmission rate, so that the size of the data packet matches the current network environment. When the server performs a hash operation on each data packet, it adopts a multi-level hash algorithm to first perform a preliminary hash operation on the data packet to obtain a preliminary hash value, and then perform further hash operations based on the preliminary hash value and characteristic information of the data packet to obtain the final data packet hash value.
6. The distributed information management system based on the Internet of Things according to claim 4 or claim 5, characterized in that: When the request terminal sends a first data request to the server, the request terminal sends the first data request to the first server. The request terminal compares the completeness of the data packets sent by the server and the first server. If the completeness is different, a suspension sending application is sent to the server with the lower completeness; if the completeness is the same, a suspension sending application is sent to the server with a later receiving time.
7. The distributed information management system based on the Internet of Things according to claim 6 is characterized in that: The requesting terminal stores a communication list of several other requesting terminals. When the requesting terminal sends a first data request to the server, if the requesting terminal does not receive a data packet sent by the server within a preset time, the requesting terminal sends an assistance request to some of the requesting terminals according to the stored list of other requesting terminals. The request terminal is further used to receive the assistance request, and after receiving the assistance request, obtain the current unfinished work tasks and task load, calculate the workload after accepting the assistance request according to the unfinished work tasks, the workload of the assistance request and the current task load, and if the workload after accepting the assistance request exceeds the preset maximum load, ignore the assistance request; if the workload after accepting the assistance request does not exceed the preset maximum load, send the acceptance of the assistance request as a reception response of the assistance request to the corresponding request terminal; After sending the assistance request, the requesting terminal selects the requesting terminal corresponding to the receiving response with the earliest end time from the received receiving responses as the assisting terminal, and sends a data request to the assisting terminal; after sending the assistance request, if the requesting terminal does not receive a receiving response within a preset time, the assistance request is sent to some requesting terminals in the communication list that have not received the assistance request.
8. The distributed information management system based on the Internet of Things according to claim 7 is characterized in that: The request terminal stores the device level and task level of each different request terminal. When receiving an assistance request, the request terminal sets a delay time for sending and accepting the assistance request based on the total difference between the device level of the assistance request and the local device level and the difference between the task level of the assistance request and the task level of the current work task, and combines the difference with a preset reply time.
9. The distributed information management system based on the Internet of Things according to claim 8, characterized in that: The assisting terminal can be used to send a data packet to the requesting terminal, and if the same data request sent by the requesting terminal is received successively, a delayed assistance request is sent to the requesting terminal to temporarily store the data packet in a buffer area; When the requesting terminal receives the delayed assistance request, it obtains the network congestion level, and if the network congestion level is higher than a preset congestion value, it sends a recovery assistance request to the assisting terminal when the network congestion level decreases to the preset congestion value; If the network congestion level is not higher than the preset congestion value, the preset assistance waiting time is counted down, and at the end of the countdown, a recovery assistance request is sent to the assisting terminal, and the preset time is counted down. If no data packet is received from the assisting terminal after the countdown, the recovery assistance request is sent to the assisting terminal again, and the preset time is counted down again. If no data packet is received from the assisting terminal after the countdown, an assistance request is sent to some requesting terminals in the communication list that have not received the assistance request; When the assisting terminal receives the recovery assistance request, it sends the data packets in the buffer area to the requesting terminal. If the assisting terminal receives the same recovery assistance request sent by the requesting terminal successively, it deletes the data packets in the buffer area.
10. A distributed information management method based on the Internet of Things, characterized in that: The distributed information management system based on the Internet of Things described in any one of claims 1 to 9 is used.
Citation Information
Patent Citations
Internet of things data transmission method, device and system
CN109936588A