A sensor data acquisition method, system, computer device and storage medium
By establishing a whitelist and a blacklist of node communication modules in the power collection terminal, it is ensured that each sensor data is only uploaded once, which solves the duplication problem caused by multiple node modules uploading data at the same time, and improves the efficiency of data uploading and the work efficiency of the collection terminal. .
Patent Information
- Application Number
- CN202410713027.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-04
AI Technical Summary
In the power collection terminal, multiple node communication modules upload sensor data at the same time, resulting in duplicate data problems, increasing the workload of the power collection terminal and reducing collection efficiency.
By establishing a whitelist and a blacklist of node communication modules, the effective node communication modules are determined to ensure that each sensor data is only uploaded once to avoid repeated data transmission.
It improves the efficiency of data upload, ensures the smoothness of the data upload communication channel, and reduces the workload of the power collection terminal.
Smart Images

Figure CN118283094B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sensor data acquisition, and in particular to a sensor data acquisition method, system, computer equipment and storage medium. Background Art
[0002] As the requirements for building new power systems continue to increase, power collection terminals need to monitor the environment of distribution rooms and transformers in addition to traditional services, and collect temperature and humidity data from each meter box. More and more sensors (including temperature, humidity, vibration, brightness, etc.) need to be connected to the power system by power collection terminals.
[0003] The new generation of electric energy meters contains a node communication module, but in a building, the electric energy meters of several households are often stored in one meter box, so multiple node communication modules will receive the same sensor data at the same time. When multiple node communication modules receive the needs of the power collection terminal, they will report the sensor data to the power collection terminal at the same time, but because the sensor data read by each node communication module will be repeated, the power collection terminal needs to distinguish the obtained sensor data and exclude the repeated sensor data, which increases the workload of the power collection terminal and causes the power collection terminal to have low collection efficiency. Summary of the invention
[0004] In view of this, the present invention provides a sensor data acquisition method, system, computer device and storage medium to solve the problem in the related art that multiple node communication modules simultaneously report sensor data to a power acquisition terminal.
[0005] In a first aspect, the present invention provides a sensor data acquisition method, which is applied to an acquisition terminal, the acquisition terminal is connected to a plurality of node communication modules, the node communication modules are used to monitor the data of each sensor, the method comprising: determining a valid node communication module according to a pre-established node communication module whitelist, the node communication module whitelist contains a minimum number of valid node communication modules, the valid node communication modules are used to monitor each sensor to be monitored; the node communication module whitelist monitors each sensor to be monitored through a minimum number of valid node communication modules; sending a sensor data reading instruction to each valid node communication module, so that each valid node communication module uploads valid sensor data according to its own blacklist; the sensor data uploaded by the valid node communication module does not contain the data of the sensors in the blacklist, and the sensors in the blacklist can be monitored by at least two node communication modules; receiving the valid sensor data uploaded by the valid node communication module.
[0006] The sensor data acquisition method provided by the present invention establishes a node communication module whitelist in advance. When the acquisition terminal needs sensor data, only the node communication modules in the node communication module whitelist are allowed to upload the sensor data. At the same time, the node communication modules that upload the sensor data determine the uploaded sensor data according to their respective blacklists. The method realizes that each type of sensor data is uploaded once when the node communication module uploads the sensor data through the node communication module whitelist and blacklist, avoids the situation where the same sensor data is repeatedly uploaded to the acquisition terminal, ensures the smoothness of the data upload communication channel, and improves the efficiency of data upload.
[0007] In an optional embodiment, before the step of determining a valid meter carrier module according to a pre-established meter carrier module whitelist, it also includes: obtaining a list of sensors to be monitored of the acquisition terminal, the list of sensors to be monitored includes at least one sensor to be monitored; receiving sensor data uploaded by each node communication module, the sensor data uploaded by the node communication module includes data collected by at least one sensor, and generating a sensor data set; establishing a node communication module whitelist according to the list of sensors to be monitored and the sensor data set, as well as a blacklist of each valid node communication module in the node communication module whitelist; and sending a corresponding blacklist to each valid node communication module.
[0008] The sensor data collection method provided in this embodiment establishes a node communication module whitelist and a blacklist according to the sensors to be monitored of the collection terminal and the sensor data reported by each node communication module, wherein the node communication module whitelist is used to determine the node communication modules that need to upload sensor data, and the blacklist is used to exclude sensor data that has been read by the collection terminal. By establishing the node communication module whitelist and the blacklist, the collection terminal only reads the required sensor data once each time it monitors the sensor, thereby avoiding repeated reading of the same sensor data.
[0009] In an optional embodiment, the step of establishing a node communication module whitelist based on the list of sensors to be monitored and the sensor data reported by each node communication module in the node communication module set includes: determining the monitorable quantity of each node communication module based on the sensor data set, the monitorable quantity is the number of sensors that can be monitored by the node communication module, and the node communication module set includes node communication modules connected to the acquisition terminal; determining the node communication module with the largest monitorable quantity as a valid node communication module, and adding the valid node communication module to the node communication module whitelist; judging whether the node communication module whitelist meets the preset conditions, and if so, generating the node communication module whitelist.
[0010] In an optional embodiment, if the node communication module whitelist does not meet the preset conditions, the step of establishing the node communication module whitelist based on the list of sensors to be monitored and the sensor data reported by each node communication module also includes: determining the target sensor list based on the sensor data uploaded by the valid node communication module; eliminating the target sensor data in the remaining node communication modules to obtain an updated sensor data set of the remaining node communication modules; the remaining node communication modules are other node communication modules in the node communication module set except the valid node communication modules; the target sensor data are the data collected by each sensor in the target sensor list; the remaining node communication modules constitute an updated node communication module set; and returning to the step of determining the monitorable quantity of each node communication module in the node communication module set based on the sensor data set.
[0011] In an optional embodiment, the step of establishing a blacklist of each valid node communication module based on the list of sensors to be monitored and the sensor data reported by each node communication module in the node communication module set includes: determining the monitorable quantity of each node communication module based on the sensor data set, where the monitorable quantity is the number of sensors that can be monitored by the node communication module; determining the node communication module with the largest monitorable quantity as the valid node communication module, and adding the valid node communication module to the node communication module whitelist; judging whether the node communication module whitelist meets the preset conditions, and if not, executing the following steps: determining the target sensor list based on the sensor data reported by the valid node communication module; adding the target sensor list to the node communication module whitelist; The target sensor data in the remaining node communication modules are eliminated to obtain the updated sensor data set of the remaining node communication modules; the remaining node communication modules are the node communication modules other than the valid node communication modules; the target sensor data are the data collected by each sensor in the target sensor list; the sensors to be monitored in the target sensor list are added to the blacklist of the remaining node communication modules; the remaining node communication modules constitute the updated node communication module set; return to the step of determining the monitorable quantity of each node communication module in the node communication module set according to the sensor data set, until the node communication module whitelist meets the preset conditions, and the blacklist of each valid node communication module is obtained.
[0012] In an optional implementation, the preset condition is that when all sensors that can be monitored by the valid node communication modules in the node communication module whitelist include all sensors to be monitored, it is determined that the node communication module whitelist meets the preset condition.
[0013] In an optional implementation, if the sensor to be monitored of the acquisition terminal changes, the node communication module whitelist and blacklist are cleared, and the node communication module whitelist and the blacklist of each valid node communication module in the node communication module whitelist are re-established.
[0014] In the second aspect, the present invention provides a sensor data acquisition system, including an acquisition terminal, a sensor, and a node communication module. The acquisition terminal is connected to a number of node communication modules, and the node communication module is used to monitor the data of each sensor; the sensor is used to collect data and send the data to the node communication module; the acquisition terminal is used to determine the valid node communication module according to a pre-established node communication module whitelist; send a sensor data reading instruction to each valid node communication module; the node communication module whitelist contains a minimum number of valid node communication modules; the node communication module whitelist monitors each sensor to be monitored through a minimum number of valid node communication modules; the node communication module is used to receive the sensor data reading instruction, and upload valid sensor data to the acquisition terminal according to the sensor data reading instruction and the blacklist; the blacklist includes at least one sensor, the valid sensor data does not contain the data of the sensor in the blacklist, and the sensor in the blacklist can be repeatedly monitored by at least two node communication modules; the acquisition terminal is also used to receive valid sensor data and obtain the data of the sensor to be monitored.
[0015] In an optional embodiment, the step of uploading valid sensor data to the acquisition terminal by the node communication module according to the sensor data reading instruction and the blacklist includes: monitoring the data of each sensor to form a sensor data set; determining the acquisition terminal that issues the sensor data reading instruction and the blacklist issued by the acquisition terminal; deleting the sensor data corresponding to the sensors recorded in the blacklist in the sensor data set to obtain valid sensor data; and uploading the valid sensor data to the acquisition terminal.
[0016] In an optional implementation, the node communication module obtains data from the sensor according to a preset cycle duration and stores the latest data. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flow chart of a sensor data collection method according to an embodiment of the present invention;
[0019] Figure 2 is a flow chart of another sensor data collection method according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of the structure of a sensor data acquisition system according to an embodiment of the present invention;
[0021] Figure 4 is a working flow diagram of a node communication module according to an embodiment of the present invention;
[0022] Figure 5 is a workflow diagram of a collection terminal according to an embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0025] When the acquisition terminal reads the sensor data in the electric energy meter, it needs to read the sensor data from the node communication module of the electric energy meter. For an electric energy meter, it contains multiple node communication modules, and each node communication module can read different sensor data or the same sensor data. In this way, when the acquisition terminal gives the reading request to the node communication module, the data uploaded to the acquisition terminal by the node communication module at the same time will have multiple duplicate and invalid data. Therefore, an embodiment of the present invention provides a sensor data acquisition method, which eliminates invalid sensor data by establishing a whitelist and a blacklist of node communication modules, and achieves uploading each sensor data once.
[0026] According to an embodiment of the present invention, a sensor data acquisition method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0027] In this embodiment, a sensor data collection method is provided. The method is applied to a collection terminal. The collection terminal is connected to a plurality of node communication modules. The node communication modules are used to monitor the data of each sensor. Figure 1 is a flow chart of a sensor data collection method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0028] Step S101, determining valid node communication modules according to a pre-established node communication module whitelist. The node communication module whitelist contains a minimum number of valid node communication modules, which are used to monitor each sensor to be monitored; the node communication module whitelist monitors each sensor to be monitored through a minimum number of valid node communication modules.
[0029] In an optional embodiment, when the acquisition terminal needs to read sensor data, it will determine the node communication module that needs to read data based on the node communication module whitelist established internally in advance, and the node communication module that is not in the above-mentioned node communication module whitelist will not read the data. That is, when the acquisition terminal needs to read sensor data, it will issue sensor data reading instructions to the node communication modules in the node communication module whitelist, and will not issue sensor data reading instructions to the remaining node communication modules.
[0030] Step S102, sending a sensor data reading instruction to each valid node communication module, so that each valid node communication module uploads valid sensor data according to its own blacklist. The sensor data uploaded by the valid node communication module does not contain the data of the sensors in the blacklist, and the sensors in the blacklist can be monitored by at least two node communication modules.
[0031] In an optional embodiment, after the collection terminal determines the valid node communication modules that need to read data, it sends sensor data reading instructions to these valid node communication modules. After receiving the reading instructions from the collection terminal, the valid node communication modules determine the sensor data that does not need to be reported based on their own pre-established blacklists, and report the remaining sensor data to the collection terminal. The blacklist of each valid node communication module is established by the collection terminal and sent to each node communication module.
[0032] Step S103, receiving valid sensor data uploaded by the valid node communication module.
[0033] In the embodiment of the present invention, after the node communication module reports the sensor data, the acquisition terminal obtains the sensor data to be read. At this time, these data meet the needs of the acquisition terminal and are not repeated.
[0034] In an optional embodiment, the node communication module in the node communication module whitelist refers to the node communication module that needs to report data, and the blacklist inside the node communication module refers to the sensor data that does not need to be read. Once the sensor is included in the blacklist, the node communication module will no longer read the sensor data.
[0035] The sensor data collection method provided in this embodiment establishes a node communication module whitelist in advance. When the collection terminal needs sensor data, only the node communication modules in the node communication module whitelist are allowed to upload sensor data. At the same time, the node communication modules that upload sensor data determine the uploaded sensor data according to their respective blacklists. This method uses the node communication module whitelist and blacklist to realize that each type of sensor data is uploaded once when the node communication module uploads sensor data, avoiding the situation where the same sensor data is uploaded to the collection terminal multiple times and repeatedly, ensuring the smoothness of the data upload communication channel, and improving the efficiency of data upload.
[0036] In this embodiment, a sensor data collection method is provided. Figure 2 is a flow chart of a sensor data collection method according to an embodiment of the present invention. Figure 2 As shown, the process includes:
[0037] Step S2001: obtaining a list of sensors to be monitored of a collection terminal, wherein the list of sensors to be monitored includes at least one sensor to be monitored.
[0038] In the embodiment of the present invention, before reading sensor data, the collection terminal needs to confirm the list of sensors to be monitored of the collection terminal. Here, the list of sensors to be monitored refers to the list of sensors whose data the collection terminal needs to read.
[0039] Step S2002: receiving sensor data uploaded by each node communication module, wherein the sensor data uploaded by the node communication module includes data collected by at least one sensor, and generating a sensor data set.
[0040] In an optional embodiment, after the electric energy meter receives an instruction from the collection terminal to read sensor data, the sensor data in all node communication modules inside the electric energy meter are uploaded to the collection terminal.
[0041] In an optional embodiment, the sensor data reported by a node communication module includes data collected by at least one sensor.
[0042] Step S2003: establishing a node communication module whitelist and a blacklist of valid node communication modules in the node communication module whitelist according to the sensors to be monitored and the sensor data set.
[0043] In an optional embodiment, after the collection terminal receives the sensor data reported by the node communication module, it will combine the confirmed list of sensors to be monitored and list the minimum number of node communication modules that can meet the needs of the collection terminal into a list, which is the node communication module whitelist; at the same time, for the sensor data repeatedly collected by each node communication module in the whitelist, one duplicate data is selected to be retained, and the sensors corresponding to the other duplicate data are included in the blacklist of the remaining node communication modules, and each node communication module has a corresponding matching blacklist.
[0044] Step S2004, sending the corresponding blacklist to each valid node communication module.
[0045] In an optional embodiment, the blacklist records the list of sensors that have duplicate sensor data. Therefore, in order to ensure that the data reported to the acquisition terminal is unique, the blacklist is sent to the corresponding node communication module in the node communication module whitelist. The node communication module will not read the data of the sensor in the blacklist when reading the sensor data next time.
[0046] Step S201, determine the valid node communication module according to the pre-established node communication module whitelist, the node communication module whitelist contains the minimum number of valid node communication modules, and the valid node communication module is used to monitor each sensor to be monitored; the node communication module whitelist monitors each sensor to be monitored through the minimum number of valid node communication modules. For details, please refer to Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0047] Step S202, sending a sensor data reading instruction to each valid node communication module, so that each valid node communication module uploads valid sensor data according to its own blacklist; the sensor data uploaded by the valid node communication module does not contain the data of the sensors in the blacklist, and the sensors in the blacklist can be monitored by at least two node communication modules. For details, please refer to Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0048] Step S203: Receive valid sensor data uploaded by the valid node communication module. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0049] The sensor data collection method provided in this embodiment establishes a node communication module whitelist and a blacklist according to the sensors to be monitored of the collection terminal and the sensor data reported by each node communication module, wherein the node communication module whitelist is used to determine the node communication modules that need to upload sensor data, and the blacklist is used to exclude sensor data that has been read by the collection terminal. By establishing the node communication module whitelist and the blacklist, the collection terminal only reads the required sensor data once each time it monitors the sensor, thereby avoiding repeated reading of the same sensor data.
[0050] In an optional embodiment, in the above step S2003, the step of establishing a node communication module whitelist according to the list of sensors to be monitored and the sensor data reported by each node communication module includes:
[0051] Step 1: determine the monitorable quantity of each node communication module in the node communication module set according to the sensor data set. The monitorable quantity is the number of sensors that can be monitored by the node communication module. The node communication module set includes the node communication modules connected to the collection terminal.
[0052] Step 2: determine the node communication module with the largest amount of monitoring as a valid node communication module, and add the valid node communication module to the node communication module whitelist.
[0053] In an optional embodiment, after the collection terminal confirms the sensor data reported by each node communication module, it further determines the node communication module that can upload the most types of sensor data at one time, and adds the node communication module to the node communication module whitelist as a valid node communication module.
[0054] After executing step 2, it is determined whether the node communication module whitelist meets the preset conditions. If so, a node communication module whitelist is generated.
[0055] If the node communication module whitelist does not meet the preset conditions, perform the following steps:
[0056] Step 3: Determine the target sensor list based on the sensor data uploaded by the valid node communication module.
[0057] In an optional embodiment, the target sensor list includes at least one sensor, the data of which can be monitored by the valid node communication module.
[0058] Step 4: Remove the target sensor data from the remaining node communication modules to obtain the updated sensor data set of the remaining node communication modules; the remaining node communication modules are the node communication modules other than the valid node communication modules in the node communication module set; the target sensor data are the data collected by each sensor in the target sensor list.
[0059] In the embodiment of the present invention, data corresponding to sensors identical to valid sensors in the remaining node communication modules are removed, and the obtained updated sensor data set no longer includes sensor data that can be collected by the valid communication modules in the current whitelist.
[0060] Step 5: The remaining node communication modules form an updated node communication module set. After the node communication module set is updated, a node communication module is selected from the updated node communication module set and added to the node communication module whitelist.
[0061] Return to step 1 until the node communication module whitelist meets the preset conditions.
[0062] In an optional embodiment, in the above step S2003, the step of establishing a blacklist of each valid node communication module according to the list of sensors to be monitored and the sensor data reported by each node communication module includes:
[0063] Step 1: Determine the monitorable quantity of each node communication module in the node communication module set according to the sensor data set, where the monitorable quantity is the number of sensors that the node communication module can monitor. Please refer to the steps of generating a whitelist in the above embodiment for details, which will not be repeated here.
[0064] Step 2: determine the node communication module with the largest amount of monitoring as a valid node communication module, and add the valid node communication module to the node communication module whitelist. For details, please refer to the steps of generating the whitelist in the above embodiment, which will not be repeated here.
[0065] Determine whether the node communication module whitelist meets the preset conditions. If not, perform the following steps:
[0066] Step 3: Determine the target sensor list according to the sensor data reported by the valid node communication module. Please refer to the steps of generating the whitelist in the above embodiment for details, which will not be repeated here.
[0067] Step 4: Remove the target sensor data from the remaining node communication modules to obtain the updated sensor data set of the remaining node communication modules; the remaining node communication modules are other node communication modules except the valid node communication modules; the target sensor data are the data collected by each sensor in the target sensor list. For details, please refer to the steps of generating the whitelist in the above embodiment, which will not be repeated here.
[0068] Step 5: Add the sensors to be monitored in the target sensor list to the blacklist of the communication modules of the remaining nodes.
[0069] In an optional embodiment, if the remaining node communication modules contain a sensor to be monitored in the target sensor list, the sensor to be monitored is included in its corresponding blacklist; the blacklist of each remaining node communication module is not necessarily completely consistent. After the sensor is included in the blacklist, the node communication module will no longer upload the data of the sensor. This method is to ensure that the sensor data uploaded by each node communication module are different.
[0070] Step 6: The remaining node communication modules form an updated node communication module set.
[0071] Return to step 1 until the node communication module whitelist meets the preset conditions, and obtain the blacklist of each valid node communication module.
[0072] In an optional embodiment, when judging whether the node communication module whitelist satisfies a preset condition, the preset condition is: when all sensors that can be monitored by the valid node communication modules in the node communication module whitelist include all sensors to be monitored, the node communication module whitelist is judged to satisfy the preset condition.
[0073] In an optional implementation, if the sensor to be monitored of the acquisition terminal changes, the node communication module whitelist and blacklist are cleared, and the node communication module whitelist and the blacklist of each valid node communication module in the node communication module whitelist are re-established.
[0074] In the sensor data collection method provided by the present embodiment, after the node communication module whitelist and blacklist are established, the collection terminal directly reads the required sensor data each time; until the list of sensors to be monitored by the collection terminal changes, the above method is executed to re-establish the node communication module whitelist and blacklist. Therefore, when the collection terminal monitors changes in the sensor list, no additional device changes are required, and only the node communication module whitelist and blacklist establishment method needs to be re-executed once.
[0075] This embodiment provides a sensor data acquisition system, such as Figure 3 As shown, it includes a collection terminal 1, a sensor 2, and a node communication module 3, and the collection terminal is connected to a plurality of node communication modules 3.
[0076] The node communication module 3 is used to monitor the data of each sensor 2 .
[0077] Sensor 2 is used to collect data and send the data to node communication module 3;
[0078] The acquisition terminal 1 is used to determine the valid node communication module 3 according to the pre-established node communication module whitelist; send a sensor data reading instruction to each valid node communication module 3; the node communication module whitelist contains a minimum number of valid node communication modules 3, and the node communication module whitelist monitors each sensor 2 to be monitored through a minimum number of valid node communication modules 3.
[0079] The node communication module 3 is used to receive sensor data reading instructions, and upload valid sensor data to the collection terminal 1 according to the sensor data reading instructions and the blacklist; the blacklist includes at least one sensor 2, the valid sensor data does not contain the data of the sensor 2 in the blacklist, and the sensor 2 in the blacklist can be repeatedly monitored by at least two node communication modules 3.
[0080] The acquisition terminal 1 is also used to receive valid sensor data and obtain data of the sensor to be monitored.
[0081] The sensor data acquisition system provided in this embodiment, after the acquisition terminal 1 uploads all data of the sensor 2 based on the node communication module 3, establishes a node communication module whitelist and a blacklist, effectively avoiding repeated uploading of sensor data when reading the sensor data next time, improving the transmission efficiency, and reducing the workload of the acquisition terminal 1.
[0082] In an optional embodiment, the step of the node communication module 3 uploading valid sensor data to the collection terminal 1 according to the sensor data reading instruction and the blacklist includes:
[0083] Step a1, monitoring the data of each sensor 2 to form a sensor data set.
[0084] Step a2, determining the acquisition terminal 1 that issues the sensor data reading instruction, and the blacklist issued by the acquisition terminal 1.
[0085] In an optional embodiment, when a node communication module 3 is connected to different collection terminals 1, the sensors 2 that different collection terminals 1 need to monitor are different, so the node communication module whitelists established by different collection terminals 1 and the blacklists issued to the same node communication module 3 will also be different.
[0086] Step a3: delete the sensor data corresponding to the sensors recorded in the blacklist in the sensor data set to obtain valid sensor data.
[0087] Step a4: upload valid sensor data to the acquisition terminal.
[0088] In an optional implementation, the sensor 2 sends data to the node communication module 3 via Bluetooth.
[0089] The sensor data acquisition system provided in this embodiment has the sensor 2 in the system sending data to the node communication module 3 via Bluetooth, thereby reducing the wire demand in the electric energy meter. When the number of sensors 2 is increased in the electric energy meter, the data is read directly by connecting to Bluetooth, thereby avoiding interface restrictions or difficulties in installing lines when installing the sensor 2.
[0090] In an optional implementation, after the sensor 2 sends data to the node communication module 3, the sensor enters a low power consumption state.
[0091] The sensor data acquisition system provided in this embodiment has a sensor 2 that is in a low-power state on a daily basis and will not enter a normal working state until the data of the sensor 2 needs to be sent to the node communication module 3. After the data transmission is completed, the sensor 2 returns to a low-power state, thereby meeting the working requirements that require long standby time.
[0092] In an optional implementation, the node communication module 3 obtains data from the sensor according to a preset cycle duration and stores the latest data.
[0093] The sensor data acquisition system provided in this embodiment has a node communication module 3 that continuously reads and stores sensor data according to a preset period to ensure the real-time nature of the sensor data. When the acquisition terminal 1 needs the sensor data, the latest sensor data is uploaded to the acquisition terminal 1 in a timely manner.
[0094] Specifically, Figure 4 As shown, the working process of the node communication module 3 in this embodiment is: first detect whether there is data in the Bluetooth channel. If there is no data, directly detect whether the sensor data needs to be named. If there is data, query whether the data of the Bluetooth channel is in the blacklist. When the data is not in the blacklist, store the data of the Bluetooth channel in the node communication module 3. If it is in the blacklist, execute the instruction to detect whether the sensor data is received. After receiving the instruction, reply to the sensor data stored in the current node communication module 3. If there is no instruction, continue the process; determine whether a blacklist clearing command is received. If the command is received, clear the blacklist. If not, continue the process; determine whether a blacklist setting command is received. If the command is received, set the blacklist. If no command is received, return to start a new round of process from detecting whether there is data in the Bluetooth channel.
[0095] Specifically, Figure 5As shown, in this embodiment, the acquisition terminal 1 relies on the CCO module to transmit information with the node communication module 3. The working process of the CCO module is as follows: the CCO module determines whether a blacklist clearing command is received. If a blacklist clearing command is received, the blacklist is cleared, otherwise the next step is executed; it is determined whether a node communication module 3 blacklist setting command is received. If a node communication module 3 blacklist setting command is received, the node communication module 3 blacklist is set and then forwarded to the node communication module 3, otherwise the next step is executed; it is determined whether a roll call command for reporting sensor data is received. If a roll call command for reporting sensor data is received, the command is forwarded to the node communication module 3. If there is no roll call command, the process is returned to continue starting from whether the blacklist clearing command is executed.
[0096] The embodiment of the present invention also provides a computer device, see Figure 6 , Figure 6 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.
[0097] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0098] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0099] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0100] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0101] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0102] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0103] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A sensor data acquisition method, characterized in that: Applied to a collection terminal, the collection terminal is connected to a plurality of node communication modules, the node communication modules are used to monitor the data of each sensor, the method includes: Determine valid node communication modules according to a pre-established node communication module whitelist, wherein the node communication module whitelist contains a minimum number of valid node communication modules, and the valid node communication modules are used to monitor each sensor to be monitored; the node communication module whitelist monitors each sensor to be monitored through a minimum number of valid node communication modules; Sending a sensor data reading instruction to each of the valid node communication modules, so that each of the valid node communication modules uploads valid sensor data according to its own blacklist; the sensor data uploaded by the valid node communication module does not contain the data of the sensors in the blacklist, and the sensors in the blacklist can be monitored by at least two node communication modules; for the sensor data repeatedly collected by each valid node communication module in the whitelist, one repeated data is selected to be retained, and the sensors corresponding to the other repeated data are included in the blacklist of the remaining valid node communication modules; Receive the valid sensor data uploaded by the valid node communication module.
2. The method according to claim 1, characterized in that Before the step of determining a valid node communication module according to a pre-established node communication module whitelist, the method further includes: Acquire a list of sensors to be monitored of the acquisition terminal, wherein the list of sensors to be monitored includes at least one sensor to be monitored; Receiving sensor data uploaded by each node communication module, wherein the sensor data uploaded by the node communication module includes data collected by at least one sensor, and generating a sensor data set; Establishing a node communication module whitelist and a blacklist of each valid node communication module in the node communication module whitelist according to the list of sensors to be monitored and the sensor data set; The corresponding blacklist is sent to each valid node communication module.
3. The method according to claim 2, characterized in that The step of establishing a node communication module whitelist according to the list of sensors to be monitored and the sensor data reported by each node communication module includes: Determine the monitorable quantity of each node communication module in the node communication module set according to the sensor data set, wherein the monitorable quantity is the number of sensors that can be monitored by the node communication module, and the node communication module set includes the node communication module connected to the acquisition terminal; Determine the node communication module with the largest monitorable amount as a valid node communication module, and add the valid node communication module to the node communication module whitelist; It is determined whether the node communication module whitelist meets the preset conditions, and if so, a node communication module whitelist is generated.
4. The method according to claim 3, characterized in that If the node communication module whitelist does not meet the preset conditions, The step of establishing a node communication module whitelist according to the list of sensors to be monitored and the sensor data reported by each node communication module also includes: Determine a target sensor list according to the sensor data uploaded by the valid node communication module; Eliminate the target sensor data in the remaining node communication modules to obtain the updated sensor data set of the remaining node communication modules; the remaining node communication modules are other node communication modules in the node communication module set except the valid node communication module; the target sensor data are the data collected by each sensor in the target sensor list; The remaining node communication modules constitute an updated node communication module set; Return to the step of determining the monitorable quantity of each node communication module in the node communication module set according to the sensor data set.
5. The method according to claim 2, characterized in that: The step of establishing a blacklist of each valid node communication module according to the list of sensors to be monitored and the sensor data reported by each node communication module includes: Determine, according to the sensor data set, a monitorable quantity of each node communication module in the node communication module set, wherein the monitorable quantity is the number of sensors that can be monitored by the node communication module; Determine the node communication module with the largest monitorable amount as a valid node communication module, and add the valid node communication module to the node communication module whitelist; Determine whether the node communication module whitelist meets the preset conditions. If not, execute the following steps: Determine a target sensor list according to the sensor data reported by the valid node communication module; Eliminate the target sensor data in the remaining node communication modules to obtain the updated sensor data set of the remaining node communication modules; the remaining node communication modules are other node communication modules except the valid node communication modules; the target sensor data are the data collected by each sensor in the target sensor list; Add the sensors to be monitored in the target sensor list to the blacklist of the remaining node communication modules; The remaining node communication modules constitute an updated node communication module set; Return to the step of determining the monitorable quantity of each node communication module in the node communication module set according to the sensor data set, until the node communication module whitelist meets the preset condition, and obtain the blacklist of each valid node communication module.
6. The method according to any one of claims 3 to 5, characterized in that: The preset condition is that when all sensors that can be monitored by valid node communication modules in the node communication module whitelist include all sensors to be monitored, it is determined that the node communication module whitelist meets the preset condition.
7. The method according to claim 6, characterized in that include: If the sensor to be monitored of the acquisition terminal is changed, the node communication module whitelist and blacklist are cleared, and the node communication module whitelist and the blacklist of each valid node communication module in the node communication module whitelist are re-established.
8. A sensor data acquisition system, characterized in that: It includes a collection terminal, a sensor, and a node communication module. The collection terminal is connected to a number of node communication modules, and the node communication module is used to monitor the data of each sensor; The sensor is used to collect data and send the data to the node communication module; The acquisition terminal is used to determine the valid node communication module according to the pre-established node communication module whitelist; send a sensor data reading instruction to each of the valid node communication modules; the node communication module whitelist contains a minimum number of valid node communication modules; the node communication module whitelist monitors each sensor to be monitored through a minimum number of valid node communication modules; The node communication module is used to receive the sensor data reading instruction, and upload valid sensor data to the acquisition terminal according to the sensor data reading instruction and the blacklist; the blacklist includes at least one sensor, the valid sensor data does not include the data of the sensor in the blacklist, and the sensor in the blacklist can be repeatedly monitored by at least two node communication modules; for the sensor data repeatedly collected by each valid node communication module in the whitelist, one duplicate data is selected to be retained, and the sensors corresponding to the other duplicate data are included in the blacklist of the remaining valid node communication modules; The acquisition terminal is also used to receive the valid sensor data and obtain the data of the sensor to be monitored.
9. The system according to claim 8, characterized in that The step of uploading valid sensor data to the acquisition terminal by the node communication module according to the sensor data reading instruction and the blacklist includes: Monitor the data of each sensor to form a sensor data set; Determine the acquisition terminal that issues the sensor data reading instruction and the blacklist issued by the acquisition terminal; Deleting the sensor data corresponding to the sensors recorded in the blacklist from the sensor data set to obtain the valid sensor data; Upload the valid sensor data to the acquisition terminal.
10. The system according to claim 8, characterized in that include: The node communication module obtains data from the sensor according to a preset cycle duration and stores the latest data.
Citation Information
Patent Citations
Wireless node blocking system
CN103037373A
Method for self-registration between ammeter and master station through carrier concentrator
CN112672418A
Data acquisition and transmission method and system based on multi-hop cooperation
CN113891278A
Internet of Things data processing method and device, storage medium and electronic equipment
CN114610705A
Graph data processing method, risk prediction model training method and device
CN115238588A
