Speech recognition optimization method and system applied to online AI legal consultation

By constructing a multi-dimensional labeled legal case library and real-time anxiety level recognition, the keyword matching weight is dynamically improved, solving the problem of low accuracy and efficiency of traditional speech recognition in legal consultation, and realizing proactive error correction and personalized optimization in high-certainty scenarios.

CN120853552AInactive Publication Date: 2025-10-28ZHEJIANG NAGU TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511316733.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2025-10-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional speech recognition technology suffers from inconsistent speech and accuracy when dealing with highly technical legal consultations involving complex terminology and fluctuating emotions, especially in legal disputes where uncertainty in the outcome and disputes over the application of law lead to frequent speech recognition errors.

Method used

A legal case database is constructed, labeled with legal clauses, subject descriptions, the degree of single impact of the circumstances, the uncertainty of the judgment outcome, and the anxiety descriptions of both parties. The voice content is identified in real time and the case circumstances and anxiety levels are extracted. By predicting similar cases, a set of keywords is dynamically extracted. The dual evaluation mechanism of the degree of single impact of the circumstances and the uncertainty of the judgment outcome is used to improve the keyword matching weight during the voice recognition process, and secondary matching and recognition are performed in high-certainty scenarios.

Benefits of technology

It improves the accuracy and efficiency of speech recognition in legal consultations, reduces repeated clarifications due to speech recognition errors, and enhances the personalization and intelligence of online legal consultations, especially in cases where users are anxious or cannot express themselves clearly, enabling a better focus on key legal provisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853552A_ABST
    Figure CN120853552A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of information, in particular to a speech recognition optimization method and system applied to online AI legal consultation. The method comprises the following steps: constructing a legal case library; voice content is recognized in real time, case plots are extracted, and the anxiety degree of a consultant is recognized; obtaining a plurality of prediction similar cases according to the extracted case plots and the identified anxiety degree; reading related legal terms, related subject descriptions and plot descriptions corresponding to all the prediction similar cases, and extracting keywords to obtain a keyword set; according to the plot influence singularity and the judgment trend uncertainty corresponding to all the prediction similar cases, obtaining a fusion singularity; and when the fusion degree exceeds a preset threshold value, matching the recognized words without definite semantics with the keywords in the keyword set again, and taking the keyword with the highest matching degree as a voice recognition result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Several embodiments of this specification relate to the field of information technology, specifically to a speech recognition optimization method and system applied to online AI legal consultation. Background Technology

[0002] With the rapid development of artificial intelligence technology, online AI legal consultation services have gradually become an important way for the public to obtain legal assistance. Voice interaction, as one of the most natural human-computer communication methods, is widely used in legal consultation scenarios. However, traditional voice recognition technology places higher demands on voice recognition technology when handling highly specialized legal consultation dialogues with dense terminology and significant emotional fluctuations in the consultant. Users are often in a state of anxiety, tension, or emotional excitement when seeking legal consultation, exhibiting rapid speech, semantic repetition, logical inconsistencies, frequent pauses, and even speech interruptions, severely affecting the coherence and accuracy of voice recognition. Furthermore, some legal disputes inherently involve uncertain judgment outcomes and controversies regarding the application of law, which also impacts subsequent voice recognition. Summary of the Invention

[0003] This specification describes a speech recognition optimization method and system for online AI legal consultation through several embodiments.

[0004] Firstly, embodiments of this specification provide a speech recognition optimization method for online AI legal consultation, including the following steps:

[0005] A legal case database is constructed, in which each case is marked with the relevant legal clauses, descriptions of the parties involved, descriptions of the circumstances, the degree of singularity of the impact of the circumstances, the uncertainty of the judgment, and descriptions of the anxiety of both parties.

[0006] During online voice legal consultations, the system can identify the voice content and extract case details in real time, as well as the anxiety level of the person seeking consultation.

[0007] Based on the extracted case details and the identified anxiety level, several similar predicted cases are obtained;

[0008] Read all the relevant legal clauses, subject descriptions and plot descriptions corresponding to the predicted similar cases and extract keywords to obtain a keyword set, and improve the matching weight of keywords in the keyword set in the subsequent speech recognition process;

[0009] Based on the singleness of the plot impact and the uncertainty of the judgment direction corresponding to all the predicted similar cases, the fusion singleness is obtained;

[0010] When the degree of fusion exceeds a preset threshold, the identified words without clear semantic meaning are matched again with the keywords in the keyword set, and the keyword with the highest matching degree is taken as the speech recognition result.

[0011] Secondly, embodiments of this specification provide a speech recognition optimization system applied to online AI legal consultation, including:

[0012] The case module constructs a legal case library. Each case in the legal case library is marked with the relevant legal clauses, descriptions of the parties involved, descriptions of the circumstances, the degree of single impact of the circumstances, the uncertainty of the judgment, and descriptions of the anxiety of both parties.

[0013] The recognition module identifies the voice content and extracts case details in real time during online voice legal consultations, and also identifies the anxiety level of the person seeking consultation.

[0014] The query module generates several similar predicted cases based on the extracted case details and the identified anxiety level.

[0015] The keyword module reads all the relevant legal clauses, subject descriptions, and plot descriptions corresponding to the predicted similar cases and extracts keywords to obtain a keyword set, which improves the matching weight of keywords in the keyword set in the subsequent speech recognition process;

[0016] The fusion module obtains the fusion unity degree based on the singleness of the plot impact and the uncertainty of the judgment direction corresponding to all the predicted similar cases;

[0017] The secondary recognition module, when the fusion singleness exceeds a preset threshold, will match the recognized words without clear semantics with the keywords in the keyword set again, and take the keyword with the highest matching degree as the speech recognition result.

[0018] Thirdly, embodiments of this specification provide an electronic device, including a processor and a memory;

[0019] The processor is connected to the memory;

[0020] The memory is used to store executable program code;

[0021] The processor runs a program corresponding to the executable program code stored in the memory to perform the method described in any of the above aspects.

[0022] Fourthly, embodiments of this specification provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in any of the above aspects.

[0023] Fifthly, embodiments of this specification provide a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the above aspects.

[0024] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:

[0025] In several embodiments of this specification, the provided speech recognition optimization method and system construct a case library labeled with multi-dimensional information such as legal clauses, subject descriptions, and plot features. Based on predicted similar cases, a keyword set is dynamically extracted, increasing the matching weight of relevant legal terms in subsequent speech recognition processes. This helps to better address the problems of low recall and high false recognition rates in traditional speech recognition for legal terminology. A dual evaluation mechanism is introduced, assessing both the singularity of the plot's impact and the uncertainty of the judgment's outcome. This quantifies the predictability of the case's legal result. When this value exceeds a threshold, a secondary matching and recognition of words without clear semantic meaning is triggered, enabling proactive error correction in high-certainty scenarios and improving recognition accuracy. For users experiencing anxiety or unclear expression, the system can better focus on key legal clauses, reducing repeated clarifications due to speech recognition errors and improving efficiency.

[0026] Other features and advantages of various embodiments of this specification will be further revealed in the following detailed description and accompanying drawings. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this specification, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram illustrating the speech recognition optimization provided in this manual.

[0029] Figure 2 This is a schematic diagram of the speech recognition optimization method provided in this manual.

[0030] Figure 3 This is a diagram illustrating anxiety level recognition provided in this manual.

[0031] Figure 4 This is a schematic diagram of the speech recognition optimization system provided in this manual.

[0032] Figure 5 This is a schematic diagram of the electronic device provided in this manual. Detailed Implementation

[0033] The technical solutions of the embodiments of this specification will be explained and described below with reference to the accompanying drawings. However, the following embodiments are only preferred embodiments of this specification and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments in the implementation methods without creative effort are all within the protection scope of this specification.

[0034] The terms "first," "second," "third," etc., in the description, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.

[0035] In the following description, terms such as “inner,” “outer,” “upper,” “lower,” “left,” and “right” are used only to facilitate the description of the embodiments and to simplify the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this specification.

[0036] All data involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0037] Before introducing the technical solutions described in this manual, the application scenarios and related technologies of the technical solutions will be introduced.

[0038] Online legal consultation is a service that provides the public with answers to legal questions, legal advice, and legal knowledge dissemination through internet platforms (such as websites, mobile applications, mini-programs, and AI assistants). With the development of artificial intelligence, big data, speech recognition, and natural language processing technologies, online legal consultation has gradually evolved from the early "human customer service + text Q&A" model to an intelligent service system of "AI intelligent assistant + human lawyer collaboration," and its application is becoming increasingly widespread.

[0039] User 10 describes their legal issues through text input, voice calls, or video conferencing. The AI ​​automatically identifies the user (e.g., worker, consumer, business owner) based on the received materials, extracting key information elements such as the timeline of events, involved parties, points of contention, and the desired outcome. The AI ​​may guide User 10 to add necessary details. Based on User 10's questions, relevant legal provisions, and case studies, the AI ​​can interact with User 10 to provide legal consultation services. Online legal consultation can significantly reduce the cost of obtaining legal support. For User 10, online legal consultation also offers advantages such as fast response and ease of use. Online legal consultation can respond 24 / 7, quickly answering some questions and reducing the workload of judicial and administrative organs and legal aid centers. Online legal consultation can serve as a "first line of defense," helping to resolve conflicts and disputes promptly and prevent minor issues from escalating into major ones. However, currently, online legal consultation is not personalized enough, and its integration with specific scenarios is insufficient. User 10 needs to spend considerable time and effort describing the case. This can be challenging for some users who are in a hurry and anxious. For example, user 10 may provide incomplete descriptions, repeatedly use fragmented phrases, pause, or jump between topics.

