Biological sample collection method and apparatus, electronic device, and storage medium

By constructing panoramic images of the breeding farm and using machine learning models to determine anomaly indices, the automatic control of the collection device for biological sample collection solves the problems of low efficiency and insufficient accuracy in existing technologies, and achieves efficient and timely biological sample collection.

CN116264003BActive Publication Date: 2026-05-29CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE CHENGDU INFORMATION & TELECOMM TECH CO LTD
Filing Date
2021-12-10
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing biological sample collection methods are inefficient, inaccurate, and untimely, making it particularly difficult to achieve efficient and accurate sample collection in disease detection in livestock farms.

Method used

By constructing a panoramic image of the farm, using a machine learning model to determine anomaly indices, acquiring image data along a predetermined path based on the anomaly indices, automatically deciding whether to collect biological samples, and adjusting the movement of the collection device in conjunction with feedback parameters to achieve sample collection.

Benefits of technology

It improves the accuracy and timeliness of biological sample collection, enhances collection efficiency, adapts to changes in farms, and enables more accurate determination of the timing and location for biological sample collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116264003B_ABST
    Figure CN116264003B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a biological sample collection method, comprising: constructing a panoramic image of a farm; acquiring image data of a breeding space on a predetermined path, wherein the predetermined path is determined according to the relative distance between a plurality of breeding spaces on the panoramic image; inputting the image data into a trained machine learning model for determining an anomaly index to obtain the anomaly index, wherein the anomaly index is used to determine whether the breeding space is abnormal; and determining whether to collect a biological sample according to at least the anomaly index. In the embodiment of the present disclosure, the anomaly index obtained by inputting the image data into the machine learning model and determining whether to collect the biological sample based on the anomaly index can more accurately and timely collect the biological sample compared with determining whether to collect the biological sample by an artificial assisted manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to, but is not limited to, the field of biological sample collection technology, and particularly to a biological sample collection method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the rapid development of livestock farms, the demand for timely and accurate collection of biological samples is increasing, particularly in scenarios such as disease detection. Currently, most methods for collecting biological samples rely on manual testing or a combination of manual and auxiliary collection devices. This approach is limited by manpower, resulting in inaccurate collection, low efficiency, and delayed sample collection. Summary of the Invention

[0003] In view of the above, this disclosure provides a method, apparatus, electronic device, and storage medium for collecting biological samples.

[0004] According to a first aspect of the present disclosure, a method for collecting biological samples is provided, the method comprising:

[0005] Construct a panoramic image of the farm;

[0006] Image data of the aquaculture space is acquired along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple aquaculture spaces on the panoramic image;

[0007] The image data is input into a trained machine learning model for determining anomaly indices to obtain anomaly indices, wherein the anomaly indices are used to determine whether the aquaculture space is abnormal.

[0008] At least based on the aforementioned anomaly index, it should be determined whether to collect biological samples.

[0009] In one embodiment, image data samples of the aquaculture space for training are acquired along a predetermined path;

[0010] The image data samples and their identifiers are input into the machine learning model to be trained until the convergence function converges, thus obtaining the trained learning model.

[0011] In one embodiment, determining whether to collect biological samples based at least on the anomaly index includes: determining whether to collect biological samples if the anomaly index is greater than an index threshold; or determining whether to collect biological samples based on predetermined conditions if the anomaly index is less than an index threshold.

[0012] In one embodiment, the predetermined conditions include at least one of the following: a first predetermined condition, wherein the determined current time is a predetermined time; and a second predetermined condition, wherein the determined current breeding space is a predetermined breeding space.

[0013] In one embodiment, constructing a panoramic image of the farm includes: determining the field of view of the image acquisition device; acquiring images of the area according to a mapping path, wherein the mapping path is determined based on the field of view and the length and width distance of the aquaculture space; and stitching the images of the area to obtain a panoramic image of the farm.

[0014] In one embodiment, the current coordinates of the data acquisition device are determined as reference coordinates, wherein the reference coordinates are within the aquaculture space used for reference; target coordinates are determined based on the minimum distance between the reference coordinates and candidate coordinates, wherein the reference coordinates are the current coordinates of the data acquisition device and the candidate coordinates are the center coordinates of the candidate aquaculture space; and a predetermined path is determined based on the target coordinates.

[0015] In one embodiment, the location coordinates of the object to be tested are determined; using the location coordinates as a target reference point, the acquisition device is controlled to move to the target reference point by means of feedback parameter adjustment to achieve biological sample acquisition.

[0016] Secondly, embodiments of this disclosure provide a biological sample collection device. Wherein,

[0017] The building module is used to construct panoramic images of the farm;

[0018] An acquisition module is used to: acquire image data of aquaculture spaces along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple aquaculture spaces on the panoramic image;

[0019] The processing module is configured to: input the image data into a trained machine learning model for determining anomaly indices, and obtain anomaly indices, wherein the anomaly indices are used to determine whether the aquaculture space is abnormal;

[0020] The determination module is used to: determine whether to collect biological samples based at least on the anomaly index.

[0021] In one embodiment, the acquisition module is further configured to acquire image data samples of the aquaculture space for training along a predetermined path; the processing module is further configured to: input the image data samples and the identifiers of the data samples into the machine learning model to be trained for training until the convergence function converges, thereby obtaining the trained learning model.

[0022] In one embodiment, the determining module is further configured to: determine whether to collect biological samples if the abnormality index is greater than the index threshold; or, determine whether to collect biological samples according to predetermined conditions if the abnormality index is less than the index threshold.

[0023] In one embodiment, the determining module is further configured to: determine whether to collect biological samples based on predetermined conditions, wherein the predetermined conditions include at least one of the following: a first predetermined condition, wherein the determined current time is a predetermined time; and a second predetermined condition, wherein the determined current aquaculture space is a predetermined aquaculture space.

