Health demand language analysis system and method based on large language model

By analyzing the keyword sets and influencing factors of users' historical consultation records, the large language model is adjusted to more accurately understand the user's health needs, which solves the problem of the large language model being unable to capture the user's emotional and psychological needs, and improves the accuracy and adoption of feedback. Rate.

CN118568232AActive Publication Date: 2024-08-30王海龙

Patent Information

Application Number
CN202410721328.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-08-30
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

When understanding the user's health needs, the large language model cannot accurately capture the user's emotional state or psychological needs, resulting in the inability to provide appropriate support or suggestions.

Method used

By analyzing the keyword collection of user historical consultation records, we can determine invalid consultations and confirm influencing factors, adjust the large language model to more accurately understand user needs, and provide content supplementary reminders and feedback.

Benefits of technology

It improves the accuracy and adoption rate of user feedback, allowing the large language model to analyze user needs more scientifically, avoid general suggestions, and meet users' specific needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568232A
    Figure CN118568232A
Patent Text Reader

Abstract

The invention relates to the technical field of linguistic analysis, in particular to a health demand linguistic analysis system and method based on a large language model.The analysis method comprises the following steps that keyword extraction is conducted on a user historical symptom description text to obtain a keyword set, and consultation records are subjected to type division to obtain a keyword set; confirming influence factors of similar consultation records; by analyzing the result similarity between any two consultation results, the expected result similarity of similar consultation records is obtained through calculation; training the large language model; extracting a keyword set corresponding to the text content input by the user in real time, and judging whether to carry out content supplement reminding on the user; inputting the text content into a large language model to obtain a corresponding consultation result; judging whether the consultation result corresponding to the text content input by the user in real time is invalid consultation or not; and analyzing reasons that the consultation result is invalid consultation, and retraining the large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of language analysis technology, and in particular to a system and method for language analysis of health needs based on a large language model. Background Art

[0002] Large language models refer to large-scale natural language processing models, usually built with deep learning algorithms. These models perform well in processing text data and language tasks, and can understand and generate natural language text;

[0003] When using large language models to understand users' health needs, the large language model cannot accurately understand users' health needs because users are sometimes unable to accurately or completely describe their health conditions. At the same time, the large language model cannot accurately capture users' emotional states or psychological needs and can only provide general suggestions based on the converted text descriptions, resulting in the inability to provide appropriate support or suggestions to each user. Summary of the invention

[0004] The purpose of the present invention is to provide a system and method for language analysis of health needs based on a large language model to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a language analysis method for health needs based on a large language model, the analysis method comprising the following steps:

[0006] Step S100: Obtain the symptom description text of each consultation record in the user's history, extract keywords from the symptom description text to obtain a keyword set; determine whether to mark the previous consultation record as invalid by comparing the time interval between two adjacent consultation records and the similarity between the keyword sets; classify the consultation records into types based on the similarity between any two sets of keyword sets in all consultation records in the user's history, and confirm the influencing factors of the same type of consultation records;

[0007] Step S200: Obtain consultation results without invalid consultation marks in the same type of consultation records, and calculate the expected result similarity of the same type of consultation records by analyzing the result similarity between any two consultation results; analyze the proportion of various influencing factors in the same type of consultation records, and confirm the influence priority of various influencing factors; add influencing factors to the large language model according to the influence priority, and train the large language model;

[0008] Step S300: extract the keyword set corresponding to the text content input by the user in real time, confirm the consultation type of the text content; obtain the impact factor corresponding to the consultation type, and determine whether to remind the user to supplement the content; input the text content into the large language model to obtain the corresponding consultation result;

[0009] Step S400: Set a time response threshold. If the user inputs new text content within the time response threshold, extract a new keyword set of the new text content. Through the similarity between two adjacent groups of keyword sets, determine whether the consultation result corresponding to the text content input by the user in real time is an invalid consultation; analyze the reasons why the consultation result is an invalid consultation, and retrain the large language model.

[0010] Furthermore, step S100 includes the following steps:

[0011] Step S101: Set the symptom description text of the user's history i-th consultation record to T i , read the symptom description text T i The generation time t i ; Extract symptom description text T i Several keywords in the symptom description text T are generated i Keyword set W i =w1,w2,…,w r , where r is the symptom description text T i The total number of keywords in

