Multifunctional electronic ear tag, working method, device, equipment and storage medium
By employing a punch-free headband design and multi-functional electronic ear tags, combined with strong magnetic clips, soft silicone materials, and intelligent sensors, and dynamically adjusting computing resources, the system solves the problems of multi-source data fusion and power consumption in traditional livestock monitoring systems. This enables efficient and real-time monitoring of livestock behavior and health status, improving device comfort and management efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ANHUI AGRICULTURAL UNIVERSITY
- Filing Date
- 2024-12-30
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional livestock behavior monitoring systems have limitations in feature extraction and reasoning capabilities, cannot fully integrate multi-source sensor data, consume a lot of power, and are difficult to meet long-term monitoring needs. Furthermore, the design of traditional ear tag devices limits animal comfort and management efficiency.
It adopts a headband design that requires no drilling, combined with strong magnetic buckles and soft silicone material, and integrates multiple sensors and the Beidou satellite navigation system. It uses knowledge distillation technology and power consumption adaptive algorithm to dynamically adjust the allocation of computing resources and sampling frequency, and performs multimodal data processing through the Transformer model.
It enables efficient, real-time monitoring of livestock behavior and health status, reduces pain and infection risks for animals, improves equipment comfort and battery life, and enhances monitoring accuracy and management efficiency.
Smart Images

Figure CN119896175B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of smart electronic ear tags, and in particular to a multifunctional electronic ear tag, a working method, a device, an equipment, and a storage medium. Background Technology
[0002] In animal husbandry, monitoring livestock behavior and assessing health status are crucial for improving production efficiency and ensuring animal welfare. Traditional livestock monitoring methods primarily rely on manual observation and statistics. This approach is not only labor-intensive and time-consuming but also susceptible to the subjectivity of observers and environmental conditions, making real-time and comprehensive monitoring difficult. In recent years, with the development of IoT and sensor technologies, multi-sensor-based livestock behavior monitoring systems have gradually emerged. These systems collect behavioral and physiological data from sensors such as accelerometers, gyroscopes, and temperatures, and then combine this data with machine learning techniques for behavioral pattern analysis and health assessment, significantly improving the efficiency and accuracy of monitoring.
[0003] However, traditional livestock behavior analysis systems have the following limitations in feature extraction and reasoning capabilities: ① Existing methods typically process multi-source sensor data based on a single-modality feature extraction model, which cannot fully integrate the correlation information between different modalities, resulting in limited accuracy in behavior recognition; ② The system consumes a lot of power when sampling at high frequencies and reasoning with highly complex models, making it difficult to meet the low power consumption requirements of long-term monitoring scenarios; ③ The computing models on edge devices are usually fixed structures, lacking dynamic adjustment capabilities, and making it difficult to adaptively allocate computing resources according to device status and task requirements.
[0004] With the rapid development of deep learning technology, Transformer-based multimodal data processing models have been widely applied in the field of behavior recognition due to their excellent performance in long- and short-range dependency modeling and cross-modal feature fusion. Meanwhile, techniques such as knowledge distillation, channel pruning, and reinforcement learning provide effective solutions for model optimization in edge computing environments. Many studies have begun to focus on how to leverage these techniques to improve the low-power inference capabilities of behavior monitoring devices. For example, Banitalebi-Dehkordi proposed a knowledge distillation method for low-power object detection at The 2021 International Conference on Computer Vision Workshops (ICCVW 2021). By decoupling the distillation of the teacher model from the real labels, the teacher model provides a more easily learned subset for the student model, thereby reducing the need for labeled data and reducing energy consumption. However, most of these methods focus on single-level optimization and have not yet achieved comprehensive low-power design for data sampling, model inference, and computational resource allocation.
[0005] Furthermore, the design and installation methods of traditional ear-tag devices also limit animal comfort and management efficiency. Currently, most electronic ear-tag devices still use invasive drilling for installation, which not only causes pain and infection risks to animals but may also trigger stress responses, affecting their normal growth and behavior. At the same time, the assembly and disassembly of many ear-tag devices are complex and inefficient, failing to meet the needs of farms for rapid deployment and reusability. These problems limit the widespread application of existing monitoring equipment in intelligent livestock management. Summary of the Invention
[0006] 1. The problem to be solved
[0007] Therefore, it is necessary to provide a multifunctional electronic ear tag, working method, device, computer equipment, computer-readable storage medium, and computer program product that can be deployed quickly without drilling, addressing the aforementioned technical problems.
[0008] 2. Technical Solution
[0009] Firstly, this application provides a multifunctional electronic ear tag. It includes: a headband body with an ear hook on it, the ear hook being arc-shaped, and a connecting buckle on the ear hook. The connecting buckle includes a male and a female tag, the male tag being threadedly connected to the female tag. The male tag is made of soft magnet, and a magnet is embedded in the female tag. The male and female tags are pressed together by the magnetic force of the magnet. The headband body also includes a power management module and a data monitoring module. The power management module supplies power to the data monitoring module, which is used to collect environmental and behavioral data.
[0010] In one embodiment, the data monitoring module includes an environmental monitoring unit, a behavior monitoring unit, and a positioning unit. The environmental monitoring unit includes a body temperature sensor and an air quality sensor. The body temperature sensor is disposed on the inner side of the headband body, and the air quality sensors are disposed on both sides of the headband body.
[0011] The behavior monitoring unit includes an accelerometer, a gyroscope, and a sound sensor. The sound sensor is mounted on the ear hook, while the accelerometer and gyroscope are mounted on the headband body.
[0012] The positioning unit includes a BeiDou satellite navigation system positioning chip, which is located at the center of the headband body.
[0013] Secondly, this application also provides a method for operating a multifunctional electronic ear tag. The method includes:
[0014] Divide the pre-defined breeding areas and build a wireless network for data transmission and positioning;
[0015] The monitoring module acquires multidimensional data of animals in the breeding area, including at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0016] Preprocessing of multidimensional data according to data type includes using target embedding methods to convert it into numerical form and normalizing and completing numerical features.
[0017] The data processed by the animal growth status perception model is analyzed and the results are sent to the terminal.
[0018] An adaptive power consumption algorithm is used to dynamically adjust the ear tag's working mode.
[0019] In one embodiment, intelligent analysis and processing of multidimensional data based on data type includes:
[0020] For data from different sensors, a target embedding method is used to convert categorical features into numerical form and calculate the conditional probability of the target variable for each category, expressed as:
[0021]
[0022] Where, x i It is a feature value of a certain category, y j I is the target variable, and II is the indicator function;
[0023] Z-score standardization is used to normalize numerical features, and autoregressive neural networks are used for modeling to complete missing data.
[0024] In one embodiment, the method of applying an animal growth state perception model includes:
[0025] On the server side, based on the data type, corresponding Transformer networks are built to fuse the extracted features;
[0026] During the feature fusion stage, dynamic modality attention weights are introduced, as shown in the following formula:
[0027]
[0028] Where, q m Let k be the query vector for modality m. m Let be the key vector of mode m, cos be the cosine similarity function, and α be the key vector of mode m. m For dynamic modal attention weights;
[0029] The fused features are input into a cross-modal Transformer model with an added MAWCL loss function, and the analysis results are obtained. The loss function formula is defined as follows:
[0030]
[0031] Where M is the total number of modes, α m L represents the dynamic weights of mode m. task,m For the task loss of mode m, L inconsistency,m Let λ be the consistency loss between mode m and other modes, and λ be the weighting coefficient of the inconsistency loss.
[0032] In one embodiment, the method for applying an animal growth state perception model further includes:
[0033] The complex model trained on the server is defined as the pre-trained animal growth state perception model A, and the simplified model is defined as the local lightweight animal growth state perception model B. The simplified model B is then embedded into the ear tag.
[0034] The analysis results from complex server-side models are used to guide simplified model learning through knowledge distillation. The loss function formula is as follows:
[0035] L=(1-α)·L hard +α·T 2 ·KL(P A ||P B );
[0036] Among them, L hard The standard cross-entropy loss is given by KL, where KL represents the KL divergence, T is the temperature coefficient, α is the weighting parameter, and P is the weighting parameter. A For the output distribution of model A, P B This represents the output distribution of model B.
[0037] In one embodiment, the remaining battery power, current power consumption, and sensor temperature of the monitoring device are obtained and a state vector is formed.
[0038] The state vector is input through the policy network in the reinforcement learning framework to dynamically generate a resource allocation policy. The optimization objective is as follows:
[0039]
[0040] Where π is the policy network, γ is the discount factor, and R(t) is the reward function based on power consumption and performance;
[0041]
[0042] Where Q(t) is the quality of the inference task, w1 is the weighting factor of the balance power consumption P(t), w2 is the weighting factor of the balance performance Q(t), and w3 is the weighting factor of the balance temperature T(t).
[0043] A variable-depth network is introduced, and the inference computation is reduced through a dynamic layer skipping mechanism, as shown in the following formula:
[0044]
[0045] Among them, g i (x) is the output of the i-th layer, s i The importance score for this layer is calculated, where τ is an adjustable threshold.
[0046] The appropriate sampling frequency is selected based on the device status and the importance of the inference task, as shown in the following formula:
[0047]
[0048] Among them, P sensor P is the power consumption for sampling. compute The power consumption for calculation;
[0049] When the ear tag status monitoring shows that the power consumption is at a preset threshold, the complexity of the local lightweight animal growth status perception model B is dynamically adjusted and low-frequency sampling is used to extend the ear tag working time.
[0050] Thirdly, this application also provides a multifunctional electronic ear tag control device. The device includes:
[0051] A wireless network construction module is used to divide a pre-defined breeding area and build a wireless network for data transmission and positioning;
[0052] A multidimensional data acquisition module is used to acquire multidimensional data of animals in the breeding area based on the monitoring module. The multidimensional data includes at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0053] The numerical preprocessing module is used to preprocess multidimensional data according to the data type, including using target embedding methods to convert it into numerical form and normalizing and completing the numerical features.
[0054] The animal growth status perception module is used to analyze and process the data using the animal growth status perception model and send the analysis results to the terminal.
[0055] The power consumption adaptive adjustment module is used to dynamically adjust the ear tag's working mode using a power consumption adaptive algorithm.
[0056] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0057] Divide the pre-defined breeding areas and build a wireless network for data transmission and positioning;
[0058] The monitoring module acquires multidimensional data of animals in the breeding area, including at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0059] Preprocessing of multidimensional data according to data type includes using target embedding methods to convert it into numerical form and normalizing and completing numerical features.
[0060] The data processed by the animal growth status perception model is analyzed and the results are sent to the terminal.
[0061] An adaptive power consumption algorithm is used to dynamically adjust the ear tag's working mode.
[0062] Fifthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0063] Divide the pre-defined breeding areas and build a wireless network for data transmission and positioning;
[0064] The monitoring module acquires multidimensional data of animals in the breeding area, including at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0065] Preprocessing of multidimensional data according to data type includes using target embedding methods to convert it into numerical form and normalizing and completing numerical features.
[0066] The data processed by the animal growth status perception model is analyzed and the results are sent to the terminal.
[0067] An adaptive power consumption algorithm is used to dynamically adjust the ear tag's working mode.
[0068] Sixthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0069] Divide the pre-defined breeding areas and build a wireless network for data transmission and positioning;
[0070] The monitoring module acquires multidimensional data of animals in the breeding area, including at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0071] Preprocessing of multidimensional data according to data type includes using target embedding methods to convert it into numerical form and normalizing and completing numerical features.
[0072] The data processed by the animal growth status perception model is analyzed and the results are sent to the terminal.
[0073] An adaptive power consumption algorithm is used to dynamically adjust the ear tag's working mode.
[0074] 3. Beneficial effects
[0075] 1. This invention employs a strong magnetic snap-on and headband-style assembly design, combined with a limiting mechanism and safety structure, ensuring the stability of the ear tags during use while allowing for quick one-handed disassembly of the ear tag components when needed. The disassembly process involves unlocking the snap-on mechanism, utilizing the built-in spring force to release the limiting device, and then easily rotating and removing the male and female tag components, greatly improving operational convenience and equipment reusability.
[0076] 2. In existing technologies, most ear tags require drilling holes in the animal's ear for installation, which can cause harm and stress. This invention uses a headband design, eliminating the need for drilling and avoiding the pain and infection risks associated with drilling, thus greatly improving animal comfort. The headband is made of soft, elastic medical-grade silicone, a material that conforms well to the animal's head contours, reducing pressure. Simultaneously, the ear-hook design, where it contacts the animal's ear, also incorporates a design that conforms to the animal's ear's physiological structure and includes soft cushioning material, further enhancing wearing comfort.
[0077] 3. This invention uses a Bluetooth module to record and transmit animal-related data, while a swing-type power generator provides continuous power to the system, ensuring stable operation. The Bluetooth module features redundant data storage, a design intended to address potential physical damage or signal interference, thereby guaranteeing data continuity and integrity.
[0078] 4. This invention employs knowledge distillation technology to effectively transfer high-precision features from the server-side model to a lightweight local model, enabling efficient inference on edge devices. Furthermore, it proposes a power consumption adaptive algorithm that comprehensively considers device status, task priority, and the importance of sensor data, adjusting computing resource allocation and sampling frequency in real time. Through adaptive optimization, the system can effectively extend device battery life while ensuring data analysis accuracy, making it suitable for efficient monitoring needs in complex aquaculture environments.
[0079] 5. This invention relies on deep learning algorithms and combines multi-dimensional data collected by an intelligent sensor array, including physiological parameters, behavioral data (activity level, activity range, movement trajectory, feeding behavior, rest time, etc.), and environmental parameters. Through an optimized Transformer model, comprehensive analysis is performed to achieve intelligent monitoring of animal health status and behavioral patterns. Simultaneously, the BeiDou Navigation Satellite System (BDS) enables precise animal positioning and real-time detection of abnormal behaviors. When an anomaly is detected, the animal's current area and location are displayed on the user terminal. Managers can quickly locate the animal and take appropriate measures based on the terminal prompts, thereby significantly improving the timeliness and accuracy of animal husbandry management. Attached Figure Description
[0080] Figure 1 This is a schematic diagram of the structure of the multifunctional electronic ear tag in the upright state in one embodiment;
[0081] Figure 2 This is a schematic diagram of the structure of a multifunctional electronic ear tag in a flat position in one embodiment;
[0082] Figure 3 This is an application environment diagram of a multifunctional electronic ear tag working method in one embodiment;
[0083] Figure 4 This is a flowchart of the working method of a multifunctional electronic ear tag in one embodiment;
[0084] Figure 5 Here is a diagram of the network structure for multimodal data training based on an optimized Transformer in one embodiment;
[0085] Figure 6 This is a schematic diagram of an algorithm for edge computing at the ear tag device end in one embodiment;
[0086] Figure 7 This is a structural block diagram of a multifunctional electronic ear tag control device in one embodiment;
[0087] Figure 8 This is an internal structural diagram of a computer device in one embodiment.
[0088] Reference numerals: 100, headband body; 200, ear hook; 300, connecting buckle; 400, power management module; 500, data monitoring module; 510, environmental monitoring unit; 5110, body temperature sensor; 5120, air quality sensor; 520, behavior monitoring unit; 5210, composite sensor; 5220, sound sensor; 530, positioning module. Detailed Implementation
[0089] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0090] The multifunctional electronic ear tag provided in this application embodiment refers to... Figures 1-3 Specifically, it includes:
[0091] The headband body 100 has an ear hook 200 slidably connected to it. The ear hook 200 is arc-shaped to fit the surface of the animal's ear. The distance between the headband and the ear hook 200 can be adjusted by a telescopic structure to ensure a fit for animal heads of different sizes. A connecting buckle 300 is fixedly connected to the ear hook 200. The connecting buckle 300 includes a male and a female, which are respectively set on the ear hook 200. The male is threaded onto the female. The male is made of soft magnet. The female has a magnet embedded in it. The male and female are pressed together by the magnetic force of the magnet. The end face of the headband body 100 that contacts the animal's head is the inner wall. A power management module 400 and a data monitoring module 500 are connected to the inner wall of the headband body 100. The power management module 400 supplies power to the data monitoring module 500. The data monitoring module 500 is used to collect environmental and behavioral data.
[0092] The power management module 400 includes a battery and a power generation device. The battery is located on the top of the inner wall of the headband body 100, and the power generation device is a flexible piezoelectric generator. The flexible piezoelectric generator is electrically connected to the data monitoring module 500. The power management module 400 is used for the charging and discharging management of the battery and to provide a stable power supply for the data monitoring module 500.
[0093] For example, a silicone protective sleeve of an appropriate size is selected based on the head size and activity characteristics of the sheep. The silicone protective sleeve is fixed to the front and back of the headband body 100 to provide reliable protection and limit the power management module 400 on the headband body 100, so as to avoid damage to the sheep during its daily activities.
[0094] Furthermore, the headband body 100 is made of soft and elastic medical-grade silicone material, which can better adapt to the curves of the sheep's head. For adult sheep, a headband circumference of 40-50 cm is generally suitable. Slowly slip the headband body 100 onto the sheep's head, ensuring it is centered and does not cause pressure or discomfort to the sheep's eyes, ears, etc. The memory alloy wire embedded inside the headband can quickly return to its original shape when the sheep's head shakes slightly or is subjected to external pressure, maintaining the headband's fit. At the same time, the ventilation holes on the headband can effectively dissipate heat and moisture generated by the sheep's head, preventing stuffiness. Furthermore, depending on the actual size of the sheep's head, the tightness of the headband can be adjusted by sliding the sliding buckle between the headband body 100 and the ear hook 200. Generally, a tightness that allows one finger to be inserted is appropriate, ensuring that the headband remains stable during the sheep's movements.
[0095] Specifically, the power management module 400 uses a flexible piezoelectric generator to convert mechanical energy into electrical energy, providing stable power support for the electronic components inside the ear tag and ensuring continuous operation of the device.
[0096] As a further supplement to the above, align the ear hook 200 with the sheep's ear. Its soft inner cushioning pad conforms to the contours of the sheep's ear, and its curved design fits snugly against the surface of the ear. The male and female tags used in the ear hook 200 quickly attract each other when close to the sheep's ear using the strong magnetic force between the magnet and the soft magnetic material, achieving initial positioning. Then, manually rotate the rotatable buckles on both sides of the ear hook 200 inwards. The anti-slip texture of the buckles effectively increases friction, gradually tightening them during rotation and firmly fixing them to the sheep's ear. The rounded edges of the buckles will not scratch the sheep's ear skin.
[0097] In this embodiment, the headband body 100 and connecting buckle 300 eliminate the need to drill holes in the animal's ears for installation, reducing the pain and infection risk caused by drilling and greatly improving the animal's comfort. The male and female tags with magnets can be pressed together by magnetic force, allowing staff to quickly press the male and female tags together when putting ear tags on the animal, pre-fixing the ear hook 200 to the animal's ear, and then threading the male tag into the female tag, thereby improving the deployment efficiency of the ear hook 200.
[0098] In one embodiment, refer to Figures 1-3The data monitoring module 500 includes an environmental monitoring unit 510, a behavior monitoring unit 520, and a positioning unit 530. The environmental monitoring unit 510 includes a body temperature sensor 5110 and an air quality sensor 5120. The body temperature sensor 5110 is located on the top outer side of the headband body 100 and is correspondingly set with the battery. In this embodiment, the number of air quality sensors 5120 is set to two, and the two air quality sensors 5120 are respectively located on the outer end face of the headband body 100.
[0099] The behavior monitoring unit 520 includes an accelerometer, a gyroscope, and a sound sensor 5220. The sound sensor 5220 is mounted on the ear hooks 200. The accelerometer and gyroscope are integrated into a composite sensor structure, which is mounted on the inner wall of the headband body 100. The composite sensor structure is used to collect animal movement data. The sound sensor 5220 is mounted on the ear hooks 200 at both ends and detects the animal's feeding information and emotional expression through sound signals. The data collected by the composite sensor 5210 and the sound sensor 5220 are analyzed to determine the animal's behavior pattern. The positioning unit 530 includes a Beidou satellite navigation system positioning chip, which is located at the center of the headband body 100.
[0100] For example, the composite sensor module 5210 embedded in the headband body 100 and ear loops 200 can comprehensively collect various data about the sheep. For instance, during grazing, the sound sensor 5220 can capture the frequency and intensity of the sound of the sheep chewing feed, and combined with the changes in the sheep's head and neck movement monitored by the accelerometer and gyroscope sensors, it can determine the sheep's eating speed, feed intake, and whether they are picky eaters. When the sheep are resting, by monitoring changes in muscle tension and heart rate, it can analyze the sheep's sleep quality and degree of relaxation. Furthermore, the body temperature sensor 5110 monitors the sheep's body temperature in real time; if the body temperature exceeds the normal range, the data center will issue a timely warning. The air quality sensor 5120 continuously detects the concentration of harmful gases such as ammonia and hydrogen sulfide, as well as the oxygen content, in the sheepfold, providing data support for improving the breeding environment.
[0101] Furthermore, the multi-functional electronic ear tag uses Bluetooth Low Energy (BLE) technology via a Bluetooth module to upload the collected data to the cloud data center in real time. The redundant data storage function of BLE technology ensures data integrity and continuity even when the signal is interfered with by metal structures or other equipment within the sheepfold. Additionally, the positioning chip based on the BeiDou Navigation Satellite System (BDS) on the back of the headband 100 can accurately track the sheep's location within the farm. For example, if a sheep accidentally gets lost or runs out of the designated breeding area, the system can quickly locate it and display its location information on the user terminal, making it convenient for farmers to quickly find the sheep.
[0102] The multifunctional electronic ear tag working method provided in this application embodiment can be applied to, for example... Figure 3 In the application environment shown, the terminal communicates with a cloud data center via a network. The cloud data center processes and analyzes the data collected by the terminal and sends the analysis results back to the terminal. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The cloud data center can be implemented using a standalone cloud data center or a cloud data center cluster composed of multiple cloud data centers.
[0103] The terminal includes a data display unit, an interactive control unit, and a remote alarm unit. The data display unit presents livestock identity information, behavior patterns, health status, and environmental data in real time through a graphical interface. The interactive control unit allows users to remotely configure monitoring parameters, adjust the monitoring range, and manage alarm thresholds through the terminal device. When abnormal behavior or health warnings are detected, the remote alarm unit sends immediate reminders to users via SMS, push notifications, or sound alarms to ensure that users can take quick response measures, thereby improving management efficiency and livestock welfare.
[0104] In one embodiment, such as Figures 4-6 As shown, this method is applied to Figure 3 This is achieved through interaction between the terminal and the cloud data center. The method includes the following steps:
[0105] Step 202: Divide the pre-defined breeding area and build a wireless network for data transmission and positioning.
[0106] Before using smart electronic ear tags, each breeding area is first divided, and a high-precision wireless network for data transmission and positioning is built by deploying fixed positioning nodes.
[0107] For example, the farm is first divided into several breeding areas, and electronic fences are used to demarcate and limit movement within each area. Further, taking a medium-sized sheep farm as an example, the farm is divided into different functional breeding areas such as a fattening area, a breeding area, and a ewe area. Electronic fences are used to precisely demarcate and limit movement within each area. In the fattening area, given its approximately 5000 square meters and rectangular shape, eight Bluetooth gateways are strategically installed around the perimeter and in the center. The breeding area, relatively smaller at 3000 square meters, has six Bluetooth gateways installed. The ewe area also has an appropriate number of Bluetooth gateways installed based on its layout and size, thus constructing a stable and comprehensive Bluetooth network to ensure that the electronic ear tag data on the sheep can be successfully transmitted to the data center.
[0108] Step 204: Obtain multidimensional data of animals in the breeding area based on the monitoring module.
[0109] Multidimensional data includes at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0110] Step 206: Preprocess the multidimensional data according to the data type.
[0111] The preprocessing operations include using a target embedding method to convert the target into a numerical form and normalizing and completing the numerical features.
[0112] Step 208: Apply the animal growth status perception model to analyze the processed data and send the analysis results to the terminal.
[0113] Step 210: Employ a power consumption adaptive algorithm to dynamically adjust the ear tag's working mode.
[0114] The aforementioned multifunctional electronic ear tag working method relies on deep learning algorithms and combines multidimensional data collected by an intelligent sensor array, including physiological parameters, behavioral data (activity level, activity range, movement trajectory, feeding behavior, rest time, etc.), and environmental parameters. This data is then comprehensively analyzed using an optimized Transformer model to achieve intelligent monitoring of animal health status and behavioral patterns. Simultaneously, the BeiDou Navigation Satellite System (BDS) enables precise animal positioning and real-time detection of abnormal behavior. When an abnormality is detected, a red laser indicator light will illuminate on the abnormal animal's intelligent electronic ear tag, and its current area and location will be displayed on the user terminal. Managers can quickly locate the animal and take appropriate measures based on the terminal prompts, thereby significantly improving the timeliness and accuracy of animal husbandry management.
[0115] In one embodiment, refer to Figure 4 and Figure 5 The process of preprocessing multidimensional data based on data type specifically includes:
[0116] For data from different sensors, a target embedding method is used to convert classification features into numerical form, and the conditional probability of the target variable corresponding to each category is calculated, expressed as:
[0117]
[0118] Where, x i It is a feature value of a certain category, y j I is the target variable, and II is the indicator function;
[0119] Z-score standardization is used to normalize numerical features, and an autoregressive neural network is used for modeling to complete missing data. When multidimensional data is missing, the missing values are predicted based on the autoregressive neural network, as shown in the following formula:
[0120] x t =f(x) t-1 x t-2 , ..., x t-k ;θ);
[0121] Where, x t It is the padded value of time t, x t-k The data represents the previous k time steps, and θ represents the model parameters.
[0122] In one embodiment, the method of applying an animal growth state perception model specifically includes:
[0123] On the server side, based on the data type, corresponding feature extraction and fusion Transformer networks are built to perform feature extraction and fusion operations for the corresponding modal.
[0124] During the feature fusion stage, dynamic multimodal attention weights are introduced, as shown in the following formula:
[0125]
[0126] Where, q m Let k be the query vector for modality m. m Let be the key vector of mode m, cos be the cosine similarity function, and α be the key vector of mode m. m For dynamic multimodal attention weights;
[0127] The fused features are input into a cross-modal Transformer model with an added MAWCL loss function to obtain the analysis results, which are then pushed to the user terminal.
[0128] The cross-modal Transformer with added MAWCL loss function uses a multi-head self-attention mechanism to model inter-modal dependencies. The encoder part employs stacked Transformer encoder blocks, each including a multi-head attention mechanism and a feed-forward neural network (FFN). The decoder generates prediction sequences through self-attention and encoder-decoder attention mechanisms. The loss function is defined as follows:
[0129]
[0130] Where M is the total number of modes, α m L represents the dynamic weights of mode m. task,m For the task loss of mode m, L inconsistency,m Let λ be the consistency loss between mode m and other modes, and λ be the weighting coefficient of the inconsistency loss.
[0131] Specifically, for model training, multimodal sensor data from several sheep at different time points over the past month, along with corresponding behavioral and health status records, were collected as training data. Part of this data included sheep feeding, resting, and activity data under different weather conditions, as well as changes in sensor data before and after the onset of disease symptoms. A continuously trained and optimized Transformer network was developed to accurately identify various sheep behaviors and health conditions. During training, a dropout rate of 0.2 was set. Early stopping was employed when the model's accuracy on the validation set failed to improve for 10 consecutive epochs, ultimately resulting in a well-performing model on the server.
[0132] In one embodiment, reference Figure 4 and Figure 6 The application of animal growth state perception models includes the following specific methods:
[0133] The complex model trained on the server is defined as the pre-trained animal growth state perception model A, and the simplified model is defined as the local lightweight animal growth state perception model B. The simplified model B is then embedded into the multifunctional electronic ear tag.
[0134] The analysis results from complex server-side models are used to guide simplified model learning through knowledge distillation. The loss function formula is as follows:
[0135] L=(1-α)·L hard +α·T 2 ·KL(P A ||P B );
[0136] Among them, L hardThe standard cross-entropy loss is given by KL, where KL represents the KL divergence, T is the temperature coefficient, α is the weighting parameter, and P is the weighting parameter. A For the output distribution of model A, P B This represents the output distribution of model B.
[0137] Specifically, based on the characteristics of the sheep data and the analysis requirements, a suitable range of weight parameter α values is determined. For example, through multiple experiments comparing the learning effect and accuracy of sheep growth status perception of the simplified model B under different α values, the optimal α range is selected. Simultaneously, a temperature coefficient T is set based on the data distribution characteristics and comprehensive considerations of accuracy and real-time performance in practical application scenarios. This ensures that the knowledge distillation process efficiently guides the local lightweight animal growth status perception model B to learn from the pre-trained animal growth status perception model A. This allows model B, embedded in the multifunctional electronic ear tag, to achieve rapid computation using limited resources (such as computing and storage resources) while also achieving a relatively ideal sheep growth status perception effect.
[0138] In this embodiment, a teacher-student network structure is used to reduce the computational complexity of the model. Knowledge distillation technology is employed to effectively transfer the high-precision features of the teacher network to the lightweight student network, enabling efficient inference on edge devices. For example, when monitoring the daily activities of sheep, it is necessary to focus on key indicators such as activity duration, activity range, and activity frequency. These indicators play a crucial role in judging the health status and growth status of the sheep. The local lightweight animal growth status perception model B, with its advantage of facilitating real-time data collection after embedding a multi-functional electronic ear tag, can continuously track these activity-related data.
[0139] In one embodiment, refer to Figure 4 Low power consumption is achieved based on a power adaptive algorithm, improving the device's battery life and operational stability. Specifically, this includes:
[0140] The remaining battery power, current power consumption, and sensor temperature of the ear tag are obtained and used to form a state vector. The state vector is then input into the policy network in the reinforcement learning framework to dynamically generate a resource allocation policy. The optimization objective is as follows:
[0141]
[0142] Where π is the policy network, γ is the discount factor, and R(t) is the reward function based on power consumption and performance;
[0143]
[0144] Where Q(t) is the quality of the inference task, w1 is the weighting factor of the balance power consumption P(t), w2 is the weighting factor of the balance performance Q(t), and w3 is the weighting factor of the balance temperature T(t).
[0145] Furthermore, a Dynamic Depth Network is introduced to reduce inference computation through a dynamic layer skipping mechanism, as shown in the following formula:
[0146]
[0147] Among them, g i (x) is the output of the i-th layer, s i The importance score for this layer is calculated, where τ is an adjustable threshold.
[0148] The appropriate sampling frequency is selected based on the ear tag state and the importance of the inference task, as shown in the following formula:
[0149]
[0150] Among them, P sensor P is the power consumption for sampling. compute The power consumption for calculation;
[0151] When the ear tag status monitoring shows that the power consumption is at a preset threshold, the complexity of the local lightweight animal growth status perception model B is dynamically adjusted and low-frequency sampling is used to extend the ear tag working time.
[0152] For example, when the sheep are in a relatively quiet resting state, some network layers that are not important for real-time monitoring can skip the calculation and only calculate the layers whose importance scores exceed a threshold.
[0153] This embodiment proposes a power consumption adaptive algorithm that comprehensively considers device status, task priority, and the importance of sensor data, adjusting the allocation of computing resources and sampling frequency in real time. Through adaptive optimization, the system can effectively extend the device's battery life while ensuring data analysis accuracy, making it suitable for the high-efficiency monitoring needs in complex aquaculture environments.
[0154] Farmers can access sheep information in real time through smart terminals such as dedicated sheep management login modules. This includes data such as ear tag number, breed, date of birth, behavioral patterns including feeding time, rest cycle, activity range, health status including body temperature, heart rate, and disease warnings, as well as sheep pen environmental data including air quality, temperature, and humidity. Furthermore, the interactive control unit allows farmers to remotely configure monitoring parameters, such as adjusting the upper and lower limits of sheep body temperature warnings and modifying the sensitivity of behavioral monitoring. It also allows for adjusting the monitoring range, such as focusing on a specific batch or area of sheep. Additionally, it enables the management of alarm thresholds, allowing farmers to set different abnormal alarm conditions based on actual farming experience and the sheep's growth stage.
[0155] Specifically, when the remote alarm unit detects abnormal behavior or health warnings in sheep, such as a sheep with a persistently high body temperature, abnormal heart rate, or prolonged lack of food intake, the system will immediately send an instant reminder to the farmers via SMS push notification or sound alarm. Farmers can quickly locate the problematic sheep based on the detailed information displayed on the user terminal and take corresponding measures, such as isolating and observing, adjusting feed formula, or contacting a veterinarian for diagnosis and treatment.
[0156] In this embodiment, relying on deep learning algorithms and combining multi-dimensional data collected by an intelligent sensor array, including physiological parameters (body temperature), behavioral data (activity level, activity range, movement trajectory, feeding behavior, rest time, etc.), and environmental parameters, a comprehensive analysis is performed using an optimized Transformer model to achieve intelligent perception and monitoring of animal health status and behavioral patterns. Simultaneously, the BeiDou Navigation Satellite System (BDS) enables precise animal positioning and real-time detection of abnormal behaviors. When an anomaly is detected, the animal's current area and location are displayed on the user terminal, allowing managers to quickly locate the animal and take appropriate measures based on the terminal prompts, thereby significantly improving the timeliness and accuracy of animal husbandry management.
[0157] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0158] Based on the same inventive concept, this application also provides a multifunctional electronic ear tag and control device for implementing the aforementioned multifunctional electronic ear tag and working method. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more multifunctional electronic ear tag and control device embodiments provided below can be found in the limitations of the multifunctional electronic ear tag and working method described above, and will not be repeated here.
[0159] In one embodiment, such as Figure 7 As shown, a multifunctional electronic ear tag control device is provided, including: a wireless network construction module, a multidimensional data acquisition module, a numerical preprocessing module, an animal growth status sensing module, and a power consumption adaptive adjustment module, wherein:
[0160] A wireless network construction module is used to divide a pre-defined breeding area and build a wireless network for data transmission and positioning;
[0161] A multidimensional data acquisition module is used to acquire multidimensional data of animals in the breeding area based on the monitoring module. The multidimensional data includes at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory.
[0162] The numerical preprocessing module is used to preprocess multidimensional data according to the data type, including using target embedding methods to convert it into numerical form and normalizing and completing the numerical features.
[0163] The animal growth status perception module is used to analyze and process the data using the animal growth status perception model and send the analysis results to the terminal.
[0164] The power consumption adaptive adjustment module is used to dynamically adjust the ear tag's working mode using a power consumption adaptive algorithm.
[0165] In one embodiment, the numerical preprocessing module is further configured to: for different sensor data, use a target embedding method to convert classification features into numerical form, calculate the conditional probability of the target variable corresponding to each category, and express it as: Where, x i It is a feature value of a certain category, y j I is the target variable, and II is the indicator function; Z-score standardization is used to normalize the numerical features, and an autoregressive neural network is used for modeling to complete the missing data.
[0166] In one embodiment, the animal growth state perception module is further configured to: build corresponding feature extraction and fusion Transformer networks on the server side based on data types, perform feature extraction and fusion operations for the corresponding modalities; and introduce dynamic multimodal attention weights during the feature fusion stage, as shown in the following formula: Where, q m Let k be the query vector for modality m. m Let be the key vector of mode m, cos be the cosine similarity function, and α be the key vector of mode m. m The dynamic multimodal attention weights are used; the fused features are input into a cross-modal Transformer model with an added MAWCL loss function, and the analysis results are obtained. The loss function formula is defined as follows: Where M is the total number of modes, α m L represents the dynamic weights of mode m. task,m For the task loss of mode m, L inconsistency,mLet λ be the consistency loss between mode m and other modes, and λ be the weighting coefficient of the inconsistency loss.
[0167] In one embodiment, the animal growth state perception module is further configured to define the complex model trained on the server as a pre-trained animal growth state perception model A, define the simplified model as a local lightweight animal growth state perception model B, and embed the simplified model B into a multifunctional electronic ear tag; the analysis results from the server-side complex model are used to guide the learning of the simplified model through knowledge distillation, with the loss function formula as follows: L=(1-α)·L hard +α·T 2 ·KL(P A ||P B ); where L hard The standard cross-entropy loss is given by KL, where KL represents the KL divergence, T is the temperature coefficient, α is the weighting parameter, and P is the weighting parameter. A For the output distribution of model A, P B This represents the output distribution of model B.
[0168] In one embodiment, the power consumption adaptive adjustment module is further configured to: acquire the remaining power, current power consumption, and sensor temperature of the monitoring device and form a state vector; the state vector is input through a policy network in a reinforcement learning framework to dynamically generate a resource allocation policy, with the following optimization objective: Where π is the policy network, γ is the discount factor, and R(t) is the reward function based on power consumption and performance; Where Q(t) represents the quality of the inference task, w1 is the weighting factor for the balanced power consumption P(t), w2 is the weighting factor for the balanced performance Q(t), and w3 is the weighting factor for the balanced temperature T(t); a variable depth network is introduced, and the computational load of inference is reduced through a dynamic layer skipping mechanism, as shown in the following formula: Among them, g i (x) is the output of the i-th layer, s i The importance score for this layer is calculated, with τ being an adjustable threshold; an appropriate sampling frequency is selected based on the device state and the importance of the inference task, as shown in the following formula: Among them, P sensor P is the power consumption for sampling. compute The power consumption is calculated; when the device status monitoring shows that the power consumption is at a preset threshold, the device uploads data in real time using a low-frequency sampling frequency.
[0169] The modules in the aforementioned multifunctional electronic ear tag and control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0170] In one embodiment, a computer device is provided, which may be a cloud data center, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a multi-functional electronic ear tag and its operating method.
[0171] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a multi-functional electronic ear tag and its operating method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0172] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0173] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0174] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0175] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0176] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0177] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0178] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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, they should be considered to be within the scope of this specification.
[0179] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for operating a multifunctional electronic ear tag, characterized in that, The method includes: Divide the pre-defined breeding areas and build a wireless network for data transmission and positioning; The monitoring module acquires multidimensional data of animals in the breeding area, including at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectories. Preprocessing of multidimensional data according to data type includes using target embedding methods to convert it into numerical form and normalizing and completing numerical features. The data processed by the animal growth status perception model is analyzed and the results are sent to the terminal. The ear tag's working mode is dynamically adjusted using a power consumption adaptive algorithm. The applied animal growth state perception model includes: On the server side, based on the data type, corresponding feature extraction and fusion Transformer networks are built to perform feature extraction and fusion operations for the corresponding modal. During the feature fusion stage, dynamic multimodal attention weights are introduced, as shown in the following formula: ; Where, q m Let k be the query vector for modality m. m Let be the key vector of mode m, cos be the cosine similarity function, and α be the key vector of mode m. m For the dynamic weights of mode m; The fused features are input into a cross-modal Transformer model with an added MAWCL loss function, and the analysis results are obtained. The loss function formula is defined as follows: ; Where M is the total number of modes, L task,m For the task loss of mode m, L inconsistency,m Let λ be the consistency loss between mode m and other modes, and λ be the weighting coefficient of the inconsistency loss. The applied animal growth state perception model also includes: The complex model trained on the server is defined as the pre-trained animal growth state perception model A, and the simplified model is defined as the local lightweight animal growth state perception model B. The simplified model is then embedded into the multifunctional electronic ear tag. The analysis results from complex server-side models are used to guide simplified model learning through knowledge distillation. The loss function formula is as follows: L=(1-α)·L hard +α·T 2 ·KL(P A ||P B ); Among them, L hard The standard cross-entropy loss is given by KL, where KL represents the KL divergence, T is the temperature coefficient, α is the weighting parameter, and P is the weighting parameter. A For the output distribution of model A, P B The output distribution of model B; The power consumption adaptive algorithm includes: The remaining battery power, current power consumption, and sensor temperature of the ear tag are obtained and a state vector is formed. The state vector is input through the policy network in the reinforcement learning framework to dynamically generate a resource allocation policy. The optimization objective is as follows: ; Where π is the policy network, γ is the discount factor, and R(t) is the reward function based on power consumption and performance; A variable-depth network is introduced, and the inference computation is reduced through a dynamic layer skipping mechanism, as shown in the following formula: ; Among them, g i (x) is the output of the i-th layer, s i The importance score for this layer is calculated, where τ is an adjustable threshold. The appropriate sampling frequency is selected based on the ear tag state and the importance of the inference task, as shown in the following formula: ; Among them, P sensor P is the power consumption for sampling. compute The power consumption for calculation; When the ear tag status monitoring shows that the power consumption is at a preset threshold, the complexity of the local lightweight animal growth status perception model B is dynamically adjusted and low-frequency sampling is used to extend the ear tag working time.
2. The method according to claim 1, characterized in that, The multifunctional electronic ear tag includes a headband body (100), on which an ear hook (200) is provided. The ear hook (200) is arc-shaped and has a connecting buckle (300). The connecting buckle (300) includes a male and a female. The male is threaded onto the female. The male is made of soft magnet. The female has a magnet embedded in it. The male and female are pressed together by the magnetic force of the magnet. The headband body (100) is provided with a power management module (400) and a data monitoring module (500). The power management module (400) supplies power to the data monitoring module (500). The data monitoring module (500) is used to collect environmental data and behavioral data.
3. The method according to claim 2, characterized in that, The data monitoring module (500) includes an environmental monitoring unit (510), a behavior monitoring unit (520), and a positioning unit (530). The environmental monitoring unit (510) includes a body temperature sensor (5110) and an air quality sensor (5120). The body temperature sensor (5110) is located on the inside of the headband body (100), and the air quality sensor (5120) is located on both sides of the headband body (100). The behavior monitoring unit (520) includes an accelerometer, a gyroscope, and a sound sensor (5220). The sound sensor (5220) is mounted on the ear hook (200), and the accelerometer and gyroscope are mounted on the headband body (100). The positioning unit (530) includes a Beidou satellite navigation system positioning chip, which is located at the center of the headband body (100).
4. The method according to claim 1, characterized in that, The process of preprocessing multidimensional data according to data type includes: For data from different sensors, a target embedding method is used to convert classification features into numerical form, and the conditional probability of the target variable corresponding to each category is calculated, expressed as: ; Where, x i It is a feature value of a certain category, y i It is the target variable. It is an indicator function; Z-score standardization is used to normalize numerical features, and autoregressive neural networks are used for modeling to complete missing data.
5. A multifunctional electronic ear tag working device, characterized in that, include: A wireless network construction module is used to divide a pre-defined breeding area and build a wireless network for data transmission and positioning; A multidimensional data acquisition module is used to acquire multidimensional data of animals in the breeding area based on the monitoring module. The multidimensional data includes at least body surface temperature, environmental parameters, movement status, sound signals, and activity trajectory. The numerical preprocessing module is used to preprocess multidimensional data according to the data type, including using target embedding methods to convert it into numerical form and normalizing and completing the numerical features. The animal growth status perception module is used to analyze and process the data using the animal growth status perception model and send the analysis results to the terminal. The power consumption adaptive adjustment module is used to dynamically adjust the ear tag working mode using a power consumption adaptive algorithm. The applied animal growth state perception model includes: On the server side, based on the data type, corresponding feature extraction and fusion Transformer networks are built to perform feature extraction and fusion operations for the corresponding modal. During the feature fusion stage, dynamic multimodal attention weights are introduced, as shown in the following formula: ; Where, q m Let k be the query vector for modality m. m Let be the key vector of mode m, cos be the cosine similarity function, and α be the key vector of mode m. m For the dynamic weights of mode m; The fused features are input into a cross-modal Transformer model with an added MAWCL loss function, and the analysis results are obtained. The loss function formula is defined as follows: ; Where M is the total number of modes, L task,m For the task loss of mode m, L inconsistency,m Let λ be the consistency loss between mode m and other modes, and λ be the weighting coefficient of the inconsistency loss. The applied animal growth state perception model also includes: The complex model trained on the server is defined as the pre-trained animal growth state perception model A, and the simplified model is defined as the local lightweight animal growth state perception model B. The simplified model is then embedded into the multifunctional electronic ear tag. The analysis results from complex server-side models are used to guide simplified model learning through knowledge distillation. The loss function formula is as follows: L=(1-α)·L hard +α·T 2 ·KL(P A ||P B ); Among them, L hard The standard cross-entropy loss is given by KL, where KL represents the KL divergence, T is the temperature coefficient, α is the weighting parameter, and P is the weighting parameter. A For the output distribution of model A, P B The output distribution of model B; The power consumption adaptive algorithm includes: The remaining battery power, current power consumption, and sensor temperature of the ear tag are obtained and a state vector is formed. The state vector is input through the policy network in the reinforcement learning framework to dynamically generate a resource allocation policy. The optimization objective is as follows: ; Where π is the policy network, γ is the discount factor, and R(t) is the reward function based on power consumption and performance; A variable-depth network is introduced, and the inference computation is reduced through a dynamic layer skipping mechanism, as shown in the following formula: ; Among them, g i (x) is the output of the i-th layer, s i The importance score for this layer is calculated, where τ is an adjustable threshold. The appropriate sampling frequency is selected based on the ear tag state and the importance of the inference task, as shown in the following formula: ; Among them, P sensor P is the power consumption for sampling. compute The power consumption for calculation; When the ear tag status monitoring shows that the power consumption is at a preset threshold, the complexity of the local lightweight animal growth status perception model B is dynamically adjusted and low-frequency sampling is used to extend the ear tag working time.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.