Application methods, devices, equipment, and storage media of semantic understanding recall models
By extracting corpus information related to the input information from the semantic sample library of the semantic understanding recall model, pre-training it, and using two representation layers for semantic recognition, the problem of high matching error rate of existing recall models is solved, and more accurate semantic recognition and search result accuracy are achieved.
Patent Information
- Application Number
- CN202210445329.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-04-26
AI Technical Summary
Existing recall models tend to have high error rates when matching semantic content because their sample training process is relatively simple and straightforward.
By extracting corpus information that is related to the input information from the semantic sample library of the target semantic understanding recall model, pre-training it and converting it into character vectors, semantic recognition is performed using two representation layers to obtain semantic information of the character vectors in a large and small range, and a matching threshold is determined using a preset algorithm.
It improves the accuracy of semantic recognition and the precision of matching thresholds, thereby enhancing the accuracy of user search results.
Smart Images

Figure CN114741475B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and digital healthcare, and in particular to a method, apparatus, device, and storage medium for applying a semantic understanding recall model. Background Technology
[0002] Currently, with the continuous development of information technology, it is becoming increasingly convenient to find and search for information online, and the efficiency of finding and searching for information is constantly improving.
[0003] In related technologies, different recall models can be pre-set for different industries. When a user searches, this recall model can match suitable content based on the specific search query. This recall model is a learned, trained model, specifically trained using massive amounts of data. For example, a recall model used to search for doctors can be trained by pre-setting a large amount of doctor and patient information, ultimately generating a recall model that matches the user's search information (e.g., patient condition) with the doctor's information, thus fulfilling the user's search needs in subsequent practical applications.
[0004] However, existing recall models have a relatively simple and singular sample training process, so when using these recall models to perform search tasks and obtain matching semantic content, they are prone to a high matching error rate. Summary of the Invention
[0005] This invention provides an application method, apparatus, device, and storage medium for a semantic understanding recall model that can improve the breadth, accuracy, and timeliness of information recognition.
[0006] To address the aforementioned technical problems, one embodiment of this invention employs the following technical solution: A method for applying a semantic understanding recall model is provided, comprising: extracting M corpus information items that have a first relationship with the input information from the semantic sample library corresponding to the target semantic understanding recall model, where M is a positive integer; performing pre-training on the M corpus information items and the input information, converting the M corpus information items and the input information into X character vectors, where X is a positive integer greater than M by 1; inputting each of the X character vectors into a first representation layer, performing semantic recognition, and obtaining X first semantic information items. Each of the aforementioned X first semantic information pieces is the semantic information of the sub-character vectors within a predetermined range in each of the aforementioned character vectors, and each of the aforementioned character vectors includes at least one sub-character vector; each of the aforementioned character vectors is input to the second representation layer, semantic recognition is performed, and X second semantic information pieces are obtained, each of the aforementioned X second semantic information pieces is the semantic relationship information between the sub-character vectors in each of the aforementioned character vectors; based on the aforementioned X first semantic information pieces and the aforementioned X second semantic information pieces, a preset algorithm is used to determine M matching thresholds between the aforementioned M corpus information pieces and the aforementioned input information.
[0007] Optionally, the application method of the semantic understanding recall model provided in this embodiment of the invention may include: establishing a sample library; the sample library includes N samples, the sample library includes: a positive sample library and a negative sample library; the sample information in the positive sample library is sample information whose relevance to the input information is greater than or equal to a first threshold, and the sample information in the negative sample library is sample information whose relevance to the input information is less than the first threshold, where N is an integer.
[0008] Optionally, before extracting the M corpus information that has a first relationship with the input information, the application method of the semantic understanding recall model provided in this embodiment of the invention may include: training the semantic understanding recall model using the sample information in the sample library; and obtaining the target semantic understanding recall model.
[0009] Optionally, when the above-mentioned sample library is the above-mentioned positive sample library, the application method of the semantic understanding recall model provided in the above-mentioned sample library establishment may include: storing positive sample information into the positive sample library; wherein, the above-mentioned positive sample information includes at least one of the following: first matching relationship information including symptom information and doctor information, second matching relationship information with long-tail markers, and third matching relationship information including doctor expertise and doctor information; the above-mentioned first matching relationship information satisfies a second threshold, and the above-mentioned long-tail markers are refined information of the first matching relationship.
[0010] Optionally, when the positive sample information is the second matching relationship information with long-tail markers, before establishing the sample library, the application method of the semantic understanding recall model provided in this embodiment of the invention may include: filtering the matching relationship information including symptom information and doctor information, obtaining the second matching relationship information, wherein the second matching relationship information includes at least one set of matching relationship information; and adding reinforcement information to each matching relationship information in the second matching relationship information.
[0011] Optionally, when the above-mentioned sample library is the above-mentioned negative sample library, the application method of the semantic understanding recall model provided in the above-mentioned sample library establishment may include: storing the above-mentioned negative sample information into the negative sample library; wherein, the above-mentioned negative sample information includes at least one of the following: first negative sample information, second negative sample information; the above-mentioned first negative sample information includes fourth matching relationship information of symptom information and doctor information, the above-mentioned fourth matching relationship information is matching relationship information that does not meet the above-mentioned second threshold but meets the third threshold; the above-mentioned second negative sample information includes fifth matching relationship information of symptom information and doctor information, the above-mentioned fifth matching relationship information is matching relationship information that does not meet the above-mentioned third threshold.
[0012] Optionally, the above-mentioned inputting each of the X character vectors into a first representation layer to perform semantic recognition and obtain X pieces of first semantic information includes: inputting each of the X character vectors into a first representation layer used to indicate the overall semantic meaning corresponding to the X character vectors, performing semantic recognition, and obtaining X pieces of first semantic information; the above-mentioned inputting each of the X character vectors into a second representation layer to perform semantic recognition and obtain X pieces of second semantic information includes: inputting each of the X character vectors into a second representation layer used to indicate the semantic relationship between each of the character vectors and the semantic meaning of each of the character vectors, performing semantic recognition, and obtaining X pieces of second semantic information.
[0013] To address the aforementioned technical problems, this invention also provides an application device for a semantic understanding recall model, comprising: an execution module, configured to extract M corpus information pieces that have a first relation with the input information from a semantic sample library corresponding to the target semantic understanding recall model, where M is a positive integer; the execution module is further configured to perform pre-training on the M corpus information pieces and the input information, converting the M corpus information pieces and the input information into X character vectors, where X is a positive integer greater than M by 1; and an acquisition module, configured to input each of the X character vectors converted by the execution module into a first representation layer, perform semantic recognition, and acquire X first semantic information pieces, wherein the X first semantic information pieces are... Each first semantic information in the semantic information is the semantic information of the sub-character vectors in each character vector within a predetermined range, and each character vector includes at least one sub-character vector; the acquisition module is further configured to input each character vector converted by the execution module into the second representation layer, perform semantic recognition, and acquire X second semantic information, each of the X second semantic information being the semantic relationship information between the sub-character vectors in each character vector; the determination module is configured to determine M matching thresholds between the M corpus information and the input information based on the X first semantic information and the X second semantic information acquired by the acquisition module using a preset algorithm.
[0014] Optionally, the application device of the semantic understanding recall model further includes: a building module for building a sample library; the sample library includes N samples, and the sample library includes: a positive sample library and a negative sample library; the sample information in the positive sample library is sample information whose relevance to the input information is greater than or equal to a first threshold, and the sample information in the negative sample library is sample information whose relevance to the input information is less than the first threshold, where N is an integer.
[0015] Optionally, the application device of the above semantic understanding recall model further includes: a utilization module for training the above semantic understanding recall model using sample information in the above sample library; and an acquisition module for acquiring the above target semantic understanding recall model.
[0016] Optionally, when the sample library is the positive sample library, the application device of the semantic understanding recall model further includes: a storage module for storing positive sample information into the positive sample library; wherein the positive sample information includes at least one of the following: first matching relationship information including symptom information and doctor information, second matching relationship information with long-tail markers, and third matching relationship information including doctor expertise and doctor information; the first matching relationship information satisfies a second threshold, and the long-tail markers are refined information of the first matching relationship.
[0017] Optionally, when the positive sample information is the second matching relationship information with long-tail markers, the application device of the semantic understanding recall model further includes: the acquisition module, which is further used to filter the matching relationship information including symptom information and doctor information, and acquire the second matching relationship information, wherein the second matching relationship information includes at least one set of matching relationship information; and the adding module, which is used to add reinforcement information to each matching relationship information in the second matching relationship information.
[0018] Optionally, when the sample library is the negative sample library, the application device of the semantic understanding recall model further includes: a storage module for storing the negative sample information into the negative sample library; wherein the negative sample information includes at least one of the following: first negative sample information, second negative sample information; the first negative sample information includes fourth matching relationship information of symptom information and doctor information, the fourth matching relationship information being matching relationship information that does not meet the second threshold but meets the third threshold; the second negative sample information includes fifth matching relationship information of symptom information and doctor information, the fifth matching relationship information being matching relationship information that does not meet the third threshold.
[0019] Optionally, the execution module is specifically configured to input each of the X character vectors into a first representation layer that indicates the overall semantic meaning of the X character vectors, perform semantic recognition, and obtain X first semantic information; the execution module is also specifically configured to input each of the X character vectors into a second representation layer that indicates the semantic relationship between each character vector and the semantic meaning of each character vector, perform semantic recognition, and obtain X second semantic information.
[0020] To address the aforementioned technical problems, this invention also provides a device, specifically a computer device, including a memory and a processor. The memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the application method of the semantic understanding recall model described above.
[0021] To address the aforementioned technical problems, this embodiment of the invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the application method of the semantic understanding recall model described above.
[0022] The beneficial effects of this invention are as follows: First, M corpus information pieces with a first relationship to the input information are extracted from the semantic sample library corresponding to the target semantic understanding recall model. Then, pre-training is performed on the M corpus information pieces and the input information to transform them into X character vectors. Next, each of the X character vectors is input into a first representation layer for semantic recognition to obtain X first semantic information pieces. Then, each character vector is input into a second representation layer for semantic recognition to obtain X second semantic information pieces. Finally, based on the X first and X second semantic information pieces, a preset algorithm is used to determine M matching thresholds between the M corpus information pieces and the input information. Thus, by performing semantic recognition on the character vectors through two representation layers, the semantics of the character vectors within a large range and the semantics of the character vectors within a small range can be obtained, thereby performing semantic recognition more accurately and determining the M matching thresholds between the extracted M corpus information pieces and the input information. This improves the accuracy of determining the correlation between the corpus information and the input information, further improving the accuracy of subsequent user search content. Attached Figure Description
[0023] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0024] Figure 1 This is a basic flowchart illustrating the application method of a semantic understanding recall model according to a specific embodiment of the present invention.
[0025] Figure 2 This is a schematic diagram of the basic structure of an application device for a semantic understanding recall model according to an embodiment of the present invention.
[0026] Figure 3 This is a basic structural block diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0027] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0028] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the word “comprising” as used in the specification of this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0029] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0030] Those skilled in the art will understand that the term "terminal" as used herein includes both devices that are wireless signal receivers, devices that are wireless signal receivers without transmitting capability, and devices with receiving and transmitting hardware, having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such devices may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service) that can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant) that may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar, and / or GPS (Global Positioning System) receiver; and conventional laptop and / or handheld computers or other devices that have and / or include a radio frequency receiver. As used herein, "terminal" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally, and / or in a distributed manner, operating in any other location on Earth and / or in space. "Terminal" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.
[0031] Please see Figure 1 , Figure 1 The basic flowchart of the application method of the semantic understanding recall model provided in this embodiment is shown, including steps 201 to 205:
[0032] Step 201: Extract M corpus information that have a first relation to the input information from the semantic sample library corresponding to the target semantic understanding recall model.
[0033] In this embodiment of the invention, M is a positive integer.
[0034] In this embodiment of the invention, the input information described above is any information input by the user.
[0035] In one example, the input information could be symptom information corresponding to a disease entered by the user. For example, diarrhea, leukemia.
[0036] In this embodiment of the invention, the target semantic understanding recall model is used to identify input information and select corpus information related to the input information from the semantic sample library of the target semantic understanding recall model.
[0037] It is understandable that the aforementioned target semantic understanding recall model is a semantic understanding recall model generated after training using samples from a pre-set sample library. It should be noted that the sample library used to train the target semantic understanding recall model is different from the aforementioned semantic sample library.
[0038] In this embodiment of the invention, the above-mentioned M corpus information can be any information in the semantic sample library, and this embodiment of the invention does not limit it.
[0039] In this embodiment of the invention, the first relationship can be a pre-preset relationship or a user-defined relationship, and this embodiment of the invention does not limit it.
[0040] In one embodiment, the aforementioned first relationship can be a relationship between the input information and M corpus information with a correlation greater than a first preset threshold. For example, when the input information is "diarrhea", the semantic understanding recall model extracts two corpus information from the semantic sample library with a correlation greater than the first preset threshold with "diarrhea", namely, Dr. Li A and Dr. Wang B.
[0041] Step 202: Perform pre-training on the above M corpus information and the above input information, and transform the above M corpus information and the above input information into X character vectors.
[0042] In this embodiment of the invention, X is a positive integer that is 1 greater than M.
[0043] In this embodiment of the invention, the training method corresponding to the pre-training can be preset in advance or customized by the user, and this embodiment of the invention does not limit it.
[0044] It is understood that, in this embodiment of the invention, the above-mentioned M corpus information and input information are text information. The semantic understanding recall model can identify, process and obtain information data information of the matching threshold between the input information and the corpus information. Therefore, it is necessary to perform pre-training on the M corpus information to transform the above-mentioned M corpus information into M word vectors (one-hot) that the semantic understanding recall model can identify and process.
[0045] In one embodiment, the pre-training method described above is to perform transformation training using a tool that converts words into vector form, such as word2vec (word to vector).
[0046] Furthermore, the above pre-training requires pre-training the input information and the corpus information separately, thereby obtaining the character vectors of the input information and the M character vectors corresponding to the M corpus information respectively. Finally, the X character vectors include: the character vector corresponding to 1 input information and the M character vectors corresponding to the M corpus information.
[0047] Step 203: Input each of the above X character vectors into the first representation layer, perform semantic recognition, and obtain X first semantic information.
[0048] In this embodiment of the invention, each of the X first semantic information is the semantic information of the sub-character vector within a predetermined range in each character vector, and each character vector includes at least one sub-character vector. For example, when the input information is "diarrhea", the corresponding character vector is the character vector of "diarrhea", and the corresponding sub-character vectors are the character vectors corresponding to "diarrhea", "diarrhea", and "sub-character vectors", respectively.
[0049] It is understandable that the semantic relationship between the sub-vectors in each of the above-mentioned character vectors is: the semantic relationship of the sub-vectors within a large range; specifically, it reflects the semantic relationship between the sub-vectors and the entire character vector within the context. For example, when the input information is "diarrhea", the character vector corresponding to this input information is input into the first representation layer, which will associate the semantic relationships between the contexts of the character vectors corresponding to "diarrhea", "diarrhea", and "child" in "diarrhea", and finally obtain the first semantic information.
[0050] Step 204: Input each of the above word vectors into the second representation layer, perform semantic recognition, and obtain X pieces of second semantic information.
[0051] In this embodiment of the invention, each of the above X second semantic information is the semantic relationship information between the sub-word vectors in each word vector.
[0052] It is understandable that the semantic relationship information between the sub-character vectors in each of the above character vectors is as follows: the semantic relationship between each of the above sub-character vectors. For example, when the input information is "diarrhea", the character vector corresponding to the input information is input into the second representation layer, and the semantic relationship between the character vectors corresponding to "diarrhea", "diarrhea", and "child" in "diarrhea" is associated, and finally the second semantic information is obtained.
[0053] Optionally, in the application method of the semantic understanding recall model provided in the embodiments of the present invention: the first representation layer is a Long Short-Term Memory (LTSM) network. ) The second representation layer mentioned above is a Convolutional Neural Network (CNN). ) .
[0054] Step 205: Based on the above X first semantic information and the above X second semantic information, use a preset algorithm to determine the M matching thresholds between the above M corpus information and the above input information.
[0055] For example, after obtaining the above X first semantic information and X second semantic information, the corresponding content in the X first semantic information and X second semantic information is combined as representation layer information.
[0056] Example 1: Given the input information "diarrhea" and M corpus entries for "Dr. Li A" and "Dr. Wang B", after obtaining the first and second semantic information corresponding to "diarrhea", the representation layer information for "diarrhea" is obtained by combining the first and second semantic information corresponding to "diarrhea". Similarly, after obtaining the first and second semantic information corresponding to "Dr. Li A", the representation layer information for "Dr. Li A" is obtained by combining the first and second semantic information corresponding to "Dr. Wang B".
[0057] For example, when determining the M matching thresholds between the M corpus information and the input information, it is necessary to match the representation layer information corresponding to each of the M corpus information with the input information to obtain the matching threshold.
[0058] Example 2: Combining with Example 1 above, after obtaining the representation layer information corresponding to "diarrhea", "Dr. Li A" and "Dr. Wang B" respectively, the matching thresholds of "diarrhea" and "Dr. Li A" and "Dr. Wang B" are calculated using a preset algorithm.
[0059] For example, the above-mentioned preset algorithm can be preset in advance or predefined by the user, and the present invention does not limit it in this respect.
[0060] In the application method of the semantic understanding recall model provided in this embodiment of the invention, M corpus information that have a first relationship with the input information are first extracted from the semantic sample library corresponding to the target semantic understanding recall model. Then, pre-training is performed on the M corpus information and the input information to convert the M corpus information and the input information into X character vectors. Then, each of the X character vectors is input into a first representation layer for semantic recognition to obtain X first semantic information. Then, each of the X character vectors is input into a second representation layer for semantic recognition to obtain X second semantic information. Finally, based on the X first semantic information and the X second semantic information, a preset algorithm is used to determine M matching thresholds between the M corpus information and the input information. In this way, by performing semantic recognition on the character vectors through two representation layers, the semantics of the character vectors in a large range and the semantics of the character vectors in a small range can be obtained, thereby performing semantic recognition more accurately and determining the M matching thresholds between the extracted M corpus information and the input information. This improves the accuracy of determining the correlation between the corpus information and the input information, and further improves the accuracy of subsequent user search content.
[0061] Optionally, in this embodiment of the invention, the application method of the semantic understanding recall model provided by this embodiment of the invention further includes the following step A:
[0062] Step A: Establish a sample library.
[0063] For example, the sample library includes N samples.
[0064] For example, the above sample library includes: a positive sample library and a negative sample library.
[0065] Understandably, the aforementioned sample library is used to train the semantic understanding recall model. Generally, a semantic understanding recall model can be used to calculate the matching degree between user input information and the corpus information in its own semantic sample library. Typically, after receiving input information, the semantic understanding recall model needs to first select several pieces of corpus information from its semantic sample library that are highly relevant to the user input information, and then further compare the matching degree between the selected corpus information and the input information, so as to subsequently filter out the corpus information with the highest matching degree, which is the corpus information that the user truly needs, for the user to use.
[0066] As can be seen from the above, before the semantic understanding recall model completes the process of selecting several corpus information with high relevance to the user input information from its semantic sample library, the semantic understanding recall model needs to be trained to understand the relationship between different semantics, so that it can select corpus information related to the input information on its own in the future.
[0067] Therefore, the above learning and training process mainly requires training using samples from the sample library. Generally, the sample library includes a positive sample library and a negative sample library. The sample information in the positive sample library is used to inform the semantic understanding recall model of semantic information that is indeed relevant, such as "diarrhea" and "Dr. Li A"; the sample information in the negative sample library is used to inform the semantic understanding recall model of semantic information that is not actually relevant, such as "leukemia" and "Dr. Li A".
[0068] In one embodiment, the sample information in the positive sample library is sample information whose correlation with the input information is greater than or equal to a first threshold.
[0069] In one embodiment, the sample information in the negative sample library consists of sample information whose relevance to the input information is less than a first threshold, where N is an integer.
[0070] For example, the first threshold can be preset or user-defined.
[0071] For example, the first threshold mentioned above is used to assess the correlation between samples in the sample library and input information.
[0072] In this way, by setting up a sample library that includes both positive and negative sample information, it is convenient to use the sample information in the sample library to train the semantic understanding recall model from both positive and negative perspectives. This enables the semantic understanding recall model to more comprehensively grasp the connotation of semantic understanding in the future.
[0073] Optionally, in this embodiment of the invention, before step 201 above, the application method of the semantic understanding recall model provided in this embodiment of the invention further includes the following steps B1 and B2:
[0074] Step B1: Train the semantic understanding recall model using the sample information in the sample library.
[0075] Step B2: Obtain the target semantic understanding recall model described above.
[0076] For example, by using sample information from the positive sample library and sample information from the negative sample library to train the semantic understanding model, a target semantic understanding recall model that can master the filtering of corpus information that is highly relevant to the user's input information can be obtained.
[0077] In this way, the M corpus information related to the user input information can be accurately and conveniently filtered out in subsequent matching degree calculations, and then the actual effective matching degree information can be calculated.
[0078] Optionally, in this embodiment of the invention, when the sample library is the positive sample library, the application method of the semantic understanding recall model provided in step A of the invention further includes the following step C:
[0079] Step C: Store the above positive sample information into the positive sample database.
[0080] For example, the positive sample information mentioned above includes at least one of the following: first matching relationship information including symptom information and doctor information, second matching relationship information with long-tail markers, and third matching relationship information including doctor expertise and doctor information.
[0081] For example, the first matching relationship information meets the second threshold, and the long-tail flag is the refined information of the first matching relationship.
[0082] In one example, when the positive sample information includes the first matching relationship information of symptom information and doctor information, the symptom information and doctor information are matching relationship information that has been used by other users and has been adopted a lot in the end.
[0083] Furthermore, the first matching relationship information satisfying the second threshold means that the matching degree of the information in the first matching relationship information is greater than the second threshold.
[0084] Furthermore, the aforementioned second threshold can be preset or user-defined, and this embodiment of the invention does not limit this.
[0085] In one example, when the positive sample information includes second matching information with a long-tail flag, the second matching information is information that other users have not clicked on, but which is actually valid, usable, and has a certain degree of relevance. For example: "Alzheimer's disease, Dr. Liu C".
[0086] Furthermore, the aforementioned long-tail information can be user-defined and labeled. The purpose of the labeling is to inform the user that the second matching relationship information needs to be learned. After labeling, the second matching relationship information can be identified as a strong positive sample.
[0087] It is understandable that the second matching relationship information mentioned above is matching relationship information that has not appeared before. Therefore, this information needs to be specifically labeled by the user so that the semantic understanding and recall model can learn it comprehensively during the subsequent learning process.
[0088] Understandably, in previous positive sample learning processes, only frequently used positive samples were learned. This learning method may result in incomplete learning, only recognizing some common input information. Consequently, in subsequent user searches, it may fail to recognize some rare input information (e.g., rare disease symptoms), leading to low search efficiency. For example, for Alzheimer's disease, the input information frequently entered by users is "Alzheimer's disease," and the sample database will automatically include the term "Alzheimer's disease." However, "Alzheimer's disease," which has the same meaning as "Alzheimer's disease," is rare input information. Although it has the same meaning as "Alzheimer's disease," it may cause a lack of sample information in the sample database due to the infrequent user input. Therefore, it is necessary to manually add a long-tail label to "Alzheimer's disease" to inform the semantic understanding learning model that it needs to learn.
[0089] In one example, when the positive sample information is a third matching relationship that includes the doctor's expertise and doctor information, this third matching relationship can be implicitly linked to the aforementioned first and second matching relationships. For example, if the third matching relationship is "Dr. Li A specializes in blood diseases," then this third matching relationship can be automatically linked to "leukemia, Dr. Li A" in the first matching relationship. After learning this third matching relationship, the semantic understanding recall model can establish more ways to find information in the corpus for subsequent input information.
[0090] Furthermore, the aforementioned third matching relationship information can be user-defined and labeled.
[0091] In this way, by enriching the sample information in the positive sample library, the subsequent semantic understanding recall model can be trained more comprehensively during the learning and training process, so as to more accurately find M corpus information after receiving input information.
[0092] Optionally, in this embodiment of the invention, when the positive sample information is the second matching relationship information with long-tail markers, before step A, the application method of the semantic understanding recall model provided in this embodiment of the invention further includes the following steps D1 and D2:
[0093] Step D1: Filter the above matching relationship information including symptom information and doctor information to obtain the above second matching relationship information.
[0094] Step D2: Add reinforcement information to each of the matching relationships in the second matching relationship information above.
[0095] For example, the second matching relationship information mentioned above includes at least one set of matching relationship information.
[0096] For example, as described above, since the second matching relationship information is manually selected matching relationship information, by adding reinforcement information to each matching relationship information in the second matching relationship information, the semantic understanding recall model is informed that it needs to learn and train on each matching relationship information in the second matching relationship information.
[0097] Optionally, in this embodiment of the invention, when the sample library is the negative sample library, the application method of the semantic understanding recall model provided in step A of the invention further includes the following step E:
[0098] Step E: Store the negative sample information in the negative sample database.
[0099] For example, the negative sample information mentioned above includes at least one of the following: first negative sample information and second negative sample information.
[0100] In one embodiment, the first negative sample information includes fourth matching relationship information of symptom information and doctor information, wherein the fourth matching relationship information is matching relationship information that does not meet the second threshold but meets the third threshold.
[0101] Furthermore, the aforementioned first negative sample information is complex negative sample information, which refers to sample information that has been clicked by users, but not many times.
[0102] Understandably, the aforementioned first negative sample information refers to samples with low click-through rates. This means they don't completely lack clicks, just that the click-through rate is insufficient. Low click-through rates reflect insufficient relevance in the sample. For example, "diarrhea, Dr. Ma D" as the first negative sample information indicates that the relevance between Dr. Ma D and diarrhea is not very high, resulting in insufficient acceptability. However, it is not entirely unacceptable. Therefore, the semantic understanding recall model needs to be trained. By training on the first negative sample information, the semantic understanding recall model can pay more attention to detailed information.
[0103] Furthermore, the aforementioned third threshold can be preset or user-defined, and this embodiment of the invention does not limit this.
[0104] In one embodiment, the second negative sample information includes a fifth matching relationship information of symptom information and doctor information, wherein the fifth matching relationship information is a matching relationship information that does not meet the third threshold.
[0105] Furthermore, the aforementioned second negative sample information refers to sample information with severely insufficient relevance or little relevance. For example, the phrase "diarrhea, Dr. Zheng E" has never been clicked. Through learning and training, it can be learned that Dr. Zheng E is associated with treating the ailment "diarrhea," thus preventing the input information of "diarrhea" from being associated with "Dr. Zheng E" in the future.
[0106] For example, the sorting rule for the first threshold, the second threshold, and the third threshold is as follows: the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.
[0107] It's important to note that the most fundamental principle for building a target semantic understanding recall model is that the distribution of offline training data and online inference data should be consistent. If the negative sample information during the recall model training phase only selects unclicked samples (i.e., the second negative sample information mentioned above), in practical applications, i.e., during online inference, the target semantic understanding recall model, facing the entire material database, will be unable to make good inference predictions for samples that have never appeared before.
[0108] Understandably, after applying the target semantic understanding recall model, a ranking model will be applied. The goal of this ranking model is to select the user's desired information from the M possible corpora—a process of "selecting the best from the best." The target semantic understanding recall model aims to "separate" the information the user might like from the massive amount of irrelevant or disliked information. Therefore, in training the semantic understanding recall model using both negative and positive sample information, the model must "see" both matching (positive sample information) and irrelevant (negative sample information) information, thus broadening its horizons. Furthermore, the unreliable negative sample information should be as refined as possible. Therefore, the aforementioned negative sample information includes: first negative sample information and second negative sample information.
[0109] In this way, by enriching and refining the negative sample information, the semantic understanding recall model can better learn the corpus information that matches the subsequent user input information, and thus select the appropriate corpus information for the user.
[0110] Optionally, in this embodiment of the invention, in step 203 above, the application method of the semantic understanding recall model provided by this embodiment of the invention further includes the following step F1:
[0111] Step F1: Input each of the above X word vectors into the first representation layer used to indicate the overall semantic meaning of the above X word vectors, perform semantic recognition, and obtain X first semantic information.
[0112] Based on step 203 above, in step 204 above, the application method of the semantic understanding recall model provided in this embodiment of the invention further includes the following step F2:
[0113] Step F2: Input each of the above X character vectors into the second representation layer used to indicate the semantic relationship between each of the above character vectors and the semantic meaning of each of the above character vectors, perform semantic recognition, and obtain X second semantic information.
[0114] For example, the first representation layer described above can be used to indicate the overall semantic meaning of X word vectors within a predetermined range.
[0115] It is understandable that after receiving X word vectors, the first representation layer begins to learn the X word vectors. During the learning process, it can extract the context information corresponding to the X word vectors as a whole, and learn the overall meaning and global information of the X word vectors, so as to better grasp the accurate meaning of their specific information in the second representation layer later.
[0116] For example, the aforementioned predetermined range can be pre-set or customized, and the embodiments of the present invention do not limit this.
[0117] In one embodiment, the word vectors within the predetermined range may include X word vectors and other word vectors besides the X word vectors.
[0118] Furthermore, during the semantic recognition process, the first representation layer learns X word vectors, as well as the word vectors before and after the X word vectors (the context of the X word vectors), thereby obtaining the overall meaning of the X word vectors.
[0119] For example, the second representation layer described above can be used to indicate the relationship between each of the X word vectors and the specific semantic meaning of each word vector.
[0120] It is understandable that if the first representation layer does not learn the overall meaning and global information of the X word vectors, the second representation layer directly obtains the semantic meaning between each word vector and the semantic meaning of each word vector itself. Since each word vector itself includes multiple meanings, it is very likely that there will be a situation where it is "disconnected" from the overall meaning of the X word vectors, that is, there will be a situation where the understanding is wrong.
[0121] Thus, by first using the first representation layer to obtain the overall semantic meaning of X word vectors, and then using the second representation layer to obtain the specific semantic meaning of each of the X word vectors, the accuracy of the semantic meaning understood by the representation layer can be greatly improved.
[0122] To address the aforementioned technical problems, embodiments of the present invention also provide an application apparatus for a semantic understanding recall model. Please refer to the following for details. Figure 2 , Figure 2 This is a schematic diagram of the basic structure of the application device for implementing the semantic understanding recall model.
[0123] like Figure 2 As shown, an application device for a semantic understanding recall model includes: an execution module 301, used to extract M corpus information that have a first relationship with the input information from the semantic sample library corresponding to the target semantic understanding recall model, where M is a positive integer; the execution module 301 is further used to perform pre-training on the M corpus information and the input information, converting the M corpus information and the input information into X character vectors, where X is a positive integer greater than M by 1; and an acquisition module 302, used to input each of the X character vectors converted by the execution module 301 into a first representation layer, perform semantic recognition, and acquire X first semantic information, where each of the X first semantic information... The first semantic information is the semantic information of the sub-character vectors in each of the above-mentioned character vectors within a predetermined range, and each of the above-mentioned character vectors includes at least one sub-character vector; the above-mentioned acquisition module 302 is further configured to input each of the above-mentioned character vectors transformed by the above-mentioned execution module 301 into the second representation layer, perform semantic recognition, and acquire X second semantic information, each of the above-mentioned X second semantic information being the semantic relationship information between the sub-character vectors in each of the above-mentioned character vectors; the determination module 303 is configured to determine M matching thresholds between the above-mentioned M corpus information and the above-mentioned input information based on the above-mentioned X first semantic information and the above-mentioned X second semantic information acquired by the acquisition module using a preset algorithm.
[0124] The application device of the semantic understanding recall model provided in this embodiment of the invention first extracts M corpus information that have a first relationship with the input information from the semantic sample library corresponding to the target semantic understanding recall model. Then, it performs pre-training on the M corpus information and the input information, converting the M corpus information and the input information into X character vectors. Next, each of the X character vectors is input into a first representation layer for semantic recognition to obtain X first semantic information. Then, each of the character vectors is input into a second representation layer for semantic recognition to obtain X second semantic information. Finally, based on the X first semantic information and the X second semantic information, a preset algorithm is used to determine M matching thresholds between the M corpus information and the input information. Thus, by performing semantic recognition on the character vectors through two representation layers, the semantics of the character vectors in a large range and the semantics of the character vectors in a small range can be obtained, thereby performing semantic recognition more accurately and determining the M matching thresholds between the extracted M corpus information and the input information. This improves the accuracy of determining the correlation between the corpus information and the input information, further improving the accuracy of subsequent user search content.
[0125] In some embodiments, the application device of the semantic understanding recall model further includes: a building module for building a sample library; the sample library includes N samples, and the sample library includes: a positive sample library and a negative sample library; the sample information in the positive sample library is sample information whose relevance to the input information is greater than or equal to a first threshold, and the sample information in the negative sample library is sample information whose relevance to the input information is less than the first threshold, where N is an integer.
[0126] In some embodiments, the application device of the above-mentioned semantic understanding recall model further includes: a utilization module for training the above-mentioned semantic understanding recall model using sample information in the above-mentioned sample library; and an acquisition module for acquiring the above-mentioned target semantic understanding recall model.
[0127] In some embodiments, when the sample library is the positive sample library, the application device of the semantic understanding recall model further includes: a storage module for storing positive sample information into the positive sample library; wherein the positive sample information includes at least one of the following: first matching relationship information including symptom information and doctor information, second matching relationship information with long-tail markers, and third matching relationship information including doctor expertise and doctor information; the first matching relationship information satisfies a second threshold, and the long-tail markers are refined information of the first matching relationship.
[0128] In some implementations, when the positive sample information is the second matching relationship information with long-tail markers, the application device of the semantic understanding recall model further includes: the acquisition module, which is further used to filter the matching relationship information including symptom information and doctor information, and acquire the second matching relationship information, wherein the second matching relationship information includes at least one set of matching relationship information; and the adding module, which is used to add reinforcement information to each matching relationship information in the second matching relationship information.
[0129] In some embodiments, when the sample library is the negative sample library, the application device of the semantic understanding recall model further includes: a storage module for storing the negative sample information into the negative sample library; wherein the negative sample information includes at least one of the following: first negative sample information, second negative sample information; the first negative sample information includes fourth matching relationship information of symptom information and doctor information, the fourth matching relationship information being matching relationship information that does not meet the second threshold but meets the third threshold; the second negative sample information includes fifth matching relationship information of symptom information and doctor information, the fifth matching relationship information being matching relationship information that does not meet the third threshold.
[0130] In some implementations, the execution module is specifically used to input each of the X character vectors to a first representation layer for indicating the overall semantic meaning of the X character vectors, perform semantic recognition, and obtain X first semantic information; the execution module is also specifically used to input each of the X character vectors to a second representation layer for indicating the semantic relationship between each character vector and the semantic meaning of each character vector, perform semantic recognition, and obtain X second semantic information.
[0131] To address the aforementioned technical problems, embodiments of the present invention also provide a device, specifically a computer device. Please refer to [link / reference needed] for details. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.
[0132] like Figure 3 The diagram shows the internal structure of a computer device. The computer device includes a processor, non-volatile storage medium, memory, and a network interface connected via a system bus. The non-volatile storage medium stores the operating system, database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, they enable the processor to implement a data relationship reconstruction method. The processor provides computing and control capabilities, supporting the operation of the entire computer device. The memory stores computer-readable instructions, which, when executed by the processor, enable the processor to implement a data relationship reconstruction method. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] In this embodiment, the processor is used to execute... Figure 2 The execution module 301, acquisition module 302, and determination module 303 are configured to perform specific functions. The memory stores the program code and various types of data required to execute these modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all sub-modules in the data relationship reconstruction device. The server can call the server's program code and data to execute the functions of all sub-modules.
[0134] Computer equipment constructs node feature maps and corresponding adjacency matrices from the data relationships between collected transaction nodes. A graph neural network (Graph Neural Network) is then used to extract features from these maps and matrices. Based on the extracted features, relationships are reconstructed. During this reconstruction, the Graph Neural Network reconstructs the data based on the learned hidden logical relationships between the data nodes. This process of reconstructing relationships is essentially the restoration of the data node feature maps and adjacency matrices. By disassembling and reassembling the data node feature maps and adjacency matrices, the Graph Neural Network verifies the correctness of the learned hidden relationships between transaction nodes. Then, it uses these learned hidden relationships to reconstruct the relationships between each transaction node and selects target transaction nodes that meet certain criteria for further application. Through graph processing technology, it deeply interprets the logical relationships behind the data, improving the depth and efficiency of data analysis.
[0135] The present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the data relationship reconstruction method of any of the above embodiments.
[0136] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0137] The present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the data relationship reconstruction method of any of the above embodiments.
[0138] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0139] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0140] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for applying a semantic understanding recall model, characterized in that, include: M corpus information that have a first relation to the input information are extracted from the semantic sample library corresponding to the target semantic understanding recall model, where M is a positive integer; Pre-training is performed on the M corpus information and the input information to transform the M corpus information and the input information into X character vectors, where X is a positive integer greater than M by 1; Each of the X character vectors is input to a first representation layer that indicates the overall semantic meaning of the X character vectors, semantic recognition is performed, and X first semantic information is obtained. Each of the X first semantic information is the semantic information of the sub-character vectors in each character vector within a predetermined range. Each character vector includes at least one sub-character vector. Each of the X character vectors is input to a second representation layer that indicates the semantic relationship between each character vector and the semantic meaning of each character vector. Semantic recognition is performed, and X second semantic information is obtained. Each of the X second semantic information is the semantic relationship information between the sub-character vectors in each character vector. Combining the X first semantic information and the X second semantic information as representation layer information, a preset algorithm is used to match the representation layer information corresponding to each of the M corpus information with the input information, thereby determining M matching thresholds between the M corpus information and the input information.
2. The method according to claim 1, characterized in that, The method includes: Establish a sample library; The sample library includes N samples, comprising: a positive sample library and a negative sample library; the sample information in the positive sample library is sample information whose relevance to the input information is greater than or equal to a first threshold, and the sample information in the negative sample library is sample information whose relevance to the input information is less than the first threshold, where N is an integer.
3. The method according to claim 1, characterized in that, Before extracting the M corpus information that has a first relationship with the input information, the method further includes: The semantic understanding recall model is trained using sample information from the sample library; Obtain the target semantic understanding recall model.
4. The method according to claim 2, characterized in that, When the sample library is the positive sample library, the establishment of the sample library includes: Store positive sample information in the positive sample database; The positive sample information includes at least one of the following: a first matching relationship information including symptom information and doctor information, a second matching relationship information with long-tail markers, and a third matching relationship information including doctor expertise and doctor information; The first matching relationship information satisfies the second threshold, and the long-tail flag is the refined information of the first matching relationship.
5. The method according to claim 4, characterized in that, In the case that the positive sample information is the second matching relationship information with long-tail markers, before establishing the sample library, the method includes: Filter the matching relationship information including symptom information and doctor information to obtain the second matching relationship information, wherein the second matching relationship information includes at least one set of matching relationship information; Add reinforcement information to each matching relationship in the second matching relationship information.
6. The method according to claim 2, characterized in that, When the sample library is the negative sample library, the establishment of the sample library includes: Store negative sample information in a negative sample database; The negative sample information includes at least one of the following: first negative sample information, second negative sample information; The first negative sample information includes a fourth matching relationship between symptom information and doctor information, wherein the fourth matching relationship is a matching relationship that does not meet the second threshold but meets the third threshold; the second negative sample information includes a fifth matching relationship between symptom information and doctor information, wherein the fifth matching relationship is a matching relationship that does not meet the third threshold.
7. An application device for a semantic understanding recall model, characterized in that, include: The execution module is used to extract M corpus information that have a first relation to the input information from the semantic sample library corresponding to the target semantic understanding recall model, where M is a positive integer; The execution module is further configured to perform pre-training on the M corpus information and the input information, and convert the M corpus information and the input information into X character vectors, where X is a positive integer greater than M by 1; The acquisition module is used to input each of the X character vectors into a first representation layer for indicating the overall semantic meaning of the X character vectors, perform semantic recognition, and acquire X first semantic information, wherein each of the X first semantic information is the semantic information of the sub-character vectors in each character vector within a predetermined range, and each character vector includes at least one sub-character vector; The acquisition module is further configured to input each of the X character vectors into a second representation layer for indicating the semantic relationship between each character vector and the semantic meaning of each character vector, perform semantic recognition, and acquire X second semantic information, wherein each of the X second semantic information is the semantic relationship information between the sub-character vectors in each character vector; The determination module is used to combine the X first semantic information and the X second semantic information as representation layer information, and use a preset algorithm to match the representation layer information corresponding to each of the M corpus information with the input information to determine the M matching thresholds between the M corpus information and the input information.
8. A device, characterized in that, The system includes a memory and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the application method of the semantic understanding recall model as described in any one of claims 1 to 6.
9. A storage medium storing computer-readable instructions, characterized in that, When the computer-readable instructions are executed by one or more processors, the one or more processors perform the steps of the application method of the semantic understanding recall model as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Semantic comprehension model training method, semantic comprehension method and device and storage medium
CN110795945A
Corpus processing method, related device and equipment
CN113821593A