A data processing method for drug database
By considering the cluster characteristics of the data in the drug database, calculating the reference weights and combining the LOF algorithm, the accuracy of abnormal data detection in the drug database is solved, and more efficient abnormal data screening is achieved.
Patent Information
- Application Number
- CN202411657862.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-20
AI Technical Summary
In the prior art, when detecting abnormal data in drug databases, the cluster characteristics of the data cannot be effectively considered, resulting in abnormal misjudgment.
By obtaining the drug data set and its preset neighborhood data, clustering to form clustering clusters, and calculating the reference weights of each neighborhood data based on the clustering cluster characteristics, combining the LOF algorithm to calculate the local reachable density, and perform abnormal detection.
It improves the accuracy of abnormal data detection in drug databases, reduces abnormal misjudgment, and ensures the effectiveness of the data.
Smart Images

Figure CN119166626B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and more specifically, to a data processing method for a drug database. Background Art
[0002] Drug data in drug databases are usually entered manually or by QR code recognition. Errors may occur in both QR code recognition and manual entry. In order to prevent such errors from affecting subsequent links, abnormal data in drug databases need to be screened out.
[0003] Drug data is generally distributed in clusters. For example, the drug data of multiple drugs for treating the same disease have similar characteristics, so the data of multiple drugs for treating the same disease will be distributed in the same cluster. Since there is erroneous information in the abnormal data, the similarity between the abnormal data and other data in the cluster to which it belongs is reduced, thus showing characteristics that deviate from the cluster to which it belongs.
[0004] The Local Outlier Factor (LOF) algorithm reflects the degree of abnormality of the data based on the deviation of the data density in the neighborhood where the data is located from the data density of other data in the neighborhood when performing anomaly detection. When calculating the data density, the algorithm uses the average distance between the data and each data in the neighborhood to reflect the data density. This calculation method does not take into account the cluster characteristics of the data. For example, when the data is at the edge of the cluster, the neighborhood of the data contains multiple types of data. Since the distance between the data and other clusters is large, the data density calculated by the average distance between the data and the data in the neighborhood should be small. The data density calculated in this way can easily determine the data as abnormal data. In fact, the data does not deviate significantly from the cluster to which it belongs, so the data is not abnormal data. Using the traditional LOF algorithm for anomaly detection, it is easy to misjudge anomalies. Therefore, how to achieve accurate anomaly detection by considering the cluster characteristics of the data has become the research focus of the present invention.
[0005] The patent application document with publication number CN115292385A discloses a personalized customized order anomaly detection system based on the LOF algorithm. The patent application document only uses the LOF algorithm for anomaly detection without considering the cluster characteristics of the data. Therefore, the method in the patent application document is not suitable for solving the problem in the present invention. Summary of the invention
[0006] In order to solve the problem of how to achieve accurate anomaly detection by considering the cluster characteristics of data, the present invention proposes a data processing method for a drug database, which includes the following steps:
[0007] Acquire a drug data set, wherein the drug data set includes a plurality of drug data;
[0008] Obtaining preset neighborhood data of any drug data; clustering the neighborhood data into a number of clusters;
[0009] Calculate the reference weight of each neighborhood data , , record the direction of the connection between the neighborhood data and the drug data as the reference direction. If the neighborhood data and the drug data belong to the same cluster, represents the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the nearest cluster in the reference direction, represents the mean distance of the projection points of the data in the cluster to which the neighborhood data belongs in the reference direction, represents the neighborhood data, Indicates the cluster to which the drug data belongs; if the neighborhood data and the drug data do not belong to the same cluster, represents the mean distance of the projection points of the data in the cluster to which the neighborhood data belongs in the reference direction, It represents the mean distance between the projection points of the data in the cluster to which the drug data belongs in the reference direction of the neighborhood data and the drug data. Indicates the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the cluster to which the drug data belongs in the reference direction;
[0010] The reference weight of each neighborhood data is used as the weight, and the LOF algorithm is used to calculate the local reachable density of the drug data; based on the local reachable density, the LOF algorithm is used to perform anomaly detection to remove abnormal data in the drug database.
[0011] The present invention realizes anomaly detection of each drug data by analyzing the difference between the data density of each drug data and the data density of the neighborhood data; further, when calculating the data density of each drug data, different reference weights are set for each neighborhood data according to the degree to which each neighborhood data belongs to the same category as the drug data, so that the neighborhood data that belongs to the same category to a greater extent as the drug data contributes more to the calculation of the local reachable density, and the neighborhood data that belongs to the same category to a lesser extent as the drug data contributes less to the calculation of the local reachable density, thereby improving the accuracy of the local reachable density calculation; further, when calculating the reference weight, the neighborhood data and the drug data are considered separately according to whether they belong to the same cluster, so as to more accurately measure whether the neighborhood data and the drug data belong to the same category; further, when calculating the reference weight, the degree to which the neighborhood data and the drug data belong to the same category is accurately reflected by introducing information such as the data distance within the cluster and the data distance between the clusters, thereby providing a basis for the subsequent accurate calculation of the local reachable density.
[0012] Preferably, clustering the neighborhood data into a plurality of clusters includes:
[0013] Obtain density reference data of each neighborhood data, and calculate the distribution density of each neighborhood data according to the density reference data;
[0014] Take any neighborhood data as clustering starting point data, and take the neighborhood data whose distribution density difference with the clustering starting point data is less than a preset density threshold and which has an intersection with the density reference data of the clustering starting point data as the same cluster cluster data of the clustering starting point;
[0015] Obtain the same clustering cluster data of each data in the clustering cluster of the clustering starting point data, and so on, until there is no new data as the same clustering cluster data of the clustering starting point data;
[0016] Any neighboring data of the same cluster cluster data that does not belong to the cluster starting point data is used as new cluster starting point data to obtain the same cluster cluster data of the new cluster starting point data; until all data have their corresponding cluster clusters.
[0017] The present invention clusters the data according to the similarity of the distribution density of the data. This clustering method does not have any clustering parameters that have a significant impact on the clustering results. This clustering method does not require a long parameter adjustment process, so the clustering efficiency of this clustering method is relatively high.
[0018] Preferably, the step of obtaining density reference data of each neighborhood data includes:
[0019] Any neighborhood data is recorded as analysis data, the distance between the analysis data and other neighborhood data is obtained, the distances between the analysis data and all other neighborhood data are arranged in ascending order to obtain a distance sequence, and the neighborhood data before the first mutation in the distance sequence is used as the density reference data of the analysis data.
[0020] The present invention obtains density reference data of analysis data through distance mutation. The cluster reference data obtained in this way has similar distribution characteristics to the analysis data. Therefore, the distribution density calculated based on the cluster reference data more accurately reflects the distribution characteristics of the analysis data.
[0021] Preferably, the method for determining the mutation comprises:
[0022] The difference between each distance in the distance sequence and the previous distance is calculated. If the difference is greater than F times the average of the previous differences, it is determined that there is a sudden change in the distance corresponding to the difference, where F represents a preset proportionality coefficient.
[0023] Preferably, the step of calculating the distribution density of each neighborhood data according to the density reference data includes:
[0024] The distance between the neighborhood data and each density reference data is calculated, and the distribution density of the neighborhood data is obtained by taking the inverse of the mean of the distance between the neighborhood data and the density reference data.
[0025] Preferably, the method of calculating the local reachable density of the drug data using the reference weight of each neighborhood data as the weight and using the LOF algorithm includes:
[0026] The distance between the drug data and each neighboring data is calculated, and the reference weight of each neighboring data is used as the weight. The weighted sum of the distance between the drug data and each neighboring data is taken, and the inverse is taken to obtain the local reachable density of the drug data.
[0027] The present invention sets different weights for neighborhood data so that when calculating the local reachable density, the drug data can refer more to the relative distance information of the neighborhood data that belongs to a larger degree in the same category as the drug data, and refer less to the relative distance information of the neighborhood data that belongs to a smaller degree in the same category as the drug data, thereby improving the accuracy of the local reachable density calculation.
[0028] Preferably, the anomaly detection using the LOF algorithm based on the local reachable density includes:
[0029] The reference weight of each neighborhood data is taken as the weight, and the local reachable density of all neighborhood data is weightedly summed to obtain the reference local reachable density. If the local reachable density of the drug data is less than R times the reference local reachable density, it is determined that the drug data is abnormal, and R represents the preset adjustment coefficient.
[0030] The present invention sets different weights for neighborhood data so that when performing anomaly detection on drug data, more reference is made to the distribution density of neighborhood data that is more in the same category as the drug data, and less reference is made to neighborhood data that is less in the same category as the drug data, thereby achieving more accurate anomaly detection.
[0031] Preferably, the step of obtaining preset neighborhood data of any drug data includes:
[0032] A preset number of drug data closest to the drug data are used as neighborhood data of the drug data.
[0033] The present invention has the following beneficial effects:
[0034] The present invention realizes abnormal detection of each drug data by analyzing the difference between the data density of each drug data and the data density of the neighboring data;
[0035] Furthermore, when calculating the data density of each drug data, different reference weights are set for each neighborhood data according to the degree to which each neighborhood data belongs to the same category as the drug data, so that the neighborhood data that belongs to the same category to a greater extent as the drug data contributes more to the calculation of the local reachable density, and the neighborhood data that belongs to the same category to a lesser extent as the drug data contributes less to the calculation of the local reachable density, thereby improving the accuracy of the calculation of the local reachable density;
[0036] Furthermore, when calculating the reference weight, the neighborhood data and the drug data are considered separately according to whether they belong to the same cluster, so as to more accurately measure whether the neighborhood data and the drug data belong to the same category;
[0037] Furthermore, when calculating the reference weight, the degree to which the neighborhood data and the drug data belong to the same category is accurately reflected by introducing information such as the data distance within the cluster and the data distance between clusters, thereby providing a basis for the subsequent accurate calculation of the local reachable density. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0039] Figure 1 The present invention is a flowchart of a method for processing data in a pharmaceutical database according to an embodiment of the present invention. DETAILED DESCRIPTION
[0040] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.
[0041] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0042] See also Figure 1 , which shows a flow chart of a data processing method for a drug database provided by an embodiment of the present invention, the method comprising the following steps:
[0043] S1: Obtain a drug data set, where the drug data set includes a number of drug data.
[0044] Specifically, all drug data are obtained from the drug database, and the text information in the drug data is converted into data information using the Word2Vec algorithm, and the set of all converted drug data is recorded as the drug data set. Each drug data records the drug information of each drug. The drug information includes but is not limited to the following aspects: drug name, drug ingredients, drug use, drug contraindications, and drug storage method.
[0045] S2: Obtain preset neighborhood data of any drug data; cluster the neighborhood data into a number of clusters.
[0046] S20: Obtain preset neighborhood data of any drug data.
[0047] Preferably, as an example, obtaining preset neighborhood data of any drug data includes:
[0048] The preset number of drug data closest to the drug data is used as the neighborhood data of the drug data. This embodiment is described by taking 20 as an example of the preset number, and other embodiments may take other values, which are not specifically limited in this embodiment.
[0049] S21: Cluster the neighborhood data into several clusters.
[0050] Optionally, as an example, the neighborhood data is clustered into several clusters, including:
[0051] The DBSCAN clustering algorithm is used to cluster the neighborhood data of the drug data to obtain several clusters.
[0052] It should be noted that the DBSCAN algorithm determines whether other data and a piece of data belong to the same category based on whether the other data is in the neighborhood of the data. This clustering method relies heavily on the setting of neighborhood parameters. However, neighborhood parameters generally require a long time to adjust in order to obtain them. Therefore, it takes a long time to perform clustering using this clustering method.
[0053] Preferably, as an example, the neighborhood data is clustered into several clusters, including:
[0054] Obtain density reference data of each neighborhood data, and calculate the distribution density of each neighborhood data according to the density reference data;
[0055] Take any neighborhood data as clustering starting point data, and take the neighborhood data whose distribution density difference with the clustering starting point data is less than a preset density threshold and which has an intersection with the density reference data of the clustering starting point data as the same cluster cluster data of the clustering starting point;
[0056] Obtain the same clustering cluster data of each data in the clustering cluster of the clustering starting point data, and so on, until there is no new data as the same clustering cluster data of the clustering starting point data;
[0057] Any neighboring data of the same cluster cluster data that does not belong to the cluster starting point data is used as the new cluster starting point data to obtain the same cluster cluster data of the new cluster starting point data; until all data have their corresponding cluster clusters. In this embodiment, the distribution density of the cluster starting points is G times as the preset density threshold, and other embodiments can use other values as the preset density threshold, which is not specifically limited in this embodiment. G represents the preset multiple adjustment coefficient. This embodiment takes G as 0.5 as an example for description, and other embodiments can use other values, which is not specifically limited in this embodiment.
[0058] It is understandable that data belonging to the same cluster have similar data distribution density, so accurate clustering processing can be achieved through the similarity of data distribution density. At the same time, this clustering method does not have clustering parameters that particularly affect clustering accuracy, and there will not be a long parameter adjustment process, so the clustering efficiency of this clustering method is relatively high.
[0059] It should be added that, among others, obtaining density reference data of each neighborhood data includes:
[0060] Record any neighborhood data as analysis data, obtain the distance between the analysis data and other neighborhood data, arrange the distances between the analysis data and all other neighborhood data in ascending order to obtain a distance sequence, calculate the difference between each distance in the distance sequence and the previous distance, and if the difference is greater than F times the mean of the previous differences, then it is determined that there is a mutation in the distance corresponding to the difference, and F represents a preset proportional coefficient. This embodiment is described by taking F as 1.5 as an example, and other embodiments may take other values, which are not specifically limited in this embodiment. The neighborhood data before the first mutation in the distance sequence is used as the density reference data for the analysis data.
[0061] It is understandable that the distribution density of the calculated data mainly reflects the distribution characteristics of the data, and the distribution characteristics of the data need to be reflected by the distance relationship between the data and the surrounding data. The selection of reference data will affect the accuracy of the calculation of the distribution density. The calculation of the distribution density should refer to the surrounding data with similar distribution characteristics. The data with similar distribution characteristics should have a similar distance relationship, so the present embodiment screens out the surrounding data of similar distances through the mutation characteristics of the distance. The reference data obtained in this way can more accurately reflect the distribution density of the data.
[0062] In addition, the distribution density of each neighborhood data is calculated based on the density reference data, including:
[0063] The distance between the neighborhood data and each density reference data is calculated, and the distribution density of the neighborhood data is obtained by taking the inverse of the mean of the distance between the neighborhood data and the density reference data.
[0064] S3: Calculate the reference weight of each neighborhood data.
[0065] Preferably, as an example, calculating the reference weight of each neighborhood data includes:
[0066]
[0067] The direction of the connection between the neighborhood data and the drug data is recorded as the reference direction. If the neighborhood data and the drug data belong to the same cluster, represents the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the nearest cluster in the reference direction, represents the mean distance of the projection points of the data in the cluster to which the neighborhood data belongs in the reference direction, represents the neighborhood data, Indicates the cluster to which the drug data belongs; if the neighborhood data and the drug data do not belong to the same cluster, represents the mean distance of the projection points of the data in the cluster to which the neighborhood data belongs in the reference direction, It represents the mean distance between the projection points of the data in the cluster to which the drug data belongs in the reference direction of the neighborhood data and the drug data. represents the distance in the reference direction between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the cluster to which the drug data belongs, Represents the reference weight of each neighborhood data.
[0068] Understandably, It reflects the degree to which the neighborhood data and the drug data belong to the same category. The larger the value, the smaller the data interval within the cluster and the larger the data interval between clusters in the direction of the line connecting the neighborhood data and the drug data. This further indicates that the greater the similarity between the neighborhood data and the data in the cluster to which the drug data belongs, the smaller the data similarity between clusters, and therefore the greater the degree to which the neighborhood data and the data in the cluster to which the drug data belongs belong to the same category. It reflects the degree to which the neighborhood data and the drug data belong to the same category. The larger the value, the larger the data interval within the cluster and the smaller the data interval between clusters in the direction of the line connecting the neighborhood data and the drug data. This further indicates that the smaller the similarity of the data within the cluster and the greater the similarity of the data between clusters. Therefore, the possibility that the data in the cluster to which the neighborhood data belongs and the data in the cluster to which the drug data belongs belong to the same category is greater.
[0069] It should be supplemented that, the method for obtaining the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the nearest cluster in the reference direction includes:
[0070] The cluster cluster closest to the cluster cluster to which the neighborhood data belongs is obtained in the reference direction, and convex hull detection is performed on the cluster cluster to which the neighborhood data belongs and the nearest cluster cluster to obtain the corresponding convex hull areas. The shortest distance between the convex hull area of the cluster cluster to which the neighborhood data belongs and the nearest cluster cluster is obtained in the reference direction, which is recorded as the distance between the convex hull edge of the cluster cluster to which the neighborhood data belongs and the convex hull edge of the nearest cluster cluster in the reference direction.
[0071] In addition, a method for obtaining the distance mean of the projection points of the data in the cluster in the reference direction includes:
[0072] Obtain the projection point of the data in the cluster in the reference direction, calculate the mean of the distances between the projection point and two adjacent projection points and record it as the adjacent distance of the projection point, and record the mean of the adjacent distances of all projection points as the mean distance of the projection points of the data in the cluster in the reference direction.
[0073] In addition, the method for obtaining the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the cluster to which the drug data belongs in the reference direction includes:
[0074] Perform convex hull detection on the cluster to which the neighborhood data belongs and the cluster to which the drug data belongs to obtain their respective corresponding convex hull areas, and obtain the shortest distance between the convex hull areas of the cluster to which the neighborhood data belongs and the cluster to which the drug data belongs in the reference direction, which is recorded as the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the cluster to which the drug data belongs in the reference direction.
[0075] S4: Using the reference weight of each neighborhood data as the weight, the LOF algorithm is used to calculate the local reachable density of the drug data; based on the local reachable density, the LOF algorithm is used to perform anomaly detection to remove abnormal data in the drug database.
[0076] S40: Using the reference weight of each neighborhood data as the weight, the local reachable density of the drug data is calculated using the LOF algorithm.
[0077] Preferably, as an example, the reference weight of each neighborhood data is used as the weight, and the local reachable density of the drug data is calculated using the LOF algorithm, including:
[0078] The distance between the drug data and each neighboring data is calculated, and the reference weight of each neighboring data is used as the weight. The weighted sum of the distance between the drug data and each neighboring data is taken, and the inverse is taken to obtain the local reachable density of the drug data.
[0079] It can be understood that by adjusting the weights at each distance setting, the neighboring data that are in the same category as the drug data to a greater extent contributes more to the calculation of the local reachable density, while the neighboring data that are in the same category as the drug data to a lesser extent contributes less to the calculation of the local reachable density. This reduces the interference of data that do not belong to the same category on the calculation of the local reachable density and improves the accuracy of anomaly detection.
[0080] S41: Anomaly detection is performed using the LOF algorithm based on local reachable density.
[0081] Preferably, as an example, anomaly detection is performed using a LOF algorithm based on local reachable density, including:
[0082] The reference weight of each neighborhood data is used as the weight, and the local reachable density of all neighborhood data is weighted and summed to obtain the reference local reachable density. If the local reachable density of the drug data is less than R times the reference local reachable density, the drug data is judged to be abnormal, and R represents the preset adjustment coefficient. This embodiment is described by taking R as 1.2 as an example, and other embodiments may take other values, which are not specifically limited in this embodiment.
[0083] It is understandable that when performing anomaly detection, more reference is needed to the distribution density information of data of the same category, so that a greater weight is given to the neighborhood data that belongs to the same category to a greater extent, and a smaller weight is given to the neighborhood data that belongs to the same category to a lesser extent, so as to achieve accurate anomaly detection.
[0084] S42: To remove abnormal data in the drug database.
[0085] Preferably, as an example, to remove abnormal data in a drug database, the method includes:
[0086] Remove drug data judged as abnormal from the drug database.
[0087] It is understandable that the abnormal data is removed to prevent the abnormal data from interfering with subsequent links.
[0088] At this point, this embodiment is completed.
[0089] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A data processing method for a drug database, characterized in that: include: Acquire a drug data set, wherein the drug data set includes a plurality of drug data; Obtain preset neighborhood data for any drug data; Cluster the neighborhood data into several clusters; Calculate the reference weight of each neighborhood data , , record the direction of the connection between the neighborhood data and the drug data as the reference direction. If the neighborhood data and the drug data belong to the same cluster, represents the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the nearest cluster in the reference direction, represents the mean distance of the projection points of the data in the cluster to which the neighborhood data belongs in the reference direction, represents the neighborhood data, Indicates the cluster to which the drug data belongs; if the neighborhood data and the drug data do not belong to the same cluster, represents the mean distance of the projection points of the data in the cluster to which the neighborhood data belongs in the reference direction, It represents the mean distance between the projection points of the data in the cluster to which the drug data belongs in the reference direction of the neighborhood data and the drug data. Indicates the distance between the convex hull edge of the cluster to which the neighborhood data belongs and the convex hull edge of the cluster to which the drug data belongs in the reference direction; The reference weight of each neighborhood data is used as the weight, and the local reachable density of the drug data is calculated using the LOF algorithm; The LOF algorithm is used for anomaly detection based on local reachable density to remove abnormal data in the drug database.
2. A data processing method for a drug database according to claim 1, characterized in that: The clustering of the neighborhood data into a plurality of clusters includes: Obtain density reference data of each neighborhood data, and calculate the distribution density of each neighborhood data according to the density reference data; Take any neighborhood data as clustering starting point data, and take the neighborhood data whose distribution density difference with the clustering starting point data is less than a preset density threshold and which has an intersection with the density reference data of the clustering starting point data as the same cluster cluster data of the clustering starting point; Obtain the same clustering cluster data of each data in the clustering cluster of the clustering starting point data, and so on, until there is no new data as the same clustering cluster data of the clustering starting point data; Any neighboring data of the same cluster cluster data that does not belong to the cluster starting point data is used as new cluster starting point data to obtain the same cluster cluster data of the new cluster starting point data; until all data have their corresponding cluster clusters.
3. A data processing method for a drug database according to claim 2, characterized in that: The step of obtaining density reference data of each neighborhood data includes: Any neighborhood data is recorded as analysis data, the distance between the analysis data and other neighborhood data is obtained, the distances between the analysis data and all other neighborhood data are arranged in ascending order to obtain a distance sequence, and the neighborhood data before the first mutation in the distance sequence is used as the density reference data of the analysis data.
4. A data processing method for a drug database according to claim 3, characterized in that: The method for determining the mutation comprises: The difference between each distance in the distance sequence and the previous distance is calculated. If the difference is greater than F times the average of the previous differences, it is determined that there is a sudden change in the distance corresponding to the difference, where F represents a preset proportionality coefficient.
5. A data processing method for a drug database according to claim 2, characterized in that: The step of calculating the distribution density of each neighborhood data according to the density reference data includes: The distance between the neighborhood data and each density reference data is calculated, and the distribution density of the neighborhood data is obtained by taking the inverse of the mean of the distance between the neighborhood data and the density reference data.
6. A data processing method for a drug database according to claim 1, characterized in that: The method uses the reference weight of each neighborhood data as the weight and uses the LOF algorithm to calculate the local reachable density of the drug data, including: The distance between the drug data and each neighboring data is calculated, and the reference weight of each neighboring data is used as the weight. The weighted sum of the distance between the drug data and each neighboring data is taken, and the inverse is taken to obtain the local reachable density of the drug data.
7. A data processing method for a drug database according to claim 1, characterized in that: The anomaly detection using the LOF algorithm based on the local reachable density includes: The reference weight of each neighborhood data is taken as the weight, and the local reachable density of all neighborhood data is weightedly summed to obtain the reference local reachable density. If the local reachable density of the drug data is less than R times the reference local reachable density, it is determined that the drug data is abnormal, and R represents the preset adjustment coefficient.
8. A data processing method for a drug database according to claim 1, characterized in that: The step of obtaining preset neighborhood data of any drug data includes: A preset number of drug data closest to the drug data are used as neighborhood data of the drug data.
Citation Information
Patent Citations
Personalized customization order anomaly detection system based on LOF algorithm
CN115292385A
Method for improving abnormal data mining and screening
CN111125470A
Semi-supervised learning-based abnormal electricity utilization user detection method
WO2019237492A1