Construction of animal drug information database and management system
By classifying and merging the animal drug information database, and using the similarity and access frequency of tag information for partial backup, the problems of low backup efficiency and high resource occupation caused by large database data in the existing technology are solved, and more efficient backup and lower system load.
Patent Information
- Application Number
- CN202410504167.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-04-25
AI Technical Summary
In the prior art, due to the large amount of data, the storage space occupied by the backup data increases, the backup cost is high, the backup efficiency is low, and the system resource is too much, resulting in excessive database load.
By classifying and merging animal medicine information in the database, using the similarity and access frequency of tag information, selecting information with high access volume for merging, reducing the total number of Chinese characters in the backup data, using some data backup methods to merge similar information to reduce the number of similar information Backup the required memory.
It effectively reduces the cost of backup data, improves backup efficiency, reduces the load of the database, and reduces the use of system resources.
Smart Images

Figure CN118394572B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data management, and in particular to the construction and management system of animal drug information database. Background Art
[0002] Animal drug information is a traditional form of medicine that uses animal parts or extracts as the main ingredients in its preparation process; for example, deer antlers, snake gall, cordyceps, and seahorses; at the same time, there are also multiple data types in animal drug information, and there may be correlations between different data; for example, the correlation of drug action mechanisms, the correlation of safety and efficacy data, etc.
[0003] Database management and construction refers to the process of designing, creating, maintaining and optimizing the database system. For massive and confidential data, the database will back up the data in the database while storing it to protect data security and ensure normal data access when the server is down.
[0004] In the prior art, with the continuous development of animal medical technology, more and more animal drug-related data are stored in the databases of various animal medical institutions. In order to protect the data security of the database and meet the normal access to the database when the server is down, the database often performs a full backup of the data in the database. However, due to the large amount of data in the database, the backup data occupies a larger storage space, which increases the cost of data backup. In addition, the more data in the database, the slower the backup efficiency, which makes the data backup occupy more system resources, resulting in an increasing load on the database. Summary of the invention
[0005] The purpose of the present invention is to provide an animal drug information database construction and management system to solve the following technical problems.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] Animal drug information database construction and management system, including the following modules:
[0008] Database module: including an input terminal and an access terminal; the input terminal includes a plurality of tags, and the user inputs information in each tag through the input terminal, and the information in each tag constitutes an animal drug information;
[0009] The access terminal is used for users to access animal drug information and record the number of accesses;
[0010] Classification module: obtain the total number of tags N, and record the information in the tags as tag information; obtain all animal drug information with the number of tag information similar between each other greater than or equal to N / 2, and record them as one category of information; select the animal drug information with a visit volume exceeding a preset threshold from each category of information, and record them as the information to be merged of each category of information; the visit volume is the number of times the animal drug information is visited;
[0011] Merging module: in any type of information to be merged, obtain the total number of Chinese characters in the label information similar to the animal drug information and the other animal drug information, select the animal drug information with the total number of Chinese characters exceeding the preset number, and record it as the parent information; record the other animal drug information as child information, and associate the child information with the parent information with the largest number of similar label information;
[0012] Number the child information associated with the parent information, obtain the label information in the child information that is not similar to the parent information, and record it as non-similar label information; sequentially merge the non-similar label information of the child information together with the number of the child information into the corresponding label of the parent information;
[0013] Backup module: back up all parent information that has been merged to obtain backup data; when the user accesses the backup data, separate all child information from the merged parent information.
[0014] As a further solution of the present invention: when there are animal drug information and multiple types of information whose label information is similar in number or more than N / 2, the animal drug information and the information with the largest number of label information similar in number are recorded as one type.
[0015] As a further solution of the present invention: the process of determining that the tag information is similar includes:
[0016] Setting a similarity threshold; when there are two tag information, using a natural language processing tool to extract the nouns in the tag information, extracting the remaining Chinese characters in the tag information to obtain text, extracting the feature vector of the text, and finally obtaining the text vectors of the two tag information;
[0017] Determine whether the nouns of the two label information are the same. If not, record the two label information as dissimilar; if the same, obtain the cosine value of the angle between the two text vectors and record it as the semantic similarity; when the semantic similarity is greater than or equal to the similarity threshold, record the two label information as similar; otherwise, record the two label information as dissimilar.
[0018] As a further solution of the present invention: the process of setting the preset threshold includes:
[0019] Let the preset threshold be Va, and obtain the average number of visits to each type of information V 均 , then the preset threshold Wherein β is a preset coefficient, and β>1.
[0020] As a further solution of the present invention: the process of obtaining the average page views includes:
[0021] In a category of information, obtain the number of visits V for each animal drug information and obtain the average number of visits for this category of information Where n is the number of animal drug information, V i Indicates the number of visits to the animal drug information with number i.
[0022] As a further solution of the present invention: the process of setting the preset number includes:
[0023] The number of similar Chinese characters in the label information of two similar animal drug information is {Tn 1 , Tn 2 , ..., Tn m}, where Tn m represents the number of Chinese characters in the label information numbered m, where m is the total number of similar label information; then the total number of Chinese characters in similar labels between two animal drug information
[0024] For any piece of animal drug information, obtain the total number of Chinese characters Tn of the animal drug information and other animal drug information in turn. 总 , get the total number of Chinese characters of the animal drug information Where Tn 总j Indicates the total number of Chinese characters between the animal drug information and the remaining animal drug information numbered j, where J is the total number of the remaining animal drug information;
[0025] Let the preset number be T, then Where Tn 累a It represents the total number of Chinese characters in the information to be merged with number a, λ is a preset coefficient and λ>1.
[0026] As a further solution of the present invention: the process of merging the child information into the corresponding tag of the parent information includes:
[0027] Number each sub-information as k, where k∈{1,2,...,K}, where K is the total number of sub-information associated with the parent information, and add the number 0 before the label information of the parent information;
[0028] Obtain non-similar label information in the child information, add the number k of the child information before the non-similar label information to obtain the child label information; add the child label information to the end of the label information in the corresponding label of the parent information; obtain the child information numbered k+1, continue the above merging steps, and so on, until all the child information is merged.
[0029] As a further solution of the present invention: the process of separating the child information from the parent information includes:
[0030] Obtain tag information numbered k in the tag, and for a tag that does not contain tag information numbered k, obtain tag information numbered 0 in the tag; remove the numbers from the obtained tag information numbered 0 and the tag information numbered k to obtain an animal drug information; and so on, separate the child information numbered k+1 from the parent information until all the child information is separated;
[0031] The label information numbered 0 is obtained in the label, and after removing the number, each label information constitutes one piece of animal drug information.
[0032] Beneficial effects of the present invention:
[0033] In the prior art, the database often backs up the data in the database in full; however, as the amount of data in the database increases, the backup data occupies more storage space, increasing the cost of data backup; in addition, the more data in the database, the slower the backup efficiency, resulting in more system resources occupied during data backup, causing the database load to increase; compared with the prior art, the present invention is a new type of partial data backup method; when the user enters animal drug information into the database, different tags correspond to fields in the database, and each piece of information is stored in the field, and the tag information in each tag constitutes the animal drug information; according to the number of similar tag information between the animal drug information, each animal drug information is classified to obtain several categories Information; selecting animal medicine information whose access volume exceeds a preset threshold from various types of information, and recording it as information to be merged; the information to be merged is the animal medicine information that is most frequently accessed among various types of information, that is, the animal medicine information that is used most frequently by users; in various types of information to be merged, select several parent information according to the total number of Chinese characters in similar tag information, and merge the non-similar tag information of the child information together with the number of the child information into the corresponding tag of the parent information in turn; in order to reduce the memory required for backup, the more total number of Chinese characters the parent information has, the greater the reduction in memory; back up all the parent information that has been merged to obtain backup data; it is beneficial to reduce the cost of backup data, improve backup efficiency, and reduce the load on the database. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The present invention will be further described below in conjunction with the accompanying drawings.
[0035] Figure 1 It is a structural schematic diagram of the animal drug information database construction and management system of the present invention. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] See also Figure 1 As shown, the present invention is an animal drug information database construction and management system, including the following modules:
[0038] Database module: including an input terminal and an access terminal; the input terminal includes a plurality of tags, and the user inputs information in each tag through the input terminal, and the information in each tag constitutes an animal drug information;
[0039] The access terminal is used for users to access animal drug information and record the number of accesses;
[0040] It should be further explained that the label includes the name, mechanism of action, drug composition and clinical application; in the database, each label corresponds to each field, the information in the label is stored in the corresponding field of the database, and the data in each field constitutes an animal drug information;
[0041] Classification module: obtain the total number of tags N, and record the information in the tags as tag information; obtain all animal drug information with the number of tag information similar between each other greater than or equal to N / 2, and record them as one category of information; select the animal drug information with a visit volume exceeding a preset threshold from each category of information, and record them as the information to be merged of each category of information; the visit volume is the number of times the animal drug information is visited;
[0042] It is understandable that the animal drug information is classified according to the similarity of the information in each tag, and the animal drug information with a visit volume exceeding a threshold value in each type of information is obtained; the higher the visit volume of the animal drug information, the more times the user uses it, so when partially backing up the database, the animal drug information with a higher visit volume in the database is selected for backup, which helps to ensure the normal use of users when the database server is in a downtime state;
[0043] The process of determining that the tag information is similar includes:
[0044] Setting a similarity threshold; when there are two tag information, using a natural language processing tool to extract the nouns in the tag information, extracting the remaining Chinese characters in the tag information to obtain text, extracting the feature vector of the text, and finally obtaining the text vectors of the two tag information;
[0045] Determine whether the nouns of the two tag information are the same. If not, the two tag information are recorded as being dissimilar. If they are the same, obtain the cosine value of the angle between the two text vectors and record it as the semantic similarity. When the semantic similarity is greater than or equal to the similarity threshold, the two tag information are recorded as being similar. Otherwise, the two tag information are recorded as being dissimilar.
[0046] It should be further explained that the natural language processing tool is a computer program for analyzing and understanding human language. The process of analyzing the semantic similarity between two label information by the natural language processing tool includes: preprocessing the text, including removing noise, correcting spelling errors, and converting to lowercase; and performing word segmentation to decompose sentences into words or phrases; converting the text into vector form to obtain text vectors for computer understanding and processing. Common methods include bag-of-words model, TF-IDF algorithm and Word2Vec; using deep learning or machine learning algorithms to train models for understanding the semantics and context of language. Common models include convolutional neural networks (CNN), recurrent neural networks (RNN) and Transformer; calculating the semantic similarity of two label information by comparing the cosine value of the angle between two text vectors;
[0047] When the number of label information similar to that of animal drug information and multiple categories of information is greater than or equal to N / 2, the animal drug information and the information with the largest number of label information similar to it are recorded as one category;
[0048] It is worth noting that, for animal drug information whose number of label information similar to any category of information is less than N / 2, the animal drug information is treated as a separate category;
[0049] The process of setting the preset threshold includes:
[0050] Let the preset threshold be Va, and obtain the average number of visits to each type of information V 均 , then the preset threshold Where β is the preset coefficient, and β>1;
[0051] The process of obtaining the average page views includes:
[0052] In a category of information, obtain the number of visits V for each animal drug information and obtain the average number of visits for this category of information Where n is the number of animal drug information, V i Indicates the number of visits to the animal drug information numbered i;
[0053] It should be further explained that the preset threshold is used to filter out animal drug information with relatively high access volume from various types of information, that is, animal drug information with higher usage frequency; the preset coefficient β is set according to the size of the backup space. The larger the memory of the backup space, the larger the value of β, the smaller the preset threshold, and the greater the number of information to be merged in one type of information; the preset threshold also depends on the average access volume of all animal drug information in this type of information. The higher the average access volume, the higher the preset threshold is set; on the contrary, the lower the average access volume, the lower the preset threshold is set; in addition, in order to ensure that the setting result of the preset threshold is a positive integer, Add a ceiling symbol to ;
[0054] Merging module: in any type of information to be merged, obtain the total number of Chinese characters in the label information similar to the animal drug information and the other animal drug information, select the animal drug information with the total number of Chinese characters exceeding the preset number, and record it as the parent information; record the other animal drug information as child information, and associate the child information with the parent information with the largest number of similar label information;
[0055] Number the child information associated with the parent information, obtain the label information in the child information that is not similar to the parent information, and record it as non-similar label information; sequentially merge the non-similar label information of the child information together with the number of the child information into the corresponding label of the parent information;
[0056] The process of setting the preset number includes:
[0057] The number of similar Chinese characters in the label information of two similar animal drug information is {Tn 1 , Tn 2 , ..., Tn m}, where Tn m represents the number of Chinese characters in the label information numbered m, where m is the total number of similar label information; then the total number of Chinese characters in similar labels between two animal drug information
[0058] For any piece of animal drug information, obtain the total number of Chinese characters Tn of the animal drug information and other animal drug information in turn. 总 , get the total number of Chinese characters of the animal drug information Where Tn 总j Indicates the total number of Chinese characters between the animal drug information and the remaining animal drug information numbered j, where J is the total number of the remaining animal drug information;
[0059] Let the preset number be T, then Where Tn 累a Indicates the total number of Chinese characters of the information to be merged with number a, λ is a preset coefficient and λ>1;
[0060] It should be further explained that, in order to reduce the memory required for backup, the more Chinese characters the parent information has, the more memory is reduced; the preset number determines the number of parent information selected in the information to be merged, and the preset number depends on the average value of the total number of Chinese characters in all the information to be merged. The larger the average value, the higher the preset number is set;
[0061] The process of merging the child information into the corresponding tag of the parent information includes:
[0062] Number each sub-information as k, where k∈{1,2,...,K}, where K is the total number of sub-information associated with the parent information, and add the number 0 before the label information of the parent information;
[0063] Obtain non-similar tag information in the child information, add the number k of the child information before the non-similar tag information to obtain the child tag information; add the child tag information to the end of the tag information in the tag corresponding to the parent information; obtain the child information numbered k+1, continue the above merging steps, and so on, until all the child information is merged;
[0064] It can be understood that the merging method reduces the backup of similar tag information and reduces the memory required for the backup. The more Chinese characters the parent information has, the greater the memory reduction.
[0065] Backup module: backs up all parent information that has been merged to obtain backup data; when the user accesses the backup data, all child information is separated from the merged parent information;
[0066] The process of separating the child information from the parent information includes:
[0067] Obtain tag information numbered k in the tag, and for a tag that does not contain tag information numbered k, obtain tag information numbered 0 in the tag; remove the numbers from the obtained tag information numbered 0 and the tag information numbered k to obtain an animal drug information; and so on, separate the child information numbered k+1 from the parent information until all the child information is separated;
[0068] Obtain the label information numbered 0 in the label, and after removing the number, form one piece of animal drug information from each label information;
[0069] It is worth noting that for animal drug information that does not have label information on the label, the label information on the label should be recorded as "None".
[0070] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. Construction and management system of animal drug information database, characterized in that: Includes the following modules: Database module: including an input terminal and an access terminal; the input terminal includes a plurality of tags, and the user inputs information in each tag through the input terminal, and the information in each tag constitutes an animal drug information; The access terminal is used for users to access animal drug information and record the number of accesses; Classification module: obtain the total number of tags N, and record the information in the tags as tag information; obtain all animal drug information with the number of tag information similar between each other greater than or equal to N / 2, and record them as one category of information; select the animal drug information with a visit volume exceeding a preset threshold from each category of information, and record them as the information to be merged of each category of information; the visit volume is the number of times the animal drug information is visited; Merging module: in any type of information to be merged, obtain the total number of Chinese characters in the label information similar to the animal drug information and the other animal drug information, select the animal drug information with the total number of Chinese characters exceeding the preset number, and record it as the parent information; record the other animal drug information as child information, and associate the child information with the parent information with the largest number of similar label information; Number the child information associated with the parent information, obtain the label information in the child information that is not similar to the parent information, and record it as non-similar label information; sequentially merge the non-similar label information of the child information together with the number of the child information into the corresponding label of the parent information; Backup module: back up all parent information that has been merged to obtain backup data; when the user accesses the backup data, separate all child information from the merged parent information.
2. The animal drug information database construction and management system according to claim 1, characterized in that: The process of determining that the tag information is similar includes: Setting a similarity threshold; when there are two tag information, using a natural language processing tool to extract the nouns in the tag information, extracting the remaining Chinese characters in the tag information to obtain text, extracting the feature vector of the text, and finally obtaining the text vectors of the two tag information; Determine whether the nouns of the two label information are the same. If not, record the two label information as dissimilar; if the same, obtain the cosine value of the angle between the two text vectors and record it as the semantic similarity; when the semantic similarity is greater than or equal to the similarity threshold, record the two label information as similar; otherwise, record the two label information as dissimilar.
3. The animal drug information database construction and management system according to claim 2, characterized in that: When the number of animal drug information and label information similar to multiple categories of information is greater than or equal to N / 2, the animal drug information and the information with the largest number of label information similar to it are classified as one category.
4. The animal drug information database construction and management system according to claim 1, characterized in that: The process of setting the preset threshold includes: Let the preset threshold be Va, and obtain the average number of visits to each type of information V 均 , then a preset threshold is set, where β is a preset coefficient and β>1.
5. The animal drug information database construction and management system according to claim 4, characterized in that: The process of obtaining the average page views includes: In a category of information, obtain the number of visits V of each animal drug information and obtain the average number of visits of this category of information, where n is the number of animal drug information and V i Indicates the number of visits to the animal drug information with number i.
6. The animal drug information database construction and management system according to claim 1, characterized in that: The process of setting the preset number includes: The number of similar Chinese characters in each similar label information between two animal drug information is {Tn1, Tn2, ..., Tn m }, where Tn m Indicates the number of Chinese characters in the label information numbered m, where m is the total number of similar label information; then the total number of Chinese characters in similar labels between two animal drug information; For any piece of animal drug information, the total number of Chinese characters Tn in similar tags between the animal drug information and other animal drug information is obtained in sequence. 总 , get the total number of Chinese characters in similar labels between the animal drug information and other animal drug information, where Tn 总j Indicates the total number of Chinese characters in similar tags between the animal drug information and the other animal drug information numbered j, where J is the total number of other animal drug information; Let the preset number be T, then, where Tn 累a It represents the total number of Chinese characters in the information to be merged with number a, λ is a preset coefficient and λ>1.
7. The animal drug information database construction and management system according to claim 1, characterized in that: The process of merging the child information into the corresponding tag of the parent information includes: Number each sub-information as k, where k∈{1,2,...,K}, where K is the total number of sub-information associated with the parent information, and add the number 0 before the label information of the parent information; Obtain non-similar label information in the child information, add the number k of the child information before the non-similar label information to obtain the child label information; add the child label information to the end of the label information in the corresponding label of the parent information; obtain the child information numbered k+1, continue the above merging steps, and so on, until all the child information is merged.
8. The animal drug information database construction and management system according to claim 1, characterized in that: The process of separating the child information from the parent information includes: Obtain tag information numbered k in the tag, and for a tag that does not contain tag information numbered k, obtain tag information numbered 0 in the tag; remove the numbers from the obtained tag information numbered 0 and the tag information numbered k to obtain an animal drug information; and so on, separate the child information numbered k+1 from the parent information until all the child information is separated; The label information numbered 0 is obtained in the label, and after removing the number, each label information constitutes one piece of animal drug information.
Citation Information
Patent Citations
Method and system for saving storage space of database
CN101650717A
Text-based label system construction method and device
CN110929513A