Legal consultation method and device, terminal and readable storage medium

By semantic understanding of various forms of user descriptions and searching for relevant knowledge points from legal data sets, the problem that legal consulting methods in the existing technology is difficult to provide services quickly and accurately, and efficient in any legal application scenarios is achieved Legal resources and services are provided.

CN119046413APending Publication Date: 2024-11-29FAQUANQUAN NETWORK TECH (SHENZHEN) CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410860288.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-11-29

AI Technical Summary

Technical Problem

Existing legal consulting methods are difficult to provide legal resources and services quickly, accurately and continuously in any legal application scenario. Especially when there is a context or intention to jump to the user's question, existing interaction methods cannot be accurately identified and given. Accurate response.

Method used

By accurately semantic understanding of the user's complex contexts in various forms such as text description, voice description, images, videos, etc., we can determine the user's legal issues, intentions and key information, search for relevant knowledge points from the preset legal data set, and Supplement based on historical information, generate reply results, and use legal data sets to include original legal data, legal Q&A data, legal knowledge graph data and user labeling data.

Benefits of technology

It realizes the rapid, accurate and coherent provision of legal resources and services in any legal application scenario, adapts to different user needs, and improves the efficiency and accuracy of legal consultation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046413A_ABST
    Figure CN119046413A_ABST
Patent Text Reader

Abstract

The invention provides a legal consultation method and device, a terminal and a readable storage medium, and the method comprises the steps: responding to a legal consultation request which is sent by a user terminal and carries at least one description, and determining the legal problem, intention and key information related to each description; searching knowledge points associated with legal questions, intentions and key information related to the description from a preset legal data set, and generating a reply result for each description according to the knowledge points; wherein if the legal problem involved in the current description is not the legal problem input for the first time, the knowledge points are supplemented according to the related information of the historical description; the legal data set comprises at least two pieces of data: original legal data, legal question and answer data, legal knowledge graph data, open source general data and user annotation data. According to the method, corresponding legal resources and corresponding services are quickly, accurately and coherently provided for the user by determining the legal problem, intention and key information of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent interactive technology, and specifically relates to a legal consulting method, device, terminal and readable storage medium. Background Art

[0002] In recent years, the number of legal cases has continued to rise, and people's legal awareness and demand for legal services have also continued to increase. In daily life and work, people often encounter various legal problems. When people's legitimate rights and interests are damaged or sued, they usually need to find relevant legal information or consult professional lawyers to seek effective "help." However, in reality, there are still some challenges in legal consultation. Most people do not have a legal knowledge base, and conventional online search and consultation methods are time-consuming and labor-intensive, and it is difficult to obtain legal information that is fully adapted to the legal problems faced by users. For chatbots specifically used to provide legal advice, in actual application scenarios, users' questions often jump in context or intent, and existing interactive methods cannot accurately identify this and give users accurate and coherent responses.

[0003] Based on this, there is a need to provide a legal consulting method that can overcome the above-mentioned defects of the prior art, so as to meet the needs of users in any legal application scenario and provide users with corresponding legal resources and corresponding services quickly, accurately and coherently. Summary of the invention

[0004] In view of this, the present application proposes a legal consulting method, device, terminal and readable storage medium to meet the needs of users in any legal application scenario to quickly, accurately and coherently provide users with corresponding legal resources and corresponding services.

[0005] In a first aspect, the present application provides a legal consulting method, the method comprising at least the following steps:

[0006] In response to a legal consultation request sent by a user terminal and carrying at least one description, determine the legal issues, intentions and key information involved in each of the descriptions; wherein the description includes one or more combinations of text description, voice description, image and video;

[0007] Search for knowledge points associated with the legal issues, intentions and key information involved in the description from a preset legal data set, and generate a response result for each description based on the knowledge points; wherein, if the legal issue involved in the current description is not a legal issue input for the first time, supplement the knowledge points based on relevant information of historical descriptions; the legal data set includes at least two data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user-annotated data.

[0008] In a second aspect, the present application provides a legal consulting device, the device comprising:

[0009] An information acquisition module, configured to respond to a legal consultation request sent by a user terminal and carrying at least one description, and determine the legal issues, intentions and key information involved in each description; wherein the description includes one or more combinations of text description, voice description, image and video;

[0010] A response module is used to search for knowledge points associated with the legal issues, intentions and key information involved in the description from a preset legal data set, and generate a response result for each description based on the knowledge points; wherein, if the legal issue involved in the current description is not a legal issue input for the first time, the knowledge point is supplemented based on the relevant information of the historical description; the legal data set includes at least two of the following data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user-annotated data.

[0011] In the third aspect, the present application provides a terminal, which includes a touch screen, a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the terminal implements the legal consultation method as described above.

[0012] In a fourth aspect, the present application provides a server, comprising a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the server implements the legal consulting method as described above.

[0013] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the legal consulting method as described above.

[0014] In the legal consulting solution provided in the embodiment of the present application, accurate semantic understanding is performed on various complex contexts of one or more combinations of text descriptions, voice descriptions, images, and videos provided by the user to determine the user's legal issues, intentions, and key information, and then knowledge points associated with the legal issues, intentions, and key information involved in the description are searched from a preset legal data set, and a response result for each description is generated based on the knowledge points; wherein, if the legal issue involved in the current description is not a legal issue input for the first time, the knowledge points are supplemented based on relevant information of historical descriptions, thereby satisfying the user's need to quickly, accurately, and coherently provide the user with corresponding legal resources and corresponding services in any legal application scenario.

[0015] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0017] Figure 1 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0018] Figure 2 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0019] Figure 3 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0020] Figure 4 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0021] Figure 5 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0022] Figure 6 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0023] Figure 7 It is a flowchart of a legal consulting method provided by an embodiment of the present application;

[0024] Figure 8 is a structural diagram of a legal consulting device provided in one embodiment of the present application;

[0025] Fig. 9 is a structural diagram of a legal consulting device provided in one embodiment of the present application;

[0026] Fig.10 A schematic diagram of the hardware structure of a legal consulting device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] Where there are descriptions involving “first”, “second”, etc. in the specification and claims of this application and the above-mentioned drawings, the descriptions of “first”, “second”, etc. are only used for descriptive purposes to distinguish different objects, rather than for describing a specific order, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features.

[0029] The terms "including" and "having" and any variations thereof as used herein are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units or modules is not limited to the listed steps or units or modules, but may optionally include steps or units or modules not listed, or may optionally include other steps or units or modules inherent to these processes, methods, products or devices.

[0030] For "and / or" or "and / or" appearing in the text, its meaning includes three parallel solutions. Taking "A and / or B" as an example, it includes Solution A, or Solution B, or a solution in which both A and B are satisfied.

[0031] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0032] By applying the technical solution provided in the embodiments of the present application, it is possible to overcome the problems in the prior art where conventional network search and consultation methods are time-consuming and labor-intensive and are difficult to obtain legal information that is fully adapted to the legal issues faced by users. In actual application scenarios, users' questions often have context or intention jumps, and existing interactive methods cannot accurately identify this and provide users with accurate and coherent responses. Accurate semantic understanding is performed on the various complex contexts of one or more combinations of text descriptions, voice descriptions, images, and videos provided by users, and the user's legal issues, intentions, and key information are determined. Then, knowledge points associated with the legal issues, intentions, and key information involved in the description are searched from a preset legal data set, and a response result for each description is generated based on the knowledge points. If the legal issue involved in the current description is not a legal issue input for the first time, the knowledge points are supplemented based on the relevant information of the historical description, so that the user can be provided with corresponding legal resources and corresponding services quickly, accurately, and coherently in any legal application scenario.

[0033] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.

[0034] See also Figure 1 , Figure 1 It is a flowchart of a legal consulting method provided in one embodiment of the present application.

[0035] S100: In response to a legal consultation request carrying at least one description sent by a user terminal, determine the legal issues, intentions, and key information involved in each of the descriptions.

[0036] The description includes one or more combinations of text description, voice description, image, and video.

[0037] S200, searching a preset legal data set for knowledge points associated with the legal issues, intentions and key information involved in the description, and generating a response result for each description based on the knowledge points.

[0038] If the legal issue involved in the current description is not the first legal issue input, the knowledge point is supplemented according to the relevant information of the historical description. The legal data set includes at least two data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user annotation data.

[0039] In this embodiment, the description described in step S100 refers to a statement or question about any case (or event) involving legal issues. This description may be presented in the form of text, voice, image or video, and the user consults legal affairs or seeks legal help in the application terminal of the legal big model through these descriptions. Among them, the text description can be a written statement or question of the user on a specific legal issue or event, which lists the facts, background, questions and needs involved in detail. The user may mention various legal issues such as contract disputes, family conflicts, work disputes, etc. in the text description. The legal big model analyzes the specific situation encountered by the user through the text description in order to provide accurate legal advice and solutions. The voice description is a statement or question about a legal issue or event expressed by the user in oral form. The user may state the course of the event involved, the difficulties faced, the reasons for seeking legal support, etc. in the voice description. The legal big model understands the user's needs and intentions by analyzing the recording or voice information, and provides the user with professional legal advice and help. Image descriptions can be events or problems expressed by users in the form of pictures or drawings. Users may use image descriptions to show damaged property, accident scenes, contract texts, etc. The Legal Big Model uses image recognition to understand the appearance and details of the event and provide users with more appropriate legal advice. Video descriptions are events or problems recorded by users in video format. Users may show disputes with others, contract performance, traffic accidents, etc. in video descriptions. Video descriptions provide a more intuitive representation of events and can more directly and comprehensively reflect the actual case. The Legal Big Model analyzes the process of the event and related details by parsing the video to provide users with the best legal assistance.

[0040] It is understandable that in this embodiment, the statements or questions raised by users regarding legal issues or cases can be presented in a variety of forms, which not only enables the legal big model to fully understand these descriptions to provide effective legal advice and support, but also facilitates the use of users who are not good at expressing themselves in words or are not convenient for expressing themselves in words. For users who are not good at expressing themselves in words, they often find it difficult to accurately describe the details of the case (or event) in words or to express what they think in their hearts. For users who are not convenient to express themselves in words, or because of environmental problems or other inconvenient factors, it is more direct, efficient, clear and complete to use voice, take pictures, or record videos. In the method of applying this embodiment, voice recognition technology, image recognition technology, or video stream processing technology is used, and the statements or questions of any case (or event) involving legal issues that the user wants to express can be extracted or completed by analyzing the images, voices, or video materials uploaded by the user.

[0041] In this embodiment, the system can more clearly identify the user's emotional tendency in the form of voice or video. Taking emotion recognition in video as an example, most existing methods currently focus on learning frame-level features, while this embodiment considers frame-level emotional intensity, and extracts frame-level features and emotional intensity by transmitting emotional information from image emotion data sets. Specifically, an end-to-end network can be used for joint emotion recognition and intensity learning with unsupervised adversarial adaptation. The network consists of a classification stream, an intensity learning stream, and an adversarial adaptation module. The classification stream is used to generate a pseudo-intensity map using a class activation mapping method to train the intensity learning subnet. The intensity learning stream is built on an improved feature pyramid network, in which features from different scales are cross-connected. An adversarial adaptive module is used to reduce the domain difference between the source data set and the target video frame. By adjusting the cross-domain features, the network can learn the source data while generalizing to the video frame. Finally, the weighted and pooling method is applied to the frame-level features and emotional intensity to generate video-level features, so that the user's emotions can be more delicately identified, so that the system adjusts the dialogue strategy according to the user's emotions during the human-computer interaction process to achieve emotional interaction.

[0042] It is understandable that obtaining the legal consultation request carrying at least one description sent by the user terminal may be input by the receiving user through an input component, wherein the input component includes: a keyboard, a mouse, a touch screen, a touch pad, and an audio input device, etc. It may also be sent by a receiving terminal, wherein the terminal includes a mobile phone, a computer, a tablet computer, a server, etc. The method of obtaining the above data is not limited in this embodiment.

[0043] The intention of determining each description described in step S100 refers to what problem the user wants to solve through this round of legal questions. In the field of human-computer interaction such as intelligent customer service, intelligent voice assistants and chatbots, the intention recognition technology analyzes the text input by the user to determine its potential intention and provide corresponding services or responses. The intention of determining each description described in this embodiment is to accurately determine the intention or purpose of the user during the interaction with the system by considering the sequential information and structural features of the sentences of the description / text. Specifically, CNN is used to capture local important information in the description / text, and BiLSTM is used to extract sequential features from the local information. Through the multi-head attention mechanism, the sequence features are enriched, and more attention is paid to useful sequence information. The structural features of the sentence are extracted using the BERT model. The sequential features and sentence structure features are fused in series to achieve more accurate intention recognition, thereby improving the accuracy and coherence of human-computer interaction. Among them, CNN is a deep learning model, that is, a convolutional neural network; BiLSTM is a recurrent neural network structure that can process sequential data and capture contextual information.

[0044] In this embodiment, the legal issues described in step S100 are classified in legal fields and directions, such as family and marriage matters, employment conflicts, traffic accidents, financial responsibilities, contract disputes, property objections, corporate legislation, medical disputes, resettlement issues, administrative litigation, and construction cases. Key information refers to the legal field keywords, specific events, case descriptions, etc. included in the legal issues.

[0045] Among them, take the case description as an example. The case description includes but is not limited to: the facts, that is, a detailed description of the cause, development, related events and behaviors of the case; the identity and relationship of the parties, that is, a list of the identity, relationship, background and other information of the parties involved in the case; the request for prosecution, that is, to clarify the prosecution's litigation request, that is, what kind of judgment or decision the court hopes to make; evidence information, that is, to list the evidence provided by the parties and the testimony of relevant witnesses, including written evidence and on-site evidence; legal basis, that is, to indicate the legal provisions, regulations, precedents, etc. involved, to support the prosecution's claims; the focus of the dispute, that is, to summarize the focus of the dispute between the parties in the case, that is, the core issues that need to be resolved during the court trial; process and results, that is, to describe the development process of the case in the judicial process and the results of each stage. The cases involved by users include civil cases, economic cases, criminal cases, administrative cases, intellectual property cases, labor dispute cases and divorce cases, etc., and each type of case can be subdivided into multiple types depending on the specific circumstances. For example, civil cases involve civil disputes between individuals, such as contract disputes, marriage and family disputes, property disputes, etc. Among them, contract disputes include but are not limited to contract performance, contract termination, contract breach, etc.; marriage and family disputes include but are not limited to divorce agreement disputes, child custody disputes, property division, etc.; and property disputes refer to disputes involving property rights and interests, mainly including the following situations: disputes involving contractual relationships such as sale, lease, and loan, such as contract breach, contract termination, contract performance, etc.; one party obtains improper benefits without legal basis, resulting in damage to the rights and interests of the other party, such as infringement, unfair competition, etc.; situations involving one party making a promise but failing to perform or being unable to perform, causing losses, such as breach of contract, arrears of payment, etc.; refers to disputes arising in the process of executing court judgments or rulings, including refusal to execute judgments, improper execution procedures, etc.; disputes involving inheritance or distribution of estates, such as the validity of wills, order of inheritance, etc.; issues involving transfer of real estate rights and interests, ownership of use rights, illegal construction of houses, etc.; issues involving company shareholder rights, corporate governance, equity transfer, etc.

[0046] It is understandable that each type of case has different characteristics and trial procedures. The case summary, party information, case background, course of events, evidence materials, applicable law, and investigation and trial process of each specific case under each sub-type are all different. Therefore, each type has various sub-types, and each case under each sub-type corresponds to a different case description.

[0047] In this embodiment, voice interaction is taken as an example. When the user inputs a voice, the system uses a deep learning model, such as a long short-term memory network (LSTM) or a transcription attention model (Transducer), to perform voice recognition. The construction process of the deep learning model is as follows:

[0048] Collect and prepare speech data sets for training, including speech samples and their corresponding text transcriptions; preprocess speech samples, such as segmenting them into short audio clips and extracting features; pair speech samples with corresponding text transcriptions and perform feature extraction to form a training set.

[0049] Build a deep learning model, such as a speech recognition model based on LSTM; define the structure of the model, including the input layer, LSTM layer, output layer, etc. The LSTM speech recognition model consists of multiple LSTM units, each of which receives the hidden state and input of the previous time step and generates output and the hidden state of the next time step; the hidden state update formula of LSTM is:

[0050] h t =LSTM(x t ,h t-1 );

[0051] Among them, x t is the input feature, h t is the hidden state at time step t.

[0052] Use the prepared speech dataset to train the model and optimize the model parameters; use a loss function (such as the cross entropy loss function) to measure the difference between the model output and the true label, and use an optimization algorithm (such as stochastic gradient descent) to update the model parameters; in each training iteration, the loss is calculated by forward propagation, and then the model parameters are updated by back propagation.

[0053] Use the trained model for speech recognition and input a new speech sample; the model outputs the corresponding text transcription result; pass the speech sample through the forward propagation process of the model to obtain the corresponding text transcription result.

[0054] After obtaining the text form of the speech recognition results, natural language processing technology is used to process and understand the text to extract the user's intention and conversation content; for example, named entity recognition (NER), semantic analysis, keyword extraction and other technologies are used to extract the user's questions and needs.

[0055] Collect and prepare a dataset for training, including user questions and corresponding annotation information (such as named entities, question types, etc.). Preprocess the dataset, including word segmentation, noise removal, entity and question type annotation, etc. Prepare a dataset containing user questions and their corresponding annotations to ensure the quality of the dataset and the accuracy of the annotations.

[0056] Build deep learning models, such as those based on recurrent neural networks (RNNs) or Transformers, for named entity recognition and semantic analysis; define the structure of the model, including input layers, hidden layers, output layers, etc. Design an end-to-end model that can perform named entity recognition and semantic analysis tasks simultaneously.

[0057] Named entity recognition algorithm based on conditional random field (CRF) (NER algorithm formula):

[0058]

[0059] Among them, y is the label sequence, x is the input sequence, and f j is the characteristic function, λ j is the corresponding weight, Z(x) is the normalization factor;

[0060] Transformer-based semantic analysis model (semantic analysis algorithm formula):

[0061]

[0062] Use the prepared dataset to train the model and optimize the model parameters. Specifically, use a loss function (such as the cross entropy loss function) to measure the difference between the model output and the true label, and use an optimization algorithm (such as stochastic gradient descent) to update the model parameters. In each training iteration, the loss is calculated by forward propagation, and then the model parameters are updated by back propagation.

[0063] The specific optimization process is as follows:

[0064] Randomly initialize model parameters, such as neural network weights and biases;

[0065] Use the current parameters for forward propagation to obtain the model's prediction results;

[0066] The cross entropy loss function is used to calculate the loss between the model's prediction results and the true label; the cross entropy loss function is used to measure the difference between the model output and the true label. For multi-classification tasks, the calculation formula of the cross entropy loss function is:

[0067]

[0068] Among them, y is the distribution of true labels, is the prediction result of the model, y i and are the i-th elements of the true label and the predicted result respectively;

[0069] Calculate the gradient of the loss function with respect to the model parameters;

[0070] Use the gradient descent algorithm to update the model parameters to reduce the value of the loss function; among them, stochastic gradient descent (SGD) is a commonly used optimization algorithm used to minimize the loss function, and its parameter update formula is:

[0071]

[0072] Among them, θ is the model parameter, α is the learning rate, and Loss(θ) is the gradient of the loss function with respect to the parameter;

[0073] Repeat the above steps until the stopping condition is reached (such as reaching the maximum number of iterations or the loss function converges).

[0074] Use the trained model to predict and analyze questions raised by users; extract named entities and keywords in the questions and understand the semantics of the questions; input the questions raised by users into the model, and the model outputs the named entities, keywords and semantic information in the questions.

[0075] In this embodiment, when the system needs to reply to the user with voice, or is configured to reply to the user with voice, the system can convert the generated text reply or question into voice using text-to-speech synthesis technology, and provide the result of speech synthesis to the user as a reply. Specifically, deep learning models such as WaveNet, Tacotron, etc. are used for text-to-speech synthesis.

[0076] The construction process of this deep learning model is as follows:

[0077] Prepare text data: Convert the text to be synthesized into a phoneme sequence or annotated speech text.

[0078] Data cleaning: remove special characters, punctuation marks, etc. from the text, and perform text standardization.

[0079] Model selection: Choose a suitable deep learning model, such as WaveNet or Tacotron.

[0080] Model architecture: Design the network structure and layers of the model.

[0081] Loss function: Define a suitable loss function, usually using relevant loss functions for speech synthesis tasks, such as the mean square error (MSE) loss function.

[0082] Training data: Prepare training data sets, including phoneme columns or annotated speech text and corresponding speech waveforms.

[0083] Model training: Use training data to train the model to optimize model parameters.

[0084] Input processing: Convert the text to be synthesized into an input form acceptable to the model, such as a phoneme sequence or annotated speech text.

[0085] Model prediction: Use the trained model to infer the input and generate a speech waveform.

[0086] Post-processing: Post-process the speech waveform output by the model, such as removing silence, sound enhancement, etc.

[0087] Performance tuning: Perform performance tuning on the model and optimize model parameters and hyperparameters to improve the quality and naturalness of synthesized speech.

[0088] Evaluation and Feedback: Evaluate the generated speech, collect user feedback, and further optimize the model.

[0089] Integration into applications: Integrate the trained model into real-world applications to provide text-to-speech synthesis capabilities.

[0090] Performance optimization: Optimize the performance of deployed models to improve synthesis speed and real-time performance.

[0091] Through the above embodiments, it is possible to accurately analyze the legal issues, intentions and key information from the user's input description in any legal application scenario, so as to provide users with targeted legal consultation and suggestions to help users solve problems. For example, a user sends a message asking: "I work in a company, and the company has recently downsized. I am worried that I may be laid off. I want to know how I should deal with it if I am laid off?" Based on the above description, the system will be able to determine: the legal issues that may be involved in the user's text description include labor law and employment law related issues, specifically, legal provisions related to layoff procedures, employee rights, dismissal compensation, etc.; the intention is that the user clearly expressed concern about possible layoffs and hopes to understand how to deal with it, which indicates that the user's intention is to seek to understand his rights and responsibilities in order to deal with possible layoffs; the key information is the user's current work situation, the company's planned layoffs, the user's concerns and the desire to understand the response measures; the user's emotions are anxiety and passiveness.

[0092] Based on this description, the system will further explain the relevant provisions of the Labor Law on layoff procedures and employee rights, analyze the user's current work status, and help the user evaluate whether he or she may be affected by layoffs; provide specific suggestions for dealing with layoffs, including ways to protect their own rights and interests, procedures for applying for severance pay, etc.; guide users to understand legal channels, such as labor arbitration, court prosecution, etc., to protect their rights and interests; provide legal support to users, such as by recommending appropriate lawyers to represent users in negotiations or defense, etc.

[0093] See also Figure 2 , after step S100, further comprising:

[0094] S110, matching the dialogue model according to the legal issues and intentions involved in each of the descriptions;

[0095] S120: Retrieve the query statement paradigm of the dialogue model to interact with the user terminal.

[0096] In a multi-round dialogue with a user terminal, this embodiment can update the dialogue state through dialogue state tracking according to the semantic representation of each description parsed output, and select the response action through dialogue policy learning. Specifically, the user's intention is tracked during the dialogue through the Dialogue State Tracker (DST), the state of the multi-round dialogue is maintained, and the new dialogue state is obtained based on the historical dialogue state, the current input parsed, and the background knowledge base. Through continuous communication with the user, the observation of the user state is gradually improved. Through Dialogue Policy Learning (DPL), the action taken by the system is decided according to the current dialogue state.

[0097] It should be noted that the typical method of current dialogue state tracking is to express it as a classification task with fixed predefined slot-value pairs, or to generate slot value candidates given a dialogue history. This method has limitations in gradually considering the interaction between slots and utterances and other slots (it may affect its ability to understand and process utterances when processing interactions between multiple slots). To solve this problem, the dialogue state tracking of this embodiment uses a dialogue state tracker with hierarchical time slot interactions (DST-HTSI) to capture semantic information related to slots from utterances and slots. Specifically, by applying hierarchical slot interactions to capture the interaction information between slots within and across turns, the relationship and semantic context between slots in the dialogue can be better understood, and the accuracy of dialogue processing can be improved; the time slot interaction module is used to establish time slot dependencies, which can identify and process the correlation between time slots and improve the effectiveness of dialogue processing; GRU is used as a decoder to generate corresponding values ​​for each time slot, making the dialogue processing results more accurate and reliable.

[0098] In this embodiment, different descriptions may correspond to different legal issues and intentions. Similarly, different dialogue models correspond to different dialogue strategies and inquiry statement paradigms. Therefore, this embodiment can adapt to the user's current description and guide the current dialogue by designing an inquiry statement paradigm. Specifically: by defining question templates, possible user intentions and required information are covered; based on user input or the system's natural language understanding results, the user's intentions and required information are determined; based on the user's intentions and the information provided, the corresponding question template is selected; the generated questions are presented to the user, guiding the user to provide answers or additional information; based on the user's answers, the system's status or context is updated, and subsequent dialogue interactions continue.

[0099] It is understandable that the system is able to perform language understanding and intent classification on the text of user questions, and recognize the text input by the user as intent related to the legal field through natural language processing technology. For example, the user consults the system about legal issues such as divorce, real estate disputes, and contract interpretation, seeking legal advice, interpreting legal terms, and consulting legal procedures. In the process of intent classification, the order information and structural features of the sentences in the text are considered to achieve more accurate intent recognition. By determining multiple language expressions and possible intents, it is ensured that all questions that users may ask are fully covered. For different legal issues and intent matching dialogue models, these dialogue models can take into account the user's possible questions, clarifications, hypothetical situations, and understand the user's questions and details to make the dialogue more fluent and effective.

[0100] In one possible implementation, the dialogue strategy includes at least: 1. Questioning slot strategy, which can track and complete the key slot information missing in the dialogue; specifically, based on the understanding results of NLU (Natural Language Understanding), the user is guided to complete the missing slots through cleverly designed prompts to ensure that all the information required for the task is obtained; 2. Dialogue transfer strategy, when the current system cannot completely solve the user's problem, the dialogue transfer strategy will decide whether it is necessary to transfer the dialogue to other models or manual customer service; specifically, the system can accurately evaluate its own capability boundaries and make reasonable transfer decisions to provide users with a more complete solution; 3. Dialogue termination strategy, by comprehensively analyzing information from multiple dimensions such as user intentions and task status, the dialogue termination strategy determines whether the current dialogue needs to be ended; for example, if the user does not respond for a long time, clearly expresses the intention to end, or closes the dialogue interface, it can be regarded as a trigger condition for terminating the dialogue; a reasonable termination strategy can avoid unnecessary lengthy interactions and improve user experience.

[0101] In one possible implementation, the system can adjust the dialogue strategy according to the user's personality. For example, when the application terminal is a robot-in-one machine, or the chat page is a robot projection, the pre-trained multimodal sensor model can be used to estimate and implement appropriate non-verbal behavior patterns for each specific chat situation, including the robot's voice, movements, and facial expressions, to provide appropriate and polite dialogue behaviors. Even personality assessment games can be introduced in the conversation to allow users to interact with the robot to prevent users from getting bored.

[0102] In one possible implementation, in order to maintain the consistency of the system's personality, conversation style, and context, it is necessary to retain key information in historical conversations as much as possible so that the system can generate more accurate answers. In this embodiment, in multi-round conversation tasks, when necessary, the system can improve the effect of discourse rewriting generation by using text enhancement, maximum mutual information (MMI) method, and character correction method based on Knuth-Morria-Pratt (KMP) algorithm, so that each answer in the conversation is time-related, causal, and logical.

[0103] In one possible implementation, the system can iterate and optimize based on user feedback and interaction behavior. By collecting user feedback data, the system can improve the accuracy and response quality of the dialogue model to optimize the user experience. Supervised learning and unsupervised learning methods can also be added during the iteration process to further improve the effect of the dialogue model.

[0104] See also Figure 3 , step S120 includes:

[0105] S121. Determine whether the key information is clear and complete based on the legal issues and intentions involved in each description;

[0106] S122: If not, the query sentence paradigm of the dialogue model is retrieved and fed back to the user terminal for further supplementary input until the key information is judged to be clear and complete.

[0107] See also Figure 4 , step S122 includes:

[0108] S1221. Determine the consistency and completeness of the content supplemented by the user;

[0109] S1222: If yes, continue to retrieve the next question of the query statement paradigm of the dialogue model and feed it back to the user terminal for further input until the key information is determined to be clear and complete;

[0110] S1223. If not, continue to retrieve the query statement paradigm of the dialogue model for the question to inquire about the key information or extend the query, and perform the judgment of the previous step on the reply to the query content of the user terminal.

[0111] In this embodiment, during the interaction with the user terminal, the system presents the generated questions to the user, thereby guiding the user to provide the missing information or a more detailed description.

[0112] The specific process is as follows:

[0113] 1. Define states, actions, and rewards.

[0114] Determine the state space of the system, i.e. the information or dialogue provided by the user. For example, the completeness and relevance of the information provided by the user. Define the available actions, i.e. the questioning strategies that the system can take. For example, what information to ask or adjust the order of questions. Design a reward function to give rewards based on the increment of information provided by the user and the efficiency of the dialogue. For example, give rewards based on the amount of information provided and the efficiency of the questions asked.

[0115] 2. Establish a reinforcement learning model.

[0116] Use reinforcement learning algorithms (such as Q-learning, Deep Q-Network, etc.) to build a model. In Q-learning, initialize a Q value table to record the expected return of each action in each state. In Deep a-Network, initialize a deep neural network to approximate the Q value function. Among them, Q-learning: learn the optimal strategy by updating the state-action value function; Deep Q-Network (DQN): combines deep learning and Q-learning, uses neural networks to estimate Q values, and improves the stability and performance of the algorithm.

[0117] Assuming that the system determines that it needs to further understand the user's property status based on the current dialogue state, based on the currently learned reinforcement learning model, the system can choose to ask questions such as "Please describe the distribution of your property." or "Do you have any property jointly owned with your spouse?" to maximize the efficiency of obtaining the user's property information. Based on the user's answer, the system will collect user feedback and update the reinforcement learning model to optimize subsequent questioning strategies.

[0118] According to the current state of the dialogue, an action is selected from the Q-value table or deep Q-network based on a certain strategy (such as the e-greedy strategy), that is, answering the current question, continuing to ask questions, making suggestions, etc.

[0119] Perform the selected action, such as answering the user's question or asking a follow-up question, and observe the user's feedback. Based on the user's feedback, the system can get a reward signal to adjust the Q value.

[0120] Based on the user's feedback and reward signals, the Q-value table is updated or the deep Q network is trained. In Q-learning, the Q-value table is updated using the Q-learning algorithm; in Deep Q-Network, the Q-value function is approximated by training the neural network.

[0121] Based on the updated Q-value or trained deep Q-network, actions are continuously selected, executed, rewards observed, and Q-values ​​updated until the dialogue ends or the maximum number of iterations is reached.

[0122] 3. During the conversation, choose the optimal questioning strategy based on the current state and the learned model.

[0123] 4. Update the reinforcement learning model based on the user’s answers and reward feedback to continuously optimize the questioning strategy.

[0124] 5. Perform the selected action (such as asking a question) and observe the user's response and the next state to be transferred to.

[0125] 6. Use the Bellman equation to update the state-action value function Q(s,a).

[0126] Q(s,a)=(1-a)·Q(s,a)+α·[r+γ·max a′ Q(s′,a′)];

[0127] Here, a is the learning rate, γ is the discount factor, and r is the reward.

[0128] 7. In each round of dialogue, select a questioning strategy based on the updated model, and continue to update the model based on user feedback, constantly interact with the user, select actions, observe rewards and next states, and update the Q-value function until the stopping condition is reached.

[0129] This embodiment evaluates the clarity and completeness of the description information input by the user, and uses the query statement paradigm to loop feedback and guide the user to continue to supplement the description information, so that the system can adapt to different situations and user needs, and guide the user to provide necessary information more clearly and smoothly. For example, "Our company signed a building materials supply contract with Zhang San, but Zhang San failed to deliver the goods on time, causing significant losses to our company." For such a description, first, the system confirms the clarity and completeness of key information: the information of the parties is incomplete, lacking specific identity and relationship descriptions; the time of the event is incomplete, there is no contract signing time, and there is no detailed timeline; the location of the event: unclear, detailed location is required; the course of the event is incomplete, lacking detailed contract content and unfulfilled process. Then, a query statement is generated based on the inspection results to guide the user to supplement the information. For example: "Please provide detailed identity information of the parties and their relationship with each other, such as the plaintiff and defendant's occupation, company name, etc."; "Please describe in detail the timeline of the events, such as the contract signing date, delivery date and the time of other related events"; "Please provide a more specific location of the incident, such as a detailed address or venue name"; "Please describe in detail the specific content of the contract and the detailed process of Li Si's failure to deliver the goods on time; including any relevant communication records or reasons."

[0130] The user continues to add new input:

[0131] Party information: Our company (a building materials company in Beijing), Zhang San (an independent contractor in Shanghai)

[0132] Event time: The contract was signed on January 1, 2024, and the contract required delivery before March 1, but Zhang San failed to deliver the goods on time.

[0133] Event location: The contract was signed in our office in Beijing and the delivery location was Shanghai.

[0134] What happened: On January 1, 2024, our company signed a building materials supply contract with Zhang San for a contract amount of RMB 10 million. Our company paid a RMB 5 million advance payment, but Zhang San failed to deliver the goods on time and unilaterally terminated the contract, claiming that some of our production lines had been shut down due to logistics disruptions (force majeure).

[0135] In one possible implementation, the system can guide the user to provide more specific or additional information through specific dialogue strategies during the process of automatic evaluation and loop feedback. For example:

[0136] Request for clarification: Explicitly request more detailed information from the user.

[0137] Provide options: By providing predefined options, you can guide users to select more specific information.

[0138] Auto-completion and smart prompts: When users are typing, provide smart prompts or auto-completion functions to help users enter complete information more easily.

[0139] Multi-round dialogue design: Through a series of logical follow-up questions, gradually guide users to provide the required detailed information.

[0140] Reasoning with context: Use contextual information to try to understand the user's meaning.

[0141] Use default values ​​or assumptions: When user information is incomplete, provide a reasonable default value or assumption and ask the user to confirm.

[0142] Clear information hierarchy and modular design: Layer or modularize information, and gradually guide users to provide the required information through step-by-step inquiries.

[0143] Logical fallback strategy: Provide a logical fallback strategy when the user input is not understood. Example: "Sorry, I didn't understand your question. You can rephrase or choose one of the following options: 1.xxx 2.yyy".

[0144] Detect ambiguous words: Detect and clarify ambiguous words in user input and request further clarification.

[0145] By combining the above strategies with the design of the system user interface, the system can adapt to different situations and user needs, and guide users to provide necessary information more clearly and smoothly, thereby improving the overall user experience and interaction effect.

[0146] See also Figure 5 , step S120 further includes:

[0147] S123, based on the questions and answers of the user terminal during the interaction process, combined with the relevant information of the historical description, monitoring whether the conversation content is coherent and reasonable;

[0148] S124: If not, generate corresponding feedback information or re-match the dialogue model, and send the adjusted question and answer reply to the user terminal.

[0149] In this embodiment, the system manages the context of the conversation based on the user's answer to ensure the coherence and rationality of the questions.

[0150] The specific process is as follows:

[0151] 1. Define the conversation context.

[0152] Determine the context information that needs to be maintained in the conversation, such as the historical records of previous rounds of conversations, the topics involved in the current conversation, etc. Determine the conversation context information that needs to be maintained, including historical conversation records, current conversation topics, user intentions, etc.

[0153] 2. Context-aware dialogue management.

[0154] Use context-aware dialogue management technology to maintain and update the context state of the dialogue. Specifically: initialize the context state of the dialogue before starting the dialogue; receive dialogue content input by the user, such as a case description or answer to a question provided by the user; update the context state of the dialogue based on the user input, including updating the dialogue history, extracting topic information, identifying user intent, etc. Natural language processing technology can be used to analyze user input and extract relevant information; generate system replies or questions based on the updated context state; send the generated reply to the user and wait for further response from the user; continue to interact with the user, update the context state based on the user input, and generate appropriate replies until the dialogue ends or the stop condition is reached.

[0155] 3. Reasonableness check.

[0156] According to the context information of the current conversation, check whether the questions raised are coherent and reasonable. Specifically: define a set of rules to evaluate whether the questions raised are coherent and reasonable. These rules can be based on grammar, semantics, topic coherence and other aspects; obtain the context information of the current conversation, including conversation history, current conversation topic, user intention, etc.; perform grammatical and semantic analysis on the questions raised to understand the meaning and structure of the questions; according to the defined rules, evaluate whether the questions raised meet the requirements of coherence and rationality; for example, you can check whether the questions are related to the topic of the current conversation, whether they conform to the regular grammatical structure, whether they contain obvious logical errors, etc.; according to the evaluation results of the rules, judge whether the questions raised are coherent and reasonable; if the questions raised are judged to be incoherent or unreasonable, you can generate corresponding feedback information or adjust the questioning strategy; send questions or feedback information to the user and wait for the user's response; continue to interact with the user, check whether the questions raised are coherent and reasonable based on the user's response and the context information of the conversation, if the questions are inappropriate, make corresponding corrections or adjustments until the conversation ends and the stop condition is reached.

[0157] 4. Based on the updated context information, select appropriate questions or dialogue behaviors to ask questions. Specifically: define a set of rules or strategies to select appropriate questions or dialogue behaviors based on the updated context information; obtain updated context information during the dialogue process, including dialogue history, current dialogue topic, user intent, etc.; according to the defined rules or strategies, select appropriate questions or dialogue behaviors from the predefined question set or behavior set. If the user provides information about the case type, the system can select relevant questions to further understand the case; the rules can be selected based on the topic of the dialogue, user intent, dialogue history, etc.

[0158] To further consult and understand the questions replied by the user, a recursive interactive method can be adopted to continuously ask more specific questions to the user until sufficient information is obtained. Specifically: wait for the user to reply and obtain the questions or answers provided by the user; perform semantic analysis on the questions or answers provided by the user to understand their meaning and intention; based on the interpreted user replies, evaluate whether the information currently obtained is detailed enough and whether further understanding is needed; if the evaluation results show that the information is incomplete, the system selects an appropriate questioning strategy to obtain more detailed information; the questioning strategy can be based on the context information of the current conversation, the content of the user's reply, the existing knowledge base, etc.; based on the selected questioning strategy, the system generates specific questions or dialogue content and asks it to the user; the generated questions or dialogue content is sent to the user, and further parsed, evaluated and asked according to the user's reply until sufficient information is obtained.

[0159] The generated question dialogue behavior is sent to the user and the user's response is waited for; the user is continuously interacted with and appropriate question dialogue behaviors are selected according to the updated context information to ask questions until the dialogue is ended and the stopping condition is reached.

[0160] 5. Interact with users.

[0161] Ask questions to the user and update the conversation context based on the answer. Further, manage the coherence and rationality of the conversation based on the user's answer and context information.

[0162] In this embodiment: natural language understanding is performed on the information provided by the user to identify the user's intention and key information; based on the user's intention and the identified key information, the system generates corresponding questions; the generated questions are displayed to the user, prompting the user to provide corresponding answers or supplementary information; the user provides corresponding answers or supplementary information based on the questions raised by the system; the system updates the context of the conversation based on the user's answers, and adjusts the type and order of subsequent questions based on the inquiry history and current context; if the information provided by the user is still incomplete, the system will repeat the steps of generating questions, presenting questions, and user answers until sufficient information is obtained or the user ends the communication. By dynamically adjusting the type and order of subsequent questions based on the user's previous answers and the system's inquiry history, the conversation effect can be optimized.

[0163] In one possible implementation, based on the updated dialog state, an appropriate questioning strategy and question type are selected, including:

[0164] Construct a policy network to learn the strategy of selecting the best action in a given state. The input is the state feature vector and the output is the probability distribution of each action.

[0165] Among them, the probability distribution of each action in the current state output by the policy network is:

[0166] π(a|s)=P(a|s;θ);

[0167] Among them, π(a|s) is the probability of choosing action a in state s, and θ is the parameter of the policy network.

[0168] Construct a value network to evaluate the value of each state, that is, the long-term cumulative reward that can be obtained after performing actions in this state. The value network can be a neural network, with the input as the state feature vector and the output as the value estimate of the state. Among them, a reinforcement learning algorithm, such as Deep Q-Network (DQN) or policy path gradient method, is used for training based on the MDP model. During the training process, the policy network updates the policy by maximizing the cumulative reward, and the value network updates the parameters by minimizing the mean square error of the state value function.

[0169] Among them, the value of the current state of the value network output is estimated to be:

[0170] V(s)=Q(s,π(s));

[0171] Among them, V(s) is the value estimate of state s, and Q(s,a) is the long-term cumulative reward after state s performs action a.

[0172] In the above embodiment, the dialogue state is updated by obtaining the answer or information provided by the user and based on the user's reply and the system's query history. The dialogue state is then represented as a feature vector, including the information provided by the user, the historical dialogue content, the internal state of the system, etc. These features can be extracted through natural language processing technology and represented in combination with domain knowledge. In an actual dialogue, the policy network is used to select the optimal action based on the current state, and questions are asked or answers are provided to the user. At the same time, the value of the current state is evaluated based on the value network to assist the decision-making process. The system continues to interact with the user, and based on the user's answers and feedback, the state is continuously updated, the strategy is adjusted, and the dialogue effect is optimized.

[0173] In this embodiment, the legal data set described in step S200 includes at least two data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user annotated data.

[0174] The original legal data mainly includes a large amount of legal data from legal news, legal forums, social media, and judicial documents websites. These sources ensure the diversity and comprehensiveness of real-world legal texts, covering a variety of legal issues and discussions. After careful data cleaning and partial structured processing, such as data deduplication, the legal big model uses the thinking chain method to summarize the long legal text according to the legal syllogism (the major premise is the law, the minor premise is the basic facts of the case, and the conclusion is the judgment result).

[0175] The legal question-and-answer dataset is constructed based on current laws, regulations and judicial interpretations. The data mainly comes from the actual communication between users and lawyers in real life. By carefully selecting relevant legal documents and judicial interpretations, we ensure that the dataset is faithful to the legal system structure and has a high degree of content accuracy and effectiveness.

[0176] The legal knowledge graph dataset contains the existing open source legal and knowledge graph datasets on the market, as well as the legal knowledge graph constructed using unstructured data from judicial documents websites. These knowledge graphs serve as a structured legal information framework, enhancing the model's understanding of legal concepts and the ability to apply law in practical situations. The open source general data here refers to open source legal consulting data, which usually includes various legal provisions, cases, documents and materials, which can be used for research, teaching and development of legal intelligence systems. These resources provide a wide range of legal data and documents that can be used for legal research and data analysis.

[0177] User-annotated data includes: Legal text annotation: Users may annotate specific clauses or paragraphs in legal documents to help machine learning models identify and understand legal texts; Case annotation: Users may annotate case documents, mark key information, legal basis, and trial results for classification and analysis; Legal entity annotation: Including annotation of legal subjects, case-related persons, and organizations mentioned in the text, which helps to identify and understand important entities involved in legal documents; Legal event annotation: Users may annotate legal events, legal acts, or legal procedures described in the text for event identification and association analysis; Sentiment and opinion annotation: Annotation of emotions, opinions, or attitudes in legal texts helps sentiment analysis and legal opinion mining. These user-annotated data can be used to train machine learning models, perform natural language processing, and extract information.

[0178] The legal consultation model of this embodiment, based on the legal data set training system, can better adapt to various question-and-answer scenarios in the legal field and improve the legal consultation model's ability to learn legal knowledge. A rich legal data set can effectively reduce the illusion problem of the legal consultation model, ensuring high-quality output and the practicality and credibility of the legal consultation model in the legal field.

[0179] In multiple rounds of dialogue, if the legal issue involved in the current description is not the first legal issue input, the knowledge point is supplemented according to the relevant information of the historical description in step S200. It is understandable that historical themes and historical information points in the relevant information of the historical description are preferentially extracted for supplementation to avoid using historical intentions as knowledge points for a new round of legal issues, resulting in excessive consideration of historical information. Because the intention of the current legal issue may be quite different from the historical intention, the historical intention may cause a deviation in the understanding of the intention of the current legal issue.

[0180] In one possible implementation, the response structure of the response result includes at least two of problem analysis, problem risk, and suggestions for solving the problem, laws and regulations related to the relevant problem, and case references related to the relevant problem.

[0181] In one possible implementation, generating a reply result for each of the descriptions based on the knowledge points includes: generating a reply result for each of the descriptions based on the knowledge points and combining a user emotional tendency identified from each of the descriptions.

[0182] In the process of emotion recognition, the user's emotional tendencies, such as joy, anger, sadness, etc., can be identified so that emotional interactions can be carried out in communication. The design system can flexibly adjust the tone and attitude and interact accordingly according to the changes in user emotions. For example, if the user expresses positive emotions, the system can reply with similar affirmative language, emphasizing the positive feedback to the user or thanking the user; negative emotional tendencies: when the user expresses negative emotions, the system's reply can adopt a more considerate and understanding attitude, and try to understand the core of the user's problem, provide solutions or change the topic to ease negative emotions; for user expressions with neutral emotional tendencies, the system can reply with objective information to avoid causing overly emotional responses to ensure the smooth progress of the conversation; sometimes the user's emotional tendencies may need to be flexibly adjusted according to the context and emotional changes of the user's input, and timely identify and adapt to the user's emotional needs to provide a personalized and caring interactive experience.

[0183] See also Figure 6 In one possible implementation, the legal consulting method further includes:

[0184] S300, when a lawyer intervenes in manual interaction, determining associated service demand information according to the legal issues, intentions and key information involved in each of the descriptions;

[0185] S400, matching corresponding service product information according to the service demand information and presenting it on the lawyer terminal; in response to the selection and sending request of the lawyer terminal, pushing the corresponding service product to the user terminal.

[0186] It is understandable that based on the information provided by the user, the system can answer the user's legal questions and ask further questions as needed to obtain more detailed case information. These questions can be about the type of case, case details, and legal clauses involved. The system will pass the basic case information obtained to the legal model for case analysis and providing corresponding legal opinions and suggestions. The system can provide feedback to the user whether a lawyer needs to intervene based on the actual interaction situation, or the user can actively request a lawyer to intervene.

[0187] In this embodiment, by defining information templates of different service products, including key information such as name, description, price, etc., this information can be pre-stored in the system's database or configuration file; when the lawyer and the user have an online consultation, the system needs to monitor the user's input text in real time, use NLP technology to parse the user's input text, and identify the service demand information that may be contained therein; when parsing the user's input text, use named entity recognition (NER) and keyword extraction and other technologies to extract entities and keywords related to the service product from the text; these entities and keywords may include service type, case type, time requirement, location requirement, etc.; use rule matching or machine learning-based methods to match the extracted entities and keywords with the predefined service product information templates Matching, which can be achieved by defining matching rules, using similarity algorithms or training models; based on the matching results, determine the service product information required in the user input text. If there are multiple matches, the best match can be selected based on a certain priority or other strategy; based on the determined service product information, generate corresponding service product information, including name, description, price, etc., which will be available for lawyers to choose and send to users; display the generated service product information on the interface for interaction with users, which can be presented to lawyers in the form of dialog boxes, pop-up windows or page prompts; lawyers select service products that match user needs from the displayed service product information and send them to users; after receiving the service product information, users can confirm and purchase the corresponding service products as needed.

[0188] The text parsing process is as follows:

[0189] Preprocessing: Preprocess the text input by the user, including removing special symbols, punctuation marks, stop words, etc., to reduce noise and improve the quality of the text.

[0190] Word segmentation: The preprocessed text is segmented into words or word sequences. Commonly used word segmentation algorithms include rule-based methods, statistical methods (such as n-gram models), neural network-based methods (such as BiLSTM-CRF models), etc. For example, the jieba word segmentation library is used to segment the text into ["I", "want", "consult", "a", "about", "house", "lease", "contract", "of", "law", "problem"].

[0191] Part-of-speech tagging: Tag the words after segmentation, that is, determine the part of speech of each word in the sentence. Part-of-speech tagging can help understand the grammatical structure and meaning of the sentence. Commonly used part-of-speech tagging algorithms include rule-based methods, hidden Markov models (HMMs), and conditional random fields (CRFs). For example, tag the part of speech of each word, such as ["I / n", "I want / v", "consultation / v", "a / m", "about / p", "house / n", "lease / ", "contract / n", "of / ", "law / n", "problem / n"].

[0192] Named Entity Recognition (NER): Use NER technology to identify named entities in text, such as names of people, places, and organizations. NER can be implemented through rule matching, statistical methods (such as conditional random fields), deep learning methods (such as BiLSTM-CRF models), etc. For example, identify "House Lease Contract as a legal entity.

[0193] Keyword extraction: Use keyword extraction algorithms to extract important keywords from text to identify key information of user needs. Common keyword extraction algorithms include TF-IDF algorithm, graph-based algorithms (such as TextRank algorithm), etc. For example, the extracted keywords are ["house", "lease", "contract", "law", "problem"].

[0194] Semantic analysis: Based on information such as words, parts of speech, named entities, and keywords, semantic analysis is performed to understand the meaning of the text and the user's intention. Common semantic analysis techniques include word embedding models (such as Word2Vec, GloVe), text classification models (such as Naive Bayes, support vector machines, deep learning models), etc. For example, semantic analysis is performed using pre-trained word vector models or deep learning models to understand user intentions.

[0195] Service demand identification: Comprehensively consider the results of word segmentation, part-of-speech tagging, NER, keyword extraction and semantic analysis to identify the service demand information that may be contained in the user input text. This can be achieved through rule matching, pattern recognition, machine learning and other methods.

[0196] Result output: The identified service demand information is output as structured data or directly presented to users or lawyers for further processing and application.

[0197] With the involvement of a lawyer, this embodiment, based on the above-mentioned commodity and service provision technology, automatically generates corresponding commodity and service push parameters through each user's current consultation situation, consultation history, and consultation habits, and conducts targeted interaction between lawyers and users based on the push parameters, which can improve the humanized experience of legal consultation and promote electronic transactions of value-added services in legal consultation services. At the same time, it will not cause trouble to users and has strong operability.

[0198] See also Figure 7 In one possible implementation, the legal consulting method further includes:

[0199] S500, collecting the current conversation record of the user terminal in an interactive manner, and generating target case information according to the conversation record;

[0200] S600, matching a corresponding list of recommended lawyers according to the target case information; wherein the list of recommended lawyers is obtained based on at least one of the following rankings;

[0201] The availability and winning rates of lawyers in historical cases of this type are sorted in descending order;

[0202] The winning rate of the lawyer in the historical cases of this type is used to simulate the winning probability of the lawyer in handling the target case and then sorted in descending order.

[0203] In this embodiment, the case description of the corresponding case such as the lawsuit, dispute or accident that the user wants to express can be accurately and completely determined through the current consultation record, or the case description of the corresponding case such as the lawsuit, dispute or accident that the user wants to express can be accurately and completely determined through the current consultation record, combined with the traced historical consultation record. Based on this, it can be understood that it is a complete legal model that can meet the user's understanding of basic legal knowledge and target lawyers and the need to seek help. Therefore, the case description reflected by the target case information generated by the dialogue record can accurately match the user's legal and lawyer needs, and provide the best lawyer list and judgment case list corresponding to the user's current case for the user's reference and selection. Exemplarily, the basic process operation of this application is to use the dialogue management method / chat method to obtain the user's expression of the need for law and / or lawyers, and then further analyze and extract the key information of the case described in the case, so as to match and recommend a number of judgment cases with the most similar situations to the customer, and match and recommend a number of lawyers who handle such cases best to the customer.

[0204] For example, if the case involved by the user is a divorce case and the focus of the dispute is property division, then based on the target case information, the legal knowledge and lawyer needs of the user on divorce cases and the focus of the dispute on property division will be centered, and the corresponding lawyers will be accurately matched and similar judicial cases will be found and recommended to the client. It should be understood that the above matching method is an accurate match, and the feedback received by the user should be the most professional and reliable lawyer who can help the user deal with the current case, and the lawyer with the highest probability of winning, as well as the judicial case that is most similar to the user's case in terms of case description, legal application, party behavior, judicial ruling results, etc.

[0205] In a possible implementation, the ranking criteria of the recommended lawyer list is intended to increase the probability of winning historical cases and ensure that users can find the most suitable lawyer to handle their cases. There are mainly two ranking criteria: ranking based on the availability and winning rate of lawyers in historical cases of this type; and ranking based on the winning rate of lawyers simulating handling target cases.

[0206] The lawyers’ historical cases are ranked by their presence / absence rate and success rate, which is based on the number of times the lawyers have handled similar cases (presence / absence rate, meaning whether they have handled such cases) and success rate in descending order. This method ensures that the recommended lawyers have handled similar cases in the past and have a high success rate.

[0207] Specifically, collect information on all similar cases handled by the lawyer, including the nature of the case, the result (win / lose), time, etc. Count the number of cases of the corresponding type handled by each lawyer and the total number of cases, and calculate the proportion of such cases handled by the lawyer. Count the number of times the lawyer wins in cases of this type, and calculate the winning rate. Combine the presence / absence rate and the winning rate, use weighting or other methods to make a comprehensive score, and arrange in descending order. Lawyers with high presence / absence rate and high winning rate are ranked higher.

[0208] For example, Lawyer A: has handled 20 similar cases, won 15 cases, and has a winning rate of 75%; Lawyer B: has handled 5 similar cases, won 4 cases, and has a winning rate of 80%; Lawyer C: has handled 50 similar cases, won 40 cases, and has a winning rate of 80%. By comprehensively considering the case-handling rate and the winning rate, Lawyer C may be better than Lawyers A and B because he has handled more cases and has more experience.

[0209] The ranking of lawyers’ success rates in simulating target cases is based on the lawyers’ success rates in handling similar cases in the past, simulating their success rates in the current target case. The ranking is based on the descending order of the success rates of the simulated results.

[0210] Specifically, collect information about similar cases handled by each lawyer and their success. Use statistical and machine learning techniques to build a model to predict the lawyer's success rate in handling the current target case. Include variables that may affect the outcome of the case, such as case details, court and judge information, and opponent lawyers. By running the model, estimate the success rate of each lawyer in handling the current target case. Sort in descending order by the simulated success rate.

[0211] For example, Lawyer A: historical winning rate is 75%, and the simulated winning probability is 78%; Lawyer B: historical winning rate is 80%, and the simulated winning probability is 76%; Lawyer C: historical winning rate is 80%, and the simulated winning probability is 82%; in this case, Lawyer C ranks the highest because he has the highest simulated winning probability.

[0212] Through these two methods, we can rank the recommended lawyers based on historical data and simulated probability, respectively, to ensure that users can get professional help from experienced lawyers with a high probability of winning when facing target cases. This not only effectively increases the probability of winning the case, but also optimizes the user's selection process.

[0213] The above two sorting methods use multi-dimensional data support and comprehensive scoring to further improve the accuracy and reliability of the recommendation results, which helps users find the best lawyers to handle their specific cases and increase the probability of winning.

[0214] In one possible implementation, a lawyer who can handle the case involving the user is determined by preliminarily matching the lawyer profile with the target case information; wherein the lawyer profile includes personal information, professional field and areas of expertise, the name and background introduction of the law firm or law firm to which the lawyer belongs, the lawyer's educational background and qualification certification information, as well as work experience and case experience; all adjudication cases related to the lawyer are analyzed, and based on the attributes, scores and weights of all adjudication cases, a first score of the lawyer is calculated, and based on the attributes, scores and weights of adjudication cases that are similar to the case involving the user, a second score of the lawyer is calculated; based on the first score and the second score, the probability of the lawyer winning the simulated case involving the user is determined, and the probability of winning is sorted in descending order.

[0215] In this embodiment, all lawyers who can handle the case involved by the user are preliminarily matched, and based on all the judicial cases that each lawyer has been exposed to, the first score of the lawyer is calculated, which represents the comprehensive ability of the lawyer to handle litigation cases. Furthermore, based on the judicial cases that are similar to the case involved by the user among all the judicial cases that each lawyer has been exposed to, the second score of the lawyer is calculated, which represents the special ability of the lawyer to handle similar cases to the case involved by the user. Then, based on the first score and the second score, a number of lawyers who handle such cases best are determined. Based on this, the present application can help users accurately judge the professionalism of the recommended lawyers. It can be understood that the lawyers or judicial cases referred to above all refer to the lawyers and judicial cases that can be analyzed within the scope of authority of the model / legal big model of this embodiment, not all lawyers and all judicial cases in a broad sense.

[0216] For example, suppose a user needs to find a lawyer to handle a commercial contract dispute case. Through preliminary matching, the following lawyers are listed, and the first score is calculated based on all the adjudication cases they have been involved in: Lawyer A: The first score is 8.5, indicating strong comprehensive ability; Lawyer B: The first score is 7.2, indicating average comprehensive ability; Lawyer C: The first score is 9.0, indicating excellent comprehensive ability. It should be understood that for the specific case involved by the user, Lawyer C may not be the most suitable, and Lawyer B may not be the least suitable, because the first score is a comprehensive ability evaluation calculated based on the lawyer's profile (including personal information, professional field and field of expertise, the name and background introduction of the law firm or law firm to which he belongs, the lawyer's educational background and qualification certification information, as well as work experience and case experience). Assuming that the case involved by the user is a divorce case, Lawyer C's first score is very high because he has performed very well in intellectual property cases, and his background, personal image and reputation are also very good. Although he has also handled some divorce cases, his performance in divorce cases may be just barely acceptable. Therefore, it is necessary to further evaluate the lawyer's specialized ability to handle cases similar to the user's case in order to make a two-way correction to the assessment of the lawyer's professionalism and reliability.

[0217] Next, we analyze the cases that each lawyer has been involved in, find cases that are similar to the user's case, and calculate the second score: Lawyer A: The second score is 6.5, indicating that there is room for improvement in handling similar cases; Lawyer B: The second score is 9.0, indicating that he is very good at handling similar cases; Lawyer C: The second score is 8.5, indicating that he is very good at handling similar cases. It should be understood that Lawyer B performs very well in terms of special abilities, but due to his average overall ability (or due to his performance in cases in other fields, or due to his personal background, personal image, reputation, etc.), this aspect may affect the user's litigation experience and litigation results, so Lawyer B may not be suitable.

[0218] Based on the first score and the second score, the probability of the lawyer simulating the case involving the user is determined, and the probability of winning is sorted in descending order, and the top few best lawyers are recommended to the user. It is understandable that the user can also have a clearer understanding of the comprehensive ability of each recommended lawyer and the specialized ability to handle similar cases, thereby determining the lawyer that best suits the user's own case.

[0219] In a possible implementation, the first score and the second score are calculated using the following formula:

[0220]

[0221] Among them, M is the text set involving the lawyer, N is the number of summed information, δ jk is the weight of the jth attribute in the kth file, ω jk is the score of the jth attribute in the kth file.

[0222] In a possible implementation, the probability of winning is calculated by the following formula:

[0223] score3=(α·score1+β·score2)·γ

[0224] Among them, α is the weight of the first score score1, β is the weight of the second score score2, and γ is the litigation difficulty coefficient determined based on the lawyer profile and the case description of the user.

[0225] In this possible implementation, since the first score score1 represents the lawyer's comprehensive ability to handle litigation cases, and the second score score2 represents the lawyer's special ability to handle cases similar to the user's case, and this application is centered on the legal and lawyer needs of the user's case, accurately judging the professionalism of the recommended lawyer, therefore, the weight β of the special ability is greater than the weight α of the comprehensive ability. The litigation difficulty coefficient γ is determined by considering the lawyer's historical case background (or the areas of expertise in the lawyer's profile) and the user's case, as well as whether the evidence facts of the user's case include direct evidence, indirect evidence, equivalent evidence, reverse evidence, insufficient evidence, evidence disputes, unclear application of the law, conflicts between the parties, and complex trial procedures. Based on this, this application can determine the most professional and reliable lawyer corresponding to the user's case in this way.

[0226] See also Figure 8 , Figure 8 It is a structural diagram of a legal consulting device provided in one embodiment of the present application.

[0227] The device includes: an information acquisition module 100, which is used to respond to a legal consultation request carrying at least one description sent by a user terminal, and determine the legal issues, intentions and key information involved in each description; wherein the description includes one or more combinations of text description, voice description, image, and video; an answer module 200, which is used to search for knowledge points associated with the legal issues, intentions and key information involved in the description from a preset legal data set, and generate a reply result for each description based on the knowledge points; wherein, if the legal issue involved in the current description is not a legal issue input for the first time, the knowledge point is supplemented based on the relevant information of the historical description; the legal data set includes at least two of the following data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user annotated data.

[0228] The response module 200 is specifically used to: match the dialogue model according to the legal issues and intentions involved in each of the descriptions, and call the query statement paradigm of the dialogue model to interact with the user terminal; determine whether the key information is clear and complete according to the legal issues and intentions involved in each of the descriptions, if not, call the query statement paradigm of the dialogue model and feed it back to the user terminal to continue to supplement the input until the key information is determined to be clear and complete; based on the questions and answers of the user terminal during the interaction process, combined with the relevant information of the historical description, monitor whether the dialogue content is coherent and reasonable, if not, generate corresponding feedback information or re-match the dialogue model, and send the feedback information to the user terminal; judge the consistency and completeness of the content supplemented by the user, if yes, continue to call the next question of the query statement paradigm of the dialogue model and feed it back to the user terminal to continue to supplement the input until the key information is determined to be clear and complete, if not, continue to call the query statement paradigm of the dialogue model for the question to inquire or extend the key information, and judge the reply of the user terminal to the query content in the previous step.

[0229] See also Fig. 9 , Fig. 9 It is a structural diagram of a legal consulting device provided in one embodiment of the present application.

[0230] The product service module 300 is also used to determine the associated service demand information based on the legal issues, intentions and key information involved in each of the descriptions when a lawyer intervenes in manual interaction; match the corresponding service product information based on the service demand information and present it on the lawyer terminal; and push the corresponding service product to the user terminal in response to a selection request sent by the lawyer terminal.

[0231] The lawyer recommendation module 400 is also used to collect the current conversation records of the user terminal in an interactive manner, and generate target case information based on the conversation records; according to the target case information, match the corresponding recommended lawyer list; wherein the recommended lawyer list is based on the lawyer's historical case winning rate for this type of case, and is used to simulate the lawyer's winning probability in handling the target case and then sort it in descending order.

[0232] It should be noted that, in some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation thereof can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.

[0233] See also Fig.10 , Fig.10 A schematic diagram of the hardware structure of a legal consulting device provided in one embodiment of the present application.

[0234] The device 2 includes a processor 21, a memory 24, an input device 22, and an output device 23. The processor 21, the memory 24, the input device 22, and the output device 23 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present application. It should be understood that in each embodiment of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.

[0235] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present application.

[0236] The memory 24 can be used to store computer program instructions and various computer program codes including the program code for executing the program code of the present application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or portable read-only memory (CD-ROM), which is used for related instructions and data.

[0237] The input device 22 is used to input data and / or signals, and the output device 23 is used to output data and / or signals. The output device 23 and the input device 22 may be independent devices or an integrated device.

[0238] It is understandable that in the embodiment of the present application, the memory 24 can not only be used to store related instructions, and the embodiment of the present application does not limit the specific data stored in the memory.

[0239] Understandably, Fig.10 Only a simplified design of a lawyer recommendation device is shown. In practical applications, the device may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all devices that can implement the embodiments of the present application are within the protection scope of the present application.

[0240] In the third aspect, the present application provides a terminal, which includes a touch screen, a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the terminal implements the legal consultation method as described above.

[0241] In a fourth aspect, the present application provides a server, comprising a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the server implements the legal consulting method as described above.

[0242] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the legal consulting method as described above.

[0243] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0244] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.

[0245] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0246] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0247] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0248] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0249] A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory (ROM) or a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

Claims

1. A legal consulting method, characterized in that: The method comprises at least the following steps: In response to a legal consultation request sent by a user terminal and carrying at least one description, determine the legal issues, intentions and key information involved in each of the descriptions; wherein the description includes one or more combinations of text description, voice description, image and video; Search for knowledge points associated with the legal issues, intentions and key information involved in the description from a preset legal data set, and generate a response result for each description based on the knowledge points; wherein, if the legal issue involved in the current description is not a legal issue input for the first time, supplement the knowledge points based on relevant information of historical descriptions; the legal data set includes at least two data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user-annotated data.

2. The legal consulting method according to claim 1, characterized in that: After determining the legal issues, intentions and key information involved in each of the descriptions, it also includes: matching the conversation model according to the legal issues and intentions involved in each of said descriptions; The query statement paradigm of the dialogue model is retrieved to interact with the user terminal.

3. The legal consulting method according to claim 2, characterized in that: The calling of the query statement paradigm of the dialogue model to interact with the user terminal includes: Determine whether the key information is clear and complete based on the legal issues and intent involved in each description; If not, the query sentence paradigm of the dialogue model is retrieved and fed back to the user terminal for further supplementary input until the key information is judged to be clear and complete.

4. The legal consulting method according to claim 3, characterized in that: The calling of the query statement paradigm of the dialogue model to interact with the user terminal also includes: Based on the questions and answers of the user terminal during the interaction process, combined with the relevant information of the historical description, monitor whether the conversation content is coherent and reasonable; If not, generate corresponding feedback information or re-match the dialogue model, and send the adjusted question and answer response to the user terminal.

5. The legal consulting method according to claim 3, characterized in that: The query sentence paradigm of the dialogue model is retrieved and fed back to the user terminal for further supplementary input, and further includes: The consistency and completeness of the content supplemented by the user are judged, and if yes, the next question of the query statement paradigm of the dialogue model is continuously retrieved and fed back to the user terminal for further supplementary input, until the key information is judged to be clear and complete; If not, continue to call the query sentence paradigm of the dialogue model for the question to inquire about the key information or extend the query, and judge the reply of the query content of the user terminal in the previous step.

6. The legal consulting method according to claim 1, characterized in that: After determining the legal issues, intent and key information involved in each of the described descriptions, it also includes: When a lawyer intervenes in manual interaction, determining associated service demand information based on the legal issues, intentions and key information involved in each of the descriptions; Matching corresponding service product information according to the service demand information and presenting it on the lawyer terminal; In response to the selection sending request of the lawyer terminal, the corresponding service product is pushed to the user terminal.

7. The legal consulting method according to claim 1, characterized in that: After generating a reply result for each of the descriptions according to the knowledge points, the method further includes: Collecting the current conversation record of the user terminal in an interactive manner, and generating target case information according to the conversation record; According to the target case information, a corresponding list of recommended lawyers is matched; wherein the list of recommended lawyers is obtained based on at least one of the following rankings; The availability and winning rates of lawyers in historical cases of this type are sorted in descending order; The winning rate of the lawyer in the historical cases of this type is used to simulate the winning probability of the lawyer in handling the target case and then sorted in descending order.

8. The legal consulting method according to claim 1, characterized in that: The response structure of the response result includes at least two of problem analysis, problem risk, and suggestions for solving the problem, laws and regulations related to the relevant problem, and case references related to the relevant problem.

9. A legal consulting device, characterized in that: The device comprises: An information acquisition module, configured to respond to a legal consultation request sent by a user terminal and carrying at least one description, and determine the legal issues, intentions and key information involved in each description; wherein the description includes one or more combinations of text description, voice description, image and video; A response module is used to search for knowledge points associated with the legal issues, intentions and key information involved in the description from a preset legal data set, and generate a response result for each description based on the knowledge points; wherein, if the legal issue involved in the current description is not a legal issue input for the first time, the knowledge point is supplemented based on the relevant information of the historical description; the legal data set includes at least two of the following data: original legal data, legal question and answer data, legal knowledge graph data, open source general data, and user-annotated data.

10. The legal consulting device according to claim 9, characterized in that: The response module includes at least one of the following functions: matching a dialogue model according to the legal issues and intentions involved in each of the descriptions, and calling the query statement paradigm of the dialogue model to interact with the user terminal; According to the legal issues and intentions involved in each of the descriptions, determine whether the key information is clear and complete; if not, retrieve the query statement paradigm of the dialogue model and feed it back to the user terminal for further input until the key information is determined to be clear and complete; Based on the questions and answers of the user terminal during the interaction process, combined with the relevant information of the historical description, monitor whether the conversation content is coherent and reasonable. If not, generate corresponding feedback information or re-match the conversation model, and send the feedback information to the user terminal; The consistency and completeness of the content supplemented by the user are judged. If yes, the next question of the inquiry statement paradigm of the dialogue model is continued to be called up and fed back to the user terminal to continue to supplement the input until the key information is judged to be clear and complete. If not, the inquiry statement paradigm of the dialogue model is continued to be called up for the question to inquire or extend the key information, and the reply to the inquiry content of the user terminal is judged in the previous step.

11. A terminal, characterized in that: The terminal includes a touch screen, a memory, a transceiver, one or more processors, multiple applications, and one or more programs; wherein the one or more programs are stored in the memory, and the transceiver is used to transmit or receive wireless signals; when the one or more processors execute the one or more programs, the terminal implements the legal consulting method as described in any one of claims 1-7.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the legal consulting method as described in any one of claims 1-7.

Citation Information

Cited By

  • Question answering method for legal consultation, training method of central control model and electronic equipment

    CN119849637A

  • Method, device and equipment for interactive dialogue and storage medium

    CN120632030A

  • Legal consultation service management system

    CN120725828A