Task processing method and device based on domain ontology, terminal equipment and storage medium
By constructing a domain ontology and combining text similarity and structural matching to select the target object type and execute target behavior rules, the problem of lack of unified verification before task processing in existing technologies is solved, thereby improving the accuracy and consistency of task processing.
Patent Information
- Application Number
- CN202611696079.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-30
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies lack unified verification of object structure constraints and behavioral rule execution conditions before task processing, which makes task processing results susceptible to the influence of differences in data sources and field configurations, resulting in repeated calls, rollback retries, and processing delays.
By constructing a domain ontology, task data is acquired and the processing objects and target triggering events are parsed. The target object type is selected by combining text similarity and structural matching, the target behavior rules are read and executed, and the object state is updated to improve the accuracy of task processing.
It improves the accuracy of task processing, reduces duplicate calls and rollback retries caused by mismatch between object types and behavior rules, and enhances the domain ontology's coverage and consistency of task content.
Smart Images

Figure CN123178100A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, and in particular to a task processing method, apparatus, terminal device, and storage medium based on domain ontology. Background Technology
[0002] As enterprise information systems become increasingly automated, task processing often requires retrieving object data, validating execution conditions, and triggering assignment, scheduling, or disposal operations across multiple business systems. Different systems often use different fields, states, and relationships for the same business object. If the computer cannot parse and validate task data based on unified semantic constraints, the task processing results are easily affected by differences in data sources and field configurations. Domain ontology can uniformly describe business objects, attributes, relationships, and state rules in a machine-processable manner, providing a foundation for cross-system task data parsing, execution condition validation, and task state updates.
[0003] Currently, task processing systems typically operate based on workflow templates and preset rules. They read fixed fields according to task type and call corresponding business interfaces to complete assignment, transfer, or processing. Some systems also use text classification models to extract task elements from task descriptions. These methods primarily rely on local fields and fixed correspondences to advance tasks, failing to perform unified compatibility checks on data from different systems before task execution. This can easily lead to task instructions that do not meet execution conditions being sent to downstream systems, resulting in duplicate calls, rollbacks, retries, and processing delays. Summary of the Invention
[0004] This invention provides a task processing method, apparatus, terminal device, and storage medium based on domain ontology, which can improve the accuracy of task processing.
[0005] This invention provides a task processing method based on domain ontology, including: Obtain the task data of the target task, and parse the task data to obtain the processing object and the target triggering event; In a pre-built domain ontology, multiple candidate object types corresponding to the processing object are retrieved. The text similarity between the processing object and each candidate object type is calculated, and the structural matching degree between the object structure information of the processing object and the object structure constraints of each candidate object type is calculated. Based on the text similarity and the structural matching degree, a target object type that meets the preset matching conditions is selected from each candidate object type. The domain ontology is constructed by matching the task object model built based on task samples with the domain object model built based on domain data, and reusing and merging the unmatched content. Read the set of behavior rules corresponding to the target object type, and filter out the target behavior rules from the set of behavior rules that match the corresponding triggering event and whose object structure information satisfies the corresponding execution conditions; The processing action in the target behavior rule is executed on the target task, and the state of the processing object is updated to the result state in the target behavior rule to obtain the task processing result of the target task.
[0006] This invention, through acquiring and parsing task data to obtain processing objects and target triggering events, provides a corresponding data foundation for subsequent object type matching and behavior rule filtering. By matching the task object model constructed based on task samples with the domain object model constructed based on domain data, and reusing and merging unmatched content, the coverage of the domain ontology for task processing objects can be improved. Furthermore, by combining text similarity and structural matching to select the target object type, mismatches of object types caused by relying solely on text matching can be reduced. By reading the set of behavior rules corresponding to the target object type and filtering the target behavior rules, the filtering scope of behavior rules can be limited to rules corresponding to the target object type, reducing the matching processing of irrelevant behavior rules. By executing the processing actions in the target behavior rules and updating the corresponding states, task data can be processed according to the filtered behavior rules, reducing repeated calls and rollback retries caused by mismatches between object types and behavior rules. Compared to the prior art, which lacks unified verification of object structure constraints and behavior rule execution conditions before task processing, this application can improve the accuracy of task processing.
[0007] Furthermore, the domain ontology is constructed by matching a task object model built based on task samples with a domain object model built based on domain data, and reusing and merging unmatched content, including: Obtain a general object list, constraint template, domain information, and multiple task samples. Based on the general object list and the constraint template, construct a basic object model, and based on each task sample, construct a task object model. Based on the domain information, a domain object type that inherits the attribute constraints and relation constraints of the basic object type is obtained by extending the basic object type of the basic object model, and a domain object model is constructed based on the domain object type. The task object model is matched with the domain object model to identify multiple unmatched contents, and each unmatched content is reused and merged to obtain the domain ontology.
[0008] This invention, through obtaining a general object list, constraint templates, domain data, and task samples, constructs a basic object model and a task object model respectively. Based on inheriting the attribute constraints and relational constraints of the basic object types, it extends the domain object types. Then, it matches and reuses the task object model with the domain object model, enabling the domain ontology to absorb unmatched content in the task samples under unified attribute constraints and relational constraints. This improves the domain ontology's coverage of task content and maintains the consistency of constraints between domain object types.
[0009] Furthermore, the process of reusing and merging the unmatched content to obtain the domain ontology includes: Obtain the number of occurrences of each unmatched content in each task sample, and determine the unmatched content whose occurrence count reaches a preset number as reusable content; Extract the attributes, relationships, and behavioral rules that commonly appear in each of the task samples from the reusable content, and use these common attributes, relationships, and behavioral rules as supplementary domain content. The consistency between the supplementary content of the domain and the domain object model is verified, and the domain supplementary content that passes the verification is written into the domain object model to obtain the domain ontology.
[0010] This invention, through its embodiments, filters reusable content based on the frequency of occurrence of unmatched content across multiple task samples, extracts attributes, relationships, and behavioral rules that co-occur across tasks, and writes them into the domain object model after consistency verification. This allows for the addition of recurring task content that does not conflict with existing models to the domain ontology, reducing model conflicts caused by directly writing single task content and improving the reusability and consistency of the domain ontology.
[0011] Further, calculating the structural matching degree between the object structure information of the processed object and the object structure constraints of each candidate object type includes: For any candidate object type, obtain the attribute information and association information from the object structure information, and obtain the attribute constraint information and relationship constraint information from the object structure constraints of the candidate object type; The attribute information is compared with the attribute constraint information to obtain the attribute constraint comparison result, and the association relationship information is compared with the relationship constraint information to obtain the relationship constraint comparison result. The structural matching degree of the candidate object type is calculated based on the comparison results of the attribute constraints and the comparison results of the relation constraints.
[0012] The embodiments of the present invention compare attribute information with attribute constraint information and association information with relationship constraint information respectively, and calculate the structural matching degree based on the two types of comparison results. This enables the structural matching result to simultaneously reflect the satisfaction of attribute constraints and relationship constraints, thereby improving the accuracy of structural matching degree calculation.
[0013] Further, the step of selecting a target object type that meets the preset matching conditions from each of the candidate object types based on the text similarity and the structural matching degree includes: For any candidate object type, the text similarity and the structural matching degree are weighted and summed according to preset weights to obtain the comprehensive matching value of the candidate object type; The comprehensive matching value is compared with a preset matching threshold, and the candidate object types whose comprehensive matching value reaches the preset matching threshold and whose structural matching degree meets the preset constraints are selected as the target object types.
[0014] This invention, by combining text similarity and structural matching according to preset weights and using a comprehensive matching threshold and structural constraints to select the target object type, enables the object type selection to consider both the degree of text matching and the degree of structural constraint satisfaction, avoiding selection of the target object type based solely on a single matching result and improving the accuracy of target object type selection.
[0015] Further, the step of selecting target behavior rules from the set of behavior rules that match the target triggering event and whose object structure information satisfies the corresponding execution conditions includes: Read the triggering events and execution conditions of each behavior rule in the set of behavior rules; Based on the target triggering event, each of the aforementioned behavior rules is matched to obtain multiple candidate behavior rules; Read the attribute and relation restrictions in the execution conditions of each candidate behavior rule; For any candidate behavior rule, determine whether the value of the attribute information satisfies the attribute restrictions of the candidate behavior rule, and determine whether the start type, end type, and cardinality of the association relationship information satisfy the relationship restrictions of the candidate behavior rule; Candidate behavior rules that satisfy both the attribute constraints and the relationship constraints are selected as target behavior rules.
[0016] This invention first filters candidate behavior rules based on the target triggering event, and then determines whether the attribute values and the start type, end type and cardinality of the association meet the execution conditions. This can exclude behavior rules that do not match the triggering event or do not meet the structural conditions, thereby improving the matching accuracy between the target behavior rules and the target task and the structural conditions of the processing object.
[0017] Further, the step of executing the processing action in the target behavior rule on the target task and updating the state of the processing object to the result state in the target behavior rule to obtain the task processing result of the target task includes: Based on the processing actions in the target behavior rules, perform data processing operations on the object data corresponding to the target task in accordance with the processing actions to obtain the execution results; Write the result status from the target behavior rule into the status field of the processing object to obtain the updated status; Based on the execution result and the updated status, the task processing result of the target task is generated.
[0018] This invention, through its embodiments, performs corresponding data processing operations on object data according to target behavior rules, writes the result status, and generates task processing results based on the execution results and the updated status. This enables the task processing results to simultaneously reflect the execution status of the processing actions and the status changes of the processed object, thereby improving the consistency between the task processing results and the status of the processed object.
[0019] Another embodiment of the present invention provides a task processing apparatus based on a domain ontology, comprising: the apparatus being used to perform steps of a task processing method based on a domain ontology as described in the present invention.
[0020] Another embodiment of the present invention provides a terminal device, including: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the steps of a task processing method based on a domain ontology as described in the present invention.
[0021] Another embodiment of the present invention provides a computer-readable storage medium item, including: a stored computer program, which, when the computer program is running, controls the device where the computer-readable storage medium is located to perform steps of a task processing method based on a domain ontology as described in the present invention. Attached Figure Description
[0022] Figure 1 A flowchart illustrating an embodiment of the domain ontology-based task processing method provided by the present invention; Figure 2 This is a schematic diagram of an embodiment of the domain ontology-based task processing device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0025] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0027] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0028] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0029] See Figure 1 To address the problem that existing technologies lack unified verification of object structure constraints and behavioral rule execution conditions before task processing, an embodiment of the present invention provides a task processing method based on domain ontology, including steps S101 to S104: Step S101: Obtain the task data of the target task and parse the task data to obtain the processing object and the target triggering event.
[0030] It should be noted that acquiring task data for the target task and parsing that data to obtain the processing object and the target triggering event means that the task processing device obtains data related to the target task from the business system, interface requests, message queues, or task scheduling modules, and parses the task data according to a preset data format or field rules to identify the object to be processed in this task and the event that triggers the execution of this task. The processing object can be a data object with attributes and relationships, such as a device, work order, order, alarm, or personnel; the target triggering event can be an event that triggers task processing, such as a change in object state, receiving a processing request, reaching a preset time, or generating an alarm.
[0031] In one embodiment, the task data includes task description, task rules, and sample data. After acquiring the task data of the target task, the task processing device performs structured parsing on the task description and task rules, extracting task objects, task attributes, task relationships, events, and behaviors from the task objectives, participating roles, inputs, outputs, process nodes, constraints, and expected results. The task object carrying the target task processing action is identified as the processing object, and the event that triggers the corresponding process node or execution behavior is identified as the target triggering event. The task object is identified by its type and references the domain object type, and the task instance is recorded by its attribute values, so that the parsed processing object and target triggering event can serve as the data basis for subsequent retrieval of candidate object types and filtering of behavior rules in the domain ontology. Taking an enterprise equipment inspection task as an example, the task processing device extracts the inspection personnel, equipment to be inspected, inspection items, abnormal review behavior, and completion status from the task description, task rules, and sample data of the monthly equipment inspection task, identifies the equipment to be inspected as the processing object, and identifies the inspection completion event as the target triggering event.
[0032] Step S102: Retrieve multiple candidate object types corresponding to the processing object from the pre-constructed domain ontology; calculate the text similarity between the processing object and each candidate object type; calculate the structural matching degree between the object structure information of the processing object and the object structure constraints of each candidate object type; and select a target object type that meets the preset matching conditions from each candidate object type based on the text similarity and the structural matching degree. The domain ontology is constructed by matching the task object model built based on task samples with the domain object model built based on domain data, and reusing and merging unmatched content.
[0033] It should be noted that retrieving multiple candidate object types corresponding to the processing object from the pre-constructed domain ontology, calculating the text similarity between the processing object and each candidate object type, and calculating the structural matching degree between the object structure information of the processing object and the object structure constraints of each candidate object type, and selecting the target object type that meets the preset matching conditions from the candidate object types based on the text similarity and the structural matching degree, means: searching for object types that may correspond to the processing object in the domain ontology, and evaluating the degree of matching between the processing object and each candidate object type from two dimensions: text content and object structure. The text similarity can be calculated based on the text information such as the name and description of the processing object and the name and description of the candidate object type; the object structure information can include the attributes and relationships of the processing object, and the object structure constraints can include the attribute constraints and relationship constraints of the candidate object type; the preset matching condition can be that the comprehensive matching degree reaches a preset threshold, or that the comprehensive matching degree is the highest among all candidate object types.
[0034] Preferably, the domain ontology is constructed by matching a task object model built based on task samples with a domain object model built based on domain data, and reusing and merging unmatched content, including: Obtain a general object list, constraint template, domain information, and multiple task samples. Based on the general object list and the constraint template, construct a basic object model, and based on each task sample, construct a task object model. Based on the domain information, a domain object type that inherits the attribute constraints and relation constraints of the basic object type is obtained by extending the basic object type of the basic object model, and a domain object model is constructed based on the domain object type. The task object model is matched with the domain object model to identify multiple unmatched contents, and each unmatched content is reused and merged to obtain the domain ontology.
[0035] In one embodiment, the domain ontology is pre-constructed before task processing. The task processing device acquires a general object list, constraint templates, domain data, and multiple task samples. Based on the general object list and constraint templates, it constructs a basic object model. The basic object model includes basic object types such as personnel, organizations, equipment, facilities, resources, information, tasks, events, rules, and standards. Each basic object type records a type identifier, type name, attribute set, allowed relationship set, and inheritance constraint set. Based on the task objectives, participating roles, inputs, outputs, process nodes, constraints, and expected results in each task sample, the task processing device extracts task objects, task attributes, task relationships, events, and behaviors to construct a task object model. Furthermore, based on the domain data, it adds domain attributes and domain relationships to the basic object types in the basic object model, obtaining domain object types that inherit the attribute constraints and relationship constraints of the basic object types, thus constructing the domain object model. Inheritance constraints may include: subtypes may not delete required attributes of the parent type; the value range of attributes with the same name can only be tightened; and subtypes inherit allowed relationship constraints from the parent type. The task processing device matches the task object model with the domain object model to identify multiple unmatched contents. Optionally, it can also divide the unmatched contents into P1 core blocking gaps, P2 necessary supplementary gaps, and P3 optional enhancement gaps based on their impact on task execution, and reuse and merge each unmatched content to obtain the domain ontology.
[0036] Preferably, the step of reusing and merging the unmatched content to obtain the domain ontology includes: Obtain the number of occurrences of each unmatched content in each task sample, and determine the unmatched content whose occurrence count reaches a preset number as reusable content; Extract the attributes, relationships, and behavioral rules that commonly appear in each of the task samples from the reusable content, and use these common attributes, relationships, and behavioral rules as supplementary domain content. The consistency between the supplementary content of the domain and the domain object model is verified, and the domain supplementary content that passes the verification is written into the domain object model to obtain the domain ontology.
[0037] In one embodiment, when reusing and merging unmatched content, the task processing device counts the frequency of occurrence of each unmatched content in different task samples and identifies unmatched content with a frequency reaching a preset number as reusable content. Optionally, the task processing device can also calculate the reuse score of unmatched content based on usage frequency, structural stability, semantic universality, and rule consistency to assist in determining whether unmatched content is reusable. For reusable content, the task processing device extracts the attributes, relationships, and behavioral rules that appear in multiple task samples, deletes the number, time, location, and temporary values that only describe a single task, and searches for a higher-level type that can accommodate common semantics in the type hierarchy. The extracted shared content is then used as domain supplementary content. Before writing, the task processing device verifies whether the data type and value range of attributes with the same name are consistent, whether the start type, end type, and cardinality of relationships with the same name are consistent, and whether the event, condition, action, and result state of behavioral rules conflict with existing behavioral rules. After verification, the domain supplementary content is written into the domain object model to obtain the domain ontology. For example, abnormal review behavior appeared in both monthly and ad hoc inspection task samples. The task processing device generalized it into domain behavior rules, while the downtime description of a single inspection was still retained as task instance data.
[0038] Preferably, calculating the structural matching degree between the object structure information of the processed object and the object structure constraints of each of the candidate object types includes: For any candidate object type, obtain the attribute information and association information from the object structure information, and obtain the attribute constraint information and relationship constraint information from the object structure constraints of the candidate object type; The attribute information is compared with the attribute constraint information to obtain the attribute constraint comparison result, and the association relationship information is compared with the relationship constraint information to obtain the relationship constraint comparison result. The structural matching degree of the candidate object type is calculated based on the comparison results of the attribute constraints and the comparison results of the relation constraints.
[0039] In one embodiment, when calculating the structural matching degree, the task processing device, for any candidate object type, obtains the attribute information and association information from the object structure information of the processed object, and obtains the attribute constraint information and relationship constraint information from the object structure constraints of the candidate object type. The attribute information may include attribute name, data type, whether it is required, value range, unit, and default value. The association information may include relationship name, start type, end type, minimum cardinality, maximum cardinality, and direction. The task processing device compares the attribute information with the attribute constraint information, determines whether the attribute values satisfy the data type, enumeration range, value range, unit, and required constraints, and obtains the attribute constraint comparison result; and compares the association information with the relationship constraint information, determines whether the start object and end object of the relationship satisfy the relationship domain value range constraint, and whether the relationship cardinality satisfies the maximum cardinality and minimum cardinality restrictions, and obtains the relationship constraint comparison result. For example, for equipment to be inspected, its attribute information includes equipment number, location, responsible organization, operating status and risk level, and its relationship information includes the executor relationship with the inspection personnel and the location relationship with the inspection point. The task processing equipment compares the above attribute information and relationship information with the attribute constraints and relationship constraints of the candidate object type of inspection equipment to obtain the structural matching degree of the inspection equipment.
[0040] Preferably, the step of selecting a target object type that meets the preset matching conditions from each of the candidate object types based on the text similarity and the structural matching degree includes: For any candidate object type, the text similarity and the structural matching degree are weighted and summed according to preset weights to obtain the comprehensive matching value of the candidate object type; The comprehensive matching value is compared with a preset matching threshold, and the candidate object types whose comprehensive matching value reaches the preset matching threshold and whose structural matching degree meets the preset constraints are selected as the target object types.
[0041] In one embodiment, for any candidate object type, the task processing device performs a weighted sum of text similarity and structural matching according to preset weights to obtain a comprehensive matching value for the candidate object type. Text similarity can be obtained by combining name similarity and definition semantic similarity, while structural matching reflects the compatibility of types or constraints such as data type, attribute value range, relation domain value range, cardinality, and state transitions. The task processing device compares the comprehensive matching value with a preset matching threshold. When the comprehensive matching value is not less than 0.85, and the data type, attribute value range, relation domain value range, and cardinality are all compatible, the corresponding candidate object type is selected as the target object type. When the comprehensive matching value is less than 0.60, or there are incompatibilities in type, value range, relation domain value range, or cardinality, the candidate object type is not determined as the target object type.
[0042] Step S103: Read the set of behavior rules corresponding to the target object type, and filter out the target behavior rules from the set of behavior rules that match the corresponding triggering event and the object structure information satisfies the corresponding execution conditions.
[0043] It should be noted that reading the set of behavior rules corresponding to the target object type and filtering out the target behavior rules from the set of behavior rules whose corresponding triggering events match the target triggering event and whose object structure information satisfies the corresponding execution conditions means: reading the behavior rules associated with the target object type in the domain ontology and searching for rules that simultaneously satisfy the triggering conditions and execution conditions. The behavior rules may include triggering events, execution conditions, processing actions, and result states; wherein, triggering events are used to limit the task triggering scenarios to which the behavior rules apply, execution conditions are used to limit the conditions that the object structure information, such as attributes and relationships, must satisfy, processing actions are used to limit the specific processing method for executing the target task, and result states are used to limit the state that the processed object should be in after the processing action is executed.
[0044] Preferably, the step of selecting target behavior rules from the set of behavior rules that match the target triggering event and whose object structure information satisfies the corresponding execution conditions includes: Read the triggering events and execution conditions of each behavior rule in the set of behavior rules; Based on the target triggering event, each of the aforementioned behavior rules is matched to obtain multiple candidate behavior rules; Read the attribute and relation restrictions in the execution conditions of each candidate behavior rule; For any candidate behavior rule, determine whether the value of the attribute information satisfies the attribute restrictions of the candidate behavior rule, and determine whether the start type, end type, and cardinality of the association relationship information satisfy the relationship restrictions of the candidate behavior rule; Candidate behavior rules that satisfy both the attribute constraints and the relationship constraints are selected as target behavior rules.
[0045] In one embodiment, the task processing device reads the set of behavior rules corresponding to the target object type, and reads the triggering event and execution conditions of each behavior rule. A behavior rule consists of four components: event, condition, action, and result state. The event describes the triggering fact; the condition describes the attribute, relationship, or state constraints that must be met before the behavior is executed; the action describes update, creation, association, notification, or disposal operations; and the result state describes the transition of the object's state after the action is completed. The task processing device matches each behavior rule according to the target triggering event, obtaining multiple candidate behavior rules. For any candidate behavior rule, it determines whether the attribute information values of the processed object meet the attribute constraints of the candidate behavior rule, and whether the start type, end type, and cardinality of the processing object's association information meet the relationship constraints of the candidate behavior rule. The candidate behavior rule that satisfies both the attribute constraints and the relationship constraints is selected as the target behavior rule. For example, when the target triggering event is the inspection completion event, the anomaly review rule requires that the inspection item result contains an anomaly and the equipment status is running, while the normal completion rule requires that the inspection item result is normal; if the equipment status of the equipment to be inspected is running and the result of its associated inspection item contains an anomaly, then the anomaly review rule is determined as the target behavior rule.
[0046] Step S104: Execute the processing action in the target behavior rule on the target task, and update the state of the processing object to the result state in the target behavior rule to obtain the task processing result of the target task.
[0047] It should be noted that executing the processing actions in the target behavior rules on the target task and updating the state of the processing object to the result state in the target behavior rules to obtain the task processing result of the target task means: performing data processing on the processing object corresponding to the target task according to the processing methods defined by the processing actions in the target behavior rules, and updating the current state of the processing object to the result state recorded in the target behavior rules after the processing actions are completed. The task processing result may include the processed state of the processing object, the execution result of the processing actions, and related data generated during the task processing.
[0048] Preferably, the step of performing the processing action in the target behavior rule on the target task and updating the state of the processing object to the result state in the target behavior rule to obtain the task processing result of the target task includes: Based on the processing actions in the target behavior rules, perform data processing operations corresponding to the processing actions on the object data corresponding to the target task to obtain the execution result; Write the result status from the target behavior rule into the status field of the processing object to obtain the updated status; Based on the execution result and the updated status, the task processing result of the target task is generated.
[0049] In one embodiment, the task processing device performs data processing operations on the object data corresponding to the target task according to the processing actions in the target behavior rule, and obtains the execution result. The processing actions may include update, create, associate, notify, or dispose of operations. After the processing action is executed, the task processing device writes the result status in the target behavior rule into the status field of the processed object to obtain the updated status, and generates the task processing result of the target task based on the execution result and the updated status. For example, in an equipment inspection task, if the target behavior rule is an anomaly review rule, the task processing device creates an anomaly review record according to the anomaly review action in the rule, establishes the association between the anomaly review record and the equipment to be inspected and the inspection items, and sends a review notification to the reviewer; subsequently, it updates the status field of the equipment to be inspected from "running" to "pending review," and uses the creation result, association result, and updated equipment status of the anomaly review record as the task processing result of this equipment inspection task.
[0050] This invention provides a data foundation for subsequent object type matching and behavior rule filtering by acquiring and parsing task data to obtain processing objects and target triggering events. By matching the task object model constructed based on task samples with the domain object model constructed based on domain data, and reusing and merging unmatched content, the coverage of the domain ontology for task processing objects can be improved. Furthermore, by combining text similarity and structural matching to select the target object type, mismatches of object types caused by relying solely on text matching can be reduced. By reading the set of behavior rules corresponding to the target object type and filtering the target behavior rules, the filtering scope of behavior rules can be limited to rules corresponding to the target object type, reducing the matching of irrelevant behavior rules. By executing the processing actions in the target behavior rules and updating the corresponding states, task data can be processed according to the filtered behavior rules, reducing repeated calls and rollback retries caused by mismatches between object types and behavior rules.
[0051] Optionally, in this embodiment of the invention, the domain ontology is constructed by matching a task object model built based on task samples with a domain object model built based on domain data, and reusing and merging unmatched content, including: Obtain a general object list, constraint template, domain information, and multiple task samples. Based on the general object list and the constraint template, construct a basic object model, and based on each task sample, construct a task object model. Based on the domain information, a domain object type that inherits the attribute constraints and relation constraints of the basic object type is obtained by extending the basic object type of the basic object model, and a domain object model is constructed based on the domain object type. The task object model is matched with the domain object model to identify multiple unmatched contents, and each unmatched content is reused and merged to obtain the domain ontology.
[0052] This invention, through obtaining a general object list, constraint templates, domain data, and task samples, constructs a basic object model and a task object model respectively. Based on inheriting the attribute constraints and relational constraints of the basic object types, it extends the domain object types. Then, it matches and reuses the task object model with the domain object model, enabling the domain ontology to absorb unmatched content in the task samples under unified attribute constraints and relational constraints. This improves the domain ontology's coverage of task content and maintains the consistency of constraints between domain object types.
[0053] Optionally, in this embodiment of the invention, the step of reusing and merging the unmatched content to obtain the domain ontology includes: Obtain the number of occurrences of each unmatched content in each task sample, and determine the unmatched content whose occurrence count reaches a preset number as reusable content; Extract the attributes, relationships, and behavioral rules that commonly appear in each of the task samples from the reusable content, and use these common attributes, relationships, and behavioral rules as supplementary domain content. The consistency between the supplementary content of the domain and the domain object model is verified, and the domain supplementary content that passes the verification is written into the domain object model to obtain the domain ontology.
[0054] This invention, through its embodiments, filters reusable content based on the frequency of occurrence of unmatched content across multiple task samples, extracts attributes, relationships, and behavioral rules that co-occur across tasks, and writes them into the domain object model after consistency verification. This allows for the addition of recurring task content that does not conflict with existing models to the domain ontology, reducing model conflicts caused by directly writing single task content and improving the reusability and consistency of the domain ontology.
[0055] Optionally, in this embodiment of the invention, calculating the structural matching degree between the object structure information of the processed object and the object structure constraints of each of the candidate object types includes: For any candidate object type, obtain the attribute information and association information from the object structure information, and obtain the attribute constraint information and relationship constraint information from the object structure constraints of the candidate object type; The attribute information is compared with the attribute constraint information to obtain the attribute constraint comparison result, and the association relationship information is compared with the relationship constraint information to obtain the relationship constraint comparison result. The structural matching degree of the candidate object type is calculated based on the comparison results of the attribute constraints and the comparison results of the relation constraints.
[0056] The embodiments of the present invention compare attribute information with attribute constraint information and association information with relationship constraint information respectively, and calculate the structural matching degree based on the two types of comparison results. This enables the structural matching result to simultaneously reflect the satisfaction of attribute constraints and relationship constraints, thereby improving the accuracy of structural matching degree calculation.
[0057] Optionally, in this embodiment of the invention, selecting a target object type that meets preset matching conditions from each of the candidate object types based on the text similarity and the structural matching degree includes: For any candidate object type, the text similarity and the structural matching degree are weighted and summed according to preset weights to obtain the comprehensive matching value of the candidate object type; The comprehensive matching value is compared with a preset matching threshold, and the candidate object types whose comprehensive matching value reaches the preset matching threshold and whose structural matching degree meets the preset constraints are selected as the target object types.
[0058] This invention, by combining text similarity and structural matching according to preset weights and using a comprehensive matching threshold and structural constraints to select the target object type, enables the object type selection to consider both the degree of text matching and the degree of structural constraint satisfaction, avoiding the selection of the target object type based solely on a single matching result and improving the accuracy of target object type selection.
[0059] Optionally, in this embodiment of the invention, the step of selecting target behavior rules from the set of behavior rules that match the target triggering event and whose object structure information satisfies the corresponding execution conditions includes: Read the triggering events and execution conditions of each behavior rule in the set of behavior rules; Based on the target triggering event, each of the aforementioned behavior rules is matched to obtain multiple candidate behavior rules; Read the attribute and relation restrictions in the execution conditions of each candidate behavior rule; For any candidate behavior rule, determine whether the value of the attribute information satisfies the attribute restrictions of the candidate behavior rule, and determine whether the start type, end type, and cardinality of the association relationship information satisfy the relationship restrictions of the candidate behavior rule; Candidate behavior rules that satisfy both the attribute constraints and the relationship constraints are selected as target behavior rules.
[0060] This invention first filters candidate behavior rules based on the target triggering event, and then determines whether the attribute values and the start type, end type and cardinality of the association meet the execution conditions. This can exclude behavior rules that do not match the triggering event or do not meet the structural conditions, thereby improving the matching accuracy between the target behavior rules and the target task and the structural conditions of the processing object.
[0061] Optionally, in this embodiment of the invention, the step of performing the processing action in the target behavior rule on the target task and updating the state of the processing object to the result state in the target behavior rule to obtain the task processing result of the target task includes: Based on the processing actions in the target behavior rules, perform data processing operations corresponding to the processing actions on the object data corresponding to the target task to obtain the execution result; Write the result status from the target behavior rule into the status field of the processing object to obtain the updated status; Based on the execution result and the updated status, the task processing result of the target task is generated.
[0062] This invention, through its embodiments, performs corresponding data processing operations on object data according to target behavior rules, writes the result status, and generates task processing results based on the execution results and the updated status. This enables the task processing results to simultaneously reflect the execution status of the processing actions and the status changes of the processed object, thereby improving the consistency between the task processing results and the status of the processed object.
[0063] like Figure 2 As shown, based on the above method embodiments, corresponding apparatus embodiments are provided; An embodiment of the present invention provides a task processing device based on domain ontology, comprising: a data acquisition module 201, an object type selection module 202, a behavior rule filtering module 203, and a task processing module 204; The data acquisition module 201 is used to acquire the task data of the target task and parse the task data to obtain the processing object and the target triggering event; The object type selection module 202 is used to retrieve multiple candidate object types corresponding to the processing object in a pre-constructed domain ontology, calculate the text similarity between the processing object and each candidate object type, and calculate the structural matching degree between the object structure information of the processing object and the object structure constraints of each candidate object type. Based on the text similarity and the structural matching degree, a target object type that meets the preset matching conditions is selected from each candidate object type. The domain ontology is constructed by matching the task object model built based on task samples with the domain object model built based on domain data, and reusing and merging the unmatched content. The behavior rule filtering module 203 is used to read the set of behavior rules corresponding to the target object type, and filter out the target behavior rules from the set of behavior rules where the corresponding triggering event matches the target triggering event and the object structure information satisfies the corresponding execution conditions; The task processing module 204 is used to execute the processing action in the target behavior rule on the target task, and update the state of the processing object to the result state in the target behavior rule to obtain the task processing result of the target task.
[0064] Optionally, in this embodiment of the invention, the object type selection module 202 includes: a first object model construction submodule, a second object model construction submodule, and a domain ontology construction submodule; The first object model construction submodule is used to obtain a general object list, constraint template, domain information and multiple task samples, construct a basic object model based on the general object list and the constraint template, and construct a task object model based on each of the task samples; The second object model construction submodule is used to extend the basic object type of the basic object model based on the domain data to obtain a domain object type that inherits the attribute constraints and relation constraints of the basic object type, and to construct a domain object model based on the domain object type; The domain ontology construction submodule is used to match the task object model with the domain object model, identify multiple unmatched contents, and reuse and merge each unmatched content to obtain the domain ontology.
[0065] This invention, through obtaining a general object list, constraint templates, domain data, and task samples, constructs a basic object model and a task object model respectively. Based on inheriting the attribute constraints and relational constraints of the basic object types, it extends the domain object types. Then, it matches and reuses the task object model with the domain object model, enabling the domain ontology to absorb unmatched content in the task samples under unified attribute constraints and relational constraints. This improves the domain ontology's coverage of task content and maintains the consistency of constraints between domain object types.
[0066] Optionally, in this embodiment of the invention, the domain ontology construction submodule includes: a reusable content determination unit, a domain supplementary content extraction unit, and a consistency verification unit; The reusable content determination unit is used to obtain the number of times each of the unmatched contents appears in each of the task samples, and to determine the unmatched contents whose corresponding number of occurrences reaches a preset number as reusable content; The domain supplementary content extraction unit is used to extract the attributes, relationships, and behavioral rules that commonly appear in each of the task samples from the reusable content, and to use the commonly appearing attributes, relationships, and behavioral rules as domain supplementary content. The consistency verification unit is used to perform consistency verification between the domain supplementary content and the domain object model, and write the domain supplementary content that passes the verification into the domain object model to obtain the domain ontology.
[0067] This invention, through its embodiments, filters reusable content based on the frequency of occurrence of unmatched content across multiple task samples, extracts attributes, relationships, and behavioral rules that co-occur across tasks, and writes them into the domain object model after consistency verification. This allows for the addition of recurring task content that does not conflict with existing models to the domain ontology, reducing model conflicts caused by directly writing single task content and improving the reusability and consistency of the domain ontology.
[0068] Optionally, in this embodiment of the invention, the object type selection module 202 further includes: an object structure acquisition submodule, an object structure comparison submodule, and a structure matching degree calculation submodule; The object structure acquisition submodule is used to acquire, for any candidate object type, attribute information and association information in the object structure information, and attribute constraint information and relationship constraint information in the object structure constraints of the candidate object type; The object structure comparison submodule is used to compare the attribute information with the attribute constraint information to obtain the attribute constraint comparison result, and to compare the association relationship information with the relationship constraint information to obtain the relationship constraint comparison result. The structure matching degree calculation submodule is used to calculate the structure matching degree of the candidate object type based on the attribute constraint comparison result and the relation constraint comparison result.
[0069] The embodiments of the present invention compare attribute information with attribute constraint information and association information with relationship constraint information respectively, and calculate the structural matching degree based on the two types of comparison results. This enables the structural matching result to simultaneously reflect the satisfaction of attribute constraints and relationship constraints, thereby improving the accuracy of structural matching degree calculation.
[0070] Optionally, in this embodiment of the invention, the object type selection module 202 further includes: a comprehensive matching value calculation submodule and an object type selection submodule; The comprehensive matching value calculation submodule is used to calculate the comprehensive matching value of the candidate object type by weighting the text similarity and the structural matching degree according to the preset weights for any candidate object type. The object type selection submodule is used to compare the comprehensive matching value with a preset matching threshold, and select the candidate object types whose comprehensive matching value reaches the preset matching threshold and whose structural matching degree meets the preset constraints as the target object types.
[0071] This invention, by combining text similarity and structural matching according to preset weights and using a comprehensive matching threshold and structural constraints to select the target object type, enables the object type selection to consider both the degree of text matching and the degree of structural constraint satisfaction, avoiding selection of the target object type based solely on a single matching result and improving the accuracy of target object type selection.
[0072] Optionally, in this embodiment of the invention, the behavior rule filtering module 203 includes: a behavior rule reading submodule, a behavior rule matching submodule, an execution condition reading submodule, an information judgment submodule, and a behavior rule filtering submodule; The behavior rule reading submodule is used to read the triggering events and execution conditions of each behavior rule in the behavior rule set; The behavior rule matching submodule is used to match each behavior rule according to the target triggering event to obtain multiple candidate behavior rules; The execution condition reading submodule is used to read the attribute restrictions and relationship restrictions in the execution conditions of each candidate behavior rule; The information judgment submodule is used to determine, for any candidate behavior rule, whether the value of the attribute information meets the attribute restrictions of the candidate behavior rule, and to determine whether the start type, end type and cardinality of the association information meet the relationship restrictions of the candidate behavior rule. The behavior rule filtering submodule is used to select candidate behavior rules that satisfy both the attribute restrictions and the relationship restrictions as target behavior rules.
[0073] This invention first filters candidate behavior rules based on the target triggering event, and then determines whether the attribute values and the start type, end type and cardinality of the association meet the execution conditions. This can exclude behavior rules that do not match the triggering event or do not meet the structural conditions, thereby improving the matching accuracy between the target behavior rules and the target task and the structural conditions of the processing object.
[0074] Optionally, in this embodiment of the invention, the task processing module 204 includes: a data processing submodule, a status update submodule, and a task processing result generation submodule; The data processing submodule is used to perform data processing operations on the object data corresponding to the target task according to the processing actions in the target behavior rules, and obtain the execution result. The state update submodule is used to write the result state in the target behavior rule into the state field of the processing object to obtain the updated state; The task processing result generation submodule is used to generate the task processing result of the target task based on the execution result and the updated status.
[0075] This invention, through its embodiments, performs corresponding data processing operations on object data according to target behavior rules, writes the result status, and generates task processing results based on the execution results and the updated status. This enables the task processing results to simultaneously reflect the execution status of the processing actions and the status changes of the processed object, thereby improving the consistency between the task processing results and the status of the processed object.
[0076] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention, and can implement a task processing method based on domain ontology provided by any of the above-described method embodiments of the present invention.
[0077] In this embodiment of the invention, the data acquisition module 201 acquires task data and parses it to obtain the processing object and target triggering event, providing a corresponding data foundation for subsequent object type matching and behavior rule filtering. The object type selection module 202 matches the task object model constructed based on the task sample with the domain object model constructed based on domain data, and reuses and merges unmatched content, thereby improving the coverage of the domain ontology to the task processing object. On this basis, the object type selection module 202 selects the target object type by combining text similarity and structural matching, which can reduce mismatches of object types caused by relying solely on text matching. The behavior rule filtering module 203 reads the set of behavior rules corresponding to the target object type and filters the target behavior rules, which can limit the filtering scope of behavior rules to the rules corresponding to the target object type, reducing the matching processing of irrelevant behavior rules. The task processing module 204 executes the processing actions in the target behavior rules and updates the corresponding state, which can process task data according to the filtered behavior rules, reducing repeated calls and rollback retries caused by mismatch between object type and behavior rules.
[0078] It should be noted that the device embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can specifically be implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0079] Based on the above embodiment of a task processing method based on domain ontology, another embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a task processing method based on domain ontology according to any embodiment of the present invention.
[0080] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0081] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0082] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0083] Based on the above-described method embodiments, another embodiment of the present invention provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a task processing method based on domain ontology as described in any of the above-described method embodiments of the present invention.
[0084] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0085] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A task processing method based on domain ontology, characterized in that, include: Obtain the task data of the target task, and parse the task data to obtain the processing object and the target triggering event; In a pre-built domain ontology, multiple candidate object types corresponding to the processing object are retrieved. The text similarity between the processing object and each candidate object type is calculated, and the structural matching degree between the object structure information of the processing object and the object structure constraints of each candidate object type is calculated. Based on the text similarity and the structural matching degree, a target object type that meets the preset matching conditions is selected from each candidate object type. The domain ontology is constructed by matching the task object model built based on task samples with the domain object model built based on domain data, and reusing and merging the unmatched content. Read the set of behavior rules corresponding to the target object type, and filter out the target behavior rules from the set of behavior rules that match the corresponding triggering event and whose object structure information satisfies the corresponding execution conditions; The processing action in the target behavior rule is executed on the target task, and the state of the processing object is updated to the result state in the target behavior rule to obtain the task processing result of the target task.
2. The task processing method based on domain ontology as described in claim 1, characterized in that, The domain ontology is constructed by matching a task object model built based on task samples with a domain object model built based on domain data, and reusing and merging unmatched content, including: Obtain a general object list, constraint template, domain information, and multiple task samples. Based on the general object list and the constraint template, construct a basic object model, and based on each task sample, construct a task object model. Based on the domain information, a domain object type that inherits the attribute constraints and relation constraints of the basic object type is obtained by extending the basic object type of the basic object model, and a domain object model is constructed based on the domain object type. The task object model is matched with the domain object model to identify multiple unmatched contents, and each unmatched contents is reused and merged to obtain the domain ontology.
3. The task processing method based on domain ontology as described in claim 2, characterized in that, The process of reusing and merging the unmatched content to obtain the domain ontology includes: Obtain the number of occurrences of each unmatched content in each task sample, and determine the unmatched content whose occurrence count reaches a preset number as reusable content; Extract the attributes, relationships, and behavioral rules that commonly appear in each of the task samples from the reusable content, and use these common attributes, relationships, and behavioral rules as supplementary domain content. The consistency between the supplementary content of the domain and the domain object model is verified, and the domain supplementary content that passes the verification is written into the domain object model to obtain the domain ontology.
4. The task processing method based on domain ontology as described in claim 1, characterized in that, The calculation of the structural matching degree between the object structure information of the processed object and the object structure constraints of each candidate object type includes: For any candidate object type, obtain the attribute information and association information from the object structure information, and obtain the attribute constraint information and relationship constraint information from the object structure constraints of the candidate object type; The attribute information is compared with the attribute constraint information to obtain the attribute constraint comparison result, and the association relationship information is compared with the relationship constraint information to obtain the relationship constraint comparison result. The structural matching degree of the candidate object type is calculated based on the comparison results of the attribute constraints and the comparison results of the relation constraints.
5. The task processing method based on domain ontology as described in claim 1, characterized in that, The step of selecting a target object type that meets preset matching conditions from each of the candidate object types based on the text similarity and the structural matching degree includes: For any candidate object type, the text similarity and the structural matching degree are weighted and summed according to preset weights to obtain the comprehensive matching value of the candidate object type; The comprehensive matching value is compared with a preset matching threshold, and the candidate object types whose comprehensive matching value reaches the preset matching threshold and whose structural matching degree meets the preset constraints are selected as the target object types.
6. The task processing method based on domain ontology as described in claim 4, characterized in that, The step of selecting target behavior rules from the set of behavior rules that match the target triggering event and whose object structure information satisfies the corresponding execution conditions includes: Read the triggering events and execution conditions of each behavior rule in the set of behavior rules; Based on the target triggering event, each of the aforementioned behavior rules is matched to obtain multiple candidate behavior rules; Read the attribute and relation restrictions in the execution conditions of each candidate behavior rule; For any candidate behavior rule, determine whether the value of the attribute information satisfies the attribute restrictions of the candidate behavior rule, and determine whether the start type, end type, and cardinality of the association relationship information satisfy the relationship restrictions of the candidate behavior rule; Candidate behavior rules that satisfy both the attribute constraints and the relationship constraints are selected as target behavior rules.
7. The task processing method based on domain ontology as described in claim 1, characterized in that, The process of executing the processing action in the target behavior rule on the target task and updating the state of the processing object to the result state in the target behavior rule to obtain the task processing result of the target task includes: Based on the processing actions in the target behavior rules, perform data processing operations on the object data corresponding to the target task in accordance with the processing actions to obtain the execution results; Write the result status from the target behavior rule into the status field of the processing object to obtain the updated status; Based on the execution result and the updated status, the task processing result of the target task is generated.
8. A task processing device based on domain ontology, characterized in that, include: The device is used to execute a task processing method based on a domain ontology as described in any one of claims 1-7.
9. A terminal device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a task processing method based on a domain ontology as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, the device containing the computer-readable storage medium is controlled to perform a task processing method based on a domain ontology as described in any one of claims 1-7.