[0040] To enhance the personalization and intelligence of online legal consultations, this manual provides a speech recognition optimization method and system for online AI legal consultations. Please refer to the appendix. Figure 1 By continuously analyzing the obtained information and querying the legal case database 20, similar predicted cases 21 are obtained. Keywords are extracted from the similar predicted cases 21, indicating that these keywords are highly relevant to the user 10's current speech. Therefore, in subsequent speech recognition, the weight of these keywords is actively increased. This helps to improve the accuracy and efficiency of speech recognition.

[0041] This manual first provides a speech recognition optimization method for online AI legal consultation. Please refer to the appendix. Figure 2 The steps include:

[0042] Step S1) Construct a legal case library 20, in which each case is marked with the relevant legal clauses, descriptions of the parties involved, descriptions of the circumstances, the degree of single impact of the circumstances, the uncertainty of the judgment, and descriptions of the anxiety of both parties.

[0043] A structured, multi-annotated legal case database of 20 cases was established to provide semantic context support for subsequent speech recognition optimization. The cases were sourced from publicly available information. Applicable laws, regulations, and judicial interpretations were extracted, such as Article 584 of the Civil Code and Article 39 of the Labor Contract Law. The identities of the parties involved were annotated, such as "Plaintiff: Employee, 35 years old, 5 years of service" and "Defendant: Corporate legal representative." A summary of the case facts was extracted, including time, place, actions, causation, and consequences of damage.

[0044] The singularity of impact of a particular circumstance describes whether a specific circumstance generally leads to the same judgment in similar cases. A higher value indicates a more clearly defined legal consequence for that circumstance.

[0045] Uncertainty regarding the outcome of a judgment reflects the degree to which the result is difficult to predict due to factors such as disagreements over the application of law, ambiguity of evidence, or policy changes. It is comprehensively evaluated using indicators such as the abstractness of legal provisions, the degree of disagreement in their application, the consistency rate of judgment conclusions, and the rate of reversal.

[0046] The description of anxiety by both parties is based on the degree to which the judgment will affect the interests of the parties, and the emotions of the plaintiff and the defendant are graded and described, such as "high anxiety (fear of unemployment or failure to receive urgently needed compensation)", "moderate anxiety (concern about economic compensation or fines)" and "low anxiety (sufficient evidence and clear legal consequences or minor liability)".

[0047] The methods for annotating the degree of singleness of influence of plot include:

[0048] Extract all the details from the cases and categorize all cases according to type;

[0049] A uniqueness score is assigned to the plot based on the highest probability that the plot will lead to the same judgment result in similar cases.

[0050] A uniqueness score for a case is generated by taking the weighted average of the uniqueness scores of all the events included in the case, and the degree of uniqueness of the case's impact is marked based on the uniqueness score.

[0051] A higher value for the singularity of the impact of a situation indicates that the situation is more typical, its legal consequences are more predictable, and its impact on the judgment is more singular and certain. The singularity of the impact of a situation provides an important legal logical basis for subsequent contextual optimization of speech recognition.

[0052] Each legal case undergoes semantic analysis and structured deconstruction to identify the basic factual units constituting the case. For example, in a labor dispute case, extractable elements include: "the employer failed to pay social insurance for the employee," "the employee's length of service exceeded two years," "the termination of the labor contract was not notified 30 days in advance," and "the employee was absent without leave without a written warning." These elements are stored in the form of natural language fragments or structured triplets (subject-behavior-object) for easy subsequent processing. Based on the legal nature and applicable cause of action, the cases in the case database are divided into several categories. These include, for example, marital and family disputes (divorce, custody, property division), labor disputes (dismissal, work injury, overtime pay), contract disputes (sales contracts, lease contracts, service contracts), and tort liability (traffic accidents, personal injury, defamation).

[0053] For a specific type of case (such as "labor disputes"), we statistically analyzed the probability that a court would order the employer to pay severance pay and the probability that it would order the employer to make up for the unpaid social security contributions when a particular circumstance (such as "failure to pay social security contributions") occurred in historical precedents. For example, in 100 labor disputes involving "failure to pay social security contributions," 92 cases resulted in court orders for the employer to pay severance pay, so the probability of this leading to severance pay is 0.92. In 8 cases, the court ordered the employer to make up for the unpaid social security contributions, so the probability of this leading to such payments is 0.08. Therefore, the singularity score for the circumstance "failure to pay social security contributions" is 0.92. This case also included the circumstance of "oral dismissal without written notice." The probability of the circumstance "oral dismissal without written notice" leading to severance pay is higher than the probability of other judgments, at 0.8. The singularity score for the circumstance "oral dismissal without written notice" is 0.8.

[0054] The case includes the incidents of "failure to pay social security" and "verbal dismissal without written notification." The uniqueness scores for the two incidents are 0.92 and 0.8, respectively. The weighted average of the two incidents yields a uniqueness score of 0.9 for the case. Therefore, the uniqueness of the impact of the case is 0.9.

[0055] Methods for indicating the uncertainty of the decision path include:

[0056] Extract the key details of the case, identify the legal provisions corresponding to the key details, determine whether there is any disagreement in the application of the legal provisions, and generate the degree of disagreement in application.

[0057] Obtain effective judgments containing similar key facts, calculate the consistency rate of the conclusions of the judgments, identify judgments that have been overturned by higher courts, and calculate the overturn rate.

[0058] The uncertainty of the judgment's direction is obtained based on the abstractness, applicability divergence, consistency rate of conclusions, and reversal rate of the legal provisions corresponding to the cases.

[0059] The higher the value of the uncertainty of the judgment, the greater the uncertainty of the final judgment result due to reasons such as ambiguity in the application of law, inconsistent judgment standards, or complex fact-finding.

[0060] Based on natural language processing technologies (such as dependency parsing, named entity recognition, and event extraction), key details that play a decisive role in the judgment are identified from the case text. For example, questions like "Does a traffic accident involving a platform-based delivery worker constitute an employment relationship?" and "How is property divided in a divorce if a house was purchased before marriage and the mortgage is jointly repaid after marriage?" are considered key details. The corresponding legal clauses for these key details are then identified. Subsequently, the applicability of these legal clauses is assessed from publicly available sources, generating an application disagreement score. This can be achieved by automatically searching academic literature, judicial interpretations, guiding cases, and local court precedents to analyze whether there are disputes regarding the interpretation or application of these legal clauses in practice. For instance, judgments on "whether a food delivery rider and the platform constitute an employment relationship" vary significantly across different regions, indicating a clear application disagreement, resulting in a high application disagreement score, such as 0.8. Conversely, the provision on "double wages for failure to sign a written employment contract" has a clear judicial interpretation, resulting in a lower application disagreement score, such as 0.1.

[0061] Using key details as search criteria, similar court judgments are retrieved. The proportion of cases supporting the plaintiff's claims or the clustering distribution of judgments are statistically analyzed. For example, in 10 similar cases of "contract disputes between online streamers and companies," if 5 cases determine a labor contract relationship and 5 cases determine a cooperative relationship, the consistency rate is 50%, or 0.5. The reversal rate is identified and calculated by retrieving second-instance and retrial documents of this case or similar cases, and the proportion of reversals made by higher courts against first-instance judgments is statistically analyzed. Reversal rate = Number of reversal cases / Total number of appeals in similar cases. A high reversal rate reflects instability in the standards of first-instance judgments and high uncertainty in the judgments.

[0062] The more principled and general the wording of a legal provision, such as mentioning unfairness or reasonable time limits, the higher its level of abstraction. The level of abstraction in a legal provision can be quantified using publicly available methods such as semantic density and fuzzy word identification.

[0063] The uncertainty of the judgment's outcome is obtained by taking the weighted average of the abstractness of the legal provisions, the degree of disagreement in their application, the consistency rate of conclusions, and the reversal rate. The abstractness of the legal provisions, the degree of disagreement in their application, the consistency rate of conclusions, and the reversal rate all need to be expressed numerically and normalized.

[0064] Step S2) During the online voice legal consultation process of user 10, the voice content is identified in real time and the case details are extracted 12, and the anxiety level of the consultant is identified 11.

[0065] When user 10 conducts a voice consultation, the audio stream is captured through a front-end device (such as a mobile app or web-based voice interface), and the audio content is read in real time using streaming speech recognition technology. A deep learning speech recognition model is used to convert the speech signal into text. Legally relevant content is identified and extracted from the converted text. For example, matching and extraction are performed according to templates including the parties involved, legal acts, time information, location, contract status, and consequences of damages. The legal type of the case is determined based on the context, such as labor disputes, marriage and family law, contract disputes, or tort liability.

[0066] Methods for identifying a client's anxiety level include:

[0067] Based on the anxiety descriptions of both parties in the predicted similar case 21 and the type of the party corresponding to the consultant, the initial anxiety level is obtained;

[0068] Based on the degree of singularity of the impact of the aforementioned circumstances and the uncertainty of the judgment's outcome, a first correction coefficient is generated;

[0069] Recognize the semantics of speech and calculate the repetition frequency, semantic conflicts, degree of semantic conflicts, and number of negative expressions of case-related keywords during the consultation process;

[0070] Obtain the number of pauses in expression and the average duration of each pause during the consultation process;

[0071] A second correction coefficient is generated based on the repetition frequency of keywords in the case, the number of semantic conflicts, the degree of semantic conflicts, the number of negative expressions, the number of pauses in expression, and the average duration of pauses in expression.

[0072] Based on the initial anxiety level, the first correction coefficient, and the second correction coefficient, the client's anxiety level was obtained as 11.

[0073] In online AI legal consultation scenarios, users often experience high levels of anxiety due to concerns about rights being infringed, disputes escalating, or unclear legal consequences. This anxiety affects the clarity and logic of their speech. Therefore, identifying anxiety levels is crucial for improving speech recognition accuracy.

[0074] Each case in the legal case database 20 is labeled with an anxiety description tag for the "plaintiff / defendant," such as: "High Anxiety: Worried about unemployment and child support payments being cut off," "Moderate Anxiety: Worried about reputational damage but has insurance coverage," and "Low Anxiety: Only procedural consultation." The system determines the current consultant's role (e.g., "employee," "divorced woman," "legal representative of the defendant company," etc.) and extracts anxiety descriptions for similar roles from matched cases. Natural language understanding technology converts these anxiety descriptions into quantitative scores (e.g., a range of 0-1). For example, high anxiety is represented by 0.8-1.0, moderate anxiety by 0.5-0.7, and low anxiety by 0.2-0.4. Then, a weighted average of the anxiety values ​​from multiple similar cases is taken (weighted by the degree of scenario matching) to generate an initial anxiety score. For example, if the consulting user 10 claims to be a "dismissed employee," then based on the matching of 3 labor dispute cases (i.e., predicting similar case 21), 2 of which are labeled "high anxiety" and 1 "moderate anxiety," the final initial anxiety score assigned is 0.82.

[0075] A higher value for the singularity of the impact of the circumstances indicates a clearer legal consequence for the case, thus reducing user anxiety. A higher value for the uncertainty of the judgment's trajectory indicates a more unpredictable outcome, which can easily cause unease and increase user anxiety. The first correction coefficient = α × (1 - singularity of the impact of the circumstances) + β × uncertainty of the judgment's trajectory, where α and β are weighting coefficients. The singularity of the impact of the circumstances and the uncertainty of the judgment's trajectory must be converted to dimensionless and normalized values ​​before calculation.

[0076] The frequency of keyword repetition in the case details is calculated by counting the number of times core words such as "compensation," "illegal," and "what to do" appear per unit of time. A high repetition frequency indicates greater anxiety. The number of semantic conflicts is used to detect contradictions in statements, such as initially stating "a contract was signed" and then later saying "not signed." A high number of semantic conflicts indicates cognitive confusion, i.e., greater anxiety. The degree of semantic conflict is used to quantify the severity of the contradiction and is calculated using a semantic similarity model. A high degree of semantic conflict indicates greater anxiety.

[0077] The frequency of negative expressions, such as "can't," "no," "it's over," and "it's terrible," indicates a greater degree of negative emotion. A higher frequency of negative expressions indicates greater anxiety. The number of pauses in expression is represented by the number of silences exceeding 0.8 seconds per minute; more pauses indicate interrupted thinking, greater emotional fluctuations, and increased anxiety. The average duration of pauses in expression is represented by the average of all effective pauses; longer pauses indicate more depressed mood and greater anxiety.

[0078] After normalizing the repetition frequency, semantic conflict frequency, semantic conflict degree, negative expression frequency, expression pause frequency, and average pause duration of the above-mentioned case keywords, a second correction coefficient is generated by weighted average.

[0079] Please see the appendix Figure 3 The initial anxiety level, the first correction coefficient, and the second correction coefficient are combined to obtain the client's anxiety level 11. For example, the client's anxiety level 11 can be obtained as: Client's anxiety level 11 = Initial anxiety level × First correction coefficient × Second correction coefficient. Alternatively, the client's anxiety level 11 can be obtained as: Client's anxiety level 11 = Initial anxiety level (1 + γ × First correction coefficient + δ × Second correction coefficient). γ and δ are adjustment parameters, and for example, their values ​​range from [0.3, 0.5].

[0080] Step S3) Based on the extracted case details 12 and the identified anxiety level 11, obtain several predicted similar cases 21. Specifically, this includes:

[0081] The extracted case details 12 are compared with the case details in the legal case database 20 to obtain the case details matching degree;

[0082] The anxiety level of 11 is compared with the anxiety description of the case to obtain the anxiety matching degree;

[0083] The plot matching degree is adjusted based on the anxiety matching degree to obtain the adjusted plot matching degree;

[0084] Based on the modified plot matching degree, several cases were obtained as predicted similar cases 21.

[0085] Case detail 12 is encoded as a multi-dimensional vector, including subject, action, time, location, legal clause, and consequence. Then, cosine similarity, Euclidean distance, or semantic matching models are used to calculate the similarity score. For example, the case detail 12 described by user 10 as "the company failed to pay social security and suddenly dismissed the employee" has a similarity score of 0.89 with the detail description of a labor dispute case in the case database. The identified anxiety level 11 is compared with the anxiety description of the case. If the identified anxiety level 11 is greater than the anxiety description of the case and exceeds a certain threshold, it indicates that user 10 has not fully expressed the complete case details, and the case is excluded, i.e., a sufficiently small modified detail matching score is set.

[0086] Step S4) Read all the legal clauses, subject descriptions and plot descriptions corresponding to the predicted similar cases 21 and extract keywords to obtain a keyword set 22. In the subsequent speech recognition process, increase the matching weight of the keywords in the keyword set 22.

[0087] For each predicted similar case 21, read the legal provisions involved, the descriptions of the subjects involved, and the descriptions of the circumstances. Exemplarily, such as Article 584 of the Civil Code (Liability for Breach of Contract), Article 47 of the Labor Contract Law (Calculation of Economic Compensation), Article 76 of the Road Traffic Safety Law (Division of Accident Liability), the extracted keywords include: "liquidated damages", "compensation standard", "termination of labor contract", "work-related injury determination", etc. The descriptions of the subjects involved are such as: "Plaintiff: elderly people over 60 years old", "Defendant: e-commerce platform operator", "Applicant: full-time mother", etc. The extracted keywords include: "consumer", "employer", "guardian", "lessee", "platform company", etc. The description of the circumstances is: "Furniture damaged due to water leakage in the house", "Abused by the anchor during the live broadcast", "Worked for 8 months without a written labor contract". The extracted keywords include: "water leakage", "repair obligation", "reputation infringement", "double salary", "labor relationship", etc.

[0088] After obtaining the keyword set 22, in subsequent speech recognition, when a voice similar to the pronunciation of "wei yao jing" is recognized, it will be recognized as "liquidated damages" due to the increased matching weight of "liquidated damages". Thus, avoiding the attempt to understand "wei yao jing" and giving a consultation reply.

[0089] Step S5) Obtain the integrated singularity based on the singularity of the plot impact and the uncertainty of the judgment direction corresponding to all the predicted similar cases 21.

[0090] The method for obtaining the integrated singularity based on the singularity of the plot impact and the uncertainty of the judgment direction corresponding to all the predicted similar cases 21 includes:

[0091] Calculate the quotient of the singularity of the plot impact and the uncertainty of the judgment direction, and after normalizing the quotient, use it as the integrated singularity.

[0092] The singularity of the plot impact indicates whether the key plot in the case has a stable and clear impact on the judgment result (the higher the value, the more certain the legal consequence), and the value range is usually normalized to (0, 1). The uncertainty of the judgment direction indicates the degree to which the judgment result is difficult to predict due to reasons such as differences in legal application, ambiguity of evidence, or conflicts of case precedents, and the value range is also (0, 1). The greater the singularity of the plot impact, the more definite the result, and the value of the integrated singularity will be higher. When the uncertainty of the judgment direction approaches 0, it indicates that the judgment is relatively clear, and at this time, the value of the integrated singularity will be higher. When the uncertainty of the judgment direction approaches 1, it indicates that the judgment is unclear, and at this time, the value of the integrated singularity will be lower. The value of the integrated singularity also needs to be normalized. When the value of the integrated singularity is greater than 1, set the value of the integrated singularity to 1.

[0093] Step S6): When the degree of fusion singularity exceeds a preset threshold, match the identified semantic-less words with the keywords in the keyword set 22 again, and use the keyword with the highest matching degree as the speech recognition result 31.

[0094] The semantic-less words in this embodiment refer to words with ambiguous or incorrect semantics, rather than meaningless modal particles, etc. Exemplarily, in the initial speech recognition process, the following types of words / phrases with unclear semantics or low confidence will be classified as "semantic-less words". Low-confidence words, such as "that... money"; Ambiguous reference words like "compensate that"; Near-sound misidentifications, such as "N+1 compensation" being recognized as "en plus one compensation".

[0095] For each "semantic-less word", find the candidate word with the highest matching degree in the keyword set 22 and replace the original recognition result. Exemplarily, the initial recognition result is: "The company told me to leave. Is there that... compensation?", and after the second match: "The company told me to leave. Is there economic compensation?"

[0096] This step can utilize the highly certain information in the legal context to perform secondary recognition on the fuzzy and uncertain speech segments in the initial speech recognition, which helps to improve the semantic recognition ability of online legal consultation in complex expression scenarios.

[0097] On the other hand, this specification provides a speech recognition optimization system applied to online AI legal consultation. Please refer to the appendix Figure 4 , including:

[0098] Case module 100, constructing a legal case library 20, where each case in the legal case library 20 is marked with legal provisions involved, subject descriptions involved, plot descriptions, plot impact singularity, judgment trend uncertainty, and anxiety descriptions of both parties.

[0099] Recognition module 200, during the process of the user 10 conducting online voice legal consultation, real-time recognizing the speech content and extracting the case plot 12, and recognizing the anxiety level 11 of the inquirer.

[0100] Query module 300, obtaining several predicted similar cases 21 according to the extracted case plot 12 and the recognized anxiety level 11.

[0101] Keyword module 400, reading the legal provisions involved, subject descriptions involved, and plot descriptions corresponding to all the predicted similar cases 21 and extracting keywords to obtain a keyword set 22, and increasing the matching weight of the keywords in the keyword set 22 during the subsequent speech recognition process.

[0102] The fusion module 500 obtains the fusion singleness degree based on the singleness of the plot influence and the uncertainty of the judgment direction corresponding to all the predicted similar cases 21.

[0103] The secondary recognition module 600, when the fusion singleness exceeds a preset threshold, will match the recognized words without clear semantics with the keywords in the keyword set 22 again, and take the keyword with the highest matching degree as the speech recognition result 31.

[0104] Please see Figure 5 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this specification.

[0105] like Figure 5 As shown, the electronic device 1100 may include: at least one processor 1101, at least one network interface 1104, a user interface 1103, a memory 1105, and at least one communication bus 1102. The communication bus 1102 can be used to connect and communicate with the various components mentioned above. The user interface 1103 may include buttons, and optionally may include standard wired or wireless interfaces. The network interface 1104 may include, but is not limited to, a Bluetooth module, an NFC module, or a Wi-Fi module. The processor 1101 may include one or more processing cores. The processor 1101 connects to various parts within the electronic device 1100 using various interfaces and lines, and performs various functions of the routing device and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1105, and by calling data stored in the memory 1105. Optionally, the processor 1101 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 1101 may integrate one or more combinations of CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content that the display screen needs to show; and the modem is used for wireless communication.

[0106] It is understandable that the aforementioned modem may not be integrated into the processor 1101, but may be implemented using a separate chip.

[0107] The memory 1105 may include RAM or ROM. Optionally, the memory 1105 may include a non-transitory computer-readable medium. The memory 1105 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 1105 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1105 may also be at least one storage device located remotely from the aforementioned processor 1101. As a computer storage medium, the memory 1105 may include an operating system, a network communication module, a user interface module, and application programs. The processor 1101 may be used to call the application programs stored in the memory 1105 and execute the methods in the above-described embodiments.

[0108] This specification also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform multiple steps as described in the above embodiments. If the constituent modules of the above-described electronic device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0109] This specification also provides a computer program product, including a computer program that, when executed by a processor, implements the multiple steps described in the above embodiments.

[0110] Where there is no conflict, the technical features in this embodiment and implementation scheme can be combined arbitrarily.

[0111] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes multiple computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. 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 one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center integrating multiple available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital versatile discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).

[0112] When implemented through hardware or firmware, the aforementioned method flow is programmed into the hardware circuit to obtain the corresponding hardware circuit structure and achieve the corresponding function. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit, whose logic function is determined by the user programming the device. Designers can program a digital system onto a PLD themselves, eliminating the need for chip manufacturers to design and fabricate dedicated integrated circuit chips. Furthermore, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, similar to the software compiler used in program development. The original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There is not just one HDL, but many. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of the aforementioned hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logic method flow can be easily obtained.

[0113] The embodiments described above are merely preferred embodiments of this specification and are not intended to limit the scope of this specification. Any modifications and improvements made by those skilled in the art to the technical solutions of this specification without departing from the spirit of this specification should fall within the protection scope defined by the claims of this specification.

Claims

1. A speech recognition optimization method applied to online AI legal consultation, characterized in that, Including the following steps: A legal case database is constructed, in which each case is marked with the relevant legal clauses, descriptions of the parties involved, descriptions of the circumstances, the degree of singularity of the impact of the circumstances, the uncertainty of the judgment, and descriptions of the anxiety of both parties. During online voice legal consultations, the system can identify the voice content and extract case details in real time, as well as the anxiety level of the person seeking consultation. Based on the extracted case details and the identified anxiety level, several similar predicted cases are obtained; Read all the relevant legal clauses, subject descriptions and plot descriptions corresponding to the predicted similar cases and extract keywords to obtain a keyword set, and improve the matching weight of keywords in the keyword set in the subsequent speech recognition process; Based on the singleness of the plot impact and the uncertainty of the judgment direction corresponding to all the predicted similar cases, the fusion singleness is obtained; When the degree of fusion exceeds a preset threshold, the identified words without clear semantic meaning are matched again with the keywords in the keyword set, and the keyword with the highest matching degree is taken as the speech recognition result.

2. The speech recognition optimization method for online AI legal consultation according to claim 1, characterized in that, Methods for annotating the impact of plot on singularity include: Extract all the details from the cases and categorize all cases according to type; A uniqueness score is assigned to the plot based on the highest probability that the plot will lead to the same judgment result in similar cases. A uniqueness score for a case is generated by taking the weighted average of the uniqueness scores of all the events included in the case, and the degree of uniqueness of the case's impact is marked based on the uniqueness score.

3. The speech recognition optimization method for online AI legal consultation according to claim 1, characterized in that, Methods for indicating the uncertainty of the decision path include: Extract the key details of the case, identify the legal provisions corresponding to the key details, determine whether there is any disagreement in the application of the legal provisions, and generate the degree of disagreement in application. Obtain effective judgments containing similar key facts, calculate the consistency rate of the conclusions of the judgments, identify judgments that have been overturned by higher courts, and calculate the overturn rate. The uncertainty of the judgment's direction is obtained based on the abstractness, applicability divergence, consistency rate of conclusions, and reversal rate of the legal provisions corresponding to the cases.

4. A speech recognition optimization method for online AI legal consultation according to any one of claims 1 to 3, characterized in that, Methods for identifying a client's anxiety level include: An initial anxiety level is obtained based on the anxiety descriptions of both parties in the predicted similar cases and the type of party corresponding to the consultant. Based on the degree of singularity of the impact of the aforementioned circumstances and the uncertainty of the judgment's outcome, a first correction coefficient is generated; Recognize the semantics of speech and calculate the repetition frequency, semantic conflicts, degree of semantic conflicts, and number of negative expressions of case-related keywords during the consultation process; Obtain the number of pauses in expression and the average duration of each pause during the consultation process; A second correction coefficient is generated based on the repetition frequency of keywords in the case, the number of semantic conflicts, the degree of semantic conflicts, the number of negative expressions, the number of pauses in expression, and the average duration of pauses in expression. The anxiety level of the client is obtained based on the initial anxiety level, the first correction factor, and the second correction factor.

5. A speech recognition optimization method for online AI legal consultation according to any one of claims 1 to 3, characterized in that, Methods for obtaining several similar predicted cases based on extracted case details and identified anxiety levels include: The extracted case details are compared with the case details in the legal case database to obtain the case details matching degree; The anxiety level is compared with the anxiety description of the case to obtain the anxiety matching degree; The plot matching degree is adjusted based on the anxiety matching degree to obtain the adjusted plot matching degree; Based on the modified plot matching degree, several cases are obtained as predicted similar cases.

6. A speech recognition optimization method for online AI legal consultation according to any one of claims 1 to 3, characterized in that, Based on the singularity of the plot impact and the uncertainty of the judgment trend corresponding to all the predicted similar cases, the method for obtaining the fusion singularity includes: Calculate the quotient between the singleness of the impact of the plot and the uncertainty of the outcome of the judgment, and normalize the quotient to obtain the fusion singleness.

7. A speech recognition optimization system for online AI legal consultation, characterized in that, include: The case module constructs a legal case library. Each case in the legal case library is marked with the relevant legal clauses, descriptions of the parties involved, descriptions of the circumstances, the degree of single impact of the circumstances, the uncertainty of the judgment, and descriptions of the anxiety of both parties. The recognition module identifies the voice content and extracts case details in real time during online voice legal consultations, and also identifies the anxiety level of the person seeking consultation. The query module generates several similar predicted cases based on the extracted case details and the identified anxiety level. The keyword module reads all the relevant legal clauses, subject descriptions, and plot descriptions corresponding to the predicted similar cases and extracts keywords to obtain a keyword set, which improves the matching weight of keywords in the keyword set in the subsequent speech recognition process; The fusion module obtains the fusion unity degree based on the singleness of the plot impact and the uncertainty of the judgment direction corresponding to all the predicted similar cases; The secondary recognition module, when the fusion singleness exceeds a preset threshold, will match the recognized words without clear semantics with the keywords in the keyword set again, and take the keyword with the highest matching degree as the speech recognition result.

8. An electronic device, characterized in that, Including the processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.

Citation Information

Cited By

  • Electronic mediation protocol tamper-proofing verification method based on dual hash and block chain

    CN122333548A