CN106933744A - Node revision status indication method and device, electronic equipment and storage medium - Google Patents

Node revision status indication method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN106933744A
CN106933744A CN201710170288.0A CN201710170288A CN106933744A CN 106933744 A CN106933744 A CN 106933744A CN 201710170288 A CN201710170288 A CN 201710170288A CN 106933744 A CN106933744 A CN 106933744A
Authority
CN
China
Prior art keywords
node
tree
behavior tree
array
child
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201710170288.0A
Other languages
Chinese (zh)
Inventor
王钞仕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201710170288.0A priority Critical patent/CN106933744A/en
Publication of CN106933744A publication Critical patent/CN106933744A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure is directed to a kind of node revision status indication method and device, the method includes:Read the first behavior tree document and the second behavior tree document and the first behavior tree document and the second behavior tree document are parsed to obtain the first behavior tree and the second behavior tree;Each node in the first behavior tree and the second behavior tree is compared and computing and the revision state of each node is marked according to operation result;It is in order to be to set the revision status information for checking each node according to described the third line in setting that marked each described node is configured into the third line.The method can improve the testing efficiency of tester.

Description

Node revision status indication method and device, electronic equipment and storage medium
Technical field
This disclosure relates to software testing technology field, in particular to a kind of node revision status indication method, node Revision status indication device, electronic equipment and computer-readable recording medium.
Background technology
With the development of network technology, online game also increasingly receives an acclaim.In majority game, each virtual objects are all AI (artificial intelligence, the Artificial Intelligence) behaviors of differing complexity can be utilized to control.With virtual The increase of number of objects, the quantity of AI behaviors is also increasing;Therefore, a large-scale game may include hundreds and thousands of not Same AI Action logics.In the exploitation of game, AI behavior can by one based on XML (extensible markup language, Extensible Markup Language) text of form is controlled.Similar to multiway tree knot common in computer Structure, the Action logic of structure organization each AI of the XML texts to set;Also, each AI show each action or Each behavior, is all the different nodes in a branch of this AI behavior tree;Each AI behaviors tree can include several branches Or several nodes;Tens, hundreds of branches or nodes can also be included.
For one is played, it is ensured that the AI behaviors of small monster or big BOSS are correctly very important.Therefore, In order to the AI behaviors for ensureing small monster or big BOSS are correct, game is formal reach the standard grade before, AI behavior trees be need by Test.So, if when a tester has found that a certain AI behaviors have abnormal or incorrect, how to position this How high the BUG of AI behaviors is when in face of a branch and node very huge AI behavior trees, especially before game is reached the standard grade BUG is efficient navigated to, is considerable.
In correlation technique in terms of for AI behavior trees Diff (comparison), it is limited only to two XML of behavior tree Text carries out Diff, then informs that tester's row is modified (what text etc. for example increased or delete); But, tester can not be directly informed, two trees are specifically where to be modified;Meanwhile, can not be very straight Increased certain row is used in which branch, which level to the tester that tells for seeing, and can cause assorted to current tree after increase Logic Modification etc.;Tester needs to check Diff results by text Diff instruments first, after text Diff Result, checked in AI tree editing machines specifically which position what new branch or new node, efficiency increased in manually It is very low.
It should be noted that information is only used for strengthening the reason of background of this disclosure disclosed in above-mentioned background section Solution, therefore can include not constituting the information to prior art known to persons of ordinary skill in the art.
The content of the invention
The purpose of the disclosure is to provide a kind of node revision status indication method, node revision status indication device, electricity Sub- equipment and computer-readable recording medium, and then limitation and defect due to correlation technique are at least overcome to a certain extent Caused by one or more problem.
According to an aspect of this disclosure, there is provided a kind of node revises status indication method, including:
Read the first behavior tree document and the second behavior tree document and to the first behavior tree document and described Two behavior tree documents are parsed to obtain the first behavior tree and the second behavior tree;
Each node in the first behavior tree and the second behavior tree is compared computing and according to computing knot Fruit is marked to the revision state of each node;
By marked each described node be configured to the third line for tree in order to according to described the third line for tree checks respectively The revision status information of the node.
In a kind of exemplary embodiment of the disclosure, to the first behavior tree and the second behavior tree in it is each Node compare computing and according to operation result the revision state of each node is marked including:
Obtain the first behavior tree first node and the second behavior tree in there is identical section with the first node The Section Point of point identifier;
Judge whether the first node and Section Point are sky node;
When it is sky node to judge first node Section Point described in non-NULL node, using the first mark to described The revision state of first node is marked;
When first node Section Point non-NULL node described in empty node is judged, using the second mark to described the The revision state of two nodes is marked.
In a kind of exemplary embodiment of the disclosure, the node revision status indication method also includes:
When judging that the first node is non-NULL node with the Section Point, acquisition is associated with the first node The first child node array and the second child node array for being associated with the Section Point;
The first child node array and the second child node array are carried out by computing and judged using recursive algorithm Whether the first child node array and the second child node array are sky node array;
When the first child node array is judged and the second child node array is non-NULL node array, obtain described One has first child node and the of same node identifier in first child node array and the second child node array Two child nodes;
Pair the first child node property set associated with first child node and associated with second child node Two child node property sets are compared, and the revision state of second child node is entered using the 3rd mark according to comparison result Line flag.
In a kind of exemplary embodiment of the disclosure, the node revision status indication method also includes:
When the first child node array is judged and the second child node array is sky node array, obtain with it is described The first child node index of first node association;
It is have phase with first child node index in the 3rd node index that tree associates to search with described the third line With the same node point of node identifier;
Find the same node point and the same node point described the third line be tree in position and described first When position in behavior tree is different, the revision state of the same node point is marked using the 4th mark.
In a kind of exemplary embodiment of the disclosure, the node revision status indication method also includes:
It is that each described node identified in setting generates a Dot documents by described the third line;
The Dot documents are read using a shape library and be depicted as a behavior tree comprising different identification.
In a kind of exemplary embodiment of the disclosure, the node revision status indication method also includes:
For each node configures a node identifier.
It is that one node identifier of each node configuration includes in a kind of exemplary embodiment of the disclosure:
Being sent to a multi-path search tree server using a multi-path search tree editing machine increases the increasing of a new node identifier Plus request;
The multi-path search tree server response is described to increase the node identifier increase that request recorded the last time A new node identifier is obtained after one node identifier preset value and the new node identifier is sent to the multi-path search Tree editing machine;
After the multi-path search tree editing machine receives the new node identifier, the new node identifier configurations are given The node.
According to an aspect of this disclosure, there is provided a kind of node revises status indication device, including:
Behavior tree parsing module:For reading the first behavior tree document and the second behavior tree document and to the first row It is that tree document and the second behavior tree document are parsed to obtain the first behavior tree and the second behavior tree;
Comparing module:For computing of comparing to each node in the first behavior tree and the second behavior tree And the revision state of each node is marked according to operation result;
Node configuration module:It is in order to according to described in setting for marked each described node to be configured into the third line The third line is the revision status information that tree checks each node.
According to an aspect of this disclosure, there is provided a kind of electronic equipment, including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to perform the section described in above-mentioned any one via the executable instruction is performed Point revision status indication method.
According to an aspect of this disclosure, there is provided a kind of computer-readable recording medium, computer program is stored thereon with, The computer program is when executed by realizing the node revision status indication method described in above-mentioned any one.
A kind of node revision status indication method and device of the disclosure, by the first behavior tree document and the second behavior Tree document is parsed to obtain the first behavior tree and the second behavior tree;Then in the first behavior tree and the second behavior tree Each node compare and computing and the revision state of each node be marked according to operation result;Again by marked each section It is in order to be to set the revision status information for checking each node according to the third line in setting that point is configured to the third line;On the one hand, can be with Each node based on the first behavior tree and the second behavior tree is compared computing and the revision according to operation result to each node State is marked so that whether the revision state that tester can be directly according to each node understands repairing for the node Change, it is no longer necessary to instrument is compared by text and checks comparison result, improve testing efficiency;On the other hand, by will be marked Each node be configured to the third line for tree in, tester can directly the third line for set in search all of modification information, The time for searching modification is saved, cost is saved.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the implementation for meeting the disclosure Example, and it is used to explain the principle of the disclosure together with specification.It should be evident that drawings in the following description are only the disclosure Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 schematically shows the flow chart that a kind of node revises status indication method.
Fig. 2 schematically shows the examples of interfaces figure that a kind of node revises status indication.
Fig. 3 schematically shows a kind of exemplary plot of behavior tree.
Fig. 4 schematically shows the exemplary plot of another behavior tree.
Fig. 5 schematically shows a kind of node comparison calculation and node revises the method flow diagram of status indication.
Fig. 6 schematically shows the exemplary plot of another behavior tree.
Fig. 7 schematically shows the flow chart that another node revises status indication method.
Fig. 8 schematically shows the examples of interfaces figure that another node revises status indication.
Fig. 9 schematically shows a kind of method flow diagram of node identification configuration.
Figure 10 schematically shows a kind of installation drawing of node identification configuration.
Figure 11 schematically shows the block diagram that a kind of node revises status indication device.
Figure 12 schematically shows the block diagram of a kind of electronic equipment.
Specific embodiment
Example embodiment is described more fully with referring now to accompanying drawing.However, example embodiment can be with various shapes Formula is implemented, and is not understood as limited to example set forth herein;Conversely, thesing embodiments are provided so that the disclosure will more Fully and completely, and by the design of example embodiment those skilled in the art is comprehensively conveyed to.Described feature, knot Structure or characteristic can be combined in one or more implementation methods in any suitable manner.In the following description, there is provided perhaps Many details are so as to provide fully understanding for implementation method of this disclosure.It will be appreciated, however, by one skilled in the art that can Omit one or more in the specific detail to put into practice the technical scheme of the disclosure, or other sides can be used Method, constituent element, device, step etc..In other cases, be not shown in detail or describe known solution a presumptuous guest usurps the role of the host avoiding and So that each side of the disclosure thickens.
Additionally, accompanying drawing is only the schematic illustrations of the disclosure, it is not necessarily drawn to scale.Identical accompanying drawing mark in figure Note represents same or similar part, thus will omit repetition thereof.Some block diagrams shown in accompanying drawing are work( Energy entity, not necessarily must be corresponding with physically or logically independent entity.These work(can be realized using software form Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place These functional entitys are realized in reason device device and/or microcontroller device.
A kind of node revision status indication method is provide firstly in this example embodiment.With reference to shown in Fig. 1, the node Revision status indication method may comprise steps of:
Step S110. read the first behavior tree document and the second behavior tree document and to the first behavior tree document with And the second behavior tree document is parsed to obtain the first behavior tree and the second behavior tree.
Step S120. compares computing and root to each node in the first behavior tree and the second behavior tree The revision state of each node is marked according to operation result.
It is in order to be in setting according to described the third line that marked each described node is configured to the third line by step S130. Tree checks the revision status information of each node.
In above-mentioned node revision status indication method, on the one hand, the first behavior tree and the second behavior tree can be based on Each node compare and computing and the revision state of each node be marked according to operation result so that tester can be with Whether being modified for the node is directly understood according to the revision state of each node, it is no longer necessary to instrument is compared by text and is checked Comparison result, improves testing efficiency;On the other hand, in by the way that marked each node is configured into the third line for tree, test Personnel directly can search all of modification information in the third line is for tree, save the time for searching modification, save cost.
Below, each step of above-mentioned node revision status indication method in this example embodiment will be carried out specifically It is bright.
In step s 110, the first behavior tree document and the second behavior tree document are read and to the first behavior tree text Shelves and the second behavior tree document are parsed to obtain the first behavior tree and the second behavior tree.
In this example embodiment, above-mentioned behavior tree document can for example include XML (Extensible Markup Language, extensible markup language) form text document, the text document of TXT forms;Word forms can also be included Text document of text document or CSS (Cascading Style Sheets, CSS) form etc., this example reality Apply mode and do not do specifically limited to this;In this example, first XML document and the second row of the first behavior tree can first be read It is second XML document of tree, then respectively above-mentioned first XML document and the second XML document parse obtaining the first row It is tree and the second behavior tree.For example:
With reference to shown in Fig. 2, " choosing tree 1 " control shown in Fig. 2 can be first triggered, and select according to " tree_1path " The first behavior tree text document that needs compare;Then " choose tree 2 " control shown in triggering Fig. 2, and according to " tree_ 2path " selects the second behavior tree text document corresponding with above-mentioned first behavior tree, is judging above-mentioned first behavior tree text text In the case that shelves and the second behavior tree text document are legal, can parse automatically above-mentioned first behavior tree text document and Second behavior tree text document obtains above-mentioned first behavior tree and the second behavior tree, then can include the first behavior tree In first behavior tree viewing area, the second behavior tree is included in the second behavior tree viewing area.Wherein, the first behavior tree example As may be referred to shown in Fig. 3;Second behavior tree for example may be referred to shown in Fig. 4.
In the step s 120, each node in the first behavior tree and the second behavior tree is compared computing And the revision state of each node is marked according to operation result.With reference to shown in Fig. 5, computing of comparing to each node And the revision state of each node is marked according to operation result can include step S1202, step S1204, step S1206 and step S1208.Wherein:
In step S1202, with described first in the first node of acquisition the first behavior tree and the second behavior tree Node has the Section Point of same node identifier.
In this example embodiment, the first node of above-mentioned first behavior tree for example can be the first of the first behavior tree Root node;The Section Point with first node in above-mentioned second behavior tree with same node identifier for example can be second Node.Additionally, the testing efficiency of tester in order to better improve, respectively saves in above-mentioned first behavior tree and the second behavior tree The node identifier of point is all uniquely determined;It is therefore to be understood that in above-mentioned first behavior tree and the second behavior tree The node identifier of each node is one-to-one with each node.In this example, above-mentioned first root node can respectively be obtained And second root node, then above-mentioned first root node and the second root node incoming can be compared function (Diff tree letters Number, function name for example can be do_diff_node, and parameter can include 1 node of tree, 3 nodes of 2 nodes of tree and tree) in, it is right Above-mentioned first root node and the second root node are just compared.Wherein, above-mentioned comparison function (Diff trees function) can be used for ratio Compared with text.Additionally, in other illustrative embodiments of the disclosure, it is also possible to according to actual needs by other letters Several that above-mentioned first root node and the second root node are compared, this example embodiment is not done specifically limited to this.
In step S1204, judge whether the first node and Section Point are sky node.
In step S1206, when it is sky node to judge first node Section Point described in non-NULL node, utilize First mark is marked to the revision state of the first node.For example:
When it is empty node for the root node of non-NULL node second to judge above-mentioned first root node, it is possible to use the first mark (for example can be Del, or Cut etc., this example embodiment is not done specifically limited to this) be to the first root node Revision state is marked.
In step S1208, when first node Section Point non-NULL node described in empty node is judged, using the Two marks are marked to the revision state of the Section Point.For example:
When it is non-NULL node for the empty root node of node second to judge above-mentioned first root node, it is possible to use the second mark (for example can be Add, or Raise etc., this example embodiment is not done specifically limited to this) be to the second root node Revision state be marked.
In another example embodiment of the disclosure, judging that above-mentioned first root node is with above-mentioned second root node During empty node, the comparison calculation to the first behavior and the second behavior tree can be terminated.
The disclosure additionally provides another node revision status indication method.With reference to shown in Fig. 7, node revision state mark Note method can include step S1210, step S1212, step S1214 and step S1216.Wherein:
In step S1210, when judging that the first node is non-NULL node with the Section Point, obtain and institute The the second child node array stated the first child node array of first node association and associated with the Section Point.
In this exemplary embodiment, when judging that above-mentioned first root node and the second root node are non-NULL node, can The the first child node array associated with the first root node with acquisition and the second child node array associated with the second root node, so After can by above-mentioned first child node array and the second child node array it is incoming one compare function (Diff tree functions, function name For example can be do_diff_children, parameter can include 1 node child node collection of tree, 2 node child node collection of tree and tree 3 Node etc.).
In step S1212, using recursive algorithm to the first child node array and the second child node array Carry out computing and judge whether the first child node array and the second child node array are sky node array.Specifically:
For example computing can be carried out using recursive algorithm, then judge above-mentioned first child node array and the second child node Whether array is sky node array;Judging that above-mentioned first child node array is the above-mentioned second child node array of non-NULL node array During for empty node array, it is possible to use the first mark is identified to the first child node array;Judging above-mentioned first child node Array is empty node the second child node of array array when being non-NULL node array, it is possible to use the second mark is to the second son node number Group is identified;When above-mentioned first child node array is judged and the second child node array is non-NULL node array, can be with Go to step S1214.
In step S1214, judging that the first child node array and the second child node array be non-NULL node During array, obtaining in the first child node array and the second child node array one has the of same node identifier One child node and the second child node.
In this example embodiment, judging that above-mentioned first child node array and the second child node array be non-NULL During node array, can obtain in above-mentioned first child node array and above-mentioned second child node array one has same node point mark Know first child node and the second child node of symbol (Node_id);After getting the first child node and the second child node, can be with It is utilized respectively the first mark or the second mark and rower is entered to the node revision state before the first child node or the second child node Know.
In step S1216, pair the first child node property set associated with first child node and with described second Second child node property set of child node association is compared, and the described second son is saved using the 3rd mark according to comparison result The revision state of point is marked.
In this example embodiment, pair the first child node property set associated with above-mentioned first child node and with it is above-mentioned Second child node property set of the second child node association is compared one by one, judges above-mentioned first child node property set with above-mentioned the Two child node property sets whether all same;Judge above-mentioned first child node property set and the second child node property set differ or When not all the same, it is possible to use the 3rd mark (such as can be Diff, or Div etc., this example embodiment is to this Do not do specifically limited) the revision state of above-mentioned second child node is marked.
In step s 130, it is in order to according to the described 3rd in setting marked each described node to be configured into the third line Behavior tree checks the revision status information of each node.
In this example embodiment, the third line is that the root node of tree can be by the root node of the first behavior tree of duplication simultaneously The child node collection of the root node after duplication is emptied the root node for obtaining that the third line is tree;In this example, can by it is above-mentioned The labeled each node for crossing revision state is configured in child node corresponding with the root node that the third line is, then in triggering Fig. 2 Shown " generation diff trees " control, it is tree to generate above-mentioned the third line, and by the third line for tree is included in the third line for tree shows Region (the third line may be referred to shown in Fig. 6 for tree), in order to be believed according to the revision state that the third line is each node in tree Breath checks whether each node is modified.
In another example embodiment of the disclosure, above-mentioned node revision status indication method also includes:Judging When the first child node array and the second child node array are sky node array, what acquisition was associated with the first node First child node is indexed;Then look up with described the third line be during the 3rd node that associate of tree is indexed with the first child node rope Same node point with same node identifier in drawing;The same node point and the same node point are being found the described 3rd When position in behavior tree is different from the position in the first behavior tree, the revision using the 4th mark to the same node point State is marked.Specifically:
When above-mentioned first child node array is judged and the second child node array is sky node array, it is possible, firstly, to Location index of the first child node that acquisition is associated with above-mentioned first root node in his father's Node subsets;It is then possible to obtain again It is tree association and node identifier and the consistent node (being designated as the 3rd node here) of the first child node at it with above-mentioned the third line The location index of father node subset, is designated as the first child node index and the 3rd child node index;Saved when above-mentioned first son is got After point index and the 3rd child node index, the node number that Del is designated before the 3rd node is indexed can be calculated, with the 3rd Node index subtracts the interstitial content for being designated Del nodes, obtains new the 3rd node index;Further, above-mentioned is judged Whether one node index is identical with new the 3rd node index, is judging above-mentioned first node index and new the 3rd node index When differing, it is possible to use the 4th mark (such as can be Pchange, or Alter etc., this example embodiment This is not done specifically limited) the revision state that the third line is the same node point in setting is identified.
In a kind of example embodiment of the disclosure, with reference to shown in Fig. 8, first, the first behavior tree and second are generated Behavior tree, and the first behavior tree and the second behavior tree are respectively displayed on the first behavior tree viewing area and the second behavior tree Viewing area.
Secondly, first root node " 1 " of the first behavior tree and second root node " 1 " of the second behavior tree are obtained, then In the first root node and the incoming Diff trees function " do_diff_node " of the second root node, will judge respectively the first root node with And second root node whether be sky node;The result for obtaining is that the first root node and the second root node are non-NULL node.
And then, the first child node array " 4 ", " 5 ", " 6 ", " 8 " and second root node of the first root node are obtained Second child node array " 15 ", " 4 ", " 16 ", " 17 ", " 18 ", then respectively by the first child node array and the second child node In the incoming Diff trees function " do_diff_children " of array, judge that the first child node array and the second child node array are No is empty node array;The result for obtaining is that the first child node array and the second child node array are non-NULL node array.
Then, first son that there is same node point to identify in the first child node array and the second child node array is obtained Node " 4 ", is then " Add " by the revision status indication of the node " 15 " in the second child node array, and node " 15 " is added It is added in the child node that the third line is tree;Then the attribute and the second son section of the child node " 4 " in the first child node array are judged Whether the attribute of the child node " 4 " in point array is identical;The result for obtaining is different attribute, then by the revision of child node " 4 " Status indication is " Diff ".
Further, by " 5 ", " 6 " in the first child node array, " 8 " node array and the second child node Calculated in " 16 ", " 17 ", the incoming Diff trees function " do_diff_children " of " 18 " node array, and by " 5 ", " 6 ", The revision status indication of " 8 " node is " Delete ";It is " Add " by the revision status indication of " 16 ", " 17 ", " 18 " node.
Further, respectively from first child node of the first behavior tree index and the 3rd child node that the third line is tree Node of the inquiry with same node point mark in index, the result for obtaining is node " 4 ";Calculate during the first child node is indexed from root Node starts between node " 4 ", and node revision state is marked as the node number of " Delete ", and utilizes the first child node In index the section that node revision state is marked as " Delete " is subtracted since root node to total node number node " 4 " Point number, the result for obtaining is 1;Calculate in the 3rd child node index since root node to node " 4 ", node revision shape State is marked as the node number of " Delete ", and in being indexed using the 3rd child node since root node to node " 4 " Total node number subtracts the node number that node revision state is marked as " Delete ", and the result for obtaining is 2;Due to what is obtained Result is different, then by the third line for the revision status indication of tree interior joint " 4 " is " Pchange ".
Finally, triggering " generation Diff trees " control, it is that the third line that tree viewing area shows is tree to obtain the third line.And And, " the Add nodes ", " Delete nodes " and " Diff nodes " on right side can be triggered, corresponding result can be obtained respectively, Conveniently checked, improve testing efficiency.
In another example embodiment of the disclosure, above-mentioned node revision status indication method can also include:Will Above-mentioned the third line is that each described node identified in setting generates a Dot documents;And (for example can be using a shape library Graphviz, or other shape libraries, this example embodiment are not done specifically limited to this) read the Dot documents simultaneously It is depicted as a behavior tree comprising different identification.
The disclosure additionally provides another node revision status indication method.Node revision status indication method can be with Including configuring a node identifier for above-mentioned each node.With reference to shown in Fig. 9, configuration node identifier can include step S910, Step S920 and step S930.Wherein:
In step S910, being sent to a multi-path search tree server using a multi-path search tree editing machine increases by a new section The increase request of point identifier.
In this example embodiment, above-mentioned multi-path search tree editing machine (BtreeEditor) is that editor produces a tree Instrument;When being using multi-path search tree editing machine, it is necessary first to be connected to above-mentioned multi-path search tree server (BtreeServer) on, available functional node on above-mentioned multi-path search tree server is then got.In this example, join Examine shown in Figure 10, multi-path search tree editing machine (BtreeEditor) first sends to multi-path search tree server (BtreeServer) One needs to increase an increase request for new node identifier (Node_id).Wherein, above-mentioned node identifier (Node_ Id attribute) can be checked in behavior tree XML document;Further, in order to testing efficiency can be improved, each section Point identifier (Node_id) has a fixed attribute.
In step S920, the multi-path search tree server response is described to increase the section that request recorded the last time A new node identifier is obtained after point identifier one node identifier preset value of increase and be sent to the new node identifier The multi-path search tree editing machine.
In this example embodiment, with continued reference to shown in Figure 10, when above-mentioned multi-path search tree server (BtreeServer) when receiving above-mentioned increase request, the node identification that above-mentioned increase request recorded the last time is responded Symbol increase a node identifier preset value (for example can be 1 or 2, or 3 or 4, this example embodiment to this not Do specifically limited) after obtain a new node identifier then the new node identifier be sent to multi-path search tree edit Device (BtreeEditor).Additionally, in other exemplary embodiments of the disclosure, it is also possible to according to actual conditions with others Mode obtains new node identifier, does not do particular determination in the present exemplary embodiment to this.
In step S930, after the multi-path search tree editing machine receives the new node identifier, by the new section Point identifier is allocated to the node.
In this example embodiment, with continued reference to shown in Figure 10, when above-mentioned multi-path search tree editing machine (BtreeEditor) after receiving above-mentioned new node identifier, the new node identifier is allocated to need node identification The node of symbol.
Additionally, although each step of method in the disclosure is described with particular order in the accompanying drawings, this does not really want Asking or imply must perform these steps according to the particular order, or the step having to carry out shown in whole could be realized Desired result.It is additional or alternative, it is convenient to omit some steps, multiple steps are merged into a step and is performed, and/ Or a step is decomposed into execution of multiple steps etc..
This example embodiment additionally provides a kind of node revision status indication device.With reference to shown in Figure 11, the node is repaiied Ordering status indication device can include behavior tree parsing module 1102, comparing module 1104 and node configuration module 1106.Its In:
Behavior tree parsing module 1102 can be used for reading the first behavior tree document and the second behavior tree document and to institute State the first behavior tree document and the second behavior tree document is parsed to obtain the first behavior tree and the second behavior tree.
Comparing module 1104 can be used for carrying out each node in the first behavior tree and the second behavior tree Comparison calculation is simultaneously marked according to operation result to the revision state of each node.
Node configuration module 1106 can be used for by marked each described node be configured to the third line for tree in order to It is the revision status information that tree checks each node according to described the third line.
The detail of each module revises state mark in corresponding node in above-mentioned node revision status indication device Carry out thinking description in detail in note method, therefore here is omitted.
Although it should be noted that being referred to some modules or list of the equipment for action executing in above-detailed Unit, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more The feature and function of module or unit can embody in a module or unit.Conversely, an above-described mould The feature and function of block or unit can be further divided into being embodied by multiple modules or unit.
A kind of electronic equipment is also proposed in this example embodiment, as shown in figure 12, the electronic equipment 10 includes:Treatment Component 11, it can further include one or more processors, and the memory resource as representated by memory 12, be used for The instruction that storage can be performed by processing assembly 11, such as application program.The application program stored in memory 12 can include one It is individual or it is more than one each correspond to the module of one group of instruction.Additionally, processing assembly 11 is configured as execute instruction, to hold The row above method.
The electronic equipment 10 can also include:One power supply module, power supply module is configured to performing electronic equipment 10 Carry out power management;One wired or wireless network interface 13, is configured to for electronic equipment 10 to be connected to network;And one Input and output (I/O) interface 14.The electronic equipment 10 can operate the operating system in memory 12 based on storage, for example Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of non-transient computer readable storage medium storing program for executing is also proposed in this example embodiment, computer is stored thereon with Program, the computer program is when executed by realizing above-mentioned node revision status indication method.
Computer-readable recording medium can include the data-signal propagated in a base band or as a carrier wave part, its In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal, Optical signal or above-mentioned any appropriate combination.Computer-readable recording medium can send, propagates or transmit for by referring to Execution system, device or device is made to use or program in connection.
The program code included in computer-readable recording medium can be transmitted with any appropriate medium, including but not limited In wireless, wired, optical cable, radio frequency etc., or above-mentioned any appropriate combination.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can be realized by software, it is also possible to be realized by way of software is with reference to necessary hardware.Therefore, according to the disclosure The technical scheme of implementation method can be embodied in the form of software product, and the software product can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are causing a calculating Equipment (can be personal computer, server, mobile terminal or network equipment etc.) is performed according to disclosure implementation method Method.
Those skilled in the art will readily occur to its of the disclosure after considering specification and putting into practice invention disclosed herein Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modifications, purposes or Person's adaptations follow the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.Description and embodiments are considered only as exemplary, and the true scope of the disclosure and spirit are by appended Claim is pointed out.

Claims (10)

1. a kind of node revises status indication method, it is characterised in that including:
Read the first behavior tree document and the second behavior tree document and to the first behavior tree document and second row For tree document is parsed to obtain the first behavior tree and the second behavior tree;
Each node in the first behavior tree and the second behavior tree is compared computing and according to operation result pair The revision state of each node is marked;
By marked each described node be configured to the third line for tree in order to according to described the third line for tree checks it is each described in The revision status information of node.
2. node according to claim 1 revision status indication method, it is characterised in that to the first behavior tree and Each node in the second behavior tree is compared and computing and the revision state of each node is carried out according to operation result Mark includes:
Obtain the first behavior tree first node and the second behavior tree in there is identical section with the first node The Section Point of point identifier;
Judge whether the first node and Section Point are sky node;
When it is sky node to judge first node Section Point described in non-NULL node, using the first mark to described first The revision state of node is marked;
When first node Section Point non-NULL node described in empty node is judged, using the second mark to the second section The revision state of point is marked.
3. node according to claim 2 revises status indication method, it is characterised in that the node revises status indication Method also includes:
When judging that the first node is non-NULL node with the Section Point, acquisition associated with the first node the One child node array and the second child node array associated with the Section Point;
Computing is carried out to the first child node array and the second child node array using recursive algorithm and judges described Whether the first child node array and the second child node array are sky node array;
When the first child node array is judged and the second child node array is non-NULL node array, described first is obtained One has first child node and the second son of same node identifier in child node array and the second child node array Node;
Pair the first child node property set associated with first child node and the second son associated with second child node Nodal community collection is compared, and enters rower to the revision state of second child node using the 3rd mark according to comparison result Note.
4. node according to claim 3 revises status indication method, it is characterised in that the node revises status indication Method also includes:
When the first child node array is judged and the second child node array is sky node array, obtain and described first The first child node index of node association;
Search has identical section with the 3rd node index that described the third line is tree association with first child node index The same node point of point identifier;
Find the same node point and the same node point described the third line be tree in position and first behavior When position in tree is different, the revision state of the same node point is marked using the 4th mark.
5. node as claimed in any of claims 1 to 4 revises status indication method, it is characterised in that the section Point revision status indication method also includes:
It is that each described node identified in setting generates a Dot documents by described the third line;
The Dot documents are read using a shape library and be depicted as a behavior tree comprising different identification.
6. node as claimed in any of claims 1 to 4 revises status indication method, it is characterised in that the section Point revision status indication method also includes:
For each node configures a node identifier.
7. node according to claim 6 revises status indication method, it is characterised in that be that each node configuration one is saved Point identifier includes:
Please to the increase that a multi-path search tree server sends one new node identifier of increase using a multi-path search tree editing machine Ask;
The multi-path search tree server response is described to increase node identifier one section of increase that request recorded the last time A new node identifier is obtained after point identifier preset value and the new node identifier is sent to the multi-path search tree volume Collect device;
After the multi-path search tree editing machine receives the new node identifier, by the new node identifier configurations to described Node.
8. a kind of node revises status indication device, it is characterised in that including:
Behavior tree parsing module:For reading the first behavior tree document and the second behavior tree document and to the first behavior tree Document and the second behavior tree document are parsed to obtain the first behavior tree and the second behavior tree;
Comparing module:For computing and the root of comparing to each node in the first behavior tree and the second behavior tree The revision state of each node is marked according to operation result;
Node configuration module:It is in order to according to the described 3rd in setting for marked each described node to be configured into the third line Behavior tree checks the revision status information of each node.
9. a kind of electronic equipment, it is characterised in that including:
Processor;And
Memory, the executable instruction for storing the processor;
Wherein, the processor is configured to come described in perform claim requirement any one of 1-7 via the execution executable instruction Node revises status indication method.
10. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the computer program It is when executed by realizing the node revision status indication method described in claim any one of 1-7.
CN201710170288.0A 2017-03-21 2017-03-21 Node revision status indication method and device, electronic equipment and storage medium Pending CN106933744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710170288.0A CN106933744A (en) 2017-03-21 2017-03-21 Node revision status indication method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710170288.0A CN106933744A (en) 2017-03-21 2017-03-21 Node revision status indication method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN106933744A true CN106933744A (en) 2017-07-07

Family

ID=59433585

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710170288.0A Pending CN106933744A (en) 2017-03-21 2017-03-21 Node revision status indication method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN106933744A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857734A (en) * 2018-12-28 2019-06-07 济南铁路信息技术有限公司 A kind of data configuration and storage method describing passenger train timetable
CN110008304A (en) * 2019-04-03 2019-07-12 网易(杭州)网络有限公司 The difference visible processing method and device of behavior tree
CN111078669A (en) * 2019-12-18 2020-04-28 新华三大数据技术有限公司 Processing method, device and equipment based on name resolution tree and storage medium
CN112256259A (en) * 2020-10-23 2021-01-22 网易(杭州)网络有限公司 Method, device and equipment for processing thinking guide graph and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043762A (en) * 2009-10-15 2011-05-04 北大方正集团有限公司 Method and device for comparing layouts
US20140372554A1 (en) * 2013-06-14 2014-12-18 Disney Enterprises, Inc. Efficient synchronization of behavior trees using network significant nodes
CN105068929A (en) * 2015-08-06 2015-11-18 网易(杭州)网络有限公司 Test script generation method, test script generation device, testing method, testing device and testing system
CN106156265A (en) * 2015-06-08 2016-11-23 北京天禾元创软件股份有限公司 For the method and apparatus merging tree structure
CN106155658A (en) * 2015-04-08 2016-11-23 广州四三九九信息科技有限公司 The behavior tree editing machine realized based on U3D Plugin Mechanism

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043762A (en) * 2009-10-15 2011-05-04 北大方正集团有限公司 Method and device for comparing layouts
US20140372554A1 (en) * 2013-06-14 2014-12-18 Disney Enterprises, Inc. Efficient synchronization of behavior trees using network significant nodes
CN106155658A (en) * 2015-04-08 2016-11-23 广州四三九九信息科技有限公司 The behavior tree editing machine realized based on U3D Plugin Mechanism
CN106156265A (en) * 2015-06-08 2016-11-23 北京天禾元创软件股份有限公司 For the method and apparatus merging tree structure
CN105068929A (en) * 2015-08-06 2015-11-18 网易(杭州)网络有限公司 Test script generation method, test script generation device, testing method, testing device and testing system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857734A (en) * 2018-12-28 2019-06-07 济南铁路信息技术有限公司 A kind of data configuration and storage method describing passenger train timetable
CN109857734B (en) * 2018-12-28 2023-06-16 济南铁路信息技术有限公司 Data construction and storage method for describing passenger train schedule
CN110008304A (en) * 2019-04-03 2019-07-12 网易(杭州)网络有限公司 The difference visible processing method and device of behavior tree
CN111078669A (en) * 2019-12-18 2020-04-28 新华三大数据技术有限公司 Processing method, device and equipment based on name resolution tree and storage medium
CN111078669B (en) * 2019-12-18 2022-08-09 新华三大数据技术有限公司 Processing method, device and equipment based on name resolution tree and storage medium
CN112256259A (en) * 2020-10-23 2021-01-22 网易(杭州)网络有限公司 Method, device and equipment for processing thinking guide graph and storage medium

Similar Documents

Publication Publication Date Title
CN106933744A (en) Node revision status indication method and device, electronic equipment and storage medium
US9426177B2 (en) Method and apparatus for detecting security vulnerability for animation source file
CN106844217A (en) Control to applying bury method and device, readable storage medium storing program for executing a little
CN110389898A (en) Acquisition methods, device, terminal and the computer readable storage medium of Test Strategy
CN109558525A (en) A kind of generation method of test data set, device, equipment and storage medium
CN103873318A (en) Website automated testing method and automated testing system
CN109614312A (en) Method for generating test case, device, electronic equipment and storage medium
CN109086382A (en) A kind of method of data synchronization, device, equipment and storage medium
EP3438818B1 (en) Method and device for compiling computer language
CN106802865A (en) For the response analogue means and method of software test
CN110209576A (en) The calculation method and relevant device of test case coverage rate
CN111324718B (en) Session flow testing method and device, electronic equipment and readable storage medium
CN111259619B (en) Control method and device for configuration object, storage medium and verification platform
CN113127357A (en) Unit testing method, device, equipment, storage medium and program product
CN113094625A (en) Page element positioning method and device, electronic equipment and storage medium
CN117009911A (en) Abnormality determination method and device for target event, medium and electronic equipment
CN110362317B (en) Code conversion method, device and storage medium
CN108509442A (en) Searching method and device, server and computer readable storage medium
CN115481594B (en) Scoreboard implementation method, scoreboard, electronic equipment and storage medium
CN115098362A (en) Page testing method and device, electronic equipment and storage medium
CN106155848B (en) A kind of test method and equipment
CN109635175B (en) Page data splicing method and device, readable storage medium and electronic equipment
CN110489127A (en) Error code determines method, apparatus, computer readable storage medium and equipment
CN113220307B (en) Optimization method and device for code coverage analysis and electronic equipment
CN109697167A (en) Management method, system, electronic equipment and the storage medium of test variable

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170707