[0024] In one embodiment, the acquisition module is further configured to acquire regional images according to a mapping path, wherein the mapping path is determined based on the field of view and the length and width distance of the aquaculture space; the determination module is further configured to determine the field of view of the image acquisition device; and the processing module is further configured to stitch the regional images to obtain a panoramic image of the aquaculture farm.

[0025] In one embodiment, the determining module is further configured to: determine the current coordinates of the acquisition device as reference coordinates, wherein the reference coordinates are within the aquaculture space used for reference; determine target coordinates based on the minimum distance between the reference coordinates and candidate coordinates, wherein the reference coordinates are the current coordinates of the acquisition device and the candidate coordinates are the center coordinates of the candidate aquaculture space; and determine a predetermined path based on the target coordinates.

[0026] In one embodiment, the determining module is further configured to determine the position coordinates of the object to be tested; in another embodiment, the device further includes a control module, wherein the control module is configured to: use the position coordinates as a target reference point and control the acquisition device to move to the target reference point by means of feedback parameter adjustment to achieve biological sample acquisition.

[0027] Thirdly, embodiments of this disclosure provide an electronic device, the electronic device comprising: a processor and a memory for storing a computer program capable of running on the processor;

[0028] When the processor runs the computer program, it performs the steps of the method described in one or more of the foregoing technical solutions.

[0029] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions; when executed by a processor, the computer-executable instructions can implement the methods described in one or more of the foregoing technical solutions.

[0030] The biological sample collection method provided in this disclosure includes: constructing a panoramic image of a farm; acquiring image data of aquaculture spaces along a predetermined path, wherein the predetermined path is determined based on the relative distances between multiple aquaculture spaces on the panoramic image. Here, since the predetermined path is determined based on the relative distances between multiple aquaculture spaces on the panoramic image, a shorter path can be obtained compared to a randomly determined predetermined path, improving the efficiency of acquiring the image data. The image data is input into a trained machine learning model for determining an anomaly index to obtain an anomaly index, wherein the anomaly index is used to determine whether the aquaculture space is abnormal; and at least based on the anomaly index, it is determined whether to collect biological samples. Here, inputting the image data into the machine learning model, since the determination of whether to collect biological samples is based on the anomaly index obtained by the machine learning model, allows for more accurate and timely collection of biological samples compared to determining whether to collect biological samples through manual assistance. Attached Figure Description

[0031] Figure 1 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0032] Figure 2 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0033] Figure 3 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0034] Figure 4 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0035] Figure 5 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0036] Figure 6 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0037] Figure 7 This is a top view of a biological sample collection device provided in an embodiment of this disclosure.

[0038] Figure 8 This is a front view of a biological sample collection device provided in an embodiment of this disclosure.

[0039] Figure 9 Right view of a biological sample collection device provided in an embodiment of this disclosure.

[0040] Figure 10This is a perspective view of a biological sample collection device provided in an embodiment of this disclosure.

[0041] Figure 11 This is a schematic diagram of the field of view of an image acquisition device provided in an embodiment of this disclosure.

[0042] Figure 12 This is a schematic diagram of a mapping path provided in an embodiment of this disclosure.

[0043] Figure 13 This is a schematic diagram of a stitched area image provided in an embodiment of this disclosure.

[0044] Figure 14 This is a schematic diagram illustrating the determination of a predetermined path according to an embodiment of this disclosure.

[0045] Figure 15 This is a schematic diagram illustrating the determination of a predetermined path according to an embodiment of this disclosure.

[0046] Figure 16 This is a schematic diagram illustrating how to determine the position coordinates of an object to be measured, as provided in an embodiment of this disclosure.

[0047] Figure 17 This is a schematic diagram of a feedback parameter adjustment method provided in an embodiment of the present disclosure.

[0048] Figure 18 This is a flowchart illustrating a biological sample collection method provided in an embodiment of this disclosure.

[0049] Figure 19 This is a front view of a biological sample collection device provided in an embodiment of this disclosure.

[0050] Figure 20 The image shows a right view of a biological sample collection device provided in an embodiment of this disclosure.

[0051] Figure 21 This is a top view of a biological sample collection device provided in an embodiment of this disclosure.

[0052] Figure 22 This is a perspective view of a biological sample collection device provided in an embodiment of the present disclosure.

[0053] Figure 23 This is a schematic diagram of a biological sample collection device provided in an embodiment of the present disclosure. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this disclosure clearer, the disclosure will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this disclosure. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0055] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0056] In the following description, the terms “first, second, third” are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that “first, second, third” may be interchanged in a specific order or sequence where permitted, so that the embodiments of this disclosure described herein can be implemented in an order other than that illustrated or described herein.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of this disclosure only and is not intended to be limiting of this disclosure.

[0058] To better understand the embodiments of this disclosure, the following examples illustrate some scenarios:

[0059] In one embodiment, the method for collecting biological samples from a farm is an offline saliva device method, which includes: farm staff determining whether to collect a target biological sample to be tested; farm staff manually collecting the target biological sample to be tested using tampons; and preparing the biological sample into a standard test tube for disease detection.

[0060] In one embodiment, the method for collecting biological samples from a farm is an auxiliary device method, which includes: farm staff determining whether to collect a target biological sample to be tested; farm staff manually collecting the target biological sample to be tested using tampons; during the manual collection process, a target fixing and limiting device is used to fix the target to be tested; and a portable pushing device is used to assist in collecting the collected biological sample.

[0061] like Figure 1 As shown in the embodiments of this disclosure, a method for collecting biological samples is provided, the method comprising:

[0062] S101: Construct a panoramic image of the farm;

[0063] S102: Acquire image data of the aquaculture space along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple aquaculture spaces on the panoramic image;

[0064] S103: Input the image data into a trained machine learning model for determining anomaly indices to obtain anomaly indices, wherein the anomaly indices are used to determine whether the aquaculture space is abnormal;

[0065] S104: Determine whether to collect biological samples based at least on the aforementioned anomaly index.

[0066] In one embodiment, the panoramic image of the farm can be periodically updated. Updated image data of the aquaculture space is acquired along a predetermined path on the updated panoramic image. This image data is then input into a trained machine learning model for determining an anomaly index, yielding an updated anomaly index. At least based on the anomaly index, it is determined whether to collect biological samples. Thus, periodically updating the panoramic image of the farm allows for timely detection of changes in the aquaculture space layout. It provides updated image data of the aquaculture space, resulting in an updated anomaly index. Compared to using an unupdated panoramic image of the farm, this approach adapts to changes in the farm. In practical applications, using the updated anomaly index to determine whether to collect biological samples allows for more accurate sample collection.

[0067] In one embodiment, multiple image acquisition devices may be used to capture images; the captured images of multiple regions are stitched together to obtain a panoramic image of the farm; image data of the aquaculture space is acquired along a predetermined path on the panoramic image; the image data is input into a trained machine learning model for determining an anomaly index to obtain the anomaly index; and at least based on the anomaly index, it is determined whether to collect biological samples. Thus, compared to a single image acquisition device, the panoramic image of the farm obtained by stitching together the regional images captured by multiple image acquisition devices captures more regional images simultaneously, resulting in a faster acquisition speed for the panoramic image of the farm.

[0068] In one embodiment, an image can be captured using a panoramic image acquisition device, resulting in a panoramic image of the farm. Image data of the aquaculture space is then acquired along a predetermined path on the panoramic image. This image data is input into a trained machine learning model for determining an anomaly index, yielding the anomaly index. At least based on the anomaly index, it is determined whether to collect biological samples. Thus, a panoramic image of the farm can be obtained using a single panoramic image acquisition device, eliminating the need for stitching and improving efficiency.

[0069] In one embodiment, a panoramic image of the farm is constructed; image data of the farming space is acquired along the predetermined path; the image data is input into a trained machine learning model for determining an anomaly index to obtain the anomaly index; when the anomaly index is greater than an index threshold, biological samples are collected; or, when the anomaly index is less than an index threshold, biological samples are not collected.

[0070] In one embodiment, the index threshold can be determined based on statistical results from historical experience data.

[0071] In one embodiment, a panoramic image of the farm is constructed; image data of the aquaculture space is acquired along the predetermined path; the image data is input into a trained machine learning model for determining an anomaly index to obtain the anomaly index; when the anomaly index is greater than an index threshold, biological samples are collected; or, when the anomaly index is less than an index threshold, it is determined whether to collect biological samples according to predetermined conditions.

[0072] In one embodiment, determining whether to collect biological samples based on predetermined conditions can be as follows: if the determined current time is a predetermined time, biological samples are collected; if the current time is inconsistent with the predetermined time, biological samples are not collected. In one embodiment, the predetermined time is a point in time; if the current time is consistent with the predetermined point in time, biological samples are collected; if the current time is inconsistent with the predetermined point in time, biological samples are not collected. In one embodiment, the predetermined time is a time period; if the current time is within the predetermined time period, biological samples are collected; if the current time is not within the predetermined time period, biological samples are not collected.

[0073] In one embodiment, determining whether to collect biological samples based on predetermined conditions may be as follows: if the determined current breeding space is a predetermined breeding space, biological samples are collected; if the determined current breeding space is not a predetermined breeding space, biological samples are not collected.

[0074] In one embodiment, the predetermined breeding space can be the breeding space of the target to be tested during the observation period. If the determined current breeding space is the predetermined breeding space, biological samples are collected from the target to be tested during the observation period within the determined current breeding space; if the determined current breeding space is not the predetermined breeding space, no biological samples are collected. In another embodiment, the predetermined breeding space can be the breeding space of a high-value target to be tested. The high-value target to be tested can be a new variety of target to be tested or a target to be tested awaiting sale. If the determined current breeding space is the predetermined breeding space, biological samples are collected from the high-value target to be tested within the predetermined breeding space; if the determined current breeding space is not the predetermined breeding space, no biological samples are collected.

[0075] In one embodiment, the predetermined breeding space may be a breeding space determined according to random parameters. If the determined current breeding space is the breeding space determined by the random parameters, biological samples are collected from the target to be tested within the breeding space; if the determined current breeding space is not the breeding space determined by the random parameters, no biological samples are collected.

[0076] In one embodiment, a panoramic image of the farm is constructed; image data of the aquaculture space is acquired along the predetermined path; the image data is input into a trained machine learning model for determining an anomaly index to obtain the anomaly index, wherein the trained learning model can be a learning model trained with predetermined training data; and at least based on the anomaly index, it is determined whether to collect biological samples. In one embodiment, the predetermined training data can be obtained from a specific database. In another embodiment, the predetermined training data can be training data imported by the user.

[0077] In one embodiment, a panoramic image of the farm is constructed, and image data of the aquaculture space is acquired along a predetermined path on the panoramic image. The image data is then input into a trained machine learning model for determining an anomaly index to obtain the anomaly index. The trained model can be a model trained using image data samples of the aquaculture space acquired along the predetermined path. At least based on the anomaly index, it is determined whether to collect biological samples. The learning model trained using image data samples of the aquaculture space acquired along the predetermined path is more consistent with the farm's scenario than a model trained using training data from a specific database, resulting in a more accurate anomaly index and more timely biological sample collection.

[0078] In one embodiment, a panoramic image of the farm is constructed, and image data of the farming space is acquired along a predetermined path on the panoramic image. The image data is then input into a trained machine learning model for determining an anomaly index to obtain the anomaly index. The degree of anomaly in the farm is determined based on a comparison between the anomaly index and an index threshold, thereby determining the collection of biological samples. In one embodiment, the machine learning model is obtained by encoding and training a machine learning model using a neural network autoencoder.

[0079] In one embodiment, the index threshold can be different levels of index thresholds. In one embodiment, abnormal images are determined by obtaining the abnormal index of the acquired images; the abnormal images of each breeding space are saved to a database; and the abnormal model index threshold for each breeding space is obtained based on the abnormal images of each breeding space.

