A multi-level matrix space optimization method for quickly identifying honeybee behavior based on internet of things data
By collecting data through IoT devices and constructing a multi-level matrix space algorithm, bee behavior can be quickly identified and operational guidance can be provided, solving the problem of difficult bee behavior identification and improving beekeeping production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 北京蜂予科技有限公司
- Filing Date
- 2022-12-01
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies are insufficient for quickly and accurately identifying bee behavior and guiding beekeepers' operations, resulting in low efficiency in beekeeping production activities.
By collecting multi-dimensional data through IoT devices, a multi-level multi-dimensional matrix space is constructed. A hierarchical multi-dimensional matrix space algorithm is used to form a recognition model, which can identify bee behavior in real time and provide operation guidance.
It enables rapid identification and accurate guidance of bee behavior, reducing beekeepers' inspection work and improving beekeeping efficiency.
Smart Images

Figure CN116010764B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a multi-level matrix space optimization method for rapidly identifying bee behavior based on Internet of Things (IoT) data. Background Technology
[0002] This invention patent proposes a multi-level matrix space optimization algorithm for rapidly identifying bee behavior based on IoT data collection. By calculating a multi-level matrix space constructed from collected IoT data, bee behavior records, and beekeeper work records, a recognition model for rapidly identifying bee behavior is formed. This model is then applied to the analysis of real-time collected data and behavior recognition to guide beekeepers in beekeeping production activities such as feeding bees, breeding bees, swarming, honey harvesting, adding supers, producing mature honey, and preventing and controlling diseases.
[0003] The purpose of this patent is to solve the following technical problem:
[0004] By analyzing the factors influencing bee behavior, a multidimensional matrix space is constructed, and a hierarchical multidimensional matrix space algorithm is used to quickly identify bee behavior and beekeeper operations.
[0005] The Internet of Things (IoT) collects multi-dimensional data from various sensors, including temperature and humidity, audio, number and frequency of bees entering and leaving the hive, weight of the hive, weight of the honeycomb inside the hive, and meteorological data. This data is then combined with on-site manual work records and bee colony status data to construct a multi-level, multi-dimensional matrix space. All of these data types constitute the dimensional factors of the multi-dimensional space.
[0006] The data is hierarchically structured into 4-dimensional, 6-dimensional, and 9-dimensional matrix spaces, and each piece of collected data is labeled with hierarchical multi-dimensional spatial squares.
[0007] The data in each square space of the multi-level multi-dimensional space are fitted and calculated to form a standard behavior curve or standard audio curve representing that square space.
[0008] The multidimensional factors of the tested and verified curves and corresponding spatial squares are spatially defined to form a recognition model;
[0009] The model recognition algorithm calculates the hierarchical matrix space difference between the standard bee behavior model and the real-time collected data, quickly identifying the bee's current real-time behavior and the operations that need to be performed, providing a reference for beekeepers;
[0010] Beekeepers can understand the bee behavior data released by the platform, which can guide their beekeeping production activities, reduce the workload of beekeepers in inspecting bee activities at the apiary, and provide more accurate guidance for beekeepers' production.
[0011] Bee behavior recognition models are undergoing deep learning and evolution in practical applications by beekeepers; Summary of the Invention
[0012] To address this, the present invention provides a multi-level matrix space optimization method for rapidly identifying bee behavior based on IoT data. The method involves transmitting the collected and processed data to a cloud computing platform via a wireless communication module through IoT beekeeping equipment. After receiving the data, the cloud computing platform processes the data using a beekeeping-specific model recognition algorithm, establishes a recognition model, identifies the current behavior and activity status of the bees, and outputs information to guide beekeepers' operations.
[0013] The IoT beekeeping equipment includes: beehives, audio sensors, temperature and humidity sensors, electronic beehive gate sensors or entry / exit counting sensors, weighing sensors, a data acquisition, computing and transmission host, and solar panels.
[0014] The model recognition algorithm employs a multi-level matrix space optimization algorithm for rapid bee behavior recognition. First, it reads bee activity data received from the cloud computing platform, including the number of bees entering and exiting the hive, the weight of the hive, audio data within the hive, and the temperature and humidity inside the hive. This data is then preprocessed and stored. Next, a multi-level, multi-dimensional matrix space based on the bee activity data is constructed, and hierarchical data space association and labeling operations, as well as hierarchical multi-dimensional matrix space curve calculation operations, are performed. Then, using the obtained spatial curves as a basis, a hierarchical multi-dimensional matrix space recognition model is established and optimized through deep learning. The optimized model is used to perform hierarchical recognition operations for real-time dynamic behavior data. A two-dimensional matrix space is established using the temperature and humidity information inside the hive for analysis. The selected models correspond to bee activities and beekeeper activities, providing information for understanding bee activities and the necessary actions to be taken.
[0015] The data preprocessing method is as follows: First, read various sensor data, identify erroneous data and clean it, retain data bits in the cleaned data and mark it as cleaned, then identify data loss based on the data timestamp, empty data bits in the lost data and mark it as lost.
[0016] The data storage method is as follows: First, different databases and data tables are established according to the characteristics of each data. Audio data and bee entry and exit data are collected in real time. Based on the time interval of other data collection, segmented storage forms are established for the audio data and bee entry and exit data. Then, the data is stored completely according to the format and type in the data table, and the data tables are associated with each other through beehive equipment number and timestamp.
[0017] The method for constructing a multi-level, multi-dimensional matrix space is as follows: First, establish "bee colony behavior types" based on the activity of bee colonies in the hive. Then, establish "beekeeper operation types" based on the beekeeper's operation of the hive. Meteorological data is segmented. According to the importance of its impact on bee behavior, the meteorological data types—temperature, humidity, rainfall, wind force, sunlight, and air pressure—are classified into three levels: Level 1 includes rainfall; Level 2 includes wind force and temperature; Level 3 includes humidity, sunlight, and air pressure. Finally, a complete multi-dimensional space matrix based on bee colony behavior types, beekeeper operation types, meteorological data types, and season is established, creating a 9-dimensional matrix space grid with the following number of squares: Num1 represents the types of bee colony activities recorded in the beehive log, Num2 represents the types of operations in the beekeeper's log, Num3 represents the seasons of the year, and Num4-Num9 represent the number of segments for each meteorological data. Each square is assigned an independent "bee behavior square number", and a multi-level, multi-dimensional matrix space is established based on the classification of meteorological data types.
[0018] The types of bee colony behavior include: normal honey collection, bee noise, natural swarming, escape, resisting invasion by external enemies, producing a new queen bee, breeding, illness, and slack off; the types of beekeeper operations include: opening the hive for inspection, taking combs to observe the queen bee or bee colony condition, feeding bees, harvesting honey, adding supers, artificial swarming, merging colonies, moving beehives, and keeping beehives warm.
[0019] The specific method for establishing a multi-level, multi-dimensional matrix space is as follows: First level: 4-dimensional matrix space, with dimension factors including bee colony behavior type, beekeeper operation type, season, and rainfall; 4D=['BeeAct', 'BeeFAct', 'Season', 'Rain'], X1=[n1][4], where n1 represents the number of data points collected per record, and the number of matrix squares: ;
[0020] Level 2: 6-dimensional matrix space, with dimension factors including bee colony behavior type, beekeeper operation type, season, rainfall, wind force, and temperature; 6D=['BeeAct', 'BeeFAct', 'Season', 'Rain', 'Wind', 'Tempe'], X2=[n2][6], where n2 represents the number of data points collected per record and the number of matrix squares. ;
[0021] The third level is a 9-dimensional matrix space for the entire dataset. Dimension factors include bee colony behavior type, beekeeper operation type, season, rainfall, wind, temperature, humidity, air pressure, and light intensity; 9D=['BeeAct', 'BeeFAct', 'Season', 'Rain', 'Wind', 'Tempe', 'Humi', 'Press', 'Illumi'], X3=[n3][9], where n3 represents the number of data points collected per record and the number of matrix squares. .
[0022] The specific process of the data space hierarchical association labeling operation is as follows: First, in the operation and management business of the cloud computing platform, the daily beehive logs and beekeeper work logs are entered. Then, the daily IoT weather station data is collected on the cloud computing platform, and the average value of the daily weather data is calculated. Then, the collected beehive logs, beekeeper work logs, and weather data are hierarchically mapped to the corresponding squares in the 4D matrix space, 6D matrix space, and 9D matrix space, with "day.beehive" as the unit. The number of times bees enter and exit and the weight of beehives collected on the corresponding date are associated with the "behavior number" of the corresponding square. Then, the audio data is segmented according to the audio value, and the average time length of the relatively stable audio in each interval within the beehive is calculated, which is defined as the "unit time" of the interval. The collected temperature and humidity are mapped to the corresponding squares in the two-dimensional matrix space with "unit time.beehive" as the unit, and the audio data collected in the corresponding time segment is associated with the corresponding "environment number".
[0023] The beehive log and beekeeper's work log include: date, beehive number, type of activity of the bee colony in the beehive, and type of operation of the beekeeper on the beehive; the IoT weather station data includes date, temperature, humidity, rainfall, wind force, sunshine, and air pressure; the average values of the meteorological data include average temperature, average humidity, total rainfall of the day, average wind force, average sunshine, and average air pressure.
[0024] The specific process of the hierarchical multidimensional matrix space curve calculation operation is as follows: Step 1, calculate hierarchically according to 4D, 6D, and 9D matrix spaces, starting with the 4D matrix space. Divide all beehive data in each square of the 4D, 6D, and 9D matrix spaces into training data and test data. The training data in each square is no less than 50 days of data, and the test data in each square is no less than 5 days of data. For the data in the squares that meet the conditions, continue to the calculation in Step 2; Step 2, calculate the number of bees entering and exiting according to the data collection interval, calculate the frequency of bees entering and exiting the beehive entrance at each time interval, and then normalize the data to eliminate beehives. The process involves: 1) Analyzing the differences in bee colony strength and storing the processed frequency data in an intermediate data table; 2) Performing a peeling operation on the relevant data of beehive combs, whereby the lowest weight data is set to a standard 0 value, and other data are subtracted from the weight corresponding to the standard 0 value, followed by normalization, and storing the normalized weight data in an intermediate data table; 3) Reading the intermediate data of beehive comb weight changes and reading the inbound / outbound frequency data, and plotting a time-varying curve along the same time axis; 4) Fitting the curve matrices corresponding to the training data in the qualified squares of 4D, 6D, and 9D matrix spaces. Where Xi is an m×2 two-dimensional behavior matrix, n4 represents the number of data points used for training, m represents the number of data points collected per data point, two dimensions refer to the frequency of bee entry and exit and the change in beehive weight, X is the fitted two-dimensional behavior matrix, and a "standard bee behavior curve" is plotted for each square, referred to as "behavior curve"; Step 6, divide the audio data corresponding to the "environment number" of each square in the temperature and humidity two-dimensional space into training data and test data; Step 7, the training data of each square is no less than 50 "unit time" segments, and the test data of each square is no less than 5 "unit time" segments. For the square data that meets the conditions, continue to step 8 for calculation; Step 8, read the audio data corresponding to the "environment number" that meets the conditions, and plot the "beehive environment audio change curve" for the corresponding time segment; Step 9, perform fitting calculation on all the change curves in the temperature and humidity two-dimensional space squares: The vector represents the audio change curve, where n5 represents the number of data points used for training, i.e., the amount of audio data. The output Y is the fitted audio change curve, or simply the "audio curve".
[0025] The specific method for establishing a hierarchical multidimensional matrix space recognition model is as follows: Step 1, based on the "behavior curves" in the qualified squares of the 4D, 6D, and 9D matrix spaces, read the meteorological variable values and seasonal values corresponding to the squares in the space, and define them as "behavior curve condition boundaries," or simply "condition boundaries"; Step 2, perform difference calculations on the test data in the corresponding squares of the 4D, 6D, and 9D matrix spaces and the model curves at different levels, and calculate the average difference, which is the model's recognition error of bee behavior activities, or simply "behavior recognition error." in This represents the fitted behavior curve in the i-th spatial square. If the error value Loss(i) of the j-th test data in the i-th spatial square is less than the initially set threshold, then the "bee behavior recognition model" (or "behavior model") has been successfully established within the "conditional boundary". Where N3(i1,i2),…N9(i13,i14) are the spatial definitions of the behavioral model; Step 3, based on the audio curves in the conditional squares of the two-dimensional temperature and humidity environment space, establish a "temperature and humidity-audio relationship model", or "audio model" for short. The model includes waveform, duration, and environmental "conditional boundaries"; Step 4, perform difference calculation between the audio test data in the corresponding squares of the two-dimensional temperature and humidity environment matrix space and the model curves, and calculate the average difference, which is the recognition error of the model for the bee's temperature and humidity regulation behavior, or "audio recognition error" for short. If the error value is less than the initially set threshold value, then the "audio model" is successfully established within the "conditional boundaries". Where M3(i1,i2) and M4(i3,i4) are the spatial definitions of the audio model; Step 5, judge the validity of the data model by the "recognition error", optimize the model, and eliminate the incorrect model correction data; Define the "effective recognition threshold" as the highest "recognition error" value for effective recognition based on the validity and accuracy of the "recognition error".
[0026] The specific method for deep learning optimization of the data model is as follows: First, design feedback nodes; by reading feedback data during model usage, determine the effectiveness and accuracy of the model and label the corresponding collected data; accumulate a certain amount of labeled data to form training data and test data, train the model again, and recursively optimize the model using interpolation and loss functions.
[0027] The feedback nodes include usage evaluation, frequency of repeated use of functions, usage time, information forwarding, and number of times information is viewed repeatedly.
[0028] The specific method for hierarchical identification of real-time data dynamic behavior is as follows:
[0029] Step 1: Collect beehive data and meteorological data in real time, and perform preprocessing and pre-calculation;
[0030] Step 2: Based on meteorological data in 4D, 6D, and 9D matrix spaces, select all models under the current meteorological conditions in a hierarchical and batch manner.
[0031] The specific method for 4D matrix space operation is as follows: First, the collected data is compared with the model data of the corresponding time period in the 4D model. The calculation formula is: Loss=(AB)², where A is the recognition model curve and B is the real-time collected data curve. The "behavior recognition error" Loss of all models relative to the currently collected data is output. Then, all models with "behavior recognition error" lower than the "effective recognition threshold" are selected. If no model is selected, the next level of recognition operation is entered, namely 6D matrix space recognition operation. If a model is selected, the process jumps to step three.
[0032] The specific method for 6D matrix space operation is as follows: First, perform difference calculation between the collected data and the model data of the corresponding time period in the 6D model, and output the "behavior recognition error" of all models to the current collected data; then filter out all models whose "behavior recognition error" is lower than the "effective recognition threshold"; if no model is selected, proceed to the next level of recognition operation, namely 9D matrix space recognition operation; if a model is selected, jump to step three.
[0033] The specific method for 9-dimensional matrix space operation is as follows: First, perform difference calculation between the collected data and the model data of the corresponding time period in the 9-dimensional model, and output the "behavior recognition error" of all models to the current collected data; then filter out all models whose "behavior recognition error" is lower than the "effective recognition threshold"; if no model is filtered out, the recognition fails and the recognition ends; if a model is filtered out, proceed to step three.
[0034] Step 3: Output all the selected models in order of increasing "behavior recognition error" Loss value;
[0035] Step four: According to the order of the output models, output the final recognition results in sequence, that is, the bee activities and beekeeper activities corresponding to the selected models, so as to provide beekeepers with a reference for real-time understanding of bee activities and the operations to be carried out.
[0036] Step 5, environmental regulation behavior recognition. The specific recognition method is as follows: First, collect audio data and temperature and humidity data in the hive in real time; then, in the two-dimensional matrix space of temperature and humidity environment, find the square where the real-time data segment is located and its corresponding audio model based on the temperature and humidity data; finally, perform difference calculation based on the real-time data segment and the model data to identify whether the current hive temperature and humidity environment regulation behavior of the bees is normal. If the difference reaches or exceeds the effective recognition threshold, an early warning will be issued for abnormal environmental regulation behavior of the bees.
[0037] The technical effects to be achieved by this invention are as follows:
[0038] This paper proposes a multi-level matrix space optimization algorithm for rapid identification of bee behavior based on IoT data collection. By calculating the multi-level matrix space constructed from collected IoT data, bee behavior records, and beekeeper work records, a recognition model for rapid identification of bee behavior is formed. The model is then applied to the analysis of real-time collected data and behavior recognition to guide beekeepers in beekeeping production activities such as feeding bees, breeding bees, swarming, honey harvesting, adding supers, making mature honey, and preventing and controlling diseases. Attached Figure Description
[0039] Figure 1 Data acquisition and recognition model algorithms;
[0040] Figure 2 Intelligent beekeeping equipment;
[0041] Figure 3 Overview of the multi-level matrix space optimization algorithm;
[0042] Figure 4 Effectively identify critical value change trend graphs;
[0043] Figure 5 Flowchart of the multidimensional matrix space hierarchical recognition algorithm; Detailed Implementation
[0044] The following are preferred embodiments of the present invention, which are described in conjunction with the accompanying drawings. However, the present invention is not limited to these embodiments.
[0045] This invention proposes a multi-level matrix space optimization method for rapidly identifying bee behavior based on IoT data. It is a multi-level matrix space optimization method for rapidly identifying bee behavior based on IoT data collection.
[0046] The system platform topology diagram on which the method is based is... Figure 1 As shown, the IoT beekeeping equipment transmits the collected and processed data to the cloud computing platform through a wireless communication module. After receiving the data, the computing platform processes the data according to the model recognition algorithm, establishes a recognition model, and identifies the current behavior and activity status of bees in real time to guide beekeepers.
[0047] IoT beekeeping equipment includes: beehives, audio sensors, temperature and humidity sensors, electronic beehive gate sensors ( / entry / exit counting sensors), weighing sensors, data acquisition, computing and transmission hosts, solar panels, etc.; such as Figure 2 As shown.
[0048] This invention employs a multi-level matrix space-based optimization algorithm for rapidly identifying bee behavior. The overall flowchart of this beekeeping model recognition algorithm using a multi-level matrix space optimization method is shown below. Figure 3 .
[0049] First, the data received by the cloud computing platform is read, preprocessed, and stored. Then, a multi-level, multi-dimensional matrix space based on bee activity data is constructed, and hierarchical association labeling and multi-dimensional matrix space curve calculation are performed. Subsequently, using the obtained spatial curves as a basis, a hierarchical multi-dimensional matrix space recognition model is established and optimized through deep learning. The optimized model is then used to perform hierarchical recognition of real-time dynamic data behavior. The bee activities and beekeeper activities corresponding to the selected models provide information on understanding bee activities and the necessary operations.
[0050] Specifically, the individual modules are as follows:
[0051] I. Data Preprocessing:
[0052] Step 1: Read data from various sensors, identify and clean erroneous data, retain data bits in the cleaned data and label the cleaned data;
[0053] Step 2: Based on the timestamp of the data, identify the data loss, leave empty data bits for the lost data and mark the loss.
[0054] II. Data Storage:
[0055] Step 1: Based on the characteristics of each type of data, establish different databases and data tables. For example, real-time audio data and data on bees entering and leaving the hive have short data collection intervals and large data volumes. Therefore, it is necessary to establish segmented storage forms based on the time intervals of other data collection to facilitate data comparison and processing later.
[0056] Step 2: Store the data completely according to the format and type in the data table;
[0057] Step 3: Data tables are linked using beehive device numbers, timestamps, etc., to facilitate subsequent multi-level and multi-dimensional matrix space calculations.
[0058] III. Constructing a multi-level, multi-dimensional matrix space:
[0059] Step 1: Establish "colony behavior types" based on the activity of the bee colony in the hive, including: normal honey collection, bee disturbance, natural swarming, escape, defense against external enemies, generation of a new queen bee, breeding, illness, and slackness.
[0060] Step 2: Establish "Beekeeper Operation Types" based on the beekeeper's operation of the beehives, including: opening the hive for inspection, taking combs to observe the queen bee or bee colony, feeding the bees, harvesting honey, adding a super, artificially dividing the colony, merging colonies, moving the beehive, and keeping the beehive warm.
[0061] Step 3: Segment the meteorological data. For example, rainfall is divided into three segments: no rain (daily rainfall less than 5mm), light rain (daily rainfall less than 15mm), and heavy rain (daily rainfall greater than 15mm); temperature is divided into eight segments: below -20℃, -20℃ to -10℃, -10℃ to 0℃, 0℃ to 10℃, 10℃ to 20℃, 20℃ to 30℃, 30℃ to 40℃, and above 40℃; etc.
[0062] Step 4: Based on their importance in affecting bee behavior, classify the meteorological data types—temperature, humidity, rainfall, wind, sunlight, and air pressure—in order of decreasing importance. The first level includes rainfall; the second level includes wind and temperature; and the third level includes humidity, sunlight, and air pressure.
[0063] Step 5: Establish a complete multidimensional spatial matrix based on bee colony behavior type, beekeeper operation type, meteorological data type (temperature, humidity, rainfall, wind force, light intensity, air pressure), and season (four seasons), i.e., a 9-dimensional matrix space; establish a spatial grid of the 9-dimensional matrix space, with the number of squares being: = (Num1 represents the type of bee colony activity recorded in the hive log, Num2 represents the type of operation in the beekeeper's log, Num3 represents the season in the four seasons, and Num4-Num9 represent the number of segments of each meteorological data.) Each square is assigned an independent "bee behavior square number", abbreviated as "behavior number" code.
[0064] Step 6: Due to the massive amount of data and computation required for the 9-dimensional matrix space, to improve computational efficiency and lower the data threshold of the system, a multi-level, multi-dimensional matrix space is established based on the classification of meteorological data types.
[0065] Level 1: 4-dimensional matrix space, with dimension factors including bee colony behavior type, beekeeper operation type, season, and rainfall; 4D=['BeeAct', 'BeeFAct', 'Season', 'Rain'], X1=[n1][4]; (n represents the number of data points collected per record), number of matrix squares:
[0066] Level 2: 6-dimensional matrix space, with dimension factors including bee colony behavior type, beekeeper operation type, season, rainfall, wind force, and temperature; 6D=['BeeAct', 'BeeFAct', 'Season', 'Rain', 'Wind', 'Tempe'], X2=[n2][6]; (n represents the number of data points collected per record) Number of matrix squares:
[0067] The third level is a 9-dimensional matrix space for the entire dataset. Dimensional factors include bee colony behavior type, beekeeper operation type, season, rainfall, wind, temperature, humidity, air pressure, and light intensity; 9D = ['BeeAct', 'BeeFAct', 'Season', 'Rain', 'Wind', 'Tempe', 'Humi', 'Press', 'Illumi'], X3 = [n3][9]; (n represents the number of data points collected per record). The number of matrix squares is:
[0068] IV. Data Spatial Hierarchical Association Labeling;
[0069] Step 1: In the operation and management business of the cloud computing platform, enter the daily beehive log and beekeeper's work log. The log includes: date, beehive number, type of activity of bee colony in beehive, and type of operation of beekeeper on beehive.
[0070] Step 2: Collect daily IoT weather station data on the cloud computing platform, including date, temperature, humidity, rainfall, wind force, sunshine, and air pressure, and calculate the daily average weather data, including average temperature, average humidity, total daily rainfall, average wind force, average sunshine, and average air pressure.
[0071] Step 3: The collected beehive logs, beekeeper logs, and meteorological data are hierarchically mapped to the corresponding squares in the 4D, 6D, and 9D matrix spaces, using "day.beehive" as the unit. The number of times bees enter and exit and the weight of beehive combs collected on the corresponding date are associated with the "behavior number" of the corresponding square.
[0072] Step 4: Divide the audio data into segments according to the audio value, calculate the average duration of relatively stable audio in each segment within the beehive, and define it as the "unit time" of that segment.
[0073] Step 5: Map the collected temperature and humidity data to the corresponding squares in the two-dimensional matrix space using "unit time.beehive" as the unit, and associate the audio data collected for the corresponding time segment with the corresponding "environment number".
[0074] V. Calculation of curves in hierarchical multidimensional matrix space;
[0075] Step 1: Perform hierarchical calculations according to 4D, 6D, and 9D matrix spaces, starting with the 4D matrix space;
[0076] Step 2: Divide all the beehive data in each cell of the 4D, 6D, and 9D matrix space into training data and test data. The training data in each cell shall be no less than 50 days of data, and the test data in each cell shall be no less than 5 days of data. For the cell data that meets the conditions, continue the following calculation.
[0077] Step 3: Calculate the number of bees entering and exiting the hive according to the data collection interval, calculate the frequency of bees entering and exiting the hive entrance at each time interval, normalize the data to eliminate the difference in the strength of bee colonies between hives, and store the calculated and processed frequency data in an intermediate data table.
[0078] Step 4: Perform a peeling operation on the data of the beehive combs (set the lowest weight data to the standard 0 value, and subtract the weight data corresponding to the standard 0 value from the other data), and then perform normalization processing (the purpose is also to eliminate the difference in the strength of bee colonies between beehives). Store the normalized weight data in the intermediate data table.
[0079] Step 5: Read the intermediate data between the entry and exit frequency data and the beehive comb weight change data, and plot the time change curve according to the same time axis;
[0080] Step 6: Perform fitting operations on the curve matrices corresponding to the training data in the cells that meet the conditions (data from more than 55 days) in the 4D, 6D, and 9D matrix spaces. Xi is a two-dimensional behavior matrix of m x 2 (n x 4 represents the number of data points used for training, m represents the number of data points collected per data point, and two dimensions refer to the frequency of bee entry and exit and the change in bee comb weight), and X is the fitted two-dimensional behavior matrix. A "standard bee behavior curve," or simply "behavior curve," is plotted for each square.
[0081] Step 7: Divide the audio data corresponding to the "environment number" of each square in the two-dimensional temperature and humidity space into training data and test data; each square has no less than 50 training data segments (i.e., "unit time" segments) and no less than 5 test data segments. For the square data that meets the conditions, continue the following calculation.
[0082] Step 8: Read the audio data corresponding to the "environment number" that meets the conditions, and plot the "beehive environment audio change curve" for the corresponding time segment;
[0083] Step 9: Fit all the variation curves of temperature and humidity in the two-dimensional spatial grid: Yi is the audio variation curve vector (n5 represents the number of data points used for training, and m represents the number of data points collected per data point, i.e., the number of audio data points). The output Y is the fitted audio variation curve, or simply the "audio curve".
[0084] VI. Establishing a hierarchical multidimensional matrix space recognition model:
[0085] Step 1: Based on the "behavior curves" in the 4D, 6D, and 9D matrix spaces that meet the conditions, read the meteorological variable values and seasonal values corresponding to the squares in the space, and define them as "behavior curve condition boundaries", or simply "condition boundaries".
[0086] Step 2: The test data in the corresponding squares of the 4D, 6D, and 9D matrix spaces are compared with the model curves using a difference calculation to determine the average difference, which is the model's error in recognizing bee behavior, or simply "behavior recognition error." ( This represents the fitted behavior curve in the i-th spatial square. (Represents the j-th test data in the i-th spatial square). If the error value Loss(i) is less than the initially set threshold, then the "bee behavior recognition model", or "behavior model" for short, is successfully established within the "conditional boundary". (N3(i1,i2),…N9(i13,i14) is the spatial definition of the behavioral model).
[0087] Step 3: Based on the audio curves in the two-dimensional space of temperature and humidity environment that meet the conditions, establish a "temperature and humidity relationship model" or "audio model" for short. The model includes waveform, duration and environmental "condition boundaries".
[0088] Step 4: Perform a difference calculation between the audio test data in the corresponding squares of the two-dimensional temperature and humidity environment matrix space and the model curve, and calculate the average difference, which is the model's recognition error of the bee's temperature and humidity regulation behavior, referred to as the "audio recognition error". If the error value is less than the initially set threshold, the "audio model" is successfully established within the "condition boundary". (N3(i1,i2),N4(i3,i4) are the spatial definitions of the audio model).
[0089] Step 5, “Identification error” is an important basis for judging the effectiveness of the data model and an indicator for continuous model optimization. It is continuously optimized during use and some erroneous model data is eliminated to correct the data.
[0090] Step 6: The larger the "recognition error" value, the lower the effectiveness and accuracy of the recognition; conversely, the smaller the value, the higher the effectiveness and accuracy of the recognition.
[0091] Step 7: Define the "effective recognition threshold" based on the validity and accuracy of the "recognition error" = the highest effective recognition error value. As the model is continuously optimized, the "effective recognition threshold" also decreases, and its trend is as follows: Figure 4 As shown.
[0092] VII. Data Model Deep Learning Optimization
[0093] Step 1, the model's self-learning, self-correction, and self-improvement during use are the main forms of deep learning optimization of the model;
[0094] Step 2: In the model usage process, design some model usage feedback nodes, such as usage evaluation, frequency of repeated use of functions, usage time, information forwarding, number of times information is viewed repeatedly, and other feedback information.
[0095] Step 3: By reading the feedback data during the model's use, determine the model's effectiveness and accuracy, and label the corresponding collected data;
[0096] Step 4: Accumulate a certain amount of labeled data to form training data and test data, train the model again, and recursively optimize the model using interpolation and loss functions;
[0097] Step 5: "Recognition error" is the only metric for learning optimization, and continuously reducing "recognition error" is the direction of deep learning optimization;
[0098] 8. Hierarchical identification of real-time data dynamic behavior
[0099] Step 1: Collect beehive data and meteorological data in real time, and perform preprocessing and pre-calculation.
[0100] Step 2: Based on meteorological data in 4D, 6D and 9D matrix spaces, select all models under the current meteorological conditions in a hierarchical and batch manner;
[0101] Step 3, 4D matrix space operations
[0102] First, the difference between the collected data and the model data in the corresponding time period in the 4D model is calculated. The calculation formula is: Loss=(AB)² (A is the recognition model curve, B is the real-time collected data curve), and the "behavior recognition error" Loss of all models for the current collected data is output.
[0103] Then, all models with "behavior recognition error" lower than the "effective recognition threshold" were selected.
[0104] If no model is found, proceed to the next level of recognition operation, namely the 6-dimensional matrix space recognition operation; if a model is found, jump to step 4.
[0105] 6-dimensional matrix space operations
[0106] First, the difference between the collected data and the model data of the corresponding time period in the 6-dimensional model is calculated, and the "behavior recognition error" of all models for the current collected data is output.
[0107] All models with an "behavior recognition error" lower than the "effective recognition threshold" were selected.
[0108] If no model is selected, proceed to the next level of recognition operation, namely the 9-dimensional matrix space recognition operation; if a model is selected, jump to step 4.
[0109] 9-dimensional matrix space operations
[0110] First, the difference between the collected data and the model data of the corresponding time period in the 9-dimensional model is calculated, and the "behavior recognition error" of all models for the current collected data is output.
[0111] All models with an "behavior recognition error" lower than the "effective recognition threshold" were selected.
[0112] If no model is selected, the recognition fails and ends; if a model is selected, proceed to step 4.
[0113] Step 4: Output all the selected models in order of increasing "behavior recognition error" Loss value;
[0114] Step 5: Output the final recognition results in the order of the output models, that is, the bee activities and beekeeper activities corresponding to the selected models, so as to provide beekeepers with a reference for real-time understanding of bee activities and the operations to be carried out.
[0115] Step 6, Environmental adjustment behavior recognition:
[0116] Real-time collection of audio and temperature / humidity data inside the beehive;
[0117] In a two-dimensional matrix space of temperature and humidity environment, the square containing the real-time data segment and its corresponding audio model are found based on the temperature and humidity data.
[0118] The difference between real-time data fragments and model data is calculated to identify whether the bees' current hive temperature and humidity regulation behavior is normal (if the difference reaches or exceeds the effective identification threshold, an alert is issued that the bees' environmental regulation behavior is abnormal).
[0119] Step 7, the flowchart of multi-dimensional matrix space hierarchical behavior recognition is as follows: Figure 5 .
Claims
1. A multi-level matrix space optimization method for rapid identification of honeybee behavior based on Internet of Things data, characterized by: The data collected and processed by the IoT beekeeping equipment is transmitted to the cloud computing platform through the wireless communication module. After receiving the data, the cloud computing platform uses a model recognition algorithm for beekeeping to process the data, establish a recognition model, identify the current behavior and activity status of the bees, and output information to guide the beekeeper's work. The IoT beekeeping equipment includes: beehives, audio sensors, temperature and humidity sensors, electronic beehive gate sensors or entry / exit counting sensors, weighing sensors, a data acquisition, computing and transmission host, and solar panels; The model recognition algorithm employs a multi-level matrix space optimization algorithm for rapid bee behavior recognition. First, it reads bee activity data received from the cloud computing platform, including the number of bees entering and exiting the hive, the weight of the hive, audio data within the hive, and the temperature and humidity inside the hive. This data is then preprocessed and stored. Next, a multi-level, multi-dimensional matrix space based on the bee activity data is constructed, and hierarchical data space association and labeling operations, as well as hierarchical multi-dimensional matrix space curve calculation operations, are performed. Then, using the obtained spatial curves as a basis, a hierarchical multi-dimensional matrix space recognition model is established and optimized through deep learning. The optimized model is used to perform hierarchical recognition operations for real-time dynamic behavior. Finally, a two-dimensional matrix space is established using the temperature and humidity information inside the hive for analysis. The selected models correspond to bee activities and beekeeper activities, providing information for understanding bee activities and the necessary actions to be taken. The method for constructing the multi-level, multi-dimensional matrix space is as follows: First, based on the activity of the bee colony in the hive, a "bee colony behavior type" is established using bee activity data consisting of the number of bees entering and leaving the hive entrance, the weight of the hive, and the audio data within the hive. Then, a "beekeeper operation type" is established based on the beekeeper's operation of the hive, and the meteorological data is segmented. According to the importance of its impact on bee behavior, the meteorological data types—temperature, humidity, rainfall, wind force, sunlight, and air pressure—are classified into three levels: Level 1 includes rainfall; Level 2 includes wind force and temperature; Level 3 includes humidity, sunlight, and air pressure. Finally, a complete multi-dimensional space matrix based on bee colony behavior type, beekeeper operation type, meteorological data types, and season is established, creating a 9-dimensional matrix space grid with the following number of squares: Num1 represents the types of bee colony activities recorded in the beehive log, Num2 represents the types of operations in the beekeeper's log, Num3 represents the seasons of the year, and Num4-Num9 represent the number of segments for each meteorological data. Each square is assigned an independent "bee behavior square number", and a matrix space is established based on the classification of meteorological data types. The specific method for establishing the matrix space is as follows: First level: 4-dimensional matrix space, the dimension factors include bee colony behavior type, beekeeper operation type, season, and rainfall; 4D=['BeeAct', 'BeeFAct', 'Season', 'Rain'], X1=[n1][4], where n1 represents the number of data points collected per data point, and the number of matrix squares: ; Level 2: 6-dimensional matrix space, with dimension factors including bee colony behavior type, beekeeper operation type, season, rainfall, wind force, and temperature; 6D=['BeeAct', 'BeeFAct', 'Season', 'Rain', 'Wind', 'Tempe'], X2=[n2][6], where n2 represents the number of data points collected per record and the number of matrix squares. ; The third level is a 9-dimensional matrix space for the entire dataset. Dimension factors include bee colony behavior type, beekeeper operation type, season, rainfall, wind, temperature, humidity, air pressure, and light intensity; 9D=['BeeAct', 'BeeFAct', 'Season', 'Rain', 'Wind', 'Tempe', 'Humi', 'Press', 'Illumi'], X3=[n3][9], where n3 represents the number of data points collected per record and the number of matrix squares. .
2. The multi-level matrix space optimization method for fast identification of honeybee behavior based on Internet of Things data according to claim 1, characterized in that: The data preprocessing method is as follows: First, read various sensor data, identify erroneous data and clean it, retain data bits in the cleaned data and mark it as cleaned, then identify data loss based on the data timestamp, empty data bits in the lost data and mark it as lost. The data storage method is as follows: First, different databases and data tables are established according to the characteristics of each data. Audio data and bee entry and exit data are collected in real time. Based on the time interval of other data collection, segmented storage forms are established for the audio data and bee entry and exit data. Then, the data is stored completely according to the format and type in the data table, and the data tables are associated with each other through beehive equipment number and timestamp.
3. The multi-level matrix space optimization method for rapidly identifying bee behavior based on IoT data as described in claim 2, characterized in that: The specific process of the data space hierarchical association labeling operation is as follows: First, in the operation and management business of the cloud computing platform, the daily beehive logs and beekeeper work logs are entered. Then, the daily IoT weather station data is collected on the cloud computing platform, and the average value of the daily weather data is calculated. Then, the collected beehive logs, beekeeper work logs, and weather data are hierarchically mapped to the corresponding squares in the 4D matrix space, 6D matrix space, and 9D matrix space, with "day.beehive" as the unit. The number of times bees enter and exit and the weight of beehives collected on the corresponding date are associated with the "behavior number" of the corresponding square. Then, the audio data is segmented according to the audio value, and the average time length of the relatively stable audio in each interval within the beehive is calculated, which is defined as the "unit time" of the interval. The collected temperature and humidity are mapped to the corresponding squares in the two-dimensional matrix space with "unit time.beehive" as the unit, and the audio data collected in the corresponding time segment is associated with the corresponding "environment number".
4. The multi-level matrix space optimization method for fast identification of bee behavior based on Internet of Things data according to claim 3, characterized in that: The beehive log and beekeeper's work log include: date, beehive number, type of activity of the bee colony in the beehive, and type of operation of the beekeeper on the beehive; the IoT weather station data includes date, temperature, humidity, rainfall, wind force, sunshine, and air pressure; the average values of the meteorological data include average temperature, average humidity, total rainfall of the day, average wind force, average sunshine, and average air pressure.
5. The multi-level matrix space optimization method for rapidly identifying bee behavior based on IoT data as described in claim 4, characterized in that: The specific process of the hierarchical multidimensional matrix space curve calculation operation is as follows: Step 1, calculate hierarchically according to 4D, 6D, and 9D matrix spaces, starting with the 4D matrix space. Divide all beehive data in each square of the 4D, 6D, and 9D matrix spaces into training data and test data. The training data in each square is no less than 50 days of data, and the test data in each square is no less than 5 days of data. For squares that meet the conditions, continue to the calculation in Step 2; Step 2, calculate the number of bees entering and exiting according to the data collection interval, calculate the frequency of bees entering and exiting the beehive entrance at each time interval, and then normalize the data to eliminate bee... The differences in bee colony strength between hives are analyzed, and the processed frequency data is stored in an intermediate data table. Step three involves performing a peeling operation on the hive and comb data: setting the lowest weight data to a standard 0 value, subtracting the weight corresponding to the standard 0 value from other data, and then normalizing the data. The normalized weight data is then stored in an intermediate data table. Step four involves reading the intermediate data of hive and comb weight changes and plotting a time-varying curve along the same time axis. Step five involves fitting the curve matrices corresponding to the training data in the qualified squares of 4D, 6D, and 9D matrix spaces. Where Xi is an m×2 two-dimensional behavior matrix, n4 represents the number of data points used for training, m1 represents the number of data points collected per data point, two dimensions refer to the frequency of bee entry and exit and the change in beehive weight, X is the fitted two-dimensional behavior matrix, and a "standard bee behavior curve" is plotted for each square, referred to as "behavior curve"; Step 6, divide the audio data corresponding to the "environment number" of each square in the temperature and humidity two-dimensional space into training data and test data; Step 7, the training data of each square is no less than 50 "unit time" segments, and the test data of each square is no less than 5 "unit time" segments. For the square data that meets the conditions, continue to step 8 for calculation; Step 8, read the audio data corresponding to the "environment number" that meets the conditions, and plot the "beehive environment audio change curve" for the corresponding time segment; Step 9, perform fitting calculation on all the change curves in the temperature and humidity two-dimensional space squares: The vector represents the audio change curve, where n5 represents the number of data points used for training, m2 represents the number of data points collected per data point (i.e., the number of audio data points), and the output Y is the fitted audio change curve, or simply the "audio curve".
6. The multi-level matrix space optimization method for fast identification of honeybee behavior based on Internet of Things data according to claim 5, characterized in that: The specific method for establishing a hierarchical multidimensional matrix space recognition model is as follows: Step 1, based on the "behavior curves" in the qualified squares of the 4D, 6D, and 9D matrix spaces, read the meteorological variable values and seasonal values corresponding to the squares in the space, and define them as "behavior curve condition boundaries," or simply "condition boundaries"; Step 2, perform difference calculations on the test data in the corresponding squares of the 4D, 6D, and 9D matrix spaces and the model curves at different levels, and calculate the average difference, which is the model's recognition error of bee behavior activities, or simply "behavior recognition error." in This represents the fitted behavior curve in the i-th spatial square. If the error value Loss(i) of the j-th test data in the i-th spatial square is less than the initially set threshold, then the "bee behavior recognition model" (or "behavior model") has been successfully established within the "conditional boundary". Where N3(i1,i2),…N9(i13,i14) are the spatial definitions of the behavioral model; Step 3, based on the audio curves in the conditional squares of the two-dimensional temperature and humidity environment space, establish a "temperature and humidity-audio relationship model", or "audio model" for short. The model includes waveform, duration, and environmental "conditional boundaries"; Step 4, perform difference calculation between the audio test data in the corresponding squares of the two-dimensional temperature and humidity environment matrix space and the model curves, and calculate the average difference, which is the recognition error of the model for the bee's temperature and humidity regulation behavior, or "audio recognition error" for short. If the error value is less than the initially set threshold value, then the "audio model" is successfully established within the "conditional boundaries". Where M3(i1,i2) and M4(i3,i4) are the spatial definitions of the audio model; Step 5: Determine the validity of the data model through the "recognition error", optimize the model, and eliminate erroneous model correction data; Define the "effective recognition threshold" as the highest "recognition error" value for effective recognition based on the validity and accuracy of the "recognition error".
7. The multi-level matrix space optimization method for fast identification of honeybee behavior based on IoT data, as claimed in claim 6, wherein: The specific method for hierarchical identification of real-time data dynamic behavior is as follows: Step 1: Collect beehive data and meteorological data in real time, and perform preprocessing and pre-calculation; Step 2: Based on meteorological data in 4D, 6D, and 9D matrix spaces, select all models under the current meteorological conditions in a hierarchical and batch manner. The specific method for 4D matrix space operation is as follows: First, the collected data is compared with the model data of the corresponding time period in the 4D model. The calculation formula is: Loss=(AB)², where A is the recognition model curve and B is the real-time collected data curve. The "behavior recognition error" Loss of all models relative to the currently collected data is output. Then, all models with "behavior recognition error" lower than the "effective recognition threshold" are selected. If no model is selected, the next level of recognition operation is entered, namely 6D matrix space recognition operation. If a model is selected, the process jumps to step three. The specific method for 6-dimensional matrix space operation is as follows: First, perform difference calculation between the collected data and the model data of the corresponding time period in the 6-dimensional model, and output the "behavior recognition error" of all models to the current collected data; then filter out all models whose "behavior recognition error" is lower than the "effective recognition threshold"; if no model is filtered out, proceed to the next level of recognition operation, namely 9-dimensional matrix space recognition operation; if a model is filtered out, jump to step three. The specific method for 9-dimensional matrix space operation is as follows: First, perform difference calculation between the collected data and the model data of the corresponding time period in the 9-dimensional model, and output the "behavior recognition error" of all models to the current collected data; then filter out all models whose "behavior recognition error" is lower than the "effective recognition threshold"; if no model is selected, the recognition fails and the recognition ends; if a model is selected, proceed to step three. Step 3: Output all the selected models in order of increasing "behavior recognition error" Loss value; Step four: According to the order of the output models, output the final recognition results in sequence, that is, the bee activities and beekeeper activities corresponding to the selected models, so as to provide beekeepers with a reference for real-time understanding of bee activities and the operations to be carried out. Step 5, environmental regulation behavior recognition. The specific recognition method is as follows: First, collect audio data and temperature and humidity data in the hive in real time; then, in the two-dimensional matrix space of temperature and humidity environment, find the square where the real-time data segment is located and its corresponding audio model based on the temperature and humidity data; finally, perform difference calculation based on the real-time data segment and the model data to identify whether the current hive temperature and humidity environment regulation behavior of the bees is normal. If the difference reaches or exceeds the effective recognition threshold, an early warning will be issued for abnormal environmental regulation behavior of the bees.
Citation Information
Patent Citations
Bee farm data acquisition system and analysis method
CN110290181A