Local comparison algorithm-based endangered animal identification system, method and related device
By using local comparison algorithms and domestic databases in the endangered animal identification system, the problems of inefficient DNA recognition efficiency and limited accuracy in the existing technology have been solved, efficient and accurate identification of endangered animal is achieved, and data security and reliability are improved.
Patent Information
- Application Number
- CN202510289716.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-24
AI Technical Summary
When dealing with difficult inspection materials for endangered animals, existing DNA recognition technology faces problems such as a wide variety of inspection materials, different storage status, huge and complex information, resulting in insufficiency of DNA recognition and limited recognition accuracy.
An endangered animal identification system based on local alignment algorithm is adopted, which includes a visual platform module, a local alignment module and a domestic database. The local mitochondrial DNA sequence to be detected is aligned with the reference sequence in the database through a local alignment algorithm to improve the alignment efficiency and accuracy, and improve data security and reliability through domestic databases.
It improves the alignment efficiency and accuracy of DNA sequences, reduces the transportation and processing requirements for the sample material, reduces the time cost, and enhances the security and reliability of data.
Smart Images

Figure CN120199331A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of endangered animal identification, and particularly to an endangered animal identification system, method and related device based on a local alignment algorithm. Background Art
[0002] Wildlife protection in China is facing unprecedented severe challenges. In particular, the resources of endangered species are severely threatened by illegal hunting and trading, which poses a great risk to the country's ecological security and biodiversity protection. As one of the severe challenges in the field of ecological protection, cases involving endangered species not only directly threaten the survival of species but also test the law enforcement capabilities of modern national public security organs. In the process of solving cases, DNA identification of difficult samples (which may have been deeply processed for endangered animals) plays a core role and is crucial for identifying the species involved in the case, tracing the origin of the crime, and constructing a solid evidence system. However, in actual work, public security organs face numerous challenges, especially in DNA identification of difficult samples of endangered animals. This is because there are a wide variety of endangered species involved in cases of endangering endangered species, and in such cases, the samples involved may include animal furs, bones, blood samples, etc. These samples are often severely damaged due to factors such as storage conditions and harsh conditions during illegal transportation, which greatly increases the difficulty of DNA identification. At the same time, in order to evade strikes, criminals often use various means of disguise and hiding, making the discovery and identification of samples more complex and further exacerbating the difficulty of DNA extraction and identification. In addition, the DNA sequence differences between different species are subtle, especially between closely related species, which poses extremely high requirements for the specificity and sensitivity of DNA identification technology. Currently, domestic DNA identification technology faces many challenges such as a wide variety of sample types, inconsistent preservation states, huge and complex information when dealing with such cases, resulting in low DNA identification efficiency and limited identification accuracy. Therefore, public security organs need to adopt advanced technical means and strict operation procedures to improve the efficiency of DNA identification and ensure the accuracy of DNA identification, so as to effectively curb crimes against endangered species and protect biodiversity.
[0003] In this context, DNA alignment technology, with its excellent performance and unique advantages, brings new hope for the protection of endangered animals. Relying on its high accuracy and sensitivity, DNA alignment technology can achieve precise identification of endangered animal species involved in cases. By comparing the DNA sequences of different individuals, it is possible to clearly determine their species attribution (classifying biological individuals into specific species) and genetic relationships, providing a solid scientific basis for the identification and protection of endangered animals.
[0004] However, DNA alignment technology often conducts global alignment, resulting in low alignment efficiency. Moreover, due to the damage of the forensic samples, it is impossible to obtain the complete DNA sequence, which affects the alignment accuracy. More troublesome is that the identification work of endangered species is highly specialized, and the number of institutions with identification qualifications is limited and unevenly distributed geographically. When the public security police handle cases, they often need to transport the forensic samples to professional identification institutions, which not only increases the time cost of solving the cases, but also may cause further damage to the forensic samples due to improper handling during transportation, thus increasing the difficulty of solving the cases. At present, foreign databases are often used to store reference sequences, and the management rights are abroad. There may be problems such as users being unable to access and others arbitrarily tampering with the data in the database. Moreover, the data in this foreign database can be uploaded by everyone, and there may be problems with data errors. In summary, the existing DNA sequence alignment technology in China still has deficiencies such as low alignment efficiency, dependence on foreign databases (which may lead to data insecurity and unreliability problems), and inaccurate alignment. Summary of the Invention
[0005] The purpose of this application is to provide an endangered animal identification system, method and related device based on a local alignment algorithm, which can improve the alignment efficiency and accuracy of DNA sequences, and adopt a domestic database to improve data security and reliability.
[0006] To achieve the above purpose, this application provides the following solutions:
[0007] In the first aspect, this application provides an endangered animal identification system based on a local alignment algorithm. The endangered animal identification system based on a local alignment algorithm includes: a visualization platform module, a local alignment module and a database. The database stores multiple reference local mitochondrial DNA sequences and detailed information of each species among multiple species. The database is a domestic database edited by experts. The detailed information includes pictures, taxonomic status, protection level, morphological characteristics, common trading categories, common illegal utilization forms, value and distribution areas;
[0008] The visualization platform module is used to receive the to-be-detected local mitochondrial DNA sequence of the to-be-detected endangered animal input by the user;
[0009] The local alignment module is respectively communicatively connected to the visualization platform module and the database; the local alignment module is used to locally align the to-be-detected local mitochondrial DNA sequence with the multiple reference local mitochondrial DNA sequences in the database by using a local alignment algorithm to obtain a local alignment result, and determine the species of the to-be-detected endangered animal based on the local alignment result to identify the to-be-detected endangered animal;
[0010] The visualization platform module is also used to display the species of the endangered animal to be detected and the detailed information of the species of the endangered animal to be detected.
[0011] Optionally, the visualization platform module adopts the Streamlit framework.
[0012] Optionally, the local alignment algorithm is the Smith-Waterman algorithm, and the parameters in the Smith-Waterman algorithm are adjusted based on the matching results of the BLAST tool. The parameters include the score when two bases are exactly the same, the penalty when two bases are different, and the penalty when inserting a space in the local mitochondrial DNA sequence.
[0013] Optionally, the local alignment result includes the number of identical bases between the local mitochondrial DNA sequence to be detected and each reference local mitochondrial DNA sequence, and the number of participating alignment characters in the local mitochondrial DNA sequence to be detected when performing local alignment with each reference local mitochondrial DNA sequence. The characters include bases and spaces. At this time, determining the species of the endangered animal to be detected based on the local alignment result specifically includes:
[0014] For each reference local mitochondrial DNA sequence, calculate the ratio of the number of identical bases corresponding to the reference local mitochondrial DNA sequence to the number of participating alignment characters, and obtain the similarity between the local mitochondrial DNA sequence to be detected and the reference local mitochondrial DNA sequence.
[0015] Select the reference local mitochondrial DNA sequence with the highest similarity to the local mitochondrial DNA sequence to be detected as the target sequence, and use the species corresponding to the target sequence as the species of the endangered animal to be detected.
[0016] Optionally, the local alignment module uses Cython to perform local alignment and similarity calculation.
[0017] Optionally, the display interface of the visualization platform module includes an input box, a run button, and a result display box. When the user clicks the input box, the input box is used for the user to input the local mitochondrial DNA sequence to be detected; when the user clicks the run button, the run button is used to transmit the local mitochondrial DNA sequence to be detected to the local alignment module and drive the local alignment module to work; the result display box is used to display the species of the endangered animal to be detected and the detailed information of the species of the endangered animal to be detected.
[0018] Second aspect, the present application provides an endangered animal identification method based on a local alignment algorithm, which is applied to the above-mentioned endangered animal identification system based on a local alignment algorithm. The endangered animal identification method based on a local alignment algorithm includes:
[0019] Obtain the to-be-detected partial mitochondrial DNA sequence of the to-be-detected endangered animal input by the user;
[0020] Use the local alignment algorithm to perform a local alignment between the to-be-detected partial mitochondrial DNA sequence and multiple reference partial mitochondrial DNA sequences in the database to obtain a local alignment result, and determine the species of the to-be-detected endangered animal based on the local alignment result, so as to identify the to-be-detected endangered animal;
[0021] Display the species of the to-be-detected endangered animal and the detailed information of the species of the to-be-detected endangered animal.
[0022] Third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. The processor executes the computer program to implement the above-mentioned endangered animal identification method based on a local alignment algorithm.
[0023] Fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the above-mentioned endangered animal identification method based on a local alignment algorithm.
[0024] Fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the above-mentioned endangered animal identification method based on a local alignment algorithm.
[0025] According to the specific embodiments provided by the present application, the present application has the following technical effects:
[0026] The present application provides an endangered animal identification system, method and related device based on a local alignment algorithm. The database stores multiple reference local mitochondrial DNA sequences and detailed information for each species among multiple species. The database is a domestic database edited by experts, capable of realizing the autonomous management and autonomous editing of the database, improving data security and reliability. The visualization platform module receives the to-be-detected local mitochondrial DNA sequence of the to-be-detected endangered animal input by the user. The local alignment module uses the local alignment algorithm to perform a local alignment between the to-be-detected local mitochondrial DNA sequence and the multiple reference local mitochondrial DNA sequences in the database, obtaining a local alignment result, and determining the species of the to-be-detected endangered animal based on the local alignment result for identifying the to-be-detected endangered animal. The visualization platform module also displays the species of the to-be-detected endangered animal and the detailed information of the species of the to-be-detected endangered animal. By introducing the local alignment algorithm, it is possible to determine the species of the to-be-detected endangered animal through the local alignment of DNA sequences. Compared with global alignment, since there is less content to be aligned, the alignment efficiency can be improved. Because traditional identification methods rely on global alignment with complete DNA sequences in open-source DNA databases, and for the involved species, there are often problems such as serious damage to the test materials and difficulty in extracting DNA sequences, it is impossible to obtain complete mitochondrial DNA sequences and global alignment cannot be performed. By introducing local alignment, the situation where alignment cannot be performed due to damaged test materials and the inability to obtain complete DNA sequences can be avoided, the alignment accuracy can be improved, and it is not necessary to send the samples to a professional identification center, reducing the time cost, further improving the alignment efficiency, and at the same time avoiding further damage to the test materials and further improving the alignment accuracy. The present application can improve the alignment efficiency and alignment accuracy of DNA sequences, and by using a domestic database, it improves data security and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the following-described drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0028] Figure 1 FIG. 1 is a schematic structural diagram of an endangered animal identification system based on a local alignment algorithm provided in Embodiment 1 of the present application.
[0029] Figure 2 FIG. 2 is a schematic diagram of opening the visualization platform module provided in Embodiment 1 of the present application.
[0030] Figure 3 FIG. 3 is a schematic diagram of the visualization platform module provided in Embodiment 1 of the present application.
[0031] Figure 4Schematic diagram for displaying the local comparison result provided in Embodiment 1 of the present application.
[0032] Figure 5 Schematic diagram for displaying the detailed information provided in Embodiment 1 of the present application.
[0033] Figure 6 Schematic flowchart of a method for identifying endangered animals based on a local comparison algorithm provided in Embodiment 2 of the present application.
[0034] Figure 7 Schematic diagram of the structure of a computer device provided in Embodiment 3 of the present application. Detailed implementation manners
[0035] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0036] Embodiment 1
[0037] Faced with a series of challenges, how to quickly and accurately match species information through DNA sequences and build a more secure and accurate database within the public security system to provide a strong scientific basis for case detection has become a difficult problem that needs to be solved in the current investigation of endangered species cases, especially when the case involves transnational smuggling and a huge criminal network. Efficient and accurate DNA matching capabilities are crucial for tracking the criminal chain and locking in criminal suspects. Therefore, this embodiment aims at the many challenges faced by DNA matching of difficult samples in endangered species cases, and intends to use advanced bioinformatics technology and algorithms to build a set of intelligent DNA matching models (i.e., local matching modules). This model will realize accurate species identification of various difficult samples, and at the same time build a species identification DNA matching platform (i.e., an endangered animal identification system based on local matching algorithms) with simpler operation, which can not only ensure operational efficiency and data security, but also make it easy for grassroots police officers to use. With the help of this species identification DNA comparison platform, not only can the speed and accuracy of DNA identification be significantly improved, but also the potential correlation information between different samples can be revealed through detailed information, such as species origin, crime path, etc., to provide a scientific basis for case decision-making and accelerate the case detection process. In addition, the application of this species identification DNA comparison platform will also help to build a more complete endangered species protection database and provide strong support for ecological protection work. More importantly, this species identification DNA comparison platform will be able to meet the needs of public security organs for handling difficult samples, accurately identifying different endangered species, and simple and practical DNA comparison platforms, effectively reducing the work pressure of police officers and improving the efficiency of case detection.
[0038] In order to meet the requirements of efficient and accurate DNA matching in endangered species cases, this embodiment constructs a species identification DNA matching platform based on the Smith-Waterman algorithm. The species identification DNA matching platform is based on the existing DNA mitochondrial sequence database of the Public Security Wildlife Identification Center and is designed with two core modules: one is the local matching module, which focuses on achieving fast and accurate matching of difficult samples with DNA sequences in the database; the other is the visualization platform module, which aims to provide an intuitive and easy-to-use interface to facilitate grassroots police officers to view the matching results and related detailed information.
[0039] Based on this, this embodiment provides an endangered animal identification system based on a local comparison algorithm, such as Figure 1 As shown, the endangered animal identification system based on the local comparison algorithm includes: a visualization platform module, a local comparison module and a database. The database stores multiple reference local mitochondrial DNA sequences and detailed information for each of multiple species. The database is a domestic database edited by experts. The detailed information includes pictures, classification status, protection level, morphological characteristics, common trading categories, common forms of illegal use, value and distribution.
[0040] The visualization platform module is used to receive the partial mitochondrial DNA sequence to be detected of the endangered animal to be detected input by the user (in actual applications, generally the endangered animals often involved in cases).
[0041] The local alignment module is communicatively connected to the visualization platform module and the database respectively. The local alignment module is used to locally align the partial mitochondrial DNA sequence to be detected with multiple reference partial mitochondrial DNA sequences in the database by using a local alignment algorithm, obtain a local alignment result, and determine the species of the endangered animal to be detected based on the local alignment result, so as to identify the endangered animal to be detected.
[0042] The visualization platform module is also used to display the species of the endangered animal to be detected and the detailed information of the species of the endangered animal to be detected.
[0043] Next, the endangered animal identification system based on the local alignment algorithm used in this embodiment will be introduced in detail:
[0044] (1) Database
[0045] The data in the database used in this embodiment is sourced from biological samples identified by the Institute of Forensic Science and Technology of Nanjing Police College. The Institute of Forensic Science and Technology of Nanjing Police College has professional identification qualifications, and resident experts guide the identification. The data source is safe, reliable, has a high accuracy rate, and the data source update speed is fast. There are constantly wild species being identified in the college, which not only enriches the database but also can grasp and predict the trend of smuggling endangered wild species, thus playing a guiding role in the development direction of the endangered animal identification system of this embodiment. Therefore, the data in the database used in this embodiment is edited by domestic experts, has a high data accuracy rate, avoids the problem of unreliable data in foreign databases, and at the same time, this database is a domestic database with the management right in the country, avoiding the problem of insecure data in foreign databases.
[0046] (2) Local alignment module
[0047] Since traditional identification methods rely on global alignment with complete DNA sequences in open-source DNA databases, and endangered species often have problems such as severely damaged biological samples and difficult DNA sequence extraction, it is impossible to obtain complete DNA sequences and global alignment cannot be performed. Therefore, this embodiment selects a local alignment algorithm to overcome this problem. The local alignment algorithm does not depend on complete DNA sequences but focuses on finding similar fragments between two sequences, which makes it more adaptable when dealing with damaged or incomplete DNA samples.
[0048] Local alignment algorithms aim to find similar segments between two sequences rather than aligning the entire sequences. Such algorithms are particularly suitable for processing damaged or incomplete DNA samples and for finding conserved regions in homologous genes. In this embodiment, the local alignment algorithm can be the Smith-Waterman algorithm. In local alignment algorithms, the scoring rules are crucial. Match (matching score) represents the score when two bases are exactly the same, mismatch (mismatch penalty) represents the penalty when two bases are different, and gap (gap penalty) represents the penalty when inserting a space in the local mitochondrial DNA sequence. The selection of these parameters directly affects the alignment result. In this embodiment, the above three parameters are adjusted according to the alignment result of the BLAST tool. When match = 15, mismatch = -15, and gap = -20, the alignment result of the local alignment algorithm is consistent with the alignment result of the BLAST tool. That is, for two sequences, the local alignment algorithm and the BLAST tool are respectively used to calculate the two sequences, and the similarity obtained by the local alignment algorithm and the similarity obtained by the BLAST tool are obtained. If the similarities are different, the three parameters in the local alignment algorithm are adjusted until the similarities are the same. At this time, in this embodiment, the parameters in the Smith-Waterman algorithm are adjusted based on the matching result of the BLAST tool, and the parameters include the score when two bases are exactly the same, the penalty when two bases are different, and the penalty when inserting a space in the local mitochondrial DNA sequence.
[0049] It should be noted that since inserting a space will make the space correspond to a base, a gap penalty is given and no mismatch penalty is given, and spaces do not correspond to each other.
[0050] To facilitate the display of the logic of the local alignment algorithm, two sequences p: ACGTC with a shorter and different length and sequence q: CG are selected for demonstration. A, C, G, and T are all nitrogenous bases, where A is adenine, C is cytosine, G is guanine, and T is thymine.
[0051] First, a substitution scoring matrix is calculated based on the scoring rules. The substitution scoring matrix is shown in Table 1 below.
[0052] Table 1 Substitution Scoring Matrix
[0053]
[0054] Then, the scoring matrix between the two sequences is calculated. During the calculation process, the following three situations need to be considered:
[0055] (1) Diagonal score: It represents the score when q[i] matches or does not match p[j], that is, w(i, j) in the substitution scoring matrix. q[i] represents the i-th character in sequence q, and p[j] represents the j-th character in sequence p.
[0056] (2) Upward score: It represents the score when inserting a space in sequence q, that is, s(i - 1, j) + gap.
[0057] (3) Leftward score: It represents the score when inserting a space in sequence p, that is, s(i, j - 1) + gap.
[0058] Among them, s(i, j) is the score of the maximum similarity between the prefix q[1...i] and p[1...j] obtained according to the substitution scoring matrix, that is, the corresponding value in the scoring matrix, and w(i, j) is the score calculated according to the substitution scoring matrix for the characters q[i] and p[j].
[0059] Finally, the score at each position is the maximum of these three cases.
[0060] Based on the above situation, the local alignment formula is specifically as follows:
[0061]
[0062] Among them, <= represents the less than or equal to sign.
[0063] The Smith-Waterman algorithm will insert spaces at different positions in the two sequences. At this time, there will be multiple
[0064] cases, and each case represents a value of the two sequences after inserting spaces. Based on the above local alignment formula, calculate the scoring matrix for each case. An example of the scoring matrix is shown in Table 2 below.
[0065] Table 2 Scoring Matrix
[0066] 0 1 2 3 4 5 A C G T C 0 0 0 0 0 0 0 1 C 0 0 15 -5 0 15 2 G 0 0 -5 30 10 10
[0067] Finally, backtrack to find the optimal alignment result. Starting from the lower right corner of the scoring matrix, find the position with the highest score. Starting from this position with the highest score, backtrack diagonally to the upper left until encountering a position where the score no longer increases. During the backtracking process, record the alignment path, that is, which characters are matched and which positions have spaces inserted. Backtracking to obtain the optimal alignment result, select the case with the highest score as the local alignment result. At this time, the local alignment result includes the values of the two sequences in this case, and the number of identical bases (that is, bases with the same position and type) of the two sequences and the number of aligned characters participating in the local alignment in each sequence of the two sequences can be further determined. The characters include bases and spaces.
[0068] To determine whether they are of the same species based on the local alignment results, this embodiment introduces the concept of similarity. The similarity calculation formula is as follows:
[0069] Similarity = (Number of identical characters in the aligned sequences / Length of the alignment region) × 100%.
[0070] It should be noted that the length of the alignment region here should refer to the length in the local alignment result, rather than the global alignment length. Since local alignment only focuses on the highly similar local regions in the sequence, the similarity should also be calculated based on the local alignment result. That is, when the local mitochondrial DNA sequence to be detected is locally aligned with each reference local mitochondrial DNA sequence, the length of the alignment region is the number of aligned characters in the local mitochondrial DNA sequence to be detected that participate in the local alignment. When the similarity between the two aligned sequences reaches more than 98%, they can be considered as sequences of the same species.
[0071] At this time, in this embodiment, the local alignment result includes the number of identical bases in the local mitochondrial DNA sequence to be detected and each reference local mitochondrial DNA sequence, and the number of aligned characters in the local mitochondrial DNA sequence to be detected that participate in the local alignment when the local mitochondrial DNA sequence to be detected is locally aligned with each reference local mitochondrial DNA sequence. Characters include bases and spaces. At this time, to determine the species of the endangered animal to be detected based on the local alignment result, it specifically includes: for each reference local mitochondrial DNA sequence, calculate the ratio of the number of identical bases corresponding to this reference local mitochondrial DNA sequence (that is, the number of identical bases in the local mitochondrial DNA sequence to be detected and this reference local mitochondrial DNA sequence) and the number of aligned characters (that is, the number of aligned characters in the local mitochondrial DNA sequence to be detected that participate in the local alignment when the local mitochondrial DNA sequence to be detected is locally aligned with this reference local mitochondrial DNA sequence), to obtain the similarity between the local mitochondrial DNA sequence to be detected and the reference local mitochondrial DNA sequence; select the reference local mitochondrial DNA sequence with the highest similarity to the local mitochondrial DNA sequence to be detected as the target sequence, and use the species corresponding to the target sequence as the species of the endangered animal to be detected. It should be noted that at this time, it is necessary to ensure that the highest similarity is greater than 98%, otherwise, it is considered that there is no species of the endangered animal to be detected in the database.
[0072] Since Python significantly exhibits problems such as slow running speed and large memory consumption when dealing with large amounts of data, especially when executing code involving a large number of matrix calculations, choosing Cython to optimize and accelerate these parts of Numpy matrix calculations has become an effective solution. By combining Python code with C language features, Cython can greatly reduce the overhead of loops and significantly improve computational performance. Accelerating Numpy code with Cython has a significant advantage, that is, only a small number of Cython-specific annotations need to be added to the existing Python project without completely rewriting the code. This method not only retains the flexibility and readability of the Python language itself but also makes the execution efficiency of the code close to that of the C language. Therefore, by introducing Cython, the execution efficiency of large data processing tasks can be significantly improved without sacrificing code readability and development speed.
[0073] At this time, in this embodiment, the local alignment module uses Cython to perform local alignment and similarity calculation, thereby accelerating the local alignment process and similarity calculation process and improving efficiency.
[0074] (III) Visualization platform module
[0075] To ensure the convenience of using the species identification DNA alignment platform and the smooth running of the code, this embodiment chooses to use the Streamlit framework for visualization to clearly and intuitively display the local alignment results and detailed information of related species, facilitating the public security organs to analyze and judge intelligence.
[0076] Streamlit is an open-source framework based on Python, designed specifically to simplify the rapid construction of interactive web applications, especially suitable for data visualization, machine learning model display, and the development of deployable dashboards. It integrates rich functional components such as buttons, charts, text input boxes, file uploaders, etc., enabling users to directly embed these interactive elements in the algorithm code without deeply modifying the Python code file. By simply entering the sequence to be aligned in the text box and clicking the run button, the results can be viewed immediately. This feature greatly reduces the usage threshold of DNA alignment technology, enabling grass-roots police officers without a professional programming background to easily get started and apply it efficiently.
[0077] At this time, in this embodiment, the visualization platform module uses the Streamlit framework.
[0078] Among them, the display interface of the visualization platform module includes an input box, a run button, and a result display box. When the user clicks on the input box, the input box is used for the user to input the local mitochondrial DNA sequence to be detected. When the user clicks on the run button, the run button is used to transmit the local mitochondrial DNA sequence to be detected to the local alignment module and drive the local alignment module to work. The result display box is used to display the species of the endangered animal to be detected and the detailed information of the species of the endangered animal to be detected.
[0079] This embodiment can be deployed on the public network. The real-time data upload and comparison functions greatly improve the case handling efficiency of the public security organs. Through the public network platform, case handlers can upload DNA sample data to the system anytime and anywhere and immediately obtain the comparison results. This instant feedback mechanism enables the public security organs to quickly lock in suspects and greatly shortens the time cycle for solving cases.
[0080] Next, this embodiment further provides an example of a test case and result analysis. To show the test results of the species identification DNA comparison platform, a mitochondrial DNA sequence of the spotted dove was selected for testing.
[0081] First, run the py file in the terminal, as Figure 2 shown. It finds the code and runs the code to open the visualization platform module, as Figure 3 shown. Input the local mitochondrial DNA sequence to be detected for comparison (i.e., the input reference sequence in Figure 3 ), click the button to obtain the sequence from the Excel file and perform the comparison (i.e., the run button), and drive the local alignment module to start working. Figure 4 What is shown is the local alignment result (the vertical lines indicate the same bases, and the number of vertical lines is the number of the same bases. 350 is the number of characters participating in the comparison, and the characters include bases and spaces). Figure 5 What is shown is the detailed information of the species. It can be seen that the display interface can clearly show information such as the species name, picture, and related introduction with the highest matching similarity. At the same time, the local alignment result of the sequence comparison can also be seen. The operation result allows the public security police to intuitively understand the relevant information of this species, guiding the detection ideas and directions, and greatly facilitating the detection process of the public security organs.
[0082] This embodiment focuses on the intelligence information construction in the fields of public security, food and drug, environment, forestry, and customs anti-smuggling. It aims to solve the problem of DNA identification of difficult samples in endangered species cases through the advanced Smith-Waterman local alignment algorithm. The core goal is to use advanced bioinformatics technologies and big data algorithms to build an intelligent DNA alignment model to achieve accurate species identification of various difficult samples. At the same time, a more user-friendly DNA alignment platform for species identification is constructed to reveal the intelligence information hidden in a large amount of difficult sample data, thereby enhancing the leading role of intelligence in public security work. The specific advantages are as follows:
[0083] (1) Starting from public security actual combat
[0084] This embodiment starts from public security actual combat, pays attention to the practicality and pertinence of the model, and constructs a special DNA identification model for the DNA identification problem of difficult samples in endangered species cases to meet the challenges in actual public security work and ensure that the designed model can be truly applied to the front-line public security work.
[0085] (2) Integrated application of Smith-Waterman algorithm and visualization platform
[0086] This embodiment comprehensively uses local alignment algorithms, visualization platforms, and database technologies to improve the accuracy and operational convenience of DNA identification. The model uses the Smith-Waterman local alignment algorithm, which focuses on mining similar fragments between two sequences and is particularly suitable for processing damaged or incomplete DNA samples, thus significantly enhancing the DNA identification ability in such cases. In addition, through the visualization platform module developed based on the Streamlit framework, even non-professional users, such as grass-roots police officers, can easily apply DNA alignment technology, greatly reducing the technical threshold. At the same time, it also helps to build and improve the endangered species protection database, providing strong data support for ecological protection. These innovations together enhance the application value and work efficiency of the DNA alignment platform for species identification in actual law enforcement.
[0087] (3) Secure and accurate data sources
[0088] There are actual risks in foreign databases, such as the inability to guarantee data quality, technological blockade by Western countries, and lack of supervision of the database background. The most commonly used databases for judicial identification in the National Genebank Life Big Data for Species Identification and the National Genomics Data Center, which are domestic authoritative databases, are the B10K and NCBI databases, both of which are foreign databases and not under our country's independent control. Using them will pose certain accuracy risks. However, the databases in this embodiment all come from the biological sample identification of the Criminal Science and Technology College of Nanjing Police College, with secure and reliable sources. By taking control of the data initiative and connecting with public security academies, it can better serve public security actual combat.
[0089] (4) Improve the DNA alignment rate and achieve fast and accurate species identification
[0090] By comprehensively and repeatedly comparing the running speeds of the existing domestic DNA alignment systems with the system independently developed in this embodiment, the excellent performance of the system in this embodiment in DNA alignment can be fully and intuitively demonstrated. Specifically, while maintaining extremely high alignment accuracy, this system has achieved a significant improvement in running speed, thus perfectly highlighting its significant advantages in terms of fast speed and high accuracy. This advantage will not only be reflected in daily detection work, but also play a crucial role at critical moments such as in the detection of urgent cases.
[0091] (5) Can intuitively display the value of species
[0092] This embodiment collects and collates the basic information of most species. After the sequence alignment is completed, it can not only immediately display the local alignment results and the similarity percentage of the species, but also display key information such as the taxonomic status, protection level, morphological characteristics, common trading categories, value, distribution area, etc. of the compared species. This comprehensive display function greatly empowers law enforcement police officers, enabling them to quickly and comprehensively master the basic information and value assessment of the target species, thereby more effectively guiding the investigation direction, formulating protection strategies, and playing a key role in cracking down on illegal trade and maintaining biodiversity.
[0093] Embodiment 2
[0094] This embodiment provides a method for identifying endangered animals based on a local alignment algorithm, which is applied to the system for identifying endangered animals based on a local alignment algorithm described in Embodiment 1, as Figure 6 shown, the method for identifying endangered animals based on a local alignment algorithm includes:
[0095] S1: Obtain the local mitochondrial DNA sequence to be detected of the endangered animal to be detected input by the user.
[0096] S2: Use the local alignment algorithm to perform a local alignment of the local mitochondrial DNA sequence to be detected with multiple reference local mitochondrial DNA sequences in the database to obtain a local alignment result, and determine the species of the endangered animal to be detected based on the local alignment result to identify the endangered animal to be detected.
[0097] S3: Display the species of the endangered animal to be detected and the detailed information of the species of the endangered animal to be detected.
[0098] Embodiment 3
[0099] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as shown in Figure 7 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an endangered animal identification method based on a local alignment algorithm.
[0100] Those skilled in the art can understand that Figure 7 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0101] In an exemplary embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, it implements the endangered animal identification method based on the local alignment algorithm in Embodiment 2.
[0102] Embodiment 4
[0103] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by the processor, it implements the endangered animal identification method based on the local alignment algorithm in Embodiment 2.
[0104] Embodiment 5
[0105] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by the processor, it implements the endangered animal identification method based on the local alignment algorithm in Embodiment 2.
[0106] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0107] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0108] Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. An endangered animal identification system based on a local comparison algorithm, characterized in that: The endangered animal identification system based on the local comparison algorithm includes: a visualization platform module, a local comparison module and a database, wherein the database stores multiple reference local mitochondrial DNA sequences and detailed information of each of multiple species, and the database is a domestic database edited by experts, and the detailed information includes pictures, classification status, protection level, morphological characteristics, common trading categories, common forms of illegal use, value and distribution areas; The visualization platform module is used to receive the local mitochondrial DNA sequence of the endangered animal to be detected input by the user; The local comparison module is respectively connected to the visualization platform module and the database in communication; the local comparison module is used to use a local comparison algorithm to locally compare the local mitochondrial DNA sequence to be detected with a plurality of reference local mitochondrial DNA sequences in the database to obtain a local comparison result, and determine the species of the endangered animal to be detected based on the local comparison result, so as to identify the endangered animal to be detected; The visualization platform module is also used to display the species of the endangered animal to be detected and detailed information of the species of the endangered animal to be detected.
2. The endangered animal identification system based on local comparison algorithm according to claim 1 is characterized in that: The visualization platform module adopts the Streamlit framework.
3. The endangered animal identification system based on local comparison algorithm according to claim 1, characterized in that: The local alignment algorithm is the Smith-Waterman algorithm, and the parameters in the Smith-Waterman algorithm are adjusted based on the matching results of the BLAST tool, and the parameters include the score when two bases are exactly the same, the penalty when two bases are different, and the penalty when a space is inserted in the local mitochondrial DNA sequence.
4. The endangered animal identification system based on local comparison algorithm according to claim 1, characterized in that: The local comparison result includes the number of identical bases between the local mitochondrial DNA sequence to be detected and each reference local mitochondrial DNA sequence and the number of characters participating in the local comparison in the local mitochondrial DNA sequence to be detected when the local mitochondrial DNA sequence to be detected is compared with each reference local mitochondrial DNA sequence. The characters include bases and spaces. At this time, determining the species of the endangered animal to be detected based on the local comparison result specifically includes: For each reference local mitochondrial DNA sequence, the ratio of the number of identical bases corresponding to the reference local mitochondrial DNA sequence to the number of characters involved in the comparison is calculated to obtain the similarity between the local mitochondrial DNA sequence to be detected and the reference local mitochondrial DNA sequence; A reference local mitochondrial DNA sequence having the highest similarity to the local mitochondrial DNA sequence to be detected is selected as a target sequence, and the species corresponding to the target sequence is selected as the species of the endangered animal to be detected.
5. The endangered animal identification system based on local comparison algorithm according to claim 1, characterized in that: The local comparison module uses Cython to perform local comparison and similarity calculation.
6. The endangered animal identification system based on local comparison algorithm according to claim 1, characterized in that: The display interface of the visualization platform module includes an input box, a run button and a result display box. When the user clicks the input box, the input box is used for the user to input the local mitochondrial DNA sequence to be detected; when the user clicks the run button, the run button is used to transmit the local mitochondrial DNA sequence to be detected to the local comparison module and drive the local comparison module to work; the result display box is used to display the species of the endangered animal to be detected and the detailed information of the species of the endangered animal to be detected.
7. A method for identifying endangered animals based on a local comparison algorithm, applied to the endangered animal identification system based on a local comparison algorithm as claimed in any one of claims 1 to 6, characterized in that: The endangered animal identification method based on the local comparison algorithm includes: Obtaining the local mitochondrial DNA sequence of the endangered animal to be detected input by the user; Using a local comparison algorithm to locally compare the local mitochondrial DNA sequence to be detected with a plurality of reference local mitochondrial DNA sequences in a database to obtain a local comparison result, and determining the species of the endangered animal to be detected based on the local comparison result to identify the endangered animal to be detected; The species of the endangered animal to be detected and detailed information of the species of the endangered animal to be detected are displayed.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the endangered animal identification method based on the local comparison algorithm described in claim 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the endangered animal identification method based on the local comparison algorithm described in claim 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the endangered animal identification method based on the local comparison algorithm described in claim 7 is implemented.
Citation Information
Cited By
Rare and endangered species DNA bar code encryption storage reasoning method and system
CN120452560A
A rare and endangered species DNA barcode encryption storage inference method and system
CN120452560B