Parameter calculation workflow generation method and device, electronic equipment and medium
By using the knowledge graph to generate parameter calculation workflow during parameter calculation, the coordination problems caused by data changes and modifications during parameter calculation in the prior art are solved, the efficiency and quality of calculation are improved, and the consistency of data is ensured.
Patent Information
- Application Number
- CN202311224168.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-03-21
AI Technical Summary
The prior art coordination problems caused by data changes and modifications during the parameter calculation process lead to duplicate low-value workload, waste of resources, low calculation efficiency and easy data inconsistency, reducing the quality and reliability of parameter calculations.
Through precise reasoning based on knowledge graphs, a parameter calculation workflow is generated, so as to quickly determine the various links and link sequences involved in data changes, and realize automatic parameter adjustment.
It improves the timeliness and quality of parameter calculations, reduces the need for manual coordination, and ensures data consistency and reliability of parameter calculations.
Smart Images

Figure CN119671233A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and medium for generating a parameter calculation workflow. Background Art
[0002] In practical applications, the calculation process of a parameter is very complicated, often involving the coordination of multiple calculation processes of multiple professional departments. Take the oil and gas parameters that oil companies are concerned about as an example, such as proved reserves parameters. First, the basic data used to calculate proved reserves parameters will change repeatedly, such as the number of wells, layer positions, the lower limit standard of effective thickness, oil test and production test data, oil (gas) bearing area, etc.; secondly, oil and gas parameters, as the core assets of oil companies, need to undergo multi-level review, and modifications are often proposed during the review process.
[0003] Because the parameter calculation process is orderly, and the subsequent calculation steps depend on the previous calculation steps, changes in data, proposed modifications, and especially modifications to basic data, affect the entire system. Once these situations occur, the existing technology requires manual investigation and coordination of the various parameter calculation links involved. This results in: first, a huge amount of repetitive low-value work and collaboration and coordination work is introduced, which seriously restricts the timeliness of work; second, the parameter calculation work wastes resources seriously, and with limited resources, more valuable research work resources are insufficiently invested, reducing the quality of work; third, the relationship between parameters is complex, there are many collaborators, and it is difficult to ensure consistency in tedious modifications. The above problems will lead to low calculation efficiency and easily cause data inconsistency, reducing the quality and reliability of parameter calculation. Summary of the invention
[0004] In view of this, the purpose of this application is to provide a method, device, electronic device and medium for generating a parameter calculation workflow, which can accurately infer the parameter calculation workflow based on the knowledge graph, so as to quickly determine the various links and the order of links involved based on the parameter calculation workflow when the data needs to change, thereby providing a guarantee for realizing the automatic adjustment of parameters.
[0005] The present application embodiment provides a method for generating a parameter calculation workflow, the method comprising:
[0006] Obtaining a pre-constructed parameter calculation knowledge graph of a target domain; wherein the parameter calculation knowledge graph includes nodes and association relationships between nodes;
[0007] According to the association relationship between the nodes, identifying the category of each node in the parameter calculation knowledge graph;
[0008] According to the category of each node and the association relationship between nodes, a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph is generated.
[0009] Furthermore, the categories of the nodes include objects, data and activities; the association relationships between the nodes include: parent-child relationship, immediate predecessor relationship, immediate successor relationship, input relationship, output relationship, inheritance relationship and inclusion relationship;
[0010] The step of identifying the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes includes:
[0011] According to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes, identifying basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph;
[0012] According to the parent-child relationship, inheritance relationship and inclusion relationship between nodes, the extended nodes of the activity category are identified based on the basic node expansion of the activity category, and the extended nodes of the data category are identified based on the basic node expansion of the data category;
[0013] The nodes in the parameter calculation knowledge graph, except for the nodes of the activity category and the nodes of the data category, are determined to be object category nodes.
[0014] Further, the identifying the basic nodes of the activity category and the basic nodes of the data category in the parameter calculation knowledge graph according to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between the nodes includes:
[0015] For any node, according to the association relationship between nodes, if it is determined that the node corresponds to any input node or output node or immediately preceding node or immediately succeeding node, then the node is determined as a node of an activity category;
[0016] If it is determined that the node is an input node or an output node of any activity category node, the node is determined as a data category node.
[0017] Furthermore, generating a parameter calculation workflow corresponding to each parameter in the target domain according to the category of each node and the association relationship between the nodes includes:
[0018] For nodes of the activity category, an activity execution workflow corresponding to each parameter is generated according to the association relationship between the nodes of the activity category;
[0019] Determine the associated nodes of each activity category node in the activity execution workflow corresponding to each parameter according to the association relationship between the nodes; wherein the associated nodes of each activity category node include at least one of the following items: a node of a data category input to the node, a node of a data category output by the node, a node of an object category acted upon by the node, and a node of an object category targeted by the node of the data category input to the node and the node of the data category output by the node;
[0020] According to the activity execution workflow corresponding to each parameter and the associated nodes of each activity category node, a parameter calculation workflow corresponding to each parameter is generated.
[0021] Furthermore, for the nodes of the activity category, generating an activity execution workflow corresponding to each parameter according to the association relationship between the nodes of the activity category includes:
[0022] According to the parent-child relationship between nodes of the activity category, multiple child nodes with the same parent node are grouped into node groups of the same level;
[0023] For each node group at the same level, determining the execution order among the multiple sub-nodes at the same level according to the immediately preceding relationship and immediately succeeding relationship among the multiple sub-nodes at the same level included in the node group at the same level;
[0024] According to the execution order between multiple sub-nodes of the same level included in each node group of the same level and the execution order between nodes of different levels, an activity execution workflow corresponding to each parameter is generated.
[0025] Furthermore, for each node group at the same level, determining the execution order among multiple sub-nodes at the same level according to the immediately preceding relationship and immediately succeeding relationship among multiple sub-nodes at the same level included in the node group at the same level includes:
[0026] For each node group at the same level, the child nodes in the node group at the same level that have a close preceding relationship or a close succeeding relationship are put into a query array;
[0027] According to the immediate preceding relationship between the child nodes, the child node with the first execution order in the query array is identified, and the execution sequence number of the child node is determined as the number of times the query array is identified;
[0028] The child node that is the first in the execution order is deleted from the query array, and the child node that is the first in the execution order in the query array is re-iterated to identify until the query array is empty.
[0029] The embodiment of the present application also provides a device for generating a parameter calculation workflow, the device comprising:
[0030] An acquisition module is used to acquire a pre-built parameter calculation knowledge graph of a target domain; wherein the parameter calculation knowledge graph includes nodes and associations between nodes;
[0031] An identification module, used to identify the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes;
[0032] A generation module is used to generate a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph according to the category of each node and the association relationship between the nodes.
[0033] Furthermore, the categories of the nodes include objects, data and activities; the association relationships between the nodes include: parent-child relationship, immediate predecessor relationship, immediate successor relationship, input relationship, output relationship, inheritance relationship and inclusion relationship;
[0034] When the identification module is used to identify the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes, the identification module is used to:
[0035] According to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes, identifying basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph;
[0036] According to the parent-child relationship, inheritance relationship and inclusion relationship between nodes, the extended nodes of the activity category are identified based on the basic node expansion of the activity category, and the extended nodes of the data category are identified based on the basic node expansion of the data category;
[0037] The nodes in the parameter calculation knowledge graph, except for the nodes of the activity category and the nodes of the data category, are determined to be object category nodes.
[0038] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of a method for generating a parameter calculation workflow as described above are performed.
[0039] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a parameter calculation workflow as described above are executed.
[0040] The embodiments of the present application provide a method, device, electronic device and medium for generating a parameter calculation workflow, which can accurately infer the parameter calculation workflow based on the knowledge graph, so as to quickly determine the various links and the order of the links involved based on the parameter calculation workflow when the data needs to be changed, thereby providing a guarantee for realizing the automatic adjustment of parameters.
[0041] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A flow chart showing a method for generating a parameter calculation workflow provided by an embodiment of the present application is shown;
[0044] Figure 2 A schematic diagram of an activity execution workflow for adjusting parameters of a natural gamma ray method mud content calculation model provided in an embodiment of the present application is shown;
[0045] Figure 3 A schematic diagram of the structure of a parameter calculation workflow generation device provided in an embodiment of the present application is shown;
[0046] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0047] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.
[0048] Research has found that in actual applications, the calculation process of a parameter is very complicated, often involving the coordination of multiple calculation processes in multiple professional departments. Take the oil and gas parameters that oil companies are concerned about as an example, such as proved reserves parameters. First, the basic data used to calculate proved reserves parameters will change repeatedly, such as the number of wells, layer positions, the lower limit standard of effective thickness, oil test and production test data, oil (gas) bearing area, etc.; secondly, oil and gas parameters, as the core assets of oil companies, need to undergo multi-level review, and modifications are often proposed during the review process.
[0049] Because the parameter calculation process is orderly, and the subsequent calculation steps depend on the previous calculation steps, changes in data, proposed modifications, and especially modifications to basic data, affect the entire system. Once these situations occur, the existing technology requires manual investigation and coordination of the various parameter calculation links involved. This results in: first, a huge amount of repetitive low-value work and collaboration and coordination work is introduced, which seriously restricts the timeliness of work; second, the parameter calculation work wastes resources seriously, and with limited resources, more valuable research work resources are insufficiently invested, reducing the quality of work; third, the relationship between parameters is complex, there are many collaborators, and it is difficult to ensure consistency in tedious modifications. The above problems will lead to low calculation efficiency and easily cause data inconsistency, reducing the quality and reliability of parameter calculation.
[0050] Therefore, there is an urgent need for an intelligent transmission and update mechanism for adjustment in parameter calculation work, so as to greatly improve the timeliness and quality of adjustment work based on the parameter research and research process that have been carried out, and ensure the reliability of parameter calculation.
[0051] Based on this, an embodiment of the present application provides a method for generating a parameter calculation workflow, so as to accurately infer the parameter calculation workflow based on the knowledge graph, so as to quickly determine the various links and the order of the links involved based on the parameter calculation workflow when the data needs to change, thereby providing a guarantee for realizing the automatic adjustment of parameters.
[0052] See also Figure 1 , Figure 1 The following is a flow chart of a method for generating a parameter calculation workflow provided by an embodiment of the present application. Figure 1 As shown in, the generation method provided in the embodiment of the present application includes:
[0053] S101. Obtain a pre-built parameter calculation knowledge graph for the target domain.
[0054] The following takes the target field as the oil and gas reserve calculation field and the corresponding parameter calculation workflow of each oil and gas reserve parameter as an example to describe the implementation process of this application in detail.
[0055] Among them, the parameter calculation knowledge graph includes nodes and the association relationships between nodes; the parameter calculation knowledge graph can be constructed using the knowledge graph construction method of the existing technology, and this application does not impose any restrictions here.
[0056] S102. Identify the category of each node in the parameter calculation knowledge graph based on the association relationship between the nodes.
[0057] Among them, the categories of nodes include objects, data and activities; for the convenience of explanation and understanding, the nodes of each category are referred to as the corresponding categories below, that is, objects refer to nodes of the object category, data refer to nodes of the data category, and activities refer to nodes of the activity category; each node in the parameter calculation knowledge graph can represent an object, data or activity, and an object refers to an entity in the oil and gas field, such as a well, a calculation unit, a formation, etc.; an activity refers to the processing calculation of a functional module, that is, a professional algorithm in the field of vertical oil and gas reserve calculation; data refers to the input and output of an activity, representing the basic data and result data in the oil and gas reserve calculation, etc. The association relationship between the nodes includes: parent-child relationship, immediate predecessor relationship, immediate successor relationship, input relationship, output relationship, inheritance relationship and inclusion relationship.
[0058] Parent-child relationship (FATHER_IS): It is used to describe the multi-level relationship between nodes of the same category and has directionality. Taking activities as an example, if the calculation of single well reserve parameters is taken as the first-level activity, it includes multiple second-level activities such as logging curve standardization, logging curve square wave, single well parameter calculation, effective thickness lower limit standard determination, fluid identification, single well unit parameter calculation, etc., and fluid identification includes multiple third-level activities such as square wave value selection, interpretation standard judgment interpretation conclusion, interpretation conclusion aggregation, interpretation conclusion manual correction, and so on.
[0059] Predecessor relationship (PROCEDING_OF): It is used to describe the relationship between activities and has directionality. The predecessor relationship describes that this activity can only be executed after all the predecessor activities are completed. For example, when calculating the unit geological reserves, it is necessary to ensure that the unit effective thickness determination, unit effective porosity determination and other activities are completed before it can be executed.
[0060] Subsequent relationship (SUBSEQUENT_OF): It is used to describe the relationship between nodes of the activity category and is directional. The subsequent relationship describes the activity to be performed after the current activity is completed. For example, after the unit oil and gas area is delineated, the activity to be performed next is the well determination activity within the unit oil and gas area.
[0061] Input relationship (OUTPUT_TO): It is used to describe the relationship between activities and data, and it has directionality. The output is the result data of the activity. For example, the output of the logging curve standardization activity data is the standardized logging curve. At this time, the logging curve is consistent among multiple wells.
[0062] Inheritance relationship (INHERIT_OF): It is used to describe the blood relationship between the same type of data and has directionality. For example, the well logging curves before and after standardization have a complete or partial inheritance relationship.
[0063] Inclusion relationship (INCLUDE_IN): describes the relationship between concepts (i.e., activities, data, and objects) and actual ontology data. In addition to abstract concepts, the parameter calculation knowledge graph can also include specific oil and gas data. The abstract concept and the specific oil and gas data are in an inclusion relationship. For example, the well logging curve includes the AC curve, and the wells include Well 1 and Well 2.
[0064] The relationship (RELATION_IS) is used to describe a broader relationship without directionality. It describes any thing related to the parameter calculation knowledge graph. For example, a well and a logging curve are an association relationship. The logging curve itself is data, which is the response data of the logging principle acting on the formation and is measured along the wellbore.
[0065] In this step, according to the meaning of the various relationships defined above, the specific relationship between the nodes in the parameter calculation knowledge graph can be identified, and then the category of each node in the parameter calculation knowledge graph can be identified according to the meaning of the various relationships defined. In this way, it is avoided to define the category of each node in advance when constructing the parameter calculation knowledge graph, especially when the parameter calculation knowledge graph is very complex, which can save workload and improve generation efficiency.
[0066] In a possible implementation, step S102 may include:
[0067] S1021. Identify basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph according to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes.
[0068] In a specific implementation, for any node, according to the association relationship between nodes, if it is determined that the node corresponds to any input node or output node or immediately preceding node or immediately succeeding node, the node is determined as a node of an activity category.
[0069] If it is determined that the node is an input node or an output node of any activity category node, the node is determined as a data category node.
[0070] S1022: According to the parent-child relationship, inheritance relationship and inclusion relationship between nodes, identify the extended nodes of the activity category based on the basic node expansion of the activity category and identify the extended nodes of the data category based on the basic node expansion of the data category.
[0071] That is, in a specific implementation, for any node, if it is determined that the node has a parent-child relationship, inheritance relationship, or inclusion relationship with any node that has been determined as an activity category, then the node is also determined as a node of an activity category; if it is determined that the node has a parent-child relationship, inheritance relationship, or inclusion relationship with any node that has been determined as a data category, then the node is also determined as a node of a data category;
[0072] S1023. Determine the nodes in the parameter calculation knowledge graph, except for the nodes of the activity category and the nodes of the data category, as object category nodes.
[0073] S103. Generate a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph according to the category of each node and the association relationship between nodes.
[0074] Here, in order to realize the automatic and precise adjustment of oil and gas reserve parameters, for the changed parameters (nodes), it is necessary to derive the related activities associated with the parameter changes step by step, as well as the corresponding input and output data, the work objects targeted by the input and output data, and identify all the related activities and sequences, including the execution attributes that can be executed asynchronously and must be executed synchronously. This ordered list of executed activities and related data object information is called the reserve calculation workflow. Furthermore, when any node is monitored to have changed, the parameter calculation workflow corresponding to the changed node can be determined backward (i.e., in the direction affected by the changed node) with the changed node as the starting point. For nodes of the object category, parameter changes can be changes in the objects represented by the nodes; for nodes of the data category, parameter changes can be changes in the types of data represented by the nodes; for nodes of the activity category, parameter changes can be changes in the algorithms represented by the nodes.
[0075] In a possible implementation, step S103 may include:
[0076] S1031. For nodes of the activity category, generate an activity execution workflow corresponding to each parameter according to the association relationship between the nodes of the activity category.
[0077] In specific implementation, step S1031 may include:
[0078] Step 1: According to the parent-child relationship between nodes of the activity category, multiple child nodes with the same parent node are grouped into node groups of the same level.
[0079] In this step, concepts of the same level are only traced for the parent-child relationship, and concepts with the same father are concepts of the same level. The three categories of concepts, activity, data, and object, can be traced level by level to form a multi-level linked list. Concepts at the same level in the linked list are concepts of the same level. Among them, for nodes of the activity category, multiple child nodes under the same parent node are grouped into a node group of the same level, so that the execution order between multiple child nodes in the node group of the same level can be determined through subsequent steps.
[0080] Step 2: For each node group at the same level, determine the execution order among multiple sub-nodes at the same level according to the immediately preceding relationship and immediately succeeding relationship among multiple sub-nodes at the same level included in the node group at the same level.
[0081] As defined above, the predecessor relationship describes that the current activity can only be executed after the predecessor activity is completed, and the successor relationship describes the activity that will be executed next after the current activity is completed; therefore, the predecessor relationship and successor relationship specify the execution order between child nodes. In this step, an iterative method can be used to quickly and accurately determine the execution order among child nodes of the same level based on the predecessor relationship and successor relationship.
[0082] In a possible implementation, step 2 may include:
[0083] Step 1: For each node group at the same level, put the child nodes with a close preceding relationship or a close succeeding relationship in the node group at the same level into a query array.
[0084] Step 2: According to the immediate preceding relationship between the child nodes, identify the child node that is the first in the execution order in the query array, and determine the execution sequence number of the child node as the number of times the query array is identified.
[0085] The purpose of this step is to find the top-level child node in the query array, that is, there is no previous activity, or there is a previous activity but it is not in the query array; this child node is used as the top-level child node in the current query array, and the execution sequence number of this child node is determined as the number of times the query array is identified, such as the execution sequence number corresponding to the first search and identification is 1, the second is 2, and so on.
[0086] Step 3: Delete the child node with the first execution order from the query array, and iterate again to identify the child node with the first execution order in the query array until the query array is empty.
[0087] In this step, the child node with the first execution order is deleted from the query array, and the identification process of the second step is repeated and iterated, that is, the child node with the first execution order in the query array after deleting a child node is identified again; the second and third steps are iterated until the query array is empty, and the execution order between multiple child nodes of the same level included in the node group of the same level has been identified. At this point, the activities of the same level are already in order, and the concept of order means that all previous activities must be completed before the subsequent activities are executed.
[0088] Step 3: Generate an activity execution workflow corresponding to each parameter according to the execution order between multiple sub-nodes of the same level included in each node group of the same level and the execution order between nodes of different levels.
[0089] Here, the execution order between nodes at different levels means that after all sub-level activities within a high-level activity are completed, the high-level activity is completed; after the same-level activity is completed, it will be traced back to its parent activity, and the execution will continue in sequence at the same level. In this way, according to the execution order between multiple sub-nodes at the same level and the execution order between nodes at different levels, the activity execution workflow corresponding to each parameter is generated. Figure 2 , Figure 2 The following is a schematic diagram of an activity execution workflow for adjusting parameters of a natural gamma ray method mud content calculation model provided in an embodiment of the present application. Figure 2 As shown, the activity execution workflow is the backbone of the parameter calculation workflow, which embodies the orderly executed activities and activity sequence, including activity nodes that can be executed asynchronously and must be executed synchronously.
[0090] S1032. Determine, according to the association relationship between the nodes, an associated node of each activity category node in the activity execution workflow corresponding to each parameter.
[0091] Among them, the associated nodes of each active category node include at least one of the following items: a node of the data category input to the node, a node of the data category output by the node, a node of the object category on which the node acts, and a node of the object category targeted by the node of the data category input to the node and the node of the data category output by the node.
[0092] S1033. Generate a parameter calculation workflow corresponding to each parameter according to the activity execution workflow corresponding to each parameter and the associated node of each activity category node.
[0093] For steps S1032 and S1033, after the related activity nodes are derived step by step and the activity execution workflow is formed, the corresponding input and output data and the input and output specific objects need to be associated with the activity execution workflow to generate a parameter calculation workflow.
[0094] Furthermore, after generating the parameter calculation workflow corresponding to each parameter, the parameter calculation workflow can be input into the scheduler; thus, after any parameter is updated, the scheduler can use it as a starting point and automatically realize the correct adjustment of the reserve parameters after the parameter based on the parameter calculation workflow.
[0095] A method for generating a parameter calculation workflow provided in an embodiment of the present application can realize intelligent monitoring of parameter changes, and perform knowledge reasoning based on the knowledge graph with the changed parameters as the starting point, derive related activities step by step, as well as the corresponding input and output data, and the objects corresponding to the input and output data, and identify all related activities and sequences, including activity nodes that can be executed asynchronously and must be executed synchronously, thereby giving full play to the advantages of the graph in knowledge reasoning to accurately infer the parameter calculation workflow. This generation mechanism has better versatility and flexibility, and can quickly determine the various links involved and the order of links when data needs to change, thereby providing a guarantee for realizing automatic adjustment of parameters.
[0096] See also Figure 3 , Figure 3 This is a schematic diagram of a device for generating a parameter calculation workflow provided by an embodiment of the present application. Figure 3 As shown in , the generating device 300 includes:
[0097] An acquisition module 310 is used to acquire a pre-constructed parameter calculation knowledge graph of a target domain; wherein the parameter calculation knowledge graph includes nodes and associations between nodes;
[0098] An identification module 320, used to identify the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes;
[0099] The generation module 330 is used to generate a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph according to the category of each node and the association relationship between the nodes.
[0100] Furthermore, the categories of the nodes include objects, data and activities; the association relationships between the nodes include: parent-child relationship, immediate predecessor relationship, immediate successor relationship, input relationship, output relationship, inheritance relationship and inclusion relationship;
[0101] When the identification module 320 is used to identify the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes, the identification module 320 is used to:
[0102] According to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes, identify basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph;
[0103] According to the parent-child relationship, inheritance relationship and inclusion relationship between nodes, the extended nodes of the activity category are identified based on the basic node expansion of the activity category, and the extended nodes of the data category are identified based on the basic node expansion of the data category;
[0104] The nodes in the parameter calculation knowledge graph, except for the nodes of the activity category and the nodes of the data category, are determined to be object category nodes.
[0105] Further, when the identification module 320 is used to identify the basic nodes of the activity category and the basic nodes of the data category in the parameter calculation knowledge graph according to the immediate preceding relationship, the immediate succeeding relationship, the input relationship and the output relationship between the nodes, the identification module 320 is used to:
[0106] For any node, according to the association relationship between nodes, if it is determined that the node corresponds to any input node or output node or immediately preceding node or immediately succeeding node, then the node is determined as a node of an activity category;
[0107] If it is determined that the node is an input node or an output node of any activity category node, the node is determined as a data category node.
[0108] Furthermore, when the generation module 330 is used to generate a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph according to the category of each node and the association relationship between the nodes, the generation module 330 is used to:
[0109] For nodes of the activity category, an activity execution workflow corresponding to each parameter is generated according to the association relationship between the nodes of the activity category;
[0110] Determine the associated nodes of each activity category node in the activity execution workflow corresponding to each parameter according to the association relationship between the nodes; wherein the associated nodes of each activity category node include at least one of the following items: a node of a data category input to the node, a node of a data category output by the node, a node of an object category acted upon by the node, and a node of an object category targeted by the node of the data category input to the node and the node of the data category output by the node;
[0111] According to the activity execution workflow corresponding to each parameter and the associated nodes of each activity category node, a parameter calculation workflow corresponding to each parameter is generated.
[0112] Furthermore, when the generating module 330 is used to generate the activity execution workflow corresponding to each parameter for the nodes of the activity category according to the association relationship between the nodes of the activity category, the generating module 330 is used to:
[0113] According to the parent-child relationship between nodes of the activity category, multiple child nodes with the same parent node are grouped into node groups of the same level;
[0114] For each node group at the same level, determining the execution order among the multiple sub-nodes at the same level according to the immediately preceding relationship and immediately succeeding relationship among the multiple sub-nodes at the same level included in the node group at the same level;
[0115] According to the execution order between multiple sub-nodes of the same level included in each node group of the same level and the execution order between nodes of different levels, an activity execution workflow corresponding to each parameter is generated.
[0116] Furthermore, when the generation module 330 is used to determine the execution order among multiple sub-nodes of the same level for each node group of the same level according to the immediately preceding relationship and the immediately succeeding relationship among multiple sub-nodes of the same level included in the node group of the same level, the generation module 330 is used to:
[0117] For each node group at the same level, the child nodes in the node group at the same level that have a close preceding relationship or a close succeeding relationship are put into a query array;
[0118] According to the immediate preceding relationship between the child nodes, the child node with the first execution order in the query array is identified, and the execution sequence number of the child node is determined as the number of times the query array is identified;
[0119] The child node that is the first in the execution order is deleted from the query array, and the child node that is the first in the execution order in the query array is re-iterated to identify until the query array is empty.
[0120] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown in , the electronic device 400 includes a processor 410 , a memory 420 and a bus 430 .
[0121] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, the above-mentioned Figure 1 The steps of a method for generating a parameter calculation workflow in the method embodiment shown are specifically implemented in the method embodiment and will not be described in detail here.
[0122] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 1 The steps of a method for generating a parameter calculation workflow in the method embodiment shown are specifically implemented in the method embodiment and will not be described in detail here.
[0123] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0127] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0128] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for generating a parameter calculation workflow, characterized in that: The generation method comprises: Obtaining a pre-constructed parameter calculation knowledge graph of a target domain; wherein the parameter calculation knowledge graph includes nodes and association relationships between nodes; According to the association relationship between the nodes, identifying the category of each node in the parameter calculation knowledge graph; According to the category of each node and the association relationship between nodes, a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph is generated.
2. The generation method according to claim 1, characterized in that: The categories of the nodes include objects, data and activities; the association relationships between the nodes include: parent-child relationship, immediate predecessor relationship, immediate successor relationship, input relationship, output relationship, inheritance relationship and inclusion relationship; The step of identifying the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes includes: According to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes, identifying basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph; According to the parent-child relationship, inheritance relationship and inclusion relationship between nodes, the extended nodes of the activity category are identified based on the basic node expansion of the activity category, and the extended nodes of the data category are identified based on the basic node expansion of the data category; The nodes in the parameter calculation knowledge graph, except for the nodes of the activity category and the nodes of the data category, are determined to be object category nodes.
3. The generation method according to claim 2, characterized in that: The step of identifying basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph according to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes includes: For any node, according to the association relationship between nodes, if it is determined that the node corresponds to any input node or output node or immediately preceding node or immediately succeeding node, then the node is determined as a node of an activity category; If it is determined that the node is an input node or an output node of any activity category node, the node is determined as a data category node.
4. The generation method according to claim 2, characterized in that: The step of generating a parameter calculation workflow corresponding to each parameter in the target domain according to the category of each node and the association relationship between the nodes includes: For nodes of the activity category, an activity execution workflow corresponding to each parameter is generated according to the association relationship between the nodes of the activity category; Determine the associated nodes of each activity category node in the activity execution workflow corresponding to each parameter according to the association relationship between the nodes; wherein the associated nodes of each activity category node include at least one of the following items: a node of a data category input to the node, a node of a data category output by the node, a node of an object category acted upon by the node, and a node of an object category targeted by the node of the data category input to the node and the node of the data category output by the node; According to the activity execution workflow corresponding to each parameter and the associated nodes of each activity category node, a parameter calculation workflow corresponding to each parameter is generated.
5. The generation method according to claim 4, characterized in that: For the nodes of the activity category, generating an activity execution workflow corresponding to each parameter according to the association relationship between the nodes of the activity category includes: According to the parent-child relationship between nodes of the activity category, multiple child nodes with the same parent node are grouped into node groups of the same level; For each node group at the same level, determining the execution order among the multiple sub-nodes at the same level according to the immediately preceding relationship and immediately succeeding relationship among the multiple sub-nodes at the same level included in the node group at the same level; According to the execution order between multiple sub-nodes of the same level included in each node group of the same level and the execution order between nodes of different levels, an activity execution workflow corresponding to each parameter is generated.
6. The generation method according to claim 5, characterized in that: The step of determining, for each node group at the same level, the execution order among the multiple sub-nodes at the same level according to the preceding relationship and the succeeding relationship among the multiple sub-nodes at the same level included in the node group at the same level, includes: For each node group at the same level, the child nodes in the node group at the same level that have a close preceding relationship or a close succeeding relationship are put into a query array; According to the immediate preceding relationship between the child nodes, the child node with the first execution order in the query array is identified, and the execution sequence number of the child node is determined as the number of times the query array is identified; The child node that is the first in the execution order is deleted from the query array, and the child node that is the first in the execution order in the query array is re-iterated to identify until the query array is empty.
7. A device for generating a parameter calculation workflow, characterized in that: The generating device comprises: An acquisition module is used to acquire a pre-built parameter calculation knowledge graph of a target domain; wherein the parameter calculation knowledge graph includes nodes and associations between nodes; An identification module, used to identify the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes; A generation module is used to generate a parameter calculation workflow corresponding to each parameter in the parameter calculation knowledge graph according to the category of each node and the association relationship between the nodes.
8. The generating device according to claim 7, characterized in that: The categories of the nodes include objects, data and activities; the association relationships between the nodes include: parent-child relationship, immediate predecessor relationship, immediate successor relationship, input relationship, output relationship, inheritance relationship and inclusion relationship; When the identification module is used to identify the category of each node in the parameter calculation knowledge graph according to the association relationship between the nodes, the identification module is used to: According to the immediately preceding relationship, immediately succeeding relationship, input relationship, and output relationship between nodes, identifying basic nodes of the activity category and basic nodes of the data category in the parameter calculation knowledge graph; According to the parent-child relationship, inheritance relationship and inclusion relationship between nodes, the extended nodes of the activity category are identified based on the basic node expansion of the activity category, and the extended nodes of the data category are identified based on the basic node expansion of the data category; The nodes in the parameter calculation knowledge graph, except for the nodes of the activity category and the nodes of the data category, are determined to be object category nodes.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of a method for generating a parameter calculation workflow as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a parameter calculation workflow according to any one of claims 1 to 6 are executed.