Rule determination method, computing device and machine readable storage medium
By extracting cognitive behavior sequences from user operation flows to generate rules, the problems of rigid rules and insufficient understanding of deep logic in traditional methods are solved, realizing the automatic generation and digitization of rules, and improving the efficiency and quality control of knowledge management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to effectively transform the tacit experience of domain experts into reusable and executable explicit rules, leading to a 'cognitive gap' problem in knowledge management and inheritance. Traditional manual rule writing is costly, static text analysis lacks deep logical understanding, and user behavior analysis cannot reconstruct the internal logical chain of decision-making.
By determining cognitive behavior sequences based on user operation flow, generating target rules using semantic recognition and labeled events, and achieving automated rule generation, the cost of creation and maintenance is reduced. This allows for adaptation to complex behavioral logic, breaks down the disconnect between user operation logs and cognitive reasoning, and creates a complete cognitive model for digital experts.
It enables the automated generation and digitization of rules, reduces the cost of rule creation and maintenance, improves the ability to judge complex situations, solves the problem of 'cognitive gap' in knowledge management, and supports the operational efficiency and quality control of knowledge-intensive industries.
Smart Images

Figure CN121835855A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of knowledge engineering and artificial intelligence, specifically to a rule determination method, a computing device, and a machine-readable storage medium. Background Technology
[0002] In knowledge-intensive industries, transforming the tacit experience of domain experts into reusable and executable explicit rules is crucial for improving operational efficiency and quality control. Currently, the technological path to achieving this goal faces three major bottlenecks. First, traditional manually written rule-making, while logically clear, suffers from rigidity, extremely high creation and maintenance costs, and difficulty in capturing complex, non-linear decision-making logic. Second, while static text analysis tools utilizing technologies like natural language processing can achieve a degree of automation, their analysis is often limited to surface features, lacking an understanding of deep semantic relationships and contextual logic between text elements, resulting in insufficient judgment of complex situations. Finally, although user behavior analysis platforms can record expert operation logs, these discrete "atomic operations" are severely disconnected from the "cognitive reasoning process" in the expert's mind, making it impossible to reconstruct the internal logical chain of their decisions. This prevents the effective capture and digitization of the expert's core value—their complete cognitive model of problem identification, analysis, and judgment verification—creating the most critical "cognitive gap" problem in knowledge management and inheritance. Therefore, the industry urgently needs a new paradigm that can penetrate surface operations and reach the core cognitive logic in order to achieve the accurate extraction and automated accumulation of expert experience. Summary of the Invention
[0003] In view of the above-mentioned shortcomings of the prior art, the purpose of the embodiments of this application is to provide a rule determination method, a computing device, and a machine-readable storage medium.
[0004] To achieve the above objectives, the first aspect of this application provides a rule determination method, comprising: Determine the sequence of cognitive behaviors based on the user's input flow; Upon receiving labeled events as input, the target behavior sequence in the cognitive behavior sequence is determined based on the labeled events; If the target behavior sequence meets the preset sequence specification, target rules are generated based on the target behavior sequence and labeled events.
[0005] In this embodiment of the application, determining the cognitive behavior sequence based on the input user operation flow includes: The input user operation stream is time-sequentially segmented into multiple operation segments; Extract the operation objects from each operation segment; The semantic recognition mechanism is used to process each operation segment to obtain the semantic tags of each operation segment; For each operation segment, generate behavior units based on the operation object and semantic tags; All behavioral units are aggregated and encapsulated into a cognitive behavioral sequence in chronological order.
[0006] In this embodiment of the application, determining the target behavior sequence in the cognitive behavior sequence based on labeled events includes: The number of backtracking operands is determined based on a preset multiple of the preset average number of operands; Based on the location of the labeled event, the cognitive behavior sequence is traced back according to the backtracking operand to obtain the target behavior sequence.
[0007] In this embodiment of the application, the rule determination method further includes: Determine the degree of unit correlation between adjacent behavioral units in the target behavioral sequence; The logical coherence measure of the target behavior sequence is determined based on the correlation of all units; If the logical coherence metric is greater than the preset coherence threshold, the target behavior sequence is determined to meet the preset sequence specification.
[0008] In this embodiment of the application, target rules are generated based on target behavior sequences and labeled events, including: Extract semantic information and event feature information of labeled events from the target behavior sequence. The semantic information includes the semantic labels and operation objects of each behavior unit in the target behavior sequence. Target rules are generated based on semantic information and event feature information.
[0009] In this embodiment of the application, the rule determination method further includes: Extract the semantic labels and operation objects of each behavioral unit in the target behavioral sequence; For each behavioral unit: The semantic tags are standardized to obtain standardized semantic tags; The type of the operation object is abstracted to obtain the abstract object type; Based on standardized semantic tags and abstract object types, generate abstract units corresponding to behavioral units; Based on the temporal sequence of each behavioral unit in the target behavioral sequence, all abstract units are integrated into a behavioral template.
[0010] In this embodiment of the application, the rule determination method further includes: Initiate an audit request corresponding to the target rule; Once the approval information is obtained, the steps of extracting the semantic tags and operation objects of each behavioral unit in the target behavioral sequence are performed. Associate the target behavior sequence, behavior template, and target rules.
[0011] In this embodiment of the application, the rule determination method further includes: Determine whether the target rule is a historical rule that already exists; When the target rule is a historical rule, obtain the historical behavior template associated with the historical rule; Determine the template matching degree between the behavior template and historical behavior templates; If the template matching degree is less than or equal to the preset matching threshold, the target behavior sequence and behavior template will be associated with historical rules. If the template matching degree is greater than the preset matching threshold, the behavior template will be associated with the historical behavior template.
[0012] A second aspect of this application provides a computing device, comprising: The memory is configured to store instructions; The processor is configured to retrieve instructions from memory and, when executing instructions, to implement the rule determination method as described in the above embodiments.
[0013] A third aspect of this application provides a machine-readable storage medium storing instructions that cause a machine to perform the rule determination method as described in the above embodiments.
[0014] The above technical solution determines the cognitive behavior sequence based on the input user operation flow; upon receiving labeled events, it determines the target behavior sequence within the cognitive behavior sequence based on the labeled events; and if the target behavior sequence meets the preset sequence specifications, it generates target rules based on the target behavior sequence and labeled events. This solves the problems of high cost and rigidity in traditional manual rule writing. By extracting cognitive behavior sequences from user operation flows to generate rules, it achieves automated rule generation, reduces rule creation and maintenance costs, and can adapt to complex behavioral logic. It also compensates for the lack of deep logical understanding in static text analysis by generating rules based on the temporal logic of the target behavior sequence and the characteristics of labeled events, ensuring that rules reflect the deep relationship between behavior and events and improving the judgment of complex situations. Furthermore, it breaks down the disconnect between user operation logs and the cognitive reasoning process, restoring the internal logical chain of expert decision-making through cognitive behavior sequences, effectively capturing and digitizing the expert's complete cognitive model, solving the "cognitive gap" problem in knowledge management and inheritance, and achieving efficient transformation of expert implicit experience into reusable explicit rules, supporting the improvement of operational efficiency and quality control in knowledge-intensive industries.
[0015] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0016] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings: Figure 1 The illustration shows a flowchart of a rule determination method according to an embodiment of this application; Figure 2 A schematic diagram illustrating a rule determination method according to another embodiment of this application is shown. Figure 3 A schematic block diagram of a computing device according to an embodiment of this application is shown. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0018] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0019] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0020] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0021] It should be noted that, addressing the core pain point in knowledge-intensive industries where tacit expert experience is difficult to transform into reusable explicit rules, and solving the "cognitive gap" problem caused by the high cost of traditional manual rule writing, the lack of deep logical understanding in static text analysis, and the inability of user behavior analysis to reconstruct the decision-making cognitive chain, this embodiment provides a rule determination method. It fills the gap in existing technologies for accurately capturing and digitizing complete expert cognitive models, and meets the industry's urgent need for efficient extraction and automated accumulation of expert experience. The rule determination method in this embodiment provides a necessary path for achieving the technological leap from "recording surface operations" to "understanding deep cognition," and is key to realizing the automated accumulation and reuse of expert experience.
[0022] Figure 1 The illustration schematically shows a flowchart of a rule determination method according to an embodiment of this application. Figure 1 As shown in the figure, this application provides a rule determination method, which may include the following steps: Step 100: Determine the cognitive behavior sequence based on the input user operation flow; In this embodiment, it should be noted that the original user operation flow is a low-level, discrete set of actions without clear semantics, which cannot directly reflect the user's cognitive intent. It must be structured to provide a foundation for subsequent analysis. A user operation flow refers to a series of atomic operations generated by a user during interaction with a digital document, such as clicking the table of contents, scrolling the page, selecting text, and adding annotations. These operations themselves only represent physical interactions, and their inherent cognitive purpose is hidden. A cognitive behavior sequence refers to a sequence with clear semantics and logical connections. There are various ways to determine a cognitive behavior sequence. For example, user operation flows can be segmented using preset time interval thresholds and encapsulated into cognitive behavior sequences using predefined semantic mapping tables. Alternatively, machine learning models can be used to analyze context and operation features, such as speed, trajectory, and pauses, to dynamically infer user intent boundaries and perform more intelligent and adaptive behavior segmentation and annotation. Furthermore, based on the macro-level task type currently being performed by the user, such as "contract review" or "code debugging," task templates can be used to guide and assist in the construction and understanding of cognitive behavior sequences. In complex interactive environments, multiple modalities of input signals, such as voice, handwriting, and eye movement, can be comprehensively processed to jointly make decisions and construct more accurate and richer cognitive behavior sequences.
[0023] Specifically, in one embodiment, determining a sequence of cognitive behaviors based on the input user action flow includes: The input user operation stream is time-sequentially segmented into multiple operation segments; Extract the operation objects from each operation segment; The semantic recognition mechanism is used to process each operation segment to obtain the semantic tags of each operation segment; For each operation segment, generate behavior units based on the operation object and semantic tags; All behavioral units are aggregated and encapsulated into a cognitive behavioral sequence in chronological order.
[0024] In this embodiment, it is important to note that transforming continuous and unstructured raw user operations into discrete and semantically rich cognitive behavioral components is a fundamental prerequisite for achieving the leap from operation recording to cognitive understanding. Temporal segmentation first performs preliminary segmentation of the user operation flow, based on the time interval characteristics between operations. When the interval between consecutive operations exceeds a preset threshold, a cognitive segment is considered to have ended and a new segment to begin. For example, in document review, a user quickly and continuously checking multiple checkboxes can be considered an operation segment, while a prolonged pause followed by text input is considered the beginning of another segment. In one embodiment, operation segments can be segmented based on the time interval between operations, changes in operation type, or changes in operation goals.
[0025] After the segmentation is completed, the specific objects that each operation segment affects are extracted. These objects include clicked clause titles, selected text paragraphs, and annotated images or tables.
[0026] In one embodiment, each operation segment is processed through a semantic recognition mechanism to obtain a semantic label for each operation segment. This can be achieved by assigning a cognitive-level semantic label to each segment according to a preset semantic mapping rule, which establishes a correspondence between low-order operation patterns and high-order cognitive behaviors. For example, when an operation segment contains both "long-term dwell" and "text highlighting" features, its semantic label can be determined as "deep focus"; when an operation segment exhibits "rapid switching between two different document regions" accompanied by "creating a connection line," it can be mapped to the label "association analysis."
[0027] In another embodiment, each operation fragment is processed through a semantic recognition mechanism to obtain semantic labels for each fragment. This can be achieved by using a large language model to assign cognitive-level semantic labels to each operation fragment. The large language model analyzes the features, context, and temporal relationships of the operation fragments to understand their underlying cognitive intent. For example, when an operation fragment contains both "long-term dwell" and "text highlighting" features, the large language model infers that this is a "deep focusing" behavior; when an operation fragment exhibits "rapid switching between two different document regions" accompanied by "creating a connection line," the large language model identifies this as a "relational analysis" behavior. The large language model can flexibly understand complex operation patterns and adapt to the operating habits of different users.
[0028] In software interface review scenarios, the repeated clicking and status recording of a button by a tester can be assigned the semantic tag "functional verification." In academic literature review, the continuous extraction and comparison of abstracts from multiple documents can be mapped to the "cross-citation" tag. Ultimately, the semantic tags and operation objects corresponding to each operation segment are combined and encapsulated into a complete behavioral unit, and aggregated chronologically to form a cognitive behavior sequence.
[0029] In this embodiment, through a standardized and structured processing flow, the messy raw operational data is transformed into a sequence of behavioral units with a unified format and clear semantics, providing standardized and computable data input for subsequent cognitive logic analysis and rule derivation.
[0030] Step 200: Upon receiving an input labeled event, determine the target behavior sequence in the cognitive behavior sequence based on the labeled event; It's important to note that not all user behaviors are relevant to the final risk assessment. It's crucial to pinpoint the cognitive process upon which the decision is based by annotating events, thus focusing the analysis. Since cognitive behavior sequences may contain numerous operations unrelated to a specific task, while annotated events often point to the core task or key event the user is focused on, it's necessary to filter relevant target behavior sequences from the cognitive behavior sequence based on these annotated events. Upon receiving an annotated event, its core elements must first be identified. For example, in a problem-solving scenario, the annotated event might be "find the roots of equation X=0," with core elements including "equation X=0" and "find the roots." Then, based on these core elements, the cognitive behavior sequence is matched to filter out behavioral units related to these core elements. For example, behavioral units related to "equation X=0" include "inputting the equation" and "analyzing the equation structure," while behavioral units related to "finding the roots" include "applying the root-finding formula" and "calculating the result." Finally, these filtered behavioral units are integrated in their original time sequence to form the target behavior sequence. In contract review scenarios, if the event is marked as "identifying the risk of unequal rights and responsibilities", then behavioral units related to "liability clauses" and "compensation clauses" can be filtered to form a target behavior sequence.
[0031] Specifically, in one embodiment, determining the target behavior sequence in the cognitive behavior sequence based on labeled events includes: The number of backtracking operands is determined based on a preset multiple of the preset average number of operands; Based on the location of the labeled event, the cognitive behavior sequence is traced back according to the backtracking operand to obtain the target behavior sequence.
[0032] It should be noted that in this embodiment, an adaptive backtracking mechanism based on historical case statistics is adopted, and the backtracking range is determined based on the operands to ensure that the target behavior sequence and the labeled event have a strong correlation and exclude interference from irrelevant historical operations.
[0033] Specifically, the system continuously records and stores every historical "labeled event" and its corresponding "target behavior sequence" confirmed by experts. For each historical case, the system records the number of operation units traced back from the point of the labeled event to the starting point of the relevant operation. By statistically analyzing a large number of historical cases, the average number of backtracking operations N is calculated. For example, in a contract review scenario, by analyzing 100 historical cases, it was found that before labeling "risk of unequal rights and responsibilities," lawyers would perform an average of 12 related cognitive behavior units, such as "viewing liability clauses," "comparing compensation clauses," and "searching relevant regulations," so N=12. When a new labeled event occurs, the system does not use a fixed backtracking length, but rather a preset multiple of the historical average number of operations N as the number of operations for this backtracking. For example, the preset multiple is 2, meaning 2N operation units are traced back. In the contract review example above, when the lawyer labels a new "risk of unequal rights and responsibilities," the system will trace back 24 operation units (2×12=24) from the labeled point, forming the target behavior sequence for this analysis. Choosing a multiple of 2 is to cover sufficient context while avoiding the introduction of too much irrelevant noise. This preset multiplier can also be adjusted according to the actual application scenario. For example, in scenarios with relatively fixed operation modes, 1.5x can be used; in scenarios with significant changes in operation modes, 2.5x or 3x can be used, etc.
[0034] Understandably, in historical cases, some users operate quickly while others operate slowly, but the number of steps in the cognitive logic is relatively stable. By using the number of operations as a benchmark to determine the backtracking range, we can adapt to the differences in operation speed among different users; and we can continuously optimize as historical cases accumulate, making the backtracking range more accurate; and we have good adaptability in different business scenarios.
[0035] It should be noted that, in one embodiment, the cognitive behavior sequence corresponding to a preset time window can be traced back based on the occurrence time of the labeled event, and this sequence can be identified as the target behavior sequence. This ensures a strong correlation between the target behavior sequence and the labeled event, excluding interference from irrelevant historical operations, and is particularly suitable for scenarios where the operation flow is long and contains a large number of non-core operations. First, the occurrence time of the labeled event needs to be clearly defined; for example, in a financial risk control scenario, the labeled event is "identifying the fraud risk of a transaction," and its occurrence time is the moment when the system triggers a risk warning; in an educational problem-solving scenario, the labeled event is "confirming the correct solution to a math problem," and its occurrence time is the moment when the user submits the final answer. Next, a preset time window is obtained; the length of the preset time window needs to be determined based on the operational characteristics of the specific scenario: for example, in a financial risk control scenario, transaction-related operations such as viewing counterparty information, verifying transaction amounts, and verifying transaction passwords are usually completed in a short time, so a 5-minute time window can be set; in an educational problem-solving scenario, users may need to go through steps such as reading the question, calculating, and verifying, so the time window can be extended to 30 minutes. Subsequently, using the time of the marked event as the endpoint, all operations within the preset time window are traced back to extract the corresponding cognitive behavior sequences. These cognitive behavior sequences within the preset time window are then identified as the target behavior sequences.
[0036] In some embodiments, a shorter time window can be set for a certain stage of the labeling event, such as 120 seconds. Before labeling the risk of the contract payment terms, the user may have performed cognitive behaviors such as reading the payment terms in depth, comparing the breach of contract liability terms, and consulting relevant laws and regulations. These behavioral units constitute the target behavior sequence corresponding to this risk assessment in the order of their occurrence.
[0037] In this embodiment, the scope of behaviors related to the labeled event is precisely defined by a preset time window, avoiding the inclusion of irrelevant operations outside the time window into the target sequence. This ensures that the target behavior sequence closely reflects the core cognitive process before and after the labeled event, providing a high-quality behavioral data foundation for the subsequent generation of accurate target rules.
[0038] Step 300: If the target behavior sequence meets the preset sequence specification, generate target rules based on the target behavior sequence and labeled events.
[0039] It should be noted that the target behavior sequence must conform to certain specifications to ensure the validity of the cognitive logic it reflects. Furthermore, only behavior sequences that conform to these logical specifications have the value of being generalized into general rules. In this embodiment, a validity verification mechanism is established to ensure the quality and reliability of the generated rules. The preset sequence specifications are the criteria used to determine whether the target behavior sequence is valid. Based on valid target behavior sequences and labeled event generation rules, this is a necessary step in transforming implicit cognitive experience into reusable explicit standards.
[0040] Generating target rules based on target behavior sequences and labeled events can be achieved in several ways: For example, multiple rule templates can be pre-set, using a "if [condition] then [conclusion]" framework. When generating rules, key elements are extracted from the target behavior sequence as conditions, and risk types are extracted from the labeled events as conclusions. Alternatively, the target behavior sequence can be transformed into a logical relationship graph, with nodes representing operation objects and edges representing semantic labels. Path patterns in the graph can be analyzed and transformed into rule conditions. Another approach is to treat the current target behavior sequence and labeled events as a new case and perform similarity matching with existing cases in the rule base. After finding similar cases, the corresponding rules are adaptively modified to generate target rules suitable for the new situation. Finally, structured target behavior sequences and labeled information can be used as input, and a pre-trained language model can generate rule text that conforms to human expression habits.
[0041] Specifically, in one embodiment, generating target rules based on the target behavior sequence and labeled events includes: Extract semantic information and event feature information of labeled events from the target behavior sequence. The semantic information includes the semantic labels and operation objects of each behavior unit in the target behavior sequence. Target rules are generated based on semantic information and event feature information.
[0042] It should be noted that generating target rules is a necessary step in combining structured behavioral logic with the core features of the scenario and making implicit experience explicit. In this embodiment, extracting semantic information from the target behavior sequence is the data preparation stage of the entire process. The key is to parse the semantic labels and operation objects from each behavioral unit. These elements together constitute the entity and relationship network of the user's cognitive logic. Among them, the semantic labels need to reflect the core operational intent of the behavioral unit, and the operation object is the specific content directly affected by the behavior. For example, in the contract review scenario, the target behavior sequence may include behavioral units such as "search clause (liability exemption clause)", "verification clause (compensation clause)", and "reference to legal provisions (Article 114 of the Contract Law)", with corresponding semantic labels of "search clause", "verification clause", and "reference to legal provisions", and operation objects of "liability exemption clause", "compensation clause", and "Article 114 of the Contract Law". Extracting event feature information of the labeled event, this information needs to reflect the core attributes of the labeled event and the scenario goal. For example, in the contract review scenario, if the labeled event is "contract rights and responsibilities risk identification", then the event feature information includes "risk type: risk of unequal rights and responsibilities" and "related field: contract clause review".
[0043] In one embodiment, a rule template engine can be used to input semantic information and event feature information into the rule template engine to generate target rules.
[0044] Specifically, the rule template engine needs to include a general template structure that adapts to different domains. For example, a template could be generated if the target behavior sequence contains [semantic label 1 + operation object 1] → [semantic label 2 + operation object 2] and the event features are labeled as [feature 1 + feature 2]. In the above contract review scenario, the extracted information can be combined to generate a target rule that triggers if the target behavior sequence contains [retrieval clause (liability exemption clause) → verification clause (compensation clause, result is missing) → reference legal provision (Article 114 of the Contract Law)].
[0045] In another embodiment, the logical reasoning capabilities of a large language model can be utilized to comprehensively analyze the following three aspects of input information to generate target rules: The first input is the target behavior sequence, which describes what the expert "did". For example, in a contract review scenario, the target behavior sequence may include behavioral units such as "searching for clauses (liability exemption clauses) → verifying clauses (compensation clauses) → referring to legal provisions (Article 114 of the Contract Law)". Each behavioral unit contains a semantic label (such as "searching for clauses") and an operation object (such as "liability exemption clauses").
[0046] The second input is the text content associated with the target behavioral sequence, describing what the expert "looked at." The system extracts the specific document content that the expert viewed, annotated, or manipulated while performing the aforementioned behavioral sequence. For example, when "searching for clauses (exclusion clauses)," the expert actually looks at the specific clause in the contract text that states "Party B shall not be liable for losses caused by force majeure"; when "verifying clauses (compensation clauses)," the expert looks at the specific clause that states "Party B's compensation is capped at 10% of the contract amount."
[0047] The third input is the labeled event, which describes what risks the expert labeled. For example, the expert ultimately labeled "risk of unequal rights and responsibilities: excessively broad exemption from liability but too low compensation limit". The big language model comprehensively analyzes the above three aspects of information, performs logical reasoning, and generates a structured target rule. This rule can adopt an "IF-THEN" structure. For example, the IF part describes the triggering conditions (based on behavioral patterns and text features), and the THEN part describes the risk conclusion. For example: "IF When reviewing the contract, the following patterns were found: (1) There are liability exemption clauses in the contract, and the scope of exemption is broad (such as including common situations such as force majeure); (2) There are compensation clauses in the contract, but the compensation limit is significantly lower than industry practice (such as less than 30% of the contract amount); (3) There is an unequal relationship between the rights and responsibilities between the two types of clauses, THEN triggers 'risk of unequal rights and responsibilities', and it is recommended that either the scope of liability exemption be narrowed or the compensation limit be increased."
[0048] In this embodiment, a cognitive behavior sequence is determined based on the input user operation flow; upon receiving an input labeled event, a target behavior sequence is determined based on the labeled event; and if the target behavior sequence meets a preset sequence specification, a target rule is generated based on the target behavior sequence and the labeled event. This solves the problems of high cost and rigidity in traditional manual rule writing. By extracting cognitive behavior sequences from the user operation flow to generate rules, rule generation is automated, reducing the cost of rule creation and maintenance, and adapting to complex behavioral logic. It also compensates for the lack of deep logical understanding in static text analysis by generating rules based on the temporal logic of the target behavior sequence and the characteristics of labeled events, ensuring that the rules reflect the deep relationship between behavior and events, and improving the judgment of complex situations. Furthermore, it breaks down the disconnect between user operation logs and cognitive reasoning processes by restoring the internal logical chain of expert decision-making through cognitive behavior sequences, effectively capturing and digitizing the expert's complete cognitive model, solving the problem of "cognitive gaps" in knowledge management and inheritance, and achieving efficient transformation of expert implicit experience into reusable explicit rules, supporting the improvement of operational efficiency and quality control in knowledge-intensive industries.
[0049] In one embodiment, the rule determination method further includes: Determine the degree of unit correlation between adjacent behavioral units in the target behavioral sequence; The logical coherence measure of the target behavior sequence is determined based on the correlation of all units; If the logical coherence metric is greater than the preset coherence threshold, the target behavior sequence is determined to meet the preset sequence specification.
[0050] In this embodiment, it is important to note that ensuring the target behavior sequence used to generate rules possesses inherent logical rationality and cognitive credibility can prevent accidental or chaotic operation sequences from being misjudged as valid expert experience. Determining the unit correlation is fundamental to evaluating the quality of behavior sequences, and its core lies in analyzing the semantic and contextual coherence between adjacent behavior units. For example, in financial auditing, there is a high logical correlation between adjacent behavior units "verifying original vouchers" and "checking the authenticity of invoices," while the correlation between "verifying original vouchers" and "writing audit reports" is low if they are directly adjacent. Specifically, the unit correlation can be comprehensively calculated by analyzing the semantic label compatibility of behavior units, the relevance of operation objects, and time intervals. A logical coherence metric is determined based on the correlation of all units, which can be calculated using methods such as mean calculation or weighted aggregation. A preset coherence threshold can be adjusted based on thresholds in different domains or application requirements; for example, in engineering design and logistics scheduling scenarios, the threshold is set to 0.6. If the logical coherence metric is greater than 0.6, the target behavior sequence is determined to meet the preset sequence specification.
[0051] In this embodiment, target behavior sequences with effective cognitive logic are selected by quantifying logical coherence, thus preventing invalid or logically confused behavior sequences from entering the subsequent rule generation stage and ensuring the generation of high-quality target rules.
[0052] refer to Figure 2 In one embodiment, the rule determination method further includes: Step 400: Extract the semantic labels and operation objects of each behavioral unit in the target behavioral sequence; Step 500, for each behavioral unit: The semantic tags are standardized to obtain standardized semantic tags; The type of the operation object is abstracted to obtain the abstract object type; Based on standardized semantic tags and abstract object types, generate abstract units corresponding to behavioral units; Step 600: Based on the temporal sequence of each behavioral unit in the target behavioral sequence, integrate all abstract units into a behavioral template.
[0053] It should be noted that, along with generating the target rules, this embodiment also generates behavioral templates. Unlike the targets, the purpose of behavioral templates is not to automatically identify risks, but rather to abstract the result of thought processes. By abstracting the thought patterns of senior experts and forming behavioral templates, these templates can be used by newcomers to the industry to better learn from the thought processes of senior experts during their skill enhancement process.
[0054] In this embodiment, specific behavioral instances are sublimated into reusable cognitive patterns, realizing the knowledge abstraction process from the specific to the general. Extracting the semantic tags and operation objects of the original behavioral units is the data basis for generating behavioral templates. Subsequently, these two dimensions are standardized and abstracted respectively. The standardization of semantic tags aims to eliminate differences in personal habitual terms. For example, "look carefully" and "read deeply" are unified into "focus deeply". The abstraction of operation object types strips away specific content details. For example, "Article 40 of the Contract Law" is abstracted into "[legal clause]", and "EXW trade terms" is abstracted into "[trade terms]". For example, in the field of software testing, the repeated clicking operation of the "login button" by the tester can be abstracted into "[UI control]", and in the review of academic papers, the review experts' verification of "references
[12] " can be abstracted into "[cited literature]". After completing the abstraction of a single behavioral unit, these abstract units are integrated into a complete behavioral template according to the original time sequence.
[0055] In one embodiment, a large language model can be used to construct behavioral templates. The large language model abstracts and generalizes the target behavioral sequence, removing specific textual content and scene details while retaining the core cognitive logic. For example, the specific target behavioral sequence "Search terms (liability exemption clauses) → Verify terms (compensation clauses) → Refer to legal provisions (Article 114 of the Contract Law)" can be abstracted into a general cognitive template: "[Identify key risk points] → [Cross-validate related clauses] → [Refer to legal basis]". In one embodiment, expert interpretations can also be added to each abstract step. For example: - Step 1 [Identify key risk points]: When reviewing contracts, experienced lawyers will prioritize clauses that may lead to an imbalance of rights and responsibilities, such as exemptions from liability and limitations on compensation.
[0056] - Step 2 [Cross-validation of related clauses]: After discovering a potential risk in a clause, we do not immediately draw a conclusion, but instead look for other related clauses to determine whether there is a balancing mechanism.
[0057] - Step 3 [Refer to Legal Basis]: After confirming the risks, we will refer to relevant laws and regulations to ensure the accuracy and professionalism of the judgment.
[0058] These cognitive behavior templates will be used for manual review before target rules are added to the knowledge base. Once approved, they can be used for training new employees in relevant industries. By learning from these templates, new employees can understand the thought processes and judgment logic of senior experts when facing similar risks, thereby accelerating their own growth.
[0059] In this embodiment, a general behavior template that does not depend on a specific scenario is generated through standardization and abstraction. This allows the behavior template to break free from the constraints of specific operation objects and can be quickly reused in similar scenarios, laying a solid foundation for building an extensible cognitive pattern library.
[0060] In one embodiment, the rule determination method further includes: Initiate an audit request corresponding to the target rule; Once the approval information is obtained, the steps of extracting the semantic tags and operation objects of each behavioral unit in the target behavioral sequence are performed. Associate the target behavior sequence, behavior template, and target rules.
[0061] In this embodiment, the final judgment of human experts is introduced to ensure the professional reliability of the automatically generated results and establish a complete knowledge traceability system. Initiating a review request is a key step in quality assurance. After the system generates preliminary rules, it submits them, along with relevant behavioral evidence, to domain experts for review. For example, in legal document analysis, automatically identified contract risk clauses require final approval from senior lawyers. Only after expert review is approved will the subsequent knowledge accumulation process proceed. This design ensures that all content entering the knowledge base undergoes professional verification. Subsequently, by establishing the association between the target rules and the behavioral sequences and templates that generated those rules, a three-dimensional knowledge network is constructed, enabling the traceability of rules and behavioral logic.
[0062] In this embodiment, the human-machine collaborative review mechanism not only ensures the professionalism of knowledge output, but also achieves full-chain traceability of knowledge through multi-dimensional association, greatly enhancing the credibility and practicality of the system.
[0063] In one embodiment, the rule determination method further includes: Determine whether the target rule is a historical rule that already exists; When the target rule is a historical rule, obtain the historical behavior template associated with the historical rule; Determine the template matching degree between the behavior template and historical behavior templates; If the template matching degree is less than or equal to the preset matching threshold, the target behavior sequence and behavior template will be associated with historical rules. If the template matching degree is greater than the preset matching threshold, the behavior template will be associated with the historical behavior template.
[0064] In this embodiment, it is important to note that handling the relationship between new and old knowledge, and achieving the organic growth of the knowledge system rather than simple accumulation, is crucial for the long-term evolution of the system. Determining whether the target rule is a historical rule is the starting point for knowledge fusion. When a newly generated rule is identified as similar to an existing historical rule, a refined comparison process is initiated. After obtaining the behavioral templates associated with historical rules, the similarity between new and old cognitive paths is evaluated by calculating the template matching degree. The pattern matching degree can be calculated through dimensions such as semantic consistency, temporal coherence, and object type compatibility.
[0065] Specifically, when the template matching degree is less than or equal to the preset matching threshold, it means that the current behavior template and the historical behavior template have low similarity, and there are significant differences in the core logic or applicable scenarios. In this case, selecting "associate the target behavior sequence and behavior template with historical rules" essentially preserves the core value of historical rules while supplementing specific behavioral information for new scenarios: on the one hand, historical rules do not need to be recreated due to low-similarity templates, reducing rule redundancy; on the other hand, the associated target behavior sequence and the current behavior template can serve as "scenario-based supplementary cases" for historical rules, allowing for a clear understanding of the rule's adaptation in different scenarios when querying historical rules later. When the template matching degree is greater than the preset matching threshold, it indicates that the core logic and applicable scenarios of the current behavior template and the historical behavior template are highly similar, with only minor differences in the description of the operation object or detailed processes. At this point, executing "associate behavior template with historical behavior template" aims to achieve "merging and reuse" of templates: there is no need to create separate rule associations for highly similar behavior templates. By simply associating behavior templates with each other, the current behavior template can directly reuse the historical rules corresponding to the historical behavior template, reducing the cost of rule creation and maintenance. At the same time, during the association process, details of the current behavior template can be added to the historical behavior template, such as new descriptions of the operation object and minor optimizations of the process, enriching the adaptability of the historical template.
[0066] In this embodiment, an intelligent knowledge digestion mechanism is established, which can capture different cognitive paths to solve problems to enrich the knowledge system, and avoid information redundancy, so that the knowledge base can maintain structural optimization and quality improvement in continuous learning.
[0067] In one embodiment, it may further include: When a new user performs an operation, obtain the current operation sequence of the new user; Using a large language model, based on the current operation sequence, retrieve the relevant target rules; Based on the retrieved target rules, risk warning information is generated and displayed to the new user.
[0068] It should be noted that the generated target rules are applied to real-world risk identification scenarios using Retrieval-augmented Generation (RAG) technology. When new users (such as junior legal professionals) use the system to review contracts, the system monitors their actions in real time and provides intelligent risk alerts by combining a large language model with target rules from the knowledge base.
[0069] The specific process is as follows: Step 1: Obtain the new user's current action sequence. For example, when reviewing a software license agreement, a new user might sequentially perform actions such as "open the contract → scroll to Chapter 3 → highlight the 'Limitation of Liability' clause → view the 'Indemnification' clause." The system converts these actions into a cognitive behavior sequence.
[0070] Step 2: Utilize a large language model to analyze the semantic features and contextual information of the current operation sequence and extract key elements. For example, identify that the user is focusing on two types of clauses: "limitation of liability" and "indemnification," and that there may be a relationship between these two types of clauses.
[0071] Step 3: Based on the extracted key elements, retrieve relevant target rules from the knowledge base using RAG technology. For example, the aforementioned "risk of unequal rights and responsibilities" rule was retrieved, and the triggering conditions of this rule highly match the current user's operating pattern.
[0072] Step 4: The large language model combines the retrieved target rules with the specific content of the current contract to generate personalized risk warnings. For example: "The 'Limitation of Liability' clause you are viewing exempts the supplier from liability in many situations, but the compensation cap in the 'Indemnification' clause is only 5% of the contract amount, which is significantly lower than industry practice (usually above 30%). It is recommended to pay close attention to the risk of unequal rights and responsibilities here and consider requesting the supplier to increase the compensation cap or narrow the scope of liability exemption."
[0073] Step 5: Display the generated risk warnings to new users to assist them in making decisions.
[0074] In this way, the experience of senior experts is transformed into reusable target rules, and through large language models and RAG technology, real-time and accurate assistance is provided to new users, effectively reducing the difficulty of the work for newcomers and improving the overall risk identification capability.
[0075] Figure 3 A schematic block diagram of a computing device according to an embodiment of this application is shown. Figure 3 As shown in the illustration, this application provides a computing device that may include: Memory 1000 is configured to store instructions; Processor 2000 is configured to call instructions from memory 1000 and to implement the aforementioned rule determination method when executing instructions.
[0076] This application also provides a machine-readable storage medium storing instructions that cause a machine to perform the rule determination method as described in the above embodiments.
[0077] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0078] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0081] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0082] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0083] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0084] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0085] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for determining rules, characterized in that, include: Determine the sequence of cognitive behaviors based on the user's input flow; Upon receiving an input labeled event, the target behavior sequence in the cognitive behavior sequence is determined based on the labeled event; If the target behavior sequence satisfies the preset sequence specification, target rules are generated based on the target behavior sequence and the labeled events.
2. The rule determination method according to claim 1, characterized in that, The process of determining the cognitive behavior sequence based on the input-based user operation flow includes: The input user operation stream is time-sequentially segmented into multiple operation segments; Extract the operation objects from each of the operation segments respectively; The semantic recognition mechanism is used to process each operation segment to obtain the semantic tags of each operation segment; For each of the operation segments, a behavior unit is generated based on the operation object and the semantic tag; All the aforementioned behavioral units are aggregated and encapsulated into a cognitive behavioral sequence in chronological order.
3. The rule determination method according to claim 1, characterized in that, Determining the target behavior sequence in the cognitive behavior sequence based on the labeled events includes: The number of backtracking operands is determined based on a preset multiple of the preset average number of operands; Based on the location of the labeled event, the cognitive behavior sequence is traced back according to the backtracking operand to obtain the target behavior sequence.
4. The rule determination method according to claim 1, characterized in that, Also includes: Determine the degree of unit correlation between each adjacent behavioral unit in the target behavioral sequence; The logical coherence metric of the target behavior sequence is determined based on the correlation of all the units. If the logical coherence metric is greater than a preset coherence threshold, the target behavior sequence is determined to satisfy a preset sequence specification.
5. The rule determination method according to claim 1, characterized in that, The generation of target rules based on the target behavior sequence and the labeled events includes: Extract semantic information from the target behavior sequence and event feature information from the labeled events, wherein the semantic information includes the semantic labels and operation objects of each behavior unit in the target behavior sequence; Based on the semantic information and the event feature information, a target rule is generated.
6. The rule determination method according to claim 1, characterized in that, Also includes: Extract the semantic labels and operation objects of each behavioral unit in the target behavioral sequence; For each of the aforementioned behavioral units: The semantic tags are standardized to obtain standardized semantic tags; The operation object is subjected to type abstraction processing to obtain an abstract object type; Based on the standardized semantic tags and the abstract object type, an abstract unit corresponding to the behavior unit is generated; Based on the temporal sequence of each of the behavioral units in the target behavioral sequence, all the abstract units are integrated into a behavioral template.
7. The rule determination method according to claim 6, characterized in that, Also includes: Initiate an audit request corresponding to the target rule; Upon receiving approval information, the steps of extracting the semantic tags and operation objects of each behavioral unit in the target behavioral sequence are performed. Associate the target behavior sequence, the behavior template, and the target rule.
8. The rule determination method according to claim 6, characterized in that, Also includes: Determine whether the target rule is an existing historical rule; If the target rule is the historical rule, obtain the historical behavior template associated with the historical rule; Determine the template matching degree between the behavior template and the historical behavior template; If the template matching degree is less than or equal to a preset matching threshold, the target behavior sequence and the behavior template are associated with the historical rules; If the template matching degree is greater than a preset matching threshold, the behavior template is associated with the historical behavior template.
9. A computing device, characterized in that, include: The memory is configured to store instructions; A processor is configured to retrieve the instructions from the memory and, when executing the instructions, to implement the rule determination method according to any one of claims 1 to 8.
10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing the machine to perform the rule determination method according to any one of claims 1 to 8.