Dynamic management method for multi-sensor equipment

Through the dynamic management method of multi-sensor equipment, the problem of system restart when sensor equipment is updated is solved, efficient and flexible management of the equipment network is realized, and continuous data acquisition and system stability are ensured.

CN119292684APending Publication Date: 2025-01-10ZHENGZHOU HENGDA INTELLIGENT CONTROL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411414013.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the intelligent integrated coal mining working surface, the existing system needs to restart the entire system when the sensor equipment is updated, resulting in low work efficiency and waste of resources, and unnecessary service overload affects the normal operation of other unrelated devices.

Method used

Using the dynamic management method of multi-sensor equipment, the device information is added or deleted through the application layer, and sent to the topology management layer for checksum storage. The device management module loads or releases the device driver step by step to ensure the consistency and accuracy of the device information and avoid Unnecessary system restart.

Benefits of technology

It realizes that the operation of other equipment and services will not be interrupted when the equipment changes dynamically, improves the flexibility and efficiency of the system, and ensures continuous data acquisition and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119292684A_ABST
    Figure CN119292684A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-sensor equipment dynamic management method, which comprises the following steps that: step 1, an application layer adds or deletes equipment information and sends the equipment information to a topology management layer; 2, the topology management layer receives and stores the equipment information, verifies the equipment information and removes invalid equipment information; 3, the equipment management module obtains the updated equipment information from the topology management layer and stores the updated equipment information; step 4, the device management module loads the base device driver based on the stored effective device information, and loads the sub-device drivers step by step based on the base device information; 5, the equipment management module determines newly-added equipment information and deleted equipment information by comparing with old equipment information; 6, for the deleted equipment information, firstly releasing the sub-equipment, and then releasing the equipment; 7, creating and loading equipment and sub-equipment thereof step by step for newly-added equipment information; and 8, after the equipment information is updated, the equipment management system recovers to a normal working state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of sensor management, and more specifically, to a method for dynamic management of multi-sensor devices. Background Art

[0002] In the intelligent comprehensive coal mining face (intelligent comprehensive mining), in order to achieve the production goals of informatization, digitization, automation, and unmanned operation, it is necessary to use various types of sensors (such as pressure, gas, dust, inclination, etc.) for real-time monitoring and data analysis. These sensors are usually deployed on the unit brackets or tunnel walls of coal mining equipment, and can communicate by wire or wireless means as needed. However, in the existing system, when the sensor equipment needs to be updated and configured (such as adding or deleting), it is usually necessary to restart the entire system or reload the service to realize the data acquisition of the newly added equipment or delete the invalid equipment. This practice not only affects work efficiency, but also leads to unnecessary waste of resources, especially in service scenarios that do not require reloading.

[0003] In view of the above situation, the present invention proposes a dynamic management method for multi-sensor devices, aiming to solve the service reloading problem caused by dynamic addition and deletion of devices, ensuring that the normal operation of other unrelated devices is not affected when the device is changed, thereby improving the stability and efficiency of the system. Summary of the invention

[0004] The purpose of this application is to provide a multi-sensor device dynamic management method to solve the problems in the prior art.

[0005] The multi-sensor device dynamic management method comprises the following steps:

[0006] Step 1: The application layer adds or deletes device information and sends it to the topology management layer; Step 2: The topology management layer receives and saves the device information, then verifies the device information and removes invalid device information; Step 3: The device management module obtains the updated device information from the topology management layer and stores it; Step 4: The device management module loads the base device driver based on the stored valid device information, and loads the sub-device driver step by step based on the base device information; Step 5: The device management module determines the newly added device information and deleted device information by comparing with the old device information; Step 6: For deleted device information, first release its sub-devices, and then release the device; Step 7: For newly added device information, create and load the device and its sub-devices step by step; Step 8: After completing the device information update, the device management system returns to normal working state.

[0007] Furthermore, the application layer adds or deletes device information and sends it to the topology management layer.

[0008] The user adds or deletes device information through the application interface;

[0009] The application layer receives the user's input command and confirms the change of device information;

[0010] The application layer converts device information into a standardized format to ensure that the information is complete and complies with predefined field requirements;

[0011] The device information at least includes the device identifier, device type, parent device identifier, and communication port information key fields;

[0012] The application layer sends standardized device information to the topology management layer through a predetermined communication interface.

[0013] Furthermore, the topology management layer receives and saves the device information, and then verifies the device information to remove invalid device information. The specific details are as follows:

[0014] The topology management layer receives device information change requests from the application layer;

[0015] Save the received device information to the database;

[0016] Check whether the link relationship in the device information is valid and ensure that there is a correct connection relationship between each device and its parent device;

[0017] Verify that the parent device mentioned in each device information exists in the system and ensure that there are no references to non-existent devices;

[0018] Verify that the device parameters comply with predefined standards and format requirements to ensure that the device parameters are correct.

[0019] Furthermore, the device management module obtains the updated device information from the topology management layer and stores it. The specific details are as follows:

[0020] The device management module requests the latest device information from the topology management layer periodically or after receiving a notification from the topology management layer;

[0021] After receiving the updated device information from the topology management layer, the device management module stores it in a local database or memory;

[0022] Perform consistency checks on device information before storage to ensure the integrity and accuracy of the information;

[0023] The device information includes at least the device identifier, device type, parent device identifier, and communication port information key fields;

[0024] Before storing the updated device information, the device management module backs up the currently stored device information so that it can be restored when needed; the backup process must ensure the integrity and security of the data;

[0025] After the device management module stores the updated device information, it sends a confirmation message to the topology management layer, indicating that the device information has been successfully stored;

[0026] If the storage fails, the device management module needs to retry the storage until it succeeds or prompt the topology management layer the reason for the storage failure.

[0027] Further, the device management module loads the base device driver based on the stored valid device information, and loads the sub-device drivers step by step based on the base device information. The specific details are as follows:

[0028] The device management module reads the latest valid device information from the storage to ensure that the information is up to date and has been verified;

[0029] The device management module creates a base device object and its corresponding driver according to the base device information in the device information;

[0030] The basic device information includes at least the device identifier, device type, and communication port information key fields;

[0031] The device management module loads its direct sub-device drivers based on the base device information:

[0032] Traverse all port information of the base device and load the sub-devices under each port;

[0033] For each child device, check its connection relationship to ensure that all parent devices are loaded;

[0034] Create a child device object and its corresponding driver;

[0035] If the sub-device itself can also serve as a parent device, continue to load the sub-devices under the sub-device until all devices at all levels are loaded;

[0036] For a sub-device with multiple parent devices, the sub-device will be loaded only after all its parent devices have been loaded;

[0037] If all parent devices of a child device have not been loaded, the loading of the child device is delayed until all parent devices are loaded;

[0038] The device management module verifies each device when it is loaded to ensure that the order in which the devices are loaded is correct;

[0039] If any abnormality is found during the loading process, the loading is stopped and the error information is recorded.

[0040] Furthermore, the device management module determines the newly added device information and deleted device information by comparing it with the old device information. The specific details are as follows:

[0041] The device management module reads the currently valid old device information from the local storage;

[0042] The device management module obtains the latest device information from the topology management layer;

[0043] Traverse the old device information list, for each old device information:

[0044] Check whether the device information exists in the new device information list;

[0045] If it exists, mark the device information as "unchanged" and remove the device information from the new device information list;

[0046] If it does not exist, the device information is marked as "deleted device information" and recorded;

[0047] After the traversal of the old device information is completed, the remaining new device information list is the "newly added device information";

[0048] Record the confirmed "deleted device information" and "added device information" for subsequent processing;

[0049] The device management module confirms the recorded change information and prepares for the next device release or load operation.

[0050] Furthermore, to delete device information, first release its sub-devices, and then release the device. For details:

[0051] The device management module obtains updated device information from the topology management layer and determines the device information that needs to be deleted;

[0052] Confirm that the device information contains the identifiers of the device to be deleted and its sub-devices;

[0053] For each device to be deleted, first check whether it has child devices;

[0054] If there are sub-devices, release them in sequence:

[0055] Get the identifier of the child device;

[0056] Call the device release logic DevMemFree, passing in the identifier of the child device and the corresponding communication port;

[0057] Recursively process the sub-devices of the sub-device until all sub-devices are completely released;

[0058] After all child devices are released, release the device to be deleted:

[0059] Get the identifier of the device to be deleted;

[0060] Call the device release logic DevMemFree, passing in the device identifier and the corresponding communication port;

[0061] Destroy the device object and its communication object, and release related resources;

[0062] After completing the release of the device and its sub-devices, the device management module sends a confirmation message to the topology management layer, indicating that the device information update has been completed.

[0063] Furthermore, for the newly added device information, create and load the device and its sub-devices step by step. The specific details are as follows:

[0064] The device management module obtains a list of newly added device information from the device information comparison result;

[0065] For the base device in the newly added device information, the device management module first creates a base device object;

[0066] When the base device object is created, its communication port information and related parameters are initialized;

[0067] The device management module loads the driver corresponding to the base device to ensure that the base device can communicate normally;

[0068] For sub-devices under the base device, the device management module creates sub-device objects and ensures that all parent devices are loaded;

[0069] Check whether all parent devices of the child device have been created. If all parent devices exist, create the child device object;

[0070] If there is an uncreated parent device, the child device will not be created until all parent devices are created;

[0071] For the successfully created child device, the device management module loads its corresponding driver and establishes a communication connection with the parent device;

[0072] If the child device itself is also a parent device, continue to recursively create the child devices and their drivers under it;

[0073] In the process of creating a sub-device and its driver, verify the validity of the sub-device information;

[0074] Ensure the information consistency of sub-devices and their sub-devices;

[0075] After the new device and its sub-devices are created and loaded, the device management module confirms that all the new devices have been loaded correctly;

[0076] If loading fails, log the error message and try to reload or notify the user.

[0077] Furthermore, after completing the equipment information update, the equipment management system resumes normal working status, the specific details are as follows:

[0078] The device management module confirms that all new and deleted device information processing has been completed, ensuring that all changes have been properly processed;

[0079] The device management module synchronizes the status of all loaded devices to normal working status, including but not limited to starting the data collection and upload functions of the devices;

[0080] Confirm that all equipment and services have returned to normal working order to ensure that data flow and service processes are not interrupted;

[0081] Record key operations and status changes during the device information update process to form a log file;

[0082] Feedback the status information of device information update completion to the application layer or other management components to confirm that the system has returned to normal working state.

[0083] The beneficial effects of the present application are as follows: Dynamic management capability: The present invention provides a method capable of dynamically managing multi-sensor devices, so that devices can be added or deleted in real time in the device network without affecting the normal operation of other devices. This means that the system can update devices without interrupting service, improving the flexibility and efficiency of the system.

[0084] Multi-level device information processing: The present invention pays special attention to the information change processing of multi-level devices (i.e., devices with parent-child relationships), ensuring that when the status of a device is modified, the status changes of its child devices and all related devices can be correctly handled, thereby avoiding unnecessary system restarts or service overloads.

[0085] Device information comparison mechanism: By comparing the old and new device information, the present invention can accurately identify which devices are added and which devices are deleted, and make corresponding device loading or releasing operations accordingly, thereby ensuring the consistency and accuracy of the system status.

[0086] Continuous data acquisition: Since the method of the present invention can maintain the continuous operation of other devices and services when the device changes dynamically, it can ensure the continuous acquisition of data throughout the process, which is particularly important for application scenarios that rely on real-time data. In general, the core technical effect of the present invention is to achieve efficient, flexible and seamless management of multi-sensor device networks, greatly improve the level of intelligent device management, and ensure the continuity and stability of system operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0087] In order to more clearly illustrate the technical solution of the embodiment of the present application, the following is a brief introduction to the drawings required for use in the embodiment:

[0088] Figure 1 The overall framework of the system involved in dynamic management of multi-sensor devices:

[0089] Figure 2 Load the device information verification flow chart for topology management;

[0090] Figure 3 This is the overall workflow diagram for this application;

[0091] Figure 4 This is a schematic diagram of the controller interface involved in this application. DETAILED DESCRIPTION

[0092] In order to make the technical purpose, technical solution and beneficial effects of the present application clearer, the technical solution of the present application is further described below in conjunction with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application, that is, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings are usually arranged and designed in various different configurations.

[0093] In a specific implementation, the present application discloses a multi-sensor device dynamic management method, including:

[0094] Step 1: The application layer adds or deletes device information and sends it to the topology management layer;

[0095] Step 1: The application layer adds or deletes device information and sends it to the topology management layer. Specific details:

[0096] Application layer operations:

[0097] Users add or delete device information through application interfaces (such as monitoring platforms, management software, etc.).

[0098] The application layer receives user input instructions and confirms changes in device information (including device ID, type, communication method, connection relationship, etc.).

[0099] Device information formatting:

[0100] The application layer converts device information into a standardized format (such as JSON), ensuring that the information is complete and complies with predefined field requirements.

[0101] The device information contains at least key fields such as device identifier, device type, parent device identifier (if applicable), and communication port information.

[0102] Information sent:

[0103] The application layer sends standardized device information to the topology management layer through a predetermined communication interface (such as API, message queue, etc.).

[0104] The security and integrity of data transmission must be ensured during the sending process, and encryption measures must be adopted when necessary.

[0105] Confirmation feedback:

[0106] The application layer waits for the confirmation information returned by the topology management layer, which indicates that the device information has been successfully received and saved.

[0107] If no confirmation information is received, the application layer should retry sending until successful or prompt the user why the operation failed.

[0108] Through the above steps, it is ensured that the operation of the application layer can accurately transmit the device information changes to the topology management layer, thereby triggering a series of dynamic management actions such as subsequent device information verification and loading. This not only ensures the timeliness of device information changes, but also maintains the overall coordination of the system.

[0109] Step 2: The topology management layer receives and saves the device information, then verifies the device information and removes invalid device information (for example, invalid link relationship, non-existent parent device, incorrect device parameters, etc.);

[0110] The topology management layer receives and saves device information, then verifies the device information and removes invalid device information (such as invalid link relationship, non-existent parent device, incorrect device parameters, etc.). Details:

[0111] Receive and save device information

[0112] The topology management layer receives device information change requests from the application layer;

[0113] The received device information is saved in a database or other persistent storage medium.

[0114] Device information verification

[0115] Link relationship verification: Check whether the link relationship in the device information is valid, and ensure that there is a correct connection relationship between each device and its parent device;

[0116] Parent device existence check: Verify whether the parent device mentioned in each device information exists in the system, and ensure that there are no references to non-existent devices;

[0117] Device parameter verification: Verify whether the device parameters (such as communication ports, communication protocols, etc.) meet the predefined standards and format requirements to ensure that the device parameters are correct.

[0118] Remove invalid device information

[0119] Based on the results of the above verification steps, remove all invalid device information records;

[0120] For device information that fails verification, the specific error cause is recorded and the original valid device information is retained.

[0121] Step 3: The device management module obtains the updated device information from the topology management layer and stores it;

[0122] The device management module obtains the updated device information from the topology management layer and stores it. The details are as follows:

[0123] Get updated device information

[0124] The device management module requests the latest device information from the topology management layer periodically or after receiving a notification from the topology management layer.

[0125] The security and integrity of data transmission is ensured during the request process, and encryption measures are used when necessary.

[0126] Storage device information

[0127] After receiving the updated device information from the topology management layer, the device management module stores it in a local database or memory.

[0128] Perform a consistency check on device information before storage to ensure the integrity and accuracy of the information.

[0129] The device information includes at least key fields such as device identifier, device type, parent device identifier (if applicable), and communication port information.

[0130] Backing up device information

[0131] Before storing the updated device information, the device management module backs up the currently stored device information so that it can be restored when needed.

[0132] The backup process needs to ensure the integrity and security of the data.

[0133] Confirm storage status

[0134] After the device management module stores the updated device information, it sends a confirmation message to the topology management layer, indicating that the device information has been successfully stored.

[0135] If the storage fails, the device management module needs to retry the storage until it succeeds or prompt the topology management layer the reason for the storage failure.

[0136] Step 4: The device management module loads the base device driver based on the stored valid device information, and loads the sub-device drivers step by step based on the base device information; The device management module loads the base device driver based on the stored valid device information, and loads the sub-device drivers step by step based on the base device information. Details:

[0137] Get valid device information

[0138] The device management module reads the latest valid device information from the storage to ensure that the information is up to date and has been verified.

[0139] Loading base device driver

[0140] The device management module creates a base device object and its corresponding driver according to the base device information in the device information.

[0141] The basic device information at least includes key fields such as device identifier, device type, and communication port information.

[0142] Load sub-device drivers step by step

[0143] The device management module loads its direct sub-device drivers based on the base device information:

[0144] Traverse all port information of the base device and load the sub-devices under each port.

[0145] For each child device, check its connections to make sure all parent devices are loaded.

[0146] Create a child device object and its corresponding driver.

[0147] If the sub-device itself can also serve as a parent device, continue to load the sub-devices under the sub-device until all devices at all levels are loaded.

[0148] Handling multiple parent device situations

[0149] For a sub-device with multiple parent devices, the sub-device is loaded only after all its parent devices are loaded.

[0150] If all parents of a child device have not yet been loaded, then the loading of the child device is delayed until all parents are loaded.

[0151] Verify device loading step by step

[0152] The device management module performs verification when loading each device to ensure that the devices are loaded in the correct order.

[0153] If any abnormality is found during the loading process (such as missing device information, parent device not loaded, etc.), the loading is stopped and the error information is recorded.

[0154] Through the above steps, the device management module can load the drivers of the base device and its sub-devices step by step based on the valid device information, ensuring that the dependencies between devices are correctly handled, thereby achieving dynamic device management while maintaining the continuous operation of the system. This not only improves the flexibility and efficiency of the system, but also ensures the intelligent level of device management.

[0155] Step 5: The device management module determines the newly added device information and deleted device information by comparing it with the old device information;

[0156] The device management module determines the newly added device information and deleted device information by comparing it with the old device information. The specific details are as follows:

[0157] Get old device information

[0158] The device management module reads the currently valid old device information from the local storage.

[0159] Get new device information

[0160] The device management module obtains the latest device information from the topology management layer.

[0161] Compare old and new equipment information

[0162] Traverse the old device information list, for each old device information:

[0163] Check whether the device information exists in the new device information list.

[0164] If it exists, the device information is marked as "unchanged" and removed from the new device information list.

[0165] If it does not exist, the device information is marked as "deleted device information" and recorded.

[0166] Confirm the newly added device information

[0167] After the traversal of the old device information is completed, the remaining new device information list is the "newly added device information".

[0168] Record change information

[0169] Record the confirmed "deleted device information" and "added device information" for subsequent processing.

[0170] Confirm the change result

[0171] The device management module confirms the recorded change information and prepares for the next device release or load operation.

[0172] Through the above steps, the device management module can accurately determine which device information is deleted and which device information is added, thereby providing accurate data support for subsequent device release and loading operations, ensuring that the system does not interrupt the normal operation of other devices when the device is changed.

[0173] Step 6: To delete device information, first release its sub-devices and then release the device;

[0174] To delete device information, first release its child devices, then release the device. For details:

[0175] Get the device information to be deleted

[0176] The device management module obtains updated device information from the topology management layer and determines the device information that needs to be deleted.

[0177] Confirm that the device information contains the identifiers of the device to be deleted and its sub-devices.

[0178] Release child device

[0179] For each device to be deleted, first check whether it has any child devices.

[0180] If there are sub-devices, release them in sequence:

[0181] Gets the identifier of the child device.

[0182] Call the device release logic DevMemFree and pass in the sub-device identifier and the corresponding communication port.

[0183] Recursively process the child devices of the child device until all child devices are completely released.

[0184] Release the device itself

[0185] After all child devices are released, release the device to be deleted:

[0186] Get the identifier of the device to be deleted.

[0187] Call the device release logic DevMemFree and pass in the device identifier and the corresponding communication port.

[0188] Destroy the device object and its communication object, and release related resources.

[0189] Confirm release status

[0190] After completing the release of the device and its sub-devices, the device management module sends a confirmation message to the topology management layer, indicating that the device information update has been completed.

[0191] If an exception occurs during the release process, the exception information is recorded and reported to the topology management layer for further processing.

[0192] Through the above steps, it is ensured that when deleting device information, the child device is released first and then the parent device, avoiding the problem of inconsistent device status due to incorrect sequence, thereby ensuring the consistency and accuracy of the system status.

[0193] Step 7: For the newly added device information, create and load the device and its sub-devices step by step;

[0194] For the newly added device information, create and load the device and its sub-devices step by step. For details:

[0195] Get new device information

[0196] The device management module obtains a list of newly added device information from the device information comparison result.

[0197] Create a base device

[0198] For the base device in the newly added device information, the device management module first creates a base device object.

[0199] When the base device object is created, its communication port information and related parameters are initialized.

[0200] Loading base device driver

[0201] The device management module loads the driver corresponding to the base device to ensure that the base device can communicate normally.

[0202] Creating a Sub-Device

[0203] For sub-devices under the base device, the device management module creates the sub-device objects and ensures that all parent devices are loaded.

[0204] Check whether all parent devices of the child device have been created. If all parent devices exist, create the child device object.

[0205] If there are uncreated parent devices, child devices will not be created until all parent devices are created.

[0206] Loading sub-device drivers

[0207] For a successfully created child device, the device management module loads its corresponding driver and establishes a communication connection with the parent device.

[0208] If the child device itself is also a parent device, continue to recursively create its child devices and their drivers.

[0209] Sub-device information verification

[0210] In the process of creating a sub-device and its driver, verify the validity of the sub-device information (such as connection relationships, device parameters, etc.).

[0211] Ensure the information consistency of the sub-device and its sub-devices.

[0212] Confirm loading status

[0213] After the new device and its sub-devices are created and loaded, the device management module confirms that all the new devices have been loaded correctly.

[0214] If loading fails, log the error message and try to reload or notify the user.

[0215] Step 8: After completing the device information update, the device management system returns to normal working state.

[0216] After completing the device information update, the device management system returns to normal working state. Details:

[0217] Confirm that the device information update is complete

[0218] The device management module confirms that the information processing of all newly added and deleted devices has been completed, ensuring that all change operations have been properly handled.

[0219] Device status synchronization

[0220] The device management module synchronizes the status of all loaded devices to a normal working state, including but not limited to starting the data collection and upload functions of the devices.

[0221] Service status recovery

[0222] Confirm that all equipment and services have returned to normal working order to ensure that data flow and service processes are not interrupted.

[0223] System status check

[0224] Perform a system health check to confirm that all devices and services are in the expected working state, including the communication status between devices, data transmission status, etc.

[0225] Logging and Feedback

[0226] Record key operations and status changes during the device information update process to form a log file.

[0227] Feedback the status information of device information update completion to the application layer or other management components to confirm that the system has returned to normal working state.

[0228] Through the above steps, the equipment management system can ensure that it can quickly resume normal working state after the equipment information is updated, ensuring the continuity and stability of the system.

[0229] The present application is explained below in conjunction with an example embodiment. A multi-sensor device dynamic management method of the present application is used to solve the problem of service reloading caused by dynamic addition and deletion of equipment. The intelligent comprehensive mining face aims at informatization, digitization, automation, and unmanned operation. The monitoring system is based on pressure, gas, dust, inclination, wireless pressure, wireless radar ranging, wireless inclination and other types of sensors (optional) deployed on unit brackets or tunnel walls to meet the data monitoring and data analysis functions of the host computer system. When the update configuration needs to add or delete sensor equipment, it is necessary to restart the system or reload the service to achieve data acquisition of the newly added equipment or delete invalid equipment. Disadvantages of the prior art: restarting the system will affect work efficiency; reloading the service requires reloading all equipment, and other unmodified equipment will also be affected. The purpose of the present invention is to provide a method for dynamic management of multi-sensor equipment, realize dynamic loading of multi-sensor equipment that adapts to multiple communication modes (wired, wireless), and does not affect the normal operation of other unrelated equipment when equipment is dynamically added or deleted.

[0230] refer to Figure 1 , the overall framework diagram of the system involved in dynamic management of multi-sensor devices:

[0231] A multi-sensor device dynamic management method includes:

[0232] 1. Add device information at the application layer:

[0233] Taking json format as an example, the details are as follows:

[0234] 1. Attribute information of the same model of equipment

[0235]

[0236]

[0237]

[0238]

[0239]

[0240]

[0241]

[0242] 2. Topology management saves device information.

[0243] 3. Device management calls topology management device loading.

[0244] 4. Topology management loads and verifies device information to remove invalid device information (invalid link relationship, non-existent parent device, incorrect device parameters, etc.). Figure 2 ,The topology management loads the flow chart for verifying the device information.,The device management obtains the basic device information and other valid device information, and the,device management stores a copy of all the information.

[0245] 5. The device manager loads the base device driver. The device manager adds the child device driver based on the base device information. When the child device can also be used as a parent device, continue to add the devices under the current child device. When there are multiple parent devices under a child device, if all parent devices have been loaded, load the device. Otherwise, do not load the device until all parent devices of the device are loaded. After the current child device and the device driver under the child device are loaded, continue to load the next device based on the base device information until all devices are loaded.

[0246]

[0247]

[0248]

[0249] 6. After the device information is loaded, the whole system is in normal working state; when the application layer adds or deletes the device, the topology management layer device information is updated;

[0250]

[0251]

[0252]

[0253] 7. Device management reloads the device, obtains the new device information, and compares it with the old device information: traverses the old device information. If the new device information exists, the device has not changed, and the device information is removed from the new device information. If the new device information does not exist, the device is deleted and added to the deleted information list. When the new device information is not empty after the traversal is completed, the remaining device information is the newly added device;

[0254] 8. After step 8, you can find the deleted devices and the newly added devices; give priority to the deleted device information and release the devices: if there are sub-devices under the deleted device, the sub-devices of the device should be released in a limited way before releasing the device; if the device is one of the devices along the line, regardless of the end, all the current devices along the line should be released and then reloaded; add new device information, if the newly added device has sub-devices, the sub-devices will be added at the same time, and then when traversing to the sub-device information, it will check whether the sub-device information exists. If the sub-device information exists, the sub-device will not be reloaded.

[0255] 9. Repeat 7-9 to achieve dynamic modification of the equipment without affecting the working status of the whole machine; Figure 3 The following is the overall workflow diagram of this application.

[0256] When the device is dynamically added or deleted, it does not affect the normal operation of other unrelated devices, data can be continuously obtained, and the whole machine can maintain normal operation. In addition, the storage and comparison of device information can be placed in the topology management layer, and the format of device information can be changed according to actual needs (json, yaml, etc.).

[0257] The following example illustrates: This application is used for the management of bracket controllers, centralized control master stations, and substation equipment;

[0258] Take the controller as an example:

[0259] Base equipment: controller;

[0260] First level sub-equipment:

[0261] Information expander, wireless receiver, height and distance sensor, inclination sensor, etc.

[0262] Secondary sub-device:

[0263] Information expander sub-devices: pressure sensors, infrared sensors and other devices;

[0264] Wireless receiver sub-devices: wireless pressure, wireless inclination, wireless travel sensor, etc.;

[0265] Controller interface such as Figure 4 As shown, Figure 4 This is a schematic diagram of the controller interface involved in this application, where A1 is the controller power supply interface:

[0266] Step 1: Add device information at the application layer. The physical connection relationship of the sensor is consistent with the added information:

[0267] B1 and B2 are connected to the driver (UART);

[0268] B3 connects the warning light (CAN);

[0269] B4 connects multiple information expanders and tilt sensors (CAN);

[0270] C1 connects to the pressure sensor (Analog);

[0271] C2 infrared sensor (Analog);

[0272] C3 displacement sensor (Analog);

[0273] Step 2: Topology management receives the device information added by the application and saves it in the device service;

[0274] Step 3: Topology management loads the device and verifies the device information;

[0275] Step 4: The device manager loads the device driver, the device data is reported normally, and the control command is issued normally;

[0276] Step 5: Physically connect the C6 port to add an altitude sensor, and the B4 port to reduce an inclination sensor. At this time, the application adds the altitude sensor information and deletes the B4 port to reduce the corresponding device information of the sensor;

[0277] Step 6: Topology management and device management reload the device, release the deleted tilt sensor device object after obtaining the deleted device information and the new device information, and load the height sensor device driver. During this period, the normal operation of the driver and the alarm light will not be affected.

[0278] The most important and core technical effects of this application are reflected in the following aspects:

[0279] Dynamic management capability: The present invention provides a method for dynamically managing multi-sensor devices, so that devices can be added or removed in real time without affecting the normal operation of other devices in the device network. This means that the system can update devices without interrupting service, improving the flexibility and efficiency of the system.

[0280] Multi-level device information processing: The present invention pays special attention to the information change processing of multi-level devices (i.e., devices with parent-child relationships), ensuring that when the status of a device is modified, the status changes of its child devices and all related devices can be correctly handled, thereby avoiding unnecessary system restarts or service overloads.

[0281] Device information comparison mechanism: By comparing the old and new device information, the present invention can accurately identify which devices are added and which devices are deleted, and make corresponding device loading or releasing operations accordingly, thereby ensuring the consistency and accuracy of the system status.

[0282] Continuous data acquisition: Since the method of the present invention can maintain the continuous operation of other devices and services when the device changes dynamically, it can ensure the continuous acquisition of data throughout the process, which is particularly important for application scenarios that rely on real-time data. In general, the core technical effect of the present invention is to achieve efficient, flexible and seamless management of multi-sensor device networks, greatly improve the level of intelligent device management, and ensure the continuity and stability of system operation.

Claims

1. A multi-sensor device dynamic management method, characterized in that: The method comprises the following steps: Step 1: the application layer adds or deletes device information and sends it to the topology management layer; Step 2: the topology management layer receives and saves the device information, then verifies the device information and removes invalid device information; Step 3: the device management module obtains the updated device information from the topology management layer and stores it; Step 4: the device management module loads the base device driver based on the stored valid device information, and loads the sub-device driver step by step based on the base device information; Step 5: the device management module determines the newly added device information and the deleted device information by comparing with the old device information; Step 6: for the deleted device information, first release its sub-devices and then release the device; Step 7: for the newly added device information, create and load the device and its sub-devices step by step; Step 8: after completing the device information update, the device management system resumes the normal working state.

2. The multi-sensor device dynamic management method according to claim 1, characterized in that: The application layer adds or deletes device information and sends it to the topology management layer. Specific details: The user adds or deletes device information through the application interface; The application layer receives the user's input command and confirms the change of device information; The application layer converts device information into a standardized format to ensure that the information is complete and complies with predefined field requirements; The device information at least includes the device identifier, device type, parent device identifier, and communication port information key fields; The application layer sends standardized device information to the topology management layer through a predetermined communication interface.

3. The multi-sensor device dynamic management method according to claim 1, characterized in that: The topology management layer receives and saves device information, then verifies the device information and removes invalid device information. Details: The topology management layer receives device information change requests from the application layer; Save the received device information to the database; Check whether the link relationship in the device information is valid and ensure that there is a correct connection relationship between each device and its parent device; Verify that the parent device mentioned in each device information exists in the system and ensure that there are no references to non-existent devices; Verify that the device parameters comply with predefined standards and format requirements to ensure that the device parameters are correct.

4. The multi-sensor device dynamic management method according to claim 1, characterized in that: The device management module obtains the updated device information from the topology management layer and stores it. The details are as follows: The device management module requests the latest device information from the topology management layer periodically or after receiving a notification from the topology management layer; After receiving the updated device information from the topology management layer, the device management module stores it in a local database or memory; Perform consistency checks on device information before storage to ensure the integrity and accuracy of the information; The device information includes at least the device identifier, device type, parent device identifier, and communication port information key fields; Before storing the updated device information, the device management module backs up the currently stored device information so that it can be restored when needed; The backup process needs to ensure the integrity and security of the data; After the device management module stores the updated device information, it sends a confirmation message to the topology management layer, indicating that the device information has been successfully stored; If the storage fails, the device management module needs to retry the storage until it succeeds or prompt the topology management layer the reason for the storage failure.

5. The multi-sensor device dynamic management method according to claim 1, characterized in that: The device management module loads the base device driver based on the stored valid device information, and loads the sub-device drivers step by step based on the base device information. The specific details are as follows: The device management module reads the latest valid device information from the storage to ensure that the information is up to date and has been verified; The device management module creates a base device object and its corresponding driver according to the base device information in the device information; The basic device information includes at least the device identifier, device type, and communication port information key fields; The device management module loads its direct sub-device drivers based on the base device information: Traverse all port information of the base device and load the sub-devices under each port; For each child device, check its connection relationship to ensure that all parent devices are loaded; Create a child device object and its corresponding driver; If the sub-device itself can also serve as a parent device, continue to load the sub-devices under the sub-device until all devices at all levels are loaded; For a sub-device with multiple parent devices, the sub-device will be loaded only after all its parent devices have been loaded; If all parent devices of a child device have not been loaded, the loading of the child device is delayed until all parent devices are loaded; The device management module verifies each device when it is loaded to ensure that the order in which the devices are loaded is correct; If any abnormality is found during the loading process, the loading is stopped and the error information is recorded.

6. The multi-sensor device dynamic management method according to claim 1, characterized in that: The device management module determines the newly added device information and deleted device information by comparing it with the old device information. The specific details are as follows: The device management module reads the currently valid old device information from the local storage; The device management module obtains the latest device information from the topology management layer; Traverse the old device information list, for each old device information: Check whether the device information exists in the new device information list; If it exists, mark the device information as "unchanged" and remove the device information from the new device information list; If it does not exist, the device information is marked as "delete device information" and recorded; After the traversal of the old device information is completed, the remaining new device information list is "newly added device information"; Record the confirmed "deleted device information" and "added device information" for subsequent processing; The device management module confirms the recorded change information and prepares for the next device release or load operation.

7. The multi-sensor device dynamic management method according to claim 1, characterized in that: To delete device information, first release its child devices, then release the device. For details: The device management module obtains updated device information from the topology management layer and determines the device information that needs to be deleted; Confirm that the device information contains the identifiers of the device to be deleted and its sub-devices; For each device to be deleted, first check whether it has child devices; If there are sub-devices, release them in sequence: Get the identifier of the child device; Call the device release logic DevMemFree, passing in the identifier of the child device and the corresponding communication port; Recursively process the sub-devices of the sub-device until all sub-devices are completely released; After all child devices are released, release the device to be deleted: Get the identifier of the device to be deleted; Call the device release logic DevMemFree, passing in the device identifier and the corresponding communication port; Destroy the device object and its communication object, and release related resources; After completing the release of the device and its sub-devices, the device management module sends a confirmation message to the topology management layer, indicating that the device information update has been completed.

8. The multi-sensor device dynamic management method according to claim 1, characterized in that: For the newly added device information, create and load the device and its sub-devices step by step. For details: The device management module obtains a list of newly added device information from the device information comparison result; For the base device in the newly added device information, the device management module first creates a base device object; When the base device object is created, its communication port information and related parameters are initialized; The device management module loads the driver corresponding to the base device to ensure that the base device can communicate normally; For sub-devices under the base device, the device management module creates sub-device objects and ensures that all parent devices are loaded; Check whether all parent devices of the child device have been created. If all parent devices exist, create the child device object; If there is an uncreated parent device, the child device will not be created until all parent devices are created; For the successfully created child device, the device management module loads its corresponding driver and establishes a communication connection with the parent device; If the child device itself is also a parent device, continue to recursively create the child devices and their drivers under it; In the process of creating a sub-device and its driver, verify the validity of the sub-device information; Ensure the information consistency of sub-devices and their sub-devices; After the new device and its sub-devices are created and loaded, the device management module confirms that all the new devices have been loaded correctly; If loading fails, log the error message and try to reload or notify the user.

9. The multi-sensor device dynamic management method according to claim 1, characterized in that: After completing the device information update, the device management system returns to normal working state. Details: The device management module confirms that all new and deleted device information processing has been completed, ensuring that all changes have been properly processed; The device management module synchronizes the status of all loaded devices to normal working status, including but not limited to starting the data collection and upload functions of the devices; Confirm that all equipment and services have returned to normal working order to ensure that data flow and service processes are not interrupted; Record key operations and status changes during the device information update process to form a log file; Feedback the status information of device information update completion to the application layer or other management components to confirm that the system has returned to normal working state.