OTX diagnostic sequence graphical editing method and system based on semantic intermediate layer representation
By constructing a semantic intermediate layer representation and difference detection, the problems of insufficient semantic understanding and limited editing accuracy of the graphical editing tool for OTX diagnostic sequences are solved, realizing real-time synchronization between graphical operations and code modifications, and improving development efficiency and team collaboration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-03-10
AI Technical Summary
Existing graphical editing tools for OTX diagnostic sequences lack semantic understanding, have limited editing accuracy, lack automated support for complex reconstruction operations, and rely on the experience of developers.
A semantic intermediate layer representation is constructed, and semantic-level precise control of graphical editing is achieved through semantic tree data structure and operation primitive set, enabling difference detection and conflict identification.
It achieves real-time two-way synchronization between graphical operations and code modifications, eliminating the problem of the graphical interface gradually becoming unusable and improving development efficiency and team collaboration efficiency.
Smart Images

Figure CN121635872A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of OTX development, and particularly relates to an OTX diagnosis sequence graphical editing method and system based on a semantic intermediate layer representation. BACKGROUND
[0002] In the development process of the OTX diagnosis sequence, graphical editing is an important means to improve the development efficiency. However, the existing technology has the following problems: 1. Insufficient semantic understanding: the existing graphical editing tool only stays at the syntax level and cannot deeply understand the semantic information of the OTX diagnosis sequence, resulting in lack of intelligence in editing operations; 2. Limited editing accuracy: the traditional editing method cannot perform semantic-level verification before operation, which is prone to logical errors and difficult to provide accurate editing assistance; 3. Weak support for reconstruction: complex reconstruction operations lack safe and reliable automated support and are heavily dependent on the experience of developers. SUMMARY
[0003] In view of the problems in the prior art, the present application provides an OTX diagnosis sequence graphical editing method and system based on a semantic intermediate layer representation, establishes a semantic intermediate layer, and realizes semantic-level accurate control of OTX diagnosis sequence editing operations and complex reconstruction of graphical editing operations into semantic operation primitives corresponding to the graph.
[0004] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.
[0005] According to a first aspect of the present application, an OTX diagnosis sequence graphical editing method based on a semantic intermediate layer representation is provided, comprising: building a semantic intermediate representation layer, inputting the OTX diagnosis sequence into the semantic intermediate representation layer, and outputting a semantic tree data structure; establishing a semantic operation primitive set based on the semantic tree data structure, and converting graphical editing operations into semantic operation primitives corresponding to the graph based on the semantic operation primitive set.
[0006] In some embodiments of the present application, based on the foregoing scheme, the building of the semantic intermediate representation layer, the inputting of the OTX diagnosis sequence into the semantic intermediate representation layer, and the outputting of the semantic tree data structure comprise: establishing a semantic node system; building the semantic intermediate representation layer based on the semantic node system; The semantic tree algorithm model is constructed, an OTX diagnosis sequence is input, a syntax element in the OTX diagnosis sequence is recognized, the syntax element is mapped to a semantic node instance, a connection relationship between nodes in the semantic node instance is established based on a semantic intermediate representation layer, a semantic tree data structure is constructed based on the connection relationship between the nodes, and the semantic tree data structure is output.
[0007] In some embodiments of the present application, based on the foregoing scheme, the semantic node system includes a diagnosis service node, a flow control node, and a data operation node. The semantic intermediate representation layer includes a connection relationship between nodes, and the connection relationship between the nodes includes a parent-child relationship, a sibling relationship, a reference relationship, and a dependency relationship.
[0008] In some embodiments of the present application, based on the foregoing scheme, the semantic operation primitive set is established based on the semantic tree data structure, including: Designing an atomic operation primitive; Designing a composite operation primitive; Designing an operation verification mechanism for the atomic operation primitive and the composite operation primitive, and the operation verification mechanism includes precondition verification, postcondition verification, and rollback recovery mechanism.
[0009] In some embodiments of the present application, based on the foregoing scheme, the atomic operation primitive includes a node creation primitive, a node deletion primitive, an attribute update primitive, and a connection establishment primitive. The composite operation primitive includes a sequence extraction primitive, an inline expansion primitive, and a pattern reconstruction primitive.
[0010] In some embodiments of the present application, based on the foregoing scheme, further comprising: Performing difference detection on the semantic operation primitives corresponding to the semantic tree data structure and the graph, obtaining node-level differences, relationship-level differences, and structure-level differences, to realize semantic-based conflict detection, specifically: Obtaining the node-level differences, including: Traversing all nodes of the semantic operation primitives corresponding to the semantic tree data structure and the graph, comparing node identifiers, identifying newly added and deleted nodes, comparing node attribute values, identifying attribute changes, and recording node position change information; Obtaining the relationship-level differences, including: Comparing parent-child relationship changes between nodes, detecting connection relationship establishment and disconnection, analyzing reference relationship updates, and identifying dependency relationship changes; Obtaining the structure-level differences, including: Analyzing control flow structure changes, detecting data flow path changes, and identifying scope boundary changes.
[0011] In some embodiments of the present application, based on the foregoing scheme, further comprising: The data flow influence result, the control flow influence result and the symbol usage influence result are obtained based on the node-level difference, the relationship-level difference and the structure-level difference, and specifically: The data flow influence result is obtained, including: Starting from the modified node, the data flow direction is propagated in the forward direction, all subsequent nodes that depend on the data of the modified node are identified, and the affected data calculation and transmission path are marked; The control flow influence result is obtained, including: The position of the modified node in the control flow structure is analyzed, the predecessor and successor nodes that depend on the control flow structure are identified, and the affected execution path and branch condition are marked; The symbol usage influence result is obtained, including: The variables and symbols involved in the modification are identified, all nodes using these symbols are found, and the influence of the change of the symbol value on the use node is analyzed.
[0012] According to a second aspect of the present application, a graphical editing system of an OTX diagnosis sequence based on a semantic intermediate layer representation is provided, including: A first construction module is configured to construct a semantic intermediate representation layer, input the OTX diagnosis sequence into the semantic intermediate representation layer, and output a semantic tree data structure; A second construction module is configured to establish a semantic operation primitive set based on the semantic tree data structure, and convert a graphical editing operation into a semantic operation primitive corresponding to the graph based on the semantic operation primitive set.
[0013] According to a third aspect of the present application, a computer readable storage medium having a computer program stored thereon is provided, the computer program including executable instructions, when the executable instructions are executed by a processor, the method described above is implemented.
[0014] According to a fourth aspect of the present application, an electronic device is provided, including: One or more processors; A memory is configured to store executable instructions of the processor, when the executable instructions are executed by the one or more processors, the one or more processors implement the method described above.
[0015] The beneficial effects of the present application are as follows: The application provides an OTX diagnostic sequence graphical editing method and system based on a semantic intermediate layer representation.
[0016] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are included to provide a further understanding of the application, illustrate embodiments of the application and together with the description serve to explain the application. The detailed description of the application and its illustrations serve to explain the application without imposing undue limitation on the application. In the drawings: Figure 1 A flow chart of an OTX diagnostic sequence graphical editing method based on a semantic intermediate layer representation of the application; Figure 2 A schematic diagram of an OTX diagnostic sequence graphical editing system based on a semantic intermediate layer representation of the application; Figure 3 A schematic diagram of an electronic device of the application. DETAILED DESCRIPTION
[0018] In order to make the purposes, features and advantages of the application more obvious and easy to understand, the technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the embodiments described below are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the application.
[0019] It should be understood that the terms "comprise", "comprising", and other similar terms in the specification or claims of the application and the above drawings mean covering but not excluding, for example, a process, method or system, device comprising a series of steps or units, which is not limited to the listed steps or units. In addition, "first", "second" are used to distinguish different objects, and are not used to describe a specific order.
[0020] According to the first aspect of the application, referring to Figure 1 The embodiment provides an OTX diagnostic sequence graphical editing method based on a semantic intermediate layer representation, which comprises the following steps. Step S1: constructing a semantic intermediate representation layer, inputting the OTX diagnostic sequence into the semantic intermediate representation layer, and outputting a semantic tree data structure.
[0021] In some embodiments of the present embodiment, the OTX diagnostic sequence is an Excel original data, and the semantic intermediate representation layer refers to parsing the OTX diagnostic sequence into a structured semantic tree data structure with clear semantics in the data conversion process. The model not only retains the meaning of the Excel original data, but also facilitates subsequent conversion of graphical editing operations into semantic operation primitives corresponding to the graph.
[0022] In some embodiments of the present embodiment, the semantic tree data structure is a tree-shaped data representation method, each node represents a semantic unit (such as a data identifier DID, a diagnostic fault code DTC, a parameter PARAM, etc.), and the nodes are organized through parent-child relationships, and are used to construct a diagnostic data hierarchy structure conforming to the ODX-D standard in the memory.
[0023] In some embodiments of the present embodiment, constructing the semantic intermediate representation layer, inputting the OTX diagnostic sequence into the semantic intermediate representation layer, and outputting the semantic tree data structure include: establishing a semantic node system; constructing the semantic intermediate representation layer based on the semantic node system; constructing a semantic tree algorithm model, inputting the OTX diagnostic sequence, identifying the syntax elements in the OTX diagnostic sequence, mapping the syntax elements into semantic node instances, establishing the connection relationship between the nodes in the semantic node instances based on the semantic intermediate representation layer, constructing the semantic tree data structure based on the connection relationship between the nodes, and outputting the semantic tree data structure.
[0024] In some embodiments of the present embodiment, the semantic node system includes a diagnostic service node, a flow control node, and a data operation node, and complete semantic attribute specifications and constraint conditions are established for each node. The diagnostic service node includes specific diagnostic operations such as reading fault codes, writing memory, and routine control, the flow control node includes flow structures such as sequential execution, conditional branching, and loop control, and the operation node includes data processing such as variable declaration, assignment operation, and expression calculation.
[0025] In some embodiments of the present embodiment, the semantic intermediate representation layer is constructed based on the semantic node system, and the semantic intermediate representation layer includes the connection relationship between the nodes. The connection relationship between the nodes includes parent-child relationship, brother relationship, reference relationship, and dependency relationship.
[0026] Specifically, the parent-child relationship describes the containing hierarchy of nodes, the sibling nodes refer to multiple child nodes under the same parent node, and the sibling nodes usually have a parallel, mutually exclusive or sequential relationship, which is used to represent multiple diagnostic elements at the same level, the connection relationship describes the data flow and control flow between nodes, the reference relationship describes the relationship between symbol definition and use, and the dependency relationship describes the semantic dependency constraints between nodes.
[0027] In this way, based on the semantic intermediate representation layer, deep semantic understanding of the OTX diagnostic sequence is achieved, the semantic correctness of the editing operation can be identified and verified, and logical errors can be prevented.
[0028] Step S2: establishing a set of semantic operation primitives based on the semantic tree data structure, and converting the graphical editing operation into a semantic operation primitive corresponding to the graph based on the set of semantic operation primitives.
[0029] In some embodiments of the present embodiment, the set of semantic operation primitives is established based on the semantic tree data structure, including: Designing atomic operation primitives, the atomic operation primitives including node creation primitives, node deletion primitives, attribute update primitives and connection establishment primitives; Designing composite operation primitives, the composite operation primitives including sequence extraction primitives, inline expansion primitives and pattern reconstruction primitives; Designing operation verification mechanisms for atomic operation primitives and composite operation primitives, the operation verification mechanisms including pre-condition verification, post-condition verification and rollback recovery mechanisms.
[0030] In some embodiments of the present embodiment, the atomic operation primitive refers to the smallest operation unit that cannot be divided, which is used for basic editing of the semantic tree.
[0031] In some embodiments of the present embodiment, the node creation primitive is to create a new node in the semantic tree data structure, including type verification and attribute initialization; the node deletion primitive is to safely delete a node from the semantic tree data structure, automatically processing related dependency relationships; the attribute update primitive is to modify the value of a certain attribute of a node, including type checking and constraint verification; and the connection establishment primitive is to establish a node connection between two nodes, performing port compatibility verification.
[0032] In some embodiments of the present embodiment, the composite operation primitive is a complex operation composed of multiple atomic operation primitives. The sequence extraction primitive is to extract continuous row or column data from the OTX diagnostic sequence and convert it into a node sequence; the inline expansion primitive is to expand a nested or compressed data structure into multiple nodes in the semantic tree data structure; and the pattern reconstruction primitive is to reorganize the node structure according to a predefined template to comply with the ODX-D standard.
[0033] In some embodiments of the present embodiment, the operation verification mechanism refers to checking the state of the semantic tree data structure before and after performing any operation to ensure the legality of the operation and the consistency of the data. The precondition verification is the semantic correctness check before the execution of the atomic operation primitive and the composite operation primitive operation; the postcondition verification is the semantic integrity verification after the execution of the atomic operation primitive and the composite operation primitive operation; the rollback recovery mechanism is the semantic level rollback support for the operation failure of the atomic operation primitive and the composite operation primitive, which automatically recovers to the state before the operation when the operation fails or the verification fails, ensuring that the data is not damaged.
[0034] In some embodiments of the present embodiment, the graphical editing operation is converted into the semantic operation primitive corresponding to the graph based on the set of semantic operation primitives, including: The graphical editing operation is obtained, the semantic node instance corresponding to the graph and the connection relationship between the nodes in the semantic node instance are obtained based on the semantic tree data structure, and then the semantic operation primitive corresponding to the graph is obtained based on the semantic node instance corresponding to the graph and the connection relationship between the nodes in the semantic node instance.
[0035] Specifically, in one embodiment, a user drags a "conditional judgment" graphical editing operation onto the canvas.
[0036] The conversion process: obtain the semantic node instance corresponding to the "conditional judgment" graphical editing operation on the semantic tree data structure and the connection relationship between the nodes in the semantic node instance. Because the semantic tree has clearly defined that "conditional judgment" is an IfStatement node, it contains child nodes such as condition, thenBranch, and elseBranch.
[0037] Generated semantic operation primitive: generate an accurate node creation primitive (CreateNode (type='IfStatement')) primitive, rather than a vague "add a block" instruction.
[0038] In some embodiments of the present embodiment, it also includes: Differences between the semantic tree data structure and the semantic operation primitive corresponding to the graph are detected, and node-level differences, relationship-level differences, and structure-level differences are obtained.
[0039] In some embodiments of the present embodiment, the node-level difference refers to the change of the attribute of a single node itself in the semantic tree data structure, for example, modifying the name, data type, or physical unit of a parameter.
[0040] In some embodiments of the present embodiment, the relationship-level difference refers to a change in the connection relationship between nodes in the semantic tree data structure, such as changing the parent node of a parameter (moving it from one data identifier DID to another data identifier DID) or adjusting the order between sibling nodes.
[0041] In some embodiments of the present embodiment, the structure-level difference refers to a change in a large-scale sub-topology in the semantic tree data structure, such as adding, deleting, or replacing an entire diagnostic trouble code (DTC) table or data identifier (DID) in the ODX-D model.
[0042] In some embodiments of the present embodiment, the node-level difference is obtained, including: Traversing all nodes of the semantic tree data structure and the semantic operation primitives corresponding to the graph, comparing node identifiers, identifying added or deleted nodes, comparing node attribute values, identifying attribute changes, and recording node position change information.
[0043] In some embodiments of the present embodiment, the relationship-level difference is obtained, including: Comparing changes in parent-child relationships between nodes, detecting establishment and disconnection of connection relationships, analyzing updates of reference relationships, and identifying changes in dependency relationships.
[0044] In some embodiments of the present embodiment, the structure-level difference is obtained, including: Analyzing changes in control flow structures, detecting changes in data flow paths, and identifying changes in scope boundaries.
[0045] In this way, by establishing a semantic intermediate layer, the disconnection problem between graphical editing and code editing is completely solved, and by performing difference detection on the semantic tree data structure and the semantic operation primitives corresponding to the graph, real-time bidirectional synchronization of graphical operations and code modifications is achieved, and modifications by either party can be immediately and accurately reflected to the other party, maintaining consistency between the graphical view and the code view throughout the development cycle, and eliminating the problem of gradual invalidation of the graphical interface in traditional tools.
[0046] Furthermore, by obtaining the node-level difference, the relationship-level difference, and the structure-level difference, semantic-based conflict detection is achieved, which can identify logical conflicts that cannot be found by traditional text tools, facilitate automatic resolution of some semantic conflicts, reduce manual intervention, achieve real-time collaborative editing by multiple developers, and improve team collaboration efficiency.
[0047] In some embodiments of the present embodiment, the data flow impact result, the control flow impact result, and the symbol usage impact result are also obtained based on the node-level difference, the relationship-level difference, and the structure-level difference.
[0048] In some embodiments of the present embodiment, the data flow impact result refers to a change in data content or path caused by an operation (such as modifying a parameter).
[0049] In some embodiments of the present embodiment, the control flow impact result refers to a change in program execution logic or path caused by an operation. For example, during the conversion process, if a configuration error of a DID is detected, the system will trigger an exception handling branch, skip the generation of the DID and record a log, instead of continuing to execute the normal process.
[0050] In some embodiments of the present embodiment, the symbol usage impact result refers to an impact on the reference relationship of symbols (such as names, identifiers) in the system caused by an operation (such as renaming, deleting a node).
[0051] In some embodiments of the present embodiment, the data flow impact result is obtained, including: Starting from the modified node, propagating forward along the data flow direction, identifying all subsequent nodes that depend on the data of the modified node, and marking the affected data calculation and transmission path.
[0052] In some embodiments of the present embodiment, the control flow impact result is obtained, including: Analyzing the position of the modified node in the control flow structure, identifying the predecessor and successor nodes that depend on the control flow structure, and marking the affected execution path and branch condition.
[0053] In some embodiments of the present embodiment, the symbol usage impact result is obtained, including: Identifying the variables and symbols involved in the modification, finding all nodes that use these symbols, and analyzing the impact of the change in symbol value on the use nodes.
[0054] In the present embodiment, the data flow impact result, the control flow impact result, and the symbol usage impact result are also combined, and the duplicate impact nodes are removed to generate a final impact range set.
[0055] In this way, through the advanced semantic difference calculation algorithm, the semantic impact range of the OTX diagnostic sequence modification can be accurately identified, including the data flow impact result, the control flow impact result, and the symbol usage impact result, and then a visual impact analysis report is provided to help developers understand and modify, and intelligent test case recommendation based on impact analysis is supported to optimize the regression test strategy.
[0056] According to a second aspect of the present application, as Figure 2 shown, the present embodiment provides an OTX diagnostic sequence graphical editing system based on a semantic intermediate layer representation, which includes: The first construction module is configured to construct a semantic intermediate representation layer, input the OTX diagnosis sequence into the semantic intermediate representation layer, and output a semantic tree data structure. The second construction module is configured to establish a semantic operation primitive set based on the semantic tree data structure, and convert the graphical editing operation into a semantic operation primitive corresponding to the graph based on the semantic operation primitive set.
[0057] The embodiment further includes: The difference detection module is configured to perform difference detection on the semantic tree data structure and the semantic operation primitive corresponding to the graph, and obtain a node-level difference, a relationship-level difference, and a structure-level difference.
[0058] The impact result acquisition module is configured to acquire a data flow impact result, a control flow impact result, and a symbol usage impact result based on the node-level difference, the relationship-level difference, and the structure-level difference.
[0059] Specifically, the embodiment corresponds to the above method embodiment one by one, and the functions of each module have been described in detail in the corresponding method embodiment, and thus will not be described one by one.
[0060] According to a third aspect of the present application, the embodiment provides a computer readable storage medium having a computer program stored thereon, the computer program comprising executable instructions which, when executed by a processor, implement the above method.
[0061] The present application can implement all or part of the above method, and can also be completed by a computer program to instruct related hardware. The computer program can be stored in a computer readable storage medium. When the computer program is executed by a processor, the steps of each method embodiment described above can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium can include any entity or system that can carry computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0062] According to a fourth aspect of the present application, as Figure 3 shown, an electronic device is provided, comprising: one or more processors; a memory storing executable instructions of the processor that, when executed by the one or more processors, cause the one or more processors to implement the above-described method.
[0063] The electronic device can be in the form of a general computing device. Components of the electronic device can include, but are not limited to, the at least one processor described above, the at least one memory described above, and a bus connecting different system components, including the memory and the processor.
[0064] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can be any conventional processor. The processor is a control center of the computer system and connects various parts of the computer system through various interfaces and lines.
[0065] The memory can be used to store computer programs and / or modules, and the processor can realize various functions of the computer system by running or executing the computer programs and / or modules stored in the memory, and calling data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required for a function (such as a sound playing function, an image playing function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state memory devices.
[0066] Those skilled in the art will appreciate that embodiments of the present application can be readily used as a method, apparatus such as a system, server or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, memory, etc.) embodying computer program code thereon for use by or in connection with an instruction execution system. Program code embodied on a computer-usable storage medium can be transmitted using any apparatus adapted to transfer a set of data or instructions for execution by a processor of a computer or other
[0067] The present application is described in reference to the flowchart and / or block diagrams of the method, apparatus (system), server and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagrams, and a combination of flows and / or blocks in the flowchart and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, a special purpose computer, an embedded processor or other programmable data processing apparatus to produce a machine, so that the instructions, which are executed via the processor of the computer or other programmable data processing apparatus, generate a means for implementing the functions specified in the flowchart and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 a system to perform the functions specified in one or more blocks or flows.
[0068] These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufacture product including an instruction system to implement the functions specified in the flowchart and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 a system to perform the functions specified in one or more blocks or flows.
[0069] These computer program instructions can also be loaded to a computer or other programmable data processing apparatus, so that a series of operational steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a means for implementing the functions specified in the flowchart and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 a system to perform the functions specified in one or more blocks or flows.
[0070] It should be understood that the sequence of the steps in the above embodiments does not mean the execution order, and the execution order of the processes should be determined according to the functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0071] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in a certain embodiment can be referred to the related description of other embodiments.
[0072] The above, the above examples are only used to illustrate the technical solutions of the present application, but not limit them; although the present application is described in detail with reference to the foregoing examples, those skilled in the art should understand that the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced by equivalents; and these modifications 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.
Claims
1. A method for graphical editing of OTX diagnostic sequence based on semanticized intermediate layer representation, characterized in that, The method comprises the following steps: building a semantic intermediate representation layer, inputting an OTX diagnostic sequence into the semantic intermediate representation layer, and outputting a semantic tree data structure; establishing a semantic operation primitive set based on the semantic tree data structure, and converting a graphical editing operation into a semantic operation primitive corresponding to the graph based on the semantic operation primitive set.
2. The method of claim 1, wherein, The method of building the semantic intermediate representation layer, inputting the OTX diagnostic sequence into the semantic intermediate representation layer, and outputting the semantic tree data structure comprises the following steps: establishing a semantic node system; building the semantic intermediate representation layer based on the semantic node system; building a semantic tree algorithm model, inputting the OTX diagnostic sequence, identifying a syntax element in the OTX diagnostic sequence, mapping the syntax element into a semantic node instance, establishing a connection relationship between nodes in the semantic node instance based on the semantic intermediate representation layer, building the semantic tree data structure based on the connection relationship between the nodes, and outputting the semantic tree data structure.
3. The method of claim 1, wherein: the semantic node system comprises a diagnostic service node, a flow control node, and a data operation node; the semantic intermediate representation layer comprises a connection relationship between nodes, and the connection relationship between the nodes comprises a parent-child relationship, a brother relationship, a reference relationship, and a dependency relationship.
4. The method of claim 1, wherein, The method of establishing the semantic operation primitive set based on the semantic tree data structure comprises the following steps: designing an atomic operation primitive; designing a composite operation primitive; designing an operation verification mechanism for the atomic operation primitive and the composite operation primitive, and the operation verification mechanism comprises a precondition verification, a postcondition verification, and a rollback recovery mechanism.
5. The method of claim 4, wherein: the atomic operation primitive comprises a node creation primitive, a node deletion primitive, an attribute update primitive, and a connection establishment primitive; the composite operation primitive comprises a sequence extraction primitive, an inline expansion primitive, and a pattern reconstruction primitive.
6. The method of claim 1, wherein, The method further comprises the following steps: performing difference detection on the semantic tree data structure and the semantic operation primitive corresponding to the graph, obtaining a node-level difference, a relationship-level difference, and a structure-level difference, and realizing semantic-based conflict detection, and specifically: obtaining the node-level difference comprises the following steps: traversing all nodes of the semantic tree data structure and the semantic operation primitive corresponding to the graph, comparing node identifiers, identifying added and deleted nodes, comparing node attribute values, identifying attribute changes, and recording node position change information; obtaining the relationship-level difference comprises the following steps: comparing parent-child relationship changes between nodes, detecting connection relationship establishment and disconnection, analyzing reference relationship update situations, and identifying dependency relationship changes; obtaining the structure-level difference comprises the following steps: analyzing control flow structure changes, detecting data flow path changes, and identifying scope boundary changes.
7. The method of claim 6, wherein, The method further comprises the following steps: obtaining a data flow influence result, a control flow influence result, and a symbol usage influence result based on the node-level difference, the relationship-level difference, and the structure-level difference, and specifically: obtaining the data flow influence result comprises the following steps: starting from a modified node, forward propagating in a data flow direction, identifying all subsequent nodes that depend on data of the modified node, and marking affected data calculation and transmission paths; obtaining the control flow influence result comprises the following steps: The analysis modification node is in the position of the control flow structure, the predecessor and the successor node of the control flow structure dependence are identified, the affected execution path and the branch condition are marked; Obtaining the symbol usage influence result, including: Identifying the variable and the symbol involved in the modification, finding all the nodes using these symbols, and analyzing the influence of the symbol value change on the using nodes.
8. A graphical editing system for OTX diagnostic sequence based on a semanticized intermediate layer representation, characterized by, Including: The first construction module is used for constructing a semantic intermediate representation layer, inputting the OTX diagnosis sequence into the semantic intermediate representation layer, and outputting a semantic tree data structure; The second construction module is used for establishing a semantic operation primitive set based on the semantic tree data structure, and converting the graphic editing operation into the semantic operation primitive corresponding to the graphic based on the semantic operation primitive set.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program comprises executable instructions which, when executed by a processor, implement the method of any one of claims 1-7.
10. An electronic device, comprising: Including: One or more processors; A memory for storing executable instructions of the processor, which, when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.