A node updating method and device

By deploying the node management list in the node management platform, the IoT device can automatically update its node list, solving the problem of data uploading caused by node failure, and realizing the automatic update of the device and the continuity of data uploading.

CN114285745BActive Publication Date: 2025-01-21SHANGHAI MOLIAN INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111585065.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-22
Publication Date
2025-01-21
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

When existing IoT devices fail nodes or network problems, they cannot update node information in time, resulting in a large number of devices being unable to complete data on the link.

Method used

A node management list is deployed in the node management platform to maintain user-available node information. The IoT device updates its node list through this list. Even if some nodes fail, data can be uploaded to the chain.

Benefits of technology

It realizes the automatic node list update of IoT devices, avoids the need for manual updates, greatly saves labor costs, and ensures the continuity of data uploading.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114285745B_ABST
    Figure CN114285745B_ABST
Patent Text Reader

Abstract

This invention provides a node update method and apparatus. The node update method is applied to an IoT device and a node management platform, including: obtaining the number of available nodes in the node list of the IoT device; determining whether the number of available nodes in the node list is less than a preset value; when the number of available nodes in the node list is less than the preset value, the IoT device sends a node request instruction to the node management platform; receiving available node information maintained in the node management list from the node management platform; and updating the node list based on the received available node information. This invention, by deploying a node management list for maintaining available node information in the node management platform, allows the IoT device to update the valid node list through this node management list, enabling the data uploading process to the blockchain even when some nodes fail.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things technology, and in particular to a node updating method and device. Background Art

[0002] Blockchain can provide a credible decentralized ledger for IoT device data and realize credible data value. Existing IoT devices are basically pre-set with existing node information to complete the chain action. After the deployment of IoT devices is completed, data can be uploaded to the chain without manual operation.

[0003] IoT devices are numerous and widely distributed. Once the pre-installed nodes fail or the network has problems, the corresponding node information cannot be updated to the device in time after the new node is deployed, causing a large number of IoT devices to be unable to complete data chain upload and the corresponding ledger information is missing in the on-chain ledger. Summary of the invention

[0004] The object of the present invention is to provide a node updating method, apparatus, device and medium, thereby overcoming one or more problems caused by limitations and defects of related technologies at least to a certain extent.

[0005] To achieve the above objectives and other related objectives, the present invention provides a node update method, which is applied to an Internet of Things device and a node management platform.

[0006] The node management platform is deployed with a node management list that maintains user-available node information, and the IoT device stores the node list;

[0007] The node updating method comprises:

[0008] Determine whether the number of available nodes in the node list is less than a preset value;

[0009] When the number of available nodes in the node list is less than a preset value, the Internet of Things device sends a node request instruction to the node management platform;

[0010] Receiving available node information maintained in the node management list issued by the node management platform;

[0011] The node list is updated according to the available node information maintained in the node management list.

[0012] In one embodiment of the present invention, the available node information in the node management list is updated through an operation interface of the node list.

[0013] In one embodiment of the present invention, the Internet of Things device uses the nodes in the node list to make an uplink request. When the uplink request fails, the nodes in the node list that failed the uplink request are deleted, and a step of determining whether the number of available nodes in the node list is less than a preset value is triggered.

[0014] In one embodiment of the present invention, the Internet of Things device uses the nodes in the node list one by one in reverse order to make an uplink request. When the uplink request fails, the node in the node list that failed the uplink request is deleted, and a step of determining whether the number of available nodes in the node list is less than a preset value is triggered.

[0015] In one embodiment of the present invention, when the uplink request is successful, the node in the node list whose uplink request is successful is moved to the front of the node list.

[0016] In one embodiment of the present invention, the node information includes remote call port information of the node.

[0017] In one embodiment of the present invention, receiving the available node information maintained in the node management list issued by the node management platform includes receiving part or all of the available node information maintained in the node management list issued by the node management platform.

[0018] In one embodiment of the present invention, it is determined whether the number of available nodes in the node list of the Internet of Things device is less than a preset value, and the preset value is 2.

[0019] In one embodiment of the present invention, the node list uses a first-in-first-out queue data structure to store node information, and the Internet of Things device POPs out a node from the node information queue of the node list to make an uplink request. When the uplink request returns successfully, the node is PUSHed into the node information queue of the node list. When the uplink request fails to be sent back, a step is triggered to determine whether the number of available nodes in the node list is less than a preset value.

