Control method and device of sensor system, computer device and storage medium
By using distributed soft bus and sensor group partitioning technology in the sensor system, the communication and service partitioning problems of heterogeneous sensor systems are solved, and efficient data transmission and processing are achieved.
Patent Information
- Application Number
- CN202310386854.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-03-31
AI Technical Summary
Existing distributed sensor systems, when exhibiting complex heterogeneity, struggle to divide workloads and communicate effectively with servers, leading to issues such as redundant data transmission and poor communication quality.
The sensor cluster is connected via a distributed soft bus. Sensor groups are divided according to sensor type and working requirements. Data transmission is controlled in either a centralized or decentralized mode. Data fusion and transmission are performed using the target sensor.
It improves the communication quality and working efficiency of sensor systems, simplifies business logic, and reduces redundant data transmission.
Smart Images

Figure CN116546667B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a sensor system control method, a sensor system control device, a computer device, a sensor system and a storage medium. BACKGROUND
[0002] The existing distributed sensor system is mainly composed of a sensor itself and a small computer. The sensor obtains the measurement target around it, and the small computer collects the measurement data obtained by the sensor and transmits the measurement data back to the data center. This process is mainly sent to the background through the communication function of the distributed sensor.
[0003] When the heterogeneity of the sensor system is complex, for example, two or more sensors detect a region, it is difficult for the sensor system to divide the work and also difficult to communicate well with the server, resulting in that the distributed sensor system transmits redundant and miscellaneous data back to the background, and there is a problem of poor communication quality. SUMMARY
[0004] The present application provides a sensor system control method, a sensor system control device, a computer device, a sensor system and a storage medium, which aims to improve the communication quality of the sensor system when the heterogeneity of the sensor system is complex, simplify the business logic of the sensor system, and improve the work efficiency of the sensor system.
[0005] In a first aspect, the present application provides a sensor system control method, the sensor system comprising a sensor cluster and being connected with a server through a distributed soft bus, for controlling the work of the sensors in the sensor cluster, the sensor cluster comprising a plurality of sensors, the plurality of sensors being connected through the distributed soft bus to form the sensor cluster; the control method comprising:
[0006] obtaining the types of the plurality of sensors, and grouping the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups;
[0007] obtaining the work requirements of the sensors, and determining the work mode of the sensor groups according to the work requirements of the sensors;
[0008] if the work mode of the sensor group is a center mode, determining a target sensor corresponding to the sensor group;
[0009] controlling the sensors in the sensor group to collect environmental data, and sending the environmental data collected by each sensor to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus;
[0010] If the working mode of the sensor group is the centerless mode, the first data acquisition module is configured to control the sensors in the sensor group to collect environmental data, and send the environmental data collected by each sensor to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus.
[0011] In a second aspect, the present application provides a control device of a sensor system, the sensor system comprising a sensor cluster and being connected with a server through a distributed soft bus, and being configured to control the sensors in the sensor cluster to work, the sensor cluster comprising a plurality of sensors, the plurality of sensors being connected to form the sensor cluster through the distributed soft bus; the control device comprising:
[0012] a working group generation module configured to obtain the types of the plurality of sensors, and group divide the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups;
[0013] a working mode determination module configured to obtain the working requirements of the sensors, and determine the working mode of the sensor group according to the working requirements of the sensors;
[0014] a target sensor determination module configured to, if the working mode of the sensor group is the center mode, determine the target sensor corresponding to the sensor group;
[0015] a first data acquisition module configured to control the sensors in the sensor group to collect environmental data, and send the environmental data collected by each sensor to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus.
[0016] a second data acquisition module configured to, if the working mode of the sensor group is the centerless mode, control the sensors in the sensor group to collect environmental data, and send the environmental data to the server through the distributed soft bus.
[0017] In a third aspect, the present application provides a computer device, the computer device comprising a memory and a processor;
[0018] the memory is configured to store a computer program;
[0019] the processor is configured to execute the computer program and realize the control method of the sensor system as described above when executing the computer program.
[0020] In a fourth aspect, the present application provides a sensor system, the sensor system comprising the computer device, the sensor cluster and the mainboard as described above, the computer device and the sensor cluster being arranged on the mainboard.
[0021] In a fifth aspect, the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the processor implements the control method of the sensor system.
[0022] The present application provides a control method of a sensor system, a control device of a sensor system, a computer device, a sensor system and a storage medium. The present application divides a sensor cluster into multiple sensor groups according to the types of sensors, determines the working mode of the sensor groups according to the working requirements of the sensors, determines the target sensor corresponding to the sensor group if the working mode of the sensor group is the center mode, controls the sensors in the sensor group to collect environmental data, and sends the collected environmental data to a server through the target sensor through a distributed soft bus, controls the sensors in the sensor group to collect environmental data if the working mode of the sensor group is the centerless mode, and sends the environmental data to the server through a distributed soft bus. Thus, when the heterogeneity of the sensor system is complex, the signal transmission can be performed through the distributed soft bus, thereby improving the communication quality of the sensor system, simplifying the business logic of the sensor system by dividing the working groups, and improving the working efficiency of the sensor system.
[0023] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0025] Figure 1 An application scenario diagram of a control method of a sensor system provided by the embodiments of the present application is shown.
[0026] Figure 2 A scenario diagram of interaction between a sensor system and a server provided by the embodiments of the present application is shown.
[0027] Figure 3 A step flowchart of a control method of a sensor system provided by the embodiments of the present application is shown.
[0028] Figure 4 A structure diagram of interaction between a sensor system and a server provided by the embodiments of the present application is shown.
[0029] Figure 5A scene schematic diagram provided by an embodiment of the present application includes a plurality of sensor groups in a sensor cluster;
[0030] Figure 6 A scene schematic diagram provided by an embodiment of the present application includes a target sensor in a sensor group;
[0031] Figure 7 A structure schematic diagram of a control device of a sensor system provided by an embodiment of the present application;
[0032] Figure 8 A structure schematic diagram of a computer device provided by an embodiment of the present application;
[0033] Figure 9 A structure schematic diagram of a sensor system provided by an embodiment of the present application;
[0034] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0036] The flowcharts shown in the drawings are only exemplary descriptions, and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the described order. For example, some operations / steps can be further divided, combined or partially merged, so the actual execution order may be changed according to the actual situation.
[0037] It should be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0038] It should be understood that, in order to facilitate clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first", "second", etc. are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first callback function and the second callback function are only used to distinguish different callback functions, and do not limit the order. Those skilled in the art can understand that the terms "first", "second", etc. do not limit the quantity and execution order, and the terms "first", "second", etc. also do not necessarily mean different.
[0039] It should also be understood that the term "and / or" used in the specification and the appended claims of the present application means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0040] In the current field of distributed sensors, it is a common design direction to give a specific distributed sensor system design based on a specific scene. Designing a distributed sensor system according to a specific scene is a very tedious and time-consuming process. At present, there is no very common and universal distributed sensor system template to provide an "out-of-the-box" solution.
[0041] When the heterogeneity of the sensor system is complex, such as two or more sensors detecting an area, the sensor system is difficult to divide the work and also difficult to communicate well with the server, resulting in the distributed sensor system transmitting redundant data back to the background, and there is a problem of poor communication quality. The current distributed sensor system has communication and data fusion functions (eliminating redundant data), but it is not universal, and the communication, data fusion and business capabilities are still not robust enough.
[0042] Please refer to Figure 1 , Figure 1 The application scenario of the control method of the sensor system provided by the embodiments of the present application is shown in the figure. The application scenario of the control method of the sensor system will be described below. Figure 1 The application scenario of the control method of the sensor system will be described below.
[0043] As Figure 1 shown, the control method of the sensor system is applied to a sensor system or a computer device. The control method of the sensor system can establish a distributed soft bus among multiple sensors, realize flexible selection of sensors by the sensor system through the distributed soft bus, and realize efficient transmission of data among devices, thereby realizing seamless switching among sensors. The operation process of configuring the sensor system between different devices is simplified, efficient circulation of data among multiple sensors is realized, and the user experience is improved.
[0044] It should be noted that the communication connection between the sensors 11 and the sensors 11 can be a wired connection or a wireless connection, for example, can be connected through Wi-Fi, Bluetooth, Ethernet, 3G communication, 4G communication, 5G communication and the like. The sensors 11 and the sensors 11 can be independent of each other, and can be arranged at different spatial positions, or can be integrated in the same device. Among them, the distributed soft bus is based on the cooperation of Ethernet, WIFI and Bluetooth, and provides the discovery and connection functions between devices. After the devices are discovered and connected with each other, the distributed soft bus manages the ad hoc network and the topological relationship between the devices, so that the devices in the whole scene can complete device virtualization, cross-device service calling, multi-screen cooperation, file sharing and other distributed businesses based on the distributed soft bus.
[0045] As shown in Figure 2 , the control method of the sensor system provided by the embodiments of the present application can be applied to the application environment as shown in Figure 2 . The application environment includes a sensor system 110 and a server 120, wherein the computer device in the sensor system 110 can communicate with the server 120 through a distributed soft bus. Specifically, the sensor system 110 obtains the types of multiple sensors, and groups the sensor clusters according to the types of the sensors to obtain multiple sensor groups; obtains the working requirements of the sensors, and determines the working mode of the sensor groups according to the working requirements of the sensors; if the working mode of the sensor group is a center mode, a target sensor corresponding to the sensor group is determined; the sensors in the sensor group are controlled to collect environmental data, and the environmental data collected by each sensor is sent to the target sensor through the distributed soft bus, so that the sensor sends the environmental data to the server 120 through the distributed soft bus; if the working mode of the sensor group is a centerless mode, the sensors in the sensor group are controlled to collect environmental data, and the environmental data is sent to the server 120 through the distributed soft bus. The server 120 can be an independent server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms, and the like. Basic cloud computing services. The sensor system 110 can include a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like, but is not limited thereto. The sensor system and the server can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0046] Please refer to Figure 3 , Figure 3is a flowchart of a sensor system control method provided by an embodiment of the present application. The sensor system control method can be applied in a sensor system.
[0047] As shown in Figure 4 , the sensor system includes a sensor cluster and is connected with a server (background / cloud) through a distributed soft bus for controlling the work of sensors in the sensor cluster, the sensor cluster includes a plurality of sensors, and the plurality of sensors are connected through the distributed soft bus to form the sensor cluster.
[0048] Among them, the sensors can include various types of sensors such as temperature sensors, humidity sensors, etc., and the sensors are connected through the distributed soft bus to form the sensor cluster.
[0049] As shown in Figure 3 , the sensor system control method includes steps S101 to S105.
[0050] S101, obtain the types of the plurality of sensors, and group divide the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups.
[0051] Among them, the types of the sensors can be determined by the data types collected by the sensors, such as temperature sensors, humidity sensors, ultraviolet sensors, and volume sensors. The sensor cluster can be composed of a plurality of sensors, which can include sensors of the same type or sensors of different types. The sensor group can be composed of sensors of the same type, and it should be noted that the sensor types in different sensor groups are different.
[0052] In some embodiments, the device information of the sensors is obtained, and the device information is parsed to obtain the device model of the sensors and the data type collected by the sensors; and the type of the sensor is determined according to the device model of the sensor and the data type collected by the sensor. Thus, the types of the sensors can be accurately determined according to the device information.
[0053] Among them, the device information of the sensor can include device code, device model, etc. The device model of the sensor is the corresponding production model of each manufacturer, which is used to determine the data type collected by the sensor.
[0054] For example, the device information of the sensor such as the device code can be obtained, and the device information is parsed to obtain the device model of the sensor and the data type collected by the sensor, which is temperature data. Thus, the type of the sensor can be determined as a temperature sensor.
[0055] It should be noted that the type of each sensor can be determined by obtaining the device information of each sensor; if the sensor has been used or registered on the server, the type of the sensor can also be directly obtained from the server.
[0056] In some embodiments, in the sensor cluster, it is determined whether there are multiple sensors of the same type; if there are multiple sensors of the same type in the sensor cluster, the multiple sensors of the same type are taken as one sensor group; if the type of the sensor is different from the types of the remaining sensors in the sensor cluster, the sensor is taken as one sensor group. Thus, the sensor groups can be accurately divided according to the types of the sensors.
[0057] Specifically, the sensor cluster can be grouped according to the types of the sensors, so that the sensors of the same type are divided into one sensor group, thereby obtaining multiple sensor groups.
[0058] For example, if there are multiple sensor A and multiple sensor B in the sensor cluster, and the types of the sensor A are the same and the types of the sensor B are the same, the multiple sensor A are taken as one sensor group and the multiple sensor B are taken as one sensor group.
[0059] For example, if there is only one sensor A in the sensor cluster, the sensor A is taken as one sensor group.
[0060] As shown in Figure 5 For example, the sensor cluster includes multiple types of sensors, such as sensor A, sensor B, sensor C, and sensor D. Therefore, the sensor cluster can be grouped according to the types of the sensors, so that the sensors of the same type are divided into one sensor group, i.e., the first sensor group includes sensor A, the second sensor group includes sensor B, the third sensor group includes sensor C, and the fourth sensor group includes sensor D, thereby obtaining multiple sensor groups.
[0061] The cloud background can divide each sensor into a logical workspace, rather than a physical workspace. For example, when there are multiple different types of sensors (light sensor, temperature sensor, and humidity sensor) in a sensor cluster, and the sensors are scattered in different spaces, the background can divide the different types of sensors into different sensor groups, so that data fusion and background data processing are more convenient during data transmission.
[0062] It should be noted that different sensor groups are isolated in communication, which can reduce the power consumption caused by communication, thereby making data fusion more rapid, etc.
[0063] S102, acquire the working requirement of the sensor, and determine the working mode of the sensor group according to the working requirement of the sensor.
[0064] The working requirement of the sensor can be used to select a device for data processing, thereby determining the working mode of the sensor group. The working mode of the sensor group can include a centralized mode and a non-centralized mode.
[0065] For example, if the user wants the cloud / background to process data, the non-centralized mode can be selected, and if the user wants the sensor system to process data, the centralized mode can be selected.
[0066] In some embodiments, the device state of the sensor is acquired, and the working condition supported by the sensor is determined according to the device state; and the working requirement of the sensor is determined according to the working condition supported by the sensor. Thus, the working requirement of the sensor can be accurately determined according to the device state of the sensor.
[0067] The device state includes signal strength, remaining power, and the number of devices within a preset range, and the working condition supported by the sensor is the best data processing condition and the best data transmission condition that the sensor can achieve. Since the centralized mode requires a sensor from the sensor cluster to process data and transmit data, there must be a sensor in the sensor cluster that meets the data processing condition and the data transmission condition, so that the sensor system can work in the centralized mode.
[0068] Specifically, the working condition supported by the sensor can be determined according to the device state of the sensor, such as signal strength, remaining power, and the number of devices within a preset range. If it is determined that the working condition supported by the sensor meets the working condition corresponding to the centralized mode, the working requirement of the sensor can be the centralized mode; if it is determined that the working condition supported by the sensor does not meet the working condition corresponding to the centralized mode, the working requirement of the sensor can be the non-centralized mode.
[0069] It should be noted that the working condition supported by all sensors in the sensor cluster can be determined by detecting all sensors in the sensor cluster. If it is determined that at least one sensor in the sensor cluster supports a working condition that meets the working condition corresponding to the centralized mode, the working requirement of the sensor can be the centralized mode; if it is determined that all sensors in the sensor cluster do not support a working condition that meets the working condition corresponding to the centralized mode, the working requirement of the sensor can be the non-centralized mode.
[0070] Exemplarily, the device state of one of the sensors in the sensor cluster can be determined, such as signal strength of -100 dbm, remaining power of 30%, and the number of devices in the preset range of 3, and the working condition corresponding to the hub mode is that the signal strength is higher than -95 dbm, the remaining power is higher than 20%, and the number of devices in the preset range is less than 4. Thus, it can be determined that the working condition supported by the sensor meets the working condition corresponding to the hub mode, and the working requirement of the sensor can be the hub mode.
[0071] Exemplarily, the device state of one of the sensors in the sensor cluster can be determined, such as signal strength of -100 dbm, remaining power of 30%, and the number of devices in the preset range of 3, and the working condition corresponding to the hub mode is that the signal strength is higher than -95 dbm, the remaining power is higher than 20%, and the number of devices in the preset range is less than 4. Thus, it can be determined that the working condition supported by the sensor meets the working condition corresponding to the hub mode, and the working requirement of the sensor can be the hub mode.
[0072] It should be noted that if any one of the device states of the sensor does not meet the working condition corresponding to the hub mode, it can be considered that the working condition supported by the sensor does not meet the working condition corresponding to the hub mode.
[0073] S103, if the working mode of the sensor group is the hub mode, determining the target sensor corresponding to the sensor group.
[0074] The target sensor can be a master sensor in the sensor group, which is used for data communication and data processing.
[0075] In some embodiments, the device state of the sensor is obtained, and the target sensor is determined from the sensor group according to the device state of the sensor. Thus, the target sensor can be accurately determined from the corresponding sensor group according to the device state of the sensor.
[0076] The device state can include signal strength, remaining power, and the number of devices in the preset range. The signal strength can represent the communication capability of the sensor, the remaining power can represent the endurance capability of the sensor, and the number of devices in the preset range can represent the anti-interference capability of the sensor. The preset range can be a certain range, the preset range can be a circle with a certain point as the center and a certain length as the radius, or a square with a certain point as the center and a certain length as the length, which is not limited here.
[0077] Specifically, the communication capability of the sensor can be determined according to the signal strength of the sensor; the endurance capability of the sensor can be determined according to the remaining power of the sensor; and the anti-interference capability of the sensor can be determined according to the number of devices within the preset range; thereby the target sensor is determined from the corresponding sensor group according to the communication capability, the endurance capability and the anti-interference capability of the sensor.
[0078] In some embodiments, the signal strength, the remaining power and the number of devices within the preset range of the sensor are determined; the device performance of the sensor is determined according to the signal strength, the remaining power and the number of devices within the preset range of the sensor; and the target sensor is determined from the sensor group according to the device performance of the sensor. Thus, the target sensor can be accurately determined from the sensor group by determining the device performance of the sensor.
[0079] The device performance of the sensor can include the communication capability, the endurance capability and the anti-interference capability of the sensor, and the device performance of the sensor is determined according to the communication capability, the endurance capability and the anti-interference capability of the sensor.
[0080] Specifically, the corresponding weight proportions can be configured for the communication capability, the endurance capability and the anti-interference capability of the sensor, respectively, thereby the device performance of the sensor is determined, and one or more sensors with the best device performance are selected as the target sensor.
[0081] For example, if the score of the communication capability of the sensor A is 80, the weight proportion is 50%, the score of the endurance capability is 70, the weight proportion is 30%, and the score of the anti-interference capability is 80, the weight proportion is 20%, then the score of the device performance of the sensor A can be determined as 76; if the score of the communication capability of the sensor B is 90, the weight proportion is 50%, the score of the endurance capability is 60, the weight proportion is 30%, and the score of the anti-interference capability is 90, the weight proportion is 20%, then the score of the device performance of the sensor B can be determined as 81; and the target sensor can be determined as the sensor B.
[0082] For example, if the score of the communication capability of sensor A is 80, the weight ratio is 50%, the score of the endurance capability is 70, the weight ratio is 30%, and the score of the anti-interference capability is 80, the weight ratio is 20%, the score of the device performance of sensor A can be determined as 76; if the score of the communication capability of sensor B is 90, the weight ratio is 50%, the score of the endurance capability is 60, the weight ratio is 30%, and the score of the anti-interference capability is 90, the weight ratio is 20%, the score of the device performance of sensor B can be determined as 81; if the score of the communication capability of sensor C is 95, the weight ratio is 50%, the score of the endurance capability is 70, the weight ratio is 30%, and the score of the anti-interference capability is 70, the weight ratio is 20%, the score of the device performance of sensor C can be determined as 82.5; and the target sensors can be determined as sensor B and sensor C.
[0083] As shown in FIG. 1, for example, when the sensor group works in the center mode, the sensor group selects one or more master devices as the target sensors (master devices) of the sensor group, such as the sensors in the gray part in FIG. 1. Figure 6 As shown in FIG. 1, for example, when the sensor group works in the center mode, the sensor group selects one or more master devices as the target sensors (master devices) of the sensor group, such as the sensors in the gray part in FIG. 1. Figure 6 In this mode, the sensor group communicates with the cloud background through the target sensors. The monitoring data collected by the slave sensors is sent to the target sensors, and the target sensors process the received data, such as data fusion: eliminating redundant monitoring data sent by multiple slave devices. The target sensors transmit the processed data to the cloud background. The cloud background sends instructions to the sensor group through the target sensors.
[0084] It should be noted that each sensor group can correspond to different working modes, for example, the working mode of the sensor group corresponding to the temperature sensor can be the center mode, and the working mode of the sensor group corresponding to the humidity sensor can be the centerless mode.
[0085] In some embodiments, after determining the target sensor corresponding to the sensor group, the target sensor is controlled to send broadcast information to the remaining sensors in the sensor group, and the broadcast information includes the identity information and address information of the target sensor. Thus, the remaining sensors in the sensor group can determine the target sensor.
[0086] The identity information of the target sensor can be the ID information of the target sensor, which is used to make the slave server of the sensor group determine the identity of the target sensor; and the address information of the target sensor can be the communication address of the target sensor, which is used to make the slave server of the sensor group determine the address of the target sensor.
[0087] Specifically, after the target sensor is determined, the target sensor broadcasts a message to the sensor group, indicating that it is the identity of the sensor group, and broadcasts the address of the target sensor to the slave server, so that the slave server can send the collected environmental data to the target sensor according to the address of the target sensor.
[0088] S104, control the sensor in the sensor group to collect environmental data, and send the environmental data collected by each sensor to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus.
[0089] Among them, since the target sensor is the sensor with the best device performance, in the center mode, the target sensor can collect the environmental data collected by the slave sensor in the sensor group, and the target sensor sends the collected environmental data to the server through the distributed soft bus. The environmental data can include temperature data, humidity data, etc.
[0090] In some embodiments, after the environmental data collected by each sensor is sent to the target sensor through the distributed soft bus, the target sensor performs data fusion on the environmental data to obtain target environmental data, so that the target sensor sends the target environmental data to the server through the distributed soft bus. In this way, the target sensor can preliminarily screen the environmental data, avoid sending multiple redundant environmental data to the server, improve the utilization rate of the target sensor, and reduce the computational burden of the server.
[0091] Among them, the target environmental data is the environmental data after data fusion, and the redundant monitoring data sent by multiple slave devices can be eliminated.
[0092] Specifically, the target sensor performs data screening on the environmental data, so as to screen the same type of environmental data, and performs data fusion on the same type of environmental data, so as to obtain target environmental data, so that the target sensor sends the target environmental data to the server through the distributed soft bus.
[0093] For example, the target sensor receives the temperature data of sensor a for region A, and also receives the temperature data of sensor b for region A. At this time, sensor a and sensor b are both collecting temperature data for region A, so the temperature data of sensor a for region A and the temperature data of sensor b for region A can be fused, such as by taking the average value, taking the median value, etc., so as to obtain target environmental data.
[0094] For example, after receiving the environmental data sent from the sensor, the target sensor stores the environmental data into a historical data list, and after receiving other environmental data sent from the sensor next time, the target sensor compares the received environmental data with the historical data list, discards the same part, and only reports the different part, and the cycle is repeated.
[0095] In S105, if the working mode of the sensor group is the non-central mode, the sensors in the sensor group are controlled to collect environmental data, and the environmental data is sent to the server through the distributed soft bus.
[0096] Specifically, when the sensor group works in the non-central mode, each sensor is in an equal position. The sensor with the best communication quality can undertake the communication role of the sensor group and the cloud background. In this mode, data fusion is not performed, and the original collected environmental data is transmitted to the cloud background through the distributed soft bus. Each sensor can also directly communicate with the cloud background through the distributed soft bus, so that the sensor can directly communicate with the cloud background without passing through the sensor with the best communication quality.
[0097] The application provides a control method of a sensor system. The sensor cluster is divided into multiple sensor groups according to the types of the sensors, and the working mode of the sensor group is determined according to the working requirements of the sensors. If the working mode of the sensor group is the central mode, the target sensor corresponding to the sensor group is determined, and the sensors in the sensor group are controlled to collect environmental data, and the collected environmental data is sent to the server through the target sensor through the distributed soft bus. If the working mode of the sensor group is the non-central mode, the sensors in the sensor group are controlled to collect environmental data, and the environmental data is sent to the server through the distributed soft bus. Therefore, when the heterogeneity of the sensor system is complex, the signal transmission is performed through the distributed soft bus and the unique sensor structure design, so that the communication quality of the sensor system is improved, the business logic of the sensor system is simplified by dividing the working groups, and the working efficiency of the sensor system is improved.
[0098] For example, the sensors in the sensor cluster are equipped with KaihongOS, which plays a role in scheduling sensor tasks and processing data. The KaihongOS can process the instructions sent by the background / cloud, so that the sensors work according to the instructions.
[0099] As shown in Figure 7 The control device 200 of the sensor system includes a working group generation module 201, a working mode determination module 202, a target sensor determination module 203, a first data collection module 204, and a second data collection module 205.
[0100] The work group generation module 201 is configured to obtain types of the plurality of sensors, and group the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups.
[0101] The work mode determination module 202 is configured to obtain work requirements of the sensors, and determine work modes of the sensor groups according to the work requirements of the sensors.
[0102] The target sensor determination module 203 is configured to, if the work mode of the sensor group is the center mode, determine a target sensor corresponding to the sensor group.
[0103] The first data acquisition module 204 is configured to control the sensors in the sensor group to collect environmental data, and send the environmental data collected by the sensors to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus.
[0104] The second data acquisition module 205 is configured to, if the work mode of the sensor group is the centerless mode, control the sensors in the sensor group to collect environmental data, and send the environmental data to the server through the distributed soft bus.
[0105] In some embodiments, the work group generation module 201 is further configured to obtain device information of the sensors, and parse the device information to obtain device models of the sensors and types of collected data; and determine the types of the sensors according to the device models of the sensors and the types of collected data.
[0106] In some embodiments, the work group generation module 201 is further configured to determine whether there are a plurality of sensors with the same type in the sensor cluster; if there are a plurality of sensors with the same type in the sensor cluster, the plurality of sensors with the same type are taken as one sensor group; and if there is a sensor with a type different from those of the other sensors in the sensor cluster, the sensor with the type different from those of the other sensors is taken as one sensor group.
[0107] In some embodiments, the work mode determination module 202 is further configured to obtain device states of the sensors, and determine work conditions supported by the sensors according to the device states; and determine the work requirements of the sensors according to the work conditions supported by the sensors.
[0108] In some embodiments, the target sensor determination module 203 is further configured to obtain device states of the sensors; and determine the target sensor from the sensor group according to the device states of the sensors.
[0109] In some embodiments, the target sensor determination module 203 is further configured to determine signal strength, remaining power and the number of devices within a preset range of the sensor; determine device performance of the sensor according to the signal strength, remaining power and the number of devices within a preset range of the sensor; and determine the target sensor from the sensor group according to the device performance of the sensor.
[0110] In some embodiments, the information broadcasting module 206 is configured to control the target sensor to send broadcast information to the remaining sensors in the sensor group, the broadcast information including identity information and address information of the target sensor.
[0111] In some embodiments, the first data collection module 204 is further configured to perform data fusion on the environmental data by the target sensor to obtain target environmental data, so that the target sensor sends the target environmental data to the server through the distributed soft bus.
[0112] It should be noted that, for the convenience and brevity of description, the specific working process of the above-described apparatus and each module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described herein.
[0113] The method and apparatus of the present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
[0114] For example, the above-described method and apparatus can be implemented in the form of a computer program that can run on a computer device as shown in Figure 8 .
[0115] Please refer to Figure 8 , Figure 8 is a schematic block diagram of a computer device provided by an embodiment of the present application. As shown in Figure 8 , the computer device 300 includes one or more processors 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus, such as an I2C (Inter-integrated Circuit) bus.
[0116] The one or more processors 301 work alone or jointly to execute the steps of the control method of the sensor system provided by the above-described embodiments.
[0117] Specifically, the processor 301 can be a micro-controller unit (MCU), a central processing unit (CPU), or a digital signal processor (DSP), etc.
[0118] Specifically, the memory 302 can be a flash chip, a read-only memory (ROM) disk, an optical disk, a U disk, or a mobile hard disk, etc.
[0119] The processor 301 is configured to run a computer program stored in the memory 302, and implement the steps of the control method of the sensor system provided in the above embodiments when executing the computer program.
[0120] Specifically, the processor 301 is configured to run a computer program stored in the memory 302, and implement the following steps when executing the computer program:
[0121] obtain the types of the plurality of sensors, and group divide the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups; obtain the working requirements of the sensors, and determine the working modes of the sensor groups according to the working requirements of the sensors; if the working mode of the sensor group is a center mode, determine a target sensor corresponding to the sensor group; control the sensors in the sensor group to collect environmental data, and send the environmental data collected by each of the sensors to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus; if the working mode of the sensor group is a centerless mode, control the sensors in the sensor group to collect environmental data, and send the environmental data to the server through the distributed soft bus. In some embodiments, the first terminal device invokes an interface of the second terminal device through the distributed soft bus to obtain a file handle of the second terminal device; based on the file handle of the second terminal device, the first terminal device sends the audio / video information to the second terminal device through the distributed soft bus.
[0122] In some embodiments, the device information of the sensors is obtained, and the device information is parsed to obtain the device models of the sensors and the types of the collected data; the types of the sensors are determined according to the device models of the sensors and the types of the collected data.
[0123] In some embodiments, in the sensor cluster, it is determined whether there are multiple sensors of the same type; if there are multiple sensors of the same type in the sensor cluster, the multiple sensors of the same type are taken as one sensor group; if there are sensors of a type different from the types of the remaining sensors in the sensor cluster, the sensor of the type different from the types of the remaining sensors is taken as one sensor group.
[0124] In some embodiments, the device state of the sensor is obtained, and the working condition supported by the sensor is determined according to the device state; the working requirement of the sensor is determined according to the working condition supported by the sensor.
[0125] In some embodiments, the device state of the sensor is obtained; the target sensor is determined from the sensor group according to the device state of the sensor.
[0126] In some embodiments, the signal strength, the remaining power and the number of devices within a preset range of the sensor are determined; the device performance of the sensor is determined according to the signal strength, the remaining power and the number of devices within a preset range of the sensor; the target sensor is determined from the sensor group according to the device performance of the sensor.
[0127] In some embodiments, the target sensor is controlled to send broadcast information to the remaining sensors in the sensor group, and the broadcast information includes the identity information and the address information of the target sensor.
[0128] In some embodiments, the target environment data is obtained by the target sensor through data fusion on the environment data, so that the target sensor sends the target environment data to the server through the distributed soft bus.
[0129] As shown in Figure 9 The embodiments of the present application also provide a sensor system, which comprises the computer device, the sensor cluster and the mainboard as described above, and the computer device and the sensor cluster are arranged on the mainboard.
[0130] Specifically, the whole sensor structure is divided into three parts, i.e., the mainboard, the computer device and the sensor. The computer and the sensor can be installed on the mainboard. According to specific requirements, specific computer models and sensor types can be installed, so that different scene requirements can be quickly met.
[0131] The sensor system provided by the present application adapts to most general scenes, and does not need to add other adaptive functions. When adapting to specific scenes, only the type of the sensor needs to be considered. For example, temperature sensors, humidity sensors and the like can be installed.
[0132] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to make the processor realize the steps of the control method of the sensor system provided by the above embodiment.
[0133] The computer readable storage medium can be an internal storage unit of the remote controller or the electronic device, such as a hard disk or a memory of the terminal device. The computer readable storage medium can also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0134] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A control method of a sensor system, characterized by, The sensor system comprises a sensor cluster and is connected with a server through a distributed soft bus for controlling the operation of sensors in the sensor cluster, wherein the sensor cluster comprises a plurality of sensors connected through the distributed soft bus to form the sensor cluster; The control method comprises: acquiring the types of the plurality of sensors and grouping the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups; acquiring the device states of the sensors and determining the working conditions supported by the sensors according to the device states, determining the working requirements of the sensors according to the working conditions supported by the sensors, and determining the working modes of the sensor groups according to the working requirements of the sensors; if the working mode of the sensor group is a center mode, determining a target sensor from the sensor group according to the device states of the sensors; controlling the sensors in the sensor group to collect environmental data and sending the environmental data collected by each sensor to the target sensor through the distributed soft bus, so that the target sensor sends the environmental data to the server through the distributed soft bus; if the working mode of the sensor group is a centerless mode, controlling the sensors in the sensor group to collect environmental data and sending the environmental data to the server through the distributed soft bus.
2. The control method according to claim 1, characterized by, The acquisition of the types of the plurality of sensors comprises: acquiring device information of the sensors and analyzing the device information to obtain the device models of the sensors and the types of data collected by the sensors; determining the types of the sensors according to the device models of the sensors and the types of data collected by the sensors.
3. The control method according to claim 1, characterized by, The grouping of the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups comprises: determining whether there are a plurality of sensors with the same type in the sensor cluster; if there are a plurality of sensors with the same type in the sensor cluster, regarding the plurality of sensors with the same type as a sensor group; if there is a sensor in the sensor cluster whose type is different from the types of the other sensors, regarding the sensor whose type is different from the types of the other sensors as a sensor group.
4. The control method according to claim 1, characterized by, The device states comprise signal strength, remaining power, and the number of devices within a preset range, and the determination of a target sensor from the sensor group according to the device states of the sensors comprises: determining the signal strength, remaining power, and the number of devices within a preset range of the sensors; determining the device performance of the sensors according to the signal strength, remaining power, and the number of devices within a preset range of the sensors; determining a target sensor from the sensor group according to the device performance of the sensors.
5. The control method according to claim 1, characterized by, After determining the target sensor corresponding to the sensor group, the method further comprises: controlling the target sensor to send broadcast information to the remaining sensors in the sensor group, wherein the broadcast information comprises identity information and address information of the target sensor.
6. The control method according to claim 1, characterized by, After the environment data collected by each sensor is sent to the target sensor through the distributed soft bus, the method further comprises: The target sensor performs data fusion on the environment data to obtain target environment data, so that the target sensor sends the target environment data to the server through the distributed soft bus.
7. A control device of a sensor system, characterized by The sensor system comprises a sensor cluster and is connected to a server through a distributed soft bus, and is used for controlling the work of sensors in the sensor cluster, the sensor cluster comprises a plurality of sensors, and the plurality of sensors are connected through the distributed soft bus to form the sensor cluster. The control device comprises: A work group generation module is configured to obtain types of the plurality of sensors, and group divide the sensor cluster according to the types of the sensors to obtain a plurality of sensor groups; A work mode determination module is configured to obtain device states of the sensors, and determine work conditions supported by the sensors according to the device states; determine work requirements of the sensors according to the work conditions supported by the sensors, and determine work modes of the sensor groups according to the work requirements of the sensors; A target sensor determination module is configured to determine a target sensor corresponding to the sensor group if the work mode of the sensor group is a center mode; A first data acquisition module is configured to control the sensors in the sensor group to collect environment data, and send the environment data collected by each sensor to the target sensor through the distributed soft bus, so that the target sensor sends the environment data to the server through the distributed soft bus; A second data acquisition module is configured to control the sensors in the sensor group to collect environment data if the work mode of the sensor group is a centerless mode, and send the environment data to the server through the distributed soft bus.
8. A computer device, comprising: The computer device comprises a memory and a processor; The memory is configured to store a computer program; The processor is configured to execute the computer program and realize the control method of the sensor system according to any one of claims 1 to 6 when the computer program is executed.
9. A sensor system, characterized by The sensor system comprises the computer device, the sensor cluster and the mainboard according to claim 8, and the computer device and the sensor cluster are arranged on the mainboard.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to make the processor realize the control method of the sensor system according to any one of claims 1 to 6.
Citation Information
Patent Citations
Self-adaptive multi-sensor information fusion system and method and storage medium
CN112149623A
Multi-sensor maximum correlation entropy expansion information filtering hierarchical fusion method
CN115087092A
Agricultural internet-of-things data acquisition device based on domestic swan mongolian operating system
CN218728662U