[0012] Step S102: Get the generation time point of the i+1th consultation record as t i+1 , the interval between the i-th consultation record and the i+1-th consultation record is Δt i,i+1 =t i+1 -t i , set a time response threshold θ, if Δt i,i+1 <θ, then obtain the symptom description text T of the i+1th consultation record i+1 The corresponding keyword set W i+1 , count the number of identical keywords in the two sets of keyword sets, and calculate the similarity between the two sets of keyword sets as Among them, n i,i+1 is the number of identical keywords in the i-th keyword set and the i+1-th keyword set, MAX() is the maximum value selection function, n i is the number of keywords in the i-th keyword set, n i+1 is the number of keywords in the i+1th keyword set; set a similarity threshold δ, if S i,i+1>δ, the i-th consultation record is marked as invalid; when the interval between two consultation records is short and the keyword sets of the two consultation records are similar, it means that the feedback result of the previous consultation record was not adopted by the user, so the user needs to query the relevant content for the second time; marking the consultation record as invalid is conducive to the subsequent adjustment of the model, which facilitates the extraction of influencing factors and training objects;

[0013] Step S103: Classify all historical consultation records into two categories according to whether there is an invalid consultation mark; randomly extract one consultation record from each of the two categories of consultation records, compare the similarity between the two sets of keyword sets in the two consultation records, and if the similarity is greater than the similarity threshold, extract the difference keywords between the two sets of keyword sets; when the similarity between the two consultation records is high, but one has an invalid consultation mark and the other does not, then the consultation record without the mark has an influencing factor that affects the consultation result, because there is more relevant content of the influencing factor, the final generated result changes and is adopted by the user;

[0014] Step S104: Obtain the similarity of two sets of keyword sets corresponding to any two consultation records in all historical consultation records, classify several consultation records with similarities greater than a similarity threshold into the same type of consultation records, obtain all difference keywords in the same type of consultation records, classify all difference keywords according to their types, and obtain several types of influencing factors; for example: duration of illness, pain location, mental state, etc. can all be the types of difference keywords, and the type is a general term for a class of difference keywords.

[0015] Further, step S200 includes the following steps:

[0016] Step S201: Obtain all consultation records of the same type that do not have invalid consultation marks, and extract the consultation results of each consultation record; calculate the result similarity between the two consultation results by comparing the text contents corresponding to any two consultation results, and compare the result similarity of the two consultation results. The comparison can be made through technical means such as text content comparison, data mining technology, and specialized software in professional fields; sum up all result similarities to obtain the total result similarity value Sum k , where Sum k is the total similarity value of the results of the k-th consultation record, and the number of similarities of the results calculated in the k-th consultation record is m k , the expected result similarity of the k-th type of consultation record is calculated as The consulting results adopted by users in similar consulting records are taken as expected results. By comparing with the expected results, it can be accurately judged whether the consulting results will be adopted by users, thus improving efficiency;

[0017] Step S202: Obtain the number of times each keyword in each type of impact factor is used as a difference keyword in all consultation records with invalid consultation marks, and set the number of times of the zth type of impact factor to x. z , the key proportion of the z-th impact factor is Among them, X is the number of consultation records with invalid consultation marks; sort from large to small according to the size of the key proportion, and set the influence priority of various influencing factors; the higher the key proportion of the influencing factor, the greater the degree of influence, which is conducive to reminding users to give priority to supplementing content when adjusting the model later, and maximizing the possibility of users adopting feedback results;

[0018] Step S203: Add various influencing factors to the large language model, input the consultation records with invalid consultation marks into the large language model, add the corresponding content of an influencing factor according to the influence priority of various influencing factors, obtain a new consultation result after processing by the large language model, randomly extract the consultation result of the consultation record without invalid consultation marks, and obtain the similarity D' between the two consultation results. If D' <D k , then continue to add the corresponding content of the next impact factor until D'≥D k until;

[0019] Step S204: When processing the k-th type of consultation record through the large language model, the number of influencing factors added to the large language model is set to y k , from all the consultation records with invalid consultation marks in the k-th type of consultation records, select a×X consultation records as the training set, and the remaining (1-a)×X consultation records as the test set, where a is a constant coefficient; if there are some consultation results in the training set whose similarity is less than the expected result similarity, then add new influencing factors to the large language model until the similarity of the consultation results of all consultation records in the training set is greater than the expected result similarity; test the large language model through the test set, if there are some consultation results whose similarity is less than the expected result similarity, then extract some consultation records from the test set and put them into the training set, and retrain the large language model.

[0020] Further, step S300 includes the following steps:

[0021] Step S301: obtaining the text content input by the user in real time, extracting keywords from the text content, and generating a keyword set W'; performing keyword comparison between the keyword set W' and the keyword set corresponding to each historical consultation record, calculating the similarity between the two sets of keyword sets, selecting the historical consultation record with the greatest similarity, and extracting the consultation type corresponding to the historical consultation record as the consultation type of the current text content of the user;

[0022] Step S302: Obtain the influencing factor added to the large language model for the consultation type. If the influencing factor does not exist in the keyword set W', remind the user to supplement the content; input the supplemented text content into the large language model to obtain the consultation result, and provide the user with health needs feedback; based on the relationship between the keyword set and the influencing factor corresponding to the user input text, actively remind the user to supplement the content, which is conducive to helping the user supplement effective information, improve the user's needs, and provide the user with an accurate feedback result.

[0023] Furthermore, step S400 includes the following steps:

[0024] Step S401: Set a time response threshold θ. If the user inputs new text content into the large language model before the time length θ, extract the keywords in the new text content to obtain a new keyword set W' new ; For the keyword set W' and the new keyword set W' new Perform similarity comparison to obtain the similarity of two keyword sets Set a similarity threshold δ, if Then the text content corresponding to the keyword set W' is marked as invalid consultation;

[0025] Step S402: Select a historical consultation record with the greatest similarity to the keyword set W', compare the text contents corresponding to the two consultation results, and obtain the result similarity between the two consultation results. If the result similarity is less than the set expected result similarity, put the text content corresponding to the keyword set W' into the test set in the large language model and retrain the large language model; if the result similarity is greater than the set expected result similarity, obtain a new keyword set W' new In the example, the keywords that are different from the keywords in the keyword set W' and are not influencing factors are added to the large language model as new influencing factors, and the large language model is retrained in combination with the new text content.

[0026] In order to better implement the above method, a health demand language analysis system based on a large language model is also proposed. The analysis system includes a historical data analysis module, a model training module, a real-time data feedback module, and a model adjustment module;

[0027] The historical data analysis module is used to obtain the symptom description text of each consultation record of the user, extract keywords from the symptom description text to obtain a keyword set; determine whether to mark the previous consultation record as invalid by comparing the time interval between the generation time points of two adjacent consultation records and the similarity between the keyword sets; classify the consultation records into types based on the similarity between any two sets of keyword sets in all the consultation records of the user, and confirm the influencing factors of the same type of consultation records;

[0028] The model training module is used to obtain the consulting results without invalid consulting marks in the same consulting records, and calculate the expected result similarity of the same consulting records by analyzing the similarity between any two consulting results; analyze the proportion of various influencing factors in the same consulting records, and confirm the influence priority of various influencing factors; add influencing factors to the large language model according to the influence priority, and train the large language model;

[0029] The real-time data feedback module is used to extract the keyword set corresponding to the text content input by the user in real time, confirm the consultation type of the text content; obtain the impact factor corresponding to the consultation type, and determine whether to remind the user to supplement the content; input the text content into the large language model to obtain the corresponding consultation results;

[0030] The model adjustment module is used to set a time response threshold. If the user enters new text content within the time response threshold, a new keyword set of the new text content is extracted. Through the similarity between two adjacent groups of keyword sets, it is determined whether the consultation result corresponding to the text content entered by the user in real time is an invalid consultation; the reasons why the consultation result is an invalid consultation are analyzed, and the large language model is retrained.

[0031] Further, the historical data analysis module includes an invalid consultation judgment unit and an impact factor setting unit;

[0032] The invalid consultation judgment unit is used to obtain the symptom description text of each consultation record in the user's history, and to extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time points of two adjacent consultation records and the similarity between the keyword sets, it is determined whether to mark the previous consultation record as an invalid consultation; the impact factor setting unit is used to classify the consultation records according to the similarity between any two groups of keyword sets in all the consultation records in the user's history, and to confirm the impact factors of the same type of consultation records.

[0033] Furthermore, the model training module includes a similarity calculation unit and an impact factor adding unit;

[0034] The similarity calculation unit is used to obtain the consulting results without invalid consulting marks in the same consulting records, and calculate the expected result similarity of the same consulting records by analyzing the result similarity between any two consulting results; the impact factor adding unit is used to analyze the proportion of various impact factors in the same consulting records and confirm the impact priority of various impact factors; the impact factors are added to the large language model according to the impact priority, and the large language model is trained.

[0035] Furthermore, the real-time data feedback module includes a consultation type confirmation unit and a result acquisition unit;

[0036] The consultation type confirmation unit is used to extract the keyword set corresponding to the text content input by the user in real time and confirm the consultation type of the text content; the result acquisition unit is used to obtain the impact factor corresponding to the consultation type and determine whether to provide content supplement reminders to the user; the text content is input into the large language model to obtain the corresponding consultation results.

[0037] Further, the model adjustment module includes a new set acquisition unit and a consultation analysis unit;

[0038] The new set acquisition unit is used to set a time response threshold. If the user inputs new text content within the time response threshold, a new keyword set of the new text content is extracted. The similarity between two adjacent groups of keyword sets is used to determine whether the consultation result corresponding to the text content input by the user in real time is an invalid consultation; the consultation analysis unit is used to analyze the reasons why the consultation result is an invalid consultation and retrain the large language model.

