WO2024031695A1 - Requirement description data reuse method and device, and storage medium - Google Patents

Requirement description data reuse method and device, and storage medium Download PDF

Info

Publication number
WO2024031695A1
WO2024031695A1 PCT/CN2022/112292 CN2022112292W WO2024031695A1 WO 2024031695 A1 WO2024031695 A1 WO 2024031695A1 CN 2022112292 W CN2022112292 W CN 2022112292W WO 2024031695 A1 WO2024031695 A1 WO 2024031695A1
Authority
WO
WIPO (PCT)
Prior art keywords
demand
behavior tree
node
map
demand behavior
Prior art date
Application number
PCT/CN2022/112292
Other languages
French (fr)
Chinese (zh)
Inventor
邹文超
唐尤华
王海峰
Original Assignee
西门子股份公司
西门子(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to PCT/CN2022/112292 priority Critical patent/WO2024031695A1/en
Publication of WO2024031695A1 publication Critical patent/WO2024031695A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N13/00Stereoscopic video systems; Multi-view video systems; Details thereof

Definitions

  • This application relates to the field of industrial technology, and in particular to a requirement description data reuse method, device and computer-readable storage medium.
  • Requirements engineering is a method of engineering production systems at a more abstract level.
  • the process of converting requirements into an executable production system requires a high degree of automation, which should at least make the conversion process significantly simpler.
  • embodiments of the present application provide, on the one hand, a method for reusing requirement description data, and on the other hand, provide a device for reusing requirement description data and a computer-readable storage medium, which can realize the reuse of requirement description data in requirements engineering, and It can improve the automation and efficiency of requirements engineering implementation.
  • a method for reusing demand description data including: building a current demand behavior tree representing the current demand description based on a preset demand behavior tree construction grammar; the demand behavior tree includes: logical nodes representing execution logic and actions representing execution operations Node; in the process of constructing the current demand behavior tree or after completing the construction of the current demand behavior tree, perform a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees, and search for the similarity with the current demand behavior tree. It is stated that the current demand behavior tree has a built demand behavior tree with the largest common subtree, so as to reuse the relevant demand description data of the found built demand behavior tree.
  • a device for reusing demand description data including at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the computer program stored in the at least one memory, Execute the requirement description data reuse method as described in any of the above embodiments.
  • the current demand behavior tree representing the current demand description is constructed based on the preset demand behavior tree construction grammar, in the process of constructing the current demand behavior tree or after the construction is completed, After creating the current demand behavior tree, compare the similarity between the current demand behavior tree and multiple stored demand behavior trees, search for the built demand behavior tree that has the largest common subtree with the current demand behavior tree, and Reuse the relevant requirement description data found in the established requirement behavior tree, thereby improving the efficiency of requirements engineering implementation.
  • Figure 1 is an exemplary flow chart of a requirement description data reuse method in an embodiment of the present application.
  • Figure 2A is an assembly diagram in an example of this application.
  • Figure 2B is an exploded view and assembly topology diagram of the assembly diagram shown in Figure 2A.
  • Figure 2C is an exploded view of the assembly process of the assembly diagram shown in Figure 2A.
  • Figure 2D is a requirements behavior tree corresponding to a subassembly process in Figure 2C.
  • Figure 3A and Figure 3B are two requirement behavior trees of an example of this application.
  • Figures 3C and 3D are schematic diagrams after adding directional connections between the two action nodes in the demand behavior tree shown in Figures 3A and 3B respectively.
  • Figure 4A is a schematic diagram of an action node graph in an example of this application.
  • Figure 4B is a schematic diagram of a conditional node graph in an example of the present application.
  • FIG. 5 is a schematic diagram of the demand map obtained corresponding to the demand behavior tree shown in FIG. 2D in this application.
  • 6A to 6D are schematic diagrams of the graph edit distance algorithm in an example of this application.
  • FIG. 6E is a schematic diagram of the largest common subgraph in the demand map shown in FIG. 6A and the demand map shown in FIG. 6D.
  • Figure 7 is a schematic diagram comparing two action node graphs in an example of this application.
  • Figure 8 is an exemplary flow chart of a method for building a demand behavior tree in an embodiment of the present application.
  • Figures 9A to 9C show three compliant pairs obtained when pairing is established based on the assembly diagram shown in 2A in an example of this application.
  • Figure 9D and Figure 9E are two non-compliant pairs obtained when pairing is established based on the assembly diagram shown in 2A in an example of this application.
  • Figure 9F is a schematic diagram after adding assembly process information to a compliant pair in an example of this application.
  • FIG. 10 is a schematic diagram of compliance pairing involved in a sub-assembly process in FIG. 2C in an example of the present application.
  • Figure 11 is an exemplary structural diagram of a requirement description data reuse device in an embodiment of the present invention.
  • Figure 12 is an exemplary structural diagram of another requirement description data reuse device in an embodiment of the present application.
  • the requirement description represented by a behavior tree can be called a requirement behavior tree (RBT, Requirement Behavior Tree).
  • RBT Requirement Behavior Tree
  • the historically constructed demand behavior trees can be stored in a database to form a library of built demand behavior trees. Later, when building the current demand behavior tree, the already built demand behavior trees are recommended. Similar requirement behavior trees in the library, thereby realizing the reuse of requirement behavior trees.
  • the relevant workflow data corresponding to similar demand behavior trees in the established demand behavior tree library can be reused in the currently constructed demand behavior.
  • the workflow corresponding to the tree refers to the executable program part that implements the corresponding operations in the required behavior tree.
  • Figure 1 is an exemplary flow chart of a requirement description data reuse method in an embodiment of the present application. As shown in Figure 1, the method may include the following processing:
  • Step 101 Construct the current demand behavior tree representing the current demand description based on the preset demand behavior tree construction grammar.
  • the demand behavior tree includes: logical nodes representing execution logic and action nodes representing execution operations.
  • logical nodes may include various nodes used to control execution logic, such as sequential nodes, parallel nodes, and conditional nodes in traditional behavior trees.
  • Figure 2A shows an assembly diagram in an example
  • Figure 2B is an exploded view and assembly topology diagram of the assembly diagram shown in Figure 2A
  • Figure 2C shows an exploded view of the assembly process of the assembly diagram shown in Figure 2A
  • P1 to P14 are the various parts (P, Part) that constitute the assembly diagram shown in Figure 2A
  • SA1 to SA10 are the various components obtained during the assembly process.
  • component SA3 + part P5 component SA4
  • the obtained result is as shown in Figure 2C
  • the demand behavior tree shown in 2D The demand behavior tree shown in 2D.
  • boxes A1 to A6 are six action nodes, which respectively represent: A1: robot (R, Robot) moves (M, Move) itself (S, Self) to part P5; A2: The robot picks up (Pi, Pick) part P5; A3: The robot coaxially (Cx, Coaxial) part P5 and part P2; A4: The robot touches (T, Touch) part P5 and part P4; A5: The robot places (Pl , Place) Part P5; A6: The robot moves itself to reset.
  • the single arrow represents the sequence node Se in the behavior tree
  • the double arrow represents the parallel node Pa in the behavior tree
  • C1 and C2 are two condition nodes, respectively representing: C1: Part P5 Coaxial part P2?
  • the question mark represents the selector (FB, Fallback) node. Its function is to execute each node mounted under the node in order. The execution of this node will not end until a node returns true.
  • the condition node C1 and the action node A3 are mounted under the selector node.
  • the action node A3 needs to be executed until the condition node C1
  • the condition of is true, that is, when part P5 and part P2 are coaxial, the selector node ends execution, that is, action node A3 is no longer executed.
  • the current demand behavior tree is constantly updated. For example, for the current demand behavior tree shown in Figure 2D, at the beginning, there are only sequential nodes in the first layer. Later, each node in the second layer will be constructed, and then each node in the third or even fourth layer will be obtained. node. After that, other nodes will be obtained until the requirements behavior tree corresponding to the entire assembly process shown in Figure 2C is obtained.
  • Step 102 During the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed, perform a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees, and search and The current demand behavior tree has a built demand behavior tree with the largest common subtree.
  • the historically constructed demand behavior tree can be stored in a database to form a built demand behavior tree library. Then in this step, the similarity of the current demand behavior tree and multiple stored demand behavior trees can be compared to find a demand behavior tree whose similarity reaches the set requirement, for example, search for a demand behavior tree that is similar to the current demand behavior tree. There is a built requirements behavior tree with a largest common subtree.
  • this step it is considered to convert the current demand behavior tree into a graph format to add directional links between the sub-nodes of the sequence nodes so that the hidden representation rules of the demand behavior tree are explicitly expressed using graph connections. , thereby obtaining the current demand map.
  • the built demand behavior tree of the subtree that is, the demand behavior tree whose similarity reaches the set requirements.
  • the demand map includes: map nodes representing each node in the corresponding demand behavior tree, and directional connections connecting each map node.
  • behavior tree nodes such as action nodes and condition nodes in the behavior tree also contain various implicit information, especially when different behavior tree nodes are described using different semantic formats, it is difficult for some applications to describe them. classification, so they cannot be compared directly.
  • the behavior tree nodes containing implicit information such as the action nodes and condition nodes are expressed according to the set semantic format, and the set semantic format can is split into multiple semantic fields.
  • the set semantic format may be: subject, predicate, object, context; wherein the context is optional.
  • the set semantic format can be split into a subject field, a predicate field, an object field, and a context field.
  • this embodiment may further provide a standard semantic library to standardize the semantics that may be involved. For example, predicates such as "move” and "coaxial” can be obtained from the standard semantic library.
  • the action nodes, condition nodes and other behavior tree nodes containing implicit information are converted into corresponding behavior tree node graphs, which include: tree node graph nodes that refer to the behavior tree nodes, A field map node that refers to each semantic field of the behavior tree node, and a directional connection between the tree node map node and each field map node.
  • the robot when it is converted into an action node graph, it can include a total of five nodes: action A, robot R, movement M, self S, and to the target object TTO. That is, the node ⁇ ⁇ action, robot, move, itself, to the target object ⁇ , and includes: action ⁇ robot, action ⁇ move, action ⁇ itself, action ⁇ to the target object, a total of four directional connections, that is, directional connections ⁇ ⁇ ( action, robot), (action, move), (action, self), (action, to target object) ⁇ .
  • the corresponding action node graph can be shown in Figure 4A.
  • the action node graph converted by the action node includes: an action graph node that refers to the action node, a field graph node that refers to each semantic field of the action node, and a connection between the action graph node and each field graph node. directional connections between.
  • conditional node “C1: Part P5, Coaxial Part P2” when it is converted into a conditional node graph, it can include four nodes: condition C, part P, coaxial Cx, and part P, that is, node ⁇ ⁇ condition, part, coaxial, part ⁇ , and includes: condition ⁇ part, condition ⁇ coaxial, condition ⁇ part, a total of three directional connections, that is, directional connection ⁇ ⁇ (condition, part), (condition, coaxial) , (condition, part) ⁇ .
  • conditional node graph can be shown in Figure 4B.
  • condition node graph converted by the condition node includes: a condition graph node that refers to the condition node, a field graph node that refers to each semantic field of the condition node, and a condition graph node that is connected between the condition graph node and each field graph node. directional connections between.
  • the part is the class of part P5 and part P2, so both Generalize to the corresponding class; in addition, predicates such as “move” and “coaxial” and contexts such as “to target object” and “to target position” can be selected from the predefined standard semantic library; "self” is action A placeholder object that can represent, for example, a robot moving on its own without performing any operations.
  • the current demand behavior tree shown in Figure 2D can be converted into the current demand map shown in Figure 5.
  • different nodes can be distinguished by different colors, and different child nodes of the same node can also be represented by different colors.
  • the Graph Edit Distance (GED) algorithm can be used to calculate the similarity.
  • 6A to 6D show a schematic diagram of the graph edit distance algorithm in an example. As shown in Figure 6A to Figure 6D, all include Type A (TA, Type A), Type B (TB, Type B), Type B, Type C (TC, Type C) and Type D (TD, Type D) Five nodes, but the directed connections between nodes are different.
  • the most similar built demand map can be found by calculating GED, and then the maximum common subgraph (Maximum Common Sub-Graph, MCS) in the most similar built demand map and the current demand map can be used to obtain the most similar built demand map. extract reusable information.
  • MCS Maximum Common Sub-Graph
  • the largest common subgraph in the current demand map of Figure 6A and the built demand map of Figure 6D can be shown as the part enclosed by the dotted line in Figure 6E, where the MCS size is 4, that is, type A ⁇ Type B ⁇ Type B ⁇ Type C, a total of 4 identical nodes with the same edges (ie directional connections).
  • each action node in the demand map Compare the map with the condition node as a whole.
  • the action node or the complete condition node in the current demand map The condition node is determined to exist in the built requirements graph.
  • the largest common subtree is the built demand behavior tree corresponding to the built demand map as the built demand behavior tree that has the largest common subtree with the current demand behavior tree.
  • Step 103 Reuse the found relevant requirement description data of the established requirement behavior tree.
  • step 102 during the process of constructing the current demand behavior tree, a similarity comparison is performed between the current demand behavior tree and multiple stored demand behavior trees.
  • step 103 the found established requirement behavior tree may be recommended as a candidate established requirement behavior tree to help build the current requirement behavior tree.
  • step 102 after completing the construction of the current demand behavior tree, a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees may be performed.
  • step 103 The sub-workflow data corresponding to the largest common subtree can be obtained from the found workflow data corresponding to the built demand behavior tree; the sub-workflow data can be reused in the work corresponding to the current demand behavior tree. in streaming data.
  • Figure 8 is an exemplary flow chart of a method for building a demand behavior tree in an embodiment of the present application. As shown in Figure 8, the method may include the following steps:
  • Step 801 Establish each compliance pairing of the assembly relationship in advance based on the historical assembly drawing, and add assembly process information for each compliance pairing.
  • each pre-established compliance pairing can be stored in a database to form a compliance matching library.
  • compliance pairing refers to a pairing consisting of mechanical drawings of two parts with an assembly relationship. That is, in this step, each compliance pair consists of mechanical drawings of two parts with an assembly relationship. Having an assembly relationship here may, for example, mean that the two parts in each conforming pair are connected to each other via part surfaces, or it may be that the spatial relationship between the two parts in each conforming pair facilitates assembly. In contrast, a pair consisting of two parts that have no assembly relationship can be called a non-compliant pair. In the process of establishing compliant matching, non-compliant matching needs to be discarded.
  • Figures 9A to 9C show three of the compliant pairings obtained when pairing is established based on the assembly drawing shown in 2A, that is, the first compliant pairing. 1.
  • part P2 and part P6 form a compliance pairing
  • part P2 and part P5 form a compliance pairing.
  • the spatial relationship between the two parts in each conforming pair facilitates assembly.
  • Figures 9D and 9E show two of the non-compliant pairs obtained when pairing is established based on the assembly diagram shown in 1A. As shown in Figures 9D and 9E, the spatial relationship between the two parts in each non-conforming pairing does not contribute to the assembly and therefore needs to be discarded.
  • the assembly process information can be described in any suitable sentence format.
  • AS asset management shell
  • OPC UA statement format etc.
  • Statement (subject, predicate, object, context).
  • the context is optional, that is, it can be null.
  • the robot picks up the part P2;
  • the robot tightens part P2 onto part P6.
  • Step 802 Receive a bill of materials including the names of various parts involved in the current assembly.
  • the part name in this embodiment can be any name represented by any one or any combination of letters, numbers, characters and words that can distinguish each part.
  • the bill of materials in this step can be a table, which lists the names of various parts.
  • the bill of materials can include: "P1" to "P14" represents the names of a total of 14 parts. There may be no matching relationship between the names of these 14 parts.
  • the names of each part in the bill of materials may also be paired in advance based on the principle that there is an assembly relationship between the two corresponding parts. For example, “P2" and “P5" can be combined into a name pair, and “P4" and "P5" can be combined into a name pair.
  • Step 803 According to the bill of materials, obtain the mechanical drawing, such as a CAD drawing, of each part in the bill of materials.
  • the mechanical drawing of each part can be obtained from a 3D product modeling system such as a PLM system.
  • the name of each part in the bill of materials can be used as an index to obtain the mechanical drawing of each part in the bill of materials.
  • Step 804 Establish multiple candidate pairings based on the obtained mechanical drawings, each candidate pairing consisting of mechanical drawings of two parts.
  • multiple candidate pairs can be obtained by combining them based on the obtained mechanical drawings. At this time, there will be both compliant candidate pairs and non-compliant candidate pairs among the multiple candidate pairs obtained.
  • the mechanical drawings of every two parts that have an assembly relationship can also be combined to obtain multiple candidate pairs. At this time, the multiple candidate pairs obtained are all compliant candidate pairs.
  • each name can be matched with the two corresponding parts.
  • the mechanical drawings of the parts are combined to obtain multiple candidate pairs. At this time, the multiple candidate pairs obtained are all compliant candidate pairs.
  • Step 805 Match each candidate pairing in the plurality of candidate pairings with each compliant pairing in the pre-established compliant pairing library in turn, and use the candidate pairing that matches the compliant pairing as the target candidate pairing. Wherein, when the similarity between the compliant pair and the candidate pair meets the set threshold, the compliant pair is the compliant pair matched by the candidate pair.
  • the non-compliant candidate pairs will not be able to match the compliant pair whose similarity meets the set threshold.
  • the non-compliant candidate pairs will not be able to match the compliant pair whose similarity meets the set threshold.
  • each candidate pair can be matched to a compliant pair whose similarity meets the set threshold.
  • a variety of matching algorithms can be used, for example, the grid comparison algorithm or the boundary representation method (BREP) comparison algorithm can be used.
  • the specific calculation can use artificial intelligence methods, such as the neural network (GNN).
  • Step 806 For each target candidate pair, append the assembly process information of the matched compliant pair to the target candidate pair.
  • Step 807 Construct a requirement behavior tree corresponding to the current assembly based on the assembly process information of all target candidate pairs according to the behavior tree grammar.
  • an assembly process list corresponding to the entire assembly process can be extracted based on the assembly process information of all target candidate pairs, and then based on the assembly process list, requirements corresponding to the entire assembly process are constructed according to the behavior tree syntax. Behavior tree.
  • FIG. 10 shows a schematic diagram of the compliance pairing involved in a sub-assembly process in FIG. 2C.
  • component SA3 + part P5 component SA4, which involves two compliance pairs, one is compliance pair 3 located on the left side of Figure 10, that is, the combination composed of parts P2 and parts P5 Compliance pairing, one is the compliance pairing 4 located on the right side of Figure 10, that is, the compliance pairing composed of part P4 and part P5.
  • the compliant paired assembly process information on the left side of Figure 10 includes: the robot moves itself to part P5; the robot picks up part P5; and the robot coaxial part P5 and part P2.
  • the compliant paired assembly process information on the right side of Figure 10 includes: the robot touches part P5 and part P4; the robot places part P5; and the robot moves itself to reset.
  • the assembly process list corresponding to this sub-assembly process can be extracted and obtained, including: A1: the robot moves itself to part P5; A2: the robot picks up part P5; A3: The coaxial parts P5 and P2 of the robot; A4: The robot touches the part P5 and the part P4; A5: The robot places the part P5; A6: The robot moves and resets itself.
  • a requirement behavior tree corresponding to the sub-assembly process as shown in Figure 2E can be constructed according to the behavior tree syntax.
  • the required behavior tree may also involve other behavior tree syntax, such as conditional nodes and other decorator nodes.
  • the requirement description data reuse method in the embodiment of the present invention has been described in detail above, and the requirement description data reuse device in the embodiment of the present invention will be described in detail below.
  • the requirement description data reuse device in the embodiment of the present invention can be used to implement the requirement description data reuse method in the embodiment of the present invention.
  • details not disclosed in detail in the device embodiment of the present invention please refer to the corresponding description in the method embodiment of the present invention.
  • Figure 11 is an exemplary structural diagram of a requirement description data reuse device in an embodiment of the present invention. As shown in Figure 11, the device may include: a first module 1101, a second module 1102 and a third module 1103.
  • the first module 1101 is used to construct a current demand behavior tree representing the current demand description based on a preset demand behavior tree construction grammar;
  • the demand behavior tree includes: logical nodes representing execution logic and action nodes representing execution operations.
  • the second module 1102 is configured to perform a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees during the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed. , find the established requirement behavior tree that has the largest common subtree with the current requirement behavior tree.
  • the third module 1103 is used to reuse the found relevant requirement description data of the established requirement behavior tree.
  • the requirement description data reuse device provided by this embodiment of the present application can be implemented in various ways.
  • the requirement description data reuse device can be compiled into a plug-in installed in a smart terminal by using an application programming interface that conforms to specific rules, or it can be packaged into an application program for users to download and use.
  • the requirement description data reuse device can be implemented in a variety of plug-in forms, such as ocx, dll and cab.
  • the requirement description data reuse device provided by this implementation of the present application can also be implemented by using specific technologies, such as Flash plug-in technology, RealPlayer plug-in technology, MMS plug-in technology, MIDI personnel plug-in technology or ActiveX plug-in technology.
  • the requirement description data reuse method provided by this implementation of the present application can be stored in various storage media in an instruction storage mode or an instruction set storage mode.
  • These storage media include but are not limited to: floppy disk, optical disk, DVD, hard disk, flash memory, USB flash memory, CF card, SD card, SDHC card, MMC card, SM card, memory stick and xD card.
  • the operating system operating in the computer can not only implement the program code read by the computer from the storage medium, but also implement part or all of the actual operations by using instructions based on the program code to implement the above embodiments. function of any embodiment.
  • FIG. 12 is an exemplary structural diagram of another requirement description data reuse device in an embodiment of the present application.
  • the device can be used to perform the method shown in Figure 1, or to implement the device in Figure 11.
  • the device may include at least one memory 1201 and at least one processor 1202.
  • some other components can be included, such as communication ports, input/output controllers, network communication interfaces, etc. These components communicate via bus 1203 and so on.
  • At least one memory 1201 is used to store computer programs.
  • the computer program can be understood as including various modules of the device shown in Figure 11.
  • at least one memory 1201 may store an operating system and the like.
  • Operating systems include but are not limited to: Android operating system, Symbian operating system, windows operating system, Linux operating system, etc.
  • At least one processor 1202 is configured to call a computer program stored in at least one memory 1201 to execute the requirements description data reuse method described in the examples of this application.
  • the processor 1202 can be a CPU, a processing unit/module, an ASIC, a logic module or a programmable gate array, etc., and it can receive and send data through a communication port.
  • the input/output controller has a display and an input device for inputting, outputting and displaying relevant data as a human-computer interaction module.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Embodiments of the present application provide a requirement description data reuse method and device, and a storage medium. The method comprises: on the basis of a preset requirement behavior tree building grammar, building a current requirement behavior tree representing the current requirement description, wherein the requirement behavior tree comprises: a logic node representing an execution logic and an action node representing an execution operation; and in the process of building the current requirement behavior tree or after the current requirement behavior tree is built, comparing the similarity between the current requirement behavior tree and a plurality of stored built requirement behavior trees, and searching for a built requirement behavior tree having the largest common subtree with the current requirement behavior tree so as to reuse related requirement description data of the found built requirement behavior tree. The technical solution in embodiments of the present application can reuse requirement description data in requirements engineering, and improve the automation degree and the efficiency of implementation of requirements engineering.

Description

需求描述数据重用方法、装置和存储介质Requirements describe data reuse methods, devices and storage media 技术领域Technical field
本申请涉及工业技术领域,特别涉及一种需求描述数据重用方法、装置和计算机可读存储介质。This application relates to the field of industrial technology, and in particular to a requirement description data reuse method, device and computer-readable storage medium.
发明背景Background of the invention
需求工程是在更抽象的层次上对生产系统进行工程设计的一种方法。将需求转换为可执行的生产系统的过程需要高度的自动化,至少应使转换过程大大简化。Requirements engineering is a method of engineering production systems at a more abstract level. The process of converting requirements into an executable production system requires a high degree of automation, which should at least make the conversion process significantly simpler.
目前,最流行的需求描述工具采用工作指令进行需求描述。然而,工作指令大多采用文本格式,且不同供应商的文本格式非常不同,其主要问题是很难将工作指令转换为树状结构或图结构等结构化数据格式,从而很难将工作指令转换为用于构建生产系统的软件或程序。因此,为了实现需求工程,首先需要一种方法来规范需求描述的生成过程并提高需求描述的自动化程度。Currently, the most popular requirements description tools use work instructions to describe requirements. However, work instructions are mostly in text format, and the text formats of different suppliers are very different. The main problem is that it is difficult to convert work instructions into structured data formats such as tree structures or graph structures, making it difficult to convert work instructions into Software or programs used to build production systems. Therefore, in order to implement requirements engineering, we first need a method to standardize the generation process of demand descriptions and improve the automation of demand descriptions.
因此,本领域内的技术人员还在致力于寻找其它的需求工程实现方案。Therefore, those skilled in the art are still working on finding other requirements engineering implementation solutions.
发明内容Contents of the invention
有鉴于此,本申请实施例中一方面提供一种需求描述数据重用方法,另一方面提供一种需求描述数据重用装置和计算机可读存储介质,能够实现需求工程中的需求描述数据重用,并且可提高需求工程实现的自动化程度和效率。In view of this, embodiments of the present application provide, on the one hand, a method for reusing requirement description data, and on the other hand, provide a device for reusing requirement description data and a computer-readable storage medium, which can realize the reuse of requirement description data in requirements engineering, and It can improve the automation and efficiency of requirements engineering implementation.
为解决上述技术问题,本申请的技术方案是这样实现的:In order to solve the above technical problems, the technical solution of this application is implemented as follows:
一种需求描述数据重用方法,包括:基于预先设定的需求行为树构建语法构建表征当前需求描述的当前需求行为树;所述需求行为树包括:表示执行逻辑的逻辑节点和表示执行操作的动作节点;在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,查找与所述当前需求行为树存在最大公共子树的已建需求行为树,以对查找到的已建需求行为树的相关需求描述数据进行重用。A method for reusing demand description data, including: building a current demand behavior tree representing the current demand description based on a preset demand behavior tree construction grammar; the demand behavior tree includes: logical nodes representing execution logic and actions representing execution operations Node; in the process of constructing the current demand behavior tree or after completing the construction of the current demand behavior tree, perform a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees, and search for the similarity with the current demand behavior tree. It is stated that the current demand behavior tree has a built demand behavior tree with the largest common subtree, so as to reuse the relevant demand description data of the found built demand behavior tree.
一种需求描述数据重用装置,包括至少一个存储器和至少一个处理器,其中: 所述至少一个存储器用于存储计算机程序;所述至少一个处理器用于调用所述至少一个存储器中存储的计算机程序,执行如上任一实施方式中所述的需求描述数据重用方法。A device for reusing demand description data, including at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the computer program stored in the at least one memory, Execute the requirement description data reuse method as described in any of the above embodiments.
一种计算机可读存储介质,其上存储有计算机程序;所述计算机程序能够被一处理器执行并实现如上任一实施方式中所述的需求描述数据重用方法。A computer-readable storage medium on which a computer program is stored; the computer program can be executed by a processor and implement the requirement description data reuse method as described in any of the above embodiments.
由上面的技术方案可知,本申请实施例中由于基于预先设定的需求行为树构建语法构建表征当前需求描述的当前需求行为树,在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,查找与所述当前需求行为树存在最大公共子树的已建需求行为树,并对查找到的已建需求行为树的相关需求描述数据进行重用,从而提高了需求工程实现的效率。As can be seen from the above technical solution, in the embodiment of the present application, since the current demand behavior tree representing the current demand description is constructed based on the preset demand behavior tree construction grammar, in the process of constructing the current demand behavior tree or after the construction is completed, After creating the current demand behavior tree, compare the similarity between the current demand behavior tree and multiple stored demand behavior trees, search for the built demand behavior tree that has the largest common subtree with the current demand behavior tree, and Reuse the relevant requirement description data found in the established requirement behavior tree, thereby improving the efficiency of requirements engineering implementation.
附图简要说明Brief description of the drawings
为了更好地理解本申请,下面将通过参照附图详细描述本申请的实施例,使本领域的普通技术人员更清楚本申请的上述及其它特征和优点,附图中:In order to better understand the present application, the embodiments of the present application will be described in detail below with reference to the accompanying drawings, so that the above and other features and advantages of the present application will be clearer to those of ordinary skill in the art. In the accompanying drawings:
图1为本申请实施例中一种需求描述数据重用方法的示例性流程图。Figure 1 is an exemplary flow chart of a requirement description data reuse method in an embodiment of the present application.
图2A为本申请一个例子中的装配图。Figure 2A is an assembly diagram in an example of this application.
图2B为图2A所示装配图的分解图和装配拓扑图。Figure 2B is an exploded view and assembly topology diagram of the assembly diagram shown in Figure 2A.
图2C为图2A所示装配图的组装过程分解图。Figure 2C is an exploded view of the assembly process of the assembly diagram shown in Figure 2A.
图2D为对应图2C中一个子装配过程的需求行为树。Figure 2D is a requirements behavior tree corresponding to a subassembly process in Figure 2C.
图3A和图3B为本申请一个例子的两个需求行为树。Figure 3A and Figure 3B are two requirement behavior trees of an example of this application.
图3C和图3D为分别在图3A和图3B所示需求行为树中两个动作节点之间添加定向连线后的示意图。Figures 3C and 3D are schematic diagrams after adding directional connections between the two action nodes in the demand behavior tree shown in Figures 3A and 3B respectively.
图4A为本申请一个例子中的动作节点图谱的示意图。Figure 4A is a schematic diagram of an action node graph in an example of this application.
图4B为本申请一个例子中的条件节点图谱的示意图。Figure 4B is a schematic diagram of a conditional node graph in an example of the present application.
图5为本申请中对应图2D所示需求行为树得到的需求图谱的示意图。FIG. 5 is a schematic diagram of the demand map obtained corresponding to the demand behavior tree shown in FIG. 2D in this application.
图6A至图6D为本申请一个例子中图编辑距离算法的示意图。6A to 6D are schematic diagrams of the graph edit distance algorithm in an example of this application.
图6E为图6A所示需求图谱和图6D所示需求图谱中的最大公共子图的示意图。FIG. 6E is a schematic diagram of the largest common subgraph in the demand map shown in FIG. 6A and the demand map shown in FIG. 6D.
图7为本申请一个例子中两个动作节点图谱的比较示意图。Figure 7 is a schematic diagram comparing two action node graphs in an example of this application.
图8为本申请实施例中一种需求行为树构建方法的示例性流程图。Figure 8 is an exemplary flow chart of a method for building a demand behavior tree in an embodiment of the present application.
图9A至图9C为本申请一个例子中基于2A所示装配图建立配对时得到的其中三个合规配对。Figures 9A to 9C show three compliant pairs obtained when pairing is established based on the assembly diagram shown in 2A in an example of this application.
图9D和图9E为本申请一个例子中基于2A所示装配图建立配对时得到的其中两个不合规配对。Figure 9D and Figure 9E are two non-compliant pairs obtained when pairing is established based on the assembly diagram shown in 2A in an example of this application.
图9F为本申请一个例子中对一合规配对添加装配工艺信息后的示意图。Figure 9F is a schematic diagram after adding assembly process information to a compliant pair in an example of this application.
图10为本申请一个例子中针对图2C中的一个子装配过程所涉及的合规配对的示意图。FIG. 10 is a schematic diagram of compliance pairing involved in a sub-assembly process in FIG. 2C in an example of the present application.
图11为本发明实施例中一种需求描述数据重用装置的示例性结构图。Figure 11 is an exemplary structural diagram of a requirement description data reuse device in an embodiment of the present invention.
图12为本申请实施例中另一种需求描述数据重用装置的示例性结构图。Figure 12 is an exemplary structural diagram of another requirement description data reuse device in an embodiment of the present application.
其中,附图标记如下:Among them, the reference signs are as follows:
标号label 含义meaning
101~103、801~807101~103, 801~807 步骤step
P1~P14P1~P14 零件Component
SA1~SA10SA1~SA10 组件components
A1~A6、A、71、73A1~A6, A, 71, 73 动作节点action node
C1、C2、CC1, C2, C 条件节点condition node
SeSe 顺序节点sequence node
PaPa 并列节点Parallel nodes
FBFB 选择器节点selector node
PP 零件Component
RR 机器人robot
MM 移动move
PiPi 拾取pick up
CxCx 同轴Coaxial
TT 碰触touch
PlPl 放置place
SS 自身itself
TTOTTO 到目标对象to target object
TTPTTP 到目标位置to target location
TA、TB、TC、TDTA, TB, TC, TD 类型type
72、7472, 74 动作节点图谱 action node graph
1、2、3、41, 2, 3, 4 配对 pair
11011101 第一模块 first module
11021102 第二模块 Second module
11031103 第三模块The third module
12011201 存储器 memory
12021202 处理器 processor
12031203 总线bus
实施本申请的方式How to implement this application
本申请实施例中,考虑到行为树是结构化数据格式,因此为了使需求描述能够转换为用于构建生产系统的软件或程序,考虑提供一种使用行为树表示需求描述的技术方案,相应地,用行为树表示的需求描述可称为需求行为树(RBT,Requirement Behavior Tree)。进一步地,为了提高构建需求行为树的速度,可将历史构建的需求行为树存储在一数据库中,构成已建需求行为树库,之后,在构建当前需求行为树时,推荐已建需求行为树库中相似的需求行为树,从而实现需求行为树的重用。或者,为了提高创建需求行为树的工作流的速度,可在构建完成当前需求行为树之后,将已建需求行为树库中相似的需求行为树对应的相关工作流数据重用在当前构建的需求行为树对应的工作流中。本实施例中的工作流指的是实现需求行为树中相应操作的可执行程序部分。In the embodiment of this application, considering that the behavior tree is a structured data format, in order to enable the requirement description to be converted into software or programs for building a production system, a technical solution for using the behavior tree to represent the requirement description is considered. Accordingly, , the requirement description represented by a behavior tree can be called a requirement behavior tree (RBT, Requirement Behavior Tree). Further, in order to improve the speed of building demand behavior trees, the historically constructed demand behavior trees can be stored in a database to form a library of built demand behavior trees. Later, when building the current demand behavior tree, the already built demand behavior trees are recommended. Similar requirement behavior trees in the library, thereby realizing the reuse of requirement behavior trees. Or, in order to improve the workflow speed of creating a demand behavior tree, after the current demand behavior tree is built, the relevant workflow data corresponding to similar demand behavior trees in the established demand behavior tree library can be reused in the currently constructed demand behavior. In the workflow corresponding to the tree. The workflow in this embodiment refers to the executable program part that implements the corresponding operations in the required behavior tree.
为了使本申请的目的、技术方案及优点更加清楚明白,下面结合附图并举实施例,对本申请的技术方案进行详细说明。In order to make the purpose, technical solutions and advantages of the present application more clear, the technical solutions of the present application will be described in detail below with reference to the accompanying drawings and examples.
图1为本申请实施例中一种需求描述数据重用方法的示例性流程图。如图1所示,该方法可包括如下处理:Figure 1 is an exemplary flow chart of a requirement description data reuse method in an embodiment of the present application. As shown in Figure 1, the method may include the following processing:
步骤101,基于预先设定的需求行为树构建语法构建表征当前需求描述的当前 需求行为树。所述需求行为树包括:表示执行逻辑的逻辑节点和表示执行操作的动作节点。本实施例中,逻辑节点可包括传统行为树中的顺序节点、并行节点、条件节点等各种用于控制执行逻辑的节点。Step 101: Construct the current demand behavior tree representing the current demand description based on the preset demand behavior tree construction grammar. The demand behavior tree includes: logical nodes representing execution logic and action nodes representing execution operations. In this embodiment, logical nodes may include various nodes used to control execution logic, such as sequential nodes, parallel nodes, and conditional nodes in traditional behavior trees.
以装配过程为例,图2A示出了一个例子中的装配图,图2B为图2A所示装配图的分解图和装配拓扑图。图2C示出了图2A所示装配图的组装过程分解图。其中,P1至P14为构成图2A所示装配图的各个零件(P,Part),SA1至SA10为装配过程中得到的各个组件。本实施例中,针对图2C所示的装配过程创建需求行为树时,若当前得到的当前需求行为树为针对图2C中的一个子装配过程:组件SA3+零件P5=组件SA4,得到的如图2D所示的需求行为树,图2D中,方框A1至A6为六个动作节点,分别表示:A1:机器人(R,Robot)移动(M,Move)自身(S,Self)到零件P5;A2:机器人拾取(Pi,Pick)零件P5;A3:机器人同轴(Cx,Coaxial)零件P5与零件P2;A4:机器人碰触(T,Touch)零件P5与零件P4;A5:机器人放置(Pl,Place)零件P5;A6:机器人移动自身复位。单箭头表示行为树中的顺序节点Se,双箭头表示行为树中的并列节点Pa,C1和C2为两个条件节点,分别表示:C1:零件P5同轴零件P2?C2:零件P5碰触零件P4?图2D中,问号表示选择器(FB,Fallback)节点,作用就是按顺序执行节点下挂载的各个节点,直到某个节点返回真(True),这个节点才结束执行。以图中举例,选择器节点下挂载条件节点C1和动作节点A3,只要条件节点C1的条件为假,即零件P5和零件P2不同轴,动作节点A3便需要一直执行,直到条件节点C1的条件为真,即零件P5和零件P2同轴时,选择器节点结束执行,即不再执行动作节点A3。Taking the assembly process as an example, Figure 2A shows an assembly diagram in an example, and Figure 2B is an exploded view and assembly topology diagram of the assembly diagram shown in Figure 2A. Figure 2C shows an exploded view of the assembly process of the assembly diagram shown in Figure 2A. Among them, P1 to P14 are the various parts (P, Part) that constitute the assembly diagram shown in Figure 2A, and SA1 to SA10 are the various components obtained during the assembly process. In this embodiment, when creating a demand behavior tree for the assembly process shown in Figure 2C, if the current demand behavior tree currently obtained is for a sub-assembly process in Figure 2C: component SA3 + part P5 = component SA4, the obtained result is as shown in Figure 2C The demand behavior tree shown in 2D. In Figure 2D, boxes A1 to A6 are six action nodes, which respectively represent: A1: robot (R, Robot) moves (M, Move) itself (S, Self) to part P5; A2: The robot picks up (Pi, Pick) part P5; A3: The robot coaxially (Cx, Coaxial) part P5 and part P2; A4: The robot touches (T, Touch) part P5 and part P4; A5: The robot places (Pl , Place) Part P5; A6: The robot moves itself to reset. The single arrow represents the sequence node Se in the behavior tree, the double arrow represents the parallel node Pa in the behavior tree, C1 and C2 are two condition nodes, respectively representing: C1: Part P5 Coaxial part P2? C2: Part P5 touches part P4? In Figure 2D, the question mark represents the selector (FB, Fallback) node. Its function is to execute each node mounted under the node in order. The execution of this node will not end until a node returns true. Take the example in the figure, the condition node C1 and the action node A3 are mounted under the selector node. As long as the condition of the condition node C1 is false, that is, the part P5 and the part P2 are not on the same axis, the action node A3 needs to be executed until the condition node C1 The condition of is true, that is, when part P5 and part P2 are coaxial, the selector node ends execution, that is, action node A3 is no longer executed.
本步骤中,随着需求行为树构建过程的推进,当前需求行为树是一直在更新的。例如,针对图2D所示的当前需求行为树,在刚开始时,只存在第一层的顺序节点,之后,会构建得到第二层的各个节点,进而得到第三层甚至第四层的各个节点。之后,还会得到其他的各个节点,直到得到对应图2C所示整个装配过程的需求行为树。In this step, as the demand behavior tree construction process progresses, the current demand behavior tree is constantly updated. For example, for the current demand behavior tree shown in Figure 2D, at the beginning, there are only sequential nodes in the first layer. Later, each node in the second layer will be constructed, and then each node in the third or even fourth layer will be obtained. node. After that, other nodes will be obtained until the requirements behavior tree corresponding to the entire assembly process shown in Figure 2C is obtained.
步骤102,在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,查找与所述当前需求行为树存在最大公共子树的已建需求行为树。Step 102: During the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed, perform a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees, and search and The current demand behavior tree has a built demand behavior tree with the largest common subtree.
本实施例中,可将历史构建的需求行为树存储在一数据库中,构成已建需求行 为树库。则本步骤中,可将所述当前需求行为树与存储的多个已建需求行为树进行相似性比较,以查找相似度达到设定要求的需求行为树,例如查找与所述当前需求行为树存在最大公共子树的已建需求行为树。In this embodiment, the historically constructed demand behavior tree can be stored in a database to form a built demand behavior tree library. Then in this step, the similarity of the current demand behavior tree and multiple stored demand behavior trees can be compared to find a demand behavior tree whose similarity reaches the set requirement, for example, search for a demand behavior tree that is similar to the current demand behavior tree. There is a built requirements behavior tree with a largest common subtree.
具体实现时,考虑到有些应用中直接对两个需求行为树进行相似性比较时,针对顺序节点的所有子节点,通常不会考虑其执行顺序。例如,针对图3A和图3B所示的两个需求行为树,虽然图3A表示先执行动作节点A2再执行动作节点A5,图3B表示先执行行动作节点A5再执行动作节点A2,但有些应用中在比较图3A和图3B所示的两个需求行为树可能会将两个需求行为树当作相同的需求行为树。During specific implementation, it is considered that in some applications, when the similarity of two demand behavior trees is directly compared, the execution order of all child nodes of the sequence node is usually not considered. For example, for the two demand behavior trees shown in Figure 3A and Figure 3B, although Figure 3A shows that action node A2 is executed first and then action node A5, and Figure 3B shows that action node A5 is executed first and then action node A2, some applications When comparing the two requirement behavior trees shown in Figure 3A and Figure 3B, the two requirement behavior trees may be regarded as the same requirement behavior tree.
为此,本步骤中,考虑将所述当前需求行为树转换为图谱格式,以在顺序节点的各子节点之间添加定向链接,使需求行为树的隐藏表示规则用图谱连线显式表示出来,从而得到当前需求图谱。将所述当前需求图谱与各已建需求行为树基于相同规则转换得到的各已建需求图谱进行相似性比较,查找相似度达到设定要求的已建需求图谱,例如查找与所述当前需求图谱存在最大公共子图谱的已建需求图谱;将查找到的与所述当前需求图谱存在最大公共子图谱的已建需求图谱所对应的已建需求行为树作为与所述当前需求行为树存在最大公共子树的已建需求行为树,即相似度达到设定要求的需求行为树。所述需求图谱包括:表示对应的需求行为树中各个节点的图谱节点,以及连接在各个图谱节点之间的定向连线。To this end, in this step, it is considered to convert the current demand behavior tree into a graph format to add directional links between the sub-nodes of the sequence nodes so that the hidden representation rules of the demand behavior tree are explicitly expressed using graph connections. , thereby obtaining the current demand map. Compare the similarity between the current demand map and each built demand map converted from each built demand behavior tree based on the same rules, and search for the built demand map whose similarity reaches the set requirements, for example, search for the current demand map There is a built demand map with the largest common submap; the built demand behavior tree corresponding to the found demand map that has the largest common submap with the current demand map is regarded as having the largest common submap with the current demand behavior tree. The built demand behavior tree of the subtree, that is, the demand behavior tree whose similarity reaches the set requirements. The demand map includes: map nodes representing each node in the corresponding demand behavior tree, and directional connections connecting each map node.
例如,针对图3A和图3B所示的两个需求行为树,在将其转换为需求图谱后,动作节点A2和动作节点A5之间会存在一个定向连线,即如图3C和图3D所示,此时再对二者进行比较时,便可发现二者不一样,避免了直接比较需求行为树时将二者等同的问题。For example, for the two demand behavior trees shown in Figure 3A and Figure 3B, after converting them into demand graphs, there will be a directional connection between action node A2 and action node A5, as shown in Figure 3C and Figure 3D. It shows that when you compare the two at this time, you can find that they are different, which avoids the problem of equating the two when directly comparing the requirement behavior tree.
此外,考虑到行为树中的动作节点和条件节点等行为树节点中也包含有各种隐含信息,尤其是当不同的行为树节点采用不同语义格式予以描述时,有些应用很难对其进行分类,因此无法直接对其进行比较。In addition, considering that behavior tree nodes such as action nodes and condition nodes in the behavior tree also contain various implicit information, especially when different behavior tree nodes are described using different semantic formats, it is difficult for some applications to describe them. classification, so they cannot be compared directly.
为此,本实施例中,考虑在所述需求行为树中,使所述动作节点以及条件节点等包含隐含信息的行为树节点按照设定语义格式进行表述,且所述设定语义格式能够被拆分为多个语义字段。例如,在一个例子中,所述设定语义格式可以为:主语、谓语、宾语、上下文;其中,所述上下文为可选项。相应地,所述设定语义格式能够被拆分为主语字段、谓语字段、宾语字段、上下文字段。具体实现时,本实施例 中可进一步提供一标准语义库,以对可能涉及到的语义进行标准化。例如,针对“移动”和“同轴”等谓语,均可从标准语义库中获得。To this end, in this embodiment, it is considered that in the required behavior tree, the behavior tree nodes containing implicit information such as the action nodes and condition nodes are expressed according to the set semantic format, and the set semantic format can is split into multiple semantic fields. For example, in one example, the set semantic format may be: subject, predicate, object, context; wherein the context is optional. Correspondingly, the set semantic format can be split into a subject field, a predicate field, an object field, and a context field. During specific implementation, this embodiment may further provide a standard semantic library to standardize the semantics that may be involved. For example, predicates such as "move" and "coaxial" can be obtained from the standard semantic library.
之后,在转换为需求图谱时,所述动作节点以及条件节点等包含隐含信息的行为树节点转换为对应的行为树节点图谱,其包括:指代所述行为树节点的树节点图谱节点、指代所述行为树节点的各语义字段的字段图谱节点、以及连接在所述树节点图谱节点和各个字段图谱节点之间的定向连线。Afterwards, when converted into a demand graph, the action nodes, condition nodes and other behavior tree nodes containing implicit information are converted into corresponding behavior tree node graphs, which include: tree node graph nodes that refer to the behavior tree nodes, A field map node that refers to each semantic field of the behavior tree node, and a directional connection between the tree node map node and each field map node.
例如,针对动作节点“A1:机器人移动自身到零件P5”,当其被转换为动作节点图谱时,可以包括:动作A、机器人R、移动M、自身S、到目标对象TTO共五个节点,即节点∈{动作,机器人,移动,自身,到目标对象},并包括:动作→机器人、动作→移动、动作→自身、动作→到目标对象共四条定向连线,即定向连线∈{(动作,机器人),(动作,移动),(动作,自身),(动作,到目标对象)}。对应的动作节点图谱可如图4A所示。可见,动作节点转换的动作节点图谱包括:指代所述动作节点的动作图谱节点、指代所述动作节点各语义字段的字段图谱节点、以及连接在所述动作图谱节点和各个字段图谱节点之间的定向连线。For example, for the action node "A1: the robot moves itself to part P5", when it is converted into an action node graph, it can include a total of five nodes: action A, robot R, movement M, self S, and to the target object TTO. That is, the node ∈ {action, robot, move, itself, to the target object}, and includes: action → robot, action → move, action → itself, action → to the target object, a total of four directional connections, that is, directional connections ∈ {( action, robot), (action, move), (action, self), (action, to target object)}. The corresponding action node graph can be shown in Figure 4A. It can be seen that the action node graph converted by the action node includes: an action graph node that refers to the action node, a field graph node that refers to each semantic field of the action node, and a connection between the action graph node and each field graph node. directional connections between.
又如,针对条件节点“C1:零件P5同轴零件P2”,当其被转换为条件节点图谱时,可以包括:条件C、零件P、同轴Cx、零件P共四个节点,即节点∈{条件,零件,同轴,零件},并包括:条件→零件、条件→同轴、条件→零件共三条定向连线,即定向连线∈{(条件,零件),(条件,同轴),(条件,零件)}。对应的条件节点图谱可如图4B所示。可见,条件节点转换的条件节点图谱包括:指代所述条件节点的条件图谱节点、指代所述条件节点各语义字段的字段图谱节点、以及连接在所述条件图谱节点和各个字段图谱节点之间的定向连线。For another example, for the conditional node "C1: Part P5, Coaxial Part P2", when it is converted into a conditional node graph, it can include four nodes: condition C, part P, coaxial Cx, and part P, that is, node ∈ {condition, part, coaxial, part}, and includes: condition → part, condition → coaxial, condition → part, a total of three directional connections, that is, directional connection ∈ {(condition, part), (condition, coaxial) , (condition, part)}. The corresponding conditional node graph can be shown in Figure 4B. It can be seen that the condition node graph converted by the condition node includes: a condition graph node that refers to the condition node, a field graph node that refers to each semantic field of the condition node, and a condition graph node that is connected between the condition graph node and each field graph node. directional connections between.
本实施例中,需求行为树在转换为需求图谱时,针对每个动作节点及条件节点等包含隐含信息的行为树节点,其语义信息中除谓语之外,主语、宾语和上下文的含义都要进行泛化,例如,“零件P5”和“零件P2”都要泛化为“零件(P,Part)”,“到零件P5”需要泛化为“到目标对象(TTO,To Target Object)”,“到初始位置(或称复位)”需要泛化为“到目标位置(TTP,To Target Position)”,如图4A和图4B中,零件是零件P5和零件P2的类,因此二者泛化到对应的类;此外,“移动”和“同轴”等谓语以及“到目标对象”和“到目标位置”等上下文可以从预定义的标准语义库中选择;“自身”是动作的占位符对象,可表示机器人在不进行任何操作的情况 下自行移动等。In this embodiment, when the demand behavior tree is converted into a demand graph, for each action node and condition node and other behavior tree nodes that contain implicit information, in addition to the predicate, the meanings of the subject, object, and context in the semantic information are all To generalize, for example, "Part P5" and "Part P2" both need to be generalized to "Part (P, Part)", and "To Part P5" needs to be generalized to "To Target Object (TTO, To Target Object)" ", "To the initial position (or reset)" needs to be generalized to "To the target position (TTP, To Target Position)". In Figure 4A and Figure 4B, the part is the class of part P5 and part P2, so both Generalize to the corresponding class; in addition, predicates such as "move" and "coaxial" and contexts such as "to target object" and "to target position" can be selected from the predefined standard semantic library; "self" is action A placeholder object that can represent, for example, a robot moving on its own without performing any operations.
根据上述需求行为树到需求图谱的转换方法,图2D所示的当前需求行为树可以转换为如图5所示的当前需求图谱。图5中,不同节点可用不同颜色区别,同一节点的不同子节点也可用不同颜色表示。According to the above conversion method from demand behavior tree to demand map, the current demand behavior tree shown in Figure 2D can be converted into the current demand map shown in Figure 5. In Figure 5, different nodes can be distinguished by different colors, and different child nodes of the same node can also be represented by different colors.
在将当前需求图谱与各已建需求图谱进行相似性比较时,可采用图编辑距离(Graph Edit Distance,GED)算法进行相似性计算。图6A至图6D示出了一个例子中图编辑距离算法的示意图。如图6A至图6D所示,针对均包括类型A(TA,Type A)、类型B(TB,Type B)、类型B、类型C(TC,Type C)和类型D(TD,Type D)五个节点,但节点之间的定向连接是不同的。从图6A的图谱转换为图6D的图谱需要经过图6B所示删除两条定向连线和图6C所示增加两条定向连线的过程,即图6A的图谱和图6D的图谱之间的图编辑距离GED为4,也即图6A的图谱转换为图6D的图谱所需的操作数。可见,GED越小,两个图谱的相似度越高。When comparing the similarity between the current demand map and each established demand map, the Graph Edit Distance (GED) algorithm can be used to calculate the similarity. 6A to 6D show a schematic diagram of the graph edit distance algorithm in an example. As shown in Figure 6A to Figure 6D, all include Type A (TA, Type A), Type B (TB, Type B), Type B, Type C (TC, Type C) and Type D (TD, Type D) Five nodes, but the directed connections between nodes are different. Converting from the map of Figure 6A to the map of Figure 6D requires the process of deleting two directional connections as shown in Figure 6B and adding two directional connections as shown in Figure 6C, that is, the gap between the map of Figure 6A and the map of Figure 6D The graph edit distance GED is 4, which is the number of operations required to convert the graph in Figure 6A into the graph in Figure 6D. It can be seen that the smaller the GED, the higher the similarity between the two maps.
通过计算GED可找到最相似的已建需求图谱,然后可使用最相似的已建需求图谱与当前需求图谱中的最大公共子图(Maximum Common Sub-Graph,MCS)从最相似的已建需求图谱中提取可重用信息。如图6E所示,图6A的当前需求图谱和图6D的已建需求图谱中的最大公共子图可如图6E中虚线括起来的部分所示,其中,MCS大小为4,即类型A→类型B→类型B→类型C,共4个具有相同边(即定向连线)的相同节点。The most similar built demand map can be found by calculating GED, and then the maximum common subgraph (Maximum Common Sub-Graph, MCS) in the most similar built demand map and the current demand map can be used to obtain the most similar built demand map. extract reusable information. As shown in Figure 6E, the largest common subgraph in the current demand map of Figure 6A and the built demand map of Figure 6D can be shown as the part enclosed by the dotted line in Figure 6E, where the MCS size is 4, that is, type A→ Type B → Type B → Type C, a total of 4 identical nodes with the same edges (ie directional connections).
为了将GED和MCS扩展到行为树,需要检查MCS的完整性,即将当前需求图谱与各已建需求行为树转换得到的各已建需求图谱进行比较时,将所述需求图谱中的各个动作节点和条件节点的图谱作为一个整体进行比对,当已建需求图谱中存在所述当前需求图谱中的一完整动作节点或完整条件节点时,所述当前需求图谱中的所述动作节点或所述条件节点被确定为存在于所述已建需求图谱中。如图7所示,图7中针对第一动作节点71得到的第一动作节点图谱72和针对第二动作节点73得到的第二动作节点图谱74,虽然二者的大部分内容(即虚线括起来的部分)相同,但由于二者具有一个不同的字段图谱节点,因此两个图谱是不一样的。In order to extend GED and MCS to behavior trees, the integrity of MCS needs to be checked, that is, when comparing the current demand map with each built demand map converted from each built demand behavior tree, each action node in the demand map Compare the map with the condition node as a whole. When there is a complete action node or a complete condition node in the current demand map in the established demand map, the action node or the complete condition node in the current demand map The condition node is determined to exist in the built requirements graph. As shown in Figure 7, the first action node graph 72 obtained for the first action node 71 and the second action node graph 74 obtained for the second action node 73 in Figure 7, although most of the contents of the two (i.e., the dashed line enclosed are the same, but because they have a different field graph node, the two graphs are different.
在基于需求图谱的相似性比较查找到与所述当前需求图谱存在最大公共子图谱的已建需求图谱后,根据所述最大公共子图谱确定已建需求行为树与所述当前需求行为树之间的最大公共子树,将所述已建需求图谱对应的已建需求行为树作为与所 述当前需求行为树存在最大公共子树的已建需求行为树。After finding a built demand map that has the largest common submap with the current demand map based on the similarity comparison of the demand map, determine the relationship between the built demand behavior tree and the current demand behavior tree based on the largest common submap. The largest common subtree is the built demand behavior tree corresponding to the built demand map as the built demand behavior tree that has the largest common subtree with the current demand behavior tree.
步骤103,对查找到的已建需求行为树的相关需求描述数据进行重用。Step 103: Reuse the found relevant requirement description data of the established requirement behavior tree.
本实施例中,步骤102中,可以是在构建所述当前需求行为树的过程中,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,相应地,本步骤103中可将所述查找到的已建需求行为树作为候选已建需求行为树进行推荐,以帮助构建当前需求行为树。In this embodiment, in step 102, during the process of constructing the current demand behavior tree, a similarity comparison is performed between the current demand behavior tree and multiple stored demand behavior trees. Correspondingly, this In step 103, the found established requirement behavior tree may be recommended as a candidate established requirement behavior tree to help build the current requirement behavior tree.
或者,步骤102中,也可以是在构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,相应地,本步骤103中可从所述查找到的已建需求行为树对应的工作流数据中获取所述最大公共子树对应的子工作流数据;将所述子工作流数据重用在所述当前需求行为树对应的工作流数据中。Alternatively, in step 102, after completing the construction of the current demand behavior tree, a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees may be performed. Correspondingly, in step 103, The sub-workflow data corresponding to the largest common subtree can be obtained from the found workflow data corresponding to the built demand behavior tree; the sub-workflow data can be reused in the work corresponding to the current demand behavior tree. in streaming data.
针对步骤101中构建装配图的需求行为树,下面介绍其中一种实现方法。图8为本申请实施例中一种需求行为树构建方法的示例性流程图。如图8所示,该方法可包括如下步骤:For the requirements behavior tree constructed in the assembly diagram in step 101, one of the implementation methods is introduced below. Figure 8 is an exemplary flow chart of a method for building a demand behavior tree in an embodiment of the present application. As shown in Figure 8, the method may include the following steps:
步骤801,预先基于历史装配图建立装配关系的各个合规配对,并为每个合规配对添加装配工艺信息。其中,预先建立的各个合规配对可存储到一数据库中,构成一合规配对库。其中,合规配对指的是具有装配关系的两个零件的机械制图组成的配对。即,本步骤中,每个合规配对由具有装配关系的两个零件的机械制图组成。这里的具有装配关系例如可以是:每个合规配对中的两个零件通过零件表面相互连接,或者可以是:每个合规配对中的两个零件之间的空间关系有助于进行装配。相对地,两个没有装配关系的零件组成的配对可称为不合规配对。当前立合规配对的过程中,需要将不合规配对舍弃。Step 801: Establish each compliance pairing of the assembly relationship in advance based on the historical assembly drawing, and add assembly process information for each compliance pairing. Among them, each pre-established compliance pairing can be stored in a database to form a compliance matching library. Among them, compliance pairing refers to a pairing consisting of mechanical drawings of two parts with an assembly relationship. That is, in this step, each compliance pair consists of mechanical drawings of two parts with an assembly relationship. Having an assembly relationship here may, for example, mean that the two parts in each conforming pair are connected to each other via part surfaces, or it may be that the spatial relationship between the two parts in each conforming pair facilitates assembly. In contrast, a pair consisting of two parts that have no assembly relationship can be called a non-compliant pair. In the process of establishing compliant matching, non-compliant matching needs to be discarded.
例如,以历史装配图包括图2A所示装配图的情况为例,图9A至图9C示出了基于2A所示装配图建立配对时得到的其中三个合规配对,即第一合规配对1、第二合规配对2和第三合规配对3,即零件P2和零件P4组成一个合规配对,零件P2和零件P6组成一个合规配对,零件P2和零件P5组成一个合规配对。如图9A至图9C所示,每个合规配对中的两个零件之间的空间关系有助于进行装配。图9C所示配对中的两个零件P2和零件P5之间虽然没有紧密的连接,但因为零件P5只有一个可以离开零件P2的自由度(DOF,Degree of Freedom),或者说因为零件P2可以 约束零件P5的自由度,因此二者之间具有装配关系。For example, taking the historical assembly drawing including the assembly drawing shown in Figure 2A as an example, Figures 9A to 9C show three of the compliant pairings obtained when pairing is established based on the assembly drawing shown in 2A, that is, the first compliant pairing. 1. The second compliance pairing 2 and the third compliance pairing 3, that is, part P2 and part P4 form a compliance pairing, part P2 and part P6 form a compliance pairing, and part P2 and part P5 form a compliance pairing. As shown in Figures 9A-9C, the spatial relationship between the two parts in each conforming pair facilitates assembly. Although there is no close connection between the two parts P2 and P5 in the pairing shown in Figure 9C, because the part P5 has only one degree of freedom (DOF, Degree of Freedom) that can leave the part P2, or because the part P2 can be constrained The degree of freedom of part P5, so there is an assembly relationship between the two.
图9D和图9E示出了基于1A所示装配图建立配对时得到的其中两个不合规配对。如图9D和图9E所示,每个不合规配对中的两个零件之间的空间关系对进行装配没有贡献,因此需要舍弃。Figures 9D and 9E show two of the non-compliant pairs obtained when pairing is established based on the assembly diagram shown in 1A. As shown in Figures 9D and 9E, the spatial relationship between the two parts in each non-conforming pairing does not contribute to the assembly and therefore needs to be discarded.
本步骤中,在为每个合规配对添加装配工艺信息时,所述装配工艺信息可采用任何合适的语句格式进行描述。例如,可以采用标准的语句格式,也可以采用资产管理壳(AAS)语句格式、OPC UA语句格式等。本实施例中,考虑采用如下语句格式:In this step, when adding assembly process information for each compliance pairing, the assembly process information can be described in any suitable sentence format. For example, you can use standard statement format, asset management shell (AAS) statement format, OPC UA statement format, etc. In this embodiment, consider using the following statement format:
语句=(主语、谓语、宾语、上下文)。其中,所述上下文为可选项,即可以为空(null)。Statement = (subject, predicate, object, context). Wherein, the context is optional, that is, it can be null.
以图9B所示合规配对2为例,按照上述语句格式添加装配工艺信息后可如图9F所示,包括如下信息:Taking the compliance pairing 2 shown in Figure 9B as an example, after adding the assembly process information according to the above statement format, it can be shown in Figure 9F, including the following information:
固定装置固定零件P2;/其中,主语=固定装置,谓语=固定,宾语=零件P2Fixing device fixes part P2;/where subject=fixing device, predicate=fixed, object=part P2
机器人拾取零件P6;/其中,主语=机器人,谓语=拾取,宾语=零件P6The robot picks up part P6;/where subject = robot, predicate = picking up, object = part P6
机器人拧紧零件P6到零件P2上。/其中,主语=机器人,谓语=拧紧,宾语=零件P6,上下文=到零件P2上The robot tightens part P6 onto part P2. /Among them, subject = robot, predicate = tighten, object = part P6, context = to part P2
除了可以采用图9F所示的装配工艺信息之外,其实还可以采用如下所述的装配工艺信息:In addition to the assembly process information shown in Figure 9F, the assembly process information as described below can also be used:
固定装置固定零件P6;Fixing device fixing parts P6;
机器人拾取零件P2;The robot picks up the part P2;
机器人拧紧零件P2到零件P6上。The robot tightens part P2 onto part P6.
上述语句格式可以很容易地为各种计算用途构建图谱,且很容易附加所有必要的装配工艺信息,如使用的辅助材料(如夹具)和工具/设备(如机器人)。这样,便可获得具有附加的装配工艺信息的合规配对库。The above statement format makes it easy to build maps for various calculation purposes, and it is easy to attach all necessary assembly process information, such as auxiliary materials (such as fixtures) and tools/equipment (such as robots) used. In this way, a compliant pairing library with additional assembly process information is obtained.
步骤802,接收包括当前装配所涉及的各个零件的名称的物料清单。本实施例中的零件名称可以是任何能区分各个零件的利用字母、数字、字符和文字中的任一种或任意组合表示的名称。Step 802: Receive a bill of materials including the names of various parts involved in the current assembly. The part name in this embodiment can be any name represented by any one or any combination of letters, numbers, characters and words that can distinguish each part.
具体实现时,本步骤中的物料清单可以是一个表格,里面列举有各个零件的名称,例如,以图1A所示装配图对应当前装配的情况为例,则物料清单可包括:“P1” 至“P14”表示的共14个零件的名称。这14个零件的名称之间可不具有配对关系。In specific implementation, the bill of materials in this step can be a table, which lists the names of various parts. For example, taking the assembly diagram shown in Figure 1A corresponding to the current assembly as an example, the bill of materials can include: "P1" to "P14" represents the names of a total of 14 parts. There may be no matching relationship between the names of these 14 parts.
此外,在其他实施方式中,物料清单中的各个零件的名称也可以预先按照对应的两个零件之间具有装配关系的原则进行名称配对。例如,“P2”和“P5”可组合成一个名称配对,“P4”和“P5”可组合成一个名称配对。In addition, in other embodiments, the names of each part in the bill of materials may also be paired in advance based on the principle that there is an assembly relationship between the two corresponding parts. For example, "P2" and "P5" can be combined into a name pair, and "P4" and "P5" can be combined into a name pair.
步骤803,根据所述物料清单,获取所述物料清单中每个零件的机械制图如CAD图。其中,每个零件的机械制图可从一3D产品建模系统如PLM系统中获取。Step 803: According to the bill of materials, obtain the mechanical drawing, such as a CAD drawing, of each part in the bill of materials. Among them, the mechanical drawing of each part can be obtained from a 3D product modeling system such as a PLM system.
本步骤中,可以所述物料清单中各个零件的名称为索引,获取所述物料清单中每个零件的机械制图。In this step, the name of each part in the bill of materials can be used as an index to obtain the mechanical drawing of each part in the bill of materials.
步骤804,基于所获取的机械制图建立多个候选配对,每个候选配对由两个零件的机械制图组成。Step 804: Establish multiple candidate pairings based on the obtained mechanical drawings, each candidate pairing consisting of mechanical drawings of two parts.
具体实现时,针对物料清单中的各个零件的名称之间不具有配对关系的情况,本步骤中,可基于所获取的机械制图,两两组合得到多个候选配对。此时,得到的多个候选配对中会同时存在合规候选配对和不合规候选配对。或者,本步骤中也可基于所获取的机械制图,将其中具有装配关系的每两个零件的机械制图进行组合,得到多个候选配对。此时,得到的多个候选配对均为合规候选配对。During specific implementation, in the case where there is no matching relationship between the names of various parts in the bill of materials, in this step, multiple candidate pairs can be obtained by combining them based on the obtained mechanical drawings. At this time, there will be both compliant candidate pairs and non-compliant candidate pairs among the multiple candidate pairs obtained. Alternatively, in this step, based on the obtained mechanical drawings, the mechanical drawings of every two parts that have an assembly relationship can also be combined to obtain multiple candidate pairs. At this time, the multiple candidate pairs obtained are all compliant candidate pairs.
针对物料清单中的各个零件的名称按照对应的两个零件之间具有装配关系的原则进行名称配对的情况,本步骤中,可基于所获取的机械制图,将每个名称配对所对应的两个零件的机械制图进行组合,得到多个候选配对。此时,得到的多个候选配对均为合规候选配对。For the case where the names of each part in the bill of materials are matched according to the principle of assembly relationship between the two corresponding parts, in this step, based on the obtained mechanical drawing, each name can be matched with the two corresponding parts. The mechanical drawings of the parts are combined to obtain multiple candidate pairs. At this time, the multiple candidate pairs obtained are all compliant candidate pairs.
步骤805,将所述多个候选配对中的每个候选配对依次与预先建立的合规配对库中的各个合规配对进行匹配,将匹配到合规配对的候选配对作为目标候选配对。其中,当合规配对与候选配对之间的相似度满足设定阈值时,该合规配对为候选配对匹配到的合规配对。Step 805: Match each candidate pairing in the plurality of candidate pairings with each compliant pairing in the pre-established compliant pairing library in turn, and use the candidate pairing that matches the compliant pairing as the target candidate pairing. Wherein, when the similarity between the compliant pair and the candidate pair meets the set threshold, the compliant pair is the compliant pair matched by the candidate pair.
本步骤中,针对多个候选配对中同时存在合规候选配对和不合规候选配对的情况,不合规候选配对便无法匹配到相似度满足设定阈值的合规配对。而针对多个候选配对均为合规候选配对的情况,则基本上每个候选配对均可匹配到相似度满足设定阈值的合规配对。In this step, if there are both compliant candidate pairs and non-compliant candidate pairs in multiple candidate pairs, the non-compliant candidate pairs will not be able to match the compliant pair whose similarity meets the set threshold. In the case where multiple candidate pairs are all compliant candidate pairs, basically each candidate pair can be matched to a compliant pair whose similarity meets the set threshold.
本步骤中,具体实现时,可采用多种匹配算法,例如可以采用网格比较算法或边界表示法(BREP)比较算法等,具体计算可以使用人工智能方法,如图神经网络 (GNN)。In this step, during specific implementation, a variety of matching algorithms can be used, for example, the grid comparison algorithm or the boundary representation method (BREP) comparison algorithm can be used. The specific calculation can use artificial intelligence methods, such as the neural network (GNN).
步骤806,针对每个目标候选配对,将其匹配到的合规配对的装配工艺信息附加到所述目标候选配对上。Step 806: For each target candidate pair, append the assembly process information of the matched compliant pair to the target candidate pair.
步骤807,基于所有目标候选配对的装配工艺信息按照行为树语法构建对应当前装配的需求行为树。Step 807: Construct a requirement behavior tree corresponding to the current assembly based on the assembly process information of all target candidate pairs according to the behavior tree grammar.
本实施例中,具体实现时,可基于所有目标候选配对的装配工艺信息,提取得到对应整个装配过程的装配工艺清单,然后,基于所述装配工艺清单按照行为树语法构建对应整个装配过程的需求行为树。In this embodiment, during specific implementation, an assembly process list corresponding to the entire assembly process can be extracted based on the assembly process information of all target candidate pairs, and then based on the assembly process list, requirements corresponding to the entire assembly process are constructed according to the behavior tree syntax. Behavior tree.
以图2C所示的组装过程分解图为例,图10示出了针对图2C中的一个子装配过程所涉及的合规配对的示意图。如图10所示,针对子装配过程:组件SA3+零件P5=组件SA4,其涉及到两个合规配对,一个是位于图10左部的合规配对3,即零件P2与零件P5构成的合规配对,一个是位于图10右部的合规配对4,即零件P4与零件P5构成的合规配对。其中,图10左部的合规配对的装配工艺信息包括:机器人移动自身到零件P5;机器人拾取零件P5;机器人同轴零件P5与零件P2。图10右部的合规配对的装配工艺信息包括:机器人碰触零件P5与零件P4;机器人放置零件P5;机器人移动自身复位。Taking the exploded view of the assembly process shown in FIG. 2C as an example, FIG. 10 shows a schematic diagram of the compliance pairing involved in a sub-assembly process in FIG. 2C. As shown in Figure 10, for the sub-assembly process: component SA3 + part P5 = component SA4, which involves two compliance pairs, one is compliance pair 3 located on the left side of Figure 10, that is, the combination composed of parts P2 and parts P5 Compliance pairing, one is the compliance pairing 4 located on the right side of Figure 10, that is, the compliance pairing composed of part P4 and part P5. Among them, the compliant paired assembly process information on the left side of Figure 10 includes: the robot moves itself to part P5; the robot picks up part P5; and the robot coaxial part P5 and part P2. The compliant paired assembly process information on the right side of Figure 10 includes: the robot touches part P5 and part P4; the robot places part P5; and the robot moves itself to reset.
基于上述的合规配对3和合规配对4的装配工艺信息,可提取并得到对应该子装配过程的装配工艺清单包括:A1:机器人移动自身到零件P5;A2:机器人拾取零件P5;A3:机器人同轴零件P5与零件P2;A4:机器人碰触零件P5与零件P4;A5:机器人放置零件P5;A6:机器人移动自身复位。Based on the above assembly process information of compliance pairing 3 and compliance pairing 4, the assembly process list corresponding to this sub-assembly process can be extracted and obtained, including: A1: the robot moves itself to part P5; A2: the robot picks up part P5; A3: The coaxial parts P5 and P2 of the robot; A4: The robot touches the part P5 and the part P4; A5: The robot places the part P5; A6: The robot moves and resets itself.
之后,基于所述装配工艺清单按照行为树语法可构建得到如图2E所示的对应所述子装配过程的需求行为树。Afterwards, based on the assembly process list, a requirement behavior tree corresponding to the sub-assembly process as shown in Figure 2E can be constructed according to the behavior tree syntax.
当然,具体实现时,需求行为树中还可能涉及到其他的行为树语法,例如,条件节点等装饰器节点。Of course, during specific implementation, the required behavior tree may also involve other behavior tree syntax, such as conditional nodes and other decorator nodes.
以上对本发明实施例中的需求描述数据重用方法进行了详细描述,下面再对本发明实施例中的需求描述数据重用装置进行详细描述。本发明实施例中的需求描述数据重用装置可用于实施本发明实施例中的需求描述数据重用方法,对于本发明装置实施例中未详细披露的细节可参见本发明方法实施例中的相应描述。The requirement description data reuse method in the embodiment of the present invention has been described in detail above, and the requirement description data reuse device in the embodiment of the present invention will be described in detail below. The requirement description data reuse device in the embodiment of the present invention can be used to implement the requirement description data reuse method in the embodiment of the present invention. For details not disclosed in detail in the device embodiment of the present invention, please refer to the corresponding description in the method embodiment of the present invention.
图11为本发明实施例中一种需求描述数据重用装置的示例性结构图。如图11 所示,所述装置可包括:第一模块1101、第二模块1102和第三模块1103。Figure 11 is an exemplary structural diagram of a requirement description data reuse device in an embodiment of the present invention. As shown in Figure 11, the device may include: a first module 1101, a second module 1102 and a third module 1103.
其中,第一模块1101用于基于预先设定的需求行为树构建语法构建表征当前需求描述的当前需求行为树;所述需求行为树包括:表示执行逻辑的逻辑节点和表示执行操作的动作节点。Among them, the first module 1101 is used to construct a current demand behavior tree representing the current demand description based on a preset demand behavior tree construction grammar; the demand behavior tree includes: logical nodes representing execution logic and action nodes representing execution operations.
第二模块1102用于在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,查找与所述当前需求行为树存在最大公共子树的已建需求行为树。The second module 1102 is configured to perform a similarity comparison between the current demand behavior tree and multiple stored demand behavior trees during the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed. , find the established requirement behavior tree that has the largest common subtree with the current requirement behavior tree.
第三模块1103用于对查找到的已建需求行为树的相关需求描述数据进行重用。The third module 1103 is used to reuse the found relevant requirement description data of the established requirement behavior tree.
事实上,本申请的这种实施方式提供的需求描述数据重用装置可以以各种方式具体实施。例如,可以通过使用符合特定规则的应用编程接口,将需求描述数据重用装置编译为安装在智能终端中的插件,或者可以封装到应用程序中以供用户下载和使用。In fact, the requirement description data reuse device provided by this embodiment of the present application can be implemented in various ways. For example, the requirement description data reuse device can be compiled into a plug-in installed in a smart terminal by using an application programming interface that conforms to specific rules, or it can be packaged into an application program for users to download and use.
当编译为插件时,需求描述数据重用装置可以多种插件形式实现,如ocx、dll和cab。本申请的这种实现方式提供的需求描述数据重用装置也可以通过使用特定技术来实现,例如Flash插件技术、RealPlayer插件技术、MMS插件技术、MIDI人员插件技术或ActiveX插件技术。When compiled as a plug-in, the requirement description data reuse device can be implemented in a variety of plug-in forms, such as ocx, dll and cab. The requirement description data reuse device provided by this implementation of the present application can also be implemented by using specific technologies, such as Flash plug-in technology, RealPlayer plug-in technology, MMS plug-in technology, MIDI personnel plug-in technology or ActiveX plug-in technology.
本申请的这种实现方式提供的需求描述数据重用方法可以以指令存储方式或指令集存储方式存储在各种存储介质中。这些存储介质包括但不限于:软盘、光盘、DVD、硬盘、闪存、USB闪存、CF卡、SD卡、SDHC卡、MMC卡、SM卡、记忆棒和xD卡。The requirement description data reuse method provided by this implementation of the present application can be stored in various storage media in an instruction storage mode or an instruction set storage mode. These storage media include but are not limited to: floppy disk, optical disk, DVD, hard disk, flash memory, USB flash memory, CF card, SD card, SDHC card, MMC card, SM card, memory stick and xD card.
应该清楚的是,在计算机中操作的操作系统,不仅可以通过执行计算机从存储介质读取的程序代码,而且可以通过使用基于程序代码的指令来实现部分或全部实际操作,以实现上述实施例中任何实施例的功能。It should be clear that the operating system operating in the computer can not only implement the program code read by the computer from the storage medium, but also implement part or all of the actual operations by using instructions based on the program code to implement the above embodiments. function of any embodiment.
例如,图12为本申请实施例中另一种需求描述数据重用装置的示例性结构图。该设备可用于执行图1所示的方法,或用于实现图11中的装置。如图12所示,装置可以包括至少一个存储器1201和至少一个处理器1202。此外,还可以包括一些其他组件,例如通信端口、输入/输出控制器、网络通信接口等。这些组件通过总线1203等进行通信。For example, FIG. 12 is an exemplary structural diagram of another requirement description data reuse device in an embodiment of the present application. The device can be used to perform the method shown in Figure 1, or to implement the device in Figure 11. As shown in Figure 12, the device may include at least one memory 1201 and at least one processor 1202. In addition, some other components can be included, such as communication ports, input/output controllers, network communication interfaces, etc. These components communicate via bus 1203 and so on.
至少一个存储器1201用于存储计算机程序。在一个例子中,计算机程序可以理 解为包括图11所示的装置的各种模块。另外,至少一个存储器1201可以存储操作系统等。操作系统包括但不限于:Android操作系统、Symbian操作系统、windows操作系统、Linux操作系统等。At least one memory 1201 is used to store computer programs. In one example, the computer program can be understood as including various modules of the device shown in Figure 11. In addition, at least one memory 1201 may store an operating system and the like. Operating systems include but are not limited to: Android operating system, Symbian operating system, windows operating system, Linux operating system, etc.
至少一个处理器1202用于调用存储在至少一个存储器1201中的计算机程序,以执行本申请实例中描述的需求描述数据重用方法。处理器1202可以是CPU、处理单元/模块、ASIC、逻辑模块或可编程门阵列等,它可以通过通信端口接收和发送数据。At least one processor 1202 is configured to call a computer program stored in at least one memory 1201 to execute the requirements description data reuse method described in the examples of this application. The processor 1202 can be a CPU, a processing unit/module, an ASIC, a logic module or a programmable gate array, etc., and it can receive and send data through a communication port.
输入/输出控制器具有显示器和输入装置,用于作为人机交互模块输入、输出和显示相关数据。The input/output controller has a display and an input device for inputting, outputting and displaying relevant data as a human-computer interaction module.
应当理解,本文中使用的“和/或”旨在包括一个或多个相关联的所列项目的任何和所有可能的组合。It will be understood that as used herein, "and/or" is intended to include any and all possible combinations of one or more of the associated listed items.
本申请实施例的数量仅用于描述,并不代表实施例的优点。The number of embodiments in this application is for description only and does not represent the advantages of the embodiments.
以上所述仅为本申请的较佳实施例而已,并不用以限制本申请,凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本申请保护的范围之内。The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the present application. within the scope of protection.

Claims (10)

  1. 一种需求描述数据重用方法,其特征在于,包括:A method for reusing requirement description data, which is characterized by including:
    基于预先设定的需求行为树构建语法构建表征当前需求描述的当前需求行为树;所述需求行为树包括:表示执行逻辑的逻辑节点和表示执行操作的动作节点;Based on the preset demand behavior tree construction grammar, the current demand behavior tree representing the current demand description is constructed; the demand behavior tree includes: logical nodes representing execution logic and action nodes representing execution operations;
    在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较,查找与所述当前需求行为树存在最大公共子树的已建需求行为树,以对查找到的已建需求行为树的相关需求描述数据进行重用。In the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed, the similarity between the current demand behavior tree and multiple stored demand behavior trees is compared to find the similarity with the current demand behavior tree. The demand behavior tree has a built demand behavior tree with the largest common subtree, so as to reuse the relevant demand description data of the found built demand behavior tree.
  2. 根据权利要求1所述的需求描述数据重用方法,其特征在于,所述在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较为:所述在构建所述当前需求行为树的过程中,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较;The demand description data reuse method according to claim 1, characterized in that, in the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed, the current demand behavior tree is compared with the existing demand behavior tree. The similarity comparison of multiple stored demand behavior trees is as follows: in the process of constructing the current demand behavior tree, similarity comparison between the current demand behavior tree and multiple stored demand behavior trees is performed. Compare;
    所述需求描述数据为需求行为树本身;The requirement description data is the requirement behavior tree itself;
    所述对查找到的已建需求行为树的相关需求描述数据进行重用为:将查找到的已建需求行为树作为候选需求行为树进行推荐,以助于构建完成所述当前需求行为树。The reuse of the relevant demand description data of the found demand behavior tree is to recommend the found demand behavior tree as a candidate demand behavior tree to help complete the construction of the current demand behavior tree.
  3. 根据权利要求1所述的需求描述数据重用方法,其特征在于,所述在构建所述当前需求行为树的过程中或构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较为:构建完成所述当前需求行为树后,对所述当前需求行为树与已存储的多个已建需求行为树进行相似性比较;The demand description data reuse method according to claim 1, characterized in that, in the process of constructing the current demand behavior tree or after the construction of the current demand behavior tree is completed, the current demand behavior tree is compared with the existing demand behavior tree. Comparing the similarity of multiple stored demand behavior trees is: after completing the construction of the current demand behavior tree, performing a similarity comparison between the current demand behavior tree and the multiple stored demand behavior trees;
    所述需求描述数据为需求行为树对应的工作流数据;The demand description data is the workflow data corresponding to the demand behavior tree;
    所述对查找到的已建需求行为树的相关需求描述数据进行重用为:从查找到的已建需求行为树对应的工作流数据中获取所述最大公共子树对应的子工作流数据;将所述子工作流数据重用在所述当前需求行为树对应的工作流数据中。The reuse of the relevant demand description data of the found demand behavior tree is: obtaining the sub-workflow data corresponding to the largest common subtree from the workflow data corresponding to the found demand behavior tree; The sub-workflow data is reused in the workflow data corresponding to the current demand behavior tree.
  4. 根据权利要求1至3中任一项所述的需求描述数据重用方法,其特征在于,所述对当前需求行为树与已存储的多个已建需求行为树进行相似性比较,查找与所述当前需求行为树存在最大公共子树的已建需求行为树,包括:The demand description data reuse method according to any one of claims 1 to 3, characterized in that the similarity comparison between the current demand behavior tree and a plurality of stored demand behavior trees is performed, and the search and the The current demand behavior tree has an established demand behavior tree with the largest common subtree, including:
    将所述当前需求行为树转换为图谱格式,得到当前需求图谱;Convert the current demand behavior tree into a graph format to obtain a current demand graph;
    将所述当前需求图谱与各已建需求行为树转换得到的各已建需求图谱进行相似性比较,查找与所述当前需求图谱存在最大公共子图谱的已建需求图谱;Compare the similarity between the current demand map and each built demand map converted from each built demand behavior tree, and search for the built demand map that has the largest common submap with the current demand map;
    将查找到的已建需求图谱所对应的已建需求行为树作为与所述当前需求行为树存在最大公共子树的已建需求行为树;Use the built demand behavior tree corresponding to the found built demand map as the built demand behavior tree that has the largest common subtree with the current demand behavior tree;
    其中,所述需求图谱包括:表示对应的需求行为树中各个节点的图谱节点,以及连接在各个图谱节点之间的定向连线。Wherein, the demand map includes: map nodes representing each node in the corresponding demand behavior tree, and directional connections connecting each map node.
  5. 根据权利要求4所述的需求描述数据重用方法,其特征在于,在所述需求行为树中,所述动作节点按照设定语义格式进行表述,且所述设定语义格式能够被拆分为多个语义字段;The demand description data reuse method according to claim 4, characterized in that, in the demand behavior tree, the action nodes are expressed according to a set semantic format, and the set semantic format can be split into multiple semantic fields;
    在所述需求图谱中,所述动作节点被转换为动作节点图谱,其包括:指代所述动作节点的动作图谱节点、指代所述动作节点各语义字段的字段图谱节点、以及连接在所述动作图谱节点和各个字段图谱节点之间的定向连线。In the requirements graph, the action node is converted into an action node graph, which includes: an action graph node that refers to the action node, a field graph node that refers to each semantic field of the action node, and a node connected to the action node. Describe the directional connections between action graph nodes and each field graph node.
  6. 根据权利要求4所述的需求描述数据重用方法,其特征在于,所述逻辑节点包括条件节点;在所述需求行为树中,所述条件节点按照所述设定语义格式进行表述,且所述设定语义格式能够被拆分为多个语义字段;The demand description data reuse method according to claim 4, characterized in that the logical node includes a condition node; in the demand behavior tree, the condition node is expressed according to the set semantic format, and the Set semantic format can be split into multiple semantic fields;
    在所述需求图谱中,所述条件节点被转换为条件节点图谱,其包括:指代所述条件节点的条件图谱节点、指代所述条件节点各语义字段的字段图谱节点、以及连接在所述条件图谱节点和各个字段图谱节点之间的定向连线。In the requirement map, the condition node is converted into a condition node graph, which includes: a condition graph node that refers to the condition node, a field graph node that refers to each semantic field of the condition node, and a node connected to the condition node. Directed connections between the condition map node and each field map node.
  7. 根据权利要求5或6所述的需求描述数据重用方法,其特征在于,所述设定语义格式为:主语、谓语、宾语、上下文;且所述设定语义格式能够被拆分为主语字段、谓语字段、宾语字段、上下文字段;The demand description data reuse method according to claim 5 or 6, characterized in that the set semantic format is: subject, predicate, object, context; and the set semantic format can be split into a subject field, Predicate field, object field, context field;
    其中,所述上下文为可选项。The context is optional.
  8. 根据权利要求6所述的需求描述数据重用方法,其特征在于,所述将当前需求图谱与各已建需求行为树转换得到的各已建需求图谱进行比较包括:The demand description data reuse method according to claim 6, wherein comparing the current demand map with each built demand map obtained by converting each built demand behavior tree includes:
    将所述需求图谱中的各个动作节点图谱和各个条件节点图谱分别作为一个整体进行比对,当已建需求图谱中存在所述当前需求图谱中的一完整动作节点图谱或完整条件节点图谱时,所述当前需求图谱中的所述动作节点图谱或所述条件节点图谱被确定为存在于所述已建需求图谱中。Each action node map and each condition node map in the demand map are compared as a whole. When there is a complete action node map or a complete condition node map in the current demand map in the established demand map, The action node graph or the condition node graph in the current demand graph is determined to exist in the built demand graph.
  9. 一种需求描述数据重用装置,其特征在于,包括至少一个存储器(1201)和至少一个处理器(1202),其中:A requirement description data reuse device, characterized by including at least one memory (1201) and at least one processor (1202), wherein:
    所述至少一个存储器(1201)用于存储计算机程序;The at least one memory (1201) is used to store computer programs;
    所述至少一个处理器(1202)用于调用所述至少一个存储器(1201)中存储的计算机程序,执行如权利要求1至8中任一项所述的需求描述数据重用方法。The at least one processor (1202) is configured to call a computer program stored in the at least one memory (1201) to execute the requirement description data reuse method according to any one of claims 1 to 8.
  10. 一种计算机可读存储介质,其上存储有计算机程序;其特征在于,所述计算机程序能够被一处理器执行并实现如权利要求1至8中任一项所述的需求描述数据重用方法。A computer-readable storage medium on which a computer program is stored; characterized in that the computer program can be executed by a processor and implement the requirement description data reuse method as claimed in any one of claims 1 to 8.
PCT/CN2022/112292 2022-08-12 2022-08-12 Requirement description data reuse method and device, and storage medium WO2024031695A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/112292 WO2024031695A1 (en) 2022-08-12 2022-08-12 Requirement description data reuse method and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/112292 WO2024031695A1 (en) 2022-08-12 2022-08-12 Requirement description data reuse method and device, and storage medium

Publications (1)

Publication Number Publication Date
WO2024031695A1 true WO2024031695A1 (en) 2024-02-15

Family

ID=89850510

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/112292 WO2024031695A1 (en) 2022-08-12 2022-08-12 Requirement description data reuse method and device, and storage medium

Country Status (1)

Country Link
WO (1) WO2024031695A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109189504A (en) * 2018-09-20 2019-01-11 腾讯科技(深圳)有限公司 Behavior executes method, behavior tree generation method, device and computer equipment
US20190086894A1 (en) * 2016-03-03 2019-03-21 Magazino Gmbh Controlling process of robots having a behavior tree architecture
US20200097262A1 (en) * 2018-09-24 2020-03-26 Salesforce.Com, Inc. Providing a reuse capability for visual programming logic within a building tool
US20200250897A1 (en) * 2019-01-31 2020-08-06 Marketech International Corp. Intelligent prognostics and health management system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190086894A1 (en) * 2016-03-03 2019-03-21 Magazino Gmbh Controlling process of robots having a behavior tree architecture
CN109189504A (en) * 2018-09-20 2019-01-11 腾讯科技(深圳)有限公司 Behavior executes method, behavior tree generation method, device and computer equipment
US20200097262A1 (en) * 2018-09-24 2020-03-26 Salesforce.Com, Inc. Providing a reuse capability for visual programming logic within a building tool
US20200250897A1 (en) * 2019-01-31 2020-08-06 Marketech International Corp. Intelligent prognostics and health management system and method

Similar Documents

Publication Publication Date Title
JP2022521816A (en) Automatic extraction of asset data from engineering data sources
US8040344B2 (en) CAD system, control method and control program for same
Perzylo et al. Opc ua nodeset ontologies as a pillar of representing semantic digital twins of manufacturing resources
CN111027703B (en) Quantum circuit query method and device, storage medium and electronic device
Sreeramulu et al. A new methodology for recognizing features in rotational parts using STEP data exchange standard
CN110659029B (en) Generating semantic flow graph representing computer program
WO2024031695A1 (en) Requirement description data reuse method and device, and storage medium
Gavranović et al. Categorical deep learning: An algebraic theory of architectures
Soleymani Efficient optimal eighth-order derivative-free methods for nonlinear equations
Ouyang et al. Semantic enrichment of object associations across federated BIM semantic graphs in a common data environment
US20220277119A1 (en) A System and Method for Generating a Holistic Digital Twin
Khomenko et al. An algorithm for direct construction of complete merged processes
KR102054756B1 (en) Method for designing optimizationally 3D model library to International standard standard product in Shipbuilding Marine
Dai et al. IEC 61499 ontology model for semantic analysis and code generation
Eiden et al. Supporting semantic PLM by using a lightweight engineering metadata mapping engine
Linard et al. polydd: Towards a framework generalizing decision diagrams
Jelinek et al. Robotic template library
Lehmann et al. VyZX: Formal Verification of a Graphical Quantum Language
CN111737593A (en) Method, device, equipment and storage medium for acquiring cross-group communication relationship diagram
EP4099240A1 (en) System and method for building data exchange
JP2015161983A (en) Source code generation device
Tu et al. Reusable Ontology Generation and Matching from Simulation Models
US20220342376A1 (en) Apparatus and method for extracting common command information from plc ladder information
Hoffmann et al. Evaluating SPARQL-based model checking: Potentials and limitations
Dwivedi Approximate Graph Edit Distance for Structural Pattern Recognition

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22954647

Country of ref document: EP

Kind code of ref document: A1