A method and device for constructing a database of associated variables
By calculating the correlation between the unprocessed exposed variables in the database and the first variable group in the Alzheimer's disease data processing platform, determining the sequence of associated variables and performing clustering operations, the problems of poor variable consistency and low analysis efficiency in the existing platform are solved, and fast and accurate data analysis is achieved.
Patent Information
- Application Number
- CN202410727056.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-06-06
AI Technical Summary
The existing Alzheimer's disease data processing platform has poor variable consistency and unclear direction, which leads to slow data analysis speed and low accuracy, which cannot meet the actual application needs.
By selecting the unprocessed exposed variable from the database, calculating its correlation with the first variable group, determining the first sequence of correlation variables and the second sequence of correlation variables, and performing clustering operations on them, updating the database's processor to improve the efficiency and accuracy of data analysis.
It realizes fast and accurate data analysis, improves the analysis efficiency of the database and the accuracy of search results, and meets the needs of practical applications.
Smart Images

Figure CN118689944B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of database technology, and in particular to a method and device for constructing a database of associated variables. Background Art
[0002] Alzheimer's disease is a serious neurodegenerative disease that poses a major challenge to the global elderly population. In order to better understand the pathogenesis, risk factors and protective factors of the disease, a dedicated online platform can optimize the data collection, processing and analysis process.
[0003] Data analysis for Alzheimer's disease usually involves a large amount of genetic data, bioinformatics data, clinical data, etc. The existing data processing platform for Alzheimer's disease can only provide limited analysis, and the variable consistency in the data processing platform for Alzheimer's disease is poor (that is, some studies use variables a, b and c, some studies use variables c, d and e, and the variables used in each study are inconsistent), and the directionality of various variables is unclear. Therefore, the existing database for Alzheimer's disease cannot meet the needs of practical applications, and the data analysis speed is slow and the accuracy is low. Summary of the invention
[0004] In view of this, the present application provides a method and device for constructing a database of associated variables, so as to quickly and accurately analyze data and obtain associated results.
[0005] Specifically, the present application is implemented through the following technical solutions:
[0006] The first aspect of the present application provides a method for constructing a database of associated variables, the method comprising:
[0007] Select any untreated exposure variable from the database, and calculate a first correlation between the untreated exposure variable and the first variable group based on the untreated exposure variable and the first variable group, wherein the first variable group is a search result variable, and the exposure variable group is other variables except the first variable group;
[0008] Determine a first associated variable sequence and a second associated variable sequence based on the first correlation, wherein the first associated variable sequence corresponds to a first correlation greater than the second associated variable sequence;
[0009] performing clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and updating the first processor, the second processor, and the third processor of the database according to the clustering results, wherein the first processor, the second processor, and the third processor are used to search according to the degree of correlation between the retrieval result variables and the exposure variables, and match search results with different degrees of correlation;
[0010] Determine whether there are any unprocessed exposure variables in the database; if so, select any unprocessed exposure variable as a new unprocessed exposure variable, and return to the step of calculating the first correlation;
[0011] If not, a database search response method is constructed based on the updated first variable group, the first processor, the second processor and the third processor.
[0012] A second aspect of the present application provides a device for constructing a database of associated variables, the device comprising a calculation module, a determination module, an update module and a processing module;
[0013] The calculation module is used to select any untreated exposure variable from the database, and calculate the first correlation between the untreated exposure variable and the first variable group based on the untreated exposure variable and the first variable group, wherein the first variable group is the search result variable, and the exposure variable group is other variables except the first variable group;
[0014] The determining module is used to determine a first associated variable sequence and a second associated variable sequence based on the first correlation, wherein the first associated variable sequence corresponds to a first correlation greater than the second associated variable sequence;
[0015] The updating module is used to perform clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and update the first processor, the second processor and the third processor of the database according to the clustering results, wherein the first processor, the second processor and the third processor are used to search according to the degree of correlation between the retrieval result variable and the exposure variable, and match search results with different degrees of correlation;
[0016] The processing module is used to determine whether there are any unprocessed exposure variables in the database, and if there are any unprocessed exposure variables in the database, select any unprocessed exposure variable as a new unprocessed exposure variable, and return to the step of calculating the first correlation;
[0017] The processing module is further configured to construct a database search response mode based on the updated first variable group, the first processor, the second processor and the third processor when there are no unprocessed exposed variables in the database.
[0018] The third aspect of the present application provides a device for constructing a database of associated variables, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods provided in the first aspect of the present application are implemented.
[0019] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods provided in the first aspect of the present application.
[0020] The method and device for constructing a database of associated variables provided in the present application first select any untreated exposure variable from the database, and based on the untreated exposure variable and the first variable group, calculate the first correlation between the untreated exposure variable and the first variable group, wherein the first variable group is the retrieval result variable, and the exposure variable group is other variables except the first variable group; then determine the first associated variable sequence and the second associated variable sequence based on the first correlation, and the first correlation corresponding to the first associated variable sequence is greater than the second associated variable sequence; then perform clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and update the first processor, the second processor and the third processor of the database according to the clustering results, wherein the first processor, the second processor and the third processor are used to search according to the degree of correlation between the retrieval result variable and the exposure variable, and match the search results of different degrees of correlation; then determine whether there are still untreated exposure variables in the database, if so, select any untreated exposure variable as a new untreated exposure variable, and return to the step of calculating the first correlation; if not, construct a database retrieval response method based on the updated first variable group, the first processor, the second processor and the third processor. In this way, the association between the untreated exposure variable and the first variable group is obtained through the first correlation, and the relationship between the untreated exposure variable and the first variable group can be characterized through the first correlation. Further, the first associated variable sequence is obtained based on the first correlation, so that the variables in the first associated variable sequence have a greater correlation with the first variable group. At the same time, the second associated variable sequence is obtained based on the first correlation, which ensures the correlation of the variables in the first associated variable sequence. In this way, the first processor, the second processor, and the third processor are updated based on the first associated variable sequence and the second associated variable sequence with a larger correlation degree coverage, so that these processors can match search results with different correlation degrees. Since the first processor, the second processor, and the third processor can process different search result variables at the same time and return search results with different correlation degrees at the same time, the efficiency of database analysis can be improved, and the accuracy of the returned search results can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 A flowchart of a first embodiment of a method for constructing a database of associated variables provided in the present application;
[0022] Figure 2 This is a flow chart of Embodiment 2 of the method for constructing a database of associated variables provided in the present application;
[0023] Figure 3This is a flowchart of Embodiment 3 of the method for constructing a database of associated variables provided in the present application;
[0024] Figure 4 A hardware structure diagram of a device for constructing a database of associated variables where the device for constructing a database of associated variables of the present application is located;
[0025] Figure 5 This is a structural diagram of Embodiment 1 of the device for constructing a database of associated variables provided in the present application. DETAILED DESCRIPTION
[0026] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0027] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more associated listed items.
[0028] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0029] The present application provides a method and device for constructing a database of associated variables, which are used to quickly and accurately analyze data and obtain associated results.
[0030] Specific embodiments are given below to introduce the technical solution of the present application in detail.
[0031] Figure 1 This is a flowchart of the first embodiment of the method for constructing a database of associated variables provided by this application. Figure 1 , the method provided in this embodiment may include:
[0032] S101. Select any untreated exposure variable from a database, and calculate a first correlation between the untreated exposure variable and a first variable group based on the untreated exposure variable and the first variable group, wherein the first variable group is a retrieval result variable, and the exposure variable is a variable other than the first variable group.
[0033] Specifically, the exposure variable is a variable used for control and manipulation, and its influence on the result can be studied by different exposure variables. In specific implementation, the unprocessed exposure variable in the database can be the original data in the database without any correction, adjustment or conversion.
[0034] Furthermore, the first variable group is the search result variable, that is, when the search term is input to search in the database, the first variable group is the search result corresponding to the search term in the database, and the exposed variable is the variable in other databases other than the search result. When managing the database, in order to respond to queries of various search terms, any one or a group of variables can be the search result variable, and data reconstruction is required for any one or a group of variables.
[0035] In specific implementation, for example, in one embodiment, the variables in a database for identifying Alzheimer's disease may include bioinformatics factors such as blood calcium concentration, vitamin E level, genetic variation, gene fragments in the genome coding region, herpes simplex virus, tuberculosis, Epstein-Barr virus, Staphylococcus aureus, influenza A virus and other selectable variables, any number of which are selected as retrieval result variables, and the retrieval result variables are determined as the first variable group. After the first variable group is determined, the other variables are determined as exposure variables.
[0036] Further, the first correlation characterizes the correlation between the variables in the first variable group and the untreated exposure variable. It should be noted that the first correlation between the untreated exposure variable and the first variable group can be calculated by a traditional correlation analysis method, or by a correlation analysis method based on a neural network. In this embodiment, this is not limited. For example, in one embodiment, the Pearson correlation analysis method can be used to calculate the correlation between the retrieval result variables and the untreated exposure variables in the first variable group to obtain a first correlation. In specific implementation, when the retrieval result variables increase, it is determined whether there is a correlation based on the change of the untreated exposure variable, and the first correlation is obtained by calculating the Pearson correlation coefficient.
[0037] In specific implementation, for example, in one embodiment, for the pth unprocessed leaked variable, its first correlation is:
[0038] Rp=(r1, p, r2, p, r3, p...ra, p);
[0039] Among them, Rp is the value of the first correlation; a is the length of the first variable group; (ra, p) takes the absolute value.
[0040] S102: Determine a first associated variable sequence and a second associated variable sequence based on the first correlation, wherein a first correlation corresponding to the first associated variable sequence is greater than that of the second associated variable sequence.
[0041] Specifically, the untreated exposure variables can be divided into two groups based on the first correlation, and the two groups are respectively determined as a first associated variable sequence and a second associated variable sequence.
[0042] In specific implementation, for example, in one embodiment, a correlation coefficient value can be predetermined, and the untreated exposure variables can be distinguished by the correlation coefficient value, and the untreated exposure variables whose first correlation is greater than or equal to the correlation coefficient value are determined as variables in the first associated variable sequence, and the untreated exposure variables whose first correlation is less than the correlation coefficient value are determined as variables in the second associated variable sequence. For example, in one embodiment, the correlation coefficient value can be obtained based on the arithmetic mean of the correlation relationship. In other words, the correlation coefficient value is the arithmetic mean of all untreated exposure variables multiplied by a coefficient, and the coefficient can be set to 1.5-2.
[0043] In this step, by grouping the untreated exposure variables through the first correlation, a first associated variable sequence with high correlation to the first variable group and a second associated variable sequence with low correlation can be obtained, which can make the subsequent processing of these variables more targeted, thereby improving the analysis efficiency.
[0044] S103, performing clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and updating the first processor, the second processor, and the third processor of the database according to the clustering results, wherein the first processor, the second processor, and the third processor are used to search according to the degree of correlation between the retrieval result variable and the exposure variable, and match search results with different degrees of correlation.
[0045] Specifically, the clustering operation is an unsupervised learning data analysis method, through which the variables in the first associated variable sequence and the second associated variable sequence can be divided into groups or clusters with similar characteristics. In specific implementation, in the clustering operation, the variables in the first associated variable sequence and the second associated variable sequence are assigned to different clusters, so that the variables in the same cluster are similar to each other, while the data points between different clusters are relatively different.
[0046] It should be noted that a traditional clustering algorithm or a neural network clustering algorithm may be selected for clustering operation, and this is not limited in this embodiment. For example, in one embodiment, when clustering the first variable group, clustering may be performed based on the correlation of the first variable group: the variables in the first variable group are classified according to the numerical values of the correlations, and then clustering results of strong correlation and weak correlation are obtained.
[0047] In a specific implementation, the third associated variable sequence and multiple fourth associated variable sequences can be obtained through the first associated variable sequence, and the first processor can be updated through the third associated variable sequence, and the second processor can be updated through the fourth associated variable sequence. It should be noted that when updating the processor, the update can be performed based on the commonness of the variables. In other words, the processor is updated using common variables. Furthermore, when updating for special needs, specific variables can be used to replace the variables in the associated variable sequence, thereby completing the update of the processor.
[0048] Preferably, the first processor that updates the database according to the clustering results specifically includes: predicting candidate variables according to the user's historical search behavior; matching processing functions and transfer parameters based on the candidate variables; and updating the first processor of the database based on the matching processing functions and transfer parameters. The processor is essentially a callback function. The method provided by the present invention predicts candidate variables according to historical behaviors in order to achieve non-sensitive and accurate retrieval of data, thereby matching the processing callback function that best matches the user's search intention, and completes the most accurate processing and response of data without the user's perception or choice, thereby improving the speed and accuracy of data processing.
[0049] Furthermore, the first processor, the second processor and the third processor are used to return the search result when the corresponding result is retrieved based on the user's search request, and not return data when the corresponding result is not retrieved.
[0050] It should be noted that, according to the amount of data stored in the processor, the data of the processor can be stored in different locations. For example, in one embodiment, the amount of data of the first processor is small, and the data can be stored in the memory.
[0051] Optionally, an embodiment is given below to introduce a method for obtaining a third association variable sequence and a plurality of fourth association variable sequences:
[0052] (1) Based on the first associated variable sequence and the first variable group, calculating a second correlation between the first associated variable sequence and the first variable group.
[0053] Specifically, the correlation between the variables in the first associated variable sequence and the variables in the first variable group is characterized by the second correlation. It should be noted that the second correlation between the first associated variable sequence and the first variable group can be calculated by a traditional correlation analysis method, or by a neural network-based correlation analysis method, which is not limited in this embodiment. For example, in one embodiment, the Pearson correlation analysis method can be used to calculate the correlation between the search result variables in the first variable group and the variables in the first associated variable sequence to obtain the second correlation.
[0054] (2) performing a clustering operation on the first association variable sequence based on the second correlation to obtain a plurality of first exposure variable groups, wherein the number of the first exposure variable groups is less than or equal to the number of variables in the first variable group.
[0055] Specifically, when performing the clustering operation, the number of clusters obtained by clustering can be set. For example, in one embodiment, when performing the clustering operation on the first associated variable sequence, the number of clusters is set to be less than or equal to the number of variables in the first variable group.
[0056] Furthermore, a clustering operation is performed on the first associated variable sequence through the second correlation, so that the variables therein are divided into a specified number of clusters, and the variables in each cluster are similar to each other.
[0057] (3) Determining a third associated variable sequence and a plurality of fourth associated variable sequences based on the first exposure variable group, wherein the second correlation corresponding to the third associated variable sequence is greater than that of all the fourth associated variable sequences.
[0058] In specific implementation, multiple first exposure variable groups can be sorted from large to small according to the second correlation values, a first exposure variable group with a large second correlation is determined as the third associated variable sequence, and the remaining first exposure variable groups are determined as fourth associated variables.
[0059] The method for obtaining a third associated variable sequence and a plurality of fourth associated variable sequences provided in this embodiment groups the first associated variables by the second correlation, determines the first exposure variable group with the highest second correlation as the third associated variable sequence, and determines the remaining first exposure variable groups as the fourth associated variables. For the third associated variable sequence with high correlation, in-depth analysis and processing can be performed preferentially, and for the fourth associated variables, comprehensive analysis and processing can be performed, thereby improving the performance of the database.
[0060] Further, a plurality of fifth associated variable sequences may be acquired through the second associated variable sequence, and the third processor may be updated through the fifth associated variable sequence.
[0061] Optionally, an embodiment is given below to introduce a method for obtaining multiple fifth association variable sequences:
[0062] (1) Based on the second associated variable sequence and the first variable group, a third correlation between the second associated variable sequence and the first variable group is calculated.
[0063] Specifically, the third correlation is used to characterize the correlation between the variables in the second associated variable sequence and the variables in the first variable group. It should be noted that the third correlation between the second associated variable sequence and the first variable group can be calculated by a traditional correlation analysis method, or by a neural network-based correlation analysis method, which is not limited in this embodiment. For example, in one embodiment, the Pearson correlation analysis method can be used to calculate the correlation between the search result variables in the first variable group and the variables in the second associated variable sequence to obtain the third correlation.
[0064] (2) performing a clustering operation on the second associated variable sequence based on the third correlation to obtain a plurality of second exposure variable groups, wherein the number of the second exposure variable groups is greater than the number of variables in the first variable group.
[0065] Specifically, when performing the clustering operation, the number of clusters obtained by clustering can be set. For example, in one embodiment, when performing the clustering operation on the second associated variable sequence, the number of clusters is set to be greater than the number of variables in the first variable group.
[0066] Furthermore, a clustering operation is performed on the first associated variable sequence through the third correlation, so that the variables therein are divided into a specified number of clusters, and the variables in each cluster are similar to each other.
[0067] (3) Determining a plurality of fifth associated variable sequences based on the second exposure variable group.
[0068] In this step, the obtained multiple second exposure variable groups are determined as the fifth associated variable sequence.
[0069] The method for obtaining multiple fifth associated variable sequences provided in this embodiment processes the second associated variable through the third correlation, and then determines the fifth associated variable sequence through the second exposure variable group.
[0070] Further, the first processor may be updated based on the third associated variable group, the second processor may be updated based on the fourth associated variable group, and the third processor may be updated based on the fifth associated variable group.
[0071] S104, determining whether there are any unprocessed exposure variables in the database; if so, selecting any unprocessed exposure variable as a new unprocessed exposure variable, and returning to the step of calculating the first correlation.
[0072] Specifically, all variables in the database are traversed to determine whether there are any unprocessed exposed variables. If there are any unprocessed exposed variables, they are processed, and the first processor, the second processor, and the third processor are updated based on the new unprocessed exposed variables.
[0073] S105: If not, construct a database search response method based on the updated first variable group, the first processor, the second processor and the third processor.
[0074] Specifically, all variables in the database are traversed to determine whether there are any unprocessed exposed variables. When there are no unprocessed exposed variables, it is determined that the update of the processor in the database has been completed.
[0075] The method for constructing a database of associated variables provided in this embodiment first selects any untreated exposure variable from the database, and based on the untreated exposure variable and the first variable group, calculates the first correlation between the untreated exposure variable and the first variable group; then determines the first associated variable sequence and the second associated variable sequence based on the first correlation, and the first correlation corresponding to the first associated variable sequence is greater than the second associated variable sequence; then performs clustering operations on the first associated variable sequence and the second associated variable sequence respectively, updates the first processor, the second processor and the third processor of the database according to the clustering results, and then determines whether there are still untreated exposure variables in the database. When there are untreated exposure variables, select any untreated exposure variable as a new untreated exposure variable, and return to the step of calculating the first correlation; when there are no untreated exposure variables, a database retrieval response mode is constructed based on the updated first variable group, the first processor, the second processor and the third processor. In this way, since the update of the first processor, the second processor and the third processor is completed based on different correlations, the subsequent processing of these variables can be more targeted. At the same time, the search can be performed according to the correlation degree between the retrieval result variable and the exposure variable to obtain results of different correlations, so that the calculation results of the database are richer. Furthermore, since different processors handle tasks with different requirements, the computing cost can be reduced and the analysis efficiency of the database can be improved.
[0076] Figure 2 This is a flowchart of the second embodiment of the method for constructing a database of associated variables provided by this application. Figure 2Based on the above embodiment, the step of determining a third associated variable sequence and a plurality of fourth associated variable sequences based on the first exposure variable group, wherein the second correlation corresponding to the third associated variable sequence is greater than that of all the fourth associated variable sequences, comprises:
[0077] S201. Obtain third correlations between a plurality of first exposure variable groups and the first variable group.
[0078] Specifically, the method for obtaining the third correlation between the first exposure variable group and the first variable group can refer to the above introduction, which will not be repeated here.
[0079] S202. Sort the plurality of first exposure variable groups in descending order according to the third correlation.
[0080] Specifically, each first exposure variable group has a corresponding third correlation, and the corresponding first exposure variable groups are sorted in descending order of the third correlation. For example, in one embodiment, the third correlation of the first exposure variable group A is 0.5, the third correlation of the first exposure variable group B is 0.6, the third correlation of the first exposure variable group C is 0.7, the third correlation of the first exposure variable group D is 0.8, and the third correlation of the first exposure variable group E is 0.9. The sorted order is: first exposure variable group E, first exposure variable group D, first exposure variable group C, first exposure variable group B, and first exposure variable group A.
[0081] S203: Determine the first exposure group with the largest third correlation as the third associated variable sequence, and determine the remaining first exposure groups as the fourth associated variable sequence.
[0082] In specific implementation, for example, in one embodiment, combined with the above example, the first exposure variable group E is determined as the third associated variable sequence a, and the first exposure variable group D, the first exposure variable group C, the first exposure variable group B, and the first exposure variable group A are determined as the fourth associated variable sequence b.
[0083] The method for constructing a database of associated variables provided in this embodiment first obtains the third correlation between multiple first exposure variable groups and first variable groups; then sorts multiple first exposure variable groups from large to small according to the third correlation; finally, the first exposure group with the largest third correlation is determined as the third associated variable sequence, and the remaining first exposure groups are determined as the fourth associated variable sequence. In this way, the order of multiple first variable groups is determined by the third correlation, and then the group with the largest third correlation is determined as the third associated variable sequence. In this way, variables with large correlation can be captured more accurately through the third associated variable sequence, and other variables can be captured through the fourth associated variable sequence to prevent data omission, and search results can be better returned, making the interpretation of the database more intuitive and clear.
[0084] After the third associated variable sequence is obtained, the first processor may be updated according to the third associated variable sequence. The specific implementation method is as follows:
[0085] Optionally, the first processor is created based on a third associated variable sequence, wherein the first processor is used to generate an associated data set according to the first variable group and variables in the third associated variable sequence.
[0086] In specific implementation, in one embodiment, in combination with the above example, a first processor aa is created based on the third associated variable sequence a, and the first processor aa is used to obtain variables associated with the first variable group and the third associated variable sequence, and generate an associated data set from them.
[0087] After obtaining multiple fourth associated variable sequences, the second processor may be updated according to the multiple fourth associated variable sequences. The specific implementation method is as follows:
[0088] Optionally, the second processor is created based on the cluster center of the fourth associated variable sequence, wherein the second processor is used to generate a first query data set when the distance between the cluster center of the fourth associated variable sequence and the untreated exposure variable is less than a first preset distance; the first query set includes the first variable group and the exposure variables associated within the fourth associated variable sequence.
[0089] Specifically, the cluster center is the central point formed after the variables are aggregated together after clustering processing. The cluster center can be used to characterize the core characteristics of each cluster.
[0090] It should be noted that the distance between the cluster center of the fourth associated variable sequence and the untreated exposure variable can be based on a traditional distance measurement method or a neural network distance measurement method, which is not limited in this embodiment. For example, the distance between the cluster center of the fourth associated variable sequence and the untreated exposure variable can be obtained based on the Manhattan distance measurement method.
[0091] It should be noted that the specific length of the first preset distance is preset in advance according to needs, and is not limited to this in this embodiment.
[0092] In a specific implementation, the second processor sequentially calculates the distance from the cluster center of each fourth associated variable sequence to the untreated exposure variable. When the distance is less than the first preset distance, it is determined that the corresponding fourth associated variable sequence is associated with the corresponding untreated exposure variable, and the association is stored in the first query set.
[0093] The method for constructing a database of associated variables provided in this embodiment updates the first processor through the third associated variable sequence and updates the second processor through multiple fourth associated variable sequences. In this way, the correlation between variables can be captured more comprehensively, and the reliability of the database can be improved.
[0094] Figure 3 This is a flowchart of the third embodiment of the method for constructing a database of associated variables provided by this application. Figure 3 Based on the above embodiment, the step of determining a plurality of fifth association variable sequences based on the second exposure variable group includes:
[0095] S301. Obtain a plurality of first cluster centers of the second exposure variable groups and a plurality of second cluster centers of the fourth association variable sequences.
[0096] Specifically, the method for obtaining multiple first cluster centers and multiple second cluster centers can refer to the above introduction, which will not be repeated here.
[0097] S302: Calculate the actual distances between each of the first cluster centers and each of the second cluster centers, and sort the actual distances from longest to shortest.
[0098] Specifically, the actual distances of the first cluster centers and the second cluster centers are sorted according to their lengths to obtain a sequence of actual distances from long to short. It should be noted that each actual distance has a corresponding first cluster center and a second cluster center, and the corresponding first cluster center and the second cluster center can be obtained through the actual distance.
[0099] S303: Associating the second exposure variable group corresponding to the shortest distance in the actual distances with the fourth associated variable sequence, and determining the second exposure variable group corresponding to the shortest distance as a fifth associated variable sequence.
[0100] Specifically, according to the order of sorting the actual distances, the shortest actual distance is obtained, and then the corresponding first cluster center and second cluster center are obtained through the actual distance, and then the corresponding second exposure variable group and fourth association variable sequence are obtained. In other words, the distance between the second exposure variable group and the fourth association variable sequence is the shortest, and the correlation is the largest.
[0101] Furthermore, the obtained second exposure variable group is associated with the fourth associated variable sequence, and the second exposure variable group is determined as the fifth associated variable sequence.
[0102] After the fifth associated variable sequence is obtained, the third processor may be updated according to the fifth associated variable sequence. The specific implementation method is as follows:
[0103] Optionally, the third processor is created based on the cluster center of the fifth associated variable sequence, wherein the third processor is used to generate a second query data set when the distance between the cluster center of the fifth associated variable sequence and the untreated exposure variable is less than a second preset distance; the second query set includes the first variable group and the exposure variables associated within the fifth associated variable sequence.
[0104] Specifically, the specific length of the second preset distance is preset according to actual needs, and is not limited in this embodiment.
[0105] In a specific implementation, the third processor may calculate the distance between the cluster center of the four-five management sequences and the untreated exposure variable, and obtain the second query set when the distance is less than a second preset distance.
[0106] It should be noted that the second query set can represent the expected correlation between the first variable group and the fifth associated variable sequence, and the expected correlation has a value range of the correlation coefficient corresponding to the cluster center and the correlation coefficient corresponding to the cluster center of the parent sequence of the fifth associated variable sequence.
[0107] The method for constructing a database of associated variables provided in this embodiment updates the third processor through the fifth associated variable sequence, so as to more comprehensively capture the correlation between variables and improve the reliability of the database.
[0108] Corresponding to the aforementioned embodiment of a method for constructing a database of associated variables, the present application also provides an embodiment of a device for constructing a database of associated variables.
[0109] An embodiment of a device for constructing a database of associated variables in the present application can be applied to a device for constructing a database of associated variables. The device embodiment can be implemented by software, or by hardware, or by a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the processor of the device for constructing the database of associated variables reads the corresponding computer program instructions in the non-volatile memory into the memory and runs them. From a hardware perspective, if Figure 4 As shown, it is a hardware structure diagram of a device for constructing a database of associated variables in the present application, except Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, the device for constructing the database of associated variables where the device in the embodiment is located may also include other hardware, usually based on the actual function of the device for constructing the database of associated variables, which will not be described in detail.
[0110] Figure 5 This is a schematic diagram of the structure of the first embodiment of the device for constructing a database of associated variables provided by this application. Figure 5, the device provided in this embodiment includes a calculation module 510, a determination module 520, an update module 530 and a processing module 540;
[0111] The calculation module 510 is used to select any untreated exposure variable from the database, and calculate the first correlation between the untreated exposure variable and the first variable group based on the untreated exposure variable and the first variable group, wherein the first variable group is the search result variable, and the exposure variable group is other variables except the first variable group;
[0112] The determining module 520 is configured to determine a first associated variable sequence and a second associated variable sequence based on the first correlation, wherein the first associated variable sequence corresponds to a first correlation greater than the second associated variable sequence;
[0113] The updating module 530 is used to perform clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and update the first processor, the second processor and the third processor of the database according to the clustering results, wherein the first processor, the second processor and the third processor are used to search according to the degree of correlation between the retrieval result variable and the exposure variable, and match search results with different degrees of correlation;
[0114] The processing module 540 is used to determine whether there are any unprocessed exposure variables in the database, and if there are any unprocessed exposure variables in the database, select any unprocessed exposure variable as a new unprocessed exposure variable, and return to the step of calculating the first correlation;
[0115] The processing module 540 is further configured to construct a database search response mode based on the updated first variable group, the first processor, the second processor and the third processor when there are no unprocessed exposed variables in the database.
[0116] The device of this embodiment can be used to perform Figure 1 The steps, specific implementation principles and implementation processes of the method embodiment shown are similar and will not be repeated here.
[0117] Optionally, the calculation module 510 is specifically configured to calculate a second correlation between the first associated variable sequence and the first variable group based on the first associated variable sequence and the first variable group;
[0118] The determination module 520 is specifically configured to perform a clustering operation on the first associated variable sequence based on the second correlation to obtain a plurality of first exposure variable groups, wherein the number of the first exposure variable groups is less than or equal to the number of variables in the first variable group;
[0119] The determining module 520 is specifically configured to determine a third associated variable sequence and a plurality of fourth associated variable sequences based on the first exposure variable group, wherein the second correlation corresponding to the third associated variable sequence is greater than that of all the fourth associated variable sequences.
[0120] Optionally, the determination module 520 is specifically configured to obtain a third correlation between the plurality of first exposure variable groups and the first variable group;
[0121] The determination module 520 is specifically configured to sort the plurality of first exposure variable groups from large to small according to the third correlation;
[0122] The determination module 520 is specifically configured to determine the first exposure group with the largest third correlation as the third associated variable sequence, and determine the remaining first exposure groups as the fourth associated variable sequence.
[0123] Optionally, the calculation module 510 is specifically configured to calculate a third correlation between the second associated variable sequence and the first variable group based on the second associated variable sequence and the first variable group;
[0124] The determination module 520 is specifically configured to perform a clustering operation on the second associated variable sequence based on the third correlation to obtain a plurality of second exposure variable groups, wherein the number of the second exposure variable groups is greater than the number of variables in the first variable group;
[0125] The determination module 520 is specifically configured to determine a plurality of fifth associated variable sequences based on the second exposure variable group.
[0126] Optionally, the determination module 520 is specifically configured to obtain a plurality of first cluster centers of the second exposure variable groups and a plurality of second cluster centers of the fourth association variable sequences;
[0127] The calculation module 510 is specifically used to calculate the actual distance between each of the first cluster centers and each of the second cluster centers, and sort the actual distances from long to short;
[0128] The determining module 520 is specifically configured to associate the second exposure variable group corresponding to the shortest distance in the actual distances with the fourth associated variable sequence, and determine the second exposure variable group corresponding to the shortest distance as a fifth associated variable sequence.
[0129] Optionally, the processing module 540 is specifically configured to create the first processor based on a third associated variable sequence, wherein the first processor is configured to generate an associated data set according to the first variable group and variables in the third associated variable sequence.
[0130] Optionally, the processing module 540 is specifically used to create the second processor based on the cluster center of the fourth associated variable sequence, wherein the second processor is used to generate a first query data set when the distance between the cluster center of the fourth associated variable sequence and the untreated exposure variable is less than a first preset distance; the first query set includes the first variable group and the exposure variables associated in the fourth associated variable sequence.
[0131] Optionally, the processing module 540 is specifically used to create the third processor based on the cluster center of the fifth associated variable sequence, wherein the third processor is used to generate a second query data set when the distance between the cluster center of the fifth associated variable sequence and the untreated exposure variable is less than a second preset distance; the second query set includes the first variable group and the exposure variables associated within the fifth associated variable sequence.
[0132] Please continue to refer to Figure 4 The present application also provides a device for constructing a database of associated variables, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any one of the methods provided in the first aspect of the present application are implemented.
[0133] The present application also provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of any one of the methods provided in the present application are implemented.
[0134] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0135] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0136] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for constructing a database of associated variables, characterized in that: The method comprises: Select any untreated exposure variable from the database, and calculate a first correlation between the untreated exposure variable and the first variable group based on the untreated exposure variable and the first variable group, wherein the first variable group is a search result variable, and the exposure variable is a variable other than the first variable group; Determine a first associated variable sequence and a second associated variable sequence based on the first correlation, wherein the first associated variable sequence corresponds to a first correlation greater than the second associated variable sequence; performing clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and updating the first processor, the second processor, and the third processor of the database according to the clustering results, wherein the first processor, the second processor, and the third processor are used to search according to the degree of correlation between the retrieval result variables and the exposure variables, and match search results with different degrees of correlation; The first processor, the second processor and the third processor respectively performing clustering operations on the first associated variable sequence and the second associated variable sequence and updating the database according to the clustering results include: Based on the first associated variable sequence and the first variable group, calculating a second correlation between the first associated variable sequence and the first variable group; Performing a clustering operation on the first association variable sequence based on the second correlation to obtain a plurality of first exposure variable groups, wherein the number of the first exposure variable groups is less than or equal to the number of variables in the first variable group; Determine a third associated variable sequence and a plurality of fourth associated variable sequences based on the first exposure variable group, wherein the second correlation corresponding to the third associated variable sequence is greater than that of all the fourth associated variable sequences; updating the first processor through the third associated variable sequence, updating the second processor through the fourth associated variable sequence, and updating the third processor through the fifth associated variable sequence; Determine whether there are any unprocessed exposure variables in the database; if so, select any unprocessed exposure variable as a new unprocessed exposure variable, and return to the step of calculating the first correlation; If not, a database search response method is constructed based on the updated first variable group, the first processor, the second processor and the third processor.
2. The method according to claim 1, characterized in that The determining, based on the first exposure variable group, a third associated variable sequence and a plurality of fourth associated variable sequences, wherein the second correlation corresponding to the third associated variable sequence is greater than all the fourth associated variable sequences, comprises: obtaining third correlations between a plurality of the first exposure variable groups and the first variable group; sorting the plurality of first exposure variable groups from largest to smallest according to the third correlation; The first exposure group with the largest third correlation is determined as the third associated variable sequence, and the remaining first exposure groups are determined as the fourth associated variable sequence.
3. The method according to claim 1, characterized in that The first processor, the second processor and the third processor respectively performing clustering operations on the first associated variable sequence and the second associated variable sequence and updating the database according to the clustering results include: Based on the second associated variable sequence and the first variable group, calculating a third correlation between the second associated variable sequence and the first variable group; Performing a clustering operation on the second associated variable sequence based on the third correlation to obtain a plurality of second exposure variable groups, wherein the number of the second exposure variable groups is greater than the number of variables in the first variable group; A plurality of fifth association variable sequences are determined based on the second set of exposure variables.
4. The method according to claim 3, characterized in that The determining of a plurality of fifth associated variable sequences based on the second exposure variable group comprises: Obtaining a plurality of first cluster centers of the second exposure variable groups and a plurality of second cluster centers of the fourth association variable sequences; Calculate the actual distances between each of the first cluster centers and each of the second cluster centers, and sort the actual distances from longest to shortest; The second exposure variable group corresponding to the shortest distance in the actual distances is associated with the fourth associated variable sequence, and the second exposure variable group corresponding to the shortest distance is determined as the fifth associated variable sequence.
5. The method according to claim 2, characterized in that: The first processor, the second processor and the third processor respectively performing clustering operations on the first associated variable sequence and the second associated variable sequence and updating the database according to the clustering results include: The first processor is created based on a third associated variable sequence, wherein the first processor is used to generate an associated data set according to the first variable group and variables in the third associated variable sequence.
6. The method according to claim 2, characterized in that The first processor, the second processor and the third processor respectively performing clustering operations on the first associated variable sequence and the second associated variable sequence and updating the database according to the clustering results include: The second processor is created based on the cluster center of the fourth associated variable sequence, wherein the second processor is used to generate a first query data set when the distance between the cluster center of the fourth associated variable sequence and the untreated exposure variable is less than a first preset distance; the first query data set includes the first variable group and the exposure variables associated in the fourth associated variable sequence.
7. The method according to claim 4, characterized in that The first processor, the second processor and the third processor respectively performing clustering operations on the first associated variable sequence and the second associated variable sequence and updating the database according to the clustering results include: The third processor is created based on the cluster center of the fifth associated variable sequence, wherein the third processor is used to generate a second query data set when the distance between the cluster center of the fifth associated variable sequence and the untreated exposure variable is less than a second preset distance; the second query data set includes the first variable group and the exposure variables associated in the fifth associated variable sequence.
8. The method according to claim 1, characterized in that The first processor updating the database according to the clustering result specifically includes: Predict candidate variables based on user historical retrieval behavior; Matching processing functions and passing parameters based on the candidate variables; The first processor updates the database based on the matched processing function and the passed parameters.
9. A device for constructing a database of associated variables, characterized in that: The device includes a calculation module, a determination module, an update module and a processing module; wherein, The calculation module is used to select any untreated exposure variable from the database, and calculate a first correlation between the untreated exposure variable and the first variable group based on the untreated exposure variable and the first variable group, wherein the first variable group is a search result variable, and the exposure variable group is other variables except the first variable group; The determining module is used to determine a first associated variable sequence and a second associated variable sequence based on the first correlation, wherein the first associated variable sequence corresponds to a first correlation greater than the second associated variable sequence; The updating module is used to perform clustering operations on the first associated variable sequence and the second associated variable sequence respectively, and update the first processor, the second processor and the third processor of the database according to the clustering results, wherein the first processor, the second processor and the third processor are used to search according to the degree of correlation between the retrieval result variable and the exposure variable, and match search results with different degrees of correlation; The first processor, the second processor and the third processor respectively performing clustering operations on the first associated variable sequence and the second associated variable sequence and updating the database according to the clustering results include: Based on the first associated variable sequence and the first variable group, calculating a second correlation between the first associated variable sequence and the first variable group; Performing a clustering operation on the first association variable sequence based on the second correlation to obtain a plurality of first exposure variable groups, wherein the number of the first exposure variable groups is less than or equal to the number of variables in the first variable group; Determine a third associated variable sequence and a plurality of fourth associated variable sequences based on the first exposure variable group, wherein the second correlation corresponding to the third associated variable sequence is greater than that of all the fourth associated variable sequences; updating the first processor through the third associated variable sequence, updating the second processor through the fourth associated variable sequence, and updating the third processor through the fifth associated variable sequence; The processing module is used to determine whether there are any unprocessed exposure variables in the database, and if there are any unprocessed exposure variables in the database, select any unprocessed exposure variable as a new unprocessed exposure variable, and return to the step of calculating the first correlation; The processing module is further configured to construct a database search response mode based on the updated first variable group, the first processor, the second processor and the third processor when there are no unprocessed exposed variables in the database.
Citation Information
Patent Citations
Cloud management database establishment method and system for health behavior intervention
CN110504031A
Framework for workload prediction and physical database design
CN116860713A