[0080] In one embodiment, let E AnomLet f(x) be the anomaly index, and f(x) be the encoding process. The formula for calculating the anomaly index is as follows:

[0081]

[0082] In one embodiment, let the anomaly index be E. Anom Abnormal model index threshold of aquaculture farm Aquaculture Space Anomaly Model Index Threshold E Anom_P If E Anom Less than This indicates the entire farm is operating normally; if E Anom Greater than This indicates an abnormality in the entire farm; if the abnormality index E Anom Greater than Less than E Anom_P This can be classified as a mild abnormality. The expression for a mild abnormality is:

[0083] E Anom_H <E Anom <E Anom_P ;

[0084] If the abnormality index E Anom Greater than E Anom_P This can be classified as a major anomaly. Different levels of anomaly index thresholds, compared to a single threshold, can determine the varying degrees of anomaly in a farm or breeding space, enabling more accurate determination of biological sample collection.

[0085] In one embodiment, a panoramic image of the farm can be constructed; image data of the farming space can be acquired along a predetermined path; the image data can be input into a trained machine learning model for determining an anomaly index to obtain an anomaly index, which can be the average of anomaly indices obtained by statistically calculating the anomaly indices of multiple acquired image data within the farm; and at least based on the anomaly index, it can be determined whether to collect biological samples. The anomaly index determined by the average of anomaly indices obtained through statistical calculation of a large number of acquired image data within the farm is more accurate than the anomaly index determined by a single acquired image, and the efficiency of determining whether to collect biological samples is higher.

[0086] In one embodiment, the biological sample collection method can be applied to a device, the top view of which is shown below. Figure 7 As shown, the front view is as follows Figure 8 As shown, the right view is as follows Figure 9 As shown, the 3D diagram is as follows Figure 10As shown, the device includes: 1. a farm model; 2. a sliding box; 3. a shock-absorbing and weighing spring; 4. a multi-functional box; 5. a rolling groove (1); 6. a rolling groove (2); and 7. a slide rail. The sliding box can move on the slide rail, that is, it can move longitudinally along the slide rail. The sliding box includes a multi-functional box, which includes an image acquisition device and a biological sample acquisition device. The slide rail and the sliding box can move laterally along the plane of the rolling groove. The spring can be used to collect biological samples. In summary, the sliding box can acquire area images according to the mapping path on a panoramic image of the farm; it can move along the predetermined path to acquire image data of the farming space.

[0087] like Figure 2 As shown in the embodiments of this disclosure, a method for collecting biological samples is provided, the method comprising:

[0088] Step S201: Obtain image data samples of the breeding space for training along the predetermined path;

[0089] Step S202: Input the image data sample and the identifier of the data sample into the machine learning model to be trained and train it until the convergence function converges to obtain the trained learning model.

[0090] In one embodiment, training the learning model can be achieved by encoding and training the learning model using a neural network autoencoder, and the trained machine learning model can be classified as either anomalous or non-nominal. In one embodiment, the predetermined training data can be obtained from a specific database. In another embodiment, the predetermined training data can be training data imported by the user.

[0091] like Figure 3 As shown, this disclosure provides a method for collecting biological samples, wherein determining whether to collect biological samples based at least on the abnormality index includes:

[0092] Step S301: If the abnormal index is greater than the index threshold, determine to collect biological samples;

[0093] Step S302: If the abnormality index is less than the index threshold, determine whether to collect the biological sample according to predetermined conditions.

[0094] In one embodiment, the predetermined conditions include at least one of the following: a first predetermined condition, wherein the determined current time is a predetermined time; and a second predetermined condition, wherein the determined current breeding space is a predetermined breeding space.

[0095] In one embodiment, determining whether to collect the biological sample based on the predetermined conditions can be as follows: if the determined current time is a predetermined time, determine to collect the biological sample; if the current time is inconsistent with the predetermined time, do not collect the biological sample. In one embodiment, the predetermined time is a point in time; if the current time is consistent with the predetermined point in time, determine to collect the biological sample; if the current time is inconsistent with the predetermined point in time, do not collect the biological sample. In one embodiment, the predetermined time is a time period; if the current time is within the predetermined time period, determine to collect the biological sample; if the current time is not within the predetermined time period, do not collect the biological sample.

[0096] In one embodiment, determining whether to collect biological samples based on the predetermined conditions may be as follows: if the determined current breeding space is a predetermined breeding space, determine to collect biological samples; if the determined current breeding space is not a predetermined breeding space, do not collect biological samples.

[0097] In one embodiment, the predetermined breeding space can be the breeding space of the target to be tested during the observation period. If the determined current breeding space is the predetermined breeding space, biological samples are collected from the target to be tested during the observation period within the determined current breeding space; if the determined current breeding space is not the predetermined breeding space, no biological samples are collected. In another embodiment, the predetermined breeding space can be the breeding space of a high-value target to be tested. The high-value target to be tested can be a new variety of target to be tested or a target to be tested awaiting sale. If the determined current breeding space is the predetermined breeding space, biological samples are collected from the high-value target to be tested within the predetermined breeding space; if the determined current breeding space is not the predetermined breeding space, no biological samples are collected.

[0098] In one embodiment, the predetermined breeding space may be a breeding space determined according to random parameters. If the determined current breeding space is the breeding space determined by the random parameters, biological samples are collected from the target to be tested within the breeding space; if the determined current breeding space is not the breeding space determined by the random parameters, no biological samples are collected.

[0099] In one embodiment, an anomaly space for each aquaculture space is obtained based on the anomaly image of that aquaculture space. The anomaly space includes an ultra-low value space obtained by comparing the decoded values ​​of a normal encoder with the encoded and decoded values ​​of the acquired aquaculture farm images, and an ultra-high value space obtained by comparing the spatial domains of each aquaculture space. The index threshold may include at least one of the following: an aquaculture farm anomaly model index threshold can be obtained based on the ultra-low value space, and an aquaculture space anomaly model index threshold can be obtained based on the ultra-high value space.

