CN117909485B - Legal consultation intelligent interaction method and system based on large language model - Google Patents

Legal consultation intelligent interaction method and system based on large language model Download PDF

Info

Publication number
CN117909485B
CN117909485B CN202410313300.9A CN202410313300A CN117909485B CN 117909485 B CN117909485 B CN 117909485B CN 202410313300 A CN202410313300 A CN 202410313300A CN 117909485 B CN117909485 B CN 117909485B
Authority
CN
China
Prior art keywords
consultation
information
user
feedback information
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410313300.9A
Other languages
Chinese (zh)
Other versions
CN117909485A (en
Inventor
胡智慧
孙莉莉
李微
叶文鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Baizhi Forever Technology Co ltd
Original Assignee
Wuhan Baizhi Forever Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Baizhi Forever Technology Co ltd filed Critical Wuhan Baizhi Forever Technology Co ltd
Priority to CN202410313300.9A priority Critical patent/CN117909485B/en
Publication of CN117909485A publication Critical patent/CN117909485A/en
Application granted granted Critical
Publication of CN117909485B publication Critical patent/CN117909485B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3325Reformulation based on results of preceding query
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Acoustics & Sound (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of data interaction, in particular to a legal consultation intelligent interaction method and system based on a large language model, wherein the method comprises the following steps: recording voiceprint information of a current user, acquiring consultation information of the user, and establishing an individual user consultation library; acquiring consultation keywords by using a large language model and providing feedback information; further acquiring third consultation information of the user, and determining consultation correlation degree between the third consultation information and the previous two-time consultation information; determining the consultation type of the current user; adjusting the third feedback information range by using the consultation correlation degree and the consultation type to obtain third feedback information; acquiring the N consultation information of the user, and repeating the steps to obtain the N feedback information; the system comprises: the system comprises an information acquisition module, an information base establishment module, an analysis module and a feedback module; the consultation method provides more accurate consultation results according to the correlation degree between the consultation information of the users, and improves the quality of the consultation of the users.

Description

Legal consultation intelligent interaction method and system based on large language model
Technical Field
The invention relates to the technical field of data interaction, in particular to a legal consultation intelligent interaction method and system based on a large language model.
Background
The Large Language Model (LLM) is a deep learning model trained based on massive text data, has important application in the aspects of natural language processing and dialogue systems, can be used for generating natural language replies and completing sentences, simulates human dialogue and communicates with users, has wide application value in the fields of customer service, virtual assistants, intelligent dialogue systems and the like, and can provide more interactive and intelligent man-machine dialogue experience.
Chinese patent publication No.: CN111753071B discloses a legal consultation interaction method and device based on artificial intelligence, comprising the following steps: acquiring legal consultation information sent by a user side; preprocessing the legal consultation information, and extracting preset normative words; searching the standard words in a language pack of the database, and judging whether the standard words exist in the language pack of the database; when the standard words exist in the language package of the database, determining legal provision and/or legal case mapped by the standard words according to a preset mapping relation; feeding back the determined legal provision and/or legal case to the user side; therefore, the legal consultation interaction method and device based on the artificial intelligence have the following problems: the legal content mapped according to the language model is too small in scope, which is easy to cause mismatching of the consultation result obtained by the user and the user demand, so that repeated consultation is performed, and the consultation process is complicated.
Disclosure of Invention
Therefore, the invention provides a legal consultation intelligent interaction method and system based on a large language model, which are used for solving the problem that the legal content range mapped according to the language model in the prior art is too small, so that the consultation result obtained by a user is not matched with the user requirement.
In order to achieve the above object, in one aspect, the present invention provides a legal consultation intelligent interaction method based on a large language model, including:
Step S1, recording voiceprint information of a current user, acquiring first consultation information and second consultation information of the user, and establishing an individual user consultation library;
s2, acquiring a first consultation keyword and a second consultation keyword of a user by using a large language model, providing first feedback information for the user according to the first consultation keyword, and providing second feedback information for the user according to the second consultation keyword;
step S3, obtaining third consultation information of a user, and determining consultation relativity of the third consultation information, the first consultation information and the second consultation information;
step S4, determining the consultation type of the current user according to the consultation correlation degree, wherein the consultation type comprises an upper consultation and a lower consultation;
s5, adjusting a third feedback information range by using the consultation correlation degree and the consultation type to obtain third feedback information;
step S6, obtaining the N-th consultation information of the user, repeating the steps S3-S5, determining the consultation correlation degree of the N-th consultation information according to the N-1-th consultation information and the N-2-th consultation information of the user, and adjusting the N-th feedback information range by using the consultation correlation degree and the consultation type of the N-th consultation information to obtain the N-th feedback information;
wherein, the consultation information is effective information sent by the user once.
Further, the consultation keywords comprise legal professionals, consultation verbs and consultation targets;
The feedback information is determined according to a preset professional word stock, a consultation paraphrasing word stock, a consultation synonymous word stock and a consultation association word stock;
the content of the feedback information can contain the whole content of the consultation keyword.
Further, the consultation relevance is determined according to the following formula:
Wherein sigma is the relativity of consultation, a is the total number of related phrases of the consultation verb, i=1, 2, & a, p i is the cosine similarity of related phrases of the consultation verb of the ith group, b is the total number of consultative verbs without related phrases, c is the number of consultative verb phrases, j=1, 2, c, Q j is cosine similarity of the group j consultation name group.
Further, in the step S4, the determining the consultation type of the current user according to the consultation relevance includes:
Judging whether the consultation correlation is greater than or equal to a preset consultation correlation;
If the consultation correlation is greater than or equal to the preset consultation correlation, the consultation type of the current user is lower consultation;
If the consultation correlation is smaller than the preset consultation correlation, the consultation type of the current user is upper consultation;
when the consultation type of the current user is upper-level consultation, if the consultation correlation is smaller than the preset consultation correlation and larger than or equal to 0, the consultation type of the current consultation user is same upper-level consultation; if the consultation correlation degree is smaller than 0, the type of the consultation of the current consultation user is reverse upper-level consultation.
Further, in the step S5, the obtaining the third feedback information includes:
Acquiring a third consultation keyword of the user by using the large language model;
Determining the third feedback information range according to the third consultation keyword;
Determining an adjustment mode of the third feedback information range according to the consultation type;
and determining the adjustment quantity of the third feedback information range according to the consultation correlation degree.
Further, the obtaining the third feedback information process further includes:
if the consultation type is lower consultation, the adjustment mode of the third feedback information range is a reduced range;
If the consultation type is upper consultation, the adjustment mode of the upper consultation is an expanded range;
If the consultation type is the same-upper consultation, the adjusted consultation type can contain first feedback information and second feedback information if the consultation type is the upper consultation; if the consultation type is reverse upper consultation, the adjusted upper consultation does not contain the first feedback information and the second feedback information.
Further, in the step S6, the process of obtaining the nth feedback information further includes:
judging whether N is larger than preset consultation times or not;
If N is greater than or equal to the preset consultation times, acquiring the consultation correlation degree of the N-1 th consultation information, and secondarily adjusting the range of the N-th feedback information to obtain the N-th feedback information;
If N is smaller than the preset consultation times, the range of the N feedback information is not subjected to secondary adjustment, and the N feedback information is directly obtained.
Further, when a new round of consultation is started for the user after the current consultation is finished, determining the consultation relevance of the first consultation information according to the information in the individual user consultation library, and determining whether the user consultation is continuous with the previous consultation or not.
In another aspect, the present invention also provides a system for a legal consultation intelligent interaction method based on a large language model, including:
the information acquisition module is used for acquiring all the consultation information and voiceprint information of the current consultation user and acquiring the consultation keywords and the effective consultation information of the user by using a large language model;
The information base establishing module is connected with the information acquisition module and is provided with a plurality of individual user consultation bases which are used for recording voiceprint information, identity information, all consultation information and all feedback information of the consultation users;
The analysis module is respectively connected with the information acquisition module and the information base establishment module and is used for determining the consulting relevance and the consulting type according to the consulting information of the user;
And the feedback module is respectively connected with the analysis module and the information base building module and is used for determining the feedback of each consultation problem according to the analysis result of the analysis module and the historical feedback information of the consultation problem.
Further, the individual user consultation library includes:
The voiceprint information identification unit is used for storing voiceprint information of a user and identifying the voiceprint information when the user consults again;
The identity determining unit is connected with the voiceprint information identifying unit and is used for determining whether the current user is a historical consultation user according to the identifying result of voiceprint information;
And the consultation storage unit is connected with the voiceprint information identification unit and is used for recording all consultation information and all feedback information of the user.
Compared with the prior art, the invention has the beneficial effects that the voice print information is used for recording the user identity, the consultation information of different users can be accurately recorded and identified, personalized service and establishment of individual user consultation libraries are facilitated, and more accurate feedback and service are provided so as to meet the personalized requirements of the users; the large language model is used for acquiring the consultation keywords of the user, so that the requirements and problems of the user can be more accurately understood, and corresponding feedback information is provided; according to the invention, through calculating the consultation correlation degree among the consultation problems, the system can better understand the consultation evolution of the user, and is helpful for providing more consistent and coherent services; the feedback information range is adjusted by the consultation correlation degree and the consultation type, and feedback information which better accords with the user expectations can be provided according to the requirements and the problems of the user; the consultation method provides more accurate consultation results according to the correlation degree between the consultation information of the users, and improves the quality of the consultation of the users.
Further, in the legal consultation intelligent interaction method based on the large language model, the system deduces the potential purpose of the current user by carrying out semantic analysis on independent keywords of the consultation problem of the user, which is helpful for better understanding the requirements and intentions of the user and providing personalized consultation services; the system uses a large pre-training model to carry out semantic analysis to judge the potential purpose of the user, and can identify abnormal consultation, thereby helping to prevent and prevent such improper behaviors; the system determines the consultation marginal degree according to the abnormal consultation times of the user, which is helpful for effectively managing the consultation behaviors, ensuring that the normal consultation is not affected, and timely identifying and processing the improper behaviors.
Further, in the legal consultation intelligent interaction method based on the large language model, the system judges the consultation edge degree of each gray user according to the information in the individual user consultation library, so that personalized decision can be made according to the behavior and the historical consultation condition of the user, the improper behavior of the user is prevented, and for gray users with the consultation edge degree exceeding the preset edge degree after two adjacent consultations, the system does not provide new consultation content any more, but feeds back the content in the individual user consultation library, thereby being beneficial to saving system resources and improving the efficiency of the system.
Drawings
FIG. 1 is a flow chart of a legal consultation intelligent interaction method based on a large language model according to an embodiment of the present invention;
FIG. 2 is a logic diagram of determining consultation types of a legal consultation intelligent interaction method based on a large language model according to an embodiment of the present invention;
FIG. 3 is a diagram; the embodiment of the invention is used for a system structure schematic diagram of a legal consultation intelligent interaction method based on a large language model;
FIG. 4 is a schematic diagram of an individual user consulting library architecture of a system for a legal consultation intelligent interaction method based on a large language model according to an embodiment of the present invention.
Detailed Description
In order that the objects and advantages of the invention will become more apparent, the invention will be further described with reference to the following examples; it should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present invention, and are not intended to limit the scope of the present invention.
It should be noted that, in the description of the present invention, terms such as "upper," "lower," "left," "right," "inner," "outer," and the like indicate directions or positional relationships based on the directions or positional relationships shown in the drawings, which are merely for convenience of description, and do not indicate or imply that the apparatus or elements must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be either fixedly connected, detachably connected, or integrally connected, for example; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those skilled in the art according to the specific circumstances.
Referring to fig. 1, a flowchart of a legal consultation intelligent interaction method based on a large language model according to an embodiment of the present invention is shown; the invention provides a legal consultation intelligent interaction method based on a large language model, which comprises the following steps:
Step S1, recording voiceprint information of a current user, acquiring first consultation information and second consultation information of the user, and establishing an individual user consultation library;
s2, acquiring a first consultation keyword and a second consultation keyword of a user by using a large language model, providing first feedback information for the user according to the first consultation keyword, and providing second feedback information for the user according to the second consultation keyword;
step S3, obtaining third consultation information of a user, and determining consultation relativity of the third consultation information, the first consultation information and the second consultation information;
step S4, determining the consultation type of the current user according to the consultation correlation degree, wherein the consultation type comprises an upper consultation and a lower consultation;
s5, adjusting a third feedback information range by using the consultation correlation degree and the consultation type to obtain third feedback information;
step S6, obtaining the N-th consultation information of the user, repeating the steps S3-S5, determining the consultation correlation degree of the N-th consultation information according to the N-1-th consultation information and the N-2-th consultation information of the user, and adjusting the N-th feedback information range by using the consultation correlation degree and the consultation type of the N-th consultation information to obtain the N-th feedback information;
wherein, the consultation information is effective information sent by the user once.
In practice, the effective information is a keyword for the content sent by the user and is a nonsensical consultation;
Nonsensical counseling is a completely consistent content counseling or a single word is replaced and the cosine similarity of two words before and after the replacement of the word is greater than 0.8.
The invention uses voiceprint information to record the user identity, can accurately record and identify the consultation information of different users, is beneficial to personalized service and establishment of individual user consultation library, and provides more accurate feedback and service to meet the personalized requirements of users; the large language model is used for acquiring the consultation keywords of the user, so that the requirements and problems of the user can be more accurately understood, and corresponding feedback information is provided; according to the invention, through calculating the consultation correlation degree among the consultation problems, the system can better understand the consultation evolution of the user, and is helpful for providing more consistent and coherent services; the feedback information range is adjusted by the consultation correlation degree and the consultation type, and feedback information which better accords with the user expectations can be provided according to the requirements and the problems of the user; the consultation method provides more accurate consultation results according to the correlation degree between the consultation information of the users, and improves the quality of the consultation of the users.
Specifically, the consultation keywords comprise legal professionals, consultation verbs and consultation targets;
The feedback information is determined according to a preset professional word stock, a consultation paraphrasing word stock, a consultation synonymous word stock and a consultation association word stock;
the content of the feedback information can contain the whole content of the consultation keyword.
In practice, the consultation association word library contains the close meaning word of the consultation verb and the association word of the consultation target, including but not limited to homonyms of the consultation verb, correct words of the wrong verb, anti-meaning words, close meaning words of the anti-meaning words, homonymy similar targets of the consultation target, similar relatives targets and the like;
And the feedback information is combined with the professional word stock according to the determined keywords, and the existing large language model is used for sorting legal information to obtain feedback information provided for the user.
Specifically, the consultation relevance is determined according to the following formula:
Wherein sigma is the relativity of consultation, a is the total number of related phrases of the consultation verb, i=1, 2, & a, p i is the cosine similarity of related phrases of the consultation verb of the ith group, b is the total number of consultative verbs without related phrases, c is the number of consultative verb phrases, j=1, 2, c, Q j is cosine similarity of the group j consultation name group.
The related word group is a word group which is related to the first consultation keyword or the second consultation keyword in the third consultation keyword, the related word group is a keyword group which can be searched in a consultation hyponym library, a consultation synonymous word library and a consultation association word library, and if the related word group does not exist, the related word group is a word which belongs to the first consultation keyword or the second consultation keyword and cannot be searched in the word library, and the related word group is a non-related word group.
In implementation, the Word vector model is a method for representing words as vectors, the Word vector model used in this embodiment is preferably a Word2Vec model, in which words are mapped into a high-dimensional vector space, the semantic similarity of words can be measured by calculating cosine similarity between vectors, the cosine similarity is a similarity index for measuring included angles between vectors, the value range is-1 to 1, and any group of related Word groups of consultative verbs (three vectors are mapped into the vector space) are calculatedAnd/>) The cosine similarity between them uses the following formula:
P is the cosine similarity, Representing vectors/>Sum vector/>Sum vector of/>Is vector/>Sum vector/>Length of sum vector,/>Is vector/>Is the inner product calculation of the representation vector;
Three vectors in cosine similarity calculation formula And/>Mapping vectors of the consultation keywords in the first consultation information, the consultation keywords in the second consultation information and the consultation keywords in the third consultation information are respectively, wherein the keywords of the third consultation information are in three word banks of one consultation information, but are not in the word banks of the other consultation information, and when the cosine similarity is calculated, the word vector of the word bank which is not in the consultation information is taken as 0 for the case of the word bank which is not in the other keyword.
If the consultation keywords in the third consultation information are not in the three word libraries in the other two consultation information, the value of the keywords is-1 when the cosine similarity is calculated, namely, the condition of no related phrase is obtained.
In implementation, two vectors in the cosine similarity calculation formula are mapping vectors of the consultation keywords in the third consultation information and the consultation keywords in the first consultation information and the second consultation information respectively, the consultation keywords used for calculation in the two groups are in a consultation hyponym library, a consultation synonymous word library and a consultation association word library, and if the consultation keywords in the consultation problem are not in three word libraries in the other consultation problem, the cosine similarity value of the keywords is-1.
It can be understood that the Word vector model used in the present invention is preferably a Word2Vec model, and may be any one of the existing Word vector models, and when different Word vector models are used, the Word vector mapping method changes along with the model changes, which is not limited herein.
Referring to fig. 2, which is a logic diagram of determining a consultation type of the legal consultation intelligent interaction method based on the big language model according to the embodiment of the present invention, in the step S4, the process of determining the consultation type of the current user according to the consultation relevance includes:
Judging whether the consultation correlation is greater than or equal to a preset consultation correlation;
If the consultation correlation is greater than or equal to the preset consultation correlation, the consultation type of the current user is lower consultation;
If the consultation correlation is smaller than the preset consultation correlation, the consultation type of the current user is upper consultation;
when the consultation type of the current user is upper-level consultation, if the consultation correlation is smaller than the preset consultation correlation and larger than or equal to 0, the consultation type of the current consultation user is same upper-level consultation; if the consultation correlation degree is smaller than 0, the type of the consultation of the current consultation user is reverse upper-level consultation.
In the implementation, the value range of the consultation correlation is [ -1,1], and the preset consultation correlation is specified to be 0.6;
It can be understood that the closer the consultation relativity value is to 1, the closer the content of the consultation information is, and the lower consultation can be judged; on the contrary, the content of the consultation information is smaller and more similar and is more similar to-1, the consultation content is judged to be opposite and is more similar to 0, and the consultation content is less relevant; the irrelevant and opposite counseling contents have poor relevance with the feedback information provided previously, so that the upper counseling is judged, the lower counseling is more and more accurate, and the upper counseling is more and more extensive.
In the step S5, the obtaining the third feedback information includes:
Acquiring a third consultation keyword of the user by using the large language model;
Determining the third feedback information range according to the third consultation keyword;
Determining an adjustment mode of the third feedback information range according to the consultation type;
and determining the adjustment quantity of the third feedback information range according to the consultation correlation degree.
Specifically, the obtaining the third feedback information further includes:
if the consultation type is lower consultation, the adjustment mode of the third feedback information range is a reduced range;
If the consultation type is upper consultation, the adjustment mode of the upper consultation is an expanded range;
If the consultation type is the same-upper consultation, the adjusted consultation type can contain first feedback information and second feedback information if the consultation type is the upper consultation; if the consultation type is reverse upper consultation, the adjusted upper consultation does not contain the first feedback information and the second feedback information.
In practice, the information range adjustment amount is determined according to the following equation:
Δs= (1- |σ|) ×s0, where Δs is the information range adjustment amount, σ is the consultation correlation degree, and S0 is the current feedback information range.
In the invention, the system can also determine the consulting edge degree of the current user, and the process comprises the following steps:
Obtaining independent keywords of each consultation information of the current user;
semantic analysis is carried out on each independent keyword, and the potential purpose of the current user is deduced;
judging whether the current user is a normal consultation or not according to the potential purpose of the current user;
The consultation marginal degree is determined according to the abnormal consultation times of the user.
In implementation, the independent keywords are keywords with cosine similarity value of-1.
The semantic analysis of the keywords can be performed by using a large language model, and the existing large language model can obtain the potential purpose of consulting users according to the semantic analysis;
the content of abnormal consultation is the potential purpose of trying to prevent social stability, hurt the interests of others, harm the safety of others and the like to cause negative effects; the content of the normal consultation is the consultation content corresponding to the potential purpose without negative influence, and the normal consultation comprises meaningful consultation and nonsensical consultation;
determining whether the consulting edge degree of the user exceeds a preset edge degree, wherein the preset edge degree is defined as 3;
If the consultation edge degree of the user exceeds the preset edge times, judging the user as a gray user, wherein the final feedback of the third consultation problem is the final feedback of the second consultation problem;
if the degree of the consulting edge of the user does not exceed the preset edge frequency, judging the user as a gray user, and determining the final feedback of the third consulting problem according to the degree of the consulting edge and the preliminary feedback of the third consulting problem.
In the legal consultation intelligent interaction method based on the large language model, the system deduces the potential purpose of the current user by carrying out semantic analysis on independent keywords of the consultation problem of the user, which is helpful for better understanding the requirements and intentions of the user and providing personalized consultation service; the system uses a large pre-training model to carry out semantic analysis to judge the potential purpose of the user, and can identify abnormal consultation, thereby helping to prevent and prevent such improper behaviors; the system determines the consultation marginal degree according to the abnormal consultation times of the user, which is helpful for effectively managing the consultation behaviors, ensuring that the normal consultation is not affected, and timely identifying and processing the improper behaviors.
Specifically, in the step S6, the process of obtaining the nth feedback information further includes:
judging whether N is larger than preset consultation times or not;
If N is greater than or equal to the preset consultation times, acquiring the consultation correlation degree of the N-1 th consultation information, and secondarily adjusting the range of the N-th feedback information to obtain the N-th feedback information;
If N is smaller than the preset consultation times, the range of the N feedback information is not subjected to secondary adjustment, and the N feedback information is directly obtained.
In the implementation, the preset number of consultations is 6, that is, when the sixth feedback information is determined, the range of the sixth feedback information is secondarily adjusted according to the consultation correlation of the fifth consultation information, the adjustment amount is 0.1 times of the consultation correlation of the fifth consultation information, and the adjustment mode is determined according to the consultation type.
Specifically, when a new round of consultation is started for the user after the current consultation is finished, determining the consultation relevance of the first consultation information according to the information in the individual user consultation library, and determining whether the content of the current consultation of the user is the content continuing the previous consultation.
And for the gray user after the current consultation is finished, when the gray user starts a new consultation, determining the consultation edge degree of the consultation information according to the information in the individual user consultation library, and determining whether the gray user can continue to consult.
In the implementation, if the consultation edge degree exceeds the preset edge degree, stopping the current consultation of the gray user;
If the consultation edge degree of the third consultation problem does not exceed the preset edge degree, judging that the current gray user can perform normal consultation on the current user;
If the consultation edge degree of the gray user after two adjacent consultations exceeds the preset edge degree, when the gray user starts new consultation again, the feedback information is only the content in the consultation library of the individual user, and no new consultation information is provided.
In the legal consultation intelligent interaction method based on the large language model, the system judges the consultation edge degree of each gray user according to the information in the individual user consultation library, so that personalized decision can be made according to the behavior and the historical consultation condition of the user, the improper behavior of the user is prevented, and the system does not provide new consultation content for gray users with the consultation edge degrees exceeding the preset edge degree after two adjacent consultations, but feeds back the content in the individual user consultation library, thereby being beneficial to saving system resources and improving the efficiency of the system.
Referring to fig. 3, a schematic system structure diagram of a legal consultation intelligent interaction method based on a large language model according to an embodiment of the present invention is shown, and the present invention further provides a processing system, which includes:
the information acquisition module is used for acquiring all the consultation information and voiceprint information of the current consultation user and acquiring the consultation keywords and the effective consultation information of the user by using a large language model;
The information base establishing module is connected with the information acquisition module and is provided with a plurality of individual user consultation bases which are used for recording voiceprint information, identity information, all consultation information and all feedback information of the consultation users;
The analysis module is respectively connected with the information acquisition module and the information base establishment module and is used for determining the consulting relevance and the consulting type according to the consulting information of the user;
And the feedback module is respectively connected with the analysis module and the information base building module and is used for determining the feedback of each consultation problem according to the analysis result of the analysis module and the historical feedback information of the consultation problem.
Referring to fig. 4, a schematic diagram of an individual user consultation library structure of a system for a legal consultation intelligent interaction method based on a large language model according to an embodiment of the present invention is shown, where the individual user consultation library includes:
The voiceprint information identification unit is used for storing voiceprint information of a user and identifying the voiceprint information when the user consults again;
The identity determining unit is connected with the voiceprint information identifying unit and is used for determining whether the current user is a historical consultation user according to the identifying result of voiceprint information;
And the consultation storage unit is connected with the voiceprint information identification unit and is used for recording all consultation information and all feedback information of the user.
It will be appreciated that the voiceprint information of each person is unique, and voiceprints refer to characteristics of sound of an individual, including characteristics of tone, speech speed, sound quality, etc., and since the vocal cords of each person are different in structure and sounding manner, the voiceprint information is also different, so that the voiceprint recognition technology can be used for identity verification and identification of the individual.
In implementation, the voiceprint information identifying unit only records voiceprint information of the user, and is used for identifying the user when the same user consults next time, the identifying unit does not include other information of the user, is only used for identifying that the user has been consulted in the past, and invokes an individual user consultation library of the corresponding user.
Thus far, the technical solution of the present invention has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will be within the scope of the present invention.
The foregoing description is only of the preferred embodiments of the invention and is not intended to limit the invention; various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A legal consultation intelligent interaction method based on a large language model is characterized by comprising the following steps:
Step S1, recording voiceprint information of a current user, acquiring first consultation information and second consultation information of the user, and establishing an individual user consultation library;
s2, acquiring a first consultation keyword and a second consultation keyword of a user by using a large language model, providing first feedback information for the user according to the first consultation keyword, and providing second feedback information for the user according to the second consultation keyword;
step S3, obtaining third consultation information of a user, and determining consultation relativity of the third consultation information, the first consultation information and the second consultation information;
step S4, determining the consultation type of the current user according to the consultation correlation degree, wherein the consultation type comprises an upper consultation and a lower consultation;
s5, adjusting a third feedback information range by using the consultation correlation degree and the consultation type to obtain third feedback information;
step S6, obtaining the N-th consultation information of the user, repeating the steps S3-S5, determining the consultation correlation degree of the N-th consultation information according to the N-1-th consultation information and the N-2-th consultation information of the user, and adjusting the N-th feedback information range by using the consultation correlation degree and the consultation type of the N-th consultation information to obtain the N-th feedback information;
Wherein, the consultation information is effective information sent by the user once;
In the step S4, the determining the consultation type of the current user according to the consultation relevance includes:
Judging whether the consultation correlation is greater than or equal to a preset consultation correlation;
If the consultation correlation is greater than or equal to the preset consultation correlation, the consultation type of the current user is lower consultation;
If the consultation correlation is smaller than the preset consultation correlation, the consultation type of the current user is upper consultation;
when the consultation type of the current user is upper-level consultation, if the consultation correlation is smaller than the preset consultation correlation and larger than or equal to 0, the consultation type of the current consultation user is same upper-level consultation; if the consultation correlation degree is smaller than 0, the type of the consultation of the current consultation user is reverse upper-level consultation;
In the step S5, the obtaining the third feedback information includes:
Acquiring a third consultation keyword of the user by using the large language model;
Determining the third feedback information range according to the third consultation keyword;
Determining an adjustment mode of the third feedback information range according to the consultation type;
Determining the adjustment amount of the third feedback information range according to the consultation correlation degree;
The process of obtaining the third feedback information further comprises:
if the consultation type is lower consultation, the adjustment mode of the third feedback information range is a reduced range;
If the consultation type is upper consultation, the adjustment mode of the upper consultation is an expanded range;
If the consultation type is the same-upper consultation, the adjusted consultation type can contain first feedback information and second feedback information if the consultation type is the upper consultation; if the consultation type is reverse upper consultation, the adjusted upper consultation does not contain the first feedback information and the second feedback information;
the information range adjustment amount is determined according to the following formula:
Δs= (1- |σ|) ×s0, where Δs is the information range adjustment amount, σ is the consultation correlation degree, and S0 is the current feedback information range.
2. The large language model based legal consultation intelligent interaction method according to claim 1, wherein the consultation keywords include legal professional, consultation verb and consultation target;
The feedback information is determined according to a preset professional word stock, a consultation paraphrasing word stock, a consultation synonymous word stock and a consultation association word stock;
the content of the feedback information can contain the whole content of the consultation keyword.
3. The large language model based legal intelligent interaction method of claim 2, wherein the consultation relevance is determined according to the following formula:
Wherein sigma is the relativity of consultation, a is the total number of related phrases of the consultation verb, i=1, 2, & a, p i is the cosine similarity of related phrases of the consultation verb of the ith group, b is the total number of consultative verbs without related phrases, c is the number of consultative verb phrases, j=1, 2, c, Q j is cosine similarity of the group j consultation name group;
The related phrase is a phrase related to the first consultation keyword or the second consultation keyword in the third consultation keyword, the related phrase is a keyword phrase which can be searched in a consultation hyponym library, a consultation synonymous word library and a consultation association word library, and the non-related phrase is a word which cannot be searched in the word library if the first consultation keyword or the second consultation keyword does not exist in the third consultation keyword.
4. The intelligent interaction method for legal consultation based on large language model according to claim 3, characterized in that in step S6, the process of obtaining the nth feedback information further includes:
judging whether N is larger than preset consultation times or not;
If N is greater than or equal to the preset consultation times, acquiring the consultation correlation degree of the N-1 th consultation information, and secondarily adjusting the range of the N-th feedback information to obtain the N-th feedback information;
If N is smaller than the preset consultation times, the range of the N feedback information is not subjected to secondary adjustment, and the N feedback information is directly obtained.
5. The intelligent interaction method of legal consultation based on large language model according to claim 4, characterized in that when a new round of consultation is started for the user after the current consultation is finished, determining the consultation relativity of the first consultation information according to the information in the individual user consultation library, and determining whether the user consultation is continuous with the previous consultation.
6. A system for applying the large language model-based legal consultation intelligent interaction method of any of claims 1-5, comprising:
the information acquisition module is used for acquiring all the consultation information and voiceprint information of the current consultation user and acquiring the consultation keywords and the effective consultation information of the user by using a large language model;
The information base establishing module is connected with the information acquisition module and is provided with a plurality of individual user consultation bases which are used for recording voiceprint information, identity information, all consultation information and all feedback information of the consultation users;
The analysis module is respectively connected with the information acquisition module and the information base establishment module and is used for determining the consulting relevance and the consulting type according to the consulting information of the user;
And the feedback module is respectively connected with the analysis module and the information base building module and is used for determining the feedback of each consultation problem according to the analysis result of the analysis module and the historical feedback information of the consultation problem.
7. The system of claim 6, wherein the individual user consultation library comprises:
The voiceprint information identification unit is used for storing voiceprint information of a user and identifying the voiceprint information when the user consults again;
The identity determining unit is connected with the voiceprint information identifying unit and is used for determining whether the current user is a historical consultation user according to the identifying result of voiceprint information;
And the consultation storage unit is connected with the voiceprint information identification unit and is used for recording all consultation information and all feedback information of the user.
CN202410313300.9A 2024-03-19 2024-03-19 Legal consultation intelligent interaction method and system based on large language model Active CN117909485B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410313300.9A CN117909485B (en) 2024-03-19 2024-03-19 Legal consultation intelligent interaction method and system based on large language model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410313300.9A CN117909485B (en) 2024-03-19 2024-03-19 Legal consultation intelligent interaction method and system based on large language model

Publications (2)

Publication Number Publication Date
CN117909485A CN117909485A (en) 2024-04-19
CN117909485B true CN117909485B (en) 2024-05-24

Family

ID=90696324

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410313300.9A Active CN117909485B (en) 2024-03-19 2024-03-19 Legal consultation intelligent interaction method and system based on large language model

Country Status (1)

Country Link
CN (1) CN117909485B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1343104A1 (en) * 2002-03-08 2003-09-10 Ricoh Company, Ltd. Consulting contract settling system and method, recording medium, and computer data signal
KR101894700B1 (en) * 2018-08-08 2018-09-04 최석 Search System Using Speech Recognition for Customer Contact Center
CN109388692A (en) * 2018-09-06 2019-02-26 北京京东尚科信息技术有限公司 Interactive information processing method, server and terminal
KR20190022030A (en) * 2017-08-25 2019-03-06 리걸테크 주식회사 Apparatus and Method for Providing Legal Advice Service
CN110008327A (en) * 2019-04-01 2019-07-12 河北省讯飞人工智能研究院 Law answers generation method and device
CN110765257A (en) * 2019-12-30 2020-02-07 杭州识度科技有限公司 Intelligent consulting system of law of knowledge map driving type
CN111831801A (en) * 2020-05-27 2020-10-27 北京市农林科学院 Man-machine conversation method and system
CN113127600A (en) * 2021-03-23 2021-07-16 北京法集科技发展有限公司 Information retrieval method and device, electronic equipment and storage medium
CN113886554A (en) * 2021-12-03 2022-01-04 北京大学 Legal consultation question-answering method and device
KR20220042838A (en) * 2020-09-28 2022-04-05 한국에이아이소프트 주식회사 Systems and Methods to Provide AI Answering Service for Legal Questions
WO2022105122A1 (en) * 2020-11-17 2022-05-27 平安科技(深圳)有限公司 Answer generation method and apparatus based on artificial intelligence, and computer device and medium
CN114579722A (en) * 2022-03-01 2022-06-03 浙江安联检测技术服务有限公司 Feedback method and system of information technology
CN114999676A (en) * 2022-06-29 2022-09-02 支付宝(杭州)信息技术有限公司 Method, system, apparatus and medium for automatically replying to medical consultation
CN115238055A (en) * 2022-07-22 2022-10-25 广州网律互联网科技有限公司 Intelligent interaction method, system and equipment based on legal consultation
CN115840808A (en) * 2022-12-27 2023-03-24 广州汉申科技中介服务有限公司 Scientific and technological project consultation method, device, server and computer-readable storage medium
KR20230116143A (en) * 2022-01-27 2023-08-04 주식회사 부뜰정보시스템 Counseling Type Classification System
CN116542817A (en) * 2023-07-06 2023-08-04 北京烽火万家科技有限公司 Intelligent digital lawyer consultation method and system
WO2023229376A1 (en) * 2022-05-24 2023-11-30 베스핀글로벌 주식회사 Intelligent response recommendation system and method for real-time voice counseling support
CN117332065A (en) * 2023-10-24 2024-01-02 上海青木易立网络科技有限公司 Consultation method, system and terminal based on association word association of large language model

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1343104A1 (en) * 2002-03-08 2003-09-10 Ricoh Company, Ltd. Consulting contract settling system and method, recording medium, and computer data signal
KR20190022030A (en) * 2017-08-25 2019-03-06 리걸테크 주식회사 Apparatus and Method for Providing Legal Advice Service
KR101894700B1 (en) * 2018-08-08 2018-09-04 최석 Search System Using Speech Recognition for Customer Contact Center
CN109388692A (en) * 2018-09-06 2019-02-26 北京京东尚科信息技术有限公司 Interactive information processing method, server and terminal
CN110008327A (en) * 2019-04-01 2019-07-12 河北省讯飞人工智能研究院 Law answers generation method and device
CN110765257A (en) * 2019-12-30 2020-02-07 杭州识度科技有限公司 Intelligent consulting system of law of knowledge map driving type
CN111831801A (en) * 2020-05-27 2020-10-27 北京市农林科学院 Man-machine conversation method and system
KR20220042838A (en) * 2020-09-28 2022-04-05 한국에이아이소프트 주식회사 Systems and Methods to Provide AI Answering Service for Legal Questions
WO2022105122A1 (en) * 2020-11-17 2022-05-27 平安科技(深圳)有限公司 Answer generation method and apparatus based on artificial intelligence, and computer device and medium
CN113127600A (en) * 2021-03-23 2021-07-16 北京法集科技发展有限公司 Information retrieval method and device, electronic equipment and storage medium
CN113886554A (en) * 2021-12-03 2022-01-04 北京大学 Legal consultation question-answering method and device
KR20230116143A (en) * 2022-01-27 2023-08-04 주식회사 부뜰정보시스템 Counseling Type Classification System
CN114579722A (en) * 2022-03-01 2022-06-03 浙江安联检测技术服务有限公司 Feedback method and system of information technology
WO2023229376A1 (en) * 2022-05-24 2023-11-30 베스핀글로벌 주식회사 Intelligent response recommendation system and method for real-time voice counseling support
CN114999676A (en) * 2022-06-29 2022-09-02 支付宝(杭州)信息技术有限公司 Method, system, apparatus and medium for automatically replying to medical consultation
CN115238055A (en) * 2022-07-22 2022-10-25 广州网律互联网科技有限公司 Intelligent interaction method, system and equipment based on legal consultation
CN115840808A (en) * 2022-12-27 2023-03-24 广州汉申科技中介服务有限公司 Scientific and technological project consultation method, device, server and computer-readable storage medium
CN116542817A (en) * 2023-07-06 2023-08-04 北京烽火万家科技有限公司 Intelligent digital lawyer consultation method and system
CN117332065A (en) * 2023-10-24 2024-01-02 上海青木易立网络科技有限公司 Consultation method, system and terminal based on association word association of large language model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于网络回复的律师评价方法;杨开平;李明奇;覃思义;;计算机科学;20180915(第09期);全文 *

Also Published As

Publication number Publication date
CN117909485A (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN108304372B (en) Entity extraction method and device, computer equipment and storage medium
CN111368049B (en) Information acquisition method, information acquisition device, electronic equipment and computer readable storage medium
WO2022095380A1 (en) Ai-based virtual interaction model generation method and apparatus, computer device and storage medium
CN111916111B (en) Intelligent voice outbound method and device with emotion, server and storage medium
CN111694940B (en) User report generation method and terminal equipment
CN113688221B (en) Model-based conversation recommendation method, device, computer equipment and storage medium
CN110717021B (en) Input text acquisition and related device in artificial intelligence interview
CN108763535A (en) Information acquisition method and device
CN115116428B (en) Prosodic boundary labeling method, device, equipment, medium and program product
CN113919366A (en) Semantic matching method and device for power transformer knowledge question answering
CN114007131A (en) Video monitoring method and device and related equipment
CN109065020A (en) The identification storehouse matching method and system of multilingual classification
CN114756663A (en) Intelligent question answering method, system, equipment and computer readable storage medium
CN113342958A (en) Question-answer matching method, text matching model training method and related equipment
CN115497465A (en) Voice interaction method and device, electronic equipment and storage medium
CN117010907A (en) Multi-mode customer service method and system based on voice and image recognition
CN115203372A (en) Text intention classification method and device, computer equipment and storage medium
CN114491023A (en) Text processing method and device, electronic equipment and storage medium
CN117909485B (en) Legal consultation intelligent interaction method and system based on large language model
CN111694936A (en) Method and device for identifying AI intelligent interview, computer equipment and storage medium
Singh et al. Deep neural based name entity recognizer and classifier for English language
CN113673237A (en) Model training method, intent recognition method, device, electronic equipment and storage medium
CN114925159A (en) User emotion analysis model training method and device, electronic equipment and storage medium
Cao et al. An English pronunciation error detection system based on improved random forest
CN112183114A (en) Model training and semantic integrity recognition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant