A device dataset management method, apparatus, device, and medium

By using a dataset range condition method to automatically query and listen for device change events in an IoT platform, the problem of automatic sensing and dynamic updating in batch device management is solved, realizing automated management and operation of device datasets and improving management efficiency.

CN117290547BActive Publication Date: 2025-11-28SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311384867.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-24
Publication Date
2025-11-28
Estimated Expiration
2043-10-24

AI Technical Summary

Technical Problem

In existing IoT devices, existing IoT platforms struggle to automatically sense and dynamically update devices with identical attributes when managing batches of devices, resulting in low management efficiency.

Method used

By using a pre-defined dataset model to automatically query target devices based on dataset range conditions, monitoring for device change events to update the dataset, and triggering repair operations within a time period, the real-time performance and accuracy of the device dataset are ensured.

Benefits of technology

It enables automated management and maintenance of batch devices, improves management efficiency, avoids omissions in device data, and ensures the real-time nature and accuracy of data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117290547B_ABST
    Figure CN117290547B_ABST
Patent Text Reader

Abstract

The application discloses a device data set management method and device, equipment and medium, and relates to the technical field of Internet of Things. The method comprises the following steps: querying corresponding devices from all devices based on a plurality of data set range conditions to obtain a plurality of real-time device data sets; determining a changed device identifier when a device change event is monitored to determine a to-be-changed device data set from the plurality of real-time device data sets, updating the to-be-changed device data set to obtain an updated real-time device data set; triggering a corresponding repair operation based on a time period corresponding to each real-time device data set to determine a temporary device data set based on a data set range condition corresponding to each real-time device data set, and determining whether to perform repair in combination with a comparison result of each real-time device data set; and if an update event of any real-time device data set is monitored, sending a notification to a corresponding business application. Through automatic repair and automatic sensing of the data set, the operation of the data set is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to a device data set management method and device, equipment and medium. BACKGROUND

[0002] The Internet of Things is a new connection mode based on information networking and mobile networking. It grows in the soil of the Internet and is the boundary expansion and content extension based on the Internet. After more than ten years of development, relying on the continuous innovation of information communication technology and electronic technology, the application scenarios of the Internet of Things are becoming more and more extensive, and are gradually penetrating into the fields of industry, life and entertainment, and have shown an explosive development state. According to the records in the White Paper of the Internet of Things, by 2025, the global Internet of Things connection number will reach 24.6 billion, with a high annual compound growth rate of 13%; the number of connections of the Internet of Things in China will reach 8.01 billion, with an annual compound growth rate of 14.1%, and the market size is huge.

[0003] In the face of a large number of Internet of Things devices, large-scale operation and maintenance is particularly important, so batch operation of the devices has become an urgent demand. For example, batch device OTA (Over-The-Air) upgrade, batch device remote configuration, etc. The current major Internet of Things platforms generally use multiple selections or file import to perform batch operations on the devices in the console. Multiple selections, especially browser-based multiple selections, can only select a limited number of devices, and manually selecting one by one is not user-friendly. The file import method can avoid the embarrassment and tediousness of manual selection one by one, and can achieve device operation in a higher order of magnitude than multiple selections to a certain extent, but the file import is a static data set, and cannot automatically perceive the devices with the same attributes. When a device belonging to a data set is deleted or added, the file must be imported again, which is limited in efficiency. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a device data set management method, device, equipment and medium, which can automatically create, repair and perceive device data sets based on data set range conditions, to automatically update the device data sets, thereby realizing automatic management and operation and maintenance of batch devices. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a device data set management method, comprising:

[0006] querying corresponding target devices from all devices based on a plurality of data set range conditions through a preset data set model, to obtain a plurality of real-time device data sets;

[0007] determining a changed device identifier corresponding to the device change event upon listening to the device change event, and determining a to-be-changed device dataset from the several real-time device datasets based on the changed device identifier, and updating the to-be-changed device dataset to obtain an updated real-time device dataset;

[0008] triggering a repair operation on each real-time device dataset in the several real-time device datasets based on a time period corresponding to the each real-time device dataset, to determine a temporary device dataset based on a dataset range condition corresponding to the each real-time device dataset, and determining whether to repair the each real-time device dataset based on a comparison result between the temporary device dataset and the each real-time device dataset, and repairing the each real-time device dataset to obtain a repaired real-time device dataset if the each real-time device dataset is to be repaired;

[0009] if an update event of any real-time device dataset in the several real-time device datasets is monitored, sending a dataset update notification to a service application corresponding to the any real-time device dataset.

[0010] Optionally, the querying, by the preset dataset model, corresponding target devices from all devices based on several groups of dataset range conditions respectively to obtain the several real-time device datasets comprises:

[0011] querying, by the preset dataset model, all devices based on each group of dataset range conditions to obtain several target devices respectively corresponding to each range condition in the each group of dataset range conditions;

[0012] performing a merging and deduplication operation on the several target devices respectively corresponding to each range condition to obtain a real-time device dataset corresponding to the each group of dataset range conditions.

[0013] Optionally, the determining, upon listening to the device change event, a changed device identifier corresponding to the device change event, and determining a to-be-changed device dataset from the several real-time device datasets based on the changed device identifier, and updating the to-be-changed device dataset to obtain an updated real-time device dataset comprises:

[0014] determining a deleted device identifier corresponding to the device deletion event upon listening to the device deletion event, and querying, based on the deleted device identifier, a relationship data table used for recording a correspondence between an identifier of a real-time device dataset and a device identifier, to determine a to-be-deleted device dataset corresponding to the deleted device identifier from the several real-time device datasets;

[0015] deleting a device corresponding to the deleted device identifier in the to-be-deleted device dataset to obtain a deleted real-time device dataset.

[0016] Optionally, the determining, when the device change event is monitored, a changed device identifier corresponding to the device change event, and determining, based on the changed device identifier, a to-be-changed device dataset from the plurality of real-time device datasets, updating the to-be-changed device dataset to obtain an updated real-time device dataset, comprises:

[0017] determining, when the device addition event is monitored, an added device identifier corresponding to the device addition event, and determining a device identifier range condition based on the added device identifier;

[0018] combining the plurality of set range conditions corresponding to the plurality of real-time device datasets and the device identifier range condition respectively to obtain a plurality of first combined range conditions corresponding to the plurality of real-time device datasets;

[0019] querying all devices based on each of the first combined range conditions to obtain a query result corresponding to each of the first combined range conditions;

[0020] determining, from the plurality of real-time device datasets, a to-be-added device dataset corresponding to the first combined range condition with a non-empty query result, and adding a device corresponding to the added device identifier to the to-be-added device dataset to obtain an added real-time device dataset.

[0021] Optionally, the determining, based on the data set range condition corresponding to each real-time device dataset, a temporary device dataset, and determining, based on a comparison result of the temporary device dataset and each real-time device dataset, whether to repair each real-time device dataset, comprises:

[0022] if the repair operation is a first triggered check operation, querying all devices based on the data set range condition corresponding to each real-time device dataset to determine a first temporary device dataset based on the queried devices;

[0023] if the first temporary device dataset has to-be-deleted missing devices relative to each real-time device dataset, it is determined that each real-time device dataset needs to be deleted based on the to-be-deleted missing devices;

[0024] if the first temporary device dataset has to-be-added missing devices relative to each real-time device dataset, it is determined that each real-time device dataset needs to be added based on the to-be-added missing devices;

[0025] If the first temporary device data set has no missing device relative to each real-time device data set, it is determined that no repair is needed for each real-time device data set.

[0026] Optionally, the temporary device data set is determined based on the data set range condition corresponding to each real-time device data set, and it is determined whether to repair each real-time device data set based on the comparison result of the temporary device data set and each real-time device data set, comprising:

[0027] If the repair operation is a non-first triggered check operation for a missing deleted device, a second temporary device data set is obtained by querying all devices based on the data set range condition corresponding to each real-time device data set, and it is determined whether to repair each real-time device data set based on the comparison result of the second temporary device data set and each real-time device data set;

[0028] If the repair operation is a non-first triggered check operation for a missing added device, a current repair time is determined, a time range condition is constructed based on the current repair time and a last repair time, and a second combined range condition is determined based on the time range condition and the data set range condition corresponding to each real-time device data set;

[0029] A third temporary device data set is obtained by querying all devices based on the second combined range condition, and it is determined whether to repair each real-time device data set based on the comparison result of the third temporary device data set and each real-time device data set.

[0030] Optionally, if an update event of any real-time device data set in the plurality of real-time device data sets is monitored, a data set update notification is sent to a business application corresponding to the any real-time device data set, comprising:

[0031] If a deletion event of any real-time device data set in the plurality of real-time device data sets is monitored, a data set deletion notification containing the identification of the any real-time device data set and the event identification and event type corresponding to the deletion event is sent to a business application corresponding to the any real-time device data set;

[0032] If a modification event of a device in the any real-time device data set is monitored, a data set modification notification containing the identification of the any real-time device data set, the event identification and event type corresponding to the modification event, the device to be modified and the type to be modified corresponding to the modification event is sent to a business application corresponding to the any real-time device data set.

[0033] In a second aspect, the present application provides a device dataset management apparatus, comprising:

[0034] a device querying module configured to query corresponding target devices from all devices respectively based on a plurality of dataset range conditions of a preset dataset model to obtain a plurality of real-time device datasets;

[0035] a dataset updating module configured to, when a device change event is monitored, determine a change device identifier corresponding to the device change event, and determine a to-be-changed device dataset from the plurality of real-time device datasets based on the change device identifier, and update the to-be-changed device dataset to obtain an updated real-time device dataset;

[0036] a dataset repairing module configured to trigger a repairing operation on each real-time device dataset in the plurality of real-time device datasets based on a time period corresponding to the each real-time device dataset, to determine a temporary device dataset based on a dataset range condition corresponding to the each real-time device dataset, and to determine whether to repair the each real-time device dataset based on a comparison result of the temporary device dataset and the each real-time device dataset, and if so, to repair the each real-time device dataset to obtain a repaired real-time device dataset;

[0037] a notification sending module configured to, if an update event of any real-time device dataset in the plurality of real-time device datasets is monitored, send a dataset update notification to a service application corresponding to the any real-time device dataset.

[0038] In a third aspect, the present application provides an electronic device, comprising:

[0039] a memory configured to save a computer program;

[0040] a processor configured to execute the computer program to implement the device dataset management method as described above.

[0041] In a fourth aspect, the present application provides a computer readable storage medium configured to save a computer program, wherein the computer program is executed by a processor to implement the device dataset management method as described above.

[0042] In the present application, a target device is queried from all devices based on a preset data set model and a plurality of data set range conditions to obtain a plurality of real-time device data sets; when a device change event is detected, a changed device identifier corresponding to the device change event is determined, and a to-be-changed device data set is determined from the plurality of real-time device data sets based on the changed device identifier; the to-be-changed device data set is updated to obtain an updated real-time device data set; a repair operation is triggered for each real-time device data set in the plurality of real-time device data sets based on a time period corresponding to each real-time device data set, to determine a temporary device data set based on a data set range condition corresponding to each real-time device data set, and to determine whether to repair each real-time device data set based on a comparison result of the temporary device data set and each real-time device data set, and if so, to repair each real-time device data set to obtain a repaired real-time device data set; and if an update event of any real-time device data set in the plurality of real-time device data sets is detected, a data set update notification is sent to a business application corresponding to the any real-time device data set. As can be seen, the present application automatically queries devices meeting the conditions from all devices based on a data set range condition to construct real-time device data sets; and when a device change event is detected, a device data set that needs to be changed is determined based on a changed device identifier, thereby realizing automatic perception and automatic detection of device data sets; further, the present application automatically triggers a repair operation for device data sets to avoid missing devices in device data sets, ensure the correctness and real-time performance of device data sets, and realize automatic repair of device data sets; finally, a data set update notification is sent to a business application using the device data set, thereby realizing operation and management of batch devices through automatic perception, automatic detection and automatic repair of device data sets, saving human resources and improving the management efficiency of batch devices. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on the provided drawings.

[0044] Figure 1 A device data set management method flowchart disclosed by the present application;

[0045] Figure 2 A device data set update flowchart disclosed by the present application;

[0046] Figure 3 A device data set repair flowchart disclosed by the present application;

[0047] Figure 4 A device data set management structure diagram disclosed by the present application is shown in the figure.

[0048] Figure 5 A device data set management device structure diagram disclosed by the present application is shown in the figure.

[0049] Figure 6 An electronic device structure diagram disclosed by the present application is shown in the figure. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0051] In the face of massive Internet of Things devices, large-scale operation and maintenance is particularly important, so batch operation of the devices is an urgent demand. Therefore, the present application provides a device data set management method, which automatically creates, repairs and perceives device data sets based on data set range conditions, to automatically update the device data sets, thereby realizing automatic management and operation and maintenance of the batch devices.

[0052] Referring to Figure 1 The embodiments of the present application disclose a device data set management method, which comprises:

[0053] In step S11, a preset data set model is used to query corresponding target devices from all devices based on a plurality of groups of data set range conditions, to obtain a plurality of real-time device data sets.

[0054] In this embodiment, a plurality of groups of data set range conditions and corresponding data set names configured by a user are obtained, and a preset data set model is used to query corresponding target devices from all devices based on the plurality of groups of data set range conditions, to obtain a plurality of real-time device data sets; each real-time device data set corresponds to a data set identifier. That is, each real-time device data set corresponds to a group of data set attributes, and the data set attributes include a data set identifier, a data set name and a data set range condition, which are specifically shown in Table 1:

[0055] Table 1 Data set attributes

[0056] Attribute Attribute meaning Data type Data set identification Unique identification of data set Either character or numeric Data set name Name of data set Character type Data set range condition Condition corresponding to data set Character array

[0057] It should be noted that the data set range condition can include one range condition or multiple range conditions; when the data set range condition includes multiple range conditions, the device data set corresponding to the multiple range conditions represents the union of a plurality of devices corresponding to the multiple range conditions respectively, and there is no repeated device in the device data set, for example, device D is queried by both range conditions in the data set range condition, but D exists only once in the device data set.

[0058] Specifically, all devices are queried based on each group of data set range conditions through a preset data set model to obtain a plurality of target devices corresponding to each range condition in each group of data set range conditions respectively; and the plurality of target devices corresponding to each range condition are merged and de-duplicated to obtain a real-time device data set corresponding to each group of data set range conditions. For example, a batch upgrade of a group of devices needs to be performed, and the following device data set can be defined:

[0059] Data set identifier: OTA20230501001;

[0060] Data set name: 2023 May 1st XX brand camera batch upgrade;

[0061] Data set range condition:

[0062] Sql1: device type = “XX camera” and device installation location = “x building y floor” and device version = “V1.1.0”;

[0063] Sql2: device type = “XX camera” and device version ≤ “1.1” and device owner = “public”;

[0064] Three devices A, B, and C can be queried from all devices through Sql1 in the data set range condition, and five devices A, B, C, D, and E can be queried from all devices through Sql2 in the data set range condition, so the final real-time device data set corresponding to the data set range condition is {A, B, C, D, E}.

[0065] Further, in order to facilitate the storage and query of the device data set, the application also designs a basic attribute data table, a data set range condition data table, and a relationship data table; wherein the basic attribute data table is used to record the corresponding relationship of the data set identifier, the data set name, and the latest running time; the data set range condition data table is used to record the corresponding relationship of the data set identifier and the data set range condition; and the relationship data table is used to record the corresponding relationship of the data set identifier and the device identifier. The details are shown in Table Two as follows:

[0066] Table Two data table

[0067]

[0068] Step S12, when the device change event is monitored, determining the changed device identifier corresponding to the device change event, and determining the to-be-changed device dataset from the several real-time device datasets based on the changed device identifier, updating the to-be-changed device dataset to obtain the updated real-time device dataset.

[0069] In this embodiment, the device dataset can monitor the device change event by starting the automatic detection, and when the device change event is monitored, the corresponding to-be-changed device dataset is determined from the several real-time device datasets based on the changed device identifier, and the to-be-changed device dataset is updated based on the device corresponding to the changed device identifier to obtain the updated real-time device dataset.

[0070] As shown in Figure 2 When the device deletion event is monitored, the deletion device identifier corresponding to the device deletion event is determined, and the relationship data table for recording the corresponding relationship between the dataset identifier and the device identifier is queried based on the deletion device identifier to determine the to-be-deleted device dataset corresponding to the deletion device identifier from all real-time device datasets; the device corresponding to the deletion device identifier in the to-be-deleted device dataset is deleted to obtain the deleted real-time device dataset.

[0071] As shown in Figure 2As shown, when a device addition event is monitored, a device addition identity corresponding to the device addition event is determined, and a device identity range condition is determined based on the device addition identity; a number of real-time device data sets are combined with the device identity range condition to obtain a number of first combined range conditions corresponding to the number of real-time device data sets; all devices are queried based on each of the first combined range conditions to obtain a query result corresponding to each of the first combined range conditions; a to-be-added device data set corresponding to the first combined range condition with a non-empty query result is determined from the number of real-time device data sets, and a device corresponding to the device addition identity is added to the to-be-added device data set to obtain an added real-time device data set. It can be understood that when a device addition event is monitored, a device addition identity id (identity document) is determined to construct a device identity range condition deviceid = device addition identity id; by combining the data set range condition corresponding to each of the real-time device data sets with automatic detection enabled, i.e., a range sql (structured query language), with the device identity range condition deviceid = device addition identity id, a first combined range condition corresponding to each of the real-time device data sets, i.e., a check sql, is obtained. Running the check sql corresponding to each of the real-time device data sets, if the query result obtained by querying all devices based on a certain check sql is empty, it indicates that the verification fails, and the real-time device data set corresponding to the check sql is discarded, i.e., no device addition operation is required for the real-time device data set corresponding to the check sql. If the query result obtained by querying all devices based on a certain check sql is not empty, it indicates that the verification is successful, and the device corresponding to the device addition identity id is added to the real-time device data set corresponding to the check sql to obtain an added real-time device data set.

[0072] In step S13, a repair operation is triggered for each real-time device data set in the number of real-time device data sets based on a time period corresponding to each real-time device data set to determine a temporary device data set based on a data set range condition corresponding to each real-time device data set, and to determine whether to repair each real-time device data set based on a comparison result of the temporary device data set and each real-time device data set, and if so, to repair each real-time device data set to obtain a repaired real-time device data set.

[0073] In this embodiment, it is considered that although the device dataset is enabled to automatically detect, that is, the real-time device dataset needs to be updated based on the changed device identifier when the device change event is detected, but due to network status and other factors, some real-time device datasets may not be updated or missed. That is, there are some real-time device datasets with missing devices to be changed. Therefore, the present application can initialize the real-time device dataset through automatic repair and check and repair the device dataset based on the timing task.

[0074] As shown in Figure 3 The repair operation of each real-time device dataset is triggered based on the time period corresponding to each real-time device dataset in the several real-time device datasets; wherein the time period corresponding to each real-time device dataset is set according to the update requirement of each real-time device dataset, for example, one hour, one day, etc., to trigger the repair operation. If the repair operation is the first triggered check operation, the range sql corresponding to each real-time device dataset is queried based on the dataset range condition, that is, the range sql of each real-time device dataset, to obtain a first temporary device dataset, wherein the first temporary device dataset includes all the device data that satisfies the range sql, and then each real-time device dataset is initialized based on the comparison result of the first temporary device dataset and each real-time device dataset. If there is a device to be deleted in the first temporary device dataset relative to each real-time device dataset, that is, there is no device A in the first temporary device dataset but there is device A in the real-time device dataset, it is determined that each real-time device dataset needs to be deleted based on the device A to be deleted to obtain the real-time device dataset after deletion. If there is a device to be added in the first temporary device dataset relative to each real-time device dataset, that is, there is device A in the first temporary device dataset but there is no device A in the real-time device dataset, it is determined that each real-time device dataset needs to be added based on the device A to be added to obtain the real-time device dataset after addition. If there is no missing device in the first temporary device dataset relative to each real-time device dataset, it is determined that each real-time device dataset does not need to be repaired. It should be noted that after the temporary device dataset is used, the temporary device dataset needs to be deleted, and only the real-time device dataset is retained.

[0075] As shown in Figure 3As shown, if the repair operation is a non-first triggered check operation for missing removed devices, that is, checking whether there is a missing removed device in the real-time device dataset, a query is performed on all devices based on the dataset range condition corresponding to each real-time device dataset, that is, the original range sql, to obtain a second temporary device dataset S, and a comparison result between the second temporary device dataset S and each real-time device dataset, that is, the currently saved device dataset, is used to determine whether to repair each real-time device dataset. If there is no device A in the second temporary device dataset but there is device A in the real-time device dataset, device A in each real-time device dataset is removed to obtain a removed real-time device dataset.

[0076] As shown, if the repair operation is a non-first triggered check operation for missing removed devices, that is, checking whether there is a missing removed device in the real-time device dataset, a query is performed on all devices based on the dataset range condition corresponding to each real-time device dataset, that is, the original range sql, to obtain a second temporary device dataset S, and a comparison result between the second temporary device dataset S and each real-time device dataset, that is, the currently saved device dataset, is used to determine whether to repair each real-time device dataset. If there is no device A in the second temporary device dataset but there is device A in the real-time device dataset, device A in each real-time device dataset is removed to obtain a removed real-time device dataset. Figure 3 As shown, if the repair operation is a non-first triggered check operation for missing removed devices, that is, checking whether there is a missing removed device in the real-time device dataset, a query is performed on all devices based on the dataset range condition corresponding to each real-time device dataset, that is, the original range sql, to obtain a second temporary device dataset S, and a comparison result between the second temporary device dataset S and each real-time device dataset, that is, the currently saved device dataset, is used to determine whether to repair each real-time device dataset. If there is no device A in the second temporary device dataset but there is device A in the real-time device dataset, device A in each real-time device dataset is removed to obtain a removed real-time device dataset.

[0077] It should be noted that, as shown, the running information of the real-time device dataset this time needs to be recorded, for example, the running time of the dataset repair this time, the added device information and the removed device information, to update the context of the related data table. Figure 3

[0078] Step S14, if an update event of any real-time device dataset in the plurality of real-time device datasets is monitored, a dataset update notification is sent to a business application corresponding to the any real-time device dataset.

[0079] ​In this embodiment, if a deletion event of any of the real-time device data sets is monitored, that is, the data set itself is destroyed, a data set deletion notification containing the data set identifier of any real-time device data set and the event identifier and event type corresponding to the deletion event is sent to the business application using the any real-time device data set, so that the business application handles the dependency on the any real-time device data set. If a modification event of a device in any real-time device data set is monitored, that is, a modification of a device in the data set, a data set modification notification containing the data set identifier of any real-time device data set, the event identifier and event type corresponding to the modification event, the device to be modified corresponding to the modification event and the type to be modified is sent to the business application using the any real-time device data set. For example, for the OTA upgrade of the Internet of Things device, the device data set A is selected, if a device addition occurs in the device data set A, a data set modification notification is sent to the corresponding business application, wherein the data set modification notification sent needs to contain the identifier of the device data set A, the event identifier and event type corresponding to the addition event (data set modification type), and the identifier and type of the added device (device addition type), and the business application can select to add the added device to its own task list for upgrade after receiving the data set modification notification. Further, the data set update notification sent to the business application can be implemented in various ways, the simplest and most effective of which is through a message middleware such as MQ (Message Queue), Kafka (a distributed message queue based on the publish / subscribe mode), etc.; the format of the data set update notification includes json (javascript object notation), yaml (a markup language for representing data serialization), xml (extensible markup language), etc.

[0080] Therefore, the application automatically queries the devices meeting the conditions from all devices through the data set range conditions to construct real-time device data sets; and when a device change event is monitored, the device data set that needs to be changed is determined based on the changed device identifier, so as to realize automatic perception and automatic detection of the device data set; further, the application automatically triggers a repair operation on the device data set to avoid missing devices in the device data set, ensure the correctness and real-time of the device data set, and realize automatic repair of the device data set; finally, the data set update notification is sent to the business application using the device data set, so that through automatic perception, automatic detection and automatic repair of the device data set, the operation and management of the batch devices are realized, and the management efficiency of the batch devices is improved.

[0081] Referring to Figure 4As shown, the embodiment of the present application discloses a device dataset management method, comprising:

[0082] For the attribute definition of the device dataset, a set of dataset range conditions and corresponding dataset names configured by a user containing one range condition or multiple range conditions is obtained through a preset dataset model, and corresponding target devices are queried from all devices based on the set of dataset range conditions through the preset dataset model to obtain real-time device datasets. Each real-time device dataset corresponds to a set of dataset attributes, and the dataset attributes include basic information and dataset range conditions. The basic information includes dataset identification, dataset name and the latest running time.

[0083] For the service definition of the device dataset, it includes automatic detection and automatic repair. For the automatic detection, when a device change event is detected, the changed device identification corresponding to the device change event is determined, and the device dataset that needs to be updated is determined based on the changed device identification, so that the device dataset that needs to be updated is updated based on the device corresponding to the changed device identification, to obtain the updated real-time device dataset. For the automatic repair, the repair operation of the real-time device dataset is triggered based on the time period corresponding to the real-time device dataset, the temporary device dataset is determined based on the dataset range condition corresponding to the real-time device dataset, and whether the real-time device dataset needs to be repaired is determined based on the comparison result of the temporary device dataset and the real-time device dataset. If there is a difference between the devices contained in the temporary device dataset and the real-time device dataset, it is determined that the real-time device dataset needs to be repaired to obtain the repaired real-time device dataset.

[0084] For the event definition of the device dataset, it includes dataset deletion event and dataset modification event. If the deletion event or the modification event of the real-time device dataset is monitored, the corresponding dataset deletion notification or dataset modification notification is sent to the business application using the real-time device dataset, so that the business application processes according to its own business logic after receiving the notification.

[0085] It can be seen that the application automatically queries devices meeting conditions from all devices to construct real-time device datasets through dataset range conditions, and automatically determines device datasets needing to be changed based on changed device identifiers when listening to device change events, so as to realize automatic perception and automatic detection of device datasets. Further, the application automatically triggers repair operations on device datasets to avoid missing devices in device datasets, ensure correctness and real-time of device datasets, realize automatic repair of device datasets, and finally sends dataset update notifications to business applications using the device datasets, so as to realize operation and management of batch devices through automatic perception, automatic detection and automatic repair of device datasets, and improve management efficiency of batch devices.

[0086] Referring to Figure 5 The embodiment of the application discloses a device dataset management device, comprising:

[0087] The device query module 11 is configured to query corresponding target devices from all devices based on a plurality of groups of dataset range conditions through a preset dataset model to obtain a plurality of real-time device datasets.

[0088] The dataset update module 12 is configured to determine a changed device identifier corresponding to the device change event when listening to the device change event, and determine a device dataset to be changed from the plurality of real-time device datasets based on the changed device identifier, update the device dataset to be changed to obtain an updated real-time device dataset.

[0089] The dataset repair module 13 is configured to trigger a repair operation on each real-time device dataset in the plurality of real-time device datasets based on a time period corresponding to each real-time device dataset, determine a temporary device dataset based on a dataset range condition corresponding to each real-time device dataset, and determine whether to repair each real-time device dataset based on a comparison result of the temporary device dataset and each real-time device dataset, and if so, repair each real-time device dataset to obtain a repaired real-time device dataset.

[0090] The notification sending module 14 is configured to send a dataset update notification to a business application corresponding to any real-time device dataset in the plurality of real-time device datasets if an update event of the any real-time device dataset is monitored.

[0091] Therefore, the application can query devices meeting the conditions from all devices automatically through the data set range conditions to construct real-time device data sets, and when a device change event is listened to, the device data set that needs to be changed is determined based on the changed device identifier, so that automatic perception and automatic detection of the device data set are realized. Further, the application can automatically trigger repair operations on the device data set to avoid missing devices in the device data set, ensure the correctness and real-time performance of the device data set, and realize automatic repair of the device data set. Finally, a data set update notification is sent to a business application using the device data set, so that through automatic perception, automatic detection and automatic repair of the device data set, operation and management of batch devices are realized, and the management efficiency of batch devices is improved.

[0092] In some embodiments, the device query module 11 comprises:

[0093] The first device query unit is configured to query all devices based on each group of data set range conditions through a preset data set model to obtain a plurality of target devices corresponding to each range condition in the each group of data set range conditions.

[0094] The real-time data set acquisition unit is configured to merge and de-duplicate the plurality of target devices corresponding to each range condition to obtain a real-time device data set corresponding to the each group of data set range conditions.

[0095] In some embodiments, the data set update module 12 comprises:

[0096] The to-be-deleted data set determination unit is configured to determine a deletion device identifier corresponding to a device deletion event when the device deletion event is listened to, and query a relationship data table recording the correspondence between identifiers of real-time device data sets and device identifiers based on the deletion device identifier to determine a to-be-deleted device data set corresponding to the deletion device identifier from the plurality of real-time device data sets.

[0097] The device deletion unit is configured to delete devices corresponding to the deletion device identifier in the to-be-deleted device data set to obtain a real-time device data set after deletion.

[0098] In some embodiments, the data set update module 12 comprises:

[0099] The identifier range condition determination unit is configured to determine a new device identifier corresponding to a device addition event when the device addition event is listened to, and determine a device identifier range condition based on the new device identifier.

[0100] The first condition combination unit is configured to combine the device identification range condition and the plurality of groups of data set range conditions corresponding to the plurality of real-time device data sets, respectively, to obtain a plurality of groups of first combined range conditions corresponding to the plurality of real-time device data sets.

[0101] The second device query unit is configured to query all devices based on each group of the first combined range conditions to obtain a query result corresponding to each group of the first combined range conditions.

[0102] The device adding unit is configured to determine, from the plurality of real-time device data sets, a to-be-added device data set corresponding to the first combined range condition with a non-empty query result, and add a device corresponding to the added device identification to the to-be-added device data set to obtain an added real-time device data set.

[0103] In some embodiments, the data set repair module 13 comprises:

[0104] The temporary data set determination unit is configured to, if the repair operation is a first triggered checking operation, query all devices based on the data set range condition corresponding to each real-time device data set to determine a first temporary device data set based on the queried devices.

[0105] The first determination unit is configured to, if there is a to-be-deleted missing device of the first temporary device data set relative to each real-time device data set, determine that each real-time device data set needs to be deleted based on the to-be-deleted missing device.

[0106] The second determination unit is configured to, if there is a to-be-added missing device of the first temporary device data set relative to each real-time device data set, determine that each real-time device data set needs to be added based on the to-be-added missing device.

[0107] The third determination unit is configured to, if there is no missing device of the first temporary device data set relative to each real-time device data set, determine that each real-time device data set does not need to be repaired.

[0108] In some embodiments, the data set repair module 13 comprises:

[0109] The first repair unit is configured to, if the repair operation is a non-first triggered checking operation for a missing deleted device, query all devices based on the data set range condition corresponding to each real-time device data set to obtain a second temporary device data set, and determine whether to repair each real-time device data set based on a comparison result of the second temporary device data set and each real-time device data set.

[0110] The second condition combination unit is configured to, if the repair operation is a non-first triggered check operation for a missing newly added device, determine a current repair time, construct a time range condition based on the current repair time and a last repair time, and determine a second combined range condition based on the time range condition and a data set range condition corresponding to each real-time device data set;

[0111] The second repair unit is configured to query all devices based on the second combined range condition to obtain a third temporary device data set, and determine whether to repair each real-time device data set based on a comparison result of the third temporary device data set and each real-time device data set.

[0112] In some embodiments, the notification sending module 14 includes:

[0113] The deletion notification sending unit is configured to, if a deletion event of any real-time device data set in the plurality of real-time device data sets is monitored, send a data set deletion notification including an identifier of the any real-time device data set, and an event identifier and an event type corresponding to the deletion event to a service application corresponding to the any real-time device data set.

[0114] The modification notification sending unit is configured to, if a modification event of a device in the any real-time device data set is monitored, send a data set modification notification including an identifier of the any real-time device data set, an event identifier and an event type corresponding to the modification event, a device to be modified and a type to be modified corresponding to the modification event to a service application corresponding to the any real-time device data set.

[0115] Further, the present application also discloses an electronic device, Figure 6 is an electronic device 20 structure diagram according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the present application.

[0116] Figure 6 An electronic device 20 structure diagram is provided for the embodiments of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is used to store a computer program, the computer program is loaded and executed by the processor 21 to realize the related steps in the device data set management method disclosed in any of the preceding embodiments. In addition, the electronic device 20 in the present embodiment can be an electronic computer.

[0117] In this embodiment, the power supply 23 is configured to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 is configured to create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which will not be limited herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which will not be limited herein.

[0118] In addition, the memory 22 as a carrier of resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0119] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the device data set management method executed by the electronic device 20 disclosed in any of the preceding embodiments, the computer program 222 can further include a computer program capable of completing other specific work.

[0120] Further, the present application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the device data set management method disclosed above. For the specific steps of the method, please refer to the corresponding content disclosed in the preceding embodiments, which will not be repeated here.

[0121] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. For the same or similar parts between the embodiments, please refer to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and please refer to the method part for the relevant part.

[0122] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0123] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The

[0124] Finally, it should be noted that the terms "first" and "second", and the like, are used herein only to distinguish one from another, without necessarily implying a physical or chronological order or relationship. Also, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus.

[0125] The above detailed description of the technical solutions provided by the present application has been described in detail, and the principles and implementation modes of the present application have been described by applying specific examples. The above description of the embodiments is only to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description of the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method for managing device datasets, characterized in that, include: By using a pre-defined dataset model, the corresponding target device is queried from all devices based on several sets of dataset range conditions to obtain several real-time device datasets. When a device change event is detected, the change device identifier corresponding to the device change event is determined, and the device dataset to be changed is determined from the plurality of real-time device datasets based on the change device identifier. The device dataset to be changed is then updated to obtain the updated real-time device dataset. Repair operations are triggered for each real-time device dataset based on the time period corresponding to each real-time device dataset in the plurality of real-time device datasets. Temporary device datasets are determined based on the dataset range conditions corresponding to each real-time device dataset. The comparison results between the temporary device dataset and each real-time device dataset determine whether to repair each real-time device dataset. If so, each real-time device dataset is repaired to obtain the repaired real-time device dataset. If an update event is detected for any of the aforementioned real-time device datasets, a dataset update notification is sent to the business application corresponding to that real-time device dataset. The step of determining a temporary device dataset based on the dataset range conditions corresponding to each real-time device dataset, and determining whether to repair each real-time device dataset based on the comparison results between the temporary device dataset and each real-time device dataset, includes: If the repair operation is the first-time triggered inspection operation, then all devices are queried based on the dataset range conditions corresponding to each real-time device dataset, so as to determine the first temporary device dataset based on the queried devices. If the first temporary device dataset contains missing devices relative to each real-time device dataset, it is determined that each real-time device dataset needs to be deleted based on the missing devices. If the first temporary device dataset contains missing devices relative to each real-time device dataset, it is determined that each real-time device dataset needs to be added based on the missing devices. If the first temporary device dataset does not have any missing devices relative to each real-time device dataset, then it is determined that no repair is needed for each real-time device dataset.

2. The device dataset management method according to claim 1, characterized in that, The process involves querying the corresponding target device from all devices based on several sets of dataset range conditions using a preset dataset model, to obtain several real-time device datasets, including: By querying all devices based on the range conditions of each set of datasets using a preset dataset model, several target devices corresponding to each range condition in each set of dataset range conditions are obtained. The target devices corresponding to each of the range conditions are merged and deduplicated to obtain the real-time device dataset corresponding to each set of dataset range conditions.

3. The device dataset management method according to claim 1, characterized in that, Upon detecting a device change event, the process of determining the changed device identifier corresponding to the device change event, determining the device dataset to be changed from the plurality of real-time device datasets based on the changed device identifier, and updating the device dataset to be changed to obtain an updated real-time device dataset includes: When a device deletion event is detected, the deletion device identifier corresponding to the device deletion event is determined, and the relationship data table used to record the correspondence between identifiers and device identifiers in real-time device datasets is queried based on the deletion device identifier, so as to determine the device dataset to be deleted corresponding to the deletion device identifier from the plurality of real-time device datasets. The devices corresponding to the device identifier to be deleted in the device dataset to be deleted are deleted to obtain the real-time device dataset after deletion.

4. The device dataset management method according to claim 1, characterized in that, Upon detecting a device change event, the process of determining the changed device identifier corresponding to the device change event, determining the device dataset to be changed from the plurality of real-time device datasets based on the changed device identifier, and updating the device dataset to be changed to obtain an updated real-time device dataset includes: When a device addition event is detected, the identification of the new device corresponding to the device addition event is determined, and the range conditions of the device identification are determined based on the new device identification. The range conditions of the datasets corresponding to the real-time device datasets and the range conditions of the device identifiers are combined respectively to obtain the range conditions of the first combination corresponding to the real-time device datasets. Based on the range conditions of the first combination of each group, all devices are queried to obtain the query results corresponding to the range conditions of the first combination of each group. From the plurality of real-time device datasets, determine the dataset of devices to be added that corresponds to the first combined range condition where the query result is not empty, and add the device corresponding to the new device identifier to the dataset of devices to be added, so as to obtain the new real-time device dataset.

5. The device dataset management method according to claim 1, characterized in that, The step of determining a temporary device dataset based on the dataset range conditions corresponding to each real-time device dataset, and determining whether to repair each real-time device dataset based on the comparison results between the temporary device dataset and each real-time device dataset, includes: If the repair operation is a check operation for missed deleted devices that is not triggered for the first time, then all devices are queried based on the dataset range conditions corresponding to each real-time device dataset to obtain a second temporary device dataset, and the comparison result between the second temporary device dataset and each real-time device dataset determines whether to repair each real-time device dataset. If the repair operation is a check operation for a missed new device that is not triggered for the first time, then the current repair time is determined, and a time range condition is constructed based on the current repair time and the previous repair time, and a second combined range condition is determined based on the time range condition and the dataset range condition corresponding to each real-time device dataset. Based on the second combined range condition, all devices are queried to obtain a third temporary device dataset. Based on the comparison result between the third temporary device dataset and each real-time device dataset, it is determined whether to repair each real-time device dataset.

6. The device dataset management method according to any one of claims 1 to 5, characterized in that, If an update event is detected for any of the plurality of real-time device datasets, a dataset update notification is sent to the business application corresponding to that real-time device dataset, including: If a deletion event is detected for any of the aforementioned real-time device datasets, a dataset deletion notification containing the identifier of the real-time device dataset and the event identifier and event type corresponding to the deletion event is sent to the business application corresponding to the real-time device dataset. If a modification event to a device in any of the real-time device datasets is detected, a dataset modification notification containing the identifier of any of the real-time device datasets, the event identifier and event type corresponding to the modification event, the device to be modified and the type to be modified corresponding to the modification event is sent to the business application corresponding to any of the real-time device datasets.

7. A device for managing equipment datasets, characterized in that, include: The device query module is used to query the corresponding target device from all devices based on several sets of dataset range conditions using a preset dataset model, so as to obtain several real-time device datasets. The dataset update module is used to determine the changed device identifier corresponding to the device change event when a device change event is detected, and to determine the device dataset to be changed from the plurality of real-time device datasets based on the changed device identifier, and to update the device dataset to be changed to obtain the updated real-time device dataset. The dataset repair module is used to trigger a repair operation on each real-time device dataset based on the time period corresponding to each real-time device dataset in the plurality of real-time device datasets, to determine a temporary device dataset based on the dataset range condition corresponding to each real-time device dataset, and to determine whether to repair each real-time device dataset based on the comparison result between the temporary device dataset and each real-time device dataset. If so, the real-time device dataset is repaired to obtain the repaired real-time device dataset. The notification sending module is used to send a dataset update notification to the business application corresponding to any of the real-time device datasets if an update event is detected in any of the plurality of real-time device datasets. The dataset repair module includes: A temporary data set determination unit is used to query all devices based on the data set range conditions corresponding to each real-time device data set if the repair operation is a first-time triggered inspection operation, so as to determine the first temporary device data set based on the queried devices. The first determination unit is configured to determine that if there are missing devices to be deleted in the first temporary device dataset relative to each real-time device dataset, then it is necessary to delete each real-time device dataset based on the missing devices to be deleted. The second determination unit is used to determine that if there are missing devices to be added in the first temporary device dataset relative to each real-time device dataset, then it is necessary to add devices to each real-time device dataset based on the missing devices to be added. The third determination unit is used to determine that if the first temporary device dataset does not have any missing devices relative to each real-time device dataset, then it is not necessary to repair each real-time device dataset.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the device dataset management method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the device dataset management method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Equipment data query method and device, server and computer readable storage medium

    CN114356958A

  • Method for automatically updating data of functional equipment group of nuclear power plant

    CN114661731A