CN107258581B - Monitoring method of pig's movement based on bluetooth ear tag - Google Patents
Monitoring method of pig's movement based on bluetooth ear tag Download PDFInfo
- Publication number
- CN107258581B CN107258581B CN201710458707.0A CN201710458707A CN107258581B CN 107258581 B CN107258581 B CN 107258581B CN 201710458707 A CN201710458707 A CN 201710458707A CN 107258581 B CN107258581 B CN 107258581B
- Authority
- CN
- China
- Prior art keywords
- pig
- data
- bluetooth
- acceleration
- server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000033001 locomotion Effects 0.000 title claims abstract description 61
- 238000012544 monitoring process Methods 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 title claims description 27
- 230000002159 abnormal effect Effects 0.000 claims abstract description 18
- 230000001133 acceleration Effects 0.000 claims description 59
- 241000282887 Suidae Species 0.000 claims description 22
- 238000012360 testing method Methods 0.000 claims description 13
- 230000011218 segmentation Effects 0.000 claims description 10
- 230000009191 jumping Effects 0.000 claims description 9
- 238000012549 training Methods 0.000 claims description 9
- 238000001914 filtration Methods 0.000 claims description 8
- 238000013461 design Methods 0.000 claims description 7
- 238000011002 quantification Methods 0.000 claims description 7
- 230000008569 process Effects 0.000 claims description 6
- 238000004458 analytical method Methods 0.000 claims description 5
- 238000003066 decision tree Methods 0.000 claims description 5
- 230000006399 behavior Effects 0.000 claims description 4
- 238000004891 communication Methods 0.000 claims description 4
- 238000007405 data analysis Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000007781 pre-processing Methods 0.000 claims description 3
- 238000003860 storage Methods 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 claims 1
- 238000009395 breeding Methods 0.000 abstract description 10
- 230000001488 breeding effect Effects 0.000 abstract description 10
- 238000005516 engineering process Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 4
- 230000036541 health Effects 0.000 description 3
- 241001083913 Cotyledon Species 0.000 description 2
- 239000003990 capacitor Substances 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 210000000582 semen Anatomy 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 241000196324 Embryophyta Species 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000012271 agricultural production Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 210000005069 ears Anatomy 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000009313 farming Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
- 230000003071 parasitic effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000008054 signal transmission Effects 0.000 description 1
- 238000013112 stability test Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K11/00—Marking of animals
- A01K11/001—Ear-tags
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K11/00—Marking of animals
- A01K11/006—Automatic identification systems for animals, e.g. electronic devices, transponders for animals
-
- A—HUMAN NECESSITIES
- A01—AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
- A01K—ANIMAL HUSBANDRY; AVICULTURE; APICULTURE; PISCICULTURE; FISHING; REARING OR BREEDING ANIMALS, NOT OTHERWISE PROVIDED FOR; NEW BREEDS OF ANIMALS
- A01K29/00—Other apparatus for animal husbandry
- A01K29/005—Monitoring or measuring activity, e.g. detecting heat or mating
Landscapes
- Life Sciences & Earth Sciences (AREA)
- Environmental Sciences (AREA)
- Animal Husbandry (AREA)
- Biodiversity & Conservation Biology (AREA)
- Birds (AREA)
- Zoology (AREA)
- Biophysics (AREA)
- Measuring And Recording Apparatus For Diagnosis (AREA)
- Emergency Alarm Devices (AREA)
Abstract
Description
技术领域technical field
本发明涉及猪只福利养殖、BLE4.0技术、传感器技术以及算法研究领域,具体是一种基于蓝牙耳标的猪只运动量监测系统及方法。The invention relates to the research fields of pig welfare breeding, BLE4.0 technology, sensor technology and algorithm, in particular to a system and method for monitoring the movement of pigs based on Bluetooth ear tags.
背景技术Background technique
随着现代养殖业的规模化、集约化程度越来越高,自动化养猪将成为养猪业的发展趋势,母猪是猪场的根本,母猪的生产性能在一定程度上,决定了猪场的命运,现在的农场养殖户越来越重视母猪的健康问题,运动量在一定程度上反应母猪的身体健康状态;公猪运动量与精液活力有不可分割的关系,直接影响受胎率。实时准确的监测猪只的运动量,分析猪只行为并采取相应措施,对提高母猪健康程度,增强公猪精液品质,减少仔猪死亡率,提高猪只养殖福利,减小人力成本投入,提高养殖自动化水平具有重要意义。With the increasing scale and intensification of the modern breeding industry, automated pig raising will become the development trend of the pig industry. The sow is the foundation of the pig farm. Farmers now pay more and more attention to the health of sows, and the amount of exercise reflects the physical health of the sows to a certain extent; the amount of exercise of boars is inseparably related to semen vitality, which directly affects the conception rate. Real-time and accurate monitoring of the amount of exercise of pigs, analysis of pig behavior and taking corresponding measures, can improve the health of sows, enhance the quality of boar semen, reduce piglet mortality, improve pig breeding welfare, reduce labor costs, and improve breeding. The level of automation is significant.
目前BLE4.0技术已经在医疗,智能家居,汽车等领域得到广泛应用,但是在农业生产领域以及设施养殖产业中的自动化设备并不多见。目前养殖业对猪只运动量的判断主要停留在依靠饲养员的长期目测观察,不仅工作繁重而且容易受饲养员主观经验影响,使得设施福利养殖还没有显现出巨大的现实效益。因此,实时、准确的监测猪只运动量,是研究今后精细养猪中不可避免的发展趋势之一。At present, BLE4.0 technology has been widely used in medical, smart home, automobile and other fields, but there are few automation equipment in the field of agricultural production and facility breeding industry. At present, the judgement of pig exercise in the breeding industry mainly relies on the long-term visual observation of the breeder, which is not only heavy work but also easily affected by the subjective experience of the breeder, so that the facility welfare breeding has not shown great practical benefits. Therefore, real-time and accurate monitoring of pig exercise is one of the inevitable development trends in the study of fine pig farming in the future.
发明内容SUMMARY OF THE INVENTION
本发明基于背景技术中存在的问题,提出一种基于蓝牙耳标的猪只运动量监测系统,它包括蓝牙耳标、摄像头、蓝牙主机、交换机、服务器、客户端和PC,所述蓝牙耳标挂设于猪耳朵上用以采集猪只运动量数据,并通过蓝牙主机经交换机上传至服务器;所述摄像头用于采集猪只运动状态,并经交换机上传至服务器;服务器分别连接客户端和PC用以发送运动量数据。Based on the problems existing in the background technology, the present invention proposes a pig movement monitoring system based on Bluetooth ear tags, which includes a Bluetooth ear tag, a camera, a Bluetooth host, a switch, a server, a client and a PC. It is used to collect the pig's movement data on the pig's ear, and upload it to the server through the switch through the Bluetooth host; the camera is used to collect the pig's movement status and upload it to the server through the switch; the server is connected to the client and the PC respectively for sending exercise data.
优选的,所述蓝牙耳标包括电路结构和外壳结构,所述电路结构呈PCB板形式设置于外壳结构内。Preferably, the Bluetooth ear tag includes a circuit structure and a shell structure, and the circuit structure is arranged in the shell structure in the form of a PCB board.
具体的,所述蓝牙耳标的电路结构包括纽扣电池、滤波电路、蓝牙芯片、射频电路和加速度计,所述纽扣电池连接滤波电路,滤波电路的输出端分别连接蓝牙芯片和加速度计,蓝牙芯片和加速度计彼此相连,蓝牙芯片和射频电路互相连接。Specifically, the circuit structure of the Bluetooth ear tag includes a button battery, a filter circuit, a Bluetooth chip, a radio frequency circuit and an accelerometer, the button battery is connected to the filter circuit, and the output end of the filter circuit is respectively connected to the Bluetooth chip and the accelerometer, and the Bluetooth chip and the accelerometer are respectively connected. The accelerometers are connected to each other, and the Bluetooth chip and the radio frequency circuit are connected to each other.
优选的,蓝牙芯片与蓝牙主机相连,蓝牙主机通过交换机连接服务器,服务器向客户端和PC发送运动量数据。Preferably, the bluetooth chip is connected to the bluetooth host, the bluetooth host is connected to the server through the switch, and the server sends the exercise quantity data to the client and the PC.
具体的,所述蓝牙耳标的外壳结构包括月台、通孔和圆槽,圆槽呈凹状设置在月台上;在圆槽上开设有通孔,通孔具有内螺纹并与PCB板的固定孔相配合。Specifically, the shell structure of the Bluetooth ear tag includes a platform, a through hole and a circular groove, and the circular groove is arranged on the platform in a concave shape; a through hole is opened on the circular groove, and the through hole has an internal thread and is fixed with the PCB board. holes to match.
本发明还公开了一种基于蓝牙耳标的猪只运动量监测方法,它通过摄像头记录每头猪的运动状态视频,作为人为标定猪只运动状态识别的判定依据;通过蓝牙耳标采集猪只的加速度数据,通过蓝牙技术以广播的形式把加速度数据传输到主机,并上传至服务器存储至数据库;通过选取状态视频中猪只运动状态与此时蓝牙耳标采集的加速度数据进行分析,通过构建决策树,遍历每一个变量的每一种分割方式,找到最好的分割点,对猪只运动状态进行识别,所述运动状态包括走、跑、跳、静止;系统根据猪只的运动状态计算出猪只运动量并做出决策,发生异常情况及时向PC客户端发出猪只异常警告并且给饲养员手机发出报警信号。The invention also discloses a method for monitoring the movement of pigs based on bluetooth ear tags, which records the movement state video of each pig through a camera as a judgment basis for artificially calibrated pig movement state identification; collects the acceleration of pigs through bluetooth ear tags Data, the acceleration data is transmitted to the host in the form of broadcasting through Bluetooth technology, and uploaded to the server for storage to the database; by selecting the pig's motion state in the status video and the acceleration data collected by the Bluetooth ear tag at this time, it is analyzed by constructing a decision tree. , traverse each segmentation method of each variable, find the best segmentation point, and identify the motion state of the pig, which includes walking, running, jumping, and stationary; the system calculates the pig according to the motion state of the pig. Only exercise and make decisions, if any abnormal situation occurs, it will send out an abnormal warning of pigs to the PC client in time and send an alarm signal to the breeder's mobile phone.
具体流程是:The specific process is:
第一步:设计蓝牙耳标进行加速度数据的采集以及对数据的加权平均预处理,并将处理后的加速度数据以广播的形式发送到空中;Step 1: Design a Bluetooth ear tag to collect acceleration data and preprocess the weighted average of the data, and send the processed acceleration data to the air in the form of broadcast;
第二步:设计蓝牙接收主机模块,通过射频电路来抓取空中的广播加速度数据包从而为服务器获得数据做准备;Step 2: Design the Bluetooth receiving host module, and use the radio frequency circuit to capture the broadcast acceleration data packets in the air to prepare for the server to obtain data;
第三步:蓝牙主机通过与串口服务器相连采用http通信将获得数据全部上传至服务器并将其数据存入数据库;Step 3: The bluetooth host will upload all the obtained data to the server by connecting with the serial port server and use http communication and store the data in the database;
第四步:在服务器中计算合加速度和加速度差,加上原先对应的三轴加速度数据作为一条完整的数据记录,为后续数据分析及特征提取做准备;Step 4: Calculate the combined acceleration and acceleration difference in the server, and add the original corresponding three-axis acceleration data as a complete data record to prepare for subsequent data analysis and feature extraction;
第五步:采用决策树分析方法将记录(axi,ayi,azi,ai,Δai)看做一个节点,将所有节点分为训练节点和测试节点,通过训练节点与摄像头所采集到视频进行人为标定方式判定猪只的运动状态(走,跑,跳,静止),采取“有导师学习”方式进行高强度样本训练;Step 5: Using the decision tree analysis method, the record (a xi , a yi , a zi , a i , Δa i ) is regarded as a node, and all nodes are divided into training nodes and test nodes. Go to the video to perform manual calibration to determine the movement state of the pig (walking, running, jumping, stationary), and adopt the "learning with tutor" method for high-intensity sample training;
第六步:通过第五步标定出来的训练节点,遍历每一个变量的每一种分割方式,找到最好的分割点,总共分割成4个节点:走,跑,跳,静止,对4个节点分别执行第二步到第三步,采用熵来量化它的“纯度”,直到每个节点足够“纯”为止;Step 6: Through the training nodes calibrated in
第七步:通过训练好的算法去判定测试节点,通过计算测试成功与失败之间的比例,来判定算法及算法参数的优劣性;Step 7: Determine the test nodes through the trained algorithm, and determine the pros and cons of the algorithm and algorithm parameters by calculating the ratio between the success and failure of the test;
第八步:若测试结果较差将重复执行第五步到第七步之间的操作过程,直到准确度满意为止;Step 8: If the test result is poor, the operation process between
第九步:通过自定义量化标准,将每种运动状态给予一个分数值;Step 9: Give each motion state a score by customizing the quantification standard;
第十步:以固定时间间隔单元对运动量进行分数累加,从而计算出猪只的运动量及其运动程度,若出现异常情况及时向PC客户端发出猪只异常警告并且给饲养员手机发出报警信号。Step 10: Accumulate the points of the exercise volume at a fixed time interval to calculate the exercise volume and the degree of exercise of the pigs. If there is an abnormal situation, send an abnormal warning to the PC client and send an alarm signal to the breeder's mobile phone.
具体的,第四步中,加速度数据需要经过以下预处理:Specifically, in the fourth step, the acceleration data needs to undergo the following preprocessing:
将采集到的加速度数据进行滤波、去噪处理,通过加权平均滤波算法对数据进行预处理:The collected acceleration data is filtered and denoised, and the data is preprocessed by the weighted average filtering algorithm:
对每1秒采集到的100组X轴,Y轴,Z轴加速度数据进行加权平均滤波、去噪处理,得到预处理的加速度数据,用下式求平均值:Perform weighted average filtering and denoising on 100 sets of X-axis, Y-axis, and Z-axis acceleration data collected every 1 second to obtain preprocessed acceleration data, and use the following formula to calculate the average value:
式中,a0,a1,...,aN均为常数且应满足下式:In the formula, a 0 , a 1 ,...,a N are all constants and should satisfy the following formula:
通过式计算合加速度a,其中ax,ay,az分别表示X轴,Y 轴,Z轴方向的加速度pass-through Calculate the resultant acceleration a, where a x , a y , and a z represent the acceleration in the X-axis, Y-axis, and Z-axis directions, respectively
计算每组数据的其中i表示第i秒。Calculate for each set of data where i represents the ith second.
优选的,蓝牙耳标1s内采集100组加速度数据,由于某一时刻的数据无法判断当前猪只处于何种运动状态,因此要在一段时间内判断一次猪只运动状态,第五步中,每10 秒判断一次猪只运动状态。Preferably, the Bluetooth ear tag collects 100 sets of acceleration data within 1s. Since the data at a certain time cannot determine what kind of movement state the pig is in, it is necessary to determine the movement state of the pig once within a certain period of time. In the fifth step, each
具体的,第十步中,以10秒的间隔时间为一个单元,进行运动量的计算,其中yn表示10秒内运动量量化标准所对应的总分数,Sn表示不同运动状态所对应的分数,tn为运动行为所对应的持续时间。Specifically, in the tenth step, an interval of 10 seconds is used as a unit to calculate the amount of exercise. Among them, y n represents the total score corresponding to the quantification standard of the amount of exercise in 10 seconds, Sn represents the score corresponding to different exercise states, and t n is the duration corresponding to the exercise behavior.
本发明的有益效果The beneficial effects of the present invention
(1)本系统对猪只运动状况进行24小时实时监测,无需人工值守,系统分析记录猪只的运动状态,能够及时发现异常情况并采取相应措施,减少养殖厂因异常情况造成的损失,有效提高了养殖人员的工作效率。(1) The system conducts 24-hour real-time monitoring of the movement status of pigs without manual duty. The system analyzes and records the movement status of pigs, and can detect abnormal conditions in time and take corresponding measures to reduce the losses caused by abnormal conditions in the breeding plant. Effective Improve the work efficiency of farmers.
(2)与传统的猪只检测系统相比,该系统成本低廉、安装方便,同时对实现饲养管理的福利化、自动化提供科学依据。(2) Compared with the traditional pig detection system, the system has low cost and convenient installation. At the same time, it provides a scientific basis for realizing welfare and automation of feeding management.
(3)系统采用蓝牙4.0无线通信技术,避免了传统布线带来的成本和稳定性上的不足,系统能够保证长期稳定的工作。此外,无线技术方便数据的实时采集,保证系统的工作效率。(3) The system adopts Bluetooth 4.0 wireless communication technology, which avoids the shortage of cost and stability caused by traditional wiring, and the system can ensure long-term stable work. In addition, the wireless technology facilitates the real-time collection of data and ensures the working efficiency of the system.
附图说明Description of drawings
图1为本发明的系统框图。FIG. 1 is a system block diagram of the present invention.
图2为本发明蓝牙耳标的电路框图。FIG. 2 is a circuit block diagram of the Bluetooth ear tag of the present invention.
图3为本发明的整体框图。FIG. 3 is an overall block diagram of the present invention.
图4为本发明蓝牙耳标的外壳结构图。FIG. 4 is a structural diagram of the shell of the Bluetooth ear tag of the present invention.
图5为电源模块电路图。FIG. 5 is a circuit diagram of a power module.
图6为加速度计电路图。Figure 6 is an accelerometer circuit diagram.
图7为状态指示灯电路图。Figure 7 is a circuit diagram of the status indicator light.
图8为射频电路图。Figure 8 is a radio frequency circuit diagram.
具体实施方式Detailed ways
下面结合实施例对本发明作进一步说明,但本发明的保护范围不限于此:Below in conjunction with embodiment, the present invention is further described, but protection scope of the present invention is not limited to this:
实施例1:结合图1,一种基于蓝牙耳标的猪只运动量监测系统,它包括蓝牙耳标、摄像头、蓝牙主机、交换机、服务器、客户端和PC,所述蓝牙耳标挂设于猪耳朵上用以采集猪只运动量数据,并通过蓝牙主机经交换机上传至服务器;所述摄像头用于采集猪只运动状态,并经交换机上传至服务器;服务器分别连接客户端和PC用以发送运动量数据。Embodiment 1: in conjunction with Fig. 1, a pig movement monitoring system based on bluetooth ear tag, which includes bluetooth ear tag, camera, bluetooth host, switch, server, client and PC, and the bluetooth ear tag is hung on the pig's ear. The above is used to collect the pig's movement data, and upload it to the server through the switch through the Bluetooth host; the camera is used to collect the pig's movement state and upload it to the server through the switch; the server is connected to the client and the PC to send the movement data.
实施例2:如实施例1所述的监测系统,所述蓝牙耳标包括电路结构和外壳结构,所述电路结构呈PCB板形式设置于外壳结构内。Embodiment 2: The monitoring system according to
实施例3:结合图2,如实施例2所述的监测系统,所述蓝牙耳标的电路结构包括纽扣电池、滤波电路、蓝牙芯片、射频电路和加速度计,所述纽扣电池连接滤波电路,滤波电路的输出端分别连接蓝牙芯片和加速度计,蓝牙芯片和加速度计彼此相连,蓝牙芯片和射频电路互相连接。Embodiment 3: With reference to FIG. 2, in the monitoring system described in
在一些优选的实施例中:In some preferred embodiments:
结合图5,电源模块通过所述纽扣电池给蓝牙耳标供电,通过在电源两端并联一个2.2uf 的电容来减小电源的交流内阻,防止电子电路产生寄生震荡等不良后果。Referring to Figure 5, the power supply module supplies power to the Bluetooth ear tag through the button battery, and a 2.2uf capacitor is connected in parallel at both ends of the power supply to reduce the AC internal resistance of the power supply and prevent the electronic circuit from producing parasitic oscillations and other adverse consequences.
结合图6,通过在加速度计的SCL,SDA引脚上去串联一个4.7K的电阻,并且通过VCC(3.3V)电源将其电位进行上拉,保证其能正常工作,并且也在电源两侧并联了一个100nf的电容,进行一定程度的滤波。Combined with Figure 6, a 4.7K resistor is connected in series with the SCL and SDA pins of the accelerometer, and its potential is pulled up through the VCC (3.3V) power supply to ensure that it can work normally, and it is also connected in parallel on both sides of the power supply A 100nf capacitor is used for a certain degree of filtering.
结合图7,在PCB电路设计中加入状态指示灯,通过主芯片的P1.0引脚对其进行控制,并串联一个470欧的电阻形成指示回路,当蓝牙耳标装上纽扣电池正常工作时,状态指示灯将以500ms的间隔闪烁3次,提醒使用者蓝牙耳标已经处于正常运行状态,随后状态指示灯将不再闪烁,降低蓝牙耳标功耗。Combined with Figure 7, a status indicator is added to the PCB circuit design, which is controlled by the P1.0 pin of the main chip, and a 470 ohm resistor is connected in series to form an indicator loop. When the Bluetooth ear tag is installed with a button battery, it works normally. , the status indicator will flash 3 times at an interval of 500ms, reminding the user that the Bluetooth ear tag is in a normal operation state, and then the status indicator will no longer flash, reducing the power consumption of the Bluetooth ear tag.
结合图8,在射频电路中采用2450BM15A002巴伦滤波器搭载板载射频天线AN1进行无线射频的信号发送与接收,为蓝牙耳标与蓝牙主机接收之间的正常接收做好准备。With reference to Figure 8, the 2450BM15A002 balun filter is used in the RF circuit to carry the on-board RF antenna AN1 for wireless RF signal transmission and reception, so as to prepare for the normal reception between the Bluetooth ear tag and the Bluetooth host.
在从机发送功率为0db,发送接收模块间隔15米的距离下实测数据如表1所示The measured data is shown in Table 1 when the sending power of the slave is 0db and the distance between the sending and receiving modules is 15 meters.
表1数据传输的稳定性测试Table 1 Stability test of data transmission
射频电路使用的是巴伦滤波器以及TI推荐的2.4G板载PCB天线,在实际测量中,主机能在距离23m范围内(无任何遮挡物)接收到从机广播数据,并且稳定传输。在从机发送功率为0db,发送模块发送固定20个字节的数据,实测传输距离如表2所示The RF circuit uses a balun filter and a 2.4G onboard PCB antenna recommended by TI. In actual measurement, the host can receive the broadcast data from the slave within a distance of 23m (without any obstructions), and transmit it stably. When the sending power of the slave is 0db, the sending module sends fixed 20 bytes of data. The measured transmission distance is shown in Table 2.
表2蓝牙耳标的传输距离测试Table 2 Transmission distance test of Bluetooth ear tags
采用带内核的低功耗蓝牙芯片,在协议栈中开启低功耗模式,并且根据不同应用以及工作状态,通过系统调度自适应进入不同的低功耗模式(PM1、PM2、PM3);在蓝牙耳标程序设计中对于在设定阈值范围内的波动数据自适应滤除,降低蓝牙的广播功耗;对数据进行打包压缩,减少开启关闭广播造成的功耗;在加速度传感器的选型上采用低功耗的加速度计。Adopt low-power Bluetooth chip with core, enable low-power mode in the protocol stack, and automatically enter different low-power modes (PM1, PM2, PM3) through system scheduling according to different applications and working states; In the ear tag program design, the fluctuating data within the set threshold range is adaptively filtered to reduce the broadcast power consumption of Bluetooth; the data is packaged and compressed to reduce the power consumption caused by turning on and off the broadcast; the selection of the acceleration sensor adopts Low-power accelerometer.
实施例4,结合图3,如实施例3所述的监测系统,蓝牙芯片与蓝牙主机相连,蓝牙主机通过交换机连接服务器,服务器向客户端和PC发送运动量数据(服务器端应用程序主要依靠数据库中实时保存的信息,以可视化界面的形式展示猪舍中猪只的运动信息)。
实施例5:结合图4,如实施例2所述的监测系统,所述蓝牙耳标的外壳结构包括月台1、通孔2和圆槽4,圆槽4呈凹状设置在月台1上;在圆槽4上开设有通孔2,通孔2具有内螺纹并与PCB板的固定孔相配合。Embodiment 5: with reference to FIG. 4 , in the monitoring system described in
实施例6:如实施例1所述一种基于蓝牙耳标的猪只运动量监测方法,它通过摄像头记录每头猪的运动状态视频,作为人为标定猪只运动状态识别的判定依据;通过蓝牙耳标采集猪只的加速度数据,通过蓝牙技术以广播的形式把加速度数据传输到主机,并上传至服务器存储至数据库;通过选取状态视频中猪只运动状态与此时蓝牙耳标采集的加速度数据进行分析,通过构建决策树,遍历每一个变量的每一种分割方式,找到最好的分割点,对猪只运动状态进行识别,所述运动状态包括走、跑、跳、静止;系统根据猪只的运动状态计算出猪只运动量并做出决策,发生异常情况及时向PC客户端发出猪只异常警告并且给饲养员手机发出报警信号。Embodiment 6: As described in
本发明提出一个自定义标准,标准内容具体是将走、跑、跳、静止进行分数量化如表3 所示:The present invention proposes a self-defined standard, the content of the standard is to quantify the scores of walking, running, jumping, and stillness, as shown in Table 3:
表3猪只运动状态量化标准Table 3 Quantitative standards for the movement state of pigs
实施例7:如实施例6所述的监测方法,具体流程是:Embodiment 7: the monitoring method as described in
第一步:设计蓝牙耳标进行加速度数据的采集以及对数据的加权平均预处理,并将处理后的加速度数据以广播的形式发送到空中;Step 1: Design a Bluetooth ear tag to collect acceleration data and preprocess the weighted average of the data, and send the processed acceleration data to the air in the form of broadcast;
第二步:设计蓝牙接收主机模块,通过射频电路来抓取空中的广播加速度数据包从而为服务器获得数据做准备;Step 2: Design the Bluetooth receiving host module, and use the radio frequency circuit to capture the broadcast acceleration data packets in the air to prepare for the server to obtain data;
第三步:蓝牙主机通过与串口服务器相连采用http通信将获得数据全部上传至服务器并将其数据存入数据库;Step 3: The bluetooth host will upload all the obtained data to the server by connecting with the serial port server and use http communication and store the data in the database;
第四步:在服务器中计算合加速度和加速度差,加上原先对应的三轴加速度数据作为一条完整的数据记录,为后续数据分析及特征提取做准备;Step 4: Calculate the combined acceleration and acceleration difference in the server, and add the original corresponding three-axis acceleration data as a complete data record to prepare for subsequent data analysis and feature extraction;
第五步:采用决策树分析方法将记录(axi,ayi,azi,ai,Δai)看做一个节点,将所有节点分为训练节点和测试节点,通过训练节点与摄像头所采集到视频进行人为标定方式判定猪只的运动状态(走,跑,跳,静止),采取“有导师学习”方式进行高强度样本训练;Step 5: Using the decision tree analysis method, the record (a xi , a yi , a zi , a i , Δa i ) is regarded as a node, and all nodes are divided into training nodes and test nodes. Go to the video to perform manual calibration to determine the movement state of the pig (walking, running, jumping, stationary), and adopt the "learning with tutor" method for high-intensity sample training;
第六步:通过第五步标定出来的训练节点,遍历每一个变量的每一种分割方式,找到最好的分割点,总共分割成4个节点:走,跑,跳,静止,对4个节点分别执行第二步到第三步,采用熵来量化它的“纯度”,直到每个节点足够“纯”为止;Step 6: Through the training nodes calibrated in
第七步:通过训练好的算法去判定测试节点,通过计算测试成功与失败之间的比例,来判定算法及算法参数的优劣性;Step 7: Determine the test nodes through the trained algorithm, and determine the pros and cons of the algorithm and algorithm parameters by calculating the ratio between the success and failure of the test;
第八步:若测试结果较差将重复执行第五步到第七步之间的操作过程,直到准确度满意为止;Step 8: If the test result is poor, the operation process between
第九步:通过自定义量化标准,将每种运动状态给予一个分数值;Step 9: Give each motion state a score by customizing the quantification standard;
第十步:以固定时间间隔单元对运动量进行分数累加,从而计算出猪只的运动量及其运动程度,若出现异常情况及时向PC客户端发出猪只异常警告并且给饲养员手机发出报警信号。Step 10: Accumulate the points of the exercise volume at a fixed time interval to calculate the exercise volume and the degree of exercise of the pigs. If there is an abnormal situation, send an abnormal warning to the PC client and send an alarm signal to the breeder's mobile phone.
实施例8:如实施例7所述的监测方法,第四步中,加速度数据需要经过以下预处理:Embodiment 8: The monitoring method as described in Embodiment 7, in the fourth step, the acceleration data needs to undergo the following preprocessing:
将采集到的加速度数据进行滤波、去噪处理,通过加权平均滤波算法对数据进行预处理:The collected acceleration data is filtered and denoised, and the data is preprocessed by the weighted average filtering algorithm:
对每1秒采集到的100组X轴,Y轴,Z轴加速度数据进行加权平均滤波、去噪处理,得到预处理的加速度数据,用下式求平均值:Perform weighted average filtering and denoising on 100 sets of X-axis, Y-axis, and Z-axis acceleration data collected every 1 second to obtain preprocessed acceleration data, and use the following formula to calculate the average value:
式中,a0,a1,...,aN均为常数且应满足下式:In the formula, a 0 , a 1 ,...,a N are all constants and should satisfy the following formula:
通过式计算合加速度a,其中ax,ay,az分别表示X轴,Y 轴,Z轴方向的加速度pass-through Calculate the resultant acceleration a, where a x , a y , and a z represent the acceleration in the X-axis, Y-axis, and Z-axis directions, respectively
计算每组数据的其中i表示第i秒。Calculate for each set of data where i represents the ith second.
实施例9:如实施例8所述的监测方法,蓝牙耳标1s内采集100组加速度数据,由于某一时刻的数据无法判断当前猪只处于何种运动状态,因此要在一段时间内判断一次猪只运动状态,第五步中,每10秒判断一次猪只运动状态。Embodiment 9: According to the monitoring method described in Embodiment 8, 100 sets of acceleration data are collected within 1 s of the Bluetooth ear tag. Since the data at a certain moment cannot determine the current state of movement of the pig, it must be determined once within a certain period of time. The movement state of the pig. In the fifth step, the movement state of the pig is judged every 10 seconds.
实施例10:如实施例7所述的监测方法,第十步中,以10秒的间隔时间为一个单元,进行运动量的计算,其中yn表示10秒内运动量量化标准所对应的总分数,Sn表示不同运动状态所对应的分数,tn为运动行为所对应的持续时间。Embodiment 10: The monitoring method as described in Embodiment 7, in the tenth step, taking the interval time of 10 seconds as a unit to calculate the amount of exercise, Among them, y n represents the total score corresponding to the quantification standard of the amount of exercise in 10 seconds, Sn represents the score corresponding to different exercise states, and t n is the duration corresponding to the exercise behavior.
本发明还提出一个猪只运动量量化标准如表4所示:The present invention also proposes a quantitative standard for the amount of exercise of pigs as shown in Table 4:
表4猪只运动量量化标准Table 4 Quantitative standard for the amount of exercise of pigs
本发明所提出的监测系统功能说明:Function description of the monitoring system proposed by the present invention:
(1)加速度数据的采集与滤波(1) Collection and filtering of acceleration data
由于猪只正常活动情况下会偶尔进行耳朵扇动的行为,造成蓝牙耳标的晃动,导致蓝牙耳标采集到的加速度数据异常;加速度传感器本身也有一定的零漂和温漂,所以要对采集到的加速度数据进行滤波,从而确保采集到的加速度数据的准确性。Because the pigs will occasionally flap their ears under normal activities, causing the Bluetooth ear tags to shake, resulting in abnormal acceleration data collected by the Bluetooth ear tags; the acceleration sensor itself also has certain zero drift and temperature drift, so it is necessary to The acceleration data is filtered to ensure the accuracy of the collected acceleration data.
(2)数据的传输(2) Transmission of data
蓝牙芯片通过蓝牙4.0技术将采集到的加速度数据以2.4GHz ISM无线频段技术传送给蓝牙主机,为实时采集猪只的运动状态数据提供了保障。The bluetooth chip transmits the collected acceleration data to the bluetooth host through the 2.4GHz ISM wireless frequency band technology through the bluetooth 4.0 technology, which provides a guarantee for the real-time collection of the pig's movement state data.
(3)视频采集(3) Video capture
视频监控记录每头猪运动状态,通过选取视频中猪只特定运动状态与此时传感器采集的加速度数据,按照猪只运动状态对加速度数据进行分类,确定猪只运动状态与加速度数据间的对应关系。视频监控是作为猪只运动状态识别的判断依据,在对应关系建立后只需通过实时加速度数据判断猪只运动状态,无需再进行视频采集。The video surveillance records the movement state of each pig. By selecting the specific movement state of the pig in the video and the acceleration data collected by the sensor at this time, the acceleration data is classified according to the movement state of the pig, and the corresponding relationship between the movement state of the pig and the acceleration data is determined. . Video surveillance is used as the basis for judging the motion status of pigs. After the corresponding relationship is established, the motion status of pigs only needs to be judged by real-time acceleration data, and there is no need for video collection.
(4)运动量分析(4) Analysis of the amount of exercise
服务器通过接收到的加速度数据建立运动状态模型,采用具体的算法将运动状态进行分类处理,并根据自主定义的量化标准进行数据处理,最后将其存入数据库,发生异常情况及时向PC客户端发出猪只异常警告并且给饲养员手机发出报警信号。The server establishes a motion state model through the received acceleration data, uses a specific algorithm to classify the motion state, and processes the data according to self-defined quantification standards, and finally stores it in the database, and sends out an abnormal situation to the PC client in time. The pigs are abnormally alerted and an alarm signal is sent to the breeder's mobile phone.
本文中所描述的具体实施例仅仅是对本发明精神做举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which the present invention pertains can make various modifications or additions to the described specific embodiments or substitute in similar manners, but will not deviate from the spirit of the present invention or go beyond the definitions of the appended claims range.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710458707.0A CN107258581B (en) | 2017-06-16 | 2017-06-16 | Monitoring method of pig's movement based on bluetooth ear tag |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710458707.0A CN107258581B (en) | 2017-06-16 | 2017-06-16 | Monitoring method of pig's movement based on bluetooth ear tag |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107258581A CN107258581A (en) | 2017-10-20 |
CN107258581B true CN107258581B (en) | 2020-06-23 |
Family
ID=60067360
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710458707.0A Active CN107258581B (en) | 2017-06-16 | 2017-06-16 | Monitoring method of pig's movement based on bluetooth ear tag |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107258581B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109452196A (en) * | 2019-01-15 | 2019-03-12 | 上海睿畜电子科技有限公司 | Intelligent monitoring and controlling device, monitoring system and the monitoring method of two dimensional code livestock tag |
CN111903563A (en) * | 2020-07-31 | 2020-11-10 | 武汉联陌科技有限公司 | Poultry meter step foot ring based on bluetooth low energy |
CN112042554A (en) * | 2020-08-15 | 2020-12-08 | 天津市可利农物联科技产业发展有限公司 | Pig exercise amount monitoring device and exercise amount detection scoring method thereof |
CN112568141A (en) * | 2020-12-09 | 2021-03-30 | 东莞中融数字科技有限公司 | Supervision system for preventing diseases of pigs |
CN112640806B (en) * | 2020-12-28 | 2025-04-11 | 无锡市富华科技有限责任公司 | A Bluetooth light-up ear tag and a motion warning method using the ear tag |
CN114883010A (en) * | 2022-04-26 | 2022-08-09 | 深圳市中融数字科技有限公司 | Livestock survival state judging method and device, storage medium and terminal equipment |
CN116222664A (en) * | 2023-03-06 | 2023-06-06 | 阿里云计算有限公司 | Detection chip of system-in-package, information detection method and electronic equipment |
CN116034905B (en) * | 2023-03-31 | 2023-06-20 | 华南农业大学 | Pig behavior rhythm analysis method based on intelligent ear tag exercise quantity |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202857581U (en) * | 2012-04-20 | 2013-04-10 | 广东顺德宸熙物联科技有限公司 | Automatic monitoring system for sow feeding |
CN203251767U (en) * | 2013-02-05 | 2013-10-30 | 杭州慧牧科技有限公司 | Electronic ear tag for animal group-feeding |
CN205352413U (en) * | 2016-01-26 | 2016-06-29 | 西北农林科技大学 | Light small -size live pig meter step device |
WO2016103079A1 (en) * | 2014-12-22 | 2016-06-30 | Castro Lisboa Pablo | System and device for monitoring the reproductive activity of animals |
CN205405561U (en) * | 2016-03-10 | 2016-07-27 | 南京稻盛弘网络科技有限公司 | Electronic ear tag with body temperature monitoring , motion monitoring, identification |
CN105997015A (en) * | 2016-06-12 | 2016-10-12 | 浙江大学 | Wearable device for animal vital sign multi-parameter monitoring |
CN106472347A (en) * | 2015-08-29 | 2017-03-08 | 范石军 | A kind of intelligent detecting system for sow health monitoring |
-
2017
- 2017-06-16 CN CN201710458707.0A patent/CN107258581B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN202857581U (en) * | 2012-04-20 | 2013-04-10 | 广东顺德宸熙物联科技有限公司 | Automatic monitoring system for sow feeding |
CN203251767U (en) * | 2013-02-05 | 2013-10-30 | 杭州慧牧科技有限公司 | Electronic ear tag for animal group-feeding |
WO2016103079A1 (en) * | 2014-12-22 | 2016-06-30 | Castro Lisboa Pablo | System and device for monitoring the reproductive activity of animals |
CN106472347A (en) * | 2015-08-29 | 2017-03-08 | 范石军 | A kind of intelligent detecting system for sow health monitoring |
CN205352413U (en) * | 2016-01-26 | 2016-06-29 | 西北农林科技大学 | Light small -size live pig meter step device |
CN205405561U (en) * | 2016-03-10 | 2016-07-27 | 南京稻盛弘网络科技有限公司 | Electronic ear tag with body temperature monitoring , motion monitoring, identification |
CN105997015A (en) * | 2016-06-12 | 2016-10-12 | 浙江大学 | Wearable device for animal vital sign multi-parameter monitoring |
Also Published As
Publication number | Publication date |
---|---|
CN107258581A (en) | 2017-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107258581B (en) | Monitoring method of pig's movement based on bluetooth ear tag | |
CN208273869U (en) | Electron ear tage and ear tag monitor system | |
CN110728332A (en) | Agricultural data analysis method and system based on Internet of things | |
CN206699119U (en) | A kind of cultivated animals monitoring system | |
CN205920428U (en) | Wisdom agricultural monitored control system based on integration detects sensor | |
CN206251736U (en) | Drinking water for animals control device | |
CN117581809A (en) | Cattle living body supervision and evaluation system | |
CN111855013A (en) | Body temperature detection device and method based on environment temperature and humidity compensation | |
CN106614071B (en) | A system and method for monitoring prenatal behavior of sows | |
Othman et al. | Automated water quality monitoring system development via LabVIEW for aquaculture industry (Tilapia) in Malaysia | |
CN110991222A (en) | Method, device and system for object condition monitoring and sow estrus monitoring | |
CN104663499A (en) | Cow oestrus monitoring system | |
CN114460080A (en) | Rice disease and pest intelligent monitoring system | |
CN107065992A (en) | A kind of cultivation surroundings monitoring system based on ZigBee and embedded system | |
WO2021196347A1 (en) | Cattle state monitoring system and monitoring method | |
CN107714000B (en) | Milk cow health condition detection method and device | |
CN207678622U (en) | Pig Thermometer System based on bluetooth ear tag | |
CN203672411U (en) | Crop agricultural condition monitoring device | |
CN119293727A (en) | A Multi-source Data Fusion System | |
CN205318168U (en) | Livestock -raising field environment intelligent monitoring system based on thing networking | |
CN114224287B (en) | Animal health monitoring system | |
Pukrongta et al. | Cattle collars with a low-cost LPWAN-based system for cattle estrous monitoring | |
CN117322358A (en) | Digital twin system and digital twin method for cow behavior recognition based on ultra-wideband and inertial measurement unit | |
CN112640806B (en) | A Bluetooth light-up ear tag and a motion warning method using the ear tag | |
CN213639266U (en) | Wearable herbivorous domestic animal individual feature recognition device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |