An environmental data transmission and processing method, device and equipment
By classifying environmental data and judging abnormal data, optimizing the data transmission cycle, the data accumulation problem existing in the environmental data acquisition device during the data transmission process is solved, and the data volume is reduced and the transmission efficiency is improved.
Patent Information
- Application Number
- CN202510449432.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-04-11
AI Technical Summary
The environmental data acquisition device has a problem of data accumulation during data transmission, mainly because the Beidou communication method has weak transmission capabilities.
By classifying the generated environmental data, the data fluctuation range of each category is determined, and whether abnormal data exists in each first preset period is determined. If there is, the emergency level is determined based on the deviation amount and growth rate of the abnormal data, and the abnormal data is selected to form a packet to send; if there is no abnormal data, the latest environmental data is sent in each second preset period, and the data fluctuation range is updated according to the duration of the abnormal data.
It effectively reduces the amount of data that needs to be sent, and solves the data accumulation problem that the environmental data acquisition device has in the data transmission process.
Smart Images

Figure CN119997219B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an environmental data transmission and processing method, device and equipment. Background Art
[0002] Beidou communication is one of the characteristic functions of the Beidou satellite navigation system (BDS), which allows users to send and receive short messages through Beidou satellites to achieve point-to-point or group communication.
[0003] Currently, there are environmental monitoring systems that use Beidou communication for data transmission. For example, in a hydrological environment monitoring system, etc., the environmental monitoring system operates in such a way that the environmental data collection device in the environmental monitoring system transmits the collected environmental data to the processing terminal in the environmental monitoring system through Beidou communication, and the processing terminal processes it and generates results to inform the user.
[0004] Due to the use of Beidou communication, the data transmission ability is relatively weak compared with traditional network communication, so data accumulation occurs in the data generated by the environmental data collection device, and there is a problem of data accumulation in the process of data transmission by the environmental data collection device. Summary of the Invention
[0005] Based on this, it is necessary to provide an environmental data transmission and processing method, device and equipment for the above problems.
[0006] An embodiment of the present invention is implemented as follows. An environmental data transmission and processing method, the environmental data transmission and processing method includes:
[0007] S101, classifying the generated environmental data to obtain several categories of environmental data;
[0008] S102, respectively determining the data fluctuation range of each category according to the preset value of the environmental data of each category;
[0009] S103, every time a first preset period passes, respectively judging whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A;
[0010] S104, select the environmental data containing abnormal data from all categories to form a data packet according to the emergency level of each category A and the data transmission situation of the data sending port, and send the data packet;
[0011] S105, if there is no abnormal data in each category, then every time a second preset period elapses, cycle through and select the latest environmental data of all categories to form a data packet and send the data packet;
[0012] S106, update the data fluctuation range of all categories according to the duration of the existing abnormal data.
[0013] In one embodiment, the present invention provides an environmental data transmission and processing device, and the environmental data transmission and processing device includes:
[0014] A data classification module, configured to classify the generated environmental data to obtain environmental data of several categories;
[0015] A determination range module, configured to respectively determine the data fluctuation range of each category according to the preset value of the environmental data of each category;
[0016] A determination quantization module, configured to, every time a first preset period elapses, respectively determine whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A;
[0017] A first sending module, configured to select the environmental data containing abnormal data from all categories to form a data packet and send the data packet according to the emergency level of each category A and the data transmission situation of the data sending port;
[0018] A second sending module, configured to, if there is no abnormal data in each category, then every time a second preset period elapses, cycle through and select the latest environmental data of all categories to form a data packet and send the data packet;
[0019] An update range module, configured to update the data fluctuation range of all categories according to the duration of the existing abnormal data.
[0020] In one embodiment, the present invention provides an environmental data transmission and processing device, and the environmental data transmission and processing device includes: a housing, and a sensor module and a control module disposed in the housing;
[0021] The sensor module is connected to the control module and is configured to detect the environment to generate environmental data;
[0022] The control module is configured to execute the steps of the above environmental data transmission and processing method.
[0023] An environmental data transmission and processing method provided by an embodiment of the present invention classifies the generated environmental data to obtain several categories of environmental data; determines the data fluctuation range of each category according to the preset value of the environmental data of each category; every time a first preset period elapses, determines whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determines the deviation amount and growth rate of the abnormal data of category A, and determines the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A; selects the environmental data containing abnormal data from all categories to form a data packet according to the emergency level of each category A and the data transmission situation of the data sending port; if there is no abnormal data in each category, cyclically selects the latest environmental data of all categories to form a data packet every time a second preset period elapses; sends the data packet; updates the data fluctuation range of all categories according to the duration of the existence of abnormal data. In this way, the generated environmental data is judged. If abnormal data is generated, the abnormal data is sent according to the emergency level of the category where the abnormal data is generated and the data transmission situation of the data sending port after each first preset period ends. If no abnormal data is generated, the latest environmental data is sent only once every second preset period, greatly reducing the amount of data to be sent, and solving the problem of data accumulation in the process of data transmission by the environmental data acquisition device. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a flowchart of an environmental data transmission and processing method in an embodiment;
[0025] Figure 2 It is a logic diagram of an environmental data transmission and processing method in an embodiment;
[0026] Figure 3 It is a structural block diagram of an environmental data transmission and processing device in an embodiment;
[0027] Figure 4 It is an internal structural block diagram of a control module in an embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0028] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0029] It will be appreciated that the terms "first", "second", etc. used in the present invention may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of the present invention, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0030] As Figure 1 , Figure 2 shown, in one embodiment, an environmental data transmission and processing method is proposed, which may specifically include the following steps:
[0031] S101, classify the generated environmental data to obtain environmental data of several categories;
[0032] S102, respectively determine the data fluctuation range of each category according to the preset value of the environmental data of each category;
[0033] S103, every time a first preset period elapses, respectively determine whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A;
[0034] S104, select the environmental data containing abnormal data from all categories to form a data packet according to the emergency level of each category A and the data transmission situation of the data sending port, and send the data packet;
[0035] S105, if there is no abnormal data in each category, then every time a second preset period elapses, circularly select the latest environmental data of all categories to form a data packet and send the data packet;
[0036] S106, update the data fluctuation range of all categories according to the duration of the existence of abnormal data.
[0037] In this embodiment, the present invention is applied to the control module of an environmental data transmission and processing device.
[0038] In this embodiment, the environmental data is generated by sensors. There are various sensors, such as water level sensors, temperature sensors, humidity sensors, pressure sensors, etc. Therefore, the generated environmental data has different types. Classifying the generated environmental data to obtain environmental data of several categories can be directly classified according to the category of the sensor that generates the environmental data. The generation of environmental data is related to the detection frequency of the sensor. Generally speaking, the detection frequency is less than 1 s.
[0039] In this embodiment, the preset value of the environmental data for each category can be determined by the historical environmental data of the location where the environmental data transmission and processing device is installed. For example, if the device is installed by a certain river, the preset value of the environmental data of the category of water level can be determined according to the historical water level situation of the river. Of course, different preset values can also be obtained according to different seasons, and the selection of the preset value can vary according to seasonal changes.
[0040] In this embodiment, the first preset period is the period for determining whether abnormal data is generated, so the period cannot be too long. The first preset period can be set to any value within 5 - 10 s.
[0041] In this embodiment, to determine whether there is abnormal data for each category, it is only for the environmental data within the latest first preset period. The first preset periods before this have already been judged. If there is abnormal data, data packets have already been formed. If there is no abnormal data, there is no need to repeat the judgment.
[0042] In this embodiment, the data sending port refers to the data sending port of the environmental data transmission and processing device. If the environmental data transmission and processing device uses the Beidou communication method, then this data sending port is a wireless port.
[0043] In this embodiment, the data transmission situation of the data sending port includes the current data transmission rate of the data sending port and the data volume of the data packets to be uploaded at the data sending port.
[0044] In this embodiment, for the environmental data containing abnormal data in S104, data packets are formed and the data packets are sent. It is not necessarily the case that the environmental data with normal data is sent. It depends on the emergency level of each category A and the data transmission situation of the data sending port.
[0045] In this embodiment, the second preset period is the period for sending normal environmental data when no abnormal data is generated continuously. It can be set relatively long. The second preset period can be 30 min or even longer. If abnormal data appears in a certain second preset period, then until it is re - judged that there is no abnormal data for each category, the step of cycling through and selecting the latest environmental data of all categories to form data packets and send the data packets every second preset period will not be executed.
[0046] In this embodiment, S103 - S106 are executed once every first preset period.
[0047] In this embodiment, for example, the ambient temperature of the temperature has a data fluctuation range of 19 - 20 °C. If it suddenly drops to 15 °C, then 15 °C is abnormal data. At this time, it is necessary to send the abnormal data with a value of 15 °C. If 15 °C lasts for a period of time and remains constant, at this time, it is necessary to update the data fluctuation range. If the temperature rises to 19 °C after updating the data fluctuation range, then 19 °C becomes abnormal data at this time.
[0048] An environmental data transmission and processing method provided by an embodiment of the present invention classifies the generated environmental data to obtain several categories of environmental data; respectively determines the data fluctuation range of each category according to the preset value of the environmental data of each category; every time a first preset period passes, respectively determines whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determines the deviation amount and growth rate of the abnormal data of category A, and determines the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A; selects the environmental data containing abnormal data in all categories to form a data packet according to the emergency level of each category A and the data transmission situation of the data sending port; if there is no abnormal data in each category, then every time a second preset period passes, cyclically selects the latest environmental data of all categories to form a data packet; sends the data packet; updates the data fluctuation range of all categories according to the duration of the existence of abnormal data. In this way, the generated environmental data is judged. If abnormal data is generated, then after the end of each first preset period, the abnormal data is sent according to the emergency level of the category where the abnormal data is generated and the data transmission situation of the data sending port. If no abnormal data is generated, then the latest environmental data is sent only once every second preset period, greatly reducing the amount of data to be sent, and solving the problem of data accumulation in the process of data transmission of the environmental data acquisition device.
[0049] In one embodiment, the step of respectively determining the data fluctuation range of each category according to the preset value of the environmental data of each category includes:
[0050] For each category, obtain all environmental data B of this category within the first first preset period;
[0051] For each environmental data B, determine whether the difference between the environmental data B and the preset value of the environmental data of this category is within the preset range. If so, determine the environmental data B as normal data;
[0052] From obtain the data average value y of this category;
[0053] From obtain the data deviation value s of this category;
[0054] From Determine the upper limit of the data fluctuation range of this category;
[0055] by Determine the lower limit of the data fluctuation range of this category;
[0056] where n is the number of normal data of this category, i is the serial number of the normal data of this category, and x i is the value of the i-th normal data of this category.
[0057] In this embodiment, for the first first preset period, there is no data fluctuation range for each category, so the abnormal data of the first first preset period is directly obtained from the environmental data within the first first preset period. The difference between this environmental data B and the preset value of the environmental data of this category may be positive or negative, so the preset range can be set within plus or minus 20% of the preset value.
[0058] In one embodiment, the determining whether there is abnormal data for each category according to the data fluctuation range of each category includes:
[0059] For each category, obtain the environmental data C of this category in the latest passed first preset period;
[0060] For each environmental data C, determine whether the environmental data C is within the data fluctuation range of this category. If not, record the environmental data C as data to be determined;
[0061] Determine whether the number of data to be determined is greater than the first preset number. If so, determine that there is abnormal data in this category and record the data to be determined as abnormal data.
[0062] In this embodiment, the latest passed first preset period starts from the second first preset period.
[0063] In this embodiment, the setting of the first preset number is to reduce accidental situations and can be set to any integer from 2 to 5. Not being 1 is to ensure that the generation of abnormal data is continuous. The setting of the first preset number is related to the first preset period, and the first preset number is less than the number of environmental data of a certain category obtained in the first preset period. Of course, if the last environmental data within the first preset period is abnormal data, it may be excluded, but continuous abnormal data will be detected in the next first preset period, so it doesn't matter even if one abnormal data is discarded.
[0064] In one embodiment, the determining the deviation amount and growth rate of the abnormal data of category A includes:
[0065] Obtain the abnormal data of category A in the latest first preset period;
[0066] For each abnormal data of category A within the latest first preset period, obtain the deviation amount of the abnormal data, and obtain the growth rate of the abnormal data;
[0067] Select the maximum deviation amount among all the deviation amounts and denote it as the deviation amount of the abnormal data of category A in the latest first preset period;
[0068] Select the maximum growth rate among all the growth rates and denote it as the growth rate of the abnormal data of category A in the latest first preset period;
[0069] where j is the serial number of the abnormal data of category A within the latest first preset period, and b j is the value of the j-th abnormal data of category A in the latest first preset period, and a max is the upper limit of the data fluctuation range of category A, and a min is the lower limit of the data fluctuation range of category A.
[0070] In this embodiment, it is also possible to select the average value of the deviation amounts and denote it as the deviation amount of the abnormal data of category A in the latest first preset period, or select the average value of the growth rates and denote it as the growth rate of the abnormal data of category A in the latest first preset period.
[0071] In this embodiment, the deviation amount and the growth rate are two different indicators and have no association.
[0072] In this embodiment, since j starts from 1 and the growth rate is the ratio of the increment to the base period, there exists a b0, where b0 is the value of the last abnormal data in the previous first preset period.
[0073] In one embodiment, determining the emergency level of category A according to the deviation amount and the growth rate of the abnormal data of category A includes:
[0074] Judge whether the growth rate of the abnormal data of category A is greater than the first preset growth rate. If so, set the first weight value of category A to 3. If not, judge whether the growth rate of the abnormal data of category A is greater than the second preset growth rate;
[0075] If the growth rate of the abnormal data of category A is greater than the second preset growth rate, set the first weight value of category A to 2;
[0076] If the growth rate of the abnormal data of category A is less than or equal to the second preset growth rate, set the first weight value of category A to 1;
[0077] Determine whether the deviation amount of the abnormal data of category A is greater than the first preset deviation amount. If so, set the second weight of category A to 3. If not, determine whether the deviation amount of the abnormal data of category A is greater than the second preset deviation amount;
[0078] If the deviation amount of the abnormal data of category A is greater than the second preset deviation amount, set the second weight of category A to 2;
[0079] If the deviation amount of the abnormal data of category A is less than or equal to the second preset deviation amount, set the second weight of category A to 1;
[0080] From Obtain the emergency level of category A;
[0081] Among them, q1 is the first weight and q2 is the second weight.
[0082] In this embodiment, the first preset growth rate and the second preset growth rate divide the growth rate into 3 levels, so the first weight is set to 1, 2, 3. The larger the first weight, the higher the emergency level. Similarly, the first preset deviation amount and the second preset deviation amount divide the deviation amount into 3 levels, so the second weight is set to 1, 2, 3. The larger the second weight, the higher the emergency level. Therefore, the emergency level of category A is the product of the first weight and the second weight. Even if the emergency level of one of the values is the lowest, as long as the emergency level of the other value is high, the result of the final product is high. Here, it is set to 1, 2, 3 to correspond to the first level, second level, and third level. Of course, it can also be set to other parameters, but the values of each level of the first weight and the second weight should be consistent.
[0083] In this embodiment, the first preset growth rate is greater than the second preset growth rate. The second preset growth rate can be set to 20%, and the first preset growth rate can be set to 40%. The first preset deviation amount is greater than the second preset deviation amount. The first preset deviation amount can be set to , and the second preset deviation amount can be set to .
[0084] In one embodiment, the selecting the environmental data including abnormal data from all categories according to the emergency level of each category A and the data transmission situation of the data sending port to form a data packet and sending the data packet includes:
[0085] Obtain the current data transmission rate of the data sending port and the data volume of the data packet to be uploaded;
[0086] Determine whether the data volume of the data packet to be uploaded is less than the preset data volume. If not, determine the current communication quality as the second level. If so, determine whether the current data transmission rate of the data sending port is greater than the preset transmission rate;
[0087] If the current data transmission rate of the data sending port is greater than the preset transmission rate, the current communication quality is determined to be level one;
[0088] If the current data transmission rate of the data sending port is less than or equal to the preset transmission rate, the current communication quality is determined to be level two;
[0089] Determine whether there is a category A with an emergency level greater than or equal to the preset emergency level. If so, set the data emergency level to level one. If not, set the data emergency level to level two;
[0090] Select the environmental data containing abnormal data from all categories according to the current communication quality and data emergency level to form a data packet and send the data packet.
[0091] In this embodiment, the preset data volume is related to the preset transmission rate. For example, if the preset transmission rate is 5M / s, then the preset data volume can be set to 5M. The preset transmission rate can be set to the rated transmission rate. The rated transmission rate is not the maximum transmission rate, and the current data transmission rate of the sending port can be greater than the preset transmission rate. A communication quality of level one represents that the transmission capacity of the channel is sufficient, and level two represents that the transmission capacity of the channel is limited. Only when the data volume of the data packet to be uploaded is less than the preset data volume and the current data transmission rate of the sending port is greater than the preset transmission rate, can it be ensured that the data transmission capacity is greater than the data generation speed of the data packet to be uploaded last time, which indicates that there is still surplus transmission capacity in the channel.
[0092] In this embodiment, if the levels of the first weight and the second weight are 1, 2, 3, then the emergency levels may be 1, 2, 3, 4, 6, 9. Then the preset emergency level can be 3, that is, the preset emergency level is the value corresponding to the highest level of the first weight or the second weight. In this way, when one of the first weight or the second weight is at the highest level, the emergency level must be greater than or equal to the preset emergency level, and the data emergency level must be level one. A data emergency level of level one represents that the data needs to be uploaded urgently, and a data emergency level of level two represents that the data can be uploaded slowly.
[0093] In one embodiment, the selecting the environmental data containing abnormal data from all categories according to the current communication quality and data emergency level to form a data packet and send the data packet includes:
[0094] For each category D that has not generated abnormal data, then obtain the quantity M of the environmental data to be uploaded for category D and select M environmental data from category D;
[0095] If the current communication quality is at level 1 and the data urgency level is at level 1, then the abnormal data of each category A are separately grouped into data packets corresponding to category A and the data packets corresponding to category A are sent in sequence according to the descending order of the urgency level of each category A. The M environmental data selected by each category D are separately grouped into data packets corresponding to category D and the data packets corresponding to category D are sent in sequence after the data packets corresponding to category A are sent;
[0096] If the current communication quality is at level 2 and the data urgency level is at level 1, then the abnormal data of each category A are separately grouped into data packets corresponding to category A and the data packets corresponding to category A are sent in sequence according to the descending order of the urgency level of each category A;
[0097] If the current communication quality is at level 1 and the data urgency level is at level 2, then all the abnormal data of category A are grouped into a data packet corresponding to all category A and sent, and all the M environmental data selected by category D are grouped into a data packet and sent after the data packet corresponding to all category A is sent;
[0098] If the current communication quality is at level 2 and the data urgency level is at level 2, then all the abnormal data of category A are grouped into a data packet and sent;
[0099] Wherein, k is a preset coefficient, and m is the quantity of the abnormal data of category A with the highest urgency level.
[0100] In this embodiment, the value, quantity, and data volume of environmental data are three different concepts, and the same applies to abnormal data. For example, the value of environmental data is 5; the quantity is 3, that is, 3 fives; the data volume is the amount of bytes required to transmit the value representing 5.
[0101] In this embodiment, k can be set to 0.5. If M is not an integer after calculation, the integer closest to M should be selected to replace M.
[0102] In this embodiment, if the data urgency level is at level 1, then the abnormal data of each category A are separately grouped into data packets corresponding to category A. These several data packets are all small data packets, so that the data receiving terminal can receive the abnormal data quickly and frequently and receive the abnormal data in time. If the data urgency level is at level 2, then all the abnormal data of category A are grouped into a data packet corresponding to all category A and sent. At this time, there is only one data packet, and it is a large data packet. The transmission time is long but the number of transmissions only needs to be once. If the communication quality is at level 1, then the data packets corresponding to category D are also sent. If the communication quality is at level 2, then the data packets of category D are not sent.
[0103] In this embodiment, the M environmental data selected from category D are selected from the environmental data generated at a time after the time when the abnormal data is generated. The selection can be arbitrary or can be evenly selected at a certain interval.
[0104] In this embodiment, if there are some category A with the same emergency level, then the category A with the same emergency level is sorted according to the first letter or the sensor order. The data packets corresponding to category D can be sent in order according to the first letter or the sensor order.
[0105] In this embodiment, the data packet is sent from the data sending port of the environmental data transmission and processing device to the data receiving terminal by means of Beidou communication. The data receiving terminal can be a monitoring system such as a hydrological monitoring platform.
[0106] In one embodiment, the updating of the data fluctuation ranges of all categories according to the duration of the abnormal data existing includes:
[0107] Judge whether an update signal is received. If so, update the data fluctuation ranges of all categories according to the environmental data within the latest first preset range;
[0108] If the update signal is not received, judge whether the number of the first preset periods in which the abnormal data continuously exists is greater than the second preset number. If so, update the data fluctuation ranges of all categories according to the environmental data within the latest first preset range; if not, no update is performed.
[0109] In this embodiment, the update signal is sent by the data receiving terminal. When the user determines the abnormal data, the user can choose to send an update signal, which means that the user believes that the continuous abnormal data represents normal data at this time and the original data fluctuation range needs to be updated. For example, due to the rise of the water level caused by rain, after the user determines the abnormal data and judges that the value of the abnormal data fluctuates little after the water level rises, at this time the user believes that the measured value of the new water level is the normal data, and the user can control the data receiving terminal to send an update signal, so as to update the environmental data of the water level category. After the update, the original abnormal data becomes normal data, and the original abnormal data will not be sent at this time. When the water level drops, the environmental data caused by the drop of the water level at this time will be identified as abnormal data and sent to the data receiving terminal.
[0110] In this embodiment, the setting of the second preset quantity is related to the first preset period. For example, if the first preset period is 5s and the abnormal data lasts for 2 hours, then it may be necessary to update the original data fluctuation range. At this time, the second preset quantity is set to 1440. For example, if the environmental data is temperature and the temperature rises and then stabilizes, then it is necessary to update the original data fluctuation range. At this time, the update needs to synchronously update the preset values of the environmental data of each category that generates abnormal data. The average value of the abnormal data can be used as the new preset value, or the abnormal data with the most occurrences can be used as the new preset value.
[0111] As Figure 3 shown, in one embodiment, an environmental data transmission and processing device is provided, which may specifically include:
[0112] A data classification module, configured to classify the generated environmental data to obtain environmental data of several categories;
[0113] A determination range module, configured to respectively determine the data fluctuation range of each category according to the preset value of the environmental data of each category;
[0114] A determination quantization module, configured to, every time a first preset period elapses, respectively determine whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A;
[0115] A first sending module, configured to select the environmental data containing abnormal data from all categories to form a data packet and send the data packet according to the emergency level of each category A and the data transmission situation of the data sending port;
[0116] A second sending module, configured to, if there is no abnormal data in each category, cycle through and select the latest environmental data of all categories to form a data packet and send the data packet every second preset period;
[0117] An update range module, configured to update the data fluctuation range of all categories according to the duration of the existence of abnormal data.
[0118] In this embodiment, each module of the environmental data transmission and processing device is modularized from the method part of the present invention. For the specific explanations of each module, please refer to the corresponding content of the method part of the present invention. The embodiments of the present invention will not be elaborated herein.
[0119] In one embodiment, an environmental data transmission and processing device is provided, which may specifically include:
[0120] A housing, a sensor module and a control module disposed within the housing;
[0121] The sensor module is connected to the control module and is used to detect the environment to generate environmental data;
[0122] The control module is used to execute the steps of the above-mentioned environmental data transmission and processing method.
[0123] In this embodiment, there are various types of sensor modules, such as a water level sensor, a temperature sensor, a humidity sensor, etc. Water level, temperature, humidity, etc. are all types of environmental data.
[0124] In this embodiment, the environmental data transmission and processing device further includes a power supply module, a communication module, etc. The power supply module is used to supply power to modules such as the control module and the communication module, and the communication module is used to perform Beidou communication with Beidou satellites to transmit data to a data receiving terminal.
[0125] An environmental data transmission and processing device provided by an embodiment of the present invention classifies the generated environmental data to obtain several categories of environmental data; respectively determines the data fluctuation range of each category according to the preset value of the environmental data of each category; every time a first preset period elapses, respectively determines whether there is abnormal data in each category according to the data fluctuation range of each category. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A; select the environmental data containing abnormal data from all categories according to the emergency level of each category A and the data transmission situation of the data sending port to form a data packet; if there is no abnormal data in each category, then every time a second preset period elapses, cycle through and select the latest environmental data of all categories to form a data packet; send the data packet; update the data fluctuation range of all categories according to the duration of the existence of abnormal data. In this way, the generated environmental data is judged. If abnormal data is generated, then after each first preset period ends, the abnormal data is sent according to the emergency level of the category where the abnormal data is generated and the data transmission situation of the data sending port. If no abnormal data is generated, then the latest environmental data is sent only once every second preset period, greatly reducing the amount of data to be sent, and solving the problem of data accumulation in the process of data transmission of the environmental data acquisition device.
[0126] Figure 4 Shows the internal structure diagram of the control module in one embodiment. As Figure 4As shown, the control module includes a processor, a memory, and a network interface connected via a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the control module stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement an environmental data transmission and processing method provided by an embodiment of the present invention. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute an environmental data transmission and processing method provided by an embodiment of the present invention.
[0127] Those skilled in the art can understand that Figure 4 the structure shown in is only a block diagram of some structures related to the solution of the present invention, and does not constitute a limitation on the control module to which the solution of the present invention is applied. The specific control module may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0128] In one embodiment, an environmental data transmission and processing device provided by an embodiment of the present invention can be implemented in the form of a computer program, and the computer program can run on a control module as shown in Figure 4 The memory of the control module may store each program module that makes up the environmental data transmission and processing device. For example, Figure 3 the data classification module, the range determination module, the quantization determination module, the first sending module, the second sending module, and the range update module shown in. The computer program composed of each program module enables the processor to execute the steps in an environmental data transmission and processing method of each embodiment of the present invention described in this specification.
[0129] For example, Figure 4 the control module shown in can execute step S101 through the data classification module in an environmental data transmission and processing device as shown in Figure 3 ; the control module can execute step S102 through the range determination module; the control module can execute step S103 through the quantization determination module; the control module can execute step S104 through the first sending module; the control module can execute step S105 through the second sending module; the control module can execute step S106 through the range update module.
[0130] In one embodiment, a control module is proposed. The control module includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:
[0131] S101, classify the generated environmental data to obtain environmental data of several categories;
[0132] S102. Determine the data fluctuation range of each category according to the preset value of the environmental data of each category respectively;
[0133] S103. Every time a first preset period passes, determine whether there is abnormal data in each category according to the data fluctuation range of each category respectively. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A;
[0134] S104. Select the environmental data containing abnormal data from all categories according to the emergency level of each category A and the data transmission situation of the data sending port to form a data packet and send the data packet;
[0135] S105. If there is no abnormal data in each category, then cycle through and select the latest environmental data of all categories to form a data packet and send the data packet every time a second preset period passes;
[0136] S106. Update the data fluctuation range of all categories according to the duration of the existence of abnormal data.
[0137] In one embodiment, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the processor is caused to execute the following steps:
[0138] S101. Classify the generated environmental data to obtain environmental data of several categories;
[0139] S102. Determine the data fluctuation range of each category according to the preset value of the environmental data of each category respectively;
[0140] S103. Every time a first preset period passes, determine whether there is abnormal data in each category according to the data fluctuation range of each category respectively. If so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A;
[0141] S104. Select the environmental data containing abnormal data from all categories according to the emergency level of each category A and the data transmission situation of the data sending port to form a data packet and send the data packet;
[0142] S105. If there is no abnormal data in each category, then cycle through and select the latest environmental data of all categories to form a data packet and send the data packet every time a second preset period passes;
[0143] S106. Update the data fluctuation range of all categories according to the duration of the existence of abnormal data.
[0144] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0145] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided by the present invention can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0146] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0147] The above-described embodiments merely represent several implementation manners of the present invention. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention.
Claims
1. A method for processing environmental data transmission, characterized in that: The environmental data transmission processing method comprises: S101, classifying the generated environmental data to obtain several categories of environmental data; S102, determining the data fluctuation range of each category according to the preset value of each category of environmental data; S103, after each first preset period, determine whether each category has abnormal data according to the data fluctuation range of each category, and if so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A; S104, selecting environmental data including abnormal data from all categories according to the emergency level of each category A and the data transmission status of the data transmission port to form a data packet and sending the data packet; S105, if there is no abnormal data in each category, then after each second preset period, the latest environmental data of all categories are cyclically selected to form a data packet and the data packet is sent; S106, updating the data fluctuation range of all categories according to the duration of the abnormal data; The step of selecting environmental data including abnormal data in all categories to form a data packet and sending the data packet according to the emergency level of each category A and the data transmission status of the data transmission port includes: Obtain the current data transmission rate of the data transmission port and the data volume of the data packet to be uploaded; Determine whether the data volume of the data packet to be uploaded is less than the preset data volume, if not, determine the current communication quality as level 2, if so, determine whether the current data transmission rate of the data transmission port is greater than the preset transmission rate; If the current data transmission rate of the data transmission port is greater than the preset transmission rate, the current communication quality is determined to be level one; If the current data transmission rate of the data transmission port is less than or equal to the preset transmission rate, the current communication quality is determined to be level 2; Determine whether there is a category A whose emergency level is greater than or equal to the preset emergency level. If so, set the data urgency level to level one; if not, set the data urgency level to level two; According to the current communication quality and data urgency, environmental data including abnormal data is selected from all categories to form a data packet and send the data packet.
2. The environmental data transmission processing method according to claim 1, characterized in that: Determining the data fluctuation range of each category according to the preset value of each category of environmental data includes: For each category, obtain all environmental data B of the category within a first preset period; For each environmental data B, determine whether the difference between the environmental data B and the preset value of the environmental data of the category is within a preset range, and if so, determine the environmental data B as normal data; Depend on Get the average value y of the data in this category; Depend on Get the data deviation value s of this category; Depend on Determine the upper limit of the data fluctuation range for this category; Depend on Determine the lower limit of the data fluctuation range for this category; Among them, n is the number of normal data of this category, i is the sequence number of normal data of this category, and x i is the value of the i-th normal data of this category.
3. The environmental data transmission processing method according to claim 1, characterized in that: The step of judging whether each category has abnormal data according to the data fluctuation range of each category includes: For each category, obtain the environmental data C of the category in the most recently passed first preset period; For each environmental data C, determine whether the environmental data C is within the data fluctuation range of the category. If not, record the environmental data C as data to be determined; It is determined whether the amount of the data to be determined is greater than a first preset amount. If so, it is determined that abnormal data exists in the category and the data to be determined is recorded as abnormal data.
4. The environmental data transmission processing method according to claim 1, characterized in that: The step of determining the deviation amount and growth rate of abnormal data of category A includes: Obtain abnormal data of category A within the latest first preset period; For each abnormal data of category A in the latest first preset period, The deviation of the abnormal data is obtained by Get the growth rate of the abnormal data; The largest deviation is selected from all the deviations and recorded as the deviation of abnormal data of category A in the latest first preset period; The largest growth rate is selected from all growth rates and recorded as the growth rate of abnormal data of category A in the latest first preset period; Where j is the sequence number of abnormal data of category A in the latest first preset period, b j is the value of the jth abnormal data of category A in the latest first preset cycle, a max is the upper limit of the data fluctuation range of category A, a min It is the lower limit of the data fluctuation range of category A.
5. The environmental data transmission processing method according to claim 1, characterized in that: Determining the emergency level of category A according to the deviation amount and growth rate of abnormal data of category A includes: Determine whether the growth rate of abnormal data of category A is greater than a first preset growth rate. If so, set the first weight of category A to 3. If not, determine whether the growth rate of abnormal data of category A is greater than a second preset growth rate. If the growth rate of abnormal data of category A is greater than the second preset growth rate, the first weight of category A is set to 2; If the growth rate of abnormal data of category A is less than or equal to the second preset growth rate, the first weight of category A is set to 1; Determine whether the deviation of abnormal data of category A is greater than a first preset deviation. If so, set the second weight of category A to 3. If not, determine whether the deviation of abnormal data of category A is greater than a second preset deviation. If the deviation of the abnormal data of category A is greater than the second preset deviation, the second weight of category A is set to 2; If the deviation of abnormal data of category A is less than or equal to the second preset deviation, the second weight of category A is set to 1; Depend on Get an emergency level of Category A; Among them, q1 is the first weight and q2 is the second weight.
6. The environmental data transmission processing method according to claim 1, characterized in that: The method of selecting environmental data including abnormal data in all categories according to the current communication quality and data urgency to form a data packet and sending the data packet includes: For each category D that does not generate abnormal data, Get the number M of environmental data of category D that needs to be uploaded and select M environmental data in category D; If the current communication quality is level 1 and the data urgency is level 1, each abnormal data of category A is separately formed into a data packet corresponding to category A and the data packets corresponding to category A are sent in order from large to small according to the urgency level of each category A, and the M environmental data selected from each category D are separately formed into a data packet corresponding to category D and the data packets corresponding to category D are sent in order after the data packets corresponding to category A are sent; If the current communication quality is level 2 and the data urgency is level 1, each abnormal data of category A is separately grouped into a data packet corresponding to category A and the data packets corresponding to category A are sent in order from the highest to the lowest urgency level of each category A; If the current communication quality is level 1 and the data urgency is level 2, all abnormal data of category A are combined into a data packet corresponding to all categories A and sent, and all M environmental data selected from category D are combined into a data packet and sent after all data packets corresponding to category A are sent; If the current communication quality is level 2 and the data urgency is level 2, all abnormal data of category A are combined into one data packet and sent; Wherein, k is a preset coefficient, and m is the number of abnormal data of category A with the highest emergency level.
7. The environmental data transmission processing method according to claim 1, characterized in that: The updating of the data fluctuation range of all categories according to the duration of the abnormal data includes: Determine whether an update signal is received, and if so, update the data fluctuation ranges of all categories according to the latest environmental data in the first preset range; If no update signal is received, determine whether the number of first preset cycles of continuous abnormal data is greater than a second preset number. If so, update the data fluctuation ranges of all categories according to the latest environmental data within the first preset range; if not, do not update.
8. An environmental data transmission and processing device, characterized in that: The environmental data transmission processing device comprises: A data classification module, used to classify the generated environmental data to obtain several categories of environmental data; A range determination module is used to determine the data fluctuation range of each category according to the preset value of each category of environmental data; A determination quantification module is used to determine whether each category has abnormal data according to the data fluctuation range of each category after each first preset period, and if so, for each category A that generates abnormal data, determine the deviation amount and growth rate of the abnormal data of category A, and determine the emergency level of category A according to the deviation amount and growth rate of the abnormal data of category A; A first sending module, used for selecting environmental data including abnormal data in all categories to form a data packet and sending the data packet according to the emergency level of each category A and the data transmission status of the data transmission port; A second sending module, for selecting the latest environmental data of all categories to form a data packet and sending the data packet every second preset period if there is no abnormal data in each category; Update range module, used to update the data fluctuation range of all categories according to the duration of abnormal data; The step of selecting environmental data including abnormal data in all categories to form a data packet and sending the data packet according to the emergency level of each category A and the data transmission status of the data transmission port includes: Obtain the current data transmission rate of the data transmission port and the data volume of the data packet to be uploaded; Determine whether the data volume of the data packet to be uploaded is less than the preset data volume, if not, determine the current communication quality as level 2, if so, determine whether the current data transmission rate of the data transmission port is greater than the preset transmission rate; If the current data transmission rate of the data transmission port is greater than the preset transmission rate, the current communication quality is determined to be level one; If the current data transmission rate of the data transmission port is less than or equal to the preset transmission rate, the current communication quality is determined to be level 2; Determine whether there is a category A whose emergency level is greater than or equal to the preset emergency level. If so, set the data urgency level to level one; if not, set the data urgency level to level two; According to the current communication quality and data urgency, environmental data including abnormal data is selected from all categories to form a data packet and send the data packet.
9. An environmental data transmission and processing device, characterized in that: The environmental data transmission processing device comprises: a housing, a sensor module and a control module arranged in the housing; The sensor module is connected to the control module and is used to detect the environment to generate environmental data; The control module is used to execute the steps of the environmental data transmission processing method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Device recommendation system and method
CN109839889A
ZigBee-based indoor environment data optimization monitoring and acquisition method
CN116916464A