Data analysis method and system based on case self-learning
By introducing case-based self-learning and multi-dimensional quality assessment, the problems of knowledge base pollution and low reuse efficiency in data analysis systems have been solved, enabling efficient and reliable data analysis capabilities to evolve on their own.
Patent Information
- Application Number
- CN202511476451.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing data analysis systems lack effective quality assessment mechanisms, leading to knowledge base contamination and performance degradation. At the same time, the methods for reusing historical cases are rigid, with narrow applicability and low reuse efficiency.
A case-based self-learning data analysis method is introduced. Historical cases are retrieved through semantic vectorization processing, customized solutions are generated, and the newly generated solutions are evaluated for quality in multiple dimensions. Once the conditions for inclusion are met, they are stored in the case library.
This ensures the reliability and accuracy of the knowledge base, improves analysis efficiency and user experience, expands the applicability of historical cases, and enables the system to self-evolve and continuously learn.
Smart Images

Figure CN120950499B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a data analysis method and system based on case-based self-learning. Background Technology
[0002] In recent years, with the development of large language model technology, data analysis systems based on natural language interaction have been widely used. Users can ask questions in natural language, and the system can call on the corresponding tools to query and analyze data and generate answers. To improve efficiency, some attempts have emerged in existing technologies, such as retrieving and reusing historically successful solutions to respond to user requests and storing newly generated solutions in a case library for future use.
[0003] However, the aforementioned existing technologies still have the following drawbacks. First, when storing newly generated solutions in the case library, there is usually a lack of effective quality assessment and screening mechanisms. This indiscriminate storage method may lead to the continuous accumulation of erroneous, inefficient, or incomplete solutions, thus polluting the entire case library. This not only fails to improve efficiency but also causes a decline in the overall system performance and reliability over time. Second, the existing technologies are also relatively rigid in their methods of reusing historical cases. When there are subtle differences between new and historical problems in terms of context, parameters, or intent, the system struggles to flexibly adjust and adapt historical solutions dynamically, resulting in low reuse success rates and limited applicability. This forces many similar problems to still require initiating a complete, time-consuming, and labor-intensive real-time planning process. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide a data analysis method and system based on case self-learning and intelligent evaluation. This aims to solve the problems in existing technologies, such as the lack of a quality evaluation mechanism in data analysis case libraries leading to knowledge pollution and performance degradation risks, and the rigid reuse methods of historical cases resulting in narrow applicability and low reuse efficiency.
[0005] This invention provides a case-based self-learning data analysis method, comprising: acquiring a target task input by a user; based on the target task, searching a preset case library for the existence of a corresponding historical case, the historical case containing a preset solution; if a corresponding historical case is found, extracting context parameters according to the target task, and using the context parameters to adapt the solution in the historical case to generate a customized solution, and generating a first analysis result based on the customized solution; if no corresponding historical case is found, performing real-time planning through a large language model to generate a new solution, and executing the new solution to generate a second analysis result; performing a quality assessment on the new solution generated through the real-time planning and the second analysis result; when the quality assessment result meets preset storage conditions, storing the new solution as a new historical case in the case library.
[0006] Optionally, the step of searching for the existence of a corresponding historical case in a preset case library includes: performing semantic vectorization processing on the target task to obtain a target vector; and performing vector similarity retrieval based on the target vector in the case library to determine whether there is a historical case that matches the target task.
[0007] Optionally, adapting the solution in the historical case using the context parameters includes: using the solution in the historical case as a parameterized template, and filling the parameterized template with the context parameters extracted from the target task to generate the customized solution.
[0008] Optionally, the solutions in the historical cases include conditional branching logic; adapting the solutions in the historical cases using the context parameters includes: selecting an appropriate logical path in the conditional branching logic based on the context parameters to generate the customized solution.
[0009] Optionally, the quality assessment includes: automatically assessing the execution process of the new solution and the second analysis results from at least two preset assessment dimensions to obtain assessment results for each dimension.
[0010] Furthermore, the at least two preset evaluation dimensions include at least the following two: a rule-layer check dimension, used to verify whether the tool call status or returned data contained in the new solution conforms to preset rules; a data-layer check dimension, used to verify whether the structure or business logic of the data on which the second analysis result is based conforms to preset specifications; and an AI-layer check dimension, used to use an evaluation model to evaluate the relevance or accuracy of the second analysis result with the target task.
[0011] Optionally, the preset entry conditions include: calculating a comprehensive score based on the evaluation results of each dimension; and the comprehensive score meets a preset scoring threshold.
[0012] Furthermore, the method also includes: when the comprehensive score is between a preset first threshold and a second threshold, sending the new solution to the manual review terminal; when an approval instruction indicating that the review has been passed is received from the manual review terminal, storing the new solution as a new historical case in the case library.
[0013] Optionally, the method further includes: obtaining user feedback on the first analysis result or the second analysis result; and using the user feedback as one of the bases for determining the quality assessment result when performing the quality assessment.
[0014] To achieve the above objectives, this application also provides a case-based self-learning data analysis system, comprising: a task acquisition module for acquiring a target task input by a user; a case retrieval module for searching a preset case library for the existence of a corresponding historical case based on the target task, wherein the historical case contains a preset solution; a solution processing module for: if a corresponding historical case is found, extracting context parameters according to the target task, and adapting the solution in the historical case using the context parameters to generate a customized solution, and generating a first analysis result based on the customized solution; if no corresponding historical case is found, calling a large language model for real-time planning to generate a new solution, and executing the new solution to generate a second analysis result; a quality assessment module for assessing the quality of the new solution generated through the real-time planning and the second analysis result; and a case storage module for storing the new solution as a new historical case in the case library when the quality assessment result meets preset storage conditions.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] 1. This invention ensures the quality of the system's self-learning. By introducing a mechanism for quality assessment and screening of newly generated solutions for inclusion in the database, it effectively avoids the contamination of the knowledge base by low-quality or erroneous cases, ensuring the reliability and accuracy of the case database and preventing the system performance from degrading over time.
[0017] 2. This invention improves analysis efficiency and user experience. By setting up a case reuse path, it enables rapid response to a large number of similar or repetitive problems, significantly reducing response latency. At the same time, through a dynamic parameter adaptation mechanism, it expands the applicability of historical cases, further improving the success rate of case reuse and saving computing resources that require real-time planning of large language models.
[0018] 3. This invention achieves true self-evolution of capabilities. The technical closed loop constructed by this invention enables the system not only to handle problems, but also to learn and grow from the process of solving problems, continuously accumulating high-quality, flexibly reusable solutions, thereby achieving continuous self-improvement of data analysis capabilities. Attached Figure Description
[0019] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0020] Figure 1 This is a schematic diagram of the overall process of the data analysis method of the present invention;
[0021] Figure 2 This is a structural block diagram of the data analysis system of the present invention;
[0022] Figure 3 This is a flowchart illustrating the standard data analysis path in this invention;
[0023] Figure 4 This is a flowchart illustrating the automated evaluation process in this invention;
[0024] Figure 5 This is a flowchart illustrating the case entry process in this invention. Detailed Implementation
[0025] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0026] Example 1
[0027] This embodiment provides a basic implementation scheme for a case-based self-learning data analysis method and system. This scheme, by constructing a dual-path processing mechanism and a quality assessment feedback loop, enables the data analysis system to continuously learn high-quality solutions while responding to user requests, thereby achieving self-evolution of its capabilities.
[0028] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. According to the present invention, a data analysis method based on case-based self-learning is provided, such as... Figure 1 As shown, the process includes: obtaining a target task input by the user; based on the target task, searching a preset case library for a corresponding historical case, the historical case containing a preset solution; if a corresponding historical case is found, extracting context parameters according to the target task, and using the context parameters to adapt the solution in the historical case to generate a customized solution, and generating a first analysis result based on the customized solution; if no corresponding historical case is found, performing real-time planning through a large language model to generate a new solution, and executing the new solution to generate a second analysis result; performing a quality assessment on the new solution generated through the real-time planning and the second analysis result; when the quality assessment result meets preset storage conditions, storing the new solution as a new historical case in the case library.
[0029] The step of searching for the existence of a corresponding historical case in a preset case library includes: performing semantic vectorization processing on the target task to obtain a target vector; and performing vector similarity retrieval based on the target vector in the case library to determine whether there is a historical case that matches the target task.
[0030] The process of adapting the solutions in the historical cases using the context parameters includes: using the solutions in the historical cases as a parameterized template, and filling the parameterized template with the context parameters extracted from the target task to generate the customized solution. The solutions in the historical cases contain conditional branching logic; the process of adapting the solutions in the historical cases using the context parameters includes: selecting an adapted logical path in the conditional branching logic based on the context parameters to generate the customized solution.
[0031] The quality assessment includes: automatically evaluating the execution process of the new solution and the second analysis results from at least two preset evaluation dimensions to obtain evaluation results for each dimension. The at least two preset evaluation dimensions include: a rule-layer check dimension, used to verify whether the tool call status or returned data included in the new solution conforms to preset rules; a data-layer check dimension, used to verify whether the structure or business logic of the data on which the second analysis results are based conforms to preset specifications; and an AI-layer check dimension, used to use an evaluation model to evaluate the relevance or accuracy of the second analysis results to the target task. The preset data entry conditions include: calculating a comprehensive score based on the evaluation results of each dimension, and the comprehensive score meeting a preset scoring threshold.
[0032] The invention further includes: when the comprehensive score is between a preset first threshold and a second threshold, sending the new solution to a human review terminal; when an approval instruction indicating approval is received from the human review terminal, storing the new solution as a new historical case in the case library. It also includes: obtaining user feedback regarding the first analysis result or the second analysis result; and using the user feedback as one of the bases for determining the quality assessment result during the quality assessment.
[0033] Example 2
[0034] The present invention also provides a case-based self-learning data analysis system, which can be implemented by executing the process steps of the case-based self-learning data analysis method. That is, those skilled in the art can understand the case-based self-learning data analysis method as a preferred embodiment of the case-based self-learning data analysis system.
[0035] like Figure 2 The diagram illustrates the architecture of a data analysis system according to an embodiment of this application. The system can be deployed on server hardware including a processor and memory, and performs its functions by executing computer program instructions stored in memory. Specifically, the system mainly includes an application server 10, which integrates multiple collaborative functional modules, including: a task acquisition module 11, a case retrieval module 12, a dynamic adaptation module 13, a real-time planning module 14, a quality assessment module 15, and a case storage module 16.
[0036] The task acquisition module 11, serving as the system's entry point, receives and parses requests from user terminals (e.g., queries entered by the user in natural language) and transforms them into structured target tasks. The case retrieval module 12, based on the target task transmitted by the task acquisition module 11, searches the case library 20 to determine if any historical cases exist that can solve the task or similar tasks. It should be noted that the case library 20 is a database for persistently storing high-quality, reusable solutions; in this embodiment, it can be specifically implemented as a vector database.
[0037] If the case retrieval module 12 finds a matching historical case in the case library 20, the dynamic adaptation module 13 is activated. This module reads the preset solution template from the historical case and adapts the template according to the specific information of the current target task (i.e., context parameters), thereby generating a customized solution that can be executed directly.
[0038] Correspondingly, if the case retrieval module 12 fails to find a suitable historical case, the system will activate the real-time planning module 14. The core responsibility of this module is to call an externally or locally deployed large language model service 30 to perform real-time thinking and planning based on the current target task in order to generate a completely new solution.
[0039] Both the customized solutions generated by the dynamic adaptation module 13 and the entirely new solutions generated by the real-time planning module 14 are submitted to the tool execution engine 40. The tool execution engine 40, as a component responsible for securely interacting with various data sources within the enterprise (such as databases, data warehouses, application programming interfaces of business systems, etc.), executes specific data queries or operations according to the instructions in the solution and returns the results.
[0040] For the new solutions and their execution results generated by the real-time planning module 14, the quality assessment module 15 will conduct a comprehensive quality assessment to determine the effectiveness, accuracy, and reliability of the new solutions. Based on the assessment results, the case storage module 16 will ultimately decide whether to store this newly validated solution in the case library 20 for future query reuse.
[0041] As an optional implementation, the functions of the dynamic adaptation module 13 and the real-time planning module 14 can be integrated into a unified solution processing module. This solution processing module determines its internal execution path based on the output of the case retrieval module 12 (i.e., whether a historical case is hit): if a case is hit, the dynamic adaptation logic is executed; if a case is not hit, the real-time planning logic is executed.
[0042] Example 3
[0043] Based on Embodiments 1 and 2, and in conjunction with the accompanying drawings and examples, the data analysis method of the present invention is described in detail below:
[0044] First, the task acquisition module 11 receives natural language questions input by the user through the front-end interface, such as asking what the sales volume of East China was in the previous quarter.
[0045] Subsequently, case matching is performed. After receiving the target task, the case retrieval module 12 executes a retrieval operation. As a preferred implementation, this retrieval process can be based on semantic vector similarity. Specifically, the case retrieval module 12 first uses a text embedding model (such as Sentence-BERT) to perform semantic processing on the target task "What was the sales volume in East China last quarter?", generating a high-dimensional floating-point vector, i.e., the target vector. At the same time, each historical case stored in the case library 20 has its corresponding semantic vector pre-generated and stored. The case retrieval module 12 performs an approximate nearest neighbor search in the case library 20, calculating the cosine similarity or Euclidean distance between the target vector and all case vectors in the library. The system presets a similarity threshold (e.g., 0.9). If at least one historical case with a similarity score higher than this threshold is found, it is considered a successful match. For example, there may be a historical case in the library that has been generalized to "Query the sales volume of {time period} and {region}", whose semantics are highly relevant to the current question.
[0046] If the match is successful, the case reuse path is executed. At this point, the dynamic adaptation module 13 is invoked, which first retrieves a preset solution from the matched historical cases. In this embodiment, the solution is a parameterized template, such as a tool call chain containing placeholders, which can take the form get_sales(period='{time}',region='{area}'). Then, the dynamic adaptation module 13 extracts contextual parameters from the current target task "Query the sales figures for East China in the previous quarter?". This process can be achieved through named entity recognition technology or the structured information extraction capabilities of a large language model, resulting in the parameter mapping relationship: {time: 'previous quarter', area: 'East China'}. Next, the dynamic adaptation module 13 performs parameter rendering, filling the extracted values into the template to generate a fully instantiated, executable, customized solution: get_sales(period='Q3_2024', region='EastChina') (here it is assumed that the system internally resolves "previous quarter" to a specific date range or the identifier "Q3_2024"). Ultimately, the customized solution is sent to the tool execution engine 40 for execution. The tool execution engine 40 calls the corresponding internal data interface, queries the database, and returns sales data. The system integrates this data, generates the first analysis result, and presents it to the user. This path avoids complex real-time planning, resulting in extremely fast response times.
[0047] If the result indicates a mismatch, the standard data analysis path, i.e., the real-time planning path, is executed. This typically occurs when the system encounters a certain type of question for the first time, such as a new user asking "Statistics on the number of new users in Shanghai this year." In this case, the real-time planning module 14 is activated, sending the original question directly to the large language model service 30. The standard data analysis path, as follows... Figure 3 The example shown can employ a "think-act" cyclical model, including the following steps:
[0048] First, in step S131, the large language model service 30 plans and analyzes the intent of the question, deciding which tools(s) need to be invoked to answer it. For the question "Statistics on the number of new users in Shanghai since the beginning of this year", it generates a tool invocation plan.
[0049] Next, in step S132, the real-time planning module 14 hands over this plan to the tool execution engine 40 for execution. The tool execution engine 40 interacts with the background user database, executes queries, and returns a dataset containing the number of new users.
[0050] Then, in step S133, the real-time planning module 14 submits the dataset returned by the tool execution back to the large language model service 30, which analyzes and summarizes the results. The large language model service 30 generates a fluent natural language response based on the data, for example, the number of new users in Shanghai this year is 15,280.
[0051] Finally, in step S134, the large language model service 30 determines whether the task has been completed. For this simple query, a single call is sufficient; however, for more complex problems, multiple iterations of the "plan-execute-analyze" steps may be required. If the task is completed, the process ends, and the generated answer is presented to the user as the second analysis result.
[0052] After the standard data analysis path is completed, the entire interaction record it generates (including the original question, the generated new solution i.e. the tool call chain, the intermediate results of the tool execution, the final second analysis result, etc.) is not immediately discarded, but is passed to the quality assessment module 15 for automated assessment.
[0053] The automated evaluation, such as Figure 4 As shown, a multi-dimensional evaluation model is employed to ensure the quality of cases included in the database. The evaluation process includes at least the following three aspects:
[0054] Step S141: Rule Layer Check. At this level, the system performs basic, deterministic checks. For example, it checks whether all tool calls in the solution return successfully (i.e., checks the status codes returned by the tool execution engine 40), and also checks whether the returned data is not empty, to avoid storing invalid solutions that were executed successfully but did not find any data in the case library.
[0055] Step S142: Data Layer Check. At this layer, the system delves into the internals of the returned data to verify its structure and business logic. For example, it can verify whether the structure of the returned data conforms to predefined specifications (i.e., data schema check), and it can also perform a rationality check on the business logic (e.g., metrics such as the number of new users and sales revenue should not be negative). These checks help filter out cases where execution is successful but the data content is obviously incorrect.
[0056] Step S143: AI Layer Check. At this layer, a deeper semantic and logical evaluation is performed using another large language model (or the same model but with specialized evaluation instructions). The evaluation model receives the original question, the final answer, and the raw data returned by the tool, and evaluates two key points: relevance, i.e., whether the final answer accurately addresses the original question; and fidelity, i.e., whether the final answer is strictly based on the data returned by the tool and does not contain fabricated or illusory information. For example, the evaluation model might determine whether the answer "Since the beginning of this year, the number of new users in Shanghai has been 15,280" is highly relevant to the question "Statistics on the number of new users in Shanghai since the beginning of this year," and whether the number "15,280" does indeed originate from the data returned by the tool.
[0057] After completing the three-layer checks, in step S144, the quality assessment module 15 calculates a comprehensive confidence score based on the results of each layer's checks. Weights can be assigned to each assessment dimension; for example, the rule layer has a weight of 0.4, the data layer 0.3, and the AI layer 0.3. Each layer of checks earns 1 point if it passes and 0 points if it fails. The comprehensive score is obtained by weighted summation. A case where all three layers pass has a comprehensive score of [insert score here]. .
[0058] Finally, in step S145, the system judges and categorizes cases based on the overall score, corresponding to preset entry conditions. The system can set two scoring thresholds: a high threshold (e.g., 0.9) and a low threshold (e.g., 0.6). If the overall score is higher than the high threshold, it is judged as a high-quality case and enters the "automatic approval" process; if the score is lower than the low threshold, it is judged as a failure and the case will be discarded directly; if the score is between the high and low thresholds, it enters the "pending review" state.
[0059] Cases that are automatically approved or pending review should be added to the case database. For example... Figure 5 As shown, for cases whose automated evaluation scores fall between the high and low thresholds and are considered "pending review," the system will send them to a dedicated human review platform or terminal. Data analysis experts or domain experts can view the complete interaction log on this platform and make a final judgment. If the expert deems the case valuable, they will issue an approval instruction indicating that the review has been passed through the interface.
[0060] Upon receiving an automatic approval signal or an approval instruction from a human review terminal, the case entry module 16 will execute subsequent entry processing. This successful interaction is processed and transformed into a reusable historical case. This process includes: generalizing the original question, extracting its core intent to generate a semantic summary; abstracting the specific tool call chain into a parameterized template, and generating a semantic vector for retrieval of the case.
[0061] Finally, this processed new historical case, containing the solution template and semantic vector, was officially stored in case library 20. At this point, the system completed a full self-learning process. When users subsequently ask questions like "querying new users in Beijing last year," the system will be able to successfully match this newly added case through the matching and judgment steps, providing a quick and accurate answer.
[0062] Example 4
[0063] This embodiment is a variant of embodiments 1 to 3, designed to enhance the system's ability to process structured queries with complex intents (such as comparisons and summaries). Its main improvement lies in upgrading a single vector retrieval to a hybrid retrieval mode, and upgrading simple parameter-filling adaptation to logical adaptation that supports conditional judgments.
[0064] In this embodiment, the case retrieval module 12 is enhanced to form a "hybrid retrieval module." When performing case matching, this module no longer relies solely on overall semantic vector similarity. Instead, it first performs a more detailed analysis of the user's question, extracting key business terms (such as "sales revenue" and "profit margin"), entities (such as "East China" and "North China"), and intent indicators (such as "comparison" and "summary"). Then, it performs preliminary screening using a preset rule base and keyword index to quickly locate several potentially relevant candidate case categories, such as "sales revenue comparison cases." Based on this, vector similarity calculation is performed to achieve more precise matching within a narrowed scope. It is understandable that this hybrid retrieval mode, combining "keyword + rule" coarse screening with vector fine-tuning, significantly improves the accuracy and efficiency of retrieving complex structured queries.
[0065] Correspondingly, the dynamic adaptation module 13 has been upgraded to a more powerful "solution adapter". More importantly, the structure of the solutions stored in the case library 20 has also changed. It is no longer a single linear tool call chain template, but a structured object that can contain conditional branching logic, such as a logic tree or a script. This logic can determine the execution of different branches based on different input parameters.
[0066] Now, suppose a user asks: "Compare the sales volume and profit margin in East China and North China last month."
[0067] First, the hybrid search module extracts keywords such as "comparison," "sales volume," and "profit margin," as well as regional entities such as "East China" and "North China," to accurately match the aforementioned historical cases of "multi-indicator cross-regional comparison."
[0068] Subsequently, the solution adapter receives the solution containing the conditional branching logic and the context parameters extracted from the current task. The adapter begins to parse the logic tree. Since the region list in the current context parameter contains two elements, the condition is true, so the adapter chooses to execute the logic path in the then branch.
[0069] This path consists of two actions: The first is a loop that iterates through the `regions` list, dynamically generating and executing a `get_metrics` call for each region. Specifically, it generates and schedules the execution of `get_metrics(region='East China', metrics=['Sales Revenue', 'Profit Margin'], time='Last Month')` and `get_metrics(region='North China', metrics=['Sales Revenue', 'Profit Margin'], time='Last Month')`. The second action, after the loop completes, calls the `compare_data` tool, using the results of the first two calls as input, to merge and compare the data.
[0070] In this way, the solution adapter selects the appropriate logical path from the preset conditional branching logic based on context parameters, dynamically generating a complex workflow that includes multiple tool calls and one data merging. This customized solution is then executed by the tool execution engine 40, ultimately generating an analysis result that compares sales and profit margins in East China and North China.
[0071] Compared with any of Embodiments 1 to 3, this embodiment introduces a solution that includes conditional branching logic and a corresponding logic adapter, so that the reuse of historical cases is no longer limited to simple parameter replacement, but can handle more complex business logic that depends on changes in input parameters, thereby greatly expanding the scope and capability of case reuse.
[0072] Example 5
[0073] This embodiment is an improvement based on embodiment 1 or embodiment 4. Its core idea is to incorporate user feedback signals into the quality assessment system, thereby forming a human-machine combined assessment closed loop that is closer to the user's actual value judgment.
[0074] To achieve this, the system adds a feedback component to the user interface that presents the first analysis result (from the case reuse path) or the second analysis result (from the real-time planning path). This component can be designed as a simple "like" and "dislike" button, a five-star rating system, or a feedback box that allows users to enter text comments.
[0075] At the same time, such as Figure 2 As shown, a "user feedback processing unit" has been added inside the quality assessment module 15. This unit is responsible for listening to and receiving user feedback signals from the front-end interface.
[0076] Once the system generates a new solution through real-time path planning and provides a second analysis result, the automated evaluation process proceeds as described in Example 1. However, the final inclusion decision no longer relies solely on the comprehensive confidence score calculated by the automated evaluation.
[0077] In this embodiment, the specific workflow may include:
[0078] Suppose the system generates a solution to a new problem through real-time path planning. After automated evaluation by the rule layer, data layer, and AI layer, if the calculated comprehensive confidence score falls within a set threshold range, it indicates that the score is in the pending review range. For example, the calculated comprehensive confidence score is 0.7. According to the thresholds set in Example 1 (high threshold 0.9, low threshold 0.6), this score is in the pending review range.
[0079] At this point, the user sees the analysis results provided by the system on the front-end interface and finds them very accurate and useful, so they click the "Like" button. The user feedback processing unit captures this "Like" signal. The system can convert this clear positive feedback into an additional evaluation score or a higher positive weight. For example, a "Like" can add 0.25 points to the overall score, so the final score for this case is updated to 0.7 + 0.25 = 0.95.
[0080] The new final score of 0.95 is higher than the automatic approval threshold of 0.9. Therefore, the quality assessment module 15 will directly classify the case as "automatically approved" and notify the case entry module 16 to perform the entry operation. Conversely, if the user clicks the "dislike" button, the system can introduce a large negative weight to the score, such as subtracting 0.5 points, making the final score 0.25, thus directly classifying it as "failed / discarded". In another optional strategy, a "dislike" can directly trigger the "send to human review" process, regardless of its automatic assessment score, so that experts can review and identify potential problems.
[0081] In this way, user feedback is used as one of the bases for determining the quality assessment results. A case with a medium score in the automated assessment may have its entry priority increased if it receives positive feedback from users; while a case with a seemingly high score in the automated assessment may have its entry probability greatly reduced if it receives negative feedback from users, and may even be marked as a problem case.
[0082] This embodiment incorporates user feedback, ensuring that the optimization direction of the case library is strongly correlated with user satisfaction. This guarantees that the selected historical cases are not only technically correct but also have practical value for users' businesses, effectively improving the system's usability and user stickiness.
[0083] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0084] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A data analysis method based on case-based self-learning, characterized in that, include: The target task is to obtain user input; Based on the target task, a search is conducted in a preset case library to determine if there are corresponding historical cases, which include preset solutions. If a corresponding historical case is found, context parameters are extracted according to the target task, and the solutions in the historical case are adapted using the context parameters to generate a customized solution. A first analysis result is then generated based on the customized solution. If no corresponding historical case is found, a new solution is generated in real time through a large language model, and the new solution is executed to generate a second analysis result. A quality assessment is performed on the new solution generated through the real-time planning and the second analysis results; When the results of the quality assessment meet the preset storage conditions, the new solution is stored as a new historical case in the case library. The quality assessment includes: automatically assessing the execution process of the new solution and the second analysis results from at least two preset assessment dimensions to obtain assessment results for each dimension; the assessment dimensions include AI layer inspection dimensions, using another large language model to perform deeper semantic and logical assessments, including relevance assessment and fidelity assessment. The fidelity assessment determines whether the second analysis result is strictly based on the data returned by the tool. The preset entry conditions include: calculating a comprehensive score based on the evaluation results of each dimension, and the comprehensive score meeting a preset scoring threshold.
2. The data analysis method based on case-based self-learning according to claim 1, characterized in that, The step of searching the preset case library for the existence of a corresponding historical case includes: The target task is semantically vectorized to obtain the target vector; In the case library, vector similarity retrieval is performed based on the target vector to determine whether there are any historical cases that match the target task.
3. The data analysis method based on case-based self-learning according to claim 1, characterized in that, The adaptation of solutions from historical cases using the context parameters includes: The solutions from the historical cases are used as parameterized templates, and the context parameters extracted from the target task are filled into the parameterized templates to generate the customized solution.
4. The data analysis method based on case-based self-learning according to claim 1, characterized in that, The solutions in the historical cases included conditional branching logic; The step of adapting the solution in the historical case using the context parameters includes: selecting the appropriate logical path in the conditional branch logic according to the context parameters to generate the customized solution.
5. The data analysis method based on case-based self-learning according to claim 1, characterized in that, The evaluation dimensions also include: The rule layer inspection dimension is used to verify whether the tool call status or returned data contained in the new solution conforms to preset rules; The data layer inspection dimension is used to verify whether the structure or business logic of the data on which the second analysis result is based conforms to the preset specifications.
6. The data analysis method based on case-based self-learning according to claim 1, characterized in that, Also includes: When the overall score is between the preset first threshold and the second threshold, the new solution is sent to the manual review terminal; When an approval instruction indicating that the review has been passed is received from the manual review terminal, the new solution is stored as a new historical case in the case library.
7. The data analysis method based on case-based self-learning according to claim 1, characterized in that, Also includes: Obtain user feedback regarding the first or second analysis results; When conducting the quality assessment, user feedback is used as one of the bases for determining the quality assessment results.
8. A data analysis system based on case-based self-learning, characterized in that, include: The task acquisition module is used to acquire the target task input by the user; The case retrieval module is used to search in a preset case library for the existence of corresponding historical cases based on the target task, wherein the historical cases include preset solutions; The solution processing module is used to extract context parameters according to the target task if a corresponding historical case is found, and to adapt the solution in the historical case using the context parameters to generate a customized solution, and to generate a first analysis result based on the customized solution. If no corresponding historical case is found, the large language model is invoked for real-time planning to generate a new solution, and the new solution is executed to generate a second analysis result. A quality assessment module is used to assess the quality of the new solution generated through the real-time planning and the second analysis result. The case entry module is used to store the new solution as a new historical case in the case library when the result of the quality assessment meets the preset entry conditions. The quality assessment includes: automatically assessing the execution process of the new solution and the second analysis results from at least two preset assessment dimensions to obtain assessment results for each dimension; the assessment dimensions include AI layer inspection dimensions, using another large language model to perform deeper semantic and logical assessments, including relevance assessment and fidelity assessment. The fidelity assessment determines whether the second analysis result is strictly based on the data returned by the tool. The preset entry conditions include: calculating a comprehensive score based on the evaluation results of each dimension, and the comprehensive score meeting a preset scoring threshold.
Citation Information
Patent Citations
Method for automatically recommending interpretable method for machine learning model
CN116301741A
Historical legal case similarity recommendation method based on big data analysis
CN118210915A