Search

CN-121547440-B - Self-adaptive node addressing method and system suitable for multi-node intelligent equipment system

CN121547440BCN 121547440 BCN121547440 BCN 121547440BCN-121547440-B

Abstract

The invention belongs to the technical field of intelligent monitoring, and provides a self-adaptive node addressing method and a self-adaptive node addressing system suitable for a multi-node intelligent equipment system, wherein the technical scheme is that an addressing instruction is received, and a search starting address range is obtained; the method comprises the steps of taking a search starting address range and the maximum effective equipment number as inputs, adaptively calculating to obtain fuzzy dividing factors for dividing the search range and fine scanning granularity for fine searching under the constraint of the available stack memory, initializing an address stack, pushing the search starting address range into the address stack, and circularly executing the steps of sending a search instruction of a popped stack top address range, dynamically matching corresponding branch processing modes according to the received response condition until the address stack is empty, so as to obtain the addressing result of each node. The system deployment speed is improved, the communication overhead is reduced, and the stability in a complex environment is enhanced.

Inventors

  • WU XIN
  • JIANG LIMENG
  • LI BO
  • SUN RUI

Assignees

  • 山东华天科技集团股份有限公司

Dates

Publication Date
20260508
Application Date
20260122

Claims (8)

  1. 1. The self-adaptive node addressing method suitable for the multi-node intelligent equipment system is characterized by comprising the following steps of: Receiving an addressing instruction, and acquiring a search starting address range; Taking a search starting address range and the maximum effective equipment number as inputs, and under the constraint of the available stack memory size, adaptively calculating to obtain a fuzzy dividing factor for dividing the search range and a fine scanning granularity for fine searching, wherein the adaptive calculating process comprises the following steps: Defining an address space length according to the search starting address range; Based on available stack memory size Defining a stack depth; searching the fine sweep granularity meeting the optimal termination condition within the preset fine sweep granularity range Factor of divide and conquer Wherein the optimal termination condition is such that the total instruction overhead Minimum, and N and G need to satisfy the constraint: Wherein the final output fine-scan granularity G is the minimum G value meeting the constraint, and the divide-and-conquer factor N is the minimum meeting the constraint Values expressed as: , Is an integer of the number of the times, In the formula (I), in the formula (II), In order to blur the number of scans, , The maximum effective equipment number is L, the address space length is L, and the stack depth is D; Initializing an address stack, pushing a search starting address range into the address stack, and circularly executing the steps of sending a search instruction of a popped stack top address range, dynamically matching corresponding branch processing modes according to a received response condition until the address stack is empty, and obtaining an addressing result of each node, wherein the step of dynamically matching the corresponding branch processing modes according to the received response condition comprises the following steps: if the response is not received, judging that no effective node exists in the range, and continuing the next cycle; if the response is received and the verification is correct, entering a single-point confirmation mode, sending a confirmation instruction to the corresponding address, and registering the address after the confirmation is successful; if the response is received but the verification is wrong, further judging, if the length of the current range is not more than the fine scanning granularity G, entering a sequential inquiry confirmation mode, sequentially inquiring single addresses in the range, and otherwise, carrying out N-component stacking processing on the current addressing range according to a component control factor N.
  2. 2. The adaptive node addressing method suitable for a multi-node smart device system according to claim 1, wherein after entering the single-point acknowledgement mode, the method specifically comprises: and sending a single address confirmation instruction to the response equipment to wait for response, wherein if the response is returned to match, address registration and duplication removal are carried out, the node address with valid confirmation and the registered address are compared in duplication removal mode, the node address is stored in a registered address queue, data persistence storage is carried out after searching is completed, and if the node address is not matched or overtime, the next cycle is returned to be continued.
  3. 3. The method for adaptive node addressing for a multi-node smart device system of claim 1, wherein entering a sequential query validation mode sequentially queries for individual addresses within the range, comprising: if the matching response is received, address registration and duplication removal are carried out, and after duplication removal comparison is carried out on the node address confirmed to be effective and the registered address, the node address is stored in a registered address queue; if the matching response is not received, the address is self-increased, and the search is continued; And when the current address exceeds the fine-scanning granularity range, entering a fuzzy range checking mode.
  4. 4. The adaptive node addressing method for a multi-node smart device system of claim 3, comprising, after entering a fuzzy range investigation mode: sending an exclusion query instruction to the remaining global address range; If the response is received, pushing the corresponding residual address range into an address stack, and returning to the range searching step based on divide and conquer; if the response is not received, the addressing is judged to be completed, the data persistence storage is executed, and the multi-node intelligent equipment system is reset to enter a conventional monitoring state.
  5. 5. The method of adaptive node addressing for a multi-node smart device system of claim 1 further comprising the incremental node addition step of receiving a manually entered single or multiple newly added node addresses after the system completes initial addressing and enters a normal operational state, directly adding them to a registered address queue and updating the persistence data without triggering a full range re-addressing.
  6. 6. An adaptive node addressing system for a multi-node smart device system, comprising: the addressing triggering module is used for receiving an addressing instruction and acquiring a searching starting address range; The self-adaptive parameter calculation unit is used for taking a search starting address range and the maximum effective equipment number as inputs, and self-adaptively calculating to obtain a fuzzy dividing factor for dividing the search range and a fine scanning granularity for fine searching under the constraint of the available stack memory size, wherein the self-adaptive parameter calculation process comprises the following steps of: Defining an address space length according to the search starting address range; Based on available stack memory size Defining a stack depth; searching the fine sweep granularity meeting the optimal termination condition within the preset fine sweep granularity range Factor of divide and conquer Wherein the optimal termination condition is such that the total instruction overhead Minimum, and N and G need to satisfy the constraint: Wherein the final output fine-scan granularity G is the minimum G value meeting the constraint, and the divide-and-conquer factor N is the minimum meeting the constraint Values expressed as: , Is an integer of the number of the times, In the formula (I), in the formula (II), In order to blur the number of scans, , The maximum effective equipment number is L, the address space length is L, and the stack depth is D; The node addressing module is used for initializing an address stack, pushing a search starting address range into the address stack, and circularly executing the steps of sending a search instruction of a popped stack top address range, dynamically matching corresponding branch processing modes according to a received response condition until the address stack is empty, and obtaining an addressing result of each node, wherein the step of dynamically matching the corresponding branch processing modes according to the received response condition comprises the following steps: if the response is not received, judging that no effective node exists in the range, and continuing the next cycle; if the response is received and the verification is correct, entering a single-point confirmation mode, sending a confirmation instruction to the corresponding address, and registering the address after the confirmation is successful; if the response is received but the verification is wrong, further judging, if the length of the current range is not more than the fine scanning granularity G, entering a sequential inquiry confirmation mode, sequentially inquiring single addresses in the range, and otherwise, carrying out N-component stacking processing on the current addressing range according to a component control factor N.
  7. 7. A computer readable storage medium, having stored thereon a computer program, which when executed by a processor performs the steps of the adaptive node addressing method of any of claims 1-5, adapted to a multi-node smart device system.
  8. 8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of claims 1-5 in an adaptive node addressing method suitable for a multi-node smart device system.

Description

Self-adaptive node addressing method and system suitable for multi-node intelligent equipment system Technical Field The invention belongs to the technical field of intelligent monitoring, and particularly relates to a self-adaptive node addressing method and system suitable for a multi-node intelligent equipment system. Background The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art. In the field of intelligent equipment monitoring, along with popularization and development of the internet of things technology, the number of integrated terminal nodes in a system is increased, and distribution is also wider. In order to realize effective management, status monitoring and data collection of mass nodes, the system must be able to accurately and efficiently identify and locate each node in the network, i.e. complete node addressing. This process is the basic premise for the system to establish communication connection and to perform all subsequent monitoring and management operations. At present, common node address identification modes mainly comprise the following categories: Firstly, manually copying and manually inputting, namely, when the system is deployed or maintained, relying on operation and maintenance personnel to check and record the physical addresses or the identifications of the nodes one by one on site, and then manually inputting the physical addresses or the identifications to a central management system. The method has extremely low implementation efficiency and high labor cost, is extremely easy to cause input errors due to human negligence, and is difficult to trace back and correct. In addition, it is completely unable to accommodate the rapid deployment and dynamic expansion requirements of large-scale, distributed nodes. Second, a full-range traversal query, the system sends a query instruction to each possible address, starting from the starting address, in a known address space, in strict order, and waits for a response to confirm whether a valid node exists at that address. This approach, while capable of ensuring coverage of all nodes in theory, requires a large number of invalid communication attempts, the addressing time being proportional to the address space size. In the scene of large address space and sparse actual nodes, the communication overhead is huge, the overall addressing speed is slow, and the efficiency of system initialization or network recovery is seriously affected. Third, simple segment checking, as an improvement on full-range traversal, the method divides the whole address space into a plurality of intervals with fixed size, and then traverses the inquiry according to the intervals. Although helping to organize the query process to some extent, its segmentation strategy tends to be static or empirical, lacking dynamic optimization mechanisms, there are still a large number of invalid queries, which are particularly problematic in complex, unstable or resource-constrained field environments. Disclosure of Invention In order to solve at least one technical problem in the background art, the invention provides a self-adaptive node addressing method and a self-adaptive node addressing system suitable for a multi-node intelligent equipment system, which improve the system deployment speed, reduce the communication overhead and enhance the stability under a complex environment. In order to achieve the above purpose, the present invention adopts the following technical scheme: A first aspect of the present invention provides an adaptive node addressing method suitable for a multi-node smart device system, comprising the steps of: Receiving an addressing instruction, and acquiring a search starting address range; Taking a search starting address range and the maximum effective equipment number as inputs, and under the constraint of the available stack memory size, adaptively calculating to obtain a fuzzy dividing factor for dividing the search range and a fine scanning granularity for fine searching; Initializing an address stack, pushing a search starting address range into the address stack, and circularly executing the steps of sending a query instruction of the popped stack top address range, dynamically matching corresponding branch processing modes according to the received response condition until the address stack is empty, so as to obtain an addressing result of each node. Further, the adaptive computing process includes the steps of: Defining an address space length according to the search starting address range; Based on available stack memory size Defining a stack depth; searching the fine sweep granularity meeting the optimal termination condition within the preset fine sweep granularity range Factor of divide and conquerWherein the optimal termination condition is such that the total instruction overheadMinimum, and N and G need to satisfy the constraint: Wher