Animal quarantine data management method and system
Through K-means clustering algorithm and hierarchical storage technology, the problem of insufficient data standardization and classification processing in animal quarantine data management is solved, and efficient and flexible data management and query analysis are achieved.
Patent Information
- Application Number
- CN202510451587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, there is insufficient data standardization and classification processing in animal quarantine data management, which makes it difficult to manage data uniformly and efficiently, has low retrieval efficiency, and is difficult to support the dynamic update and expansion of multi-dimensional data.
The K-means clustering algorithm is used to classify and standardize animal quarantine data, generate animal quarantine feature trees, and store them in a hierarchical manner to build an animal quarantine database.
It realizes efficient storage and management of animal quarantine data, improves the efficiency of data query and analysis, supports dynamic query and analysis, and ensures structured management and flexibility of data.
Smart Images

Figure CN120353972A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of animal quarantine, and particularly to a method and system for managing animal quarantine data. Background Art
[0002] Animal quarantine data involves basic information of animals, health status, disease detection results, vaccination status, and quality inspection of animal products. With the increase in the workload of animal quarantine and the complexity of data types, traditional data management methods are increasingly unable to meet the needs of modern quarantine work. Especially when faced with a large amount of complex quarantine data, how to efficiently collect, process, store, and query this data has become a problem to be solved.
[0003] In the prior art, the management of animal quarantine data mainly relies on traditional database systems and manual records. Traditional technologies usually store data in simple databases, but face obvious limitations when dealing with complex and large amounts of data. First, the processing and classification standardization of data are insufficient, resulting in a lack of effective association and integration between different types of data; second, when querying and analyzing large-scale data, the retrieval efficiency is low, and it is difficult to quickly and accurately obtain the required data; finally, traditional storage methods lack flexibility and are difficult to support the dynamic update and expansion of multi-dimensional data.
[0004] The main drawback of the prior art is the insufficient standardization and classification processing of data, resulting in the difficulty of unified and efficient management of quarantine data. Summary of the Invention
[0005] The present invention provides a method and system for managing animal quarantine data to achieve efficient storage of animal quarantine data.
[0006] In a first aspect, to solve the above technical problems, the present invention provides a method for managing animal quarantine data, including: Obtaining original animal quarantine data; wherein, the original animal quarantine data includes: animal basic information, animal health and disease-related information, and animal product information; Preprocessing the original animal quarantine data to obtain processed animal quarantine data; Based on the K-means clustering algorithm, classifying and standardizing the processed animal quarantine data to obtain standard animal quarantine data; Inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree; Hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database.
[0007] Preferably, the basic animal information includes: animal breed, individual identification, gender, age, and body size characteristics; The animal health and disease-related information includes: health status, disease test results, and vaccination information; The animal product information includes: product type, processing information, and quality inspection information.
[0008] Preferably, preprocessing the original animal quarantine data to obtain processed animal quarantine data includes: Performing data cleaning and standardization on the basic animal information to obtain processed basic animal information; Performing rule verification and test result verification on the animal health and disease-related information to obtain processed animal health and disease-related information; Organizing and classifying the animal product information based on the quality inspection information classification standard to obtain processed animal product information; Aggregating the processed basic animal information, the processed animal health and disease-related information, and the processed animal product information to obtain processed animal quarantine data.
[0009] Preferably, classifying and standardizing the processed animal quarantine data based on the K-means clustering algorithm to obtain standard animal quarantine data includes: Performing specific dimension transformation on the processed animal quarantine data to obtain a multi-dimensional feature vector; Inputting the multi-dimensional feature vector into the K-means clustering algorithm for iterative calculation to obtain the specific coordinates of each cluster center; Based on the specific coordinates of each cluster center, allocating the multi-dimensional feature vector to the cluster corresponding to the nearest cluster center to obtain the clustered animal quarantine data clusters; Assigning labels to the data within the clustered animal quarantine data clusters to obtain standard animal quarantine data.
[0010] Preferably, classifying and standardizing the processed animal quarantine data based on the K-means clustering algorithm to obtain standard animal quarantine data includes: The iterative process of the K-means clustering algorithm includes: Selecting feature vectors from the multi-dimensional feature vectors based on a preset number of cluster centers to obtain the current cluster center coordinates; Based on the current cluster center coordinates, attributing all multi-dimensional feature vectors to the cluster corresponding to the cluster center with the nearest distance to obtain preliminary clustering clusters; Based on the preliminary clustering clusters, calculate the average value dimension by dimension to obtain the coordinates of the new clustering center; Calculate the change amount between the coordinates of the new clustering center and the current clustering center coordinates to obtain the coordinate change amount; When the coordinate change amount is less than the preset threshold, output the current clustering center coordinates; When the coordinate change amount is greater than the preset threshold, perform re-iteration until the change amount is less than the preset threshold, and then output the current clustering center coordinates.
[0011] Preferably, inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree includes: the animal quarantine model is a structured calculation model; Based on the animal quarantine model, classify and hierarchically divide the standard animal quarantine data to obtain hierarchically structured classification data; wherein, the classification data includes: animal basic information data, animal health and disease-related information data, and animal product information data; Use the animal basic information data as the root node of the feature tree, the animal health and disease-related information data as the middle layer of the feature tree, and the animal product information data as the end node, thereby obtaining an animal quarantine feature tree.
[0012] Preferably, hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database includes: Associatively store the animal quarantine data and the animal quarantine feature tree to obtain feature tree structured data; Perform integrity verification on the feature tree structured data to obtain complete feature tree structured data; Perform hierarchical partitioning and add retrieval on the complete feature tree structured data to obtain an animal quarantine database.
[0013] In a second aspect, the present invention provides a management system for animal quarantine data, including: A data acquisition module for acquiring original animal quarantine data; A preprocessing module for preprocessing the original animal quarantine data to obtain processed animal quarantine data; A K-means algorithm module for classifying and standardizing the processed animal quarantine data to obtain standard animal quarantine data; An animal quarantine feature tree module for inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree; The animal quarantine database module is used to hierarchically store the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database. Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the management method of the animal quarantine data described in any one of the above is implemented.
[0014] Fourthly, the present invention also provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. Wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the management method of the animal quarantine data described in any one of the above.
[0015] Compared with the prior art, the present invention has the following beneficial effects: (1) The present invention performs corresponding specific preprocessing on the original animal quarantine data. All the original animal quarantine data has been cleaned, standardized, and verified to ensure the integrity, consistency, and accuracy of the data; through the normalization process of the data, the system can perform subsequent classification, analysis, and storage operations more efficiently and accurately, and finally realize the effective management of animal quarantine data; (2) The present invention classifies and standardizes the data based on the K-means clustering algorithm to obtain standard animal quarantine data. Through this standardization and classification process, all animal quarantine data can be stored in the database by category, thus realizing efficient retrieval and management; in subsequent applications, based on these standardized, classified, and labeled data, various analysis operations can be performed, including the assessment of the health status, the prediction of diseases, the tracking of immunization records, etc.; the labels of each category of data not only contribute to data management but also can provide clear clues for subsequent dynamic queries and analysis; (3) The present invention inputs the standard animal quarantine data into a pre-constructed animal quarantine model and outputs an animal quarantine feature tree; the root node, intermediate layer, and terminal node of the feature tree together constitute the multi-level structure of the quarantine data, enabling each data point to have a clear position and level in the tree, thus realizing efficient and clear data storage and subsequent query operations; the establishment of the feature tree also provides a good data support basis for subsequent dynamic analysis, query, and decision-making; quarantine workers can quickly locate the specific information of a certain animal quarantine data according to the structure of the feature tree, thus making more accurate and timely decisions; this process ensures the structured management of the data, optimizes the storage method of quarantine information, improves the efficiency of subsequent data analysis and query, and promotes the accuracy and efficiency of the animal quarantine data management system; (4) The present invention hierarchically stores standard animal quarantine data and an animal quarantine feature tree to obtain an animal quarantine database; through hierarchical storage, the effective organization and structuring of data are achieved, ensuring efficient and accurate querying and analysis during subsequent use; the animal quarantine data after hierarchical storage will ultimately enter a standardized animal quarantine database; the database not only classifies and hierarchically manages the data but also supports subsequent data querying, updating, and analysis through an efficient storage structure; the design and implementation of the entire database ensure the efficiency, scalability, and flexibility of the data storage process, laying a foundation for future data application and analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a schematic flowchart of a method for managing animal quarantine data provided by the first embodiment of the present invention; Figure 2 is a schematic diagram of a system for managing animal quarantine data provided by the second embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0018] Referring to Figure 1 , the first embodiment of the present invention provides a method for managing animal quarantine data, including the following steps: S11, obtaining original animal quarantine data; S12, preprocessing the original animal quarantine data to obtain processed animal quarantine data; S13, based on the K-means clustering algorithm, classifying and standardizing the processed animal quarantine data to obtain standard animal quarantine data; S14, inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree; S15, hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database.
[0019] In step S11, obtain the original animal quarantine data; wherein, the original animal quarantine data includes: animal basic information, animal health and disease-related information, and animal product information. The animal basic information includes: animal breed, individual identification, gender, age, and body type characteristics. The animal health and disease-related information includes: health status, disease detection results, and vaccination information. The animal product information includes: product type, processing information, and quality inspection information.
[0020] It should be noted that in step S11, obtaining the original animal quarantine data is an important foundation for the entire quarantine work, and the animal basic information is the most fundamental and crucial component. Animal basic information usually includes the breed, individual identification, gender, age, and body type characteristics of the animal, etc. The breed information is obtained through the animal's breed registration information and registration materials. For the individual identification of animals, they are marked by ear tags, implanted chips, and barcodes, and each animal will have a unique identifier. These identifiers can help quarantine personnel trace the origin, health status, and historical quarantine records of each animal, etc. The gender, age, and body type characteristics are confirmed through physical examinations and observations. The gender information can be identified through external physical characteristics, such as organs like the penis or mammary glands. The age of an animal is generally confirmed through its birth record. If the birth record cannot be confirmed, it can be estimated through body size, tooth development, and physical characteristics. The body type characteristics include data such as weight, body length, and height, which are accurately measured by instruments such as electronic scales, height meters, and weighing scales. The body type data is very important for evaluating the health status of animals and helps to determine whether they are growing and developing normally.
[0021] The animal health and disease-related information is another important component in the quarantine data and is crucial for ensuring the effectiveness of the animal quarantine process. The assessment of the health status mainly relies on the physical examinations and inspections by veterinarians, and the basic vital signs such as the behavior, body temperature, and appetite of the animal are observed to preliminarily judge its health status. If there are abnormalities, the quarantine personnel will further conduct professional disease detections. These detections include the analysis of samples such as blood, urine, and feces, and modern medical technologies such as PCR (Polymerase Chain Reaction) technology and immunological detections are used to detect possible diseases. Through these professional detections, it can be determined whether the animal has infectious diseases, parasitic diseases, or other health hazards. In addition, the vaccination information is also included in the animal health management. The vaccination information details the types of vaccines the animal has received, the vaccination dates, the number of vaccinations, etc. To ensure the integrity and effectiveness of the animal vaccination, the quarantine personnel will regularly check and update these records. The goal of vaccination is to ensure that animals can effectively resist some common infectious diseases, thereby reducing the risk of disease transmission and ensuring the dual safety of public health and animal health. All these health and disease-related information will be detailedly recorded in the animal health file as the basis for future health tracing.
[0022] Animal product information involves various products derived from animals, mainly including product types, processing information, and quality inspection information. Product types are classified according to the intended use of the animals and mainly include meat, dairy products, fur, feathers, etc. This product type information is usually registered by quarantine personnel when the animals enter the quarantine process, and this information is stored together with the animals' quarantine records. The quarantine of each type of product requires different standards and procedures, so accurate recording of product type information is very important. Processing information involves the entire process from slaughter to processing of animal products, including the method of slaughter, the processing technology of the processing plant, product packaging, and transportation. Accurate recording of this information can help trace the production process of each batch of products and ensure that each link complies with national or international quarantine standards. The quality inspection information of animal products is to ensure that the products meet food safety standards and prevent the spread of germs, viruses, or chemical contaminants. Quality inspection is carried out by certified laboratories using methods such as microbiology, chemical analysis, and heavy metal detection to ensure that animal products are safe before being sold. The quality inspection information not only helps quarantine personnel evaluate the safety of the products but also provides confidence for producers and consumers and prevents unqualified products from entering the market.
[0023] In step S12, preprocess the original animal quarantine data to obtain processed animal quarantine data. The preprocessing of the original animal quarantine data to obtain processed animal quarantine data includes: Clean and standardize the animal basic information to obtain processed animal basic information; Perform rule verification and test result verification on the animal health and disease-related information to obtain processed animal health and disease-related information; Organize and classify the animal product information based on the quality inspection information classification standard to obtain processed animal product information; Aggregate the processed animal basic information, the processed animal health and disease-related information, and the processed animal product information to obtain processed animal quarantine data.
[0024] It should be noted that in step S12, after obtaining the original animal quarantine data, it is necessary to preprocess these data for subsequent use. The preprocessing process is crucial for data cleaning and standardization. It not only ensures the accuracy of the data but also provides a reliable basis for subsequent data analysis and processing. This step is divided into several main parts, and the specific operation process of each part will be elaborated in detail below.
[0025] First, processing animal basic information is the first step in data preprocessing. Animal basic information includes the breed, individual identification, gender, age, and body size characteristics of the animal. This information is usually stored in the form of a table in the quarantine system and needs to be cleaned and unified during the preprocessing. For example, the purpose of data cleaning is to eliminate invalid or incorrect data, such as missing, duplicate, or inconsistently formatted records. Unification refers to standardizing the data format to ensure that all data adopts a unified standard and format, facilitating subsequent data processing. When processing animal basic information, if some fields are missing, interpolation methods will be used to supplement them with the median, or these missing data will be marked as "unknown" to ensure data integrity.
[0026] Next, for animal health and disease-related information, the main task of preprocessing is to perform rule verification and test result validation on the data. Animal health information includes health status, disease test results, and vaccination records. At this stage, it is first necessary to verify whether the records conform to the specified format and check for outliers. For example, the health status data needs to be compared with a standard health assessment form to ensure that all records meet the health standards. If there are records that do not meet the standards or data errors, corrections or deletions need to be made. Regarding the disease test results, during the preprocessing, it is necessary to ensure that all test data has been verified by an accredited laboratory and that all experimental results have been accurately recorded. The vaccination information also needs to be checked to ensure that the vaccination history of all animals has been completely recorded and that the vaccination information complies with the relevant regulations. If there are inconsistencies or omissions, further confirmation and supplementation of the corresponding data are required.
[0027] Then, for animal product information, the focus of preprocessing is to organize the quality inspection information of the products. Animal product information includes product type, processing information, and quality inspection information. During this process, the product quality inspection information needs to be compared with relevant standard inspection reports to ensure that all quality inspection data meets the quarantine standards. The quality inspection information may include microbial detection, chemical composition detection, heavy metal detection, etc. of the products. These data need to undergo accurate laboratory tests and be formatted during data preprocessing to ensure that all test results are unified and standardized, facilitating subsequent data analysis.
[0028] Finally, after preprocessing the basic information of animals, information related to animal health and diseases, and animal product information, it is necessary to summarize and integrate these processed data. The goal of this process is to transform the scattered data into a unified dataset for subsequent analysis and application. The summarization process involves associating all relevant data fields and ensuring that each piece of data can be correctly mapped to its corresponding quarantine object. After data summarization, all the original data will be transformed into processed quarantine data, and this part of the data will be stored in a standardized manner in the database. At this time, the quarantine data has been cleaned and standardized, providing high-quality input for subsequent classification, analysis, and storage.
[0029] Through the above preprocessing steps, all the original animal quarantine data has been cleaned, standardized, and verified to ensure the integrity, consistency, and accuracy of the data. This process is an essential link in animal quarantine data management. Through the normalization of the data, the system can perform subsequent classification, analysis, and storage operations more efficiently and accurately, ultimately achieving the effective management of animal quarantine data.
[0030] In step S13, based on the K-means clustering algorithm, the processed animal quarantine data is classified and standardized to obtain standard animal quarantine data. The process of classifying and standardizing the processed animal quarantine data based on the K-means clustering algorithm to obtain standard animal quarantine data includes: Perform a specific dimension transformation on the processed animal quarantine data to obtain a multi-dimensional feature vector; Input the multi-dimensional feature vector into the K-means clustering algorithm for iterative calculation to obtain the specific coordinates of each cluster center; Based on the specific coordinates of each cluster center, allocate the multi-dimensional feature vector to the cluster corresponding to the nearest cluster center to obtain the clustered animal quarantine data clusters; Assign labels to the data within the clustered animal quarantine data clusters to obtain standard animal quarantine data.
[0031] It should be noted that classifying and standardizing the processed animal quarantine data based on the K-means clustering algorithm is an important part of quarantine data management. First, the processed data will enter the K-means clustering algorithm for standardization operations. The purpose of standardization is to convert the data into a unified scale, eliminate the differences between different data magnitudes, and ensure that each feature is analyzed under the same weight. For animal quarantine data, the standardization operation usually involves subtracting the mean value of each feature from the numerical value of the feature and then dividing by the standard deviation, so that the mean value of each feature is zero and the standard deviation is one. The standardized data will eliminate the differences in data magnitudes, ensuring that each feature can be treated equally in subsequent analyses and avoiding biases in the analysis results due to differences in data scales.
[0032] Next, the standardized data is input into the K-means clustering algorithm. The K-means clustering algorithm is a commonly used unsupervised learning algorithm. Its basic principle is to divide the data set into several clusters by calculating the similarity between data points. The data points within each cluster have high similarity, while the data points between different clusters have large differences. The first step of K-means clustering is to randomly select the cluster centers, then calculate the distance from each data point to each cluster center, and assign the data point to the cluster to which the nearest cluster center belongs. Subsequently, the positions of the cluster centers are recalculated based on the mean values of the data points in each cluster. Then, this process is repeated until the change amount of the cluster centers is lower than a preset threshold, indicating that the algorithm has converged, that is, the clustering result is stable.
[0033] After standardizing the data and inputting it into the K-means clustering algorithm, the algorithm will classify each data point and assign it to the cluster where the nearest cluster center is located. During this process, the K-means algorithm will continuously update the coordinates of the cluster centers until all data points are correctly classified. In each iteration, the coordinates of the cluster centers will change until finally converging to obtain a stable clustering result. The core of this process is to classify similar animal quarantine data into one category by calculating the distance from the data points to the cluster centers, thereby effectively classifying the data set according to different characteristics of animals.
[0034] During the process of step S13, after the data is classified, it is further normalized, and the clustered data will be labeled with corresponding categories. The label of each cluster is based on the characteristics of the dataset and the result of clustering. Eventually, each animal quarantine dataset is assigned a corresponding label. The generation of the label is carried out by determining which cluster each data point belongs to, and the label represents the category to which the data point belongs. After normalization and classification processing, the data can not only accurately reflect the characteristics of each data point but also provide valuable information for subsequent analysis, such as comparing, analyzing different categories of data, and providing further decision support.
[0035] In addition, the clustered data can be conveniently stored and queried. Through this process of normalization and classification, all animal quarantine data can be stored in the database by category, thus achieving efficient retrieval and management. In subsequent applications, based on these normalized, classified, and labeled data, various analysis operations can be carried out, including the assessment of health status, the prediction of diseases, the tracking of immunization records, etc. The label of each category of data not only helps with data management but also provides a clear clue for subsequent dynamic queries and analysis.
[0036] Generally speaking, the operations in step S13 standardize and classify the animal quarantine data through the K-means clustering algorithm, which not only improves the structural level of the data but also lays a foundation for the subsequent analysis, management, and query of the data. Through this process, the animal quarantine data is processed and organized more efficiently, ensuring the accuracy of subsequent steps and the efficient utilization of the data.
[0037] In step S13, based on the K-means clustering algorithm, the processed animal quarantine data is classified and normalized to obtain standard animal quarantine data. The classification and normalization of the processed animal quarantine data based on the K-means clustering algorithm to obtain standard animal quarantine data include: The iterative process of the K-means clustering algorithm includes: Based on a preset number of cluster centers, feature vectors are selected from the multi-dimensional feature vectors to obtain the coordinates of the current cluster centers; Based on the coordinates of the current cluster centers, all multi-dimensional feature vectors are assigned to the cluster corresponding to the cluster center with the closest distance, obtaining preliminary clusters; According to the preliminary clusters, the average value is calculated dimension by dimension to obtain the coordinates of the new cluster centers; The change amount of the coordinates is calculated by calculating the change amount between the coordinates of the new cluster centers and the coordinates of the current cluster centers; When the change amount of the coordinates is less than the preset threshold, the coordinates of the current cluster centers are output; When the coordinate change amount is greater than the preset threshold, re-iteration is performed until the change amount is less than the preset threshold, and then the current cluster center coordinates are output.
[0038] It should be noted that in step S13, based on the application of the K-means clustering algorithm, the processed animal quarantine data is first classified and standardized to obtain the standardized animal quarantine data. The core of this process lies in how to classify and standardize the data through the K-means algorithm to ensure accurate and clear classification of animal quarantine data. In this process, the key operational steps include selecting appropriate cluster centers, calculating the coordinates of new cluster centers, and determining whether further iteration is required until a final stable clustering result is obtained.
[0039] First, during the iteration of the K-means clustering algorithm, based on the preset number of cluster centers, feature vectors are first selected from the multi-dimensional feature vectors. At this time, each data point represents various feature information of an animal, including health status, immunization status, body size characteristics, etc. Each feature vector contains this multi-dimensional information, and the goal of clustering these feature vectors through the K-means algorithm is to group similar animal features into the same category. The selection of feature vectors is completed through pre-processed and standardized data. The standardized data can remove the scale differences between features and ensure that each data feature can equally affect the clustering result.
[0040] Next, based on the current cluster center coordinates, in combination with the multi-dimensional feature vectors, each feature vector is assigned to the cluster corresponding to the nearest cluster center. This process is completed by calculating the distance between each data point and the cluster center. The Euclidean distance is used to measure the similarity between the data point and the cluster center, and the data point with the smallest distance will be classified into the category represented by this center. After this round of iteration, all data points are assigned to the corresponding clustering clusters, generating a preliminary clustering result.
[0041] Once the preliminary clustering clusters are formed, the next step is to calculate the coordinates of the new cluster centers by calculating the data within each clustering cluster. The core operation here is to calculate the average value of all data points within each cluster, and the average value is the coordinate of the new cluster center. This calculation process helps to ensure that the cluster center reflects the overall characteristics of the data points within the cluster, so the new cluster center can better represent the data within the cluster. If the data distribution within some clusters is relatively wide, the new cluster center may shift to the "dense" area of the data within the cluster, while if the data within the cluster is very concentrated, the new cluster center may be almost the same as the previous cluster center.
[0042] At this time, in order to determine whether the clustering process has converged, we need to calculate the change amount between the new cluster center coordinates and the original cluster center coordinates. The calculation method of this change amount is to calculate the difference between the two cluster center coordinates. The smaller the difference, the more stable the clustering result is, and the closer the termination condition of the iteration is. Specifically, the method of calculating the change amount can be the absolute difference or the Euclidean distance between the two cluster center coordinates. If the change amount is less than the set threshold, it means that the clustering has converged, and the iteration can be stopped and the current cluster center coordinates can be output. If the change amount is greater than the set threshold, it means that the cluster center still changes greatly, and the next round of iteration continues.
[0043] During each iteration, if the change amount of the cluster center is less than the preset threshold, then it can be considered that the current cluster center is stable, the operation of the algorithm can be stopped, the final clustering result can be output, and the final cluster center coordinates can be generated. If the change amount is greater than the preset threshold, the algorithm will continue to perform iterative calculations. During this process, the new cluster center is continuously adjusted, and the belonging of the data points will also be adjusted accordingly until the change amount of the cluster center coordinates is stable within an acceptable range.
[0044] Through the above iterative process, the K-means clustering algorithm can gradually optimize the clustering result, ensure that the data points of each category can be better clustered together, and finally obtain an accurate classification result. Each iteration makes the cluster center move closer to the dense area of the data points, ensuring the accuracy of the clustering. Finally, when the iteration terminates, the output is the stable cluster center coordinates, which represent different categories of the data and are convenient for subsequent classification storage, analysis, and retrieval.
[0045] In summary, the application of the K-means clustering algorithm in step S13 finally obtains a stable and accurate clustering result by iteratively optimizing the cluster center coordinates. By calculating the change amount and comparing it with the preset threshold, it is judged whether the convergence condition is reached, ensuring that the clustering algorithm can efficiently and accurately complete data classification and standardization processing, and providing reliable data support for subsequent data storage and analysis.
[0046] In step S14, the standard animal quarantine data is input into a pre-constructed animal quarantine model to output an animal quarantine feature tree. The process of inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree includes: the animal quarantine model is a structured calculation model; Based on the animal quarantine model, the standard animal quarantine data is classified and hierarchically divided to obtain hierarchical structured classification data; among them, the classification data includes: animal basic information data, animal health and disease-related information data, and animal product information data; Taking the animal basic information data as the root node of the feature tree, the animal health and disease related information data as the middle layer of the feature tree, and the animal product information data as the leaf nodes, an animal quarantine feature tree is obtained.
[0047] It should be noted that in step S14, the standardized animal quarantine data is input into a pre-constructed animal quarantine model, and then an animal quarantine feature tree is generated. This is a key link in the data processing flow. The generation of the animal quarantine feature tree is achieved by classifying and hierarchically partitioning the standardized data into an animal quarantine model, and finally obtaining a structured tree model that reflects the characteristics of animal quarantine data. The following will elaborate on the operation details and implementation methods of this process.
[0048] First of all, after the preprocessing of the standardized animal quarantine data, all animal basic information, health and disease related information, and animal product information have been unified and standardized. These data contain a large number of features related to animal health, species, body size, vaccination status, disease history, etc. Each piece of data is generated through certain detections or records and is input into the quarantine system in a unified standard format.
[0049] Next, the standardized animal quarantine data is input into a pre-constructed animal quarantine model. This model adopts a hierarchical structure design, aiming to subdivide and classify the data layer by layer to construct a quarantine feature tree that meets the actual needs. In this process, first, the data is classified based on the specific characteristics of the animal quarantine data, including the breed, health status, vaccination records, disease test results, etc. of the animal. The data will be grouped according to different dimensions of these characteristics to ensure that each type of data can be properly positioned and hierarchically organized in the model.
[0050] The animal quarantine model stores all the standardized data in different categories and hierarchically according to the relationships between the categories. In this process, the model first takes the animal basic information as the root node of the feature tree. These basic information include basic attributes such as the breed, body size, gender, and age of the animal. These data are usually the most basic and direct factors determining animal quarantine. Therefore, as the root node, they can provide the most direct basis for the subsequent classification and analysis of data. The setting of the root node ensures the integrity and logic of the entire quarantine data tree.
[0051] After the root node, animal health and disease-related information is stored as an intermediate layer. This data usually includes the health status of animals, disease test results, vaccination records, etc. These pieces of information directly affect whether an animal can pass quarantine. Therefore, they are located in the intermediate layer of the tree and serve as key nodes for health status classification. For each data node related to the health status, the model will further refine and classify it to ensure that each health status can be correctly reflected in the quarantine results.
[0052] Finally, animal product information data exists as leaf nodes at the bottommost layer of the feature tree. Animal product information includes product type, processing information, quality inspection information, etc. These data are closely related to the edibility and quality safety of the products. During the quarantine process, product information often needs to be carefully reviewed and tested. Therefore, placing it at the leaf nodes of the feature tree can effectively manage the quarantine work hierarchically and ensure the accuracy and integrity of each type of data.
[0053] Through this series of classifications and hierarchical divisions, what is ultimately obtained is a complete animal quarantine feature tree. The root node, intermediate layer, and leaf nodes of the feature tree together constitute the multi-level structure of the quarantine data, enabling each data point to have a clear position and level in the tree, thereby achieving efficient and clear data storage and subsequent query operations. In addition, the establishment of the feature tree also provides a good data support foundation for subsequent dynamic analysis, query, and decision-making. Quarantine workers can quickly locate the specific information of a certain animal quarantine data according to the structure of the feature tree, and thus make more accurate and timely decisions.
[0054] In summary, the generation of the animal quarantine feature tree in step S14 constructs a clear and hierarchical quarantine feature tree through the hierarchical classification and induction of standardized data. This process ensures the structured management of data, optimizes the storage method of quarantine information, improves the efficiency of subsequent data analysis and query, and promotes the accuracy and efficiency of the animal quarantine data management system.
[0055] In step S15, the standard animal quarantine data and the animal quarantine feature tree are hierarchically stored to obtain an animal quarantine database. The hierarchical storage of the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database includes: The animal quarantine data and the animal quarantine feature tree are associated and stored to obtain feature tree structured data; The integrity of the feature tree structured data is verified to obtain complete feature tree structured data; The complete feature tree structured data is hierarchically partitioned and retrieval is added to obtain an animal quarantine database.
[0056] It should be noted that in step S15, the standardized animal quarantine data and the animal quarantine feature tree are hierarchically stored, and finally a standardized animal quarantine database is formed. This process is a key step in data storage and management. Through hierarchical storage, the effective organization and structuring of data are achieved, ensuring that queries and analyses can be carried out efficiently and accurately in subsequent use. Specifically, this step includes associatively storing the standardized animal quarantine data with the animal quarantine feature tree and hierarchically managing it according to its characteristics.
[0057] First of all, when hierarchically storing the standardized animal quarantine data with the feature tree, an important first step is the generation of the feature tree structure. The feature tree is composed of various key attributes in the animal quarantine data. These attributes, such as the breed of the animal, health status, vaccination situation, and relevant information about animal products, etc., constitute different levels of the data tree. The creation of the feature tree structure helps to ensure that all data points can find appropriate positions and classifications in the tree. The root node, intermediate layer, and terminal nodes each represent different classifications and levels, ensuring that each data item has a clear attribution and path in the overall system.
[0058] Once the structure of the feature tree is completed, the next step is to associatively store the standardized animal quarantine data with the feature tree. The main purpose of this step is to accurately match various types of data according to their characteristics through the tree structure. The standardized data includes all processed and cleaned basic information, health and disease-related information, and animal product information. Each type of information has its corresponding feature tree node. Storing these data according to the nodes ensures that different types of data can be accurately classified and stored, and the information needed can be quickly found during queries.
[0059] Furthermore, hierarchical storage of data is to ensure more efficient data management. In animal quarantine data, different data items have different priorities at different levels. Basic information such as breed, gender, age, etc. exists as the root node, while health and disease information is usually in the intermediate layer, and product information is at the end of the tree. The storage of each data point will follow this hierarchical relationship, ensuring that different query requirements can accurately extract information from the data levels. For example, when querying the health information of a certain animal, the system can quickly locate the node where the information is located according to the structure of the feature tree and extract the corresponding data. Through this hierarchical storage, the system can not only effectively manage a large amount of data, but also reduce unnecessary calculation and search time, improving the overall query efficiency.
[0060] During the process of hierarchical storage, in addition to basic classification storage, certain processing of the data for each node is also required. For example, the data in the nodes can be further integrated and verified to ensure the integrity and consistency of the data. This step is to prevent information loss or errors during data storage, thereby ensuring the reliability and effectiveness of the data. Whenever new data is input or existing data needs to be updated, the system will automatically perform these processes to ensure the accuracy and timeliness of all data in the database.
[0061] In addition, the data of each node in the feature tree is stratified and indexed according to specific rules. This process not only helps to classify and store different types of data but also plays a key role in query efficiency. Through indexing specific nodes, the retrieval process becomes more efficient. Indexing specific data nodes enables the system to quickly access relevant data when retrieving a certain type of information without having to traverse the entire database. This indexing method is particularly important when storing large-scale data as it significantly reduces the retrieval time and improves the system's response speed.
[0062] Finally, the animal quarantine data after hierarchical storage will ultimately enter a standardized animal quarantine database. The database not only classifies and hierarchically manages the data but also supports subsequent data query, update, and analysis through an efficient storage structure. The way the data is organized in the database meets the requirements of practical applications, enabling data entry, information update, or retrieval query to be carried out in an efficient and structured environment. The design and implementation of the entire database ensure the efficiency, scalability, and flexibility of the data storage process, laying a foundation for future data applications and analysis.
[0063] In summary, the operation in step S15 completes the precise storage of standardized animal quarantine data and the feature tree through hierarchical storage. This storage method not only ensures the clarity and order of data classification but also improves the efficiency and accuracy of data retrieval.
[0064] Referring to Figure 2 , the second embodiment of the present invention provides a management system for animal quarantine data, including: A data acquisition module for acquiring original animal quarantine data; A preprocessing module for preprocessing the original animal quarantine data to obtain processed animal quarantine data; A K-means algorithm module for classifying and standardizing the processed animal quarantine data to obtain standard animal quarantine data; An animal quarantine feature tree module for inputting the standard animal quarantine data into a pre-constructed animal quarantine model and outputting an animal quarantine feature tree; An animal quarantine database module for hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database.
[0065] It should be noted that the animal quarantine data management system provided in the embodiments of the present invention is used to execute all the process steps of the animal quarantine data management method in the above embodiments. The working principles and beneficial effects of the two correspond one by one, so they will not be elaborated here.
[0066] The embodiments of the present invention also provide an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a management program for animal quarantine data. When the processor executes the computer program, the steps in the above embodiments of the animal quarantine data management method are implemented, such as Figure 1 Step S11 shown. Alternatively, when the processor executes the computer program, the functions of each module / unit in the above device embodiments are implemented, such as the animal quarantine database module.
[0067] Exemplarily, the computer program can be divided into one or more modules / units. The one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the electronic device.
[0068] The electronic device can be a computing device such as a desktop computer, a notebook, a palm computer, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above components are only examples of the electronic device and do not constitute a limitation on the electronic device. It may include more or fewer components than the above, or combine some components, or different components. For example, the electronic device may further include input / output devices, network access devices, a bus, etc.
[0069] The so-called processor may be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits.
[0070] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory, the processor realizes various functions of the electronic device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0071] Among them, if the modules / units integrated in the electronic device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0072] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0073] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only the specific embodiments of the present invention and is not used to limit the protection scope of the present invention. It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A management method for animal quarantine data, characterized in that Executed by a computer, including: Obtaining original animal quarantine data; wherein, the original animal quarantine data includes: animal basic information, animal health and disease-related information, and animal product information; Preprocessing the original animal quarantine data to obtain processed animal quarantine data; Based on the K-means clustering algorithm, classifying and standardizing the processed animal quarantine data to obtain standard animal quarantine data; Inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree; Hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database.
2. The management method of animal quarantine data according to claim 1, characterized in that The animal basic information includes: animal breed, individual identification, gender, age, and body type characteristics; The animal health and disease-related information includes: health status, disease detection results, and vaccination information; The animal product information includes: product type, processing information, and quality inspection information.
3. The management method of animal quarantine data according to claim 2, characterized in that, The preprocessing of the original animal quarantine data to obtain processed animal quarantine data includes: Cleaning and unifying the animal basic information to obtain processed animal basic information; Performing rule verification and detection result verification on the animal health and disease-related information to obtain processed animal health and disease-related information; Organizing and classifying the animal product information based on the quality inspection information classification standard to obtain processed animal product information; Aggregating the processed animal basic information, the processed animal health and disease-related information, and the processed animal product information to obtain processed animal quarantine data.
4. The management method of animal quarantine data according to claim 1, characterized in that, The classifying and standardizing the processed animal quarantine data based on the K-means clustering algorithm to obtain standard animal quarantine data includes: Performing specific dimension transformation on the processed animal quarantine data to obtain a multi-dimensional feature vector; Inputting the multi-dimensional feature vector into the K-means clustering algorithm for iterative calculation to obtain the specific coordinates of each cluster center; Based on the specific coordinates of each cluster center, allocating the multi-dimensional feature vector to the cluster corresponding to the nearest cluster center to obtain a clustered animal quarantine data cluster; Assigning labels to the data within the clustered animal quarantine data cluster to obtain standard animal quarantine data.
5. The management method of animal quarantine data according to claim 4, characterized in that, The classifying and standardizing the processed animal quarantine data based on the K-means clustering algorithm to obtain standard animal quarantine data includes: The iterative process of the K-means clustering algorithm includes: Selecting feature vectors from the multi-dimensional feature vectors based on a preset number of cluster centers to obtain the current cluster center coordinates; Based on the current cluster center coordinates, attributing all multi-dimensional feature vectors to the cluster corresponding to the cluster center with the nearest distance to obtain a preliminary clustering cluster; Calculating the average value dimension by dimension according to the preliminary clustering cluster to obtain new cluster center coordinates; Calculating the change amount between the new cluster center coordinates and the current cluster center coordinates to obtain a coordinate change amount; When the coordinate change amount is less than the preset threshold, the current cluster center coordinates are output; When the coordinate change amount is greater than the preset threshold, re-iteration is performed until the change amount is less than the preset threshold, and then the current cluster center coordinates are output.
6. The management method of animal quarantine data according to claim 2, characterized in that The step of inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree includes: the animal quarantine model is a structured calculation model; Based on the animal quarantine model, the standard animal quarantine data is classified and hierarchically divided to obtain classified data with a hierarchical structure; wherein, the classified data includes: animal basic information data, animal health and disease related information data, and animal product information data; Taking the animal basic information data as the root node of the feature tree, the animal health and disease related information data as the middle layer of the feature tree, and the animal product information data as the terminal node, thereby obtaining an animal quarantine feature tree.
7. The management method of animal quarantine data according to claim 1, characterized in that The step of hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database includes: Associatively storing the animal quarantine data and the animal quarantine feature tree to obtain feature tree structured data; Performing integrity verification on the feature tree structured data to obtain complete feature tree structured data; Performing hierarchical partitioning and adding retrieval on the complete feature tree structured data to obtain an animal quarantine database.
8. A management system for animal quarantine data, characterized in that Including: A data acquisition module for acquiring original animal quarantine data; A preprocessing module for preprocessing the original animal quarantine data to obtain processed animal quarantine data; A K-means algorithm module for classifying and standardizing the processed animal quarantine data to obtain standard animal quarantine data; An animal quarantine feature tree module for inputting the standard animal quarantine data into a pre-constructed animal quarantine model to output an animal quarantine feature tree; An animal quarantine database module for hierarchically storing the standard animal quarantine data and the animal quarantine feature tree to obtain an animal quarantine database.
9. An electronic device, characterized in that, Including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the management method of animal quarantine data according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the management method of animal quarantine data according to any one of claims 1 to 7.
Citation Information
Cited By
Multi-dimensional integration and intelligent management method for silkworm germplasm resources
CN121660397A