[0020] To achieve the above-mentioned purpose and other related purposes, the present invention also provides another node update method, which is applied to an Internet of Things device and a node management platform, wherein a node management list for maintaining user available node information is deployed in the node management platform, and the Internet of Things device stores a node list;

[0021] The node updating method comprises:

[0022] The Internet of Things device sends a node request instruction to the node management platform at a preset time interval;

[0023] Receiving available node information maintained in the node management list issued by the node management platform;

[0024] The node list is updated according to the available node information maintained in the node management list.

[0025] To achieve the above-mentioned purpose and other related purposes, the present invention also provides a node updating device, which is applied to an Internet of Things device and a node management platform, wherein a node management list for maintaining user available node information is deployed in the node management platform, and the Internet of Things device stores a node list;

[0026] The node updating device comprises:

[0027] A node number acquisition module, used for the Internet of Things device to obtain the number of available nodes in the node list;

[0028] A determination module, used to determine whether the number of available nodes in the node list is less than a preset value;

[0029] A sending module, configured to cause the IoT device to send a node request instruction to the node management platform when a preset time interval is met or when the number of available nodes in the node list of the IoT device is less than a preset value;

[0030] A receiving module, used to receive the available node information maintained in the node management list issued by the node management platform;

[0031] An updating module is used to update the node list according to the available node information maintained in the node management list.

[0032] The node update method, device, equipment and medium of the present invention are used to maintain the user's available node information by deploying a node management list in a node management platform. The Internet of Things device updates the valid node list through the node management list. Even if some nodes fail, the data chain process can still be completed.

[0033] The node updating method, device, equipment and medium of the present invention can automatically update the node list of all related Internet of Things devices without the need for manual updating one by one, thus greatly saving labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A framework diagram of a node update system for an Internet of Things device of the present invention is shown.

[0035] Figure 2 A flow chart of a node updating method of an Internet of Things device of the present invention is shown.

[0036] Figure 3 A functional module diagram of a node updating device for an Internet of Things device of the present invention is shown.

[0037] Figure 4 A structural schematic diagram of an electronic device for implementing a node update method for an Internet of Things device according to the present invention is shown. DETAILED DESCRIPTION

[0038] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.

[0039] See also Figure 1-4 It should be noted that the illustrations provided in this embodiment are only used to schematically illustrate the basic concept of the present invention, and the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0040] Figure 1 The framework diagram of a node update system of an Internet of Things device of the present invention is shown. The node update system of the Internet of Things device includes a node management platform, several Internet of Things devices (device 1, device 2, ..., device m) and several nodes (node ​​1, node 2, ..., node n). In order to realize the node update of the Internet of Things device, it is necessary to deploy a node management list in the node management platform, and the node management list is used to maintain the user's available node information. The user can update the available node information in the node management list through the operation interface of the node management platform. The node information includes the node's remote procedure call port (RPCPort, Remote Procedure CallPort), URI (Uniform Resource Identifier), User Datagram Protocol (UDP, User Datagram Protocol) port number, Transmission Control Protocol (TCP, TransmissionControl Protocol) port number and other information. The Internet of Things device is connected to the node management platform for communication, and the user can update and maintain the available node information in the node management list through the operation interface of the node management platform. Each of the Internet of Things devices can obtain the latest available node information from the node management platform to update the node list stored by itself, and select available nodes from the node list for data chaining. As an example, the node refers to a node in a blockchain network (such as an Ethereum network).

[0041] When a user finds that an existing node in the node management list is invalid (e.g., due to arrears, damage, or network problems) and needs to delete the node, or when a new node needs to be added after deployment, the user can update the node information in the node management list through the operation interface of the node management platform. As an example, the node management platform can be accessed from a personal computer, mobile phone, tablet computer, notebook, etc.

[0042] by Figure 1 The following example shows the process of synchronizing node information in the node management list. When the user finds that node 3 is invalid ( Figure 1 The user can update the node information in the node management list through the operation interface of the node management platform and delete the node information of node 3 ( Figure 1 Grayscale is used to represent the deletion operation of node 3 information).

[0043] Figure 2 A flow chart of a node update method for an IoT device is shown. The node update method is applied to an IoT device and a node management platform, wherein a node management list for maintaining user available node information is deployed in the node management platform, and the IoT device stores a node list. The IoT device is a terminal device that has a network (e.g., cellular, WiFi, Bluetooth, Zigbee, LoRa, etc.) access function, can collect and process information on objects, and supports data communication.

[0044] like Figure 2 As shown, the node updating method includes:

[0045] Step S10, obtaining the number of available nodes in the node list of the Internet of Things device;

[0046] Step S20, determining whether the number of available nodes in the node list of the Internet of Things device is less than a preset value;

[0047] Step S30: When the number of available nodes in the node list of the IoT device is less than a preset value, the IoT device sends a node request instruction to the node management platform;

[0048] Step S40: receiving available node information maintained in the node management list issued by the node management platform;

[0049] Step S50: Update the node list in the Internet of Things device according to the available node information maintained in the node management list.

[0050] In step S10, each IoT device stores a node list including n node information. The node list may, for example, use a common storage format to store node information or use a first-in-first-out (FIFO) queue (FirstIn First Out) data structure to store node information.

[0051] The node list may, for example, use a first-in-first-out (FIFO) queue data structure to store node information. When the IoT device uploads data to the chain, it pops a node from the node information queue of the node list to make an upload request. If the upload request is returned successfully, the node is pushed into the node information queue of the node list again. If the upload request fails to be sent back, the information of a node is popped out from the node information queue of the node list again to make an upload request, and triggers the step of determining whether the number of available nodes in the node list is less than a preset value (step S20).

[0052] The node list may, for example, store node information in a common storage format and may be arranged in order of writing time. Each time data is uploaded to the chain, the nodes in the node list are used one by one in reverse order (i.e., starting from the last node in the node list) to make an upload request. When the upload request fails, the node in the node list that fails the upload request is deleted, and a step of determining whether the number of available nodes in the node list is less than a preset value is triggered (step S20); when the upload request is successful, the node in the node list that succeeds the upload request is moved to the front of the node list. That is to say, in the process of uplinking data, if the uplink request through a certain node is successful, the node information of the successful uplink request is moved to the front of the node list, and the Internet of Things device uses the node with the successful uplink request to communicate; if the uplink request through a certain node fails, the node with the failed uplink request is deleted from the node list. When the node with the failed uplink request from the node list is deleted, the number of available nodes in the node list is reduced, which may cause node resources in the node list to be tight. Therefore, the Internet of Things device can obtain the number of currently available nodes in the node list stored in itself, and determine in step S20 whether the number of available nodes in the node list of the Internet of Things device is less than the preset value.

[0053] In some embodiments, when the node list can store node information in a general storage form, for example, each time data is uploaded to the chain, a node in the node list can be randomly used to make an upload request. When the upload request fails, the node in the node list that failed the upload request is deleted, and a node is randomly selected from the node list to make an upload request, and the step of determining whether the number of available nodes in the node list is less than a preset value is triggered (step S20).

[0054] In step S20, the preset value may be configured according to actual needs. As an example, the preset value may be 2.

[0055] In step S30, when the number of available nodes in the node list of the Internet of Things device is greater than or equal to a preset value, the Internet of Things device will continue to use the remaining nodes in the node list one by one in reverse order to make an uplink request when uplinking data. When the uplink request fails, the node in the node list that failed the uplink request is deleted, and it is necessary to re-trigger to obtain the number of available nodes in the node list and determine whether the number of available nodes in the node list is less than the preset value. When the number of available nodes in the node list is less than the preset value, the Internet of Things device sends a node request instruction to the node management platform; and when the uplink request is successful, the node in the node list that successfully uploaded the request is moved to the front of the node list, and the Internet of Things device uses the node that successfully uploaded the request to communicate.

[0056] In step S40 and step S50, when the node management platform receives a node request instruction sent by an IoT device, the node management platform will issue the available node information maintained in the node management list to the IoT device; the IoT device receives the available node information maintained in the node management list issued by the node management platform, and updates the node list in the IoT device according to the available node information maintained in the node management list received.

[0057] It should be noted that after receiving the node request instruction sent by the Internet of Things device, the node management platform can send part or all of the available node information maintained in the node management list to the Internet of Things device. In other words, the Internet of Things device can receive part or all of the available node information maintained in the node management list sent by the node management platform each time, and update the node list in the Internet of Things device according to the available node information maintained in the node management list received.

[0058] When the node list stores node information in a common storage format, a specific embodiment of the process of automatically updating available node information when the IoT device uploads data to the chain is as follows:

[0059] (1) When the IoT device uploads data to the chain, each time the data is uploaded to the chain, a node in the node list is randomly used to make an upload request. When the upload request fails, the node in the node list that failed the upload request is deleted, and a node is randomly selected from the node list to make an upload request.

[0060] (2) When the number of elements in the node information queue of the node list (that is, the number of available nodes in the node list) is less than a certain threshold (that is, a preset value), the IoT device triggers a request for node information from the node management platform. Specifically, the IoT device organizes a message to request node information from the node management platform.

[0061] (3) The node management platform responds to the instruction requesting node information and sends all (or part of) the available node information in the current node management list to the IoT device.

[0062] (4) The IoT device updates the node information list.

[0063] When the IoT device uses a first-in-first-out (FIFO) data structure to store node information, a specific embodiment of the IoT device automatically updating available node information when uploading data to the chain is as follows:

[0064] (1) When the IoT device uploads data to the chain, it first pops out the information of a node from the node information queue of the node list to make an upload request. If the upload request returns successfully, the information of the node is pushed into the node information queue of the node list again. If the upload request fails to be sent back, the information of the next node is popped out from the node information queue of the node list to make an upload request again.

[0065] (2) When the number of elements in the node information queue of the node list (that is, the number of available nodes in the node list) is less than a certain threshold (that is, a preset value), the IoT device triggers a request for node information from the node management platform. Specifically, the IoT device organizes a message to request node information from the node management platform.

[0066] (3) The node management platform responds to the instruction requesting node information and sends all (or part of) the available node information in the current node management list to the IoT device.

[0067] (4) The IoT device updates the node information list.

[0068] It should be noted that, in addition to triggering the node update process of the IoT device by judging whether the number of available nodes in the node list of the IoT device is less than the preset value, the IoT device can also obtain the available node information maintained in the node management list from the node management platform in the blockchain at a preset time interval (which can be set according to actual needs), and update the node list in the IoT device according to the available node information maintained in the node management list received. Specifically, when the IoT device is updating the node, the IoT device sends a node request instruction to the node management platform at a preset time interval; when the node management platform receives the node request instruction sent by the IoT device, the node management platform will send the available node information maintained in the node management list to the IoT device; the IoT device receives the available node information maintained in the node management list issued by the node management platform, and updates the node list according to the available node information maintained in the node management list received.

[0069] The node update method of the present invention deploys a node management list in a node management platform to maintain the user's available node information. The IoT device updates the valid node list through the node management list. Even if some nodes fail, the data chain process can still be completed. With the node update method of the present invention, all relevant IoT devices can automatically update the node list without the need for manual updating one by one, which greatly saves labor costs.

[0070] It should be noted that the step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.

[0071] like Figure 3 , which is a functional module diagram of a preferred embodiment of the node updating device of the present invention. The node updating device comprises: a node number acquisition module 10, a determination module 20, a sending module 30, a receiving module 40 and an updating module 50. The module referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and can complete fixed functions, which are stored in the memory 12.

[0072] The node number acquisition module 10 is used for the Internet of Things device to obtain the number of available nodes in the node list; the determination module 20 is used to determine whether the number of available nodes in the node list of the Internet of Things device is less than a preset value; the sending module 30 is used for the Internet of Things device to send a node request instruction to the node management platform in the blockchain when the number of available nodes in the node list of the Internet of Things device is less than a preset value; the receiving module 40 is used to receive the available node information maintained in the node management list issued by the node management platform; the updating module 50 is used to update the node list in the Internet of Things device according to the available node information maintained in the node management list received.

[0073] It should be noted that the node update device of this embodiment is a device corresponding to the node update method described above, and the functional modules in the node update device may correspond to the corresponding steps in the node update method. The node update device of this embodiment can be implemented in conjunction with the node update method. Accordingly, the relevant technical details mentioned in the node update method of this embodiment can also be applied to the node update device described above, and in order to reduce repetition, they will not be repeated here.

[0074] like Figure 4 FIG. 1 is a schematic diagram of the structure of an electronic device of a preferred embodiment of the node updating method of the present invention.

[0075] The electronic device 1 may include a memory 12 , a processor 13 , and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13 , such as a node update program.

[0076] The memory 12 includes at least one type of readable storage medium, including flash memory, mobile hard disk, multimedia card, card-type memory (eg SD or DX memory, etc.), magnetic memory, disk, optical disk, etc.

[0077] The processor 13 executes the operating system of the electronic device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned node updating method embodiments, for example Figure 3 Steps shown.

[0078] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into a node number acquisition module 10, a determination module 20, a sending module 30, a receiving module 40 and an update module 50.

[0079] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0080] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0081] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A node update method, applied to an Internet of Things device, characterized in that: The IoT device stores a node list, the node list includes node information, the node is a blockchain node, and the IoT device can use the node in the node list to make a chain request to achieve data chaining; The node updating method comprises: Get the number of available nodes in the node list of the IoT device; Determine whether the number of available nodes in the node list is less than a preset value; When the number of available nodes in the node list is less than a preset value, the IoT device sends a node request instruction to a node management platform, where a node management list maintaining user available node information is deployed; Receiving available node information maintained in the node management list issued by the node management platform; Update the node list according to the available node information maintained in the node management list; Among them, when the user finds that an existing node in the node management list is invalid and needs to be deleted, or when a new node needs to be added after deploying a new node, the user can update and maintain the available node information in the node management list through the operation interface of the node management platform.

2. The node updating method according to claim 1, characterized in that: The IoT device uses the nodes in the node list one by one in reverse order to make an uplink request. When the uplink request fails, the node in the node list whose uplink request fails is deleted, and a step of determining whether the number of available nodes in the node list is less than a preset value is triggered.

3. The node updating method according to claim 2, characterized in that: When the uplink request is successful, the node whose uplink request is successful in the node list is moved to the front of the node list.

4. The node updating method according to claim 1, characterized in that: The node information includes the remote call port information of the node.

5. The node updating method according to claim 1, characterized in that: Receiving the available node information maintained in the node management list issued by the node management platform includes receiving part or all of the available node information maintained in the node management list issued by the node management platform.

6. The node updating method according to claim 1, characterized in that: The node list uses a first-in-first-out queue data structure to store node information. The IoT device POPs out a node from the node information queue of the node list to make an uplink request. When the uplink request returns successfully, the node is PUSHed into the node information queue of the node list. When the uplink request fails to be sent back, a step of determining whether the number of available nodes in the node list is less than a preset value is triggered.

7. A node update method, applied to an Internet of Things device, characterized in that: The IoT device stores a node list, the node list includes node information, the node is a blockchain node, and the IoT device can use the node in the node list to make a chain request to achieve data chaining; The node updating method comprises: Sending a node request instruction to a node management platform at a preset time interval, wherein the node management platform is deployed with a node management list that maintains user available node information; Receiving available node information maintained in the node management list issued by the node management platform; Update the node list according to the available node information maintained in the node management list; Among them, when the user finds that an existing node in the node management list is invalid and needs to be deleted, or when a new node needs to be added after deploying a new node, the user can update and maintain the available node information in the node management list through the operation interface of the node management platform.

8. A node updating device, characterized in that: Applied to an Internet of Things device, characterized in that the Internet of Things device stores a node list, the node list includes node information, the node is a blockchain node, and the Internet of Things device can use the node in the node list to make a chain request to realize data chaining; The node updating device comprises: A node number acquisition module is used to obtain the number of available nodes in the node list; A determination module, used to determine whether the number of available nodes in the node list is less than a preset value; A sending module, configured to send a node request instruction to a node management platform when a preset time interval is met or when the number of available nodes in the node list of the IoT device is less than a preset value, wherein the node management platform is deployed with a node management list that maintains user available node information; A receiving module, used to receive the available node information maintained in the node management list issued by the node management platform; An updating module, configured to update the node list according to the available node information maintained in the node management list; Among them, when the user finds that an existing node in the node management list is invalid and needs to be deleted, or when a new node needs to be added after deploying a new node, the user can update and maintain the available node information in the node management list through the operation interface of the node management platform.

Citation Information

Patent Citations

  • Acquisition method and device for service node

    CN108055157A

  • Block chain consensus calculation method and device, computer equipment and storage medium

    CN112102078A

  • Method for sensing blockchain node by blockchain Internet of Things equipment

    CN112738246A

  • Smart home data chaining method and system of Internet of Things on block chain

    CN113076315A