A method, device and equipment for generating prediction models and normalizing detection data
By obtaining the field attribute values of the detection data for splicing and training the prediction model, the problem of low efficiency in normalization processing of detection data is solved, and fast and accurate data normalization is achieved.
Patent Information
- Application Number
- CN202011401732.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-04
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-12-04
AI Technical Summary
In the prior art, the normalization processing of the detection data is inefficient, and manual processing is prone to errors, so it is impossible to quickly process a large amount of non-standard detection data.
By obtaining the field attribute values of non-standard detection data and standard detection data, a feature sentence is generated, and using the prediction model to train matching results, it is determined whether the non-standard detection data can be normalized into standard detection data.
It realizes the rapid and accurate normalization of non-standard detection data into standard detection data, improving data processing efficiency and accuracy.
Smart Images

Figure CN112507658B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and specifically to a prediction model generation method, a detection data normalization method, a device and equipment. Background Art
[0002] Test data is the data obtained after using the test equipment to test the test object. Test data can be used for data analysis. For example, in the medical field, the medical test data obtained by the test equipment can be used to analyze diseases, drugs, etc.
[0003] The test data obtained by different testing equipment are not uniform. Before using the test data for analysis, the test data needs to be normalized. At present, the normalization of test data is usually done manually. However, the efficiency of manual normalization of test data is low, the amount of test data that can be processed is small, and the normalized results may be incorrect. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a prediction model generation method, a method, device and equipment for normalizing detection data, which can quickly and accurately normalize non-standard detection data to standard detection data.
[0005] To solve the above problems, the technical solutions provided in the embodiments of the present application are as follows:
[0006] A prediction model generation method, the method comprising:
[0007] Acquire first non-standard detection data, where the first non-standard detection data includes an attribute value of at least one field;
[0008] splicing the attribute values of each field of the first non-standard detection data to generate a first non-standard feature sentence, and using the first non-standard feature sentence as the first non-standard feature data;
[0009] Acquire standard detection data, wherein the standard detection data includes an attribute value of at least one field;
[0010] splicing the attribute values of each field of the standard detection data to generate a standard feature sentence, and using the standard feature sentence as standard feature data;
[0011] A prediction model is trained and generated using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data. The prediction model is used to output a matching result of whether the second non-standard feature data matches the target standard feature data when second non-standard feature data and standard feature data are input, so as to determine whether second non-standard detection data corresponding to the second non-standard feature data can be normalized to standard detection data corresponding to the standard feature data based on the matching result.
[0012] In a possible implementation, the step of concatenating the attribute values of the fields of the first non-standard detection data to generate a first non-standard feature sentence includes:
[0013] Combining the field name of each field in the first non-standard detection data with the corresponding attribute value to form a first attribute feature pair;
[0014] splicing the first attribute feature pairs in the first non-standard detection data to generate a first non-standard feature sentence;
[0015] The step of concatenating the attribute values of each field of the standard detection data to generate a standard feature sentence includes:
[0016] The field name of each field in the standard detection data and the corresponding attribute value form a second attribute feature pair;
[0017] Each second attribute feature pair in the standard detection data is concatenated to generate a standard feature sentence.
[0018] In a possible implementation, the method further includes:
[0019] The first non-standard feature sentence and the standard feature sentence are used to train a first language model and a second language model.
[0020] In a possible implementation, before training and generating a prediction model using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data, the method further includes:
[0021] Inputting the first non-standard feature sentence into the first language model to obtain a feature vector of the first non-standard feature sentence, and using the feature vector of the first non-standard feature sentence as first non-standard feature data;
[0022] The standard feature sentence is input into the second language model to obtain a feature vector of the standard feature sentence, and the feature vector of the standard feature sentence is used as standard feature data.
[0023] In a possible implementation manner, the first language model, the second language model, and the prediction model constitute a twin network.
[0024] A method for normalizing detection data, the method comprising:
[0025] Acquire second non-standard detection data, where the second non-standard detection data includes an attribute value of at least one field;
[0026] splicing the attribute values of each field of the second non-standard detection data to generate a second non-standard feature sentence, and using the second non-standard feature sentence as the second non-standard feature data;
[0027] The second non-standard feature data and the target standard feature data are input into the prediction model to obtain a matching result of whether the second non-standard feature data matches the target standard feature data; the target standard feature data is generated according to the target standard feature sentence, and the target standard feature sentence is generated by splicing the attribute values of each field of the target standard detection data, and the target standard detection data is any one of the standard detection data; the prediction model is generated according to the method according to any one of claims 1 to 5;
[0028] If the matching result is that the second non-standard feature data matches the target standard feature data, the second non-standard detection data corresponding to the second non-standard feature data is normalized to the standard detection data corresponding to the target standard feature data.
[0029] In a possible implementation, when the target standard feature sentence is generated by splicing the field names and attribute values of each field of the target standard detection data, the attribute values of each field of the second non-standard detection data are spliced to generate the second non-standard feature sentence, including:
[0030] Combining the field name of each field in the second non-standard detection data with the corresponding attribute value into a third attribute feature pair;
[0031] Each third attribute feature pair in the second non-standard detection data is concatenated to generate a second non-standard feature sentence.
[0032] In a possible implementation, when the target standard feature data is generated according to a feature vector of a target standard feature sentence, the method further includes:
[0033] Inputting the second non-standard feature sentence into the first language model to generate a non-standard feature vector, and using the non-standard feature vector as second non-standard feature data;
[0034] The feature vector of the target standard feature sentence is obtained by inputting the target standard feature sentence into a second language model;
[0035] The first language model and the second language model are generated according to the method according to claim 3.
[0036] A prediction model generating device, the device comprising:
[0037] A first acquisition unit, configured to acquire first non-standard detection data, wherein the first non-standard detection data includes an attribute value of at least one field;
[0038] A first concatenation unit, configured to concatenate the attribute values of the fields of the first non-standard detection data to generate a first non-standard feature sentence, and use the first non-standard feature sentence as the first non-standard feature data;
[0039] A second acquisition unit, configured to acquire standard detection data, wherein the standard detection data includes an attribute value of at least one field;
[0040] A second concatenation unit is used to concatenate the attribute values of each field of the standard detection data to generate a standard feature sentence, and use the standard feature sentence as the standard feature data;
[0041] The first training unit is used to train and generate a prediction model using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data. The prediction model is used to output a matching result of whether the second non-standard feature data matches the target standard feature data when second non-standard feature data and standard feature data are input, so as to determine whether second non-standard detection data corresponding to the second non-standard feature data can be normalized to standard detection data corresponding to the standard feature data based on the matching result.
[0042] A device for normalizing detection data, the device comprising:
[0043] a third acquisition unit, configured to acquire second non-standard detection data, where the second non-standard detection data includes an attribute value of at least one field;
[0044] A third concatenation unit is used to concatenate the attribute values of each field of the second non-standard detection data to generate a second non-standard feature sentence, and use the second non-standard feature sentence as the second non-standard feature data;
[0045] a third input unit, for inputting the second non-standard feature data and the target standard feature data into a prediction model, and obtaining a matching result of whether the second non-standard feature data matches the target standard feature data; the target standard feature data is generated according to a target standard feature sentence, the target standard feature sentence is generated by splicing attribute values of each field of the target standard detection data, and the target standard detection data is any one of the standard detection data; the prediction model is generated according to the method described;
[0046] A normalization unit is configured to normalize second non-standard detection data corresponding to the second non-standard feature data to standard detection data corresponding to the target standard feature data if the matching result is that the second non-standard feature data matches the target standard feature data.
[0047] A prediction model generation device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the prediction model generation method as described above is implemented.
[0048] A device for normalizing detection data comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for normalizing detection data as described above is implemented.
[0049] A computer-readable storage medium stores instructions, which, when executed on a terminal device, cause the terminal device to execute the prediction model generation method or the detection data normalization method as described above.
[0050] It can be seen that the embodiments of the present application have the following beneficial effects:
[0051] In the prediction model generation method provided in the embodiment of the present application, by obtaining the first non-standard detection data including the attribute value of at least one field, the attribute values of each field are spliced to generate the first non-standard feature sentence as the first non-standard feature data. Obtain the standard detection data including the attribute value of at least one field, splice the attribute values of each field, and generate the standard feature sentence as the standard feature data. The prediction model is trained and generated using the first non-standard feature data, the standard feature data, and the label of whether the first non-standard feature data matches the standard feature data. The prediction model can output the corresponding matching result for the input second non-standard feature data and the standard feature data. According to the matching result output by the prediction model, the standard detection data that the second non-standard detection data can be normalized can be determined, and the standard detection data that the second non-standard detection data is normalized can be obtained more quickly through the prediction model. And the prediction model generated using the first non-standard feature data and the standard feature data and the corresponding label is more accurate, so that the normalized standard detection data corresponding to the second non-standard detection data can be accurately determined according to the matching result. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of a framework of an exemplary application scenario provided in an embodiment of the present application;
[0053] Figure 2 A flowchart of a prediction model generation method provided in an embodiment of the present application;
[0054] Figure 3 A schematic diagram of the structure of a twin network provided in an embodiment of the present application;
[0055] Figure 4 A flow chart of a method for normalizing detection data provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of the structure of a prediction model generation device provided in an embodiment of the present application;
[0057] Figure 6 A schematic diagram of the structure of a device for normalizing detection data provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the embodiments of the present application are further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0059] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.
[0060] After studying the normalization process of traditional test data, the inventor found that the test equipment that generates the test data is different, and the names of the test data for each test equipment are different, so that the obtained test data are not uniform. If the test data needs to be used for data processing or analysis, it is necessary to manually normalize the acquired test data to obtain standard test data. Since the rules for normalizing the test data are relatively complex, the test data may be incorrect during the manual processing. Therefore, the efficiency of manual normalization of test data is low, and a large amount of test data cannot be quickly processed. For example, in practical applications, it is impossible to quickly normalize a large amount of non-standard medical test data to the corresponding standard medical test data.
[0061] Based on this, an embodiment of the present application provides a prediction model generation method, by obtaining first non-standard detection data including attribute values of at least one field, splicing the attribute values of each field, and generating a first non-standard feature sentence as the first non-standard feature data. Obtain standard detection data including attribute values of at least one field, splice the attribute values of each field, and generate a standard feature sentence as standard feature data. Use the first non-standard feature data, standard feature data, and labels of whether the first non-standard feature data matches the standard feature data to train and generate a prediction model. The prediction model can output corresponding matching results for the input second non-standard feature data and standard feature data. According to the matching results output by the prediction model, the standard detection data that the second non-standard detection data can be normalized can be determined, and the standard detection data that the second non-standard detection data can be normalized can be obtained quickly through the prediction model. And the prediction model generated using the first non-standard feature data and the standard feature data and the corresponding labels is more accurate, so that the normalized standard detection data corresponding to the second non-standard detection data can be accurately determined according to the matching results.
[0062] In order to facilitate understanding of the prediction model generation method provided in the embodiment of the present application, Figure 1 See the example scenario shown in the figure. Figure 1 , which is a framework diagram of an exemplary application scenario provided in an embodiment of the present application.
[0063] In practical applications, the second non-standard test data 101 is first obtained, and the second non-standard feature sentence is generated using the second non-standard test data, and the second non-standard feature sentence is used as the second non-standard feature data 102. The second non-standard feature data 102 and the target standard feature data 103 are then input into the prediction model 104, and then a matching result of whether the second non-standard feature data 102 output by the prediction model 104 matches the target standard feature data 103 is obtained. According to the matching result, it can be determined whether the second non-standard test data 101 corresponding to the second non-standard feature data 102 can be normalized to the target standard test data corresponding to the target standard feature data 103.
[0064] Those skilled in the art will understand that Figure 1 The framework diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited by any aspect of the framework.
[0065] To facilitate understanding of the present application, a prediction model generation method provided in an embodiment of the present application is described below with reference to the accompanying drawings.
[0066] See also Figure 2 , which is a flow chart of a prediction model generation method provided in an embodiment of the present application. Figure 2 As shown, the method may include S201-S205:
[0067] S201: Acquire first non-standard detection data, where the first non-standard detection data includes an attribute value of at least one field.
[0068] The first non-standard test data is non-standard test data used to train the prediction model. The first non-standard test data may be non-standard test data obtained by actual detection and having corresponding standard test data. For example, the first non-standard medical test data is obtained by detection by medical detection equipment in the medical field. It may also be generated based on standard test data, such as replacing or deleting part of the data in the standard test data. For example, the first non-standard medical test data is obtained by modifying the standard medical test data.
[0069] The first non-standard test data has at least one field and an attribute value corresponding to the field. Among them, the field can represent the type of data contained in the first non-standard test data. The fields in the first non-standard test data can be selected from the types of commonly used and iconic test data. Taking medical test data as an example, the fields can be test identification, test name, normal value range, unit, sampling type and test method, etc. Among them, the test identification refers to the Chinese or English abbreviation of the test substance, for example, ACTH (adreno-cortico-tropic-hormone) or adrenocorticotropic hormone. The test name is the name of the test item, or it can be a specific component of the test, such as urine microalbumin. The normal value range is the range of the standard normal value, which can be expressed in a numerical interval, for example, <20; it can also be expressed in text, for example, positive. The sampling type is the location or tissue where sampling is required, for example, cerebrospinal fluid. The detection method can be the method used during the detection, for example, the Gal-G2-CNP method.
[0070] The attribute value is the information corresponding to the field, and the attribute value can be represented by numbers, text or symbols. Taking the above six fields as an example, the corresponding attribute values can be: AlbG, albumin, bromocresol green method, 35-53, g / l and drainage fluid.
[0071] It should be noted that the first non-standard detection data includes at least one attribute value of the field. In practical applications, the first non-standard detection data needs to include at least a detection name field. In a possible implementation, attribute values corresponding to a larger number of fields can be selected to improve the accuracy of the prediction model while ensuring the calculation speed of the prediction model.
[0072] S202: splicing the attribute values of each field of the first non-standard detection data to generate a first non-standard feature sentence, and using the first non-standard feature sentence as the first non-standard feature data.
[0073] It is understandable that the fields in the non-standard test data do not correspond one-to-one with the fields in the standard test data in terms of meaning, order, and semantics, and such a structure cannot directly determine the corresponding relationship.
[0074] Therefore, the attribute values of each field in the first non-standard test data are spliced to generate the corresponding first non-standard feature sentence. Taking the attribute values of the above fields as an example, the first non-standard feature sentence obtained is: AlbG. Albumin. Bromocresol green method. 35-53. g / l. Drainage fluid. It should be noted that in order to distinguish the attribute values corresponding to each field, a separator can be added between each attribute value. The separator can be a punctuation mark or other commonly used separator symbols, such as a period, a comma, a separator line, etc.
[0075] The obtained first non-standard feature sentence is used as the first non-standard feature data.
[0076] In a possible implementation, the field name of the field can also be added to the first non-standard feature sentence. The embodiment of the present application also provides a possible specific implementation method of splicing the attribute values of each field of the first non-standard detection data to generate the first non-standard feature sentence. Please see below.
[0077] S203: Acquire standard detection data, where the standard detection data includes an attribute value of at least one field.
[0078] Obtain standard test data. Standard test data can be obtained by annotating using a widely recognized annotation standard in the field. For the medical field, standard test data can be standardized medical test data, such as LOINC codes in the LOINC (Logical Observation Identifiers Names and Codes) system.
[0079] The standard test data includes the attribute value of at least one field. The fields in the standard test data can be selected from the annotation standards. In one possible implementation, for medical standard test data, six fields can be selected from LOINC as the fields included in the standard test data, specifically: component, property, timeaspect, system, scale and method. The above six fields can determine a unique LOINC code, that is, the standard test data. The prediction model generated by training the LOINC code can realize the normalization of the second non-standard test data to the unique corresponding standard test data through the prediction model.
[0080] Among them, component represents the component or analyte to be tested, that is, the test object to be tested. Property represents the property type of the test object, which is used to represent the characteristics of the test object. Time aspect represents the time characteristics of the test, for example, whether the test is one-time or valid for a period of time. System represents the sample to be tested. Scale represents the scale or accuracy type of the test, for example, qualitative description or quantitative description. Method represents the type of method used in the test.
[0081] S204: concatenate the attribute values of each field of the standard detection data to generate a standard feature sentence, and use the standard feature sentence as the standard feature data.
[0082] The attribute values of each field of the standard detection data are spliced to generate a standard feature sentence. The generation method of the standard feature sentence is similar to the generation method of the first non-standard feature sentence, which will not be repeated here. The obtained standard feature sentence is used as the standard feature data.
[0083] In a possible implementation, the field name of the field can also be added to the standard feature sentence. The embodiment of the present application also provides a possible specific implementation method of splicing the attribute values of each field of the standard detection data to generate a standard feature sentence. Please see below.
[0084] S205: A prediction model is trained and generated using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data. The prediction model is used to output a matching result indicating whether the second non-standard feature data matches the target standard feature data when the second non-standard feature data and the standard feature data are input, so as to determine whether the second non-standard detection data corresponding to the second non-standard feature data can be normalized to the standard detection data corresponding to the standard feature data based on the matching result.
[0085] The first non-standard detection data used to train and generate the prediction model may have a matching relationship with the standard detection data. Correspondingly, the first non-standard feature data may have a matching relationship with the standard feature data. The matching relationship between the first non-standard feature data and the standard feature data is used to determine whether the first non-standard feature data matches the standard feature data. The labels of whether or not the labels match can be specifically represented by "0" and "1". Among them, the label corresponding to the match between the first non-standard feature data and the standard feature data is "1", and the label corresponding to the mismatch between the first non-standard feature data and the standard feature data is "0".
[0086] The prediction model is trained and generated using the obtained first non-standard feature data, standard feature data, and labels indicating whether the first non-standard feature data and the standard feature data match. The prediction model may be a BERT (Bidirectional Encoder Representations from Transformers) model or a double-layer fully connected network with Dropout.
[0087] The prediction model extracts the feature vector v from the first non-standard detection data s And the feature vector v extracted from the standard detection data l A variety of combinations can be used, such as addition, subtraction, multiplication, splicing, etc., to merge into an intermediate vector v c The loss function of the prediction model can be the cross entropy commonly used in classification models, y t is a 2-dimensional vector representing v sand v l Whether it matches, for example, if v s and v l If it matches, then y t =[1,0], otherwise y t =[0,1]. The specific loss function of the prediction model is calculated as follows:
[0088] v c =Concatenate(v s +v l ,v s -v l ,v s ×v l )
[0089] v d = Dropout(v c )
[0090] v h =tanh(W h v d +b d )
[0091] y p =softmax(W o v h +b h )
[0092] Loss = CrossEntropy(y p ,y t )
[0093] Among them, W h and W o It is a trainable parameter that can be adjusted to achieve the optimization of the loss function. Through the optimization of the loss function, the prediction model can correctly match the first non-standard detection data with the standard feature data. When the accuracy of the prediction model reaches the preset condition, the training of the prediction model is completed.
[0094] The generated prediction model can output a corresponding matching result based on the input second non-standard feature data and standard data, and then use the matching result to determine whether the second non-standard detection data corresponding to the second non-standard feature data can be normalized to the standard detection data corresponding to the standard feature data.
[0095] Based on the contents of S201-S205 above, it can be known that in an embodiment of the present application, by acquiring the first non-standard test data and the standard test data, and splicing the attribute values of the fields included in the first non-standard test data and the standard test data, respectively, the first non-standard test data and the standard test data can be converted into the form of natural sentences, and the similarity between the attribute values of non-corresponding fields in different test data can be determined. Thereby, the generated prediction model can determine whether the input second non-standard feature data and the target standard feature data match, and the matching result obtained is more accurate. Then, the normalized standard test data corresponding to the second non-standard test data can be quickly and accurately determined based on the matching result.
[0096] During the splicing process, the meanings of the fields of the first non-standard test data and the fields of the standard test data may be different. Splicing only the attribute values of the first non-standard test data and the attribute values of the standard test data may cause the meaning of the fields to be lost.
[0097] Based on the above problem, in a possible implementation, the embodiment of the present application provides a specific implementation method of splicing the attribute values of each field of the first non-standard detection data to generate a first non-standard feature sentence, which can further improve the accuracy of the generated prediction model, specifically including:
[0098] The field name of each field in the first non-standard detection data and the corresponding attribute value form a first attribute feature pair;
[0099] Each first attribute feature pair in the first non-standard detection data is concatenated to generate a first non-standard feature sentence.
[0100] First, the field name of each field in the first non-standard detection data and the attribute value corresponding to the field are combined into a first attribute feature pair, and then the first attribute feature pair is spliced. In this way, the field name of the field can be used as a feature in the first non-standard feature sentence, ensuring that the information contained in the field name is not lost.
[0101] In order to facilitate the training of the prediction model and reduce the number of embedding layers included in the prediction model, the field name can be in the form of a key-value pair, for example, similar to the form of JSON, and the attribute value corresponding to the field constitutes a first attribute feature pair. In order to distinguish the field name and the field attribute value, a separator can be added between the field attribute value and the field name. The embodiment of the present application does not limit the separator between the field attribute value and the field name, and it can be a commonly used separator symbol. For example, the first attribute feature pair of the format is "field attribute value|field name". Taking the field whose field name is "detection name" and the field attribute value is "urine microalbumin" as an example, the first attribute feature pair formed is "urine microalbumin|detection name".
[0102] Furthermore, since the use of Chinese words in the field names will cause problems with Chinese word segmentation, it may occupy more dimensions. Preferably, when the field name is in Chinese, the field name in the first attribute feature pair can be the English word corresponding to the Chinese word, so as to realize feature extraction of the English word as a whole and reduce the dimensions occupied by the field name. For example, the English characters corresponding to the field name "Detection Name" are "ITEM_NAME". The corresponding first attribute feature pair is "Urine Microalbumin|ITEM_NAME".
[0103] The generated first attribute feature pairs are concatenated to obtain the corresponding first non-standard feature sentences. Each first attribute feature pair can be divided by a separator.
[0104] Correspondingly, the attribute values of each field of the standard detection data are concatenated to generate a standard feature sentence, which specifically includes:
[0105] The field name of each field in the standard detection data and the corresponding attribute value form a second attribute feature pair;
[0106] Each second attribute feature pair in the standard detection data is concatenated to generate a standard feature sentence.
[0107] The method of combining the field name and attribute value of each field in the standard detection data into a second attribute feature pair is similar to the above-mentioned method of combining the field name and attribute value of each field in the first non-standard detection data into a first attribute feature pair, and the method of generating a standard feature sentence is similar to the above-mentioned method of generating the first non-standard feature sentence, and will not be elaborated here.
[0108] In the embodiment of the present application, by combining the field names and field attribute values of the first non-standard test data and the standard test data, respectively, to obtain the first attribute feature pair and the second attribute feature pair, it is possible to retain the information contained in the field name without changing the structure of the prediction model, thereby improving the accuracy of the generated prediction model. This makes the matching result corresponding to the second non-standard test data obtained using the prediction model and the target standard feature data more accurate.
[0109] When the prediction model is trained using the first non-standard feature sentence, the standard feature sentence and the corresponding labels, the prediction model may take a long time to calculate the feature vectors of the first non-standard feature sentence and the standard feature sentence, which will increase the time it takes for the prediction model to output results.
[0110] Based on the above problem, in a possible implementation, the embodiment of the present application further provides a method for generating a prediction model. In addition to the above steps, the method also includes:
[0111] The first non-standard feature sentence and the standard feature sentence are used to train the first language model and the second language model.
[0112] The first language model is a model for extracting the feature vector of the first non-standard feature sentence, and the second language model is a model for extracting the feature vector of the standard feature sentence. By respectively using the first language model and the second language model to extract the feature vector, the obtained feature vector can be input into the prediction model, and the prediction model is only used to calculate the similarity of the feature vectors, which speeds up the calculation speed of the prediction model.
[0113] The first language model and the second language model may be trained using the Next Sentence Prediction (NSP) method in the BERT (Bidirectional Encoder Representations from Transformers) model.
[0114] It should be noted that the order of the first non-standard feature sentence and the standard feature sentence will affect the training of the first language model and the second language model. Therefore, the first non-standard feature sentence and the standard feature sentence can be used as one component, and the standard feature sentence and the first non-standard feature sentence can be used as another component to train the first language model and the second language model together.
[0115] In addition, the first non-standard feature sentence can be obtained by splicing only the attribute values of each field of the first non-standard detection data, or it can be obtained by splicing the first attribute feature pair obtained by combining the field name and the attribute value of each field of the first non-standard detection data. The two first non-standard feature sentences correspond to the two first language models respectively. Correspondingly, the standard feature sentence can be obtained by splicing the attribute values of each field of the standard detection data, or it can be obtained by splicing the second attribute feature pair obtained by combining the field name and the attribute value of each field of the standard detection data, and there are two corresponding second language models.
[0116] Based on the above content, it can be known that by using the first non-standard feature sentence and the standard feature sentence to respectively train and generate the first language model and the second language model, it is possible to extract the feature vectors of the first non-standard feature sentence and the standard feature sentence through the first language model and the second language model. By implementing the extraction of feature vectors and the matching of feature vectors through different models, the calculation time of feature extraction can be reduced, and the calculation speed of the matching result of the second non-standard feature data and the standard feature data can be improved.
[0117] Furthermore, before training and generating a prediction model using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data, the method further includes:
[0118] Inputting the first non-standard feature sentence into the first language model to obtain a feature vector of the first non-standard feature sentence, and using the feature vector of the first non-standard feature sentence as first non-standard feature data;
[0119] The standard feature sentence is input into the second language model to obtain a feature vector of the standard feature sentence, and the feature vector of the standard feature sentence is used as standard feature data.
[0120] After the first non-standard feature sentence and the standard feature sentence are used to train and generate the first language model and the second language model, the first non-standard feature sentence can be input into the first language model to obtain a feature vector corresponding to the first non-standard feature sentence, and the feature vector of the first non-standard feature sentence obtained is used as the first non-standard feature data. The standard feature sentence is input into the second language model to obtain an output feature vector corresponding to the standard feature sentence, and the feature vector of the standard feature sentence is used as the standard feature data. The obtained first non-standard feature data and the standard feature data are used to train the prediction model.
[0121] It is understandable that the first non-standard feature sentence has two concatenation methods, and the corresponding first language model also has two methods. When extracting the feature vector of the first non-standard feature sentence through the first language model, it is necessary to select the corresponding first language model according to the concatenation method of the first non-standard feature sentence. Similarly, the standard feature sentence also has two concatenation methods, and it is necessary to select the corresponding second language model to extract the feature vector of the standard feature sentence.
[0122] In an embodiment of the present application, feature vectors are extracted from the first non-standard feature sentence and the standard feature sentence respectively through the first language model and the second language model. The extracted feature vectors are used as data for training the prediction model, so that the language model can extract feature vectors and train the prediction model using feature vectors, thereby improving the calculation speed of the prediction model. In addition, since the language model extracts feature vectors faster than the prediction model, the speed of normalizing the overall detection data can be improved.
[0123] In a possible implementation, the first language model, the second language model, and the prediction model constitute a twin network.
[0124] See also Figure 3As shown, this figure is a schematic diagram of the structure of a twin network provided in an embodiment of the present application. Among them, the first language model 301 is used to extract the feature vector of the first non-standard feature sentence, and the second language model 302 is used to extract the feature vector of the standard feature sentence. The feature vector of the first non-standard feature sentence and the feature vector of the standard feature sentence are input into the prediction model 303, and the prediction model 303 is used to determine the similarity between the feature vector of the first non-standard feature sentence and the feature vector of the standard feature sentence, and output the corresponding matching result of whether it matches or not according to the similarity.
[0125] Based on the above content, it can be known that in the embodiment of the present application, the twin network composed of the first language model, the second language model and the prediction model can be used to match the second non-standard detection data and the standard detection data, and the normalization of the detection data can be achieved quickly and accurately.
[0126] Based on the above prediction model generation method, the present application embodiment also provides a method for normalizing detection data. Figure 4 , which is a flow chart of a method for normalizing detection data provided in an embodiment of the present application, and the method may include S401-S404:
[0127] S401: Acquire second non-standard detection data, where the second non-standard detection data includes an attribute value of at least one field.
[0128] The second non-standard detection data is detection data that is not in a standard detection data format. The second non-standard detection data may be detection data obtained by actual detection. For example, in the medical field, the second non-standard detection data may be second non-standard medical detection data obtained by actual medical detection equipment.
[0129] The second non-standard test data includes at least one attribute value of a field. The field may represent a test item, and the attribute value of the field represents a value obtained by the test corresponding to the field. Compared with the first non-standard test data, taking medical test data as an example, the fields of the second non-standard test data may be test identification, test name, normal value range, unit, sampling type, and test method, etc.
[0130] S402: concatenate the attribute values of the fields of the second non-standard detection data to generate a second non-standard feature sentence, and use the second non-standard feature sentence as the second non-standard feature data.
[0131] The attribute values of each field of the second non-standard detection data are concatenated to obtain the corresponding second non-standard feature sentence. The concatenation method of the second non-standard feature sentence is similar to the concatenation method of the above-mentioned detection sentence to be trained, and will not be repeated here.
[0132] For example, Table 1 is a second non-standard detection data provided by an embodiment of the present application:
[0133] Test ID Test Name Detection Methods Normal range unit Sampling Type AlB albumin Bromocresol green (BCG) method 35--53 g / L Drainage fluid
[0134] Table 1
[0135] Taking the second non-standard test data in Table 1 as an example, the corresponding second non-standard characteristic sentence is: AlbG. Albumin. Bromocresol green method. 35-53. g / l. Drainage fluid.
[0136] In a possible implementation, if the prediction model is generated based on the first non-standard feature sentence obtained by splicing the first attribute feature pair, the standard feature sentence obtained by splicing the second attribute feature pair, and the corresponding label training, the second non-standard feature sentence is also generated by the field name and the attribute value. The embodiment of the present application provides a specific implementation method of splicing the attribute values of each field of the second non-standard detection data to generate the second non-standard feature sentence, please refer to the following.
[0137] S403: Input the second non-standard feature data and the target standard feature data into the prediction model to obtain a matching result of whether the second non-standard feature data matches the target standard feature data; the target standard feature data is generated according to the target standard feature sentence, and the target standard feature sentence is generated by splicing the attribute values of each field of the target standard detection data, and the target standard detection data is any one of the standard detection data; the prediction model is generated according to any one of the prediction models in the above specific implementation methods.
[0138] Select one item from the standard test data as the target standard test data, use the attribute values of each field in the target standard feature data to generate the corresponding target standard feature sentence, and then obtain the target standard feature data for input into the prediction model from the target standard feature sentence.
[0139] It should be noted that, in order to increase the speed of normalization of the detection data, the existing standard detection data can be processed in advance to obtain the standard feature data corresponding to each standard detection data. When normalizing the second non-standard feature data, the target standard feature detection data is selected from the standard feature detection data, and the target standard feature data corresponding to the target standard feature detection data is obtained from the pre-obtained standard feature data for normalization of the second non-standard detection data.
[0140] The second non-standard feature data and the target standard feature data are input into a prediction model, which may be a prediction model generated according to the prediction model generation method, and a matching result is obtained to determine whether the second non-standard feature data output by the prediction model matches the target standard feature data.
[0141] S404: If the matching result is that the second non-standard feature data matches the target standard feature data, the second non-standard detection data corresponding to the second non-standard feature data is normalized to the standard detection data corresponding to the target standard feature data.
[0142] The prediction model determines the corresponding matching result according to the similarity between the second non-standard feature data and the target standard feature data. If the matching result is that the second non-standard feature data matches the target standard feature data, it means that the second non-standard test data corresponding to the second non-standard feature data matches the standard test data corresponding to the target standard feature data, and the second non-standard test data is normalized to the target standard test data to achieve normalization of the second non-standard test data.
[0143] Based on the above S401-S404, it can be known that by inputting the second non-standard feature data and the target standard feature data into the prediction model, a corresponding matching result can be obtained. The second non-standard feature data can be normalized according to the matching result, so that the prediction model can be used to realize the normalization of the test data quickly and accurately, thereby improving the efficiency of determining the standard test data for normalization of the test data.
[0144] Further, when the target standard feature sentence is generated by splicing the field names and attribute values of each field of the target standard detection data, the embodiment of the present application also provides a specific implementation method of splicing the attribute values of each field of the second non-standard detection data to generate the second non-standard feature sentence, which specifically includes:
[0145] The field name of each field in the second non-standard detection data and the corresponding attribute value form a third attribute feature pair;
[0146] Each third attribute feature pair in the second non-standard detection data is concatenated to generate a second non-standard feature sentence.
[0147] If the target standard test data is generated by concatenating the field names and attribute values of each field, then the corresponding second non-standard test data should also be generated by concatenating the field names and attribute values. Only in this way can a similarity comparison be performed in the prediction model to obtain a more accurate matching result.
[0148] First, the field name and the corresponding attribute value of each field in the second non-standard test data are combined into a third attribute feature pair. Taking the second non-standard test data in Table 1 as an example, the third attribute feature pair obtained is "AlbG|test identifier", "albumin|test name", "bromocresol green (BCG) method|test method", "35--53|normal value range", "g / L|unit", and "drainage fluid|sampling type".
[0149] In one possible implementation, the field name may be the corresponding English word, and the third attribute feature pair may be "AlbG|TERM_ID", "Albumin|ITEM_NAME", "Bromocresol green (BCG) method|METHOD_TYP", "35--53|SCALE", "g / L|UNIT_NAME", and "Drainage fluid|SAMPLE_TYP".
[0150] The third attribute feature pairs are spliced to obtain the second non-standard feature sentence. Taking the above third attribute feature pair as an example, the second non-standard feature sentence obtained is: AlbG|TERM_ID. Albumin|ITEM_NAME. Bromocresol green (BCG) method|METHOD_TYP. 35--53|SCALE. g / L|UNIT_NAME. Drainage fluid|SAMPLE_TYP. Among them, each third attribute feature is divided by a separator, and the specific separator form is not limited in the embodiment of the present application, and can be a commonly used separator such as a period and a comma.
[0151] In the embodiment of the present application, the third attribute feature pair is used to obtain the information with the field name in the second non-standard feature sentence. Then the second non-standard feature data and the target standard feature data corresponding to the second non-standard feature sentence are input into the prediction model, so that a more accurate matching result can be obtained, thereby obtaining a more accurate normalization result of the detection data.
[0152] In a possible implementation, the target standard feature data is generated according to the feature vector of the target standard feature sentence. Correspondingly, the detection data normalization method also includes:
[0153] Inputting the second non-standard feature sentence into the first language model to generate a non-standard feature vector, and using the non-standard feature vector as second non-standard feature data;
[0154] The feature vector of the target standard feature sentence is obtained by inputting the target standard feature sentence into the second language model;
[0155] The first language model and the second language model are generated according to the above-mentioned method for generating the first language model and the second language model.
[0156] In order to improve the calculation speed of the prediction model, the target standard feature sentence can be input into the second language model to obtain the corresponding feature vector, and then the target standard feature data is generated according to the feature vector of the target standard feature sentence.
[0157] In a possible implementation, in order to improve the matching speed of the second non-standard detection data, the standard feature sentence can be input into the second language model to obtain the feature vector corresponding to each standard feature sentence. The feature vector corresponding to each standard feature sentence is stored in the feature vector library. After obtaining the second non-standard feature data, the feature vector corresponding to the target standard feature sentence is selected from the feature vector library as the corresponding target standard feature data, and input into the prediction model to obtain the corresponding matching result.
[0158] Correspondingly, the second non-standard feature sentence is input into the first language model to generate a non-standard feature vector corresponding to the second non-standard feature sentence, and the non-standard feature vector is used as the second non-standard feature data as the data input into the prediction model.
[0159] It should be noted that there are two second language models corresponding to the two target standard feature sentences, namely, the target standard feature sentence composed of the attribute values of each field and the target standard feature sentence composed of the field name and attribute value of each field. The corresponding second language model can be selected according to the specific type of the target standard feature sentence.
[0160] Similarly, the second non-standard feature sentence and the first language model also have two corresponding types, and the corresponding first language model can be selected according to the type of the second non-standard feature sentence to process the non-standard feature vector.
[0161] Taking the second non-standard test data in Table 1 as an example, the second non-standard feature sentence obtained is: AlbG|TERM_ID. Albumin|ITEM_NAME. Bromocresol green (BCG) method|METHOD_TYP. 35--53|SCALE. g / L|UNIT_NAME. Drainage fluid|SAMPLE_TYP. Input into the first language model, the non-standard feature vector obtained as the second non-standard feature data is: -0.2, 0.03, -0.5, 0.06, ..., 0.33. The standard test data with LOINC code number 77148-5 is selected from the feature vector library as the target standard data. The corresponding feature vectors are: -0.17, 0.02, -0.55, 0.06, ..., 0.32. When the second non-standard feature data and the target standard feature data are input into the prediction model and the matching result is 1, the second non-standard feature data is normalized to the standard detection data with the LOINC code number of 77148-5.
[0162] Based on the above content, it can be known that in the embodiment of the present application, when the target standard feature data is generated according to the feature vector, correspondingly, the non-standard feature vector corresponding to the second non-standard feature sentence can be generated by the first language model as the second non-standard feature data. In this way, the speed of calculating the feature vector by the prediction model can be reduced, and the normalization of the second non-standard detection data can be realized more quickly.
[0163] Based on the prediction model generation method provided by the above method embodiment, the embodiment of the present application also provides a prediction model generation device, which will be described below in conjunction with the accompanying drawings.
[0164] See also Figure 5 , which is a schematic diagram of the structure of a prediction model generation device provided in an embodiment of the present application. Figure 5 As shown, the prediction model generation device includes:
[0165] A first acquisition unit 501 is configured to acquire first non-standard detection data, where the first non-standard detection data includes an attribute value of at least one field;
[0166] A first concatenation unit 502 is configured to concatenate the attribute values of each field of the first non-standard detection data to generate a first non-standard feature sentence, and use the first non-standard feature sentence as the first non-standard feature data;
[0167] A second acquisition unit 503 is used to acquire standard detection data, where the standard detection data includes an attribute value of at least one field;
[0168] The second concatenation unit 504 is used to concatenate the attribute values of each field of the standard detection data to generate a standard feature sentence, and use the standard feature sentence as the standard feature data;
[0169] The first training unit 505 is used to train and generate a prediction model using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data. The prediction model is used to output a matching result of whether the second non-standard feature data matches the target standard feature data when second non-standard feature data and standard feature data are input, so as to determine whether the second non-standard detection data corresponding to the second non-standard feature data can be normalized to the standard detection data corresponding to the standard feature data based on the matching result.
[0170] In a possible implementation, the first concatenation unit 502 is specifically configured to form a first attribute feature pair from the field name of each field in the first non-standard detection data and the corresponding attribute value; concatenate the first attribute feature pairs in the first non-standard detection data to generate a first non-standard feature sentence;
[0171] The second concatenation unit 504 is specifically configured to combine the field name of each field in the standard detection data with the corresponding attribute value to form a second attribute feature pair; and concatenate the second attribute feature pairs in the standard detection data to generate a standard feature sentence.
[0172] In a possible implementation manner, the device further includes:
[0173] The second training unit is used to train the first language model and the second language model by using the first non-standard feature sentence and the standard feature sentence.
[0174] In a possible implementation manner, the device further includes:
[0175] A first input unit is used to input the first non-standard feature sentence into the first language model to obtain a feature vector of the first non-standard feature sentence, and use the feature vector of the first non-standard feature sentence as first non-standard feature data;
[0176] The second input unit is used to input the standard feature sentence into the second language model to obtain a feature vector of the standard feature sentence, and use the feature vector of the standard feature sentence as standard feature data.
[0177] In a possible implementation manner, the first language model, the second language model, and the prediction model constitute a twin network.
[0178] Based on the method for normalizing detection data provided in the above method embodiment, the embodiment of the present application also provides a device for normalizing detection data, and the device for normalizing detection data will be described below in conjunction with the accompanying drawings.
[0179] See also Figure 6 , which is a schematic diagram of the structure of a device for normalizing detection data provided in an embodiment of the present application. Figure 6 As shown, the device for realizing normalization of detection data includes:
[0180] The third acquisition unit 601 is used to acquire second non-standard detection data, where the second non-standard detection data includes an attribute value of at least one field;
[0181] The third concatenation unit 602 is used to concatenate the attribute values of each field of the second non-standard detection data to generate a second non-standard feature sentence, and use the second non-standard feature sentence as the second non-standard feature data;
[0182] The third input unit 603 is used to input the second non-standard feature data and the target standard feature data into the prediction model to obtain a matching result of whether the second non-standard feature data matches the target standard feature data; the target standard feature data is generated according to the target standard feature sentence, and the target standard feature sentence is generated by splicing the attribute values of each field of the target standard detection data, and the target standard detection data is any one of the standard detection data; the prediction model is generated according to the prediction model generation method described in any of the above embodiments;
[0183] The normalization unit 604 is configured to normalize the second non-standard detection data corresponding to the second non-standard feature data to the standard detection data corresponding to the target standard feature data if the matching result is that the second non-standard feature data matches the target standard feature data.
[0184] In a possible implementation, when the target standard feature sentence is generated by splicing the field names and attribute values of each field of the target standard detection data, the third splicing unit 602 is specifically used to form a third attribute feature pair by combining the field name of each field in the second non-standard detection data with the corresponding attribute value;
[0185] Each third attribute feature pair in the second non-standard detection data is concatenated to generate a second non-standard feature sentence.
[0186] In a possible implementation, when the target standard feature data is generated according to a feature vector of a target standard feature sentence, the device further includes:
[0187] A fourth input unit, configured to input the second non-standard feature sentence into the first language model, generate a non-standard feature vector, and use the non-standard feature vector as second non-standard feature data;
[0188] The feature vector of the target standard feature sentence is obtained by inputting the target standard feature sentence into a second language model; the first language model and the second language model are generated according to the above-mentioned prediction model generation method.
[0189] In addition, an embodiment of the present application also provides a prediction model generation device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program, any implementation of the prediction model generation method described in the above embodiment is implemented. An embodiment of the present application also provides a device for normalizing detection data, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, when the processor executes the computer program, any implementation of the method for normalizing detection data described in the above embodiment is implemented.
[0190] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device executes any implementation of the prediction model generation method described in the above embodiments, or executes any implementation of the detection data normalization method described in the above embodiments.
[0191] According to the matching result output by the prediction model, the standard test data that can be normalized by the second non-standard test data can be determined, so that the standard test data normalized by the second non-standard test data can be obtained more quickly through the prediction model. In addition, the prediction model generated by using the first non-standard feature data and the standard feature data and the corresponding labels is more accurate, so that the normalized standard test data corresponding to the second non-standard test data can be accurately determined according to the matching result.
[0192] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the various embodiments can be referred to each other. For the system or device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0193] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0194] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0195] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0196] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A prediction model generation method, characterized in that: The method comprises: Acquire first non-standard detection data, where the first non-standard detection data includes an attribute value of at least one field; splicing the attribute values of each field of the first non-standard detection data to generate a first non-standard feature sentence, and using the first non-standard feature sentence as the first non-standard feature data; Acquire standard detection data, wherein the standard detection data includes an attribute value of at least one field; splicing the attribute values of each field of the standard detection data to generate a standard feature sentence, and using the standard feature sentence as standard feature data; Using the first non-standard feature sentence and the standard feature sentence to train a first language model and a second language model; Inputting the first non-standard feature sentence into the first language model to obtain a feature vector of the first non-standard feature sentence, and using the feature vector of the first non-standard feature sentence as first non-standard feature data; Inputting the standard feature sentence into the second language model to obtain a feature vector of the standard feature sentence, and using the feature vector of the standard feature sentence as standard feature data; A prediction model is trained and generated using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data. The prediction model is used to output a matching result of whether the second non-standard feature data matches the target standard feature data when second non-standard feature data and target standard feature data are input, so as to determine whether second non-standard detection data corresponding to the second non-standard feature data can be normalized to standard detection data corresponding to the standard feature data based on the matching result.
2. The method according to claim 1, characterized in that The step of concatenating the attribute values of the fields of the first non-standard detection data to generate a first non-standard feature sentence includes: Combining the field name of each field in the first non-standard detection data with the corresponding attribute value into a first attribute feature pair; splicing the first attribute feature pairs in the first non-standard detection data to generate a first non-standard feature sentence; The step of concatenating the attribute values of each field of the standard detection data to generate a standard feature sentence includes: The field name of each field in the standard detection data and the corresponding attribute value form a second attribute feature pair; Each second attribute feature pair in the standard detection data is concatenated to generate a standard feature sentence.
3. The method according to claim 1, characterized in that The first language model, the second language model, and the prediction model constitute a twin network.
4. A method for normalizing detection data, characterized in that: The method comprises: Acquire second non-standard detection data, where the second non-standard detection data includes an attribute value of at least one field; splicing the attribute values of each field of the second non-standard detection data to generate a second non-standard feature sentence, and using the second non-standard feature sentence as the second non-standard feature data; The second non-standard feature data and the target standard feature data are input into the prediction model to obtain a matching result of whether the second non-standard feature data matches the target standard feature data; the target standard feature data is generated according to the target standard feature sentence, and the target standard feature sentence is generated by splicing the attribute values of each field of the target standard detection data, and the target standard detection data is any one of the standard detection data; the prediction model is generated according to the method according to any one of claims 1 to 3; If the matching result is that the second non-standard feature data matches the target standard feature data, the second non-standard detection data corresponding to the second non-standard feature data is normalized to the standard detection data corresponding to the target standard feature data.
5. The method according to claim 4, characterized in that When the target standard feature sentence is generated by splicing the field names and attribute values of each field of the target standard detection data, the attribute values of each field of the second non-standard detection data are spliced to generate the second non-standard feature sentence, including: Combining the field name of each field in the second non-standard detection data with the corresponding attribute value into a third attribute feature pair; Each third attribute feature pair in the second non-standard detection data is concatenated to generate a second non-standard feature sentence.
6. The method according to claim 4 or 5, characterized in that: When the target standard feature data is generated according to the feature vector of the target standard feature sentence, the method further includes: Inputting the second non-standard feature sentence into the first language model to generate a non-standard feature vector, and using the non-standard feature vector as second non-standard feature data; The feature vector of the target standard feature sentence is obtained by inputting the target standard feature sentence into a second language model; The first language model and the second language model are generated according to the method according to claim 3.
7. A prediction model generation device, characterized in that: The device comprises: A first acquisition unit, configured to acquire first non-standard detection data, wherein the first non-standard detection data includes an attribute value of at least one field; A first concatenation unit, configured to concatenate the attribute values of the fields of the first non-standard detection data to generate a first non-standard feature sentence, and use the first non-standard feature sentence as the first non-standard feature data; A second acquisition unit, configured to acquire standard detection data, wherein the standard detection data includes an attribute value of at least one field; A second concatenation unit is used to concatenate the attribute values of each field of the standard detection data to generate a standard feature sentence, and use the standard feature sentence as the standard feature data; A second training unit, configured to train a first language model and a second language model using the first non-standard feature sentence and the standard feature sentence; A first input unit is used to input the first non-standard feature sentence into the first language model to obtain a feature vector of the first non-standard feature sentence, and use the feature vector of the first non-standard feature sentence as first non-standard feature data; A second input unit is used to input the standard feature sentence into the second language model to obtain a feature vector of the standard feature sentence, and use the feature vector of the standard feature sentence as standard feature data; The first training unit is used to train and generate a prediction model using the first non-standard feature data, the standard feature data, and a label indicating whether the first non-standard feature data matches the standard feature data. The prediction model is used to output a matching result of whether the second non-standard feature data matches the target standard feature data when second non-standard feature data and target standard feature data are input, so as to determine whether second non-standard detection data corresponding to the second non-standard feature data can be normalized to standard detection data corresponding to the standard feature data based on the matching result.
8. A device for normalizing detection data, characterized in that: The device comprises: a third acquisition unit, configured to acquire second non-standard detection data, where the second non-standard detection data includes an attribute value of at least one field; A third concatenation unit is used to concatenate the attribute values of each field of the second non-standard detection data to generate a second non-standard feature sentence, and use the second non-standard feature sentence as the second non-standard feature data; a third input unit, for inputting the second non-standard feature data and the target standard feature data into a prediction model to obtain a matching result of whether the second non-standard feature data matches the target standard feature data; the target standard feature data is generated according to a target standard feature sentence, the target standard feature sentence is generated by splicing attribute values of each field of the target standard detection data, and the target standard detection data is any one of the standard detection data; the prediction model is generated according to the method according to any one of claims 1 to 3; A normalization unit is configured to normalize second non-standard detection data corresponding to the second non-standard feature data to standard detection data corresponding to the target standard feature data if the matching result is that the second non-standard feature data matches the target standard feature data.
9. A prediction model generation device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the prediction model generation method according to any one of claims 1 to 3 is implemented.
10. A device for normalizing detection data, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for normalizing detection data as described in any one of claims 4 to 6 is implemented.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device executes the prediction model generation method as described in any one of claims 1 to 3, or the detection data normalization method as described in any one of claims 4 to 6.
Citation Information
Patent Citations
Inspection item processing method and device, storage medium and equipment
CN111737533A