[0100] In one embodiment, let E AnomLet f(x) be the anomaly index, and f(x) be the encoding process. The formula for calculating the anomaly index is as follows:

[0101]

[0102] In one embodiment, let the anomaly index be E. Anom Abnormal model index threshold of aquaculture farm Aquaculture Space Anomaly Model Index Threshold E Anom_P If E Anom Less than This indicates the entire farm is operating normally; if E Anom Greater than This indicates an abnormality in the entire farm; if the abnormality index E Anom Greater than Less than E Anom_P This can be classified as a mild abnormality. The expression for a mild abnormality is:

[0103] E Anom_H <E Anom <E Anom_P ;

[0104] If the abnormality index E Anom Greater than E Anom_P This can be classified as a major anomaly. Different levels of anomaly index thresholds, compared to a single threshold, can determine the varying degrees of anomaly in a farm or breeding space, enabling more accurate determination of biological sample collection.

[0105] like Figure 4 As shown in the embodiments of this disclosure, a method for collecting biological samples is provided, the method including:

[0106] Step S401: Determine the field of view of the image acquisition device;

[0107] Step S402: Acquire regional images according to the mapping path, wherein the mapping path is determined based on the field of view and the length and width distance of the breeding space;

[0108] Step S403: Stitch the images of the area to obtain a panoramic image of the farm.

[0109] In one embodiment, determining the field of view of the image acquisition device may include: such as Figure 11 As shown, the field of view is calculated using the camera's parameters and the installation height of the aquaculture farm. The camera parameters include at least one of the following: focal length, target surface length and width, field of view angle, and installation height. The specific calculation method for the field of view can be:

[0110] Given the following parameters: camera sensor focal length f, target width w, target height h, and farm height H. Let the horizontal field of view angle be θ. hAnd the vertical field of view angle is θ v The calculation formula is as follows:

[0111]

[0112]

[0113] Let the field of view width and height be W. 栏 H 栏 The calculation formula for the field of view area is as follows:

[0114]

[0115]

[0116] Area = W 栏 *H 栏 ;

[0117] In one embodiment, the mapping path is as follows: Figure 12 As shown, impact pin sensors are placed at the four corners of the top surface of the breeding farm; the sensors record the time of movement of the acquisition device in the breeding space; combined with the rotation speed Hall sensor installed on the roller, the length and width distance of the breeding space and the power-on time required to reach a fixed distance are obtained, the total number of composition cycles and the long-range photo counting interval are calculated, and the composition path is determined; the field of view height H is known. 栏 and width of power-on time T H Let the radius of the roller be r and the Hall sensor count be n. The total number of frame-building cycles λ and the actual panoramic segment acquisition time t can be obtained using the following formulas:

[0118]

[0119] t = T H / λ

[0120] if If the integer is equal to λ, taking λ = λ + 1 can avoid the problem of image edge misalignment caused by mechanical vibration and other factors when seamlessly stitching image edges.

[0121] In one embodiment, stitching the region image may include a registered region image and a stitched region image. In one embodiment, the registered region image uses a convolution-based feature keypoint matching method. The method for registering the region image includes: reconstructing key parts of the registered image using different feature keypoint matching methods under scenarios where data is acquired on different fixed guide rails. In existing registration techniques, search iterative algorithms rely on initial conditions and are prone to matching failures; search feature methods are fast but have low accuracy; the feature keypoint matching method described in this disclosure reconstructs and registers key parts, resulting in faster registration speed and higher registration accuracy based on convolution operations.

[0122] In one embodiment, the method for registering the region image may include: Figure 13 As shown, in scenarios where the trajectory is stable, imaging conditions are fixed, and the video frame sequence differences during the journey are small, with only rectangular differences existing in the image's direction of travel, the feature keypoint matching method used is to obtain the correspondence between images based on the travel speed and calculate the images U1∩U2 of adjacent intersection regions. This stitching method only needs to calculate the intersection region, which reduces the computational load and improves computational efficiency compared to conventional stitching that calculates the entire image.

[0123] In one embodiment, the method for registering the region image may include: in scenarios where mechanical vibrations during travel prevent direct matching calculations based on theoretical intersections, the feature keypoint matching method used is: extracting feature points; shallowly extracting color, corner points, edges, and contours based on the visualization results of the convolutional neural network; and deeply extracting and constructing abstract results; the convolutional neural network uses 6 convolutional layers. Compared to pooling dimensionality reduction, using a 6-layer convolutional calculation method can avoid filtering out too much useful information.

[0124] In one embodiment, the method for registering the region image may include: the system is a second-order system, which can pre-define the oscillation process (excluding random noise) to the image preprocessing stage to accelerate computational convergence. Let the image be f(x), the oscillation poles be p(x), and the image input for calculation be g(x), and the calculation formula is as follows:

[0125]

[0126] Among them, W n ζ is the natural frequency, and ζ is the attenuation coefficient.

[0127] In one embodiment, the method for stitching the region image may include:

[0128] Step 1301: Reduce the size of adjacent images registered using the registration region image method to 1 / 32 of the pixel size;

[0129] Step 1302: Based on the intersection of the reduced adjacent region images, the convolution kernel is 3. Each time the Euclidean distance is compared to the coordinates of the convolution, the coordinates of the subsequent frame image are transformed so that the coordinates of the two adjacent images are covered.

[0130] Step 1303: Obtain the low-precision matching result of the two images, and gradually reduce the scaling ratio based on the matching result;

[0131] Step 1304: Repeat the above process until the scaling ratio is 1, and finally obtain a high-precision matching result. The two images are then stitched together.

[0132] like Figure 5 As shown in the embodiments of this disclosure, a method for collecting biological samples is provided, the method further comprising:

[0133] Step S501: Determine the current coordinates of the acquisition device as the reference coordinates, wherein the reference coordinates are within the aquaculture space used for reference;

[0134] Step S502: Determine the target coordinates based on the minimum distance between the reference coordinates and the candidate coordinates, where the reference coordinates are the current coordinates of the acquisition device and the candidate coordinates are the center coordinates of the candidate breeding space;

