CN-115188462-B - Certificate matching method, device, equipment and storage medium
Abstract
The invention relates to the technical field of artificial intelligence, and particularly discloses a method, a device, equipment and a storage medium for pattern matching, wherein the method comprises the steps of obtaining a symptom sequence to be matched, mapping the symptom sequence to be matched by using a certification knowledge base to obtain a corresponding first certification list to be matched, and constructing the certification knowledge base based on pre-obtained certification experience knowledge; the symptom sequence to be matched is input into a pre-trained syndrome mapping model to obtain a second syndrome list to be matched, the first syndrome list to be matched and the second syndrome list to be matched are integrated to obtain a final syndrome list to be matched, similarity matching is carried out on the final syndrome list to be matched and the known syndrome list corresponding to each known syndrome to obtain a matched target known syndrome and output. According to the invention, through combining the experience knowledge of the Chinese medicine syndrome factors with the machine learning model, the accuracy of the syndrome pattern matching is improved, and meanwhile, the interpretability of the matching result in the field of Chinese medicine is ensured.
Inventors
- WANG LONG
- HU YIYI
- RUAN XIAOWEN
- CHEN YUANXU
Assignees
- 平安科技(深圳)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220520
Claims (8)
- 1. A pattern matching method, comprising: obtaining a symptom sequence to be matched, and mapping the symptom sequence to be matched by using a prover knowledge base to obtain a corresponding first prover list to be matched, wherein the prover knowledge base is constructed based on pre-obtained empirical knowledge of provers; Inputting the symptom sequence to be matched into a pre-trained evidence mapping model to obtain a second evidence list to be matched, wherein the evidence mapping model is obtained by training based on a pre-obtained sample evidence and a corresponding evidence list and an evidence knowledge base; integrating the first to-be-matched evidence list and the second to-be-matched evidence list to obtain a final to-be-matched evidence list; Performing similarity matching on the final to-be-matched evidence list and the known evidence list corresponding to each known evidence, obtaining and outputting a matched target known evidence; The integrating the first to-be-matched evidence list and the second to-be-matched evidence list to obtain a final to-be-matched evidence list comprises the following steps: Converting the first to-be-matched evidence list into a first vectorization representation, and converting the second to-be-matched evidence list into a second vectorization representation; inputting the first vectorization representation and the second vectorization representation into a pre-trained attention model for weighted calculation to obtain a final vectorization representation, wherein the attention model is obtained by training based on a sample pattern and a target evidence list of a corresponding target pattern; Converting the final vectorized representation into the final to-be-matched evidence list; the attention model training method comprises the following steps: obtaining a sample pattern and a corresponding target pattern, and a target pattern list of the target pattern; Mapping the sample pattern by using the pattern element knowledge base to obtain a first sample pattern list, and analyzing the sample pattern by using the pattern element mapping model to obtain a second sample pattern list; converting the first sample element list and the second sample element list into vectorized representations, and constructing a query vector by taking the vectorized representations of the first sample element list and the second sample element list as elements; inputting the query vector to an attention model to be trained, outputting a final sample vectorization representation, and converting the final sample vectorization representation into a final sample evidence list; and reversely updating the weight parameters of the attention model based on the final sample evidence list, the target evidence list and a pre-constructed scoring function.
- 2. The method for matching a document according to claim 1, wherein the integrating the first document list to be matched with the second document list to be matched to obtain a final document list to be matched includes: And merging the first to-be-matched evidence list and the second to-be-matched evidence list to obtain the final to-be-matched evidence list.
- 3. The pattern matching method according to claim 1, wherein the pattern mapping model is implemented based on an LDA topic model; The step of inputting the symptom sequence to be matched into a pre-trained prover mapping model comprises the following steps: Inputting the symptom sequence to be matched into a pre-trained LDA topic model, extracting vector representations of a plurality of topics from the symptom sequence to be matched by using the LDA topic model, and training the LDA topic model based on a pre-acquired sample pattern, a corresponding evidence list and a evidence knowledge base; And converting the vector representations of the topics into the second to-be-matched evidence element list.
- 4. The pattern matching method according to claim 1, wherein the pattern mapping model is implemented based on a variational self-encoder; The step of inputting the symptom sequence to be matched into a pre-trained prover mapping model comprises the following steps: Inputting the symptom sequence to be matched to a pre-trained variation self-encoder to obtain an intermediate layer representation of the variation self-encoder, wherein the variation self-encoder is obtained based on sample pattern training prepared in advance, when the variation self-encoder is trained, input data of an input layer are the sample pattern, output data of an output layer are self-coding output pattern, output of the intermediate layer is a prime representation of the sample pattern, and parameters of the intermediate layer are trained by utilizing fitting processes of the sample pattern and the self-coding output pattern; and the middle layer is expressed as the second to-be-matched evidence list.
- 5. The method for matching a pattern according to claim 1, wherein the matching the final to-be-matched pattern element list with the known pattern element list corresponding to each known pattern to obtain and output a matched target known pattern, includes: calculating intersection and union of the to-be-matched evidence list and the known evidence list, wherein the final to-be-matched evidence list and the known evidence list both comprise a plurality of evidence elements; Calculating the ratio of the intersection to the union to obtain a similarity value of the to-be-matched evidence list and the known evidence list; and selecting a target known certification element corresponding to the known certification element list with the highest similarity value for output.
- 6. A pattern matching apparatus for implementing the pattern matching method according to any one of claims 1 to 5, comprising: The first mapping module is used for obtaining a symptom sequence to be matched, mapping the symptom sequence to be matched by using a prover knowledge base to obtain a corresponding first evidence list to be matched, and the prover knowledge base is constructed based on pre-obtained empirical knowledge of provers; The second mapping module is used for inputting the symptom sequence to be matched into a pre-trained evidence mapping model to obtain a second evidence list to be matched, and the evidence mapping model is obtained by training based on a pre-obtained sample evidence and a corresponding evidence list and an evidence knowledge base; the integration module is used for integrating the first to-be-matched evidence list and the second to-be-matched evidence list to obtain a final to-be-matched evidence list; and the matching module is used for carrying out similarity matching on the final to-be-matched evidence list and the known evidence list corresponding to each known evidence, obtaining a matched target known evidence and outputting the matched target known evidence.
- 7. A computer device comprising a processor, a memory coupled to the processor, the memory having stored therein program instructions that, when executed by the processor, cause the processor to perform the steps of the pattern matching method of any of claims 1-5.
- 8. A storage medium storing program instructions enabling the method for pattern matching according to any one of claims 1 to 5.
Description
Certificate matching method, device, equipment and storage medium Technical Field The present application relates to the field of artificial intelligence technologies, and in particular, to a method, an apparatus, a device, and a storage medium for pattern matching. Background In the field of traditional Chinese medicine, a "pattern" is a characteristic (or symptomatic) response and generalization of a certain stage in the disease cycle or progression. In the process of disease differentiation in traditional Chinese medicine, syndrome differentiation is a key link in the process. The theory of syndrome differentiation is the basic principle of traditional Chinese medicine, and the thinking process of syndrome differentiation in traditional Chinese medicine is a process of distinguishing the disease location and the pathogenic factors from each other according to the clinical symptoms and symptoms, and then combining the symptoms and signs into a syndrome type, and the traditional syndrome differentiation mainly depends on the personal knowledge and experience of doctors. With the development of artificial intelligence technology, the traditional Chinese medicine syndrome dialectical process can be realized by methods such as text similarity matching, deep network and the like. The method for matching the text similarity only can identify the distance between texts by editing distance, cosine distance and other methods, cannot identify the semantics of the texts, has limited text matching capability and lower accuracy, adopts a method for matching the similarity between text embedded vectors and a depth network, firstly maps two patterns to be matched to the embedded vectors, then inputs the embedded vectors into the depth network model, finally outputs the pattern similarity, and recalls the pattern with higher pattern similarity. Disclosure of Invention The application provides a pattern matching method, device, equipment and storage medium, which are used for solving the problems of low accuracy and lack of interpretability in the traditional Chinese medicine field of the existing pattern matching. The method comprises the steps of obtaining a symptom sequence to be matched, mapping the symptom sequence to be matched by using a prover knowledge base to obtain a corresponding first evidence list to be matched, constructing the prover knowledge base based on pre-obtained evidence empirical knowledge, inputting the symptom sequence to be matched into a pre-trained prover mapping model to obtain a second evidence list to be matched, training the prover mapping model based on the pre-obtained sample evidence and the corresponding evidence list and the evidence knowledge base, integrating the first evidence list to be matched and the second evidence list to obtain a final evidence list to be matched, performing similarity matching on the final evidence list to be matched and the known evidence list corresponding to each known evidence, and obtaining and outputting a matched target known evidence. The method for obtaining the final to-be-matched evidence element list comprises the step of combining the first to-be-matched evidence element list and the second to-be-matched evidence element list to obtain the final to-be-matched evidence element list. The method comprises the steps of converting a first to-be-matched evidence list into a first vectorization representation, converting a second to-be-matched evidence list into a second vectorization representation, inputting the first vectorization representation and the second vectorization representation into a pre-trained attention model for weighting calculation to obtain a final vectorization representation, training the attention model based on a sample evidence and a corresponding target evidence to obtain the final to-be-matched evidence list, and converting the final vectorization representation into the final to-be-matched evidence list. The attention model training method comprises the steps of obtaining a sample pattern and a corresponding target pattern and a target pattern list of the target pattern, mapping the sample pattern by using a pattern knowledge base to obtain a first sample pattern list, analyzing the sample pattern by using a pattern mapping model to obtain a second sample pattern list, converting the first sample pattern list and the second sample pattern list into vectorized representations, constructing a query vector by taking the vectorized representations of the first sample pattern list and the second sample pattern list as elements, inputting the query vector into an attention model to be trained, outputting a final sample vectorized representation, converting the final sample vectorized representation into a final sample pattern list, and reversely updating weight parameters of the attention model based on the final sample pattern list and the target pattern list and a pre-constructed loss function. The method comprises the steps o