A health demand language analysis system and method based on a large language model

CN118568232BActive Publication Date: 2026-10-09王海龙
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0003]在通过大语言模型去理解用户的健康需求时,由于用户有些时候无法准确或者完整地描述自己的健康状况,导致大语言模型并不能准确理解用户的健康需求;同时,大语言模型也无法准确捕捉用户的情绪状态或心理需求,只能根据转化过来的文字描述提供一般性的建议,导致无法给每个用户提供恰当的支持或建议

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568232B_ABST
    Figure CN118568232B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of language analysis, in particular to a health demand language analysis system and method based on a large language model. The analysis method comprises the following steps: extracting keywords from user historical symptom description texts to obtain a keyword set, classifying consultation records, and confirming influence factors of similar consultation records; calculating the expected result similarity of similar consultation records by analyzing the result similarity between any two consultation results; training the large language model; extracting a keyword set corresponding to real-time input text content of a user, judging whether to supplement and remind the user of the content; inputting the text content into the large language model to obtain a corresponding consultation result; judging whether the consultation result corresponding to the real-time input text content of the user is invalid consultation; analyzing the reason for the invalid consultation result, and retraining the large language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of linguistic analysis technology, specifically to a system and method for linguistic analysis of health needs based on a large language model. Background Technology

[0002] Large language models refer to massive natural language processing models, typically built using deep learning algorithms. These models excel at processing text data and language tasks, capable of understanding and generating natural language text;

[0003] When using a large language model to understand users' health needs, the model sometimes fails to accurately or completely describe their health status, resulting in a lack of accurate understanding of these needs. Furthermore, the large language model cannot accurately capture users' emotional state or psychological needs, and can only provide general advice based on the translated text descriptions, thus failing to provide appropriate support or advice to each user. Summary of the Invention

[0004] The purpose of this invention is to provide a health needs language analysis system and method based on a large language model to solve the problems mentioned in the background art.

[0005] To address the aforementioned technical problems, this invention provides the following technical solution: a method for linguistic analysis of 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 of the user's historical consultation records, 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 by type according to the similarity between any two sets of keyword sets in all of the user's historical consultation records, and confirm the influence factors of consultation records of the same type.

[0007] Step S200: Obtain consultation results without invalid consultation markers from similar consultation records; calculate the expected result similarity of similar consultation records by analyzing the result similarity between any two consultation results; analyze the proportion of various influencing factors in similar consultation records to confirm the priority order of influence of various influencing factors; add influencing factors to the large language model according to the priority order of influence, 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, and confirm the consultation type of the text content; obtain the influencing factor corresponding to the consultation type, and determine whether to provide the user with supplementary content reminders; input the text content into the large language model to obtain the corresponding consultation results;

[0009] Step S400: Set a time response threshold. If the user inputs new text content within the time response threshold, extract the new keyword set of the new text content. By comparing the similarity between two adjacent keyword sets, determine whether the consultation result corresponding to the user's real-time input text content 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 i-th consultation record to T. i Read the symptom description text T i Generation time point t i Extracting symptom description text T i Generate symptom description text T using several keywords from the text. 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: Obtain the generation time of the (i+1)th consultation record as t. i+1 The time 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 If θ < , then obtain the symptom description text T from the (i+1)th consultation record. i+1 The corresponding keyword set W i+1 The number of identical keywords in two keyword sets is counted, and the similarity between the two keyword sets is calculated. Where, n i,i+1 Let n be the number of identical keywords in the i-th keyword set and the (i+1)-th keyword set, and MAX() be the function to select the maximum value. i Let n be the number of keywords in the i-th keyword set. i+1 Let S be the number of keywords in the (i+1)th keyword set; set a similarity threshold δ, if S i,i+1If the value is greater than δ, then 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 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 perform a second query for relevant content. Marking consultation records as invalid is beneficial for subsequent model adjustments, making it easier to extract influencing factors and training objects.

[0013] Step S103: Classify all historical consultation records into two categories based on the presence or absence of invalid consultation markers; randomly extract one consultation record from each category and compare the similarity between the two sets of keywords in the two consultation records. If the similarity is greater than the similarity threshold, extract the difference keywords between the two sets of keywords; when the similarity between two consultation records is high, but one has an invalid consultation marker and the other does not, then the consultation record without the marker contains influencing factors that affect the consultation result. Because of the additional content related to the influencing factors, the final generated result changes and is adopted by the user.

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

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

[0016] Step S201: Obtain all consultation records without invalid consultation markers from the same type of consultation records, and extract the consultation results for each consultation record; calculate the result similarity between two consultation results by comparing the text content corresponding to any two consultation results. The comparison of result similarity between two consultation results can be performed using techniques such as text content comparison, data mining technology, and specialized software in the relevant field; sum all result similarities to obtain the total result similarity value Sum. k Among them, Sum k Let m be the total similarity value of the results for the k-th type of consultation records, and m be the number of similarity values ​​calculated for the k-th type of consultation records. k The expected similarity of the k-th type of consultation records is calculated as follows: By comparing the consultation results adopted by users in similar consultation records with the expected results, we can accurately determine whether the consultation 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 appears as a differential keyword in all consultation records with invalid consultation markers, denoted as x. Set the number of occurrences for the z-th type of impact factor as x. z The key proportion of the z-th type of impact factor is Where X represents the number of consultation records marked as invalid consultations; the influence factors are sorted from largest to smallest according to their key percentage, and the priority order of their influence is set; the higher the key percentage of an influence factor, the greater its influence, which is beneficial for reminding users to prioritize supplementary content when adjusting the model later, and maximizing the likelihood of users adopting the feedback results;

[0018] Step S203: Add various influencing factors to the large language model. Input consultation records with invalid consultation markers into the large language model. According to the priority of the influence of various influencing factors, add the corresponding content of one influencing factor. After processing by the large language model, a new consultation result is obtained. Randomly extract the consultation result of consultation records without invalid consultation markers and obtain the similarity D' between the two consultation results. If D' <D k Then continue adding the corresponding content for the next impact factor until D'≥D. k until;

[0019] Step S204: Set the number of influence factors added to the large language model when processing the k-th type of consultation record using the large language model as y. k From all consultation records with invalid consultation markers in the k-th type of consultation records, select a × X consultation records as the training set, and use the remaining (1-a) × X consultation records as the test set, where a is a constant coefficient. If the similarity of some consultation results in the training set is less than the expected similarity, add new influence factors to the large language model until the similarity of consultation results of all consultation records in the training set is greater than the expected similarity. Test the large language model using the test set. If the similarity of some consultation results is less than the expected similarity, extract some consultation records from the test set and add them to the training set to retrain the large language model.

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

[0021] Step S301: Acquire the text content input by the user in real time, extract keywords from the text content, and generate a keyword set W'; compare the keyword set W' with the keyword set corresponding to each historical consultation record, calculate the similarity between the two sets of keyword sets, select the historical consultation record with the highest similarity, and extract the consultation type corresponding to the historical consultation record as the consultation type of the user's current text content;

[0022] Step S302: Obtain the influence factor added to the large language model for the consultation type. If there is no influence factor 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 influence factor corresponding to the user's input text, actively remind the user to supplement the content, which helps 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, after a time interval of θ, the user inputs new text content into the large language model, then extract the keywords from the new text content to obtain a new keyword set W'. new ; for the keyword set W' and the new keyword set W' new A similarity comparison is performed to obtain the similarity between the two keyword sets. Set a similarity threshold δ, if Then, mark the text content corresponding to the keyword set W' as invalid consultation;

[0025] Step S402: Select the historical consultation record with the highest similarity to the keyword set W', compare the text content 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, then put the text content corresponding to the keyword set W' into the test set of the large language model and retrain the large language model; if the result similarity is greater than the set expected result similarity, then obtain a new keyword set W'. new In the big language model, keywords that are different from the keywords in the keyword set W' and are not influencing factors are added as new influencing factors. The big language model is then retrained in conjunction with the new text content.

[0026] To better implement the above methods, a health needs 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 of the user's historical consultation records, extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time of two adjacent consultation records and the similarity between the keyword sets, it is determined whether to mark the previous consultation record as invalid; based on the similarity between any two sets of keyword sets in all of the user's historical consultation records, the consultation records are classified into types, and the influence factors of similar consultation records are identified.

[0028] The model training module is used to obtain consultation results without invalid consultation markers from similar consultation records. By analyzing the similarity between any two consultation results, the expected similarity of similar consultation records is calculated. The module also analyzes the proportion of various influencing factors in similar consultation records to determine the priority of each influencing factor. Influencing factors are added to the large language model according to the priority of influence, and the large language model is then trained.

[0029] The real-time data feedback module is used to extract the keyword set corresponding to the text content entered by the user in real time, confirm the consultation type of the text content; obtain the influencing factor corresponding to the consultation type, 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 inputs new text content within the time response threshold, a new set of keywords for the new text content is extracted. By comparing the similarity between two adjacent sets of keywords, it is determined whether the consultation result corresponding to the user's real-time input text content is invalid. The reasons for invalid consultation results are analyzed, and the large language model is retrained.

[0031] Furthermore, 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 of the user's historical consultation records, extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time of two adjacent consultation records and the similarity between the keyword sets, it determines whether to mark the previous consultation record as invalid consultation; the influence factor setting unit is used to classify consultation records according to the similarity between any two sets of keyword sets in all of the user's historical consultation records, and confirm the influence factor of consultation records of the same type.

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

[0034] The similarity calculation unit is used to obtain consultation results without invalid consultation markers in similar consultation records. By analyzing the similarity between any two consultation results, the expected similarity of similar consultation records is calculated. The influence factor addition unit is used to analyze the proportion of various influence factors in similar consultation records and confirm the priority of the influence of various influence factors. Influence factors are added to the large language model according to the priority of influence, 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 set of keywords 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 influence factor corresponding to the consultation type and determine whether to provide the user with supplementary content reminders; the text content is input into the large language model to obtain the corresponding consultation results.

[0037] Furthermore, 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, the new set of keywords for the new text content is extracted. By comparing the similarity between two adjacent sets of keywords, it is determined 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 to retrain the large language model.

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

[0040] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0041] Figure 1 This is a schematic diagram illustrating the steps of a method for analyzing health needs using a large language model;

[0042] Figure 2 This is a schematic diagram of the structure of a health needs language analysis system based on a large language model. Detailed Implementation

[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0044] Please see Figures 1 to 2 This invention provides a technical solution: a method for analyzing health needs using a large language model, the analysis method comprising the following steps:

[0045] Step S100: Obtain the symptom description text of each of the user's historical consultation records, 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 by type according to the similarity between any two sets of keyword sets in all of the user's historical consultation records, and confirm the influence factors of consultation records of the same type.

[0046] Step S100 includes the following steps:

[0047] Step S101: Set the symptom description text of the user's i-th consultation record to T. i Read the symptom description text T i Generation time point t i Extracting symptom description text T i Generate symptom description text T using several keywords from the text. 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: Obtain the generation time of the (i+1)th consultation record as t. i+1 The time interval between the i-th consultation record and the (i+1)-th consultation record is Δt. i,i+1 =t i+1 -t iSet a time response threshold θ, if Δt i,i+1 If θ < , then obtain the symptom description text T from the (i+1)th consultation record. i+1 The corresponding keyword set W i+1 The number of identical keywords in two keyword sets is counted, and the similarity between the two keyword sets is calculated. Where, n i,i+1 Let n be the number of identical keywords in the i-th keyword set and the (i+1)-th keyword set, and MAX() be the function to select the maximum value. i Let n be the number of keywords in the i-th keyword set. i+1 Let S be the number of keywords in the (i+1)th keyword set; set a similarity threshold δ, if S i,i+1 If the value is greater than δ, then the i-th consultation record is marked as an invalid consultation.

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

[0050] Step S104: Obtain the similarity of the two sets of keywords corresponding to any two consultation records in all historical consultation records. Divide several consultation records with similarity greater than the similarity threshold into similar consultation records. Obtain all the different keywords in similar consultation records. Classify all the different keywords according to their type to obtain several types of influence factors.

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

[0052] Step S200 includes the following steps:

[0053] Step S201: Obtain all consultation records without invalid consultation markers from the same type of consultation records, and extract the consultation results for each consultation record; calculate the result similarity between two consultation results by comparing the text content corresponding to any two consultation results; sum all result similarities to obtain the total result similarity value Sum. k Among them, Sum kLet m be the total similarity value of the results for the k-th type of consultation records, and m be the number of similarity values ​​calculated for the k-th type of consultation records. k The expected similarity of the k-th type of consultation records is calculated as follows:

[0054] Step S202: Obtain the number of times each keyword in each type of impact factor appears as a differential keyword in all consultation records with invalid consultation markers, denoted as x. Set the number of occurrences for the z-th type of impact factor as x. z The key proportion of the z-th type of impact factor is Where X represents the number of consultation records marked as invalid consultations; sorted by key percentage from largest to smallest, the influence priority of various influencing factors is set;

[0055] Step S203: Add various influencing factors to the large language model. Input consultation records with invalid consultation markers into the large language model. According to the priority of the influence of various influencing factors, add the corresponding content of one influencing factor. After processing by the large language model, a new consultation result is obtained. Randomly extract the consultation result of consultation records without invalid consultation markers and obtain the similarity D' between the two consultation results. If D' <D k Then continue adding the corresponding content for the next impact factor until D'≥D. k until;

[0056] Step S204: Set the number of influence factors added to the large language model when processing the k-th type of consultation record using the large language model as y. k From all consultation records with invalid consultation markers in the k-th type of consultation records, select a × X consultation records as the training set, and use the remaining (1-a) × X consultation records as the test set, where a is a constant coefficient. If the similarity of some consultation results in the training set is less than the expected similarity, add new influence factors to the large language model until the similarity of consultation results of all consultation records in the training set is greater than the expected similarity. Test the large language model using the test set. If the similarity of some consultation results is less than the expected similarity, extract some consultation records from the test set and add them to the training set to retrain the large language model.

[0057] Step S300: 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; obtain the influencing factor corresponding to the consultation type, and determine whether to provide the user with supplementary content reminders; input the text content into the large language model to obtain the corresponding consultation results;

[0058] Step S300 includes the following steps:

[0059] Step S301: Acquire the text content input by the user in real time, extract keywords from the text content, and generate a keyword set W'; compare the keyword set W' with the keyword set corresponding to each historical consultation record, calculate the similarity between the two sets of keyword sets, select the historical consultation record with the highest similarity, and extract the consultation type corresponding to the historical consultation record as the consultation type of the user's current text content;

[0060] Step S302: Obtain the influence factor added to the large language model for the consultation type. If there is no influence factor 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.

[0061] Step S400: Set a time response threshold. If the user inputs new text content within the time response threshold, extract the new keyword set of the new text content. By comparing the similarity between two adjacent keyword sets, determine whether the consultation result corresponding to the user's real-time input text content is an invalid consultation. Analyze the reasons why the consultation result is an invalid consultation and retrain the large language model.

[0062] Step S400 includes the following steps:

[0063] Step S401: Set a time response threshold θ. If, after a time interval of θ, the user inputs new text content into the large language model, then extract the keywords from the new text content to obtain a new keyword set W'. new ; for the keyword set W' and the new keyword set W' new A similarity comparison is performed to obtain the similarity between the two keyword sets. Set a similarity threshold δ, if Then, mark the text content corresponding to the keyword set W' as invalid consultation;

[0064] Step S402: Select the historical consultation record with the highest similarity to the keyword set W', compare the text content 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, then put the text content corresponding to the keyword set W' into the test set of the large language model and retrain the large language model; if the result similarity is greater than the set expected result similarity, then obtain a new keyword set W'. new In the big language model, keywords that are different from the keywords in the keyword set W' and are not influencing factors are added as new influencing factors. The big language model is then retrained in conjunction 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 of the user's historical consultation records, extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time of two adjacent consultation records and the similarity between the keyword sets, it is determined whether to mark the previous consultation record as invalid; based on the similarity between any two sets of keyword sets in all of the user's historical consultation records, the consultation records are classified into types, and the influence factors of similar consultation records are identified.

[0067] The model training module is used to obtain consultation results without invalid consultation markers from similar consultation records. By analyzing the similarity between any two consultation results, the expected similarity of similar consultation records is calculated. The module also analyzes the proportion of various influencing factors in similar consultation records to determine the priority of each influencing factor. Influencing factors are added to the large language model according to the priority of influence, and the large language model is then trained.

[0068] The real-time data feedback module is used to extract the keyword set corresponding to the text content entered by the user in real time, confirm the consultation type of the text content; obtain the influencing factor corresponding to the consultation type, 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 inputs new text content within the time response threshold, a new set of keywords for the new text content is extracted. By comparing the similarity between two adjacent sets of keywords, it is determined whether the consultation result corresponding to the user's real-time input text content is invalid. The reasons for invalid consultation results are analyzed, and the large language model is retrained.

[0070] 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 of the user's historical consultation records, extract keywords from the symptom description text to obtain a keyword set; by comparing the time interval between the generation time of two adjacent consultation records and the similarity between the keyword sets, it determines whether to mark the previous consultation record as invalid consultation; the influence factor setting unit is used to classify consultation records according to the similarity between any two sets of keyword sets in all of the user's historical consultation records, and confirm the influence factor of consultation records of the same type.

[0072] The model training module includes a similarity calculation unit and an influence factor addition unit.

[0073] The similarity calculation unit is used to obtain consultation results without invalid consultation markers in similar consultation records. By analyzing the similarity between any two consultation results, the expected similarity of similar consultation records is calculated. The influence factor addition unit is used to analyze the proportion of various influence factors in similar consultation records and confirm the priority of the influence of various influence factors. Influence factors are added to the large language model according to the priority of influence, and the large language model is trained.

[0074] 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 set of keywords 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 influence factor corresponding to the consultation type and determine whether to provide the user with supplementary content reminders; the text content is input into the large language model to obtain the corresponding consultation results.

[0076] 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, the new set of keywords for the new text content is extracted. By comparing the similarity between two adjacent sets of keywords, it is determined 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 to retrain the large language model.

[0078] The system retrieves the symptom description text from the user's first consultation record, generated at time 1. Several keywords are extracted from the symptom description text, resulting in a keyword set of "headache" and "lethargy." The second consultation record, generated at time 2, yields the keywords "headache," "lethargy," and "lasting 3 days." With an interval of 1 between the two consultation records, a time response threshold θ = 3 is set. Since 1 < 3, the similarity of the two sets of keywords is compared. The number of identical keywords is 2, and the maximum number of keywords in the keyword set is 3. Therefore, the similarity between the two keyword sets is 66.7%. A similarity threshold δ = 60% is set. Since 66.7% > 60%, the first consultation record is marked as invalid.

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

[0080] The system acquires user-input text in real time, extracts keywords from the text, such as "headache" and "lasting for 2 days," and compares these keywords with the second historical consultation record to determine the consultation type of the user's current text. The influence factor is the duration, and since this type of description exists in the extracted keywords, no further content supplementation is needed. The data is then input into a large language model for processing to obtain the consultation result, and health needs feedback is provided to the user.

[0081] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0082] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for language-based analysis of health needs based on a large language model, characterized in that: The analytical method includes the following steps: Step S100: Obtain the symptom description text of each of the user's historical consultation records, 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 by type according to the similarity between any two sets of keyword sets in all of the user's historical consultation records, and confirm the influence factors of consultation records of the same type. Step S200: Obtain consultation results without invalid consultation markers in similar consultation records; calculate the expected result similarity of similar consultation records by analyzing the result similarity between any two consultation results; analyze the proportion of various influencing factors in similar consultation records to confirm the priority order of influence of various influencing factors; add influencing factors to the large language model according to the priority order of influence, and train the large language model. Step S300: Extract the set of keywords corresponding to the text content input by the user in real time, and confirm the consultation type of the text content; obtain the influence 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; Step S400: Set a time response threshold. If the user inputs new text content within the time response threshold, extract the new keyword set of the new text content. By comparing the similarity between two adjacent keyword sets, determine whether the consultation result corresponding to the user's real-time input text content is an invalid consultation. Analyze the reasons why the consultation result is an invalid consultation and retrain the large language model. Step S100 includes the following steps: Step S101: Set the symptom description text for the user's i-th consultation record to... Read symptom description text Generation time point Extract symptom description text Generate symptom description text using several keywords. Keyword set Where r is the symptom description text The total number of keywords in; Step S102: Obtain the generation time of the (i+1)th consultation record. The interval between the i-th consultation record and the (i+1)-th consultation record is obtained. Set a time response threshold ,like Then retrieve the symptom description text from the (i+1)th consultation record. Corresponding keyword set The number of identical keywords in two keyword sets is counted, and the similarity between the two keyword sets is calculated. Set a similarity threshold. ,like If the i-th consultation record is invalid, then mark it as an invalid consultation. Step S103: Classify all historical consultation records into two categories based on whether there are invalid consultation markers; randomly extract one consultation record from each of the two categories, compare the similarity between the two sets of keywords in the two consultation records, and if the similarity is greater than the similarity threshold, extract the difference keywords between the two sets of keywords; Step S104: Obtain the similarity of the two sets of keywords corresponding to any two consultation records in all historical consultation records. Divide several consultation records with similarity greater than the similarity threshold into similar consultation records. Obtain all the different keywords in similar consultation records. Classify all the different keywords according to their type to obtain several types of influence factors.

2. The method for analyzing health needs based on a large language model according to claim 1, characterized in that: Step S200 includes the following steps: Step S201: Obtain all consultation records without invalid consultation markers from the same type of consultation records, and extract the consultation results for each consultation record; calculate the result similarity between two consultation results by comparing the text content corresponding to any two consultation results; sum all result similarities to obtain the total result similarity value. ,in, Let be the total similarity value of the results for the k-th type of consultation records, and let be the number of similarity values ​​calculated for the k-th type of consultation records. The expected similarity of the k-th type of consultation records is calculated as follows: ; Step S202: Obtain the number of times each keyword in each type of impact factor appears as a differential keyword in all consultation records with invalid consultation markers. Let the number of the z-th type of impact factor be . The key proportion of the z-th type of impact factor is Where X represents the number of consultation records marked as invalid consultations; sorted by key percentage from largest to smallest, and the influence priority of various influencing factors is set. Step S203: Add various influencing factors to the large language model. Input consultation records with invalid consultation markers into the large language model. Add the corresponding content of one influencing factor according to the priority of the various influencing factors. After processing by the large language model, a new consultation result is obtained. Randomly extract the consultation results of consultation records without invalid consultation markers and obtain the similarity between the two consultation results. ,like Then continue adding the corresponding content for the next impact factor, until... until; Step S204: Set the number of influence factors to be added to the large language model when processing the k-th type of consultation record. From all consultation records with invalid consultation markers in the k-th type of consultation records, select a × X consultation records as the training set, and use the remaining (1-a) × X consultation records as the test set, where a is a constant coefficient. If the similarity of some consultation results in the training set is less than the expected similarity, add new influence factors to the large language model until the similarity of consultation results of all consultation records in the training set is greater than the expected similarity. Test the large language model using the test set. If the similarity of some consultation results is less than the expected similarity, extract some consultation records from the test set and add them to the training set to retrain the large language model.

3. The method for analyzing health needs based on a large language model according to claim 2, characterized in that: Step S300 includes the following steps: Step S301: Acquire the text content input by the user in real time, extract keywords from the text content, and generate a keyword set. ; set of keywords The keyword set is compared with the keyword set corresponding to each historical consultation record. The similarity between the two sets of keywords is calculated. The historical consultation record with the highest similarity is selected, and the consultation type corresponding to the historical consultation record is extracted as the consultation type of the user's current text content. Step S302: Obtain the influence factor added to the large language model for the consultation type, if the keyword set If no influencing factor is found, the user is prompted to supplement the content; the supplemented text is then input into the large language model to obtain the consultation results, and the user is provided with feedback on their health needs.

4. The method for analyzing health needs based on a large language model according to claim 3, characterized in that: Step S400 includes the following steps: Step S401: Set a time response threshold If the time elapsed is Previously, when a user inputs new text into a large language model, keywords are extracted from the new text to obtain a new keyword set. ; for keyword set With new keyword set A similarity comparison is performed to obtain the similarity between the two keyword sets. Set a similarity threshold. ,like For the keyword set The corresponding text content is marked as invalid consultation; Step S402: Select the keyword set The most similar historical consultation record is used to compare the text content corresponding to the two consultation results to obtain the result similarity between the two consultation results. If the result similarity is less than the set expected result similarity, then the keyword set is removed. The corresponding text content is placed into the test set of the large language model to retrain the model; if the similarity result is greater than the set expected similarity result, a new keyword set is obtained. In, with keyword set The keywords are all different and are not influencing factors. These keywords are added to the large language model as new influencing factors. The large language model is then retrained in conjunction with the new text content.

5. A health needs language analysis system applied to the health needs language analysis method based on a large language model as described in any one of claims 1-4, 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 of the user's historical consultation records, extract keywords from the symptom description text to obtain a keyword set, and determine whether to mark the previous consultation record as invalid by comparing the time interval between the generation time of two adjacent consultation records and the similarity between the keyword sets. Based on the similarity between any two sets of keywords in all of a user's historical consultation records, the consultation records are classified into types, and the influencing factors of similar consultation records are identified. The model training module is used to obtain consultation results that do not have invalid consultation markers in similar consultation records, and calculate the expected result similarity of similar consultation records by analyzing the result similarity between any two consultation results. Analyze the proportion of various influencing factors in similar consultation records to determine the priority of each influencing factor; add influencing factors to the large language model according to the priority of influence, and train the large language model. The real-time data feedback module is used to extract the set of keywords corresponding to the text content entered by the user in real time, and to confirm the type of inquiry in 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; The model adjustment module is used to set a time response threshold. If the user inputs new text content within the time response threshold, the module extracts a new set of keywords from the new text content. By comparing the similarity between two adjacent sets of keywords, the module determines whether the consultation result corresponding to the user's real-time input text content is invalid. The module analyzes the reasons why the consultation result is invalid and retrains the large language model.

6. The health needs verbal analysis system according to claim 5, 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 of the user's historical consultation records, extract keywords from the symptom description text to obtain a keyword set, and 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. The influence factor setting unit is used to classify consultation records by type based on the similarity between any two sets of keywords in all of a user's historical consultation records, and to confirm the influence factor of consultation records of the same type.

7. The health needs language analysis system according to claim 5, characterized in that: The model training module includes a similarity calculation unit and an influence factor addition unit; The similarity calculation unit is used to obtain consultation results that do not contain invalid consultation markers in similar consultation records, and to calculate the expected result similarity of similar consultation records by analyzing the result similarity between any two consultation results. The impact factor addition unit is used to analyze the proportion of various impact factors in similar consultation records, confirm the priority order of the impact of various impact factors, add impact factors to the large language model according to the priority order of impact, and train the large language model.

8. The health needs language analysis system according to claim 5, 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 the set of keywords corresponding to the text content input by the user in real time, and to confirm the consultation type of the text content. The result acquisition unit is used to acquire the influence factor corresponding to the consultation type and determine whether to remind the user to supplement the content. The text content is input into a large language model to obtain the corresponding consultation results.

9. The health needs language analysis system according to claim 5, 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, the new set of keywords of the new text content is extracted. By the similarity between two adjacent sets of keywords, it is determined 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 and to 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