[0039] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: (1) The present invention analyzes different results generated by the same historical consultation type to confirm the influencing factors of each consultation type. When the user conducts health consultation in the future, the present invention can analyze whether there is relevant content of the influencing factors in the text content, provide supplementary reminders to the user, help the user to supplement the content, and provide the user with more reasonable feedback to more accurately meet the needs of the user; (2) The present invention continuously trains and improves the large language model, so that the large language model can scientifically analyze the user's needs based on the text input by the user, avoids the problem of general feedback, and improves the user's adoption rate; (3) The present invention adds different numbers of influencing factors to different consultation types. When the user conducts health consultation, it can actively help the user to supplement the required content, so that the final generated results are more in line with the user's needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0041] Figure 1 It is a schematic diagram of the steps of a method for language analysis of health needs based on a large language model;

[0042] Figure 2 It is a structural diagram of a health needs language analysis system based on a large language model. DETAILED DESCRIPTION

[0043] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] See also Figure 1 to Figure 2 The present invention provides a technical solution: a language analysis method for health needs based on a large language model, the analysis method comprising the following steps:

[0045] Step S100: Obtain the symptom description text of each consultation record in the user's history, extract keywords from the symptom description text to obtain a keyword set; determine whether to mark the previous consultation record as invalid by comparing the time interval between two adjacent consultation records and the similarity between the keyword sets; classify the consultation records into types based on the similarity between any two sets of keyword sets in all consultation records in the user's history, and confirm the influencing factors of the same type of consultation records;

[0046] Wherein, step S100 includes the following steps:

[0047] Step S101: Set the symptom description text of the user's history i-th consultation record to T i , read the symptom description text T i The generation time t i ; Extract symptom description text T i Several keywords in the symptom description text T are generated i Keyword set W i =w1,w2,…,w r , where r is the symptom description text T i The total number of keywords in

[0048] Step S102: Get the generation time point of the i+1th consultation record as t i+1 , the interval between the i-th consultation record and the i+1-th consultation record is Δt i,i+1 =t i+1 -t i, set a time response threshold θ, if Δt i,i+1 <θ, then obtain the symptom description text T of the i+1th consultation record i+1 The corresponding keyword set W i+1 , count the number of identical keywords in the two sets of keyword sets, and calculate the similarity between the two sets of keyword sets as Among them, n i,i+1 is the number of identical keywords in the i-th keyword set and the i+1-th keyword set, MAX() is the maximum value selection function, n i is the number of keywords in the i-th keyword set, n i+1 is the number of keywords in the i+1th keyword set; set a similarity threshold δ, if S i,i+1 >δ, the i-th consultation record will be marked as invalid;

[0049] Step S103: Classify all historical consultation records into two categories according to whether there is an invalid consultation mark; randomly extract one consultation record from each of the two categories of consultation records, compare the similarity between the two groups of keyword sets in the two consultation records, and if the similarity is greater than the similarity threshold, extract the difference keywords between the two groups of keyword sets;

[0050] Step S104: Obtain the similarity between two sets of keyword sets corresponding to any two consultation records in all historical consultation records, classify several consultation records with similarities greater than a similarity threshold into similar consultation records, obtain all different keywords in similar consultation records, classify all different keywords according to their types, and obtain several types of influencing factors.

[0051] Step S200: Obtain consultation results without invalid consultation marks in the same type of consultation records, and calculate the expected result similarity of the same type of consultation records by analyzing the result similarity between any two consultation results; analyze the proportion of various influencing factors in the same type of consultation records, and confirm the influence priority of various influencing factors; add influencing factors to the large language model according to the influence priority, and train the large language model;

[0052] Wherein, step S200 includes the following steps:

[0053] Step S201: Obtain all consultation records of the same type that do not have invalid consultation marks, and extract the consultation results of each consultation record; calculate the result similarity between the two consultation results by comparing the text contents corresponding to any two consultation results; sum up all result similarities to obtain the total result similarity value Sum k , where Sum kis the total similarity value of the results of the k-th consultation record, and the number of similarities of the results calculated in the k-th consultation record is m k , the expected result similarity of the k-th type of consultation record is calculated as

[0054] Step S202: Obtain the number of times each keyword in each type of impact factor is used as a difference keyword in all consultation records with invalid consultation marks, and set the number of times of the zth type of impact factor to x. z , the key proportion of the z-th impact factor is Among them, X is the number of consultation records with invalid consultation marks; sort them from large to small according to the size of the key proportion, and set the influence priority of various influencing factors;

[0055] Step S203: Add various influencing factors to the large language model, input the consultation records with invalid consultation marks into the large language model, add the corresponding content of an influencing factor according to the influence priority of various influencing factors, obtain a new consultation result after processing by the large language model, randomly extract the consultation result of the consultation record without invalid consultation marks, and obtain the similarity D' between the two consultation results. If D' <D k , then continue to add the corresponding content of the next impact factor until D'≥D k until;

[0056] Step S204: When processing the k-th type of consultation record through the large language model, the number of influencing factors added to the large language model is set to y k , from all the consultation records with invalid consultation marks in the k-th type of consultation records, select a×X consultation records as the training set, and the remaining (1-a)×X consultation records as the test set, where a is a constant coefficient; if there are some consultation results in the training set whose similarity is less than the expected result similarity, then add new influencing factors to the large language model until the similarity of the consultation results of all consultation records in the training set is greater than the expected result similarity; test the large language model through the test set, if there are some consultation results whose similarity is less than the expected result similarity, then extract some consultation records from the test set and put them into the training set, and retrain the large language model.

[0057] Step S300: extract the keyword set corresponding to the text content input by the user in real time, confirm the consultation type of the text content; obtain the impact factor corresponding to the consultation type, and determine whether to remind the user to supplement the content; input the text content into the large language model to obtain the corresponding consultation result;

[0058] Wherein, step S300 includes the following steps:

[0059] Step S301: obtaining the text content input by the user in real time, extracting keywords from the text content, and generating a keyword set W'; performing keyword comparison between the keyword set W' and the keyword set corresponding to each historical consultation record, calculating the similarity between the two sets of keyword sets, selecting the historical consultation record with the greatest similarity, and extracting the consultation type corresponding to the historical consultation record as the consultation type of the current text content of the user;

[0060] Step S302: Obtain the influencing factor of the consultation type added to the large language model. If the influencing factor does not exist in the keyword set W', remind the user to supplement the content; input the supplemented text content into the large language model to obtain the consultation result, and provide health needs feedback to the user.

[0061] Step S400: a time response threshold is set. If the user inputs new text content within the time response threshold, a new keyword set of the new text content is extracted. Through the similarity between two adjacent sets of keyword sets, it is determined whether the consultation result corresponding to the text content input by the user in real time is invalid consultation; the reason why the consultation result is invalid consultation is analyzed, and the large language model is retrained;

[0062] Wherein, step S400 includes the following steps:

[0063] Step S401: Set a time response threshold θ. If the user inputs new text content into the large language model before the time length θ, extract the keywords in the new text content to obtain a new keyword set W' new ; For the keyword set W' and the new keyword set W' new Perform similarity comparison to obtain the similarity of two keyword sets Set a similarity threshold δ, if Then the text content corresponding to the keyword set W' is marked as invalid consultation;

[0064] Step S402: Select a historical consultation record with the greatest similarity to the keyword set W', compare the text contents corresponding to the two consultation results, and obtain the result similarity between the two consultation results. If the result similarity is less than the set expected result similarity, put the text content corresponding to the keyword set W' into the test set in the large language model and retrain the large language model; if the result similarity is greater than the set expected result similarity, obtain a new keyword set W' new In the example, the keywords that are different from the keywords in the keyword set W' and are not influencing factors are added to the large language model as new influencing factors, and the large language model is retrained in combination with the new text content.

[0065] A health needs language analysis system based on a large language model, the analysis system includes a historical data analysis module, a model training module, a real-time data feedback module, and a model adjustment module;

[0066] The historical data analysis module is used to obtain the symptom description text of each consultation record of the user, extract keywords from the symptom description text to obtain a keyword set; determine whether to mark the previous consultation record as invalid by comparing the time interval between the generation time points of two adjacent consultation records and the similarity between the keyword sets; classify the consultation records into types based on the similarity between any two sets of keyword sets in all the consultation records of the user, and confirm the influencing factors of the same type of consultation records;

[0067] The model training module is used to obtain the consulting results without invalid consulting marks in the same consulting records, and calculate the expected result similarity of the same consulting records by analyzing the similarity between any two consulting results; analyze the proportion of various influencing factors in the same consulting records, and confirm the influence priority of various influencing factors; add influencing factors to the large language model according to the influence priority, and train the large language model;

[0068] The real-time data feedback module is used to extract the keyword set corresponding to the text content input by the user in real time, confirm the consultation type of the text content; obtain the impact factor corresponding to the consultation type, and determine whether to remind the user to supplement the content; input the text content into the large language model to obtain the corresponding consultation results;

[0069] The model adjustment module is used to set a time response threshold. If the user enters new text content within the time response threshold, a new keyword set of the new text content is extracted. Through the similarity between two adjacent groups of keyword sets, it is determined whether the consultation result corresponding to the text content entered by the user in real time is an invalid consultation; the reasons why the consultation result is an invalid consultation are analyzed, and the large language model is retrained.

[0070] Among them, the historical data analysis module includes an invalid consultation judgment unit and an impact factor setting unit;

[0071] The invalid consultation judgment unit is used to obtain the symptom description text of each consultation record in the user's history, and to extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time points of two adjacent consultation records and the similarity between the keyword sets, it is determined whether to mark the previous consultation record as an invalid consultation; the impact factor setting unit is used to classify the consultation records according to the similarity between any two groups of keyword sets in all the consultation records in the user's history, and to confirm the impact factors of the same type of consultation records.

[0072] Among them, the model training module includes a similarity calculation unit and an impact factor adding unit;

[0073] The similarity calculation unit is used to obtain the consulting results without invalid consulting marks in the same consulting records, and calculate the expected result similarity of the same consulting records by analyzing the result similarity between any two consulting results; the impact factor adding unit is used to analyze the proportion of various impact factors in the same consulting records and confirm the impact priority of various impact factors; the impact factors are added to the large language model according to the impact priority, and the large language model is trained.

[0074] Among them, the real-time data feedback module includes a consultation type confirmation unit and a result acquisition unit;

[0075] The consultation type confirmation unit is used to extract the keyword set corresponding to the text content input by the user in real time and confirm the consultation type of the text content; the result acquisition unit is used to obtain the impact factor corresponding to the consultation type and determine whether to remind the user to supplement the content; the text content is input into the large language model to obtain the corresponding consultation result.

[0076] Among them, the model adjustment module includes a new set acquisition unit and a consultation analysis unit;

[0077] The new set acquisition unit is used to set a time response threshold. If the user inputs new text content within the time response threshold, a new keyword set of the new text content is extracted. The similarity between two adjacent groups of keyword sets is used to determine whether the consultation result corresponding to the text content input by the user in real time is an invalid consultation; the consultation analysis unit is used to analyze the reasons why the consultation result is an invalid consultation and retrain the large language model.

[0078] The symptom description text of the user's first consultation record is obtained. When the time point of generation is 1, several keywords are extracted from the symptom description text, and the generated keyword set is headache and malaise; when the time point of generation of the second consultation record is 2, the generated keywords are headache, malaise, and lasting for 3 days; when the interval between the two consultation records is 1, a time response threshold θ=3 is set, because 1<3, so the similarity of the two groups of keywords is compared, and the number of identical keywords is 2, and the number of keywords in the maximum number of keyword sets is 3, so the similarity of the two groups of keyword sets is 66.7%; a similarity threshold is set to δ=60%, because 66.7%>60%, so the first consultation record is marked as invalid consultation;

[0079] A difference keyword "lasting for 3 days" is obtained from the keyword set of the two historical consultation records. The description type of the difference keyword is duration. Therefore, duration is used as an influencing factor for this type of consultation record. The duration is added to the big data model as an influencing factor to train the big language model.

[0080] The text content input by the user is obtained in real time, and the keywords of the text content are extracted. The headache and the duration are obtained, and the keywords are compared with the historical second consultation record to obtain the consultation type of the user's text content. The influencing factor is obtained as duration. This type of description exists in the extracted keywords, so there is no need to supplement the content. The content is input into the large language model for processing, the consultation result is obtained, and the health needs feedback is provided to the user.

[0081] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0082] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for language analysis of health needs based on a large language model, characterized by: The analytical method comprises the following steps: Step S100: Obtain the symptom description text of each consultation record in the user's history, extract keywords from the symptom description text to obtain a keyword set; determine whether to mark the previous consultation record as invalid by comparing the time interval between two adjacent consultation records and the similarity between the keyword sets; classify the consultation records into types based on the similarity between any two sets of keyword sets in all consultation records in the user's history, and confirm the influencing factors of the same type of consultation records; Step S200: Obtain consultation results without invalid consultation marks in the same type of consultation records, and calculate the expected result similarity of the same type of consultation records by analyzing the result similarity between any two consultation results; analyze the proportion of various influencing factors in the same type of consultation records, and confirm the influence priority of various influencing factors; add influencing factors to the large language model according to the influence priority, and train the large language model; Step S300: extracting a keyword set corresponding to the text content input by the user in real time, confirming the consultation type of the text content; obtaining the impact factor corresponding to the consultation type, and determining whether to provide the user with a content supplement reminder; inputting the text content into the large language model to obtain the corresponding consultation result; Step S400: Set a time response threshold. If the user inputs new text content within the time response threshold, extract a new keyword set of the new text content. Through the similarity between two adjacent groups of keyword sets, determine whether the consultation result corresponding to the text content input by the user in real time is an invalid consultation; analyze the reasons why the consultation result is an invalid consultation, and retrain the large language model.

2. The method for language analysis of health needs based on a large language model according to claim 1, characterized in that: The step S100 includes the following steps: Step S101: Set the symptom description text of the user's history i-th consultation record to T i , read the symptom description text T i The generation time t i ; Extract symptom description text T i Several keywords in the symptom description text T are generated i Keyword set W i =w1,w2,…,w r , where r is the symptom description text T i The total number of keywords in Step S102: Get the generation time point of the i+1th consultation record as t i+1 , get the interval time Δt between the i-th consultation record and the i+1-th consultation record i,i+1 , set a time response threshold θ, if Δt i,i+1 <θ, then obtain the symptom description text T of the i+1th consultation record i+1 The corresponding keyword set W i+1 , count the number of identical keywords in the two sets of keyword sets, and calculate the similarity of the two sets of keyword sets as S i,i+1 ; Set a similarity threshold δ, if S i,i+1 >δ, the i-th consultation record will be marked as invalid; Step S103: Classify all historical consultation records into two categories according to whether there is an invalid consultation mark; randomly extract one consultation record from each of the two categories of consultation records, compare the similarity between the two groups of keyword sets in the two consultation records, and if the similarity is greater than the similarity threshold, extract the difference keywords between the two groups of keyword sets; Step S104: Obtain the similarity between two sets of keyword sets corresponding to any two consultation records in all historical consultation records, classify several consultation records with similarities greater than a similarity threshold into similar consultation records, obtain all different keywords in similar consultation records, classify all different keywords according to their types, and obtain several types of influencing factors.

3. The method for language analysis of health needs based on a large language model according to claim 2 is characterized by: The step S200 includes the following steps: Step S201: Obtain all consultation records of the same type that do not have invalid consultation marks, and extract the consultation results of each consultation record; calculate the result similarity between the two consultation results by comparing the text contents corresponding to any two consultation results; sum up all result similarities to obtain the total result similarity value Sum k , where Sum k is the total similarity value of the results of the k-th consultation record, and the number of similarities of the results calculated in the k-th consultation record is m k , the expected result similarity of the k-th type of consultation record is calculated as Step S202: Obtain the number of times each keyword in each type of impact factor is used as a difference keyword in all consultation records with invalid consultation marks, and set the number of times of the zth type of impact factor to x. z , the key proportion of the z-th impact factor is Among them, X is the number of consultation records with invalid consultation marks; sort them from large to small according to the size of the key proportion, and set the influence priority of various influencing factors; Step S203: Add various influencing factors to the large language model, input the consultation records with invalid consultation marks into the large language model, add the corresponding content of an influencing factor according to the influence priority of various influencing factors, obtain a new consultation result after processing by the large language model, randomly extract the consultation result of the consultation record without invalid consultation marks, and obtain the similarity D' between the two consultation results. If D' <D k , then continue to add the corresponding content of the next impact factor until D'≥D k until; Step S204: When processing the k-th type of consultation record through the large language model, the number of influencing factors added to the large language model is set to y k , from all the consultation records with invalid consultation marks in the k-th type of consultation records, select a×X consultation records as the training set, and the remaining (1-a)×X consultation records as the test set, where a is a constant coefficient; if there are some consultation results in the training set whose similarity is less than the expected result similarity, then add new influencing factors to the large language model until the similarity of the consultation results of all consultation records in the training set is greater than the expected result similarity; test the large language model through the test set, if there are some consultation results whose similarity is less than the expected result similarity, then extract some consultation records from the test set and put them into the training set, and retrain the large language model.

4. The method for language analysis of health needs based on a large language model according to claim 3 is characterized by: The step S300 includes the following steps: Step S301: obtaining the text content input by the user in real time, extracting keywords from the text content, and generating a keyword set W'; performing keyword comparison between the keyword set W' and the keyword set corresponding to each historical consultation record, calculating the similarity between the two sets of keyword sets, selecting the historical consultation record with the greatest similarity, and extracting the consultation type corresponding to the historical consultation record as the consultation type of the current text content of the user; Step S302: Obtain the influencing factor of the consultation type added to the large language model. If the influencing factor does not exist in the keyword set W', remind the user to supplement the content; input the supplemented text content into the large language model to obtain the consultation result, and provide health needs feedback to the user.

5. The method for language analysis of health needs based on a large language model according to claim 4 is characterized by: The step S400 includes the following steps: Step S401: Set a time response threshold θ. If the user inputs new text content into the large language model before the time length θ, extract the keywords in the new text content to obtain a new keyword set W' new ; For the keyword set W' and the new keyword set W' new Perform similarity comparison to obtain the similarity of two keyword sets Set a similarity threshold δ, if Then the text content corresponding to the keyword set W' is marked as invalid consultation; Step S402: Select a historical consultation record with the greatest similarity to the keyword set W', compare the text contents corresponding to the two consultation results, and obtain the result similarity between the two consultation results. If the result similarity is less than the set expected result similarity, put the text content corresponding to the keyword set W' into the test set in the large language model and retrain the large language model; if the result similarity is greater than the set expected result similarity, obtain a new keyword set W' new In the example, the keywords that are different from the keywords in the keyword set W' and are not influencing factors are added to the large language model as new influencing factors, and the large language model is retrained in combination with the new text content.

6. A health needs language analysis system applied to a health needs language analysis method based on a large language model according to any one of claims 1 to 5, characterized in that: The analysis system includes a historical data analysis module, a model training module, a real-time data feedback module, and a model adjustment module; The historical data analysis module is used to obtain the symptom description text of each consultation record of the user, extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time points of two adjacent consultation records and the similarity between the keyword set, determine whether to mark the previous consultation record as invalid; According to the similarity between any two sets of keyword sets in all the user's historical consultation records, the consultation records are classified into types and the influencing factors of the same type of consultation records are confirmed; The model training module is used to obtain consultation results without invalid consultation marks in the same type of consultation records, and calculate the expected result similarity of the same type of consultation records by analyzing the result similarity between any two consultation results; Analyze the proportion of various impact factors in similar consulting records and confirm the impact priority of various impact factors; add impact factors to the large language model according to the impact priority and train the large language model; The real-time data feedback module is used to extract the keyword set corresponding to the text content input by the user in real time and confirm the consultation type of the text content; Obtaining the impact factor corresponding to the consultation type, and determining whether to provide the user with a reminder to supplement the content; Input the text content into the large language model to obtain the corresponding consulting results; The model adjustment module is used to set a time response threshold. If the user inputs new text content within the time response threshold, a new keyword set of the new text content is extracted. Through the similarity between two adjacent groups of keyword sets, it is determined whether the consultation result corresponding to the text content input by the user in real time is an invalid consultation; the reason why the consultation result is an invalid consultation is analyzed, and the large language model is retrained.

7. The health needs language analysis system according to claim 6, characterized in that: The historical data analysis module includes an invalid consultation judgment unit and an impact factor setting unit; The invalid consultation judgment unit is used to obtain the symptom description text of each consultation record of the user, extract keywords from the symptom description text to obtain a keyword set; and judge whether to mark the previous consultation record as invalid by comparing the time interval between the generation time points of two adjacent consultation records and the similarity between the keyword set; The impact factor setting unit is used to classify the consultation records according to the similarity between any two sets of keyword sets in all the historical consultation records of the user, and to confirm the impact factors of the same type of consultation records.

8. The health needs language analysis system according to claim 6, characterized in that: The model training module includes a similarity calculation unit and an impact factor adding unit; The similarity calculation unit is used to obtain the consulting results without invalid consulting marks in the same type of consulting records, and calculate the expected result similarity of the same type of consulting records by analyzing the result similarity between any two consulting results; The impact factor adding unit is used to analyze the proportion of various impact factors in similar consulting records, confirm the impact priority of various impact factors, add impact factors to the large language model according to the impact priority, and train the large language model.

9. The health needs language analysis system according to claim 6, characterized in that: The real-time data feedback module includes a consultation type confirmation unit and a result acquisition unit; The consultation type confirmation unit is used to extract a keyword set corresponding to the text content input by the user in real time, and confirm the consultation type of the text content; The result acquisition unit is used to obtain the impact factor corresponding to the consultation type and determine whether to remind the user to supplement the content; Input the text content into the large language model to obtain the corresponding consulting results.

10. The health needs language analysis system according to claim 6, characterized in that: The model adjustment module includes a new set acquisition unit and a consultation analysis unit; The new set acquisition unit is used to set a time response threshold. If the user inputs new text content within the time response threshold, a new keyword set of the new text content is extracted, and the similarity between two adjacent sets of keyword sets is used to determine whether the consultation result corresponding to the text content input by the user in real time is an invalid consultation; The consultation analysis unit is used to analyze the reasons why the consultation result is invalid consultation and retrain the large language model.

Citation Information

Patent Citations

  • Postpartum consultation service system and method based on portrait label

    CN114579732A

  • Insurance clause consultation automatic answering method, medium and system

    CN117149955A

  • Model accuracy determination method and device, computer equipment and storage medium

    CN117852520A

  • training data construction method for automatically generating training data for artificial intelligence model for counseling intention classification

    KR102280490B1

Cited By

  • Multi-mode man-machine collaborative interaction system and method

    CN118865977A

  • Urology department traditional Chinese medicine inquiry result prediction method and system applying large language model

    CN119811630A

  • Multimodal human-machine collaborative interaction system and method

    US12322393B1