[0135] Step S503: Determine the predetermined path based on the target coordinates.

[0136] In one embodiment, the method may include:

[0137] Step 1401: Denote each candidate coordinate point as U(x,y), and the reference coordinate point as (X,Y), wherein the candidate coordinate points are as follows: Figure 14 As shown;

[0138] Step 1402: Calculate the distance from the reference coordinate point to each candidate coordinate point, and take the candidate coordinate point with the smallest distance as the starting position;

[0139] Step 1403: Update the reference coordinate point to the candidate coordinate point with the smallest distance obtained in this calculation;

[0140] Step 1404: Delete the candidate coordinate point from the candidate coordinate point set and denote it as the target coordinate point;

[0141] Step 1405: Continue to calculate the candidate coordinate point with the smallest distance from the reference coordinate point;

[0142] Step 1406: Repeat the above process to obtain the set of target coordinate points;

[0143] Step 1407: The predetermined path can be determined based on the set of target points.

[0144] In one embodiment, a predetermined path is determined based on the target coordinates, and the predetermined path can be optimized using an optimization method.

[0145] In one embodiment, a polygon optimization method that can be quickly fitted can be used, which optimizes the average of the inscribed and circumscribed rectangles based on the extreme corner points of the polygon.

[0146] For example, such as Figure 15 As shown, the optimization method may include:

[0147] Step 1501: Let {U|(x1,y1),(x2,y2)...} be the set of candidate coordinate points, and obtain the top-left and bottom-right coordinates R1 of the circumscribed rectangle. min1 ,y min1 ),(x max1 ,y max1 );

[0148] Step 1502: By recursively reducing the side length of the circumscribed rectangle, calculate the inscribed rectangle R2 = (x min2 ,y min2 ),(x max2 ,y max2 );

[0149] Step 1503: Obtain the target rectangle by averaging the inscribed and circumscribed rectangles. The target rectangle is the optimal predetermined path. This path optimization method can solve the problem of complex polygonal paths formed due to errors in the obtained target coordinate points. The optimized predetermined path is a rectangular predetermined path. Compared with the polygonal predetermined path before optimization, the image acquisition device moves faster on the rectangular predetermined path, and the efficiency of acquiring image data of the breeding space is higher.

[0150] like Figure 6 As shown in the embodiments of this disclosure, a method for collecting biological samples is provided, the method further comprising:

[0151] Step S601: Determine the position coordinates of the object to be measured;

[0152] Step S602: Using the location coordinates as the target reference point, the acquisition device is controlled to move to the target reference point by means of feedback parameter adjustment to achieve biological sample acquisition.

[0153] In one embodiment, a method for determining the location coordinates of an object to be tested may include: detecting the location coordinates of the object to be tested using an object detection algorithm. In one embodiment, an object detection method may include: pre-setting target anchor boxes for the target to be tested; comparing the loss values ​​of the predicted boxes and anchor boxes after passing through the network, and continuously approaching the optimal predicted value based on stochastic gradient descent optimization to achieve the detection of the target to be tested. The coordinates of the target to be tested on a planar scale are predicted by mapping the image to the scale of the farm model. The calculation formula is as follows, where the actual coordinates are (X, Y):

[0154] f(x)=SoftMax[Conv(x)+Pool(x)];

[0155] f(x)[0:6]=(x,y,w,h,label,conf.);

[0156]

[0157] In one embodiment, the position coordinates of the target object can be determined using a target tracking method, which includes: matching the target ID of the target object in consecutive frames using a tracking matching algorithm. In one embodiment, the actual coordinates and distance traveled are obtained during the movement; a direction function is used to accurately track the target object. For example, ... Figure 16 As shown, let O be the camera position, and A, B, C, and D be the positions of the target to be measured, respectively (a, y, z). a B(xb,yb,z) b C(xc,yc,z) c D(xd,yd,z) d Let the direction of travel be (x, y, z), Z be the total height above the ground, and C1 to C4 be the error calibration values. Then the predicted frame position is as follows:

[0158] A(x a2 ,y a2 ,z a2 )=A(x a ,y a ,z a )+(x,y,z)*e+C1;

[0159] B(x b2 ,y b2 ,z b2 )=B(x b ,y b ,z b )+(x,y,z)*e+C2;

[0160] C(x c2 ,y c2 ,z c2 )=C(x c ,y c ,z c )+(x,y,z)*e+C3;

[0161] D(x d2 ,y d2 ,z d2 )=D(x d ,y d ,z d )+(x,y,z)*e+C4;

[0162] e = z / Z;

[0163] The tracking target can be measured and determined by calculating the distance between the network detection point P and the predicted frame X. The formula for calculating the similarity distance is as follows:

[0164]

[0165] In one embodiment, a feedback parameter adjustment method is used to control the movement of the acquisition device to the target reference point to achieve biological sample acquisition, such as... Figure 17 As shown, the feedback parameter adjustment can include proportional adjustment, integral adjustment and / or derivative adjustment.

[0166] In one embodiment, the proportional adjustment method includes: using a proportional control algorithm to control the height via a motor actuator. Let the final distance be X, meaning the height position is maintained at height X; let the initial height be X1, the error between the current height X2 and the target height X be error, where error = X2 – X, and the output increment u is proportional to the error error. kp is the proportional coefficient, calculated as follows:

[0167] u = kp * error;

[0168] If kp is 0.5, then the control motor lowering height is: (X2-X)*0.5.

[0169] In one embodiment, the feedback parameter adjustment method can be proportional control and integral control. The adjustment method is as follows: a component is referenced in the control, which is proportional to the error; the calculation formula is as follows, where ki is the integral coefficient:

[0170] u = kp * error + ki * ∫ error;

[0171] Since the integral term can accumulate the errors from previous iterations, integral adjustment can eliminate steady-state errors.

[0172] In one embodiment, the feedback parameter adjustment method includes proportional control, integral control, and derivative control: the calculation formula is as follows, where kp is the proportional coefficient, T... I Let T be the integration time constant. D The differential time constant is:

[0173]

[0174] Adding a derivative term to the feedback parameter adjustment can prevent excessive height adjustment, thereby reducing oscillations during the control process and contributing to system stability.

[0175] In one embodiment, when the acquisition device stops at the target reference point and the lowering height of the acquisition device is controlled, a braking coefficient is determined. The braking coefficient can be used to determine the resistance torque applied by the system based on the speed.

[0176] In one embodiment, such as Figure 18 As shown, a method for collecting biological samples may include:

[0177] Step a1: Construct a panoramic image of the farm;

[0178] Step a2: Acquire image data of the breeding space along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple breeding spaces on the panoramic image;

[0179] Step a3: Input the image data into the trained machine learning model for determining the anomaly index to obtain the anomaly index, wherein the anomaly index is used to determine whether the breeding space is abnormal.

[0180] Step a4: Determine whether the abnormal index is greater than the index threshold;

[0181] If the abnormality index is greater than the index threshold, it is determined to collect biological samples; if the abnormality index is less than the index threshold, it is determined whether to collect biological samples according to predetermined conditions.

[0182] Step a5: Determine whether to collect biological samples based on the predetermined conditions;

[0183] If the predetermined conditions are met, biological samples will be collected; if the predetermined conditions are not met, the process of acquiring image data of the aquaculture space from the predetermined path will begin again.

[0184] In one embodiment, a biological sample collection device such as Figures 19 to 22 As shown, where, Figure 19 This is a front view of the device. Figure 20 This is a right view of the device. Figure 21 This is a top view of the device. Figure 22 The diagram shows a perspective view of the device, which includes: a housing 1; a spring gauge 2; a cotton swab clamping hopper 3; a partition 4; a roller 5; an external rotating groove column 6; a detachable collecting conical bottle 7; a roller cutter 8; and a positioning pin 9.

[0185] The shell is cylindrical, the two ends of the partition are connected to the interior of the shell, the roller is located on the partition, the roller includes an external spiral groove column, the external spiral groove column is connected to a spring through a thread, and the spring is connected to a cotton sliver clamp below it; the cotton sliver clamp is located below the outlet of one end of the positioning pin; the detachable collecting conical bottle is connected to the roller and is a certain distance away from the shell on the roller.

[0186] In one embodiment, the collection process of the biological sample collection device is as follows:

[0187] Step 1901: Store the tampons in the tampon divider space, leaving the tampons on the positioning pins; the tampons contain sugar.

[0188] Step 1902: The mechanical device is activated, and the swab falls through the swab tensioner until it can no longer fall;

[0189] Step 1903: Induce the target to chew by waving a tampon in front of its eyes;

[0190] Step 1904: Tighten the cotton strip through the designed rolling angle space, and cut the cotton strip with a roller;

[0191] Step 1905: After the target has fully chewed the cotton strip, lower the reverse hook wire;

[0192] Step 1906: Insert the steel wire into the cotton strip;

[0193] Step 1907: Pull the cotton strip into the detachable collecting conical flask by winding the silk thread around the external spiral groove column;

[0194] Step 1908: Pull out the steel wire through interference rotation to return it to its original position. Repeating this process can achieve automated collection of biological samples.

[0195] like Figure 23 As shown in the figure, this disclosure provides a biological sample collection device, wherein the device includes:

[0196] Module 101 is used to construct a panoramic image of the farm;

[0197] The acquisition module 102 is used to: acquire image data of aquaculture spaces along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple aquaculture spaces on the panoramic image;

[0198] Processing module 103 is configured to: input the image data into a trained machine learning model for determining anomaly indices, and obtain anomaly indices, wherein the anomaly indices are used to determine whether the aquaculture space is abnormal;

[0199] The determination module 104 is used to: determine whether to collect biological samples based at least on the anomaly index.

[0200] In one embodiment, the acquisition module 102 is further configured to acquire image data samples of the aquaculture space for training along a predetermined path; the processing module 103 is further configured to: input the image data samples and the identifiers of the data samples into the machine learning model to be trained for training until the convergence function converges, thereby obtaining the trained learning model.

[0201] In one embodiment, the determining module 104 is further configured to: determine whether to collect biological samples if the abnormality index is greater than the index threshold; or, determine whether to collect biological samples according to predetermined conditions if the abnormality index is less than the index threshold.

[0202] In one embodiment, the determining module 104 is further configured to: determine whether to collect biological samples based on predetermined conditions, wherein the predetermined conditions include at least one of the following: a first predetermined condition, wherein the determined current time is a predetermined time; and a second predetermined condition, wherein the determined current aquaculture space is a predetermined aquaculture space.

[0203] In one embodiment, the acquisition module 102 is further configured to acquire regional images according to the mapping path, wherein the mapping path is determined based on the field of view and the length and width distance of the breeding space; the determination module 104 is further configured to determine the field of view of the image acquisition device; and the processing module is further configured to stitch the regional images to obtain a panoramic image of the breeding farm.

[0204] In one embodiment, the determining module 104 is further configured to: determine the current coordinates of the acquisition device as reference coordinates, wherein the reference coordinates are within the breeding space used for reference; determine the target coordinates based on the minimum distance between the reference coordinates and the candidate coordinates, wherein the reference coordinates are the current coordinates of the acquisition device and the candidate coordinates are the center coordinates of the candidate breeding space; and determine a predetermined path based on the target coordinates.

[0205] In one embodiment, the determining module 104 is further configured to determine the position coordinates of the object to be tested; the control module 105 is configured to: use the position coordinates as the target reference point and control the acquisition device to move to the target reference point by means of feedback parameter adjustment to achieve biological sample acquisition.

[0206] It should be noted that those skilled in the art will understand that the methods provided in the embodiments of this disclosure can be executed alone or together with some methods in the embodiments of this disclosure or some methods in related technologies.

[0207] This disclosure also provides an electronic device, which includes a processor and a memory for storing a computer program that can run on the processor. When the processor runs the computer program, it performs the steps of the methods described in one or more of the foregoing technical solutions.

[0208] This disclosure also provides a computer-readable storage medium storing computer-executable instructions. These instructions, when executed by a processor, can implement the methods described in one or more of the foregoing technical solutions. The computer storage medium provided in this embodiment may be a non-transient storage medium.

[0209] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0210] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A method for collecting biological samples, characterized in that, include: Construct a panoramic image of the farm; Image data of the aquaculture space is acquired along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple aquaculture spaces on the panoramic image; The image data is input into a trained machine learning model for determining anomaly indices to obtain anomaly indices, wherein the anomaly indices are used to determine whether the aquaculture space is abnormal. At least based on the aforementioned anomaly index, determine whether to automatically collect biological samples, including setting the anomaly index as... The threshold for the abnormal model index of the farm is The threshold for the aquaculture space anomaly model index is: ,like > The entire farm was deemed to be abnormal; if the abnormality index... < < The result is determined to be mildly abnormal; if the abnormal index... < If it is determined to be a major anomaly, biological samples will be collected; if Less than Once the entire farm is deemed to be operating normally, determine whether to collect biological samples based on predetermined conditions. The predetermined conditions include at least one of the following: The first predetermined condition is that if the current time is the predetermined time, biological samples will be collected; if the current time is inconsistent with the predetermined time, biological samples will not be collected. The second predetermined condition is that if the determined current breeding space is the predetermined breeding space, biological samples will be collected; if the determined current breeding space is not the predetermined breeding space, biological samples will not be collected.

2. The method according to claim 1, characterized in that, The method further includes: Acquire image data samples of the aquaculture space for training along a predetermined path; The image data samples and their identifiers are input into the machine learning model to be trained until the convergence function converges, thus obtaining the trained learning model.

3. The method according to claim 1, characterized in that, The panoramic image of the farm being constructed includes: Determine the field of view of the image acquisition device; Images of the region are acquired according to the mapping path, wherein the mapping path is determined based on the field of view and the length and width of the breeding space; A panoramic image of the farm is obtained by stitching together the images of the area.

4. The method according to claim 1, characterized in that, The method further includes: The current coordinates of the data acquisition device are determined as reference coordinates, wherein the reference coordinates are within the aquaculture space used for reference; The target coordinates are determined based on the minimum distance between the reference coordinates and the candidate coordinates, where the reference coordinates are the current coordinates of the data acquisition device and the candidate coordinates are the center coordinates of the candidate breeding space. The predetermined path is determined based on the target coordinates.

5. The method according to claim 1, characterized in that, The method further includes: Determine the position coordinates of the object to be measured; Using the aforementioned location coordinates as the target reference point, the acquisition device is controlled to move to the target reference point by means of feedback parameter adjustment in order to achieve biological sample acquisition.

6. A biological sample collection device, characterized in that, The device includes: The building module is used to construct panoramic images of the farm; An acquisition module is used to: acquire image data of aquaculture spaces along a predetermined path, wherein the predetermined path is determined based on the relative distance between multiple aquaculture spaces on the panoramic image; The processing module is configured to: input the image data into a trained machine learning model for determining anomaly indices, and obtain anomaly indices, wherein the anomaly indices are used to determine whether the aquaculture space is abnormal; The determination module is used to: determine whether to automatically collect biological samples based at least on the anomaly index, including setting the anomaly index as... The threshold for the abnormal model index of the farm is The threshold for the aquaculture space anomaly model index is: ,like > The entire farm was deemed to be abnormal; if the abnormality index... < < The result is determined to be mildly abnormal; if the abnormal index... < If it is determined to be a major anomaly, biological samples will be collected; if Less than Once the entire farm is deemed to be operating normally, determine whether to collect biological samples based on predetermined conditions. The predetermined conditions include at least one of the following: The first predetermined condition is that if the current time is the predetermined time, biological samples will be collected; if the current time is inconsistent with the predetermined time, biological samples will not be collected. The second predetermined condition is that if the determined current breeding space is the predetermined breeding space, biological samples will be collected; if the determined current breeding space is not the predetermined breeding space, biological samples will not be collected.

7. The biological sample collection device according to claim 6, characterized in that, The acquisition module is also used to acquire image data samples of the breeding space for training along a predetermined path; The processing module is further configured to: input the image data sample and the identifier of the data sample into the machine learning model to be trained for training until the convergence function converges, thereby obtaining the trained learning model.

8. The biological sample collection device according to claim 6, characterized in that, The determining module is also used to determine the field of view area of ​​the image acquisition device; The acquisition module is further configured to acquire regional images according to the mapping path, wherein the mapping path is determined based on the field of view and the length and width distance of the breeding space; The processing module is also used to stitch together the regional images to obtain a panoramic image of the farm.

9. The biological sample collection device according to claim 6, characterized in that, The determining module is further configured to: The current coordinates of the data acquisition device are determined as reference coordinates, wherein the reference coordinates are within the breeding space used for reference; the target coordinates are determined based on the minimum distance between the reference coordinates and the candidate coordinates, wherein the reference coordinates are the current coordinates of the data acquisition device and the candidate coordinates are the center coordinates of the candidate breeding space; a predetermined path is determined based on the target coordinates.

10. The biological sample collection device according to claim 6, characterized in that, The device also includes a control module, wherein... The determining module is also used to determine the position coordinates of the object to be measured; The control module is used to: control the acquisition device to move to the target reference point using the position coordinates as the target reference point and to achieve biological sample acquisition by adjusting the feedback parameters.

11. An electronic device, characterized in that, The electronic device includes: a processor and a memory for storing computer programs capable of running on the processor, wherein, When the processor runs a computer program, it executes the steps of the biological sample collection method according to any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions; when executed by a processor, the computer-executable instructions can implement the biological sample collection method as described in any one of claims 1 to 5.