A method, device, equipment and medium for determining user tags
By receiving user description text, extracting keyword and status information, and calculating the degree of target matching with Bayesian network model and large language model, the problem of inaccurate matching of text classification labels in the prior art is solved, and the accuracy and reliability of classification labels are improved.
Patent Information
- Application Number
- CN202510088303.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-21
AI Technical Summary
In the prior art, it is difficult to accurately match text strings and classification tags in text classification management, resulting in messy text classification and affecting the accuracy of subsequent searches and citations.
By receiving user description text, extracting keywords and status information, combining preset Bayesian network model and large language model, calculate the target matching degree and determine the target category label.
Improve the screening accuracy and reliability of text classification labels, ensuring the accuracy of target matching.
Smart Images

Figure CN119537598B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text processing, and in particular to a method, device, equipment and medium for determining a user tag. Background Art
[0002] In the existing text classification management process, in order to facilitate the unified storage and search of text, the text needs to be classified and managed. However, when processing text strings in some fields, such as the processing of electronic medical record texts, feature selection is more troublesome, which will lead to inaccurate matching with classification labels, making the classification of text in the text library more messy, making it difficult to search for text subsequently, and also affecting the reference accuracy after the text is called.
[0003] At present, text can be classified through Bayesian networks. Bayesian networks can optimize basic models through basic modeling and utilize a large amount of text data, and the model is interpretable. However, the Bayesian network model relies on structured input and cannot process natural language input. In addition, the number of nodes contained in the model is limited by the modeling cost, and it cannot cover a large number of text word concepts. The recall rate is generally low. The large language model that has emerged in recent years can understand natural language and respond to all input situations. It can overcome the limitations of Bayesian networks when used for text classification, but the accuracy of its classification results cannot be guaranteed, and the large language model itself is not interpretable enough.
[0004] Therefore, how to utilize the above models and improve the accuracy and reliability of label screening during text classification becomes an urgent problem to be solved. Summary of the invention
[0005] The purpose of the present invention is to provide a method, device, equipment and medium for determining user tags, which can make the target matching degree obtained more accurate and reliable, thereby improving the accuracy of target category tag screening.
[0006] According to a first aspect of the present invention, a method for determining a user tag is provided, comprising the following steps:
[0007] Receive a user description text input by a target user, extract a number of first user keywords from the user description text, and input the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; the user description text refers to a text describing characteristic information of the abnormal state of the target user.
[0008] The user description text is input into the target large language model for processing to obtain a number of first user state information, and the number of first user state information is input into a preset Bayesian network model to obtain a second matching degree between the target user and each preset category label.
[0009] A plurality of first historical description texts corresponding to a plurality of first user keywords are determined from the historical description text library, and a first label weight corresponding to each preset category label is obtained according to an actual category label corresponding to each first historical description text.
[0010] A target large language model is used to process each historical description text in the historical description text library to obtain second historical description texts corresponding to a number of first user status information, and according to the actual category label corresponding to each second historical description text, a second label weight corresponding to each preset category label is obtained.
[0011] According to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, the target matching degree between the target user and each preset category label is calculated, and the preset category label corresponding to the maximum target matching degree is determined as the target category label of the target user.
[0012] Furthermore, the first label weight corresponding to the preset category label is obtained through the following steps:
[0013] A plurality of second user keywords are extracted from each historical description text in the historical description text library, and the historical description texts in the historical description text library corresponding to the plurality of second user keywords and the plurality of first user keywords are determined as first historical texts.
[0014] For any preset category label, a plurality of actual category labels corresponding to a plurality of first historical texts are screened out, which are the same as the preset category label.
[0015] The ratio of the number of actual category labels selected from the actual category labels corresponding to the first historical texts to the total number of actual category labels corresponding to the first historical texts is used as the first label weight corresponding to the preset category label.
[0016] Furthermore, the second label weight corresponding to the preset category label is obtained through the following steps:
[0017] A target large language model is used to obtain a plurality of second user status information from each historical description text in the historical description text library, and historical description texts in the historical description text library corresponding to the plurality of second user status information and having the same semantics as the plurality of first user status information are determined as second historical texts.
[0018] For any preset category label, a plurality of actual category labels corresponding to a plurality of second historical texts are screened out, which are the same as the preset category label.
[0019] The ratio of the number of actual category labels selected from the actual category labels corresponding to the second historical texts to the total number of actual category labels corresponding to the second historical texts is used as the second label weight corresponding to the preset category label.
[0020] Furthermore, the target matching degree of the target user corresponding to any preset category label is calculated through the following steps:
[0021] For any preset category label, the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model are determined according to the first label weight corresponding to the preset category label and the second label weight corresponding to the preset category label.
[0022] According to the first matching degree and the second matching degree of the preset category label and the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model, a weighted sum is calculated to obtain the target matching degree between the target user and the preset category label.
[0023] Furthermore, the method further comprises the following steps:
[0024] A preset category label whose corresponding target matching degree is greater than a preset matching degree threshold is determined as a key category label.
[0025] At least one current status feature information of the target user is obtained.
[0026] According to a plurality of preset numerical ranges corresponding to each current state feature, a target numerical range corresponding to each acquired current state feature is determined.
[0027] Each obtained target numerical interval is input into a given Bayesian network model to obtain the third matching degree of the target user corresponding to each key category label.
[0028] According to the target matching degree, the third matching degree and the preset matching degree weights corresponding to the target matching degree and the third matching degree respectively corresponding to each key category tag, a weighted sum calculation is performed to obtain the final matching degree of the target user corresponding to each key category tag, and the key category tag corresponding to the largest final matching degree is determined as the final category tag of the target user.
[0029] Furthermore, the method further comprises the following steps:
[0030] According to the target category label of the target user, the query text corresponding to the target category label is obtained from the preset text library and sent to the user end.
[0031] Receive feedback text corresponding to the target user and the query text from the user end, and use the feedback text as a new user description text, return to the execution step of extracting a number of first user keywords from the user description text, and input the number of first user keywords into the preset Bayesian network model to obtain the first matching degree between the target user and each preset category label, until a new target category label is obtained.
[0032] When the new target category label is consistent with the original target category label, the new target category label is determined to be the user's category label; otherwise, based on the new target category label, return to the execution step to obtain the query text corresponding to the target category label from the preset text library according to the target category label of the target user and send it to the user end until the new target category label is obtained again.
[0033] If the target category label obtained again is consistent with any target category label obtained previously, the current target category label is used as the user category label. Otherwise, based on the new target category label obtained again, continue to return to the execution step and obtain the query text corresponding to the target category label from the preset text library according to the target category label of the target user and send it to the user end until the user category label is determined.
[0034] According to a second aspect of the present invention, there is provided a device for determining a user tag, the device comprising:
[0035] The first acquisition module is used to receive a user description text input by a target user, extract a number of first user keywords from the user description text, and input the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; the user description text refers to text that describes characteristic information of the abnormal state of the target user.
[0036] The second acquisition module is used to input the user description text into the target large language model for processing, obtain a number of first user state information, and input the number of first user state information into the preset Bayesian network model to obtain a second matching degree between the target user and each preset category label.
[0037] The third acquisition module is used to determine a number of first historical description texts corresponding to a number of first user keywords from the historical description text library, and obtain a first label weight corresponding to each preset category label according to an actual category label corresponding to each first historical description text.
[0038] The fourth acquisition module is used to use the target large language model to process each historical description text in the historical description text library, obtain the second historical description text corresponding to a number of first user status information, and obtain the second label weight corresponding to each preset category label based on the actual category label corresponding to each second historical description text.
[0039] The first determination module is used to calculate the target matching degree between the target user and each preset category label according to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, and determine the preset category label corresponding to the maximum target matching degree as the target category label of the target user.
[0040] Furthermore, the third acquisition module includes:
[0041] The second determination module is used to extract a plurality of second user keywords from each historical description text in the historical description text library, and determine the historical description text in the historical description text library corresponding to the plurality of second user keywords and the plurality of first user keywords as the first historical text.
[0042] The first screening module is used to screen out, for any preset category label, a number of actual category labels that are the same as the preset category label from a number of actual category labels corresponding to a number of first historical texts.
[0043] A fifth acquisition module is used to take the ratio of the number of actual category labels screened out from the actual category labels corresponding to the first historical texts to the total number of actual category labels corresponding to the first historical texts as the first label weight corresponding to the preset category label.
[0044] Furthermore, the fourth acquisition module includes:
[0045] The third determination module is used to use the target large language model to obtain a number of second user status information from each historical description text in the historical description text library, and determine the historical description texts in the historical description text library that correspond to the number of second user status information and have the same semantics as the number of first user status information as the second historical text.
[0046] The second screening module is used to screen out, for any preset category label, a number of actual category labels corresponding to a number of second historical texts, which are the same as the preset category label.
[0047] A sixth acquisition module is used to take the ratio of the number of actual category labels screened out from the actual category labels corresponding to the second historical texts to the total number of actual category labels corresponding to the second historical texts as the second label weight corresponding to the preset category label.
[0048] Furthermore, the first determining module includes:
[0049] The fourth determination module is used to determine, for any preset category label, the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model according to the first label weight corresponding to the preset category label and the second label weight corresponding to the preset category label.
[0050] The first calculation module is used to calculate the target matching degree between the target user and the preset category label by performing a weighted sum calculation based on the first matching degree and the second matching degree of the preset category label and the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model.
[0051] Furthermore, the device further includes a fifth determining module, and the fifth determining module includes:
[0052] The sixth determination module is used to determine the preset category label whose corresponding target matching degree is greater than the preset matching degree threshold as the key category label.
[0053] The seventh acquisition module is used to acquire at least one current status feature information of the target user.
[0054] The seventh determination module is used to determine the target numerical range corresponding to each current state feature according to a plurality of preset numerical ranges corresponding to each current state feature.
[0055] The eighth acquisition module is used to input each acquired target numerical interval into a given Bayesian network model to acquire a third matching degree of the target user corresponding to each key category label.
[0056] The eighth determination module is used to calculate the weighted sum of the target matching degree, the third matching degree and the preset matching degree weights corresponding to the target matching degree and the third matching degree for each key category label to obtain the final matching degree of the target user corresponding to each key category label, and determine the key category label corresponding to the maximum final matching degree as the final category label of the target user.
[0057] Furthermore, the device further includes a ninth determining module, and the ninth determining module includes:
[0058] The sending module obtains the query text corresponding to the target category label from the preset text library according to the target category label of the target user and sends it to the user end.
[0059] The first return module receives the feedback text corresponding to the target user and the query text from the user terminal, and returns the feedback text as a new user description text to the first acquisition module to obtain a new target category label.
[0060] The second return module determines that the new target category label is the user's category label when the new target category label is consistent with the original target category label; otherwise, based on the new target category label, returns to the sending module to obtain the new target category label again.
[0061] The tenth determination module uses the current target category label as the user category label if the target category label obtained again is consistent with any target category label obtained previously. Otherwise, based on the new target category label obtained again, the sending module is continued to be returned until the user category label is determined.
[0062] According to a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for determining a user tag when executing the computer program.
[0063] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for determining a user tag is implemented.
[0064] Compared with the prior art, the present invention has at least the following beneficial effects:
[0065] The present invention provides a method for determining a user label. First, a user description text is received. A plurality of first user keywords directly extracted from the user description text and a plurality of first user status information extracted by using a target large language model are respectively input into a preset Bayesian network model to obtain a first matching degree and a second matching degree of each preset category label. The matching degrees under two implementation modes can be obtained, and a preliminary judgment basis is provided for determining the category label of the target user. Then, a first label weight and a second label weight corresponding to each preset category label are obtained according to a plurality of historical description texts, which can reflect the accuracy difference between the matching degree directly output by the preset Bayesian network model and the matching degree output by the preset Bayesian network model after the user description text is processed by the target large language model. Therefore, weights are respectively assigned to the first matching degree and the second matching degree, and a weighted sum calculation is performed by the obtained parameters to realize the combination of the Bayesian network model and the large language model, and a target matching degree corresponding to each preset category label of the target user is obtained. The target matching degree obtained by the method is more accurate and reliable, thereby improving the accuracy of the screened target category labels. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0067] Figure 1 A first flow chart of a method for determining a user tag provided in Embodiment 1 of the present invention;
[0068] Figure 2 A flowchart of step S300 provided in the first embodiment of the present invention;
[0069] Figure 3 A flowchart of step S400 provided in the first embodiment of the present invention;
[0070] Figure 4 A flowchart of step S500 provided in the first embodiment of the present invention;
[0071] Figure 5 A second flow chart of the method for determining a user tag provided in the first embodiment of the present invention;
[0072] Figure 6 A third flow chart of the method for determining a user tag provided in the first embodiment of the present invention;
[0073] Figure 7 A schematic diagram of the structure of a device for determining a user tag provided in Embodiment 2 of the present invention;
[0074] Figure 8 A schematic diagram of the structure of the third acquisition module 300 provided in the second embodiment of the present invention;
[0075] Fig. 9 A schematic diagram of the structure of a fourth acquisition module 400 provided in Embodiment 2 of the present invention;
[0076] Fig.10 A schematic diagram of the structure of a first determination module 500 provided in Embodiment 2 of the present invention;
[0077] Fig.11 A schematic diagram of the structure of a fifth determination module provided in Embodiment 2 of the present invention;
[0078] Fig.12 This is a schematic diagram of the structure of the ninth determination module provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0079] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0080] Embodiment 1
[0081] like Figure 1 As shown, this embodiment 1 provides a method for determining a user tag, comprising the following steps:
[0082] S100, receiving a user description text input by a target user, extracting a number of first user keywords from the user description text, and inputting the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; it can be understood as: when the word vectors corresponding to the number of first user keywords are used as input, the probability of each preset category label output by the preset Bayesian network model is used as the matching degree between each preset category label and the target user; in this embodiment, the preset category label can be a user type label pre-set when classifying users of any app, or it can be any disease name, etc.
[0083] Specifically, the user description text refers to a text that describes characteristic information of the abnormal state of the target user; for example, a text of the user's operating habits for the app, or an electronic medical record text.
[0084] Specifically, the first user keyword refers to a keyword indicating any abnormal state feature of the target user; for example, headache, fever, cough, chest pain, palpitations, diarrhea, etc.
[0085] Specifically, the preset Bayesian network model refers to a model trained based on a number of preset category tags, a number of historical user keywords corresponding to each preset category tag, and a number of historical user status information corresponding to each preset category tag. Those skilled in the art know the specific training method and will not be described in detail here. Among them, the first matching degree of the target user corresponding to any preset category tag meets the following conditions:
[0086] P1 i =(P(S1,S1,…,S n |D i )×P(D i )) / P(S1,S1,…,S n ), where P1 i is the first matching degree of the target user corresponding to the i-th preset category label, D i is the i-th preset category label, Sn is the nth first user keyword, and n is the number of first user keywords extracted from the user description text.
[0087] S200, input the user description text into the target large language model for processing, obtain a number of first user status information, and input the number of first user status information into the preset Bayesian network model to obtain the second matching degree between the target user and each preset category label; it can be understood that: after the target large language processing model performs semantic analysis on the user description text, it extracts a number of key first user status information, for example, some users' user description texts have problems of non-standard vocabulary or unclear description, and the target large language processing model can perform semantic analysis and standardized vocabulary processing on them, wherein the first user status information can be a keyword or a short text, for example, the target user inputs a faster heartbeat, the number of diarrhea times, etc.
[0088] Specifically, the target large language model refers to a model obtained by training a preset large language model based on a number of historical description texts and historical user state information corresponding to each historical description text. The training process is a prior art and will not be described in detail here.
[0089] Specifically, the method for obtaining the second matching degree is consistent with the method for obtaining the first matching degree.
[0090] In the above, by extracting several first user keywords from the user description text, and using the target large language model to extract several first user status information from the user description text, and judging the probability that the target user belongs to each preset category label based on the trained preset Bayesian network model, the probabilities under the two implementation modes can be obtained. The combination of the preset Bayesian network model and the target large language model is realized through the combination of the two probabilities, which is beneficial to the matching accuracy of the category labels.
[0091] S300, determining a plurality of first historical description texts corresponding to a plurality of first user keywords from a historical description text library, and obtaining a first label weight corresponding to each preset category label according to an actual category label corresponding to each first historical description text.
[0092] In a specific embodiment, Figure 2 As shown, step S300 includes the following steps:
[0093] S301, extracting a number of second user keywords from each historical description text in the historical description text library, and determining the historical description text in the historical description text library whose corresponding second user keywords are the same as the first user keywords as the first historical text; it can be understood that: the second user keywords corresponding to the first historical text correspond one-to-one to the first user keywords, and the number is equal.
[0094] S302: for any preset category label, select a number of actual category labels that are the same as the preset category label from a number of actual category labels corresponding to a number of first historical texts. For example, although a number of second user keywords corresponding to each first historical text correspond to a number of first user keywords one by one, their actual final classification results do not belong to the same category label, so the actual category labels that are the same as the preset category label are selected.
[0095] S303: taking the ratio of the number of actual category labels selected from the actual category labels corresponding to the first historical texts to the total number of actual category labels corresponding to the first historical texts as the first label weight corresponding to the preset category label.
[0096] As mentioned above, since the same several second user keywords may correspond to different label classification results, the classification accuracy corresponding to each label classification result can be known according to the proportion of each historical classification result to all historical classification results corresponding to several second user keywords, and it can be used as the label weight of the corresponding category label. Since the first label weight is obtained based on several first user keywords, it can reflect the importance of the matching probability output by the preset Bayesian network model.
[0097] S400, using the target large language model to process each historical description text in the historical description text library, obtaining second historical description texts corresponding to a number of first user status information, and obtaining a second label weight corresponding to each preset category label based on the actual category label corresponding to each second historical description text.
[0098] In a specific embodiment, Figure 3 As shown, step S400 includes the following steps:
[0099] S401, using the target large language model to obtain a number of second user status information from each historical description text in the historical description text library, and determining the historical description texts in the historical description text library that have the same semantics as the number of second user status information and the number of first user status information as the second historical text; it can be understood that: the semantics of the number of second user status information corresponding to the second historical text correspond to the number of first user status information one by one. For example, if the first user status information includes a high body temperature, and the second user status information includes a high temperature, it is considered that the two have the same semantics.
[0100] S402, for any preset category label, select a number of actual category labels that are the same as the preset category label from a number of actual category labels corresponding to a number of second historical texts. For example, although the semantics of a number of second user status information corresponding to each second historical text are consistent with that of a number of first user status information, their final actual classification results do not belong to the same category label, so the actual category label that is the same as the preset category label is selected.
[0101] S403: taking the ratio of the number of actual category labels selected from the actual category labels corresponding to the second historical texts to the total number of actual category labels corresponding to the second historical texts as the second label weight corresponding to the preset category label.
[0102] As mentioned above, since the same number of second user state information may correspond to different label classification results, the classification accuracy corresponding to each label classification result can be known according to the proportion of each historical label classification result to all historical classification results corresponding to the number of second user state information, and it can be used as the label weight of the corresponding category label. Since the second label weight is obtained based on the number of first user state information, and the first user state information is extracted after semantic analysis by the target large language model, it can reflect the importance of the label classification result obtained after processing by the target large language model.
[0103] S500, based on the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, calculate the target matching degree between the target user and each preset category label, and determine the preset category label corresponding to the maximum target matching degree as the target category label of the target user.
[0104] In a specific embodiment, Figure 4 As shown, step S500 includes the following steps:
[0105] S501, for any preset category label, according to the first label weight corresponding to the preset category label and the second label weight corresponding to the preset category label, determine the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model.
[0106] Specifically, the model weight W1 corresponding to the preset Bayesian network model meets the following conditions:
[0107] W1=F1 / (F1+F2), where F1 is the first label weight and F2 is the second label weight.
[0108] Specifically, the model weight W2 corresponding to the target large language model meets the following conditions:
[0109] W2=F2 / (F1+F2).
[0110] S502, according to the first matching degree and the second matching degree of the preset category label, as well as the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model, a weighted sum is calculated to obtain the target matching degree between the target user and the preset category label.
[0111] Specifically, the target matching degree G of the target user corresponding to the preset category label meets the following conditions:
[0112] G=W1×P1+W2×P2, where P1 is the first matching degree between the target user and the preset category label, and P2 is the second matching degree between the target user and the preset category label.
[0113] As described above, according to the size of the first label weight and the size of the second label weight, it can reflect the historical accuracy difference between the matching degree of the label directly output by the preset Bayesian network model after processing the user description text, and the matching degree of the label output by the preset Bayesian network model after processing the user description text by the target large language model. Therefore, the first matching degree and the second matching degree are weighted according to the historical accuracy rate, so that the target matching degree is more accurate and reliable, thereby improving the screening accuracy of category labels.
[0114] In a preferred embodiment, Figure 5 As shown, the method further comprises the following steps:
[0115] S510: Determine the preset category tags whose corresponding target matching degree is greater than the preset matching degree threshold as key category tags. Those skilled in the art can set the preset matching degree threshold according to actual needs, which will not be described in detail here.
[0116] S520: Obtain at least one current state characteristic information of the target user. For example, the current state characteristic information may be any one of body temperature, pulse, respiration and blood pressure.
[0117] S530, according to the preset numerical intervals corresponding to each current state feature, determine the target numerical interval corresponding to each current state feature. For example, for body temperature, it can be divided into six preset numerical intervals, 36 0 Below 36.3°C is low temperature, 36~37.3°C 0 C is normal body temperature, 37.3~38 0 C is low fever, 38~39 0 C is moderate fever, 39~41 0 C is high fever, 41 0C or above is a hyperthermic body temperature. Each preset numerical range may include a minimum value but not a maximum value. Blood pressure can also be divided into low pressure, normal pressure, and high pressure. The specific numerical range of the division is set by technical personnel in this field.
[0118] S540, input each obtained target numerical interval into a given Bayesian network model to obtain the third matching degree of the target user corresponding to each key category label; it can be understood that: the given Bayesian network model refers to a model trained according to several preset category labels and the target numerical interval corresponding to each current state feature information in several current state feature information corresponding to each preset category label. Those skilled in the art know the specific training method, and the training process is not the innovation of the present invention, so it will not be repeated here.
[0119] S550, based on the target matching degree, the third matching degree and the preset matching degree weights corresponding to the target matching degree and the third matching degree respectively corresponding to each key category tag, a weighted sum calculation is performed to obtain the final matching degree of the target user corresponding to each key category tag, and the key category tag corresponding to the maximum final matching degree is determined as the final category tag of the target user.
[0120] As mentioned above, on the basis of the user description text, several state features are also considered, and the state feature information can also reflect the data information related to the category label to a large extent. Therefore, combining the target matching degree obtained by the user description text and the third matching degree obtained by the state feature information can further improve the accuracy and reliability of the final category label result.
[0121] Optional, such as Figure 6 As shown, the method further comprises the following steps:
[0122] S600, according to the target category tag of the target user, obtain the query text corresponding to the target category tag from the preset text library and send it to the user end; it can be understood that: the preset text library stores the query text corresponding to each pre-configured target category tag.
[0123] S700, receiving feedback text corresponding to the target user and the query text from the user terminal, and using the feedback text as a new user description text, returning to the execution step of extracting a number of first user keywords from the user description text, and inputting the first user keywords into a preset Bayesian network model, obtaining a first matching degree between the target user and each preset category label, until a new target category label is obtained.
[0124] S800, when the new target category label is consistent with the original target category label, determine that the new target category label is the user's category label; otherwise, based on the new target category label, return to the execution step of obtaining the query text corresponding to the target category label from the preset text library according to the target category label of the target user and sending it to the user end, until the new target category label is obtained again.
[0125] S900, if the target category tag obtained again is consistent with any target category tag obtained previously, the current target category tag is used as the user category tag. Otherwise, based on the new target category tag obtained again, continue to return to the execution step according to the target category tag of the target user, obtain the query text corresponding to the target category tag from the preset text library and send it to the user end until the user category tag is determined.
[0126] As mentioned above, after obtaining the preliminary target category label, the feedback text is obtained again according to the query text corresponding to the target category label. Since the feedback text is not exactly the same as the initial user description text, the feedback text is processed again and a new target category label is obtained. The target category label obtained before can be verified. Through multiple iterations, the final target category label has higher accuracy, which can further improve the accuracy and reliability of the obtained user category label.
[0127] Embodiment 2
[0128] like Figure 7 As shown, this embodiment 2 provides a device for determining a user tag, including:
[0129] The first acquisition module 100 is used to receive a user description text input by a target user, extract a number of first user keywords from the user description text, and input the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; it can be understood that: when the word vectors corresponding to the number of first user keywords are used as input, the probability of each preset category label output by the preset Bayesian network model is used as the matching degree between each preset category label and the target user; in this embodiment, the preset category label can be any disease name.
[0130] Specifically, the user description text refers to a text describing characteristic information of an abnormal state of a target user; for example, an electronic medical record text.
[0131] Specifically, the first user keyword refers to a keyword indicating any abnormal state feature of the target user; for example, headache, fever, cough, chest pain, palpitations, diarrhea, etc.
[0132] Specifically, the preset Bayesian network model refers to a model trained based on a number of preset category tags, a number of historical user keywords corresponding to each preset category tag, and a number of historical user status information corresponding to each preset category tag. Those skilled in the art know the specific training method and will not be described in detail here. Among them, the first matching degree of the target user corresponding to any preset category tag meets the following conditions:
[0133] P1 i =(P(S1,S1,…,S n |D i )×P(D i )) / P(S1,S1,…,S n ), where P1 i is the first matching degree of the target user corresponding to the i-th preset category label, D i is the i-th preset category label, S n is the nth first user keyword, and n is the number of first user keywords extracted from the user description text.
[0134] The second acquisition module 200 is used to input the user description text into the target large language model for processing, obtain a number of first user status information, and input the number of first user status information into the preset Bayesian network model to obtain the second matching degree between the target user and each preset category label; it can be understood that: after the target large language processing model performs semantic analysis on the user description text, it extracts a number of key first user status information. For example, some users' user description texts have problems with non-standard vocabulary or unclear descriptions. The target large language processing model can perform semantic analysis and standardized vocabulary processing on them, wherein the first user status information can be a keyword or a short text, for example, the target user inputs a faster heartbeat, the number of diarrhea times, etc.
[0135] Specifically, the target large language model refers to a model obtained by training a preset large language model based on a number of historical description texts and historical user state information corresponding to each historical description text. The training process is a prior art and will not be described in detail here.
[0136] Specifically, the method for obtaining the second matching degree is consistent with the method for obtaining the first matching degree.
[0137] In the above, by extracting several first user keywords from the user description text, and using the target large language model to extract several first user status information from the user description text, and judging the probability that the target user belongs to each preset category label based on the trained preset Bayesian network model, the probabilities under the two implementation modes can be obtained. The combination of the preset Bayesian network model and the target large language model is realized through the combination of the two probabilities, which is beneficial to the matching accuracy of the category labels.
[0138] The third acquisition module 300 is used to determine a number of first historical description texts corresponding to a number of first user keywords from the historical description text library, and obtain a first label weight corresponding to each preset category label according to an actual category label corresponding to each first historical description text.
[0139] In a specific embodiment, Figure 8 As shown, the third acquisition module 300 includes:
[0140] The second determination module 301 is used to extract a number of second user keywords from each historical description text in the historical description text library, and determine the historical description text in the historical description text library whose corresponding second user keywords are the same as the first user keywords as the first historical text; it can be understood that: the second user keywords corresponding to the first historical text correspond one-to-one to the first user keywords, and the number is equal.
[0141] The first screening module 302 is used to screen out a number of actual category tags that are the same as the preset category tags from a number of actual category tags corresponding to a number of first historical texts for any preset category tag. For example, although a number of second user keywords corresponding to each first historical text correspond to a number of first user keywords one by one, their actual final classification results do not belong to the same category tag, so the actual category tags that are the same as the preset category tags are screened out.
[0142] The fifth acquisition module 303 is used to use the ratio of the number of actual category labels screened out from the actual category labels corresponding to the first historical texts to the total number of actual category labels corresponding to the first historical texts as the first label weight corresponding to the preset category label.
[0143] As mentioned above, since the same several second user keywords may correspond to different label classification results, the classification accuracy corresponding to each label classification result can be known according to the proportion of each historical classification result to all historical classification results corresponding to several second user keywords, and it can be used as the label weight of the corresponding category label. Since the first label weight is obtained based on several first user keywords, it can reflect the importance of the matching probability output by the preset Bayesian network model.
[0144] The fourth acquisition module 400 is used to use the target large language model to process each historical description text in the historical description text library, obtain the second historical description text corresponding to a number of first user status information, and obtain the second label weight corresponding to each preset category label based on the actual category label corresponding to each second historical description text.
[0145] In a specific embodiment, Fig. 9 As shown, the fourth acquisition module 400 includes:
[0146] The third determination module 401 is used to obtain a number of second user status information from each historical description text in the historical description text library using the target large language model, and determine the historical description texts in the historical description text library that have the same semantics as the second user status information and the first user status information as the second historical text; it can be understood that the semantics of the second user status information corresponding to the second historical text correspond to the first user status information one by one. For example, the first user status information includes a high body temperature, and the second user status information includes a high temperature, and the two are considered to have the same semantics.
[0147] The second screening module 402 is used to screen out a number of actual category tags that are the same as the preset category tags from a number of actual category tags corresponding to a number of second historical texts for any preset category tag. For example, although the semantics of a number of second user status information corresponding to each second historical text are consistent with that of a number of first user status information, their final actual classification results do not belong to the same category tag, so the actual category tags that are the same as the preset category tags are screened out.
[0148] The sixth acquisition module 403 is used to use the ratio of the number of actual category labels screened out from the actual category labels corresponding to the second historical texts to the total number of actual category labels corresponding to the second historical texts as the second label weight corresponding to the preset category label.
[0149] As mentioned above, since the same number of second user state information may correspond to different label classification results, the classification accuracy corresponding to each label classification result can be known according to the proportion of each historical label classification result to all historical classification results corresponding to the number of second user state information, and it can be used as the label weight of the corresponding category label. Since the second label weight is obtained based on the number of first user state information, and the first user state information is extracted after semantic analysis by the target large language model, it can reflect the importance of the label classification result obtained after processing by the target large language model.
[0150] The first determination module 500 is used to calculate the target matching degree between the target user and each preset category label according to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, and determine the preset category label corresponding to the maximum target matching degree as the target category label of the target user.
[0151] In a specific embodiment, Fig.10 As shown, the first determining module 500 includes:
[0152] The fourth determination module 501 is used to determine, for any preset category label, the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model according to the first label weight corresponding to the preset category label and the second label weight corresponding to the preset category label.
[0153] Specifically, the model weight W1 corresponding to the preset Bayesian network model meets the following conditions:
[0154] W1=F1 / (F1+F2), where F1 is the first label weight and F2 is the second label weight.
[0155] Specifically, the model weight W2 corresponding to the target large language model meets the following conditions:
[0156] W2=F2 / (F1+F2).
[0157] The first calculation module 502 is used to calculate the target matching degree between the target user and the preset category label by performing a weighted sum calculation based on the first matching degree and the second matching degree of the preset category label and the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model.
[0158] Specifically, the target matching degree G of the target user corresponding to the preset category label meets the following conditions:
[0159] G=W1×P1+W2×P2, where P1 is the first matching degree between the target user and the preset category label, and P2 is the second matching degree between the target user and the preset category label.
[0160] As described above, according to the size of the first label weight and the size of the second label weight, it can reflect the historical accuracy difference between the matching degree of the label directly output by the preset Bayesian network model after processing the user description text, and the matching degree of the label output by the preset Bayesian network model after processing the user description text by the target large language model. Therefore, the first matching degree and the second matching degree are weighted according to the historical accuracy rate, so that the target matching degree is more accurate and reliable, thereby improving the screening accuracy of category labels.
[0161] In a preferred embodiment, Fig.11 As shown, the device further includes a fifth determining module, and the fifth determining module includes:
[0162] The sixth determination module 510 is used to determine the preset category tags whose corresponding target matching degree is greater than the preset matching degree threshold as key category tags. Those skilled in the art can set the preset matching degree threshold according to actual needs, which will not be described in detail here.
[0163] The seventh acquisition module 520 is used to acquire at least one current state characteristic information of the target user. For example, the current state characteristic information may be any one of body temperature, pulse, respiration and blood pressure.
[0164] The seventh determination module 530 is used to determine the target value interval corresponding to each current state feature according to the preset value intervals corresponding to each current state feature. For example, for body temperature, it can be divided into six preset value intervals, 36 0 Below 36.3°C is low temperature, 36~37.3°C 0 C is normal body temperature, 37.3~38 0 C is low fever, 38~39 0 C is moderate fever, 39~41 0 C is high fever, 41 0 C or above is a hyperthermic body temperature. Each preset numerical range may include a minimum value but not a maximum value. Blood pressure can also be divided into low pressure, normal pressure, and high pressure. The specific numerical range of the division is set by technical personnel in this field.
[0165] The eighth acquisition module 540 is used to input each acquired target numerical interval into a given Bayesian network model to obtain the third matching degree of the target user corresponding to each key category label; it can be understood that: the given Bayesian network model refers to a model trained according to several preset category labels and the target numerical interval corresponding to each current state feature information in several current state feature information corresponding to each preset category label. Those skilled in the art know the specific training method, and the training process is not the innovation of the present invention, so it will not be repeated here.
[0166] The eighth determination module 550 is used to calculate the weighted sum of the target matching degree, the third matching degree and the preset matching degree weights corresponding to the target matching degree and the third matching degree for each key category label to obtain the final matching degree of the target user corresponding to each key category label, and determine the key category label corresponding to the maximum final matching degree as the final category label of the target user.
[0167] As mentioned above, on the basis of the user description text, several state features are also considered, and the state feature information can also reflect the data information related to the category label to a large extent. Therefore, combining the target matching degree obtained by the user description text and the third matching degree obtained by the state feature information can further improve the accuracy and reliability of the final category label result.
[0168] Optional, such as Fig.12 As shown, the device further includes a ninth determining module, and the ninth determining module includes:
[0169] The sending module 600 obtains the query text corresponding to the target category label from the preset text library according to the target category label of the target user and sends it to the user end; it can be understood that the preset text library stores the query text corresponding to each pre-configured target category label.
[0170] The first return module 700 receives feedback text corresponding to the target user and the query text from the user end, and uses the feedback text as a new user description text, returns to the execution step of extracting a number of first user keywords from the user description text, and inputs the first user keywords into the preset Bayesian network model to obtain the first matching degree between the target user and each preset category label, and obtains the first acquisition module of the new target category label to obtain the new target category label.
[0171] The second returning module 800 determines that the new target category label is the user's category label when the new target category label is consistent with the original target category label; otherwise, based on the new target category label, returns to the sending module to obtain the new target category label again.
[0172] The tenth determination module 900, if the target category label obtained again is consistent with any target category label obtained previously, uses the current target category label as the user category label, otherwise, based on the new target category label obtained again, continues to return to the sending module until the user category label is determined.
[0173] As mentioned above, after obtaining the preliminary target category label, the feedback text is obtained again according to the query text corresponding to the target category label. Since the feedback text is not exactly the same as the initial user description text, the feedback text is processed again and a new target category label is obtained. The target category label obtained before can be verified. Through multiple iterations, the final target category label has higher accuracy, which can further improve the accuracy and reliability of the obtained user category label.
[0174] Embodiment 3
[0175] This embodiment provides an electronic device, including 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 following steps are implemented:
[0176] Receive a user description text input by a target user, extract a number of first user keywords from the user description text, and input the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; the user description text refers to a text describing characteristic information of the abnormal state of the target user.
[0177] The user description text is input into the target large language model for processing to obtain a number of first user state information, and the number of first user state information is input into a preset Bayesian network model to obtain a second matching degree between the target user and each preset category label.
[0178] A plurality of first historical description texts corresponding to a plurality of first user keywords are determined from the historical description text library, and a first label weight corresponding to each preset category label is obtained according to an actual category label corresponding to each first historical description text.
[0179] A target large language model is used to process each historical description text in the historical description text library to obtain second historical description texts corresponding to a number of first user status information, and according to the actual category label corresponding to each second historical description text, a second label weight corresponding to each preset category label is obtained.
[0180] According to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, the target matching degree between the target user and each preset category label is calculated, and the preset category label corresponding to the maximum target matching degree is determined as the target category label of the target user.
[0181] Embodiment 4
[0182] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0183] Receive a user description text input by a target user, extract a number of first user keywords from the user description text, and input the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; the user description text refers to a text describing characteristic information of the abnormal state of the target user.
[0184] The user description text is input into the target large language model for processing to obtain a number of first user state information, and the number of first user state information is input into a preset Bayesian network model to obtain a second matching degree between the target user and each preset category label.
[0185] A plurality of first historical description texts corresponding to a plurality of first user keywords are determined from the historical description text library, and a first label weight corresponding to each preset category label is obtained according to an actual category label corresponding to each first historical description text.
[0186] A target large language model is used to process each historical description text in the historical description text library to obtain second historical description texts corresponding to a number of first user status information, and according to the actual category label corresponding to each second historical description text, a second label weight corresponding to each preset category label is obtained.
[0187] According to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, the target matching degree between the target user and each preset category label is calculated, and the preset category label corresponding to the maximum target matching degree is determined as the target category label of the target user.
[0188] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0189] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0190] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for determining a user tag, characterized in that: The following steps are involved: receiving a user description text input by a target user, extracting a plurality of first user keywords from the user description text, and inputting the plurality of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; the user description text refers to a text describing characteristic information of an abnormal state of the target user; Inputting the user description text into a target large language model for processing to obtain a number of first user status information, and inputting the number of first user status information into a preset Bayesian network model to obtain a second matching degree between the target user and each preset category label; Determine a plurality of first historical description texts corresponding to a plurality of first user keywords from the historical description text library, and obtain a first label weight corresponding to each preset category label according to an actual category label corresponding to each first historical description text; Using the target large language model to process each historical description text in the historical description text library, obtaining second historical description texts corresponding to the plurality of first user status information, and obtaining a second label weight corresponding to each preset category label according to the actual category label corresponding to each second historical description text; According to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, the target matching degree between the target user and each preset category label is calculated, and the preset category label corresponding to the maximum target matching degree is determined as the target category label of the target user.
2. The method for determining a user tag according to claim 1, characterized in that: Obtain the first label weight corresponding to the preset category label through the following steps: A plurality of second user keywords are extracted from each historical description text in the historical description text library, and the historical description texts in the historical description text library corresponding to the plurality of second user keywords and the plurality of first user keywords are determined as first historical texts; For any preset category label, select a number of actual category labels that are the same as the preset category label from a number of actual category labels corresponding to a number of first historical texts; The ratio of the number of actual category labels selected from the actual category labels corresponding to the first historical texts to the total number of actual category labels corresponding to the first historical texts is used as the first label weight corresponding to the preset category label.
3. The method for determining a user tag according to claim 1, characterized in that: Obtain the second label weight corresponding to the preset category label through the following steps: A target large language model is used to obtain a plurality of second user status information from each historical description text in the historical description text library, and historical description texts in the historical description text library corresponding to the plurality of second user status information and having the same semantics as the plurality of first user status information are determined as second historical texts; For any preset category label, select a number of actual category labels that are the same as the preset category label from a number of actual category labels corresponding to a number of second historical texts; The ratio of the number of actual category labels selected from the actual category labels corresponding to the second historical texts to the total number of actual category labels corresponding to the second historical texts is used as the second label weight corresponding to the preset category label.
4. The method for determining a user tag according to claim 1, characterized in that: The target matching degree of the target user corresponding to any preset category label is calculated through the following steps: For any preset category label, according to the first label weight corresponding to the preset category label and the second label weight corresponding to the preset category label, determine the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model; According to the first matching degree and the second matching degree of the preset category label and the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model, a weighted sum is calculated to obtain the target matching degree between the target user and the preset category label.
5. The method for determining a user tag according to claim 1, characterized in that: The method further comprises the steps of: Determine a preset category label whose corresponding target matching degree is greater than a preset matching degree threshold as a key category label; Obtain at least one current status characteristic information of the target user; According to a plurality of preset numerical ranges corresponding to each current state feature, a target numerical range corresponding to each acquired current state feature is determined; Input each obtained target value interval into a given Bayesian network model to obtain the third matching degree of the target user corresponding to each key category label; According to the target matching degree, the third matching degree and the preset matching degree weights corresponding to the target matching degree and the third matching degree respectively corresponding to each key category tag, a weighted sum calculation is performed to obtain the final matching degree of the target user corresponding to each key category tag, and the key category tag corresponding to the largest final matching degree is determined as the final category tag of the target user.
6. The method for determining a user tag according to claim 1, characterized in that: The method further comprises the steps of: According to the target category label of the target user, the query text corresponding to the target category label is obtained from the preset text library and sent to the user end; Receive feedback text corresponding to the target user and the query text from the user terminal, and use the feedback text as a new user description text, return to the step of extracting a plurality of first user keywords from the user description text, and input the plurality of first user keywords into a preset Bayesian network model, obtain a first matching degree between the target user and each preset category label, and obtain a new target category label; When the new target category label is consistent with the original target category label, the new target category label is determined to be the user's category label; Otherwise, based on the new target category label, return to the step of obtaining the query text corresponding to the target category label from the preset text library according to the target category label of the target user and send it to the user end until a new target category label is obtained again; If the target category label obtained again is consistent with any target category label obtained previously, the current target category label is used as the user category label. Otherwise, based on the new target category label obtained again, continue to return to the execution step and obtain the query text corresponding to the target category label from the preset text library according to the target category label of the target user and send it to the user end until the user category label is determined.
7. A device for determining a user tag, characterized in that: The device comprises: A first acquisition module is used to receive a user description text input by a target user, extract a number of first user keywords from the user description text, and input the number of first user keywords into a preset Bayesian network model to obtain a first matching degree between the target user and each preset category label; the user description text refers to a text describing characteristic information of an abnormal state of the target user; A second acquisition module is used to input the user description text into a target large language model for processing, obtain a number of first user status information, and input the number of first user status information into a preset Bayesian network model to obtain a second matching degree between the target user and each preset category label; A third acquisition module is used to determine a plurality of first historical description texts corresponding to a plurality of first user keywords from the historical description text library, and acquire a first label weight corresponding to each preset category label according to an actual category label corresponding to each first historical description text; a fourth acquisition module, configured to process each historical description text in the historical description text library using the target large language model, obtain second historical description texts corresponding to the plurality of first user status information, and obtain a second label weight corresponding to each preset category label according to an actual category label corresponding to each second historical description text; The first determination module is used to calculate the target matching degree between the target user and each preset category label according to the first matching degree, the second matching degree, the first label weight and the second label weight corresponding to each preset category label, and determine the preset category label corresponding to the maximum target matching degree as the target category label of the target user.
8. The device for determining a user tag according to claim 7, characterized in that: The third acquisition module includes: A second determination module is used to extract a plurality of second user keywords from each historical description text in the historical description text library, and determine the historical description texts in the historical description text library corresponding to the plurality of second user keywords and the plurality of first user keywords as the first historical text; A first screening module is used to screen out, for any preset category label, a number of actual category labels corresponding to a number of first historical texts to obtain a number of actual category labels that are the same as the preset category label; A fifth acquisition module is used to take the ratio of the number of actual category labels screened out from the actual category labels corresponding to the first historical texts to the total number of actual category labels corresponding to the first historical texts as the first label weight corresponding to the preset category label.
9. The device for determining a user tag according to claim 7, characterized in that: The fourth acquisition module includes: A third determination module is used to obtain a plurality of second user status information from each historical description text in the historical description text library using the target large language model, and determine the historical description texts in the historical description text library corresponding to the plurality of second user status information and the plurality of first user status information with the same semantics as the second historical text; A second screening module is used to screen out, for any preset category label, a number of actual category labels corresponding to a number of second historical texts to obtain a number of actual category labels that are the same as the preset category label; A sixth acquisition module is used to take the ratio of the number of actual category labels screened out from the actual category labels corresponding to the second historical texts to the total number of actual category labels corresponding to the second historical texts as the second label weight corresponding to the preset category label.
10. The device for determining a user tag according to claim 7, characterized in that: The first determining module comprises: A fourth determination module is used to determine, for any preset category label, a model weight corresponding to a preset Bayesian network model and a model weight corresponding to a target large language model according to a first label weight corresponding to the preset category label and a second label weight corresponding to the preset category label; The first calculation module is used to calculate the target matching degree between the target user and the preset category label by performing a weighted sum calculation based on the first matching degree and the second matching degree of the preset category label and the model weight corresponding to the preset Bayesian network model and the model weight corresponding to the target large language model.
11. The device for determining a user tag according to claim 7, characterized in that: The device further includes a fifth determining module, wherein the fifth determining module includes: A sixth determination module, configured to determine a preset category label whose corresponding target matching degree is greater than a preset matching degree threshold as a key category label; A seventh acquisition module, used to acquire at least one current status feature information of a target user; A seventh determination module, configured to determine a target numerical interval corresponding to each current state feature acquired according to a plurality of preset numerical intervals corresponding to each current state feature; An eighth acquisition module, used to input each acquired target value interval into a given Bayesian network model to acquire a third matching degree of the target user corresponding to each key category label; The eighth determination module is used to calculate the weighted sum of the target matching degree, the third matching degree and the preset matching degree weights corresponding to the target matching degree and the third matching degree for each key category label to obtain the final matching degree of the target user corresponding to each key category label, and determine the key category label corresponding to the maximum final matching degree as the final category label of the target user.
12. The device for determining a user tag according to claim 7, characterized in that: The device further includes a ninth determining module, wherein the ninth determining module includes: The sending module obtains the query text corresponding to the target category label from the preset text library according to the target category label of the target user and sends it to the user end; The first return module receives the feedback text corresponding to the query text from the target user from the user terminal, and returns the feedback text as a new user description text to the first acquisition module to obtain a new target category label; The second return module determines that the new target category label is the user's category label when the new target category label is consistent with the original target category label; otherwise, based on the new target category label, returns to the sending module to obtain the new target category label again; The tenth determination module uses the current target category label as the user category label if the target category label obtained again is consistent with any target category label obtained previously. Otherwise, based on the new target category label obtained again, the sending module is continued to be returned until the user category label is determined.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for determining a user tag according to any one of claims 1 to 6 is implemented.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for determining a user tag according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Text classification method and computer equipment
CN109739989A
Text classification method and device
CN118364101A