Legal assistance system and method
1. A legal assistance system, comprising:
the acquisition module is used for acquiring legal consultation information of the user;
the extraction module is used for extracting the consultation intention and the scene information according to the legal consultation information;
the judging module is used for judging whether the consultation intention is matched with the scene information according to the preset corresponding relation: if the consultation intention is not matched with the scene information, sending an instruction for supplementing legal consultation information to the acquisition module; if the consultation intention is matched with the scene information, sending an instruction for positioning the candidate scene according to the scene information to a positioning module;
the positioning module is used for positioning in the database according to the scene information to obtain a candidate scene, wherein the candidate scene comprises a plurality of legal question and answer pairs;
and the pushing module is used for searching legal question-answer pairs in the candidate scene according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and pushing the legal question-answer pairs matched with the consultation intention to the user, wherein the candidate scene at least comprises one legal question-answer pair matched with the consultation intention.
2. The legal assistance system of claim 1, wherein the pushing module searches among legal question-answer pairs in the candidate scene according to the consulting intent to obtain a legal question-answer pair matching the consulting intent, and specifically comprises: calculating semantic relevance between the consultation intention and the legal question-answer pairs of the candidate scenes one by one; and extracting at least one legal question-answer pair of which the semantic correlation degree with the consultation intention is greater than or equal to a preset threshold value.
3. The legal assistance system of claim 2, wherein the pushing module pushes legal answer pairs matching the consulting intent to the user, specifically comprising: sequencing the legal question-answer pairs matched with the consultation intention according to the semantic relevance to obtain a legal question-answer pair sequence; and pushing the sequence to the user according to the legal question and answer.
4. The legal assistance system of claim 3, wherein the judging module is further configured to judge whether the consulting intention lacks the first key element and whether the scene information lacks the second key element, and if the consulting intention lacks the first key element or the scene information lacks the second key element, send an instruction to supplement the legal consulting information to the obtaining module.
5. The legal assistance system of claim 4, wherein the extraction module is further configured to remove redundant information from the legal advisory information, the redundant information including at least one of an exclamation word, a quiesce word, and a special symbol.
6. The legal assistance system of claim 5, wherein the obtaining module is further configured to convert the daily expression in the legal advisory information into a legal professional expression according to a preset conversion relationship.
7. A method of legal assistance, comprising:
s1, acquiring legal consultation information of the user;
s2, extracting consultation intention and scene information according to the legal consultation information;
s3, judging whether the consultation intention is matched with the scene information according to the preset corresponding relation: if the consultation intention does not match the scene information, returning to S1; if the consultation intention matches the scene information, S4 is performed;
s4, positioning in a database according to scene information to obtain a candidate scene, wherein the candidate scene comprises a plurality of legal question and answer pairs;
s5, searching legal question-answer pairs in candidate scenes according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and pushing the legal question-answer pairs matched with the consultation intention to the user, wherein the candidate scenes at least comprise one legal question-answer pair matched with the consultation intention.
8. The legal assistance method of claim 7, wherein in S5, the query intent is searched for in the legal question-answer pairs of the candidate scenes to obtain the legal question-answer pairs matching the query intent, which specifically comprises: calculating semantic relevance between the consultation intention and the legal question-answer pairs of the candidate scenes one by one; and extracting at least one legal question-answer pair of which the semantic correlation degree with the consultation intention is greater than or equal to a preset threshold value.
9. A legal assistance method as claimed in claim 8, wherein in S5, pushing the legal answer pairs matching the consulting intent to the user specifically comprises: sequencing the legal question-answer pairs matched with the consultation intention according to the semantic relevance to obtain a legal question-answer pair sequence; and pushing the sequence to the user according to the legal question and answer.
10. The legal assistance method of claim 9, wherein in S3, it is determined whether the first key element is lacking in the consultation purpose and the second key element is lacking in the scene information, and if the first key element is lacking in the consultation purpose or the second key element is lacking in the scene information, the process returns to S1.
Background
Legal assistance refers to a legal support system for providing legal services for people with economic difficulties or special cases for a gratuitous reason of law assistance organized by a legal assistance institution established by the government or a legal assistance instituted by a legal law not established by the government. In daily life, people can encounter legal problems more or less, and when the people encounter the legal problems, the people can inquire the legal problems on the Internet or other platforms to obtain solutions.
No matter the internet or other legal intelligent service platforms are mostly based on the following ideas: preparing a plurality of legal question-answer pairs in advance, wherein each legal question-answer pair comprises a legal question and at least one solving means for solving the corresponding legal question; when the legal questions of the user are received, legal question-answer pairs relevant to the legal questions submitted by the user are searched in the legal question-answer pairs, and the searched legal question-answer pairs are pushed to the user, so that the user can check the legal questions in the legal question-answer pairs and corresponding solving means, and the legal questions of the user are solved.
In consideration of the practical situation that the coverage of legal assistance is not enough due to the relative shortage of legal assistance personnel, and the effective legal assistance service is difficult to obtain for a user who needs the legal assistance, a similar idea can be used for the legal assistance system, and the legal assistance service can be intelligently provided for the user through a computer. However, users who need legal assistance services are often vulnerable groups of economic difficulties, and most of the users do not have basic legal knowledge, and may have significant deviation and omission when explaining legal problems, so that when a computer prepares legal question-answer pairs, the phenomena of deviation and omission inevitably occur, and thus there is no legal question-answer pair related to the legal problems of the users, or the prepared legal question-answer pairs cannot solve the legal problems of the users, and thus, the legal assistance services cannot be accurately provided for the users.
Disclosure of Invention
The invention provides a legal assistance system and a legal assistance method, which solve the technical problem that the prior art can not accurately provide legal assistance service for a user.
The basic scheme provided by the invention is as follows: a legal assistance system comprising:
the acquisition module is used for acquiring legal consultation information of the user;
the extraction module is used for extracting the consultation intention and the scene information according to the legal consultation information;
the judging module is used for judging whether the consultation intention is matched with the scene information according to the preset corresponding relation: if the consultation intention is not matched with the scene information, sending an instruction for supplementing legal consultation information to the acquisition module; if the consultation intention is matched with the scene information, sending an instruction for positioning the candidate scene according to the scene information to a positioning module;
the positioning module is used for positioning in the database according to the scene information to obtain a candidate scene, wherein the candidate scene comprises a plurality of legal question and answer pairs;
and the pushing module is used for searching legal question-answer pairs in the candidate scene according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and pushing the legal question-answer pairs matched with the consultation intention to the user, wherein the candidate scene at least comprises one legal question-answer pair matched with the consultation intention.
The working principle and the advantages of the invention are as follows: before pushing legal question-answer pairs, whether the consultation intention is matched with the scene information needs to be judged: if the consultation intention is matched with the scene information, positioning a candidate scene according to the scene information, searching legal question-answer pairs matched with the consultation intention in the legal question-answer pairs of the candidate scene, and pushing the legal question-answer pairs matched with the consultation intention to the user; otherwise, if the consultation intention and the scene information are not matched, the legal consultation information is supplemented. By the method, the consultation intention and the scene information can be matched, even if the user has serious deviation and omission when explaining the legal problems, the user can be prompted to supplement the legal consultation information in time, the candidate scene obtained by positioning is also matched with the consultation intention, and therefore the legal question and answer pair matched with the consultation intention in the candidate scene can be guaranteed to accurately solve the legal problems of the user and meet the legal requirements of the user.
According to the method and the system, when the user explains that the legal problems have serious deviation and omission, the supplementary legal consultation information can be timely prompted, the legal question-answer matched with the consultation intention in the candidate scene can be ensured to accurately meet the legal requirements of the user, and the technical problem that the prior art cannot accurately provide legal assistance service for the user is solved.
Further, the pushing module searches in the legal question-answer pairs of the candidate scenes according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and the method specifically comprises the following steps: calculating semantic relevance between the consultation intention and the legal question-answer pairs of the candidate scenes one by one; and extracting at least one legal question-answer pair of which the semantic correlation degree with the consultation intention is greater than or equal to a preset threshold value.
Has the advantages that: the semantic relevance can accurately reflect the relevance between the consultation intention and the legal question-answer pair of the candidate scene, so that the legal question-answer pair matched with the consultation intention can be quickly and effectively found out.
Further, the pushing module pushes the legal question-answer pairs matched with the consultation intention to the user, and specifically comprises: sequencing the legal question-answer pairs matched with the consultation intention according to the semantic relevance to obtain a legal question-answer pair sequence; and pushing the sequence to the user according to the legal question and answer.
Has the advantages that: the semantic relevance can accurately reflect the relevance between the consultation intention and the legal question-answer pair of the candidate scene, so that the relevance is large before and small after, and the user can conveniently adopt the relevance.
Further, the judging module is also used for judging whether the consultation intention is lack of the first key element and whether the scene information is lack of the second key element, and if the consultation intention is lack of the first key element or the scene information is lack of the second key element, sending an instruction for supplementing the legal consultation information to the obtaining module.
Has the advantages that: if the consultation intention lacks the first key element, such as specific appeal; or a second key element that scene information is deficient, such as a dispute type; the matched legal question-answer pair cannot be accurately determined, and the finally obtained legal question-answer pair can be ensured to accurately meet the consultation intention in such a mode.
Further, the extraction module is further used for eliminating redundant information in the legal consultation information, wherein the redundant information comprises at least one of exclamation words, pause words and special symbols.
Has the advantages that: redundant information without actual meaning in legal consultation information is removed, the extraction result of consultation intention and scene information is not influenced, and the efficiency of the extraction process can be improved.
Further, the obtaining module is also used for converting the daily expression in the legal consultation information into the legal professional expression according to the preset conversion relation.
Has the advantages that: the daily expression has the characteristics of spoken language and inaccuracy, on the contrary, the legal professional expression is more rigorous and accurate than the daily expression, and by means of the method, the accuracy of extracting the consultation intention and the scene information according to the legal consultation information can be improved.
Based on the above legal assistance system, the present invention further provides a legal assistance method, comprising:
s1, acquiring legal consultation information of the user;
s2, extracting consultation intention and scene information according to the legal consultation information;
s3, judging whether the consultation intention is matched with the scene information according to the preset corresponding relation: if the consultation intention does not match the scene information, returning to S1; if the consultation intention matches the scene information, S4 is performed;
s4, positioning in a database according to scene information to obtain a candidate scene, wherein the candidate scene comprises a plurality of legal question and answer pairs;
s5, searching legal question-answer pairs in candidate scenes according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and pushing the legal question-answer pairs matched with the consultation intention to the user, wherein the candidate scenes at least comprise one legal question-answer pair matched with the consultation intention.
The working principle and the advantages of the invention are as follows: only when the consultation intention is matched with the scene information, the candidate scene is positioned according to the scene information, the legal question-answer pair matched with the consultation intention is searched in the legal question-answer pair of the candidate scene, and the legal question-answer pair matched with the consultation intention is pushed to the user; otherwise, the legal consultation information is supplemented. Even if the user has serious deviation and omission when explaining legal problems, the user can be prompted to supplement legal consultation information in time, and the consultation intention and the scene information can be matched.
Further, in S5, searching for a legal question-answer pair in a candidate scene according to the consultation intention, to obtain a legal question-answer pair matching the consultation intention, specifically including: calculating semantic relevance between the consultation intention and the legal question-answer pairs of the candidate scenes one by one; and extracting at least one legal question-answer pair of which the semantic correlation degree with the consultation intention is greater than or equal to a preset threshold value.
Has the advantages that: legal question and answer pairs matched with the consultation intention can be quickly and effectively found out through semantic relevance.
Further, in S5, pushing the legal answer pairs matching the consulting intention to the user specifically includes: sequencing the legal question-answer pairs matched with the consultation intention according to the semantic relevance to obtain a legal question-answer pair sequence; and pushing the sequence to the user according to the legal question and answer.
Has the advantages that: and sequencing according to the semantic relevance, so that the relevance is large before and small after, and the user can conveniently adopt the method.
Further, in S3, it is determined whether the consultation intention lacks the first key element and the scene information lacks the second key element, and if the consultation intention lacks the first key element or the scene information lacks the second key element, the process returns to S1.
Has the advantages that: if the consultation intention lacks the first key element or the scene information lacks the second key element, the matched legal question-answer pair cannot be accurately determined, and the finally obtained legal question-answer pair can be ensured to accurately meet the consultation intention.
Drawings
FIG. 1 is a block diagram of a system of an embodiment of a legal assistance system of the present invention.
Detailed Description
The following is further detailed by the specific embodiments:
example 1
An embodiment is substantially as shown in figure 1, comprising:
the acquisition module is used for acquiring legal consultation information of the user;
the extraction module is used for extracting the consultation intention and the scene information according to the legal consultation information;
the judging module is used for judging whether the consultation intention is matched with the scene information according to the preset corresponding relation: if the consultation intention is not matched with the scene information, sending an instruction for supplementing legal consultation information to the acquisition module; if the consultation intention is matched with the scene information, sending an instruction for positioning the candidate scene according to the scene information to a positioning module;
the positioning module is used for positioning in the database according to the scene information to obtain a candidate scene, wherein the candidate scene comprises a plurality of legal question and answer pairs;
and the pushing module is used for searching legal question-answer pairs in the candidate scene according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and pushing the legal question-answer pairs matched with the consultation intention to the user, wherein the candidate scene at least comprises one legal question-answer pair matched with the consultation intention.
In this embodiment, the acquisition module, the extraction module, the judgment module, the positioning module, and the push module are all integrated on a server, and the functions thereof are realized by software/code/program/computer instructions.
The specific implementation process is as follows:
firstly, the acquisition module acquires legal consultation information of a user. For example, the legal consultation information of the user is provided in the form of voice or text, that is, the legal consultation information of the user is obtained, for example, the legal consultation information of the user's voice or text is that "i husband does not care for business for a long time outside, i.e., i's own mood is seriously injured and, in order to depart from him, i should not reimburse me for mental loss fee".
Then, the extraction module extracts the consultation intention and the scene information according to the legal consultation information. In this embodiment, the legal advisory information actually includes two dimensions of content of advisory intent and scene information, the advisory intent is embodied as a specific legal requirement, and the scene information is embodied as a background situation of occurrence of things. For example, the legal counseling information is that "i'm husband is out of business for a long time, i'm's own soul is seriously injured and wants to be away from him, i.e. he should not be compensated for mental loss fee", and in this legal counseling information, the "compensated mental loss fee" is a legal appeal, i.e. a counseling intention; "i's husband is out of business for a long time, i's own soul has received serious injury" is the background condition that the thing happens, also is the scene information.
Then, the judging module judges whether the consultation intention is matched with the scene information according to the preset corresponding relation: if the consultation intention is not matched with the scene information, sending an instruction for supplementing legal consultation information to the acquisition module; and if the consultation intention is matched with the scene information, sending an instruction for positioning the candidate scene according to the scene information to the positioning module. Specifically, the preset correspondence is embodied as a logical relationship at a legal level, which is determined by law, for example, for mental compensation, the logical relationship only occurs in infringement disputes and does not occur in default disputes. Therefore, the consulting intention of "compensating for mental loss fee" does not have a logical relationship at a legal level with the scene information that "i husband does not care for the right business for a long time outside, i.e., the mental loss fee is not suitable for compensating for in divorce usually. At this time, the user is required to supplement legal consultation information, for example, that "i husband plays me after often drinking wine, and doctor is identified as light injury", that "assault others belongs to the scope of infringement dispute, and that the compensation of the mental loss fee is applicable, so that the consultation intention of the" compensation of the mental loss fee "and the scene information of" i husband plays me after often drinking wine, and doctor is identified as light injury "have a logical relationship at the legal level.
And then, the positioning module positions in the database according to the scene information to obtain a candidate scene, wherein the candidate scene comprises a plurality of legal question and answer pairs. For example, each candidate scene in the database corresponds to a civil case, which can be specifically referred to as "national case law", and according to scene information of "i husband play me after often drinking and doctor is identified as light injury", the location can be performed in the database to obtain a candidate scene numbered 13 for the liability dispute of damage after divorce. The following legal question-answer pairs are included in this candidate scenario numbered 13: A. if the situation of remuneration exists, the divorce damage compensation can be requested if the situation exists; B. whether a spouse is living with others or not, if so, a divorce damage compensation can be requested; C. whether or not there is a case of implementing family violence, if so, a divorce damage compensation and/or a mental loss compensation can be requested; D. if there is a situation that a family member is abused, a divorce damage compensation can be requested.
And finally, the pushing module searches legal question-answer pairs in the candidate scene according to the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, and pushes the legal question-answer pairs matched with the consultation intention to the user, wherein the candidate scene at least comprises one legal question-answer pair matched with the consultation intention.
In this embodiment, the specific steps are as follows:
the first step, calculating semantic relevance between the consultation intention and the legal question-answer pair A, B, C, D of the candidate scene one by one, for example, A is 0, B is 25%, C is 90% and D is 82%; and extracting at least one legal question-answer pair with the semantic correlation degree of more than or equal to 80% with the consultation intention to obtain the legal question-answer pairs matched with the consultation intention, namely C and D.
Secondly, sequencing the legal question-answer pairs matched with the consultation intention according to the semantic relevance to obtain a legal question-answer pair sequence, namely, C is before and D is after; and pushing the sequence to the user according to the legal question and answer pairs of which the C is in front and the D is behind.
Example 2
The difference from the embodiment 1 is that the determining module further determines whether the consultation intention lacks the first key element, for example, a specific appeal; judging whether the scene information is lack of a second key element, such as a dispute type; and if the consultation intention lacks the first key element or the scene information lacks the second key element, the matched legal question-answer pair cannot be accurately determined, and an instruction for supplementing the legal consultation information is sent to the acquisition module. The extraction module also eliminates redundant information in the legal consultation information, wherein the redundant information comprises at least one of exclamation words, pause words and special symbols; the obtaining module converts the daily expression in the legal consultation information into the legal professional expression according to the preset conversion relationship, for example, converts the daily expression of 'two mouthparts' into the legal professional expression of 'couple'.
The foregoing is merely an example of the present invention, and common general knowledge in the field of known specific structures and characteristics is not described herein in any greater extent than that known in the art at the filing date or prior to the priority date of the application, so that those skilled in the art can now appreciate that all of the above-described techniques in this field and have the ability to apply routine experimentation before this date can be combined with one or more of the present teachings to complete and implement the present invention, and that certain typical known structures or known methods do not pose any impediments to the implementation of the present invention by those skilled in the art. It should be noted that, for those skilled in the art, without departing from the structure of the present invention, several changes and modifications can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicability of the patent. The scope of the claims of the present application shall be determined by the contents of the claims, and the description of the embodiments and the like in the specification shall be used to explain the contents of the claims.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:知识点测评方法和装置