Information acquisition method and system based on multiple data sources of Internet of Things, and storage medium
By introducing intermediate modules into the IoT data acquisition system, processing and recording data when the number of acquisition modules changes, the problem of unstable acquisition process caused by the number of acquisition nodes is solved, and the stability and security of data acquisition are achieved.
Patent Information
- Application Number
- CN202411934507.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The existing IoT data acquisition system cannot adapt to the situation where the total number of all acquisition nodes changes, resulting in unstable acquisition process when the number of nodes changes.
Set up the intermediate module to receive monitoring data sent by different acquisition modules and transmit it to the remote module for management after receiving the data. When the number of acquisition modules changes, the intermediate module performs specific processing and recording to ensure the normal progress of data acquisition.
Through the processing and recording mechanism of the intermediate module, the stability and security of data acquisition can be maintained when the number of acquisition modules changes, and the problems of interference and data loss during the acquisition process can be avoided.
Smart Images

Figure CN119814824A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information collection, and in particular relates to an information collection method, system and storage medium based on multiple data sources of the Internet of Things. Background Art
[0002] At present, the method of collecting monitoring data from different monitoring points through the Internet of Things technology and conducting comprehensive analysis on different monitoring data is becoming more and more common. The Chinese patent application with publication number CN115834628A discloses an Internet of Things data collection system, including multiple information collection points, multiple information collection points are connected to the monitoring end, the monitoring end includes a server connected to the multiple information collection points, the server is connected to a display screen and a PC end, and is wirelessly connected to an intelligent terminal. A single information collection point includes a temperature and humidity sensor, a wind direction, an wind speed detector, and a rainfall detection sensor. The temperature and humidity sensor, the wind direction, an wind speed detector, and the rainfall detection sensor are connected to a control processing unit, and the control processing unit is connected to a communication unit. When the data in the local area exceeds the set threshold, an early warning is issued through the intelligent terminal or the PC end. In addition, the patent application with publication number WO2020248274A1 discloses a smart Internet of Things information collection and transmission system, which includes a cloud server and a data gateway. The cloud server is configured with a data analysis unit and a command controller. The data gateway is connected to the remote server and the information sensor. The data gateway is configured with a command distributor, which receives the collection frequency command sent by the command controller and sends the collection frequency command to the information sensor. The smart Internet of Things information collection and transmission system can change the collection data request frequency according to the change of the information flow. However, the above patent application cannot adapt to the situation where the total number of all collection nodes changes. Summary of the invention
[0003] The present invention sets an intermediate module to receive monitoring data sent by different acquisition modules, transmits multiple monitoring data to the remote module for data management, and the intermediate module also selects to execute the first processing to the fourth processing when the total number of all acquisition modules changes. The purpose of the present invention is to adapt to the situation where the total number of all acquisition modules changes during the collection of monitoring data.
[0004] In order to achieve the above-mentioned purpose of the invention, the present invention provides the following information collection method based on multiple data sources of the Internet of Things, which mainly includes the following steps:
[0005] S1, setting a number of acquisition modules to respectively collect monitoring data, and at the same time, different acquisition modules respectively send their own monitoring data to the intermediate module, and the intermediate module continues to transmit the received monitoring data to the remote module after receiving the monitoring data each time;
[0006] S2, the remote module receives the monitoring data sent by the intermediate module, and the remote module determines whether the total number of different monitoring data currently received is greater than a preset total number threshold. If it is greater, all the monitoring data are divided into three data groups, and for each data group, corresponding priority data management is performed based on the characteristic value corresponding to the data group. If it is not greater, the remote module continues to receive the monitoring data sent by the intermediate module;
[0007] S3. When the total number of all the acquisition modules changes, the intermediate module receives the monitoring data, records the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, and the intermediate module determines whether the recorded code exists in the first record table. If not, the intermediate module performs a first process and then performs a second process. If yes, the intermediate module continues to determine whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset conditions. If yes, the intermediate module performs a second process. If not, the intermediate module performs a third process and the intermediate module performs a fourth process. The intermediate module records the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table.
[0008] As a preferred technical solution of the present invention, the intermediate module stores a first record table and a second record table, the data records in the first record table correspond to two data rows, and the data records sequentially include codes occupying the upper and lower data rows, approval marks occupying the upper and lower data rows, several second times occupying the upper data row, and several time difference values occupying the lower data row; the data records in the second record table correspond to several data rows, and the data records sequentially include the first code occupying all data rows, several second codes occupying the upper and lower data rows, several specific values occupying the upper and lower data rows, several first time difference values occupying the upper data row corresponding to each second code, and several second time difference values occupying the lower data row corresponding to each second code.
[0009] As a preferred technical solution of the present invention, the first time corresponding to the monitoring data refers to the time when the corresponding acquisition module sends the monitoring data, and the second time corresponding to the monitoring data refers to the time when the intermediate module receives the monitoring data.
[0010] As a preferred technical solution of the present invention, the intermediate module performs the first processing, including the following steps:
[0011] S311, recording the code of the acquisition module that sends the monitoring data as the code in the first record table, setting the corresponding approval flag in the first record table to 0, and recording the code of the acquisition module that sends the monitoring data as the first code in the second record table;
[0012] S312. Collect different codes in the first record table, as well as several time difference values occupying the lower data rows corresponding to different codes, and add the different codes into the second record table corresponding to the added first codes, and add several time difference values occupying the lower data rows corresponding to each code in sequence as several first time difference values occupying the upper data rows corresponding to the corresponding added second codes.
[0013] As a preferred technical solution of the present invention, the intermediate module performs the second processing, comprising the following steps:
[0014] S321, determining a second time corresponding to the monitoring data, a third time before the second time corresponding to the monitoring data and separated by a preset time interval, and a fourth time before the second time corresponding to the monitoring data and separated by twice the preset time interval;
[0015] S322, based on the first record table, determining whether other monitoring data is received within the time interval from the fourth time to the second time corresponding to the monitoring data, the other monitoring data referring to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval identifier with the content of 0 in the first record table, if yes, ending the second processing, if no, proceeding to the next step;
[0016] S323. Based on the first record table, determine whether other monitoring data is received within the time interval from the third time to the second time corresponding to the monitoring data, where the other monitoring data refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval mark with content 1 in the first record table. If not, terminate the second processing; if yes, determine the lower data row corresponding to the code of the acquisition module that sends the other monitoring data in the data record corresponding to the code of the acquisition module that sends the monitoring data in the second record table, record the time difference corresponding to the other monitoring data as the second time difference of the lower data row, and terminate the second processing.
[0017] As a preferred technical solution of the present invention, the intermediate module performs the third processing, including the following steps:
[0018] S331, determining the second time corresponding to the monitoring data, and the fifth time separated by a preset time interval before the second time corresponding to the monitoring data, and judging whether other monitoring data is received within the time interval from the fifth time to the second time corresponding to the monitoring data based on the first record table, the other monitoring data refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval identifier with the content of 0 in the first record table, if not, ending the third processing, if yes, proceeding to the next step;
[0019] S332. Determine whether the total number of other monitoring data received is multiple. If so, end the third processing; if not, determine the lower data row corresponding to the code of the acquisition module that sends the monitoring data in the data record corresponding to the code of the acquisition module that sends the other monitoring data in the second record table, record the time difference corresponding to the monitoring data as the second time difference of the lower data row, and end the third processing.
[0020] As a preferred technical solution of the present invention, the intermediate module performs the fourth processing, comprising the following steps:
[0021] S341, counting the total number of the added second time difference values in the lower data row to which the second time difference value is added in the second record table, and determining whether the total number is greater than or equal to a preset total number threshold, if not, ending the fourth process, if yes, proceeding to the next step;
[0022] S342, performing a specific operation based on all the second time difference values in the lower data row to which the second time difference value is added and all the first time difference values in the upper data row above the lower data row in the second record table, and recording the operation result as a specific value corresponding to both the lower data row and the upper data row;
[0023] S343. Determine whether the specific numerical value is greater than a preset specific numerical value threshold. If so, delete the data record containing the first code corresponding to the specific numerical value in the second record, and set the approval flag to -1 in the data record corresponding to the first code in the first record table. If not, delete the data record containing the first code corresponding to the specific numerical value in the second record, and set the approval flag to 1 in the data record corresponding to the first code in the first record table.
[0024] As a preferred technical solution of the present invention, the process in which the remote module divides all the monitoring data into three data groups includes: calculating the first standard data based on all the monitoring data, calculating the difference between each monitoring data and the first standard data, dividing a number of monitoring data whose corresponding difference is less than or equal to a preset first difference threshold into a first data group, dividing a number of monitoring data whose corresponding difference is greater than the preset first difference threshold into a second data group, and calculating the second standard data based on all the monitoring data in the second data group, calculating the difference between each monitoring data and the second standard data, dividing a number of monitoring data whose corresponding difference is greater than the preset second difference threshold into a third data group, and assigning a first characteristic value to each monitoring data in the first data group, assigning a second characteristic value to each monitoring data in the second data group, and assigning a third characteristic value to each monitoring data in the third data group, the first characteristic value is less than the second characteristic value, the second characteristic value is less than the third characteristic value, and using the formula for each data group Calculate the corresponding eigenvalue, where δ m is the characteristic value of the mth data group, n is the total number of monitoring data contained in the mth data group, α mi is a weight value set according to the type of the acquisition module that sends the i-th monitoring data in the m-th data group, β m is the mth eigenvalue corresponding to the mth data group.
[0025] The present invention also provides an information collection system based on multiple data sources of the Internet of Things, including the following modules:
[0026] an intermediate module, for continuing to transmit the monitoring data to the remote module after each monitoring data is received, and for receiving the monitoring data when the total number of all the acquisition modules changes, recording the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, judging whether the recorded code exists in the first record table, and if not, performing the first processing, and then performing the second processing, and if yes, continuing to judge whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset condition, and if yes, performing the second processing, and if not, performing the third processing, and then performing the fourth processing, and recording the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table;
[0027] The acquisition module is used to collect monitoring data and send its own monitoring data to the intermediate module;
[0028] The remote module is used to receive the monitoring data sent by the intermediate module and determine whether the total number of different monitoring data currently received is greater than a preset total number threshold. If so, all the monitoring data are divided into N data groups. For each data group, corresponding priority data management is performed based on the characteristic values corresponding to the data group. If not, the monitoring data sent by the intermediate module continues to be received.
[0029] The present invention also provides a storage medium, wherein the storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute any one of the above methods.
[0030] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0031] In the present invention, first, different acquisition modules send their own monitoring data to the intermediate module respectively, and the intermediate module continues to transmit the received monitoring data to the remote module after receiving the monitoring data each time; secondly, after receiving a certain amount of monitoring data, the remote module divides all the monitoring data into three data groups, and performs data management of corresponding priority based on the characteristic value corresponding to each data group; finally, when the total number of all acquisition modules changes, the intermediate module receives the monitoring data, determines whether there is a recorded code in the first record table, and in the case of no, performs the first processing, then performs the second processing, and in the case of yes, continues to determine whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset condition, in the case of yes, performs the second processing, in the case of no, performs the third processing, and then performs the fourth processing, and also records the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table. The present invention can not only ensure that other acquisition modules that interfere with the original acquisition module are not added during the acquisition process, thereby ensuring the normal progress of the acquisition process, but also ensure the security of a large amount of monitoring data collected by different acquisition modules. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flowchart of the steps of the information collection method based on multiple data sources of the Internet of Things of the present invention;
[0033] Figure 2 This is a structural diagram of the information collection system based on multiple data sources of the Internet of Things of the present invention. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0035] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0036] References Figure 1 As shown, the present invention provides an information collection method based on multiple data sources of the Internet of Things, which is implemented by executing the following main steps:
[0037] S1. Several acquisition modules are set to collect monitoring data respectively. At the same time, different acquisition modules send their own monitoring data to the intermediate module respectively. After receiving the monitoring data each time, the intermediate module continues to transmit the received monitoring data to the remote module;
[0038] S2. The remote module receives the monitoring data sent by the intermediate module, and determines whether the total number of different monitoring data currently received is greater than a preset total number threshold. If so, the remote module divides all the monitoring data into three data groups, and performs data management with corresponding priority based on the characteristic values corresponding to the data groups for each data group. If not, the remote module continues to receive the monitoring data sent by the intermediate module.
[0039] S3. When the total number of all acquisition modules changes, the intermediate module receives the monitoring data, records the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, and the intermediate module determines whether the recorded code exists in the first record table. If not, the intermediate module performs the first processing, and then performs the second processing. If yes, the intermediate module continues to determine whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset condition. If yes, the intermediate module performs the second processing. If not, the intermediate module performs the third processing, and the intermediate module performs the fourth processing. The intermediate module records the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table;
[0040] Furthermore, the first time corresponding to the monitoring data refers to the time when the corresponding acquisition module sends the monitoring data, and the second time corresponding to the monitoring data refers to the time when the intermediate module receives the monitoring data.
[0041] Specifically, first, several acquisition modules respectively collect monitoring data of different monitoring points, and each acquisition module sends its own monitoring data to the intermediate module. After receiving the monitoring data each time, the intermediate module continues to transmit the received monitoring data to the remote module. Secondly, the remote module receives the monitoring data sent by the intermediate module, and at the same time determines whether the total number of different monitoring data currently received is greater than the total number threshold. The total number threshold is set in the actual application scenario. If it is greater, all the monitoring data are divided into three data groups. The division process will be described below. For each data group, the corresponding priority data management is performed based on the characteristic value corresponding to the data group. If it is not greater, the monitoring data sent by the intermediate module continues to be received. Finally, when the total number of all acquisition modules changes, which in this embodiment specifically refers to the situation where the total number of acquisition modules increases, the intermediate module receives monitoring data, records the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, wherein the first time corresponding to the monitoring data refers to the time when the corresponding acquisition module sends the monitoring data, and the second time corresponding to the monitoring data refers to the time when the intermediate module receives the monitoring data. The intermediate module determines whether there is a recorded code in the first record table. If not, a first process is performed, followed by a second process. If so, the first record table is referenced to determine whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset conditions. In this embodiment, when the approval mark in the data record corresponding to the recorded code in the first record table is 0 , the correspondence here means that the code in the data record is the same as the recorded code, and it is determined that the acquisition process of the acquisition module corresponding to the recorded code meets the preset conditions. If so, that is, when the acquisition process of the acquisition module corresponding to the recorded code is approved as unknown, the second processing is performed, if not, that is, when the acquisition process of the acquisition module corresponding to the recorded code is approved, the third processing is performed, on this basis, the intermediate module performs the fourth processing, and also determines the data record corresponding to the recorded code in the first record table, and records the second time corresponding to the monitoring data, and the time difference between the second time corresponding to the monitoring data and the first time corresponding to the monitoring data into the data record. The specific processes of the first processing to the fourth processing will be described below. It should be noted that in this step, the intermediate module still sends the received monitoring data to the remote module.
[0042] Furthermore, the intermediate module stores a first record table and a second record table, the data records in the first record table correspond to two data rows, and the data records sequentially include codes occupying the upper and lower data rows, approval marks occupying the upper and lower data rows, several second times occupying the upper data row, and several time difference values occupying the lower data row; the data records in the second record table correspond to several data rows, and the data records sequentially include first codes occupying all data rows, several second codes occupying the upper and lower data rows, several specific values occupying the upper and lower data rows, several first time difference values occupying the upper data row corresponding to each second code, and several second time difference values occupying the lower data row corresponding to each second code.
[0043] Specifically, the first record table and the second record table are introduced here. The data records in the first record table correspond to two data rows. The data records sequentially include codes occupying the upper and lower data rows, approval marks occupying the upper and lower data rows, a number of second times occupying the upper data row, and a number of time differences occupying the lower data row. For ease of understanding, for example, a data record is "101" corresponds to the code, "1" corresponds to the approval mark, "79" corresponds to a second time occupying the upper data row, indicating that a monitoring data sent by the acquisition module coded "101" arrives at the middle module at the 79th second, and "10" corresponds to a time difference occupying the lower data row, indicating the time difference corresponding to the same monitoring data sent by the acquisition module coded "101", specifically the second time corresponding to the monitoring data minus the first time corresponding to the monitoring data. In addition, the data records in the second record table correspond to several data rows, and the data records sequentially include a first code occupying all data rows, several second codes occupying the upper and lower data rows, several specific values occupying the upper and lower data rows, several first time differences corresponding to each second code occupying the upper data row, and several second time differences corresponding to each second code occupying the lower data row. For ease of understanding, for example, a data record is "103" corresponds to the first code, "101" corresponds to the second code, "0.3" corresponds to a specific value, "10" corresponds to a first time difference value occupying the upper data row, indicating the time difference value corresponding to a monitoring data sent by the acquisition module coded as "101" before the newly added acquisition module coded as "103", and "20" corresponds to a second time difference value occupying the lower data row, indicating the time difference value corresponding to a monitoring data sent by the acquisition module coded as "101" after the newly added acquisition module coded as "103".
[0044] Furthermore, the intermediate module performs a first process, comprising the following steps:
[0045] S311, recording the code of the collection module that sends the monitoring data as the code in the first record table, setting the corresponding approval flag in the first record table to 0, and recording the code of the collection module that sends the monitoring data as the first code in the second record table;
[0046] S312. Collect different codes in the first record table, as well as several time difference values occupying the lower data rows corresponding to different codes, and add the different codes into the second record table corresponding to the added first codes, and add several time difference values occupying the lower data rows corresponding to each code in sequence as several first time difference values occupying the upper data rows corresponding to the corresponding added second codes.
[0047] Specifically, the process of the first processing is introduced here. First, a new data record is created in the first record table, and the code of the acquisition module that sends the monitoring data is recorded as the code in this data record. The approval mark in this data record is set to 0, indicating that it is temporarily unable to decide whether to approve the acquisition process of the acquisition module that sends the monitoring data. A new data record is created in the second record table, and the code of the acquisition module that sends the monitoring data is recorded as the first code in this data record. Secondly, different codes are collected in the first record table, and the time difference values that occupy the lower data row corresponding to different codes are respectively collected. It should be noted that in this embodiment, the initial first record table is not empty, and the first record table can be filled in the process of executing S1. For each code, the code is added as the second code corresponding to the added first code in the second record table, and the time difference values that occupy the lower data row corresponding to the code are sequentially added as the first time difference values that occupy the upper data row corresponding to the added second code.
[0048] Further, the intermediate module performs a second process, comprising the following steps:
[0049] S321, determining a second time corresponding to the monitoring data, a third time before the second time corresponding to the monitoring data and separated by a preset time interval, and a fourth time before the second time corresponding to the monitoring data and separated by twice the preset time interval;
[0050] S322, based on the first record table, determining whether other monitoring data is received within the time interval from the fourth time to the second time corresponding to the monitoring data, the other monitoring data referring to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval identifier with the content of 0 in the first record table, if yes, ending the second processing, if no, proceeding to the next step;
[0051] S323. Based on the first record table, determine whether other monitoring data is received within the time interval from the third time to the second time corresponding to the monitoring data, where the other monitoring data refers to the monitoring data sent by the collection module corresponding to the code corresponding to the approval mark with content 1 in the first record table. If not, terminate the second processing. If yes, determine the lower data row corresponding to the code of the collection module sending the other monitoring data in the data record corresponding to the code of the collection module sending the monitoring data in the second record table, record the time difference corresponding to the other monitoring data as the second time difference of the lower data row, and terminate the second processing.
[0052] Specifically, the process of the second processing is introduced here. First, determine the second time corresponding to the monitoring data, the third time before the second time corresponding to the monitoring data and separated by a preset time interval, and the fourth time before the second time corresponding to the monitoring data and separated by twice the preset time interval. The preset time interval is set in the actual application scenario. Secondly, according to the first record table, determine whether other monitoring data is received in the time interval from the fourth time to the second time corresponding to the monitoring data. The other monitoring data here refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval mark with content 0 in the first record table. If yes, because multiple monitoring data sent by the corresponding acquisition module with approval mark 0 are received, it is unknown whether the acquisition process of the acquisition module with approval mark 0 is approved. Even if there is interference with the monitoring data sent by the corresponding acquisition module with approval mark 1, it is impossible to determine which acquisition module the interference with the monitoring data sent by the corresponding acquisition module with approval mark 1 is caused by, so the second processing is terminated. If not, continue to the next step. Finally, based on the first record table, determine whether other monitoring data is received within the time interval from the third time to the second time corresponding to the monitoring data. The other monitoring data here refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval mark with content 1 in the first record table. If not, since there is no monitoring data sent by the acquisition module with the corresponding approval mark of 1 that is interfered with, the second processing is terminated. If so, determine the data record corresponding to the code of the acquisition module that sends the monitoring data in the second record table. The correspondence here means that the first code in the data record is the same as the code of the acquisition module that sends the monitoring data. Determine the lower data row corresponding to the code of the acquisition module that sends other monitoring data in the data record. The code of the acquisition module that sends other monitoring data corresponds to the second code in the data record. Record the time difference corresponding to the other monitoring data as the second time difference of the lower data row, and terminate the second processing. If multiple other monitoring data are received, it is necessary to repeat the above operation before terminating the second processing.
[0053] Further, the intermediate module performs a third process, comprising the following steps:
[0054] S331, determining the second time corresponding to the monitoring data, and the fifth time separated by a preset time interval before the second time corresponding to the monitoring data, and judging whether other monitoring data is received within the time interval from the fifth time to the second time corresponding to the monitoring data based on the first record table, the other monitoring data refers to the monitoring data sent by the collection module corresponding to the code corresponding to the approval mark with the content of 0 in the first record table, if not, ending the third processing, if yes, proceeding to the next step;
[0055] S332. Determine whether the total number of other monitoring data received is multiple. If so, end the third processing. If not, determine the lower data row corresponding to the code of the acquisition module that sends the monitoring data in the data record corresponding to the code of the acquisition module that sends the other monitoring data in the second record table, record the time difference corresponding to the monitoring data as the second time difference of the lower data row, and end the third processing.
[0056] Specifically, the process of the third processing is introduced here. First, the second time corresponding to the monitoring data and the fifth time before the second time corresponding to the monitoring data and separated by a preset time interval are determined. Then, according to the first record table, it is determined whether other monitoring data are received in the time interval from the fifth time to the second time corresponding to the monitoring data. The other monitoring data here refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval mark with content 0 in the first record table. If not, since the monitoring data is not interfered by other monitoring data, the third processing is terminated. If yes, proceed to the next step. Secondly, determine whether the total number of other monitoring data received is multiple. If so, since it is impossible to determine which other monitoring data is interfering with the monitoring data, end the third processing. If not, determine in the second record table the data record corresponding to the code of the acquisition module that sends other monitoring data. The correspondence here means that the first code in the data record is the same as the code of the acquisition module that sends other monitoring data. Determine the lower data row corresponding to the code of the acquisition module that sends the monitoring data in the data record, and the code of the acquisition module that sends the monitoring data corresponds to the second code in the data record. Record the time difference corresponding to the monitoring data as the second time difference in the lower data row, and end the third processing.
[0057] Further, the intermediate module performs a fourth process, comprising the following steps:
[0058] S341, counting the total number of the added second time difference values in the lower data row to which the second time difference value is added in the second record table, and determining whether the total number is greater than or equal to a preset total number threshold, if not, ending the fourth process, if yes, proceeding to the next step;
[0059] S342, performing a specific operation based on all the second time difference values in the lower data row to which the second time difference value is added and all the first time difference values in the upper data row above the lower data row in the second record table, and recording the operation result as a specific value corresponding to both the lower data row and the upper data row;
[0060] S343. Determine whether the specific numerical value is greater than a preset specific numerical value threshold. If so, delete the data record containing the first code corresponding to the specific numerical value in the second record, and set the approval flag to -1 in the data record corresponding to the first code in the first record table. If not, delete the data record containing the first code corresponding to the specific numerical value in the second record, and set the approval flag to 1 in the data record corresponding to the first code in the first record table.
[0061] Specifically, the process of the fourth processing is introduced here. First, based on the processing results of the second processing or the third processing, the lower data row to which the second time difference is added is determined in the second record table, and the total number of second time difference values added up to the current time difference is counted in the lower data row, and it is determined whether the total number is greater than or equal to the total number threshold. The total number threshold is set under the actual application scenario. If not, the fourth processing is terminated. If so, proceed to the next step. Secondly, a specific operation is performed based on all the second time difference values in the lower data row to which the second time difference value is added in the second record table, and all the first time difference values in the upper data row above the lower data row. When the total number of all the first time difference values in the upper data row is different from the total number of all the second time difference values in the lower data row, a certain number of first time difference values are selected from all the first time difference values in the upper data row to participate in the specific operation. The certain number is the total number of all the second time difference values in the lower data row. The specific operation is an operation that can calculate the degree of deviation between two groups of values, such as an algorithm for calculating the Euclidean distance. After obtaining the operation result, the operation result is recorded as a specific value corresponding to the lower data row and the upper data row. Finally, determine whether the specific numerical value is greater than a specific numerical threshold. The specific numerical threshold is set in the actual application scenario. If so, because the acquisition process of the original acquisition module has been greatly affected after the new acquisition module is added, the data record where the first code corresponding to the specific numerical value is located is deleted from the second record, and the approval mark is set to -1 in the data record corresponding to the first code in the first record table. The correspondence here means that the code in the data record is the same as the first code, that is, it is not allowed to add an acquisition module, that is, the corresponding acquisition module is not allowed to send monitoring data again. If not, because the acquisition process of the original acquisition module has not been greatly affected after the new acquisition module is added, the data record where the first code corresponding to the specific numerical value is located is deleted from the second record, and the approval mark is set to 1 in the data record corresponding to the first code in the first record table, that is, it is allowed to add an acquisition module.
[0062] Further, the process of the remote module dividing all the monitoring data into three data groups includes: calculating the first standard data based on all the monitoring data, calculating the difference between each monitoring data and the first standard data, dividing a number of monitoring data whose corresponding difference is less than or equal to a preset first difference threshold into a first data group, dividing a number of monitoring data whose corresponding difference is greater than the preset first difference threshold into a second data group, and calculating the second standard data based on all the monitoring data in the second data group, calculating the difference between each monitoring data and the second standard data, dividing a number of monitoring data whose corresponding difference is greater than the preset second difference threshold into a third data group, and also assigning a first characteristic value to each monitoring data in the first data group, assigning a second characteristic value to each monitoring data in the second data group, and assigning a third characteristic value to each monitoring data in the third data group, the first characteristic value is less than the second characteristic value, the second characteristic value is less than the third characteristic value, and using the formula for each data group Calculate the corresponding eigenvalue, where δ m is the characteristic value of the mth data group, n is the total number of monitoring data contained in the mth data group, α mi is the weight value set according to the type of the acquisition module that sends the i-th monitoring data in the m-th data group, β m is the mth eigenvalue corresponding to the mth data group.
[0063] Specifically, here is introduced the process of the remote module dividing all the monitoring data into three data groups. First, the first standard data is calculated according to all the monitoring data. The first standard data is, for example, the average data of all the monitoring data. The difference between each monitoring data and the first standard data is calculated, and several monitoring data whose corresponding differences are less than or equal to the first difference threshold are divided into the first data group. Several monitoring data whose corresponding differences are greater than the first difference threshold are divided into the second data group. The first difference threshold is set in the actual application scenario. At this time, it is considered that the second data group is more important than the first data group. Secondly, the second standard data is calculated according to all the monitoring data in the second data group. The second standard data is, for example, The average data of all monitoring data is calculated, and the difference between each monitoring data and the second standard data is calculated. Several monitoring data whose corresponding difference is greater than the second difference threshold are divided into the third data group. The second difference threshold is set in the actual application scenario. The remaining monitoring data still belong to the second data group. At this time, it is considered that the third data group is more important than the second data group. Finally, the first characteristic value is assigned to each monitoring data in the first data group, the second characteristic value is assigned to each monitoring data in the second data group, and the third characteristic value is assigned to each monitoring data in the third data group. The first characteristic value is less than the second characteristic value, and the second characteristic value is less than the third characteristic value. Then, the formula is used for each data group. Calculate the corresponding eigenvalue, where δ m is the characteristic value of the mth data group, n is the total number of monitoring data contained in the mth data group, α mi is the weight value set according to the type of the acquisition module that sends the i-th monitoring data in the m-th data group. The larger the weight value, the more important the monitoring data of the corresponding type of acquisition module. m is the mth eigenvalue corresponding to the mth data group. The larger the eigenvalue corresponding to the data group, the more important the data group is.
[0064] The following describes how the remote module performs data management with corresponding priorities based on the characteristic values corresponding to the data groups. Following the above content, the more important the data group is, the higher the priority of its data management should be. The security of data management with high priority is better than that of data management with low priority. For ease of understanding, for example, the data group with the first-ranked corresponding characteristic value is encrypted and stored separately, and the other two data groups are stored together, but the data group with the second-ranked corresponding characteristic value is encrypted.
[0065] According to another aspect of the embodiment of the present invention, Figure 2 As shown, an information collection system based on multiple data sources of the Internet of Things is also provided, including an intermediate module, a collection module, and a remote module, which is used to implement the information collection method based on multiple data sources of the Internet of Things as described above.
[0066] The specific functions of each module are as follows:
[0067] The intermediate module is used to continue to transmit the monitoring data to the remote module after each monitoring data is received, and is used to receive the monitoring data when the total number of all the acquisition modules changes, record the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, determine whether the recorded code exists in the first record table, and if not, perform the first processing, and then perform the second processing, and if yes, continue to determine whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset condition, and if yes, perform the second processing, and if not, perform the third processing, and then perform the fourth processing, and record the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table;
[0068] The acquisition module is used to collect monitoring data and send its own monitoring data to the intermediate module;
[0069] The remote module is used to receive the monitoring data sent by the intermediate module and determine whether the total number of different monitoring data currently received is greater than a preset total number threshold. If so, all the monitoring data are divided into three data groups. For each data group, corresponding priority data management is performed based on the characteristic values corresponding to the data group. If not, the monitoring data sent by the intermediate module continues to be received.
[0070] According to another aspect of an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores program instructions, wherein when the program instructions are executed, a device where the storage medium is located is controlled to execute any one of the above methods.
[0071] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0072] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0073] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0074] The above embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
[0075] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An information collection method based on multiple data sources of the Internet of Things, characterized in that: The method comprises the following steps: S1, setting a number of acquisition modules to respectively collect monitoring data, and at the same time, different acquisition modules respectively send their own monitoring data to the intermediate module, and the intermediate module continues to transmit the received monitoring data to the remote module after receiving the monitoring data each time; S2, the remote module receives the monitoring data sent by the intermediate module, and the remote module determines whether the total number of different monitoring data currently received is greater than a preset total number threshold. If it is greater, all the monitoring data are divided into three data groups, and for each data group, corresponding priority data management is performed based on the characteristic value corresponding to the data group. If it is not greater, the remote module continues to receive the monitoring data sent by the intermediate module; S3. When the total number of all the acquisition modules changes, the intermediate module receives the monitoring data, records the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, and the intermediate module determines whether the recorded code exists in the first record table. If not, the intermediate module performs a first process and then performs a second process. If yes, the intermediate module continues to determine whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset conditions. If yes, the intermediate module performs a second process. If not, the intermediate module performs a third process and the intermediate module performs a fourth process. The intermediate module records the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table.
2. The method according to claim 1, characterized in that The intermediate module stores a first record table and a second record table, wherein the data records in the first record table correspond to two data rows, and the data records sequentially include codes occupying the upper and lower data rows, approval marks occupying the upper and lower data rows, several second times occupying the upper data row, and several time difference values occupying the lower data row; the data records in the second record table correspond to several data rows, and the data records sequentially include first codes occupying all data rows, several second codes occupying the upper and lower data rows, several specific values occupying the upper and lower data rows, several first time difference values occupying the upper data row corresponding to each second code, and several second time difference values occupying the lower data row corresponding to each second code.
3. The method according to claim 2, characterized in that The first time corresponding to the monitoring data refers to the time when the corresponding acquisition module sends the monitoring data, and the second time corresponding to the monitoring data refers to the time when the intermediate module receives the monitoring data.
4. The method according to claim 3, characterized in that: The intermediate module performs a first process, comprising the following steps: S311, recording the code of the acquisition module that sends the monitoring data as the code in the first record table, setting the corresponding approval flag in the first record table to 0, and recording the code of the acquisition module that sends the monitoring data as the first code in the second record table; S312. Collect different codes in the first record table, as well as several time difference values occupying the lower data rows corresponding to different codes, and add the different codes into the second record table corresponding to the added first codes, and add several time difference values occupying the lower data rows corresponding to each code in sequence as several first time difference values occupying the upper data rows corresponding to the corresponding added second codes.
5. The method according to claim 4, characterized in that The intermediate module performs the second processing, comprising the following steps: S321, determining a second time corresponding to the monitoring data, a third time before the second time corresponding to the monitoring data and separated by a preset time interval, and a fourth time before the second time corresponding to the monitoring data and separated by twice the preset time interval; S322, based on the first record table, determining whether other monitoring data is received within the time interval from the fourth time to the second time corresponding to the monitoring data, the other monitoring data referring to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval identifier with the content of 0 in the first record table, if yes, ending the second processing, if no, proceeding to the next step; S323. Based on the first record table, determine whether other monitoring data is received within the time interval from the third time to the second time corresponding to the monitoring data, where the other monitoring data refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval mark with content 1 in the first record table. If not, terminate the second processing; if yes, determine the lower data row corresponding to the code of the acquisition module that sends the other monitoring data in the data record corresponding to the code of the acquisition module that sends the monitoring data in the second record table, record the time difference corresponding to the other monitoring data as the second time difference of the lower data row, and terminate the second processing.
6. The method according to claim 5, characterized in that The intermediate module performs the third processing, comprising the following steps: S331, determining the second time corresponding to the monitoring data, and the fifth time separated by a preset time interval before the second time corresponding to the monitoring data, and judging whether other monitoring data is received within the time interval from the fifth time to the second time corresponding to the monitoring data based on the first record table, the other monitoring data refers to the monitoring data sent by the acquisition module corresponding to the code corresponding to the approval identifier with the content of 0 in the first record table, if not, ending the third processing, if yes, proceeding to the next step; S332. Determine whether the total number of other monitoring data received is multiple. If so, end the third processing; if not, determine the lower data row corresponding to the code of the acquisition module that sends the monitoring data in the data record corresponding to the code of the acquisition module that sends the other monitoring data in the second record table, record the time difference corresponding to the monitoring data as the second time difference of the lower data row, and end the third processing.
7. The method according to claim 6, characterized in that The intermediate module performs the fourth processing, comprising the following steps: S341, counting the total number of the added second time difference values in the lower data row to which the second time difference value is added in the second record table, and determining whether the total number is greater than or equal to a preset total number threshold, if not, ending the fourth process, if yes, proceeding to the next step; S342, performing a specific operation based on all the second time difference values in the lower data row to which the second time difference value is added and all the first time difference values in the upper data row above the lower data row in the second record table, and recording the operation result as a specific value corresponding to both the lower data row and the upper data row; S343. Determine whether the specific numerical value is greater than a preset specific numerical value threshold. If so, delete the data record containing the first code corresponding to the specific numerical value in the second record, and set the approval flag to -1 in the data record corresponding to the first code in the first record table. If not, delete the data record containing the first code corresponding to the specific numerical value in the second record, and set the approval flag to 1 in the data record corresponding to the first code in the first record table.
8. The method according to claim 1, characterized in that: The process of the remote module dividing all the monitoring data into three data groups includes: calculating the first standard data based on all the monitoring data, calculating the difference between each monitoring data and the first standard data, dividing a number of monitoring data whose corresponding difference is less than or equal to a preset first difference threshold into a first data group, dividing a number of monitoring data whose corresponding difference is greater than the preset first difference threshold into a second data group, and calculating the second standard data based on all the monitoring data in the second data group, calculating the difference between each monitoring data and the second standard data, dividing a number of monitoring data whose corresponding difference is greater than the preset second difference threshold into a third data group, and also assigning a first characteristic value to each monitoring data in the first data group, assigning a second characteristic value to each monitoring data in the second data group, and assigning a third characteristic value to each monitoring data in the third data group, the first characteristic value is less than the second characteristic value, the second characteristic value is less than the third characteristic value, and using the formula for each data group Calculate the corresponding eigenvalue, where δ m is the characteristic value of the mth data group, n is the total number of monitoring data contained in the mth data group, α mi is a weight value set according to the type of the acquisition module that sends the i-th monitoring data in the m-th data group, β m is the mth eigenvalue corresponding to the mth data group.
9. An information collection system based on multiple data sources of the Internet of Things, used to implement the method according to any one of claims 1 to 8, characterized in that: Includes the following modules: an intermediate module, for continuing to transmit the monitoring data to the remote module after each monitoring data is received, and for receiving the monitoring data when the total number of all the acquisition modules changes, recording the code of the acquisition module that sends the monitoring data, the first time corresponding to the monitoring data, and the second time corresponding to the monitoring data, judging whether the recorded code exists in the first record table, and if not, performing the first processing, and then performing the second processing, and if yes, continuing to judge whether the acquisition process of the acquisition module corresponding to the recorded code meets the preset condition, and if yes, performing the second processing, and if not, performing the third processing, and then performing the fourth processing, and recording the second time corresponding to the monitoring data and the time difference between the second time corresponding to the monitoring data and the first time in the first record table; The acquisition module is used to collect monitoring data and send its own monitoring data to the intermediate module; The remote module is used to receive the monitoring data sent by the intermediate module and determine whether the total number of different monitoring data currently received is greater than a preset total number threshold. If so, all the monitoring data are divided into N data groups. For each data group, corresponding priority data management is performed based on the characteristic values corresponding to the data group. If not, the monitoring data sent by the intermediate module continues to be received.
10. A storage medium, characterized in that: The storage medium stores program instructions, wherein when the program instructions are executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Monitoring data acquisition method and device, computer equipment and storage medium
CN115481168A
Industrial control and automation method and device based on Internet of Things and electronic equipment
CN116405532A
Method for detecting networking performance of Internet of Things system and improving stability
CN117955850A
Distributed data acquisition system based on Internet of Things
CN118034148A
Agricultural planting management method and system based on Internet of Things
CN118590532A
Cited By
Freeze-drying remote monitoring method and system based on Internet of Things and storage medium
CN120143721A