Simulation data generation method and device and storage medium

By using the dynamic matching mechanism of behavior trees in the data generation task, the problem of low simulation data generation efficiency in the prior art is solved, and flexible response to changing test requirements and efficient generation of simulation data are achieved.

CN120123231AActive Publication Date: 2025-06-10GRG BANKING IT
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510160139.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-10
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

The efficiency of generating simulation data in the prior art is low, and the code needs to be frequently modified and debugged to adapt to changing testing needs, which affects the efficiency of development and testing.

Method used

By obtaining the data generation tasks configured by the user, including data generation rules and data types, traversing the behavior tree to dynamically match and perform behavior nodes corresponding to the data types, and generating simulation data.

Benefits of technology

It improves the efficiency of simulation data generation, reduces the need for modification and debugging of existing code, and can dynamically adjust the simulation data generation process to adapt to changing test needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120123231A_ABST
    Figure CN120123231A_ABST
Patent Text Reader

Abstract

The invention discloses a simulation data generation method and device and a storage medium, and belongs to the technical field of data simulation. The method comprises the steps of obtaining a data generation task configured by a user; the data generation task comprises a data generation rule and a data type of the required simulation data; generating a task traversal behavior tree according to the data; the behavior tree is of a tree structure formed by connecting a root node and a plurality of child nodes, and the child nodes comprise behavior nodes used for executing preset behaviors; and in the traversing process, matching a target behavior node corresponding to the data type from the plurality of child nodes through the root node, and generating required simulation data according to a data generation rule through the target behavior node. According to the method and the device, through a data type driving mode, the behavior nodes corresponding to the data types can be dynamically matched and executed in the generation process, when a simulation scene or the data types are changed, existing codes do not need to be modified and debugged in a large amount, and the generation efficiency of the simulation data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of data simulation, and particularly relates to a method, apparatus, and storage medium for generating simulation data. Background Art

[0002] During the software development and testing process, due to the limitations of the development environment and testing environment, testers are usually not allowed to use real data when conducting system tests. To ensure the accuracy and effectiveness of the tests, a large amount of simulation data needs to be provided to simulate real scenarios.

[0003] In related technologies, simulation data is usually generated in a hard-coded manner. The hard-coded manner includes directly writing fixed data patterns and values in the code to generate a simulation data set that meets specific test requirements. However, in a public data operation environment, due to the frequent changes in data types and test scenarios, when it is necessary to modify the simulation scenario or data type to adapt to new test requirements, developers need to make a large number of modifications and debugging to the existing code, which affects the overall development and testing efficiency. Summary of the Invention

[0004] This application aims to solve at least one of the technical problems existing in the prior art. For this purpose, this application provides a method, apparatus, and storage medium for generating simulation data to improve the generation efficiency of simulation data.

[0005] In a first aspect, this application provides a method for generating simulation data, including:

[0006] Obtaining a data generation task configured by a user; the data generation task includes a data generation rule and the data type of the required simulation data;

[0007] Traversing a behavior tree according to the data generation task; the behavior tree is a tree-like structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for performing preset behaviors;

[0008] During the traversal process, matching a target behavior node corresponding to the data type from multiple child nodes through the root node, and generating the required simulation data according to the data generation rule through the target behavior node.

[0009] The method for generating simulation data provided by the embodiments of the present application includes obtaining a data generation task configured by a user; the data generation task includes a data generation rule and the data type of the required simulation data; traversing a behavior tree according to the data generation task; the behavior tree is a tree-like structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors; during the traversal process, the root node matches the target behavior node corresponding to the data type from multiple child nodes, and the target behavior node generates the required simulation data according to the data generation rule. By means of data type-driven, the embodiments of the present application enable dynamic matching and execution of behavior nodes corresponding to the data type during the generation process, so as to generate simulation data. Since the functions of each node in the structure of the behavior tree are relatively independent, even when the simulation scenario or data type changes, corresponding nodes can be matched from the behavior tree without a large amount of modification and debugging of the existing code, improving the generation efficiency of simulation data.

[0010] According to an embodiment of the present application, the obtaining of the data generation task configured by the user includes:

[0011] Obtaining the requirement information input by the user in the user interface; wherein, the requirement information includes the attributes, data type, and data generation rule of the required simulation data;

[0012] Generating the data generation task according to the requirement information.

[0013] In this embodiment, by providing a user interface, the user can input specific requirement information in the user interface, so that the data generation task generated according to these requirement information can more accurately reflect the actual requirements of the user.

[0014] According to an embodiment of the present application, the child nodes further include condition nodes for performing condition judgment; during the traversal process, when the condition nodes pass the judgment, the subsequent child nodes of the condition nodes are traversed.

[0015] In this embodiment, by integrating condition nodes in the behavior tree, the condition nodes can make judgments according to preset conditions when traversing the behavior tree, and only when the conditions are met will the subsequent child nodes be continued to be executed, enabling the simulation data generation process to be dynamically adjusted according to the changes in requirements and the environment, avoiding unnecessary operations, and reducing the waste of computing resources.

[0016] According to an embodiment of the present application, the matching of the target behavior node corresponding to the data type from multiple child nodes by the root node includes:

[0017] Obtaining the correspondence between different data types and different behavior nodes;

[0018] Match the target behavior node corresponding to the data type from the corresponding relationship through the root node.

[0019] In this embodiment, by obtaining the corresponding relationship between different data types and different behavior nodes, and using the root node to match the target behavior node that conforms to a specific data type from these corresponding relationships, the correct behavior node can be accurately selected to execute the corresponding data generation rule, reducing the need for manual search and matching, and further improving the efficiency of simulation data generation.

[0020] According to an embodiment of the present application, the matching of the target behavior node corresponding to the data type from multiple child nodes through the root node includes:

[0021] In the case of matching multiple target behavior nodes, sequentially traverse the conditional nodes before the multiple target behavior nodes;

[0022] In the case of traversing a target conditional node that passes the judgment, determine the target behavior node after the target conditional node as the target behavior node corresponding to the data type.

[0023] In this embodiment, when faced with multiple possible target behavior nodes, by sequentially checking the conditional nodes before each target behavior node and making a logical judgment based on the conditional nodes, the most suitable target behavior node is selected to generate simulation data, improving the accuracy of simulation data generation and making the generated data more in line with user requirements.

[0024] According to an embodiment of the present application, the method further includes:

[0025] In the case of not matching the target behavior node corresponding to the data type, verify the data type;

[0026] In the case of passing the verification, extract the data type and the data generation rule from the data generation task;

[0027] Create a new behavior node according to the data type and the data generation rule, and add the new behavior node to the behavior tree. The new behavior node generates the required simulation data according to the data generation rule.

[0028] In this embodiment, when the target behavior node corresponding to a specific data type is not matched, the data type is verified, which improves the validity of the data type. After the verification passes, the data type and the data generation rule can be automatically extracted from the data generation task, and new behavior nodes can be created accordingly. By adding the new behavior nodes to the behavior tree and using these nodes to generate simulation data, the scalability of the behavior tree structure is fully utilized. New behavior nodes can be added conveniently according to the new data type. When the simulation scenario or the data type changes, there is no need to make a large number of modifications and debugging to the existing code, which further improves the efficiency of generating simulation data.

[0029] According to an embodiment of the present application, in the behavior tree, a conditional node corresponds to the behavior node before. Before the target behavior node generates the required simulation data according to the data generation rule, it includes:

[0030] Judge whether the data generation task meets the preconditions through the conditional node before the target behavior node. If the preconditions are met, the judgment passes.

[0031] In this embodiment, by setting a conditional node before the behavior node, it is possible to judge whether the data generation task meets specific preconditions before executing the data generation rule, thereby reducing the generation of non-compliant or inaccurate simulation data and improving the accuracy and reliability of generating simulation data.

[0032] In a second aspect, the present application provides a device for generating simulation data. The device includes:

[0033] An acquisition module, configured to acquire a data generation task configured by a user; the data generation task includes a data generation rule and the data type of the required simulation data;

[0034] A traversal module, configured to traverse the behavior tree according to the data generation task; the behavior tree is a tree structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors;

[0035] A generation module, configured to, during the traversal process, match the target behavior node corresponding to the data type from multiple child nodes through the root node, and generate the required simulation data through the target behavior node according to the data generation rule.

[0036] The simulation data generation device provided by the embodiments of the present application obtains a data generation task configured by a user; the data generation task includes a data generation rule and the data type of the required simulation data; traverses a behavior tree according to the data generation task; the behavior tree is a tree-like structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors; during the traversal process, the root node matches the target behavior node corresponding to the data type from multiple child nodes, and the target behavior node generates the required simulation data according to the data generation rule. The embodiments of the present application enable dynamic matching and execution of behavior nodes corresponding to the data type during the generation process through a data type-driven method, thereby generating simulation data. Since the functions of each node in the structure of the behavior tree are relatively independent, even when the simulation scenario or data type changes, the corresponding nodes can be matched from the behavior tree without a large amount of modification and debugging of the existing code, improving the generation efficiency of the simulation data.

[0037] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the simulation data generation method described in the first aspect above is implemented.

[0038] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the simulation data generation method described in the first aspect above is implemented.

[0039] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the simulation data generation method described in the first aspect above is implemented.

[0040] One or more of the above technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0041] The method for generating simulation data provided by the embodiments of the present application includes obtaining a data generation task configured by a user; the data generation task includes a data generation rule and the data type of the required simulation data; traversing a behavior tree according to the data generation task; the behavior tree is a tree-like structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors; during the traversal process, the root node is used to match the target behavior node corresponding to the data type from multiple child nodes, and the target behavior node generates the required simulation data according to the data generation rule. By means of data type-driven, the embodiments of the present application enable dynamic matching and execution of behavior nodes corresponding to the data type during the generation process, so as to generate simulation data. Since the functions of each node in the structure of the behavior tree are relatively independent, even when the simulation scenario or data type changes, corresponding nodes can be matched from the behavior tree without a large amount of modification and debugging of the existing code, improving the generation efficiency of simulation data.

[0042] Further, by providing a user interface, the user can input specific requirement information in the user interface, so that the data generation task generated according to this requirement information can more accurately reflect the actual requirements of the user.

[0043] Further, by integrating conditional nodes in the behavior tree, the conditional nodes can make judgments according to preset conditions during the traversal of the behavior tree, and only when the conditions are met will the subsequent child nodes be continued to be executed, enabling the simulation data generation process to be dynamically adjusted according to the changes in requirements and the environment, avoiding unnecessary operations and reducing the waste of computing resources.

[0044] Furthermore, by obtaining the correspondence between different data types and different behavior nodes, and using the root node to match the target behavior node that conforms to a specific data type from these correspondences, the correct behavior node can be accurately selected to execute the corresponding data generation rule, reducing the need for manual search and matching, and further improving the generation efficiency of simulation data.

[0045] Furthermore, when facing multiple possible target behavior nodes, by sequentially checking the conditional nodes before each target behavior node and making a logical judgment based on the conditional nodes, the most suitable target behavior node is selected to generate simulation data, improving the accuracy of simulation data generation and making the generated data more in line with the user's requirements.

[0046] Furthermore, by verifying the data type when the target behavior node corresponding to a specific data type is not matched, the validity of the data type is improved. After the verification passes, the data type and data generation rules can be automatically extracted from the data generation task, and new behavior nodes can be created accordingly. By adding the new behavior nodes to the behavior tree and using these nodes to generate simulation data, the scalability of the behavior tree structure is fully utilized, and new behavior nodes can be easily added according to the new data type. When the simulation scenario or data type changes, there is no need to make a large number of modifications and debugging to the existing code, further improving the efficiency of simulation data generation.

[0047] Furthermore, by setting a condition node before the behavior node, it is possible to determine whether the data generation task meets specific preconditions before executing the data generation rules, thereby reducing the generation of non-compliant or inaccurate simulation data and improving the accuracy and reliability of simulation data generation.

[0048] Additional aspects and advantages of the present application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0050] Figure 1 is a schematic flowchart of a method for generating simulation data provided by an embodiment of the present application;

[0051] Figure 2 is a schematic architecture diagram of a behavior tree provided by an embodiment of the present application;

[0052] Figure 3 is a schematic diagram of the construction process of a behavior tree provided by an embodiment of the present application;

[0053] Figure 4 is a schematic structural diagram of a device for generating simulation data provided by an embodiment of the present application;

[0054] Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0055] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope of protection of the present application.

[0056] The terms "first", "second", etc. in the description and claims of this application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually of the same type, and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0057] Public data operation refers to the development and utilization of data generated by government departments at all levels, public institutions, and enterprises in the process of performing their duties according to law. The core of public data operation lies in promoting the efficient use of data resources and releasing data value through data sharing, opening, and authorized operation.

[0058] In the field of public data operation, the application of simulation data is of great significance. Since public data involves public interests and privacy protection, there may be risks in directly using real data for testing. Therefore, simulation data can provide a safe and controllable test environment for the public data operation system, help verify the functions and performance of the system, and reduce the improper use of real data. For example, in the test of a government data sharing platform, simulation data can simulate data interaction scenarios between different departments, improving the stability and reliability of the platform in actual operation.

[0059] However, with the increasing complexity of public data operation, the traditional hard-coded simulation data generation method requires directly writing fixed data patterns and values in the code. Once the test scenario or data type changes, a large amount of code modification and debugging are required, affecting the efficiency of the entire development and testing.

[0060] The following will, in conjunction with the accompanying drawings, through specific embodiments and their application scenarios, elaborate in detail on the method, device, and storage medium for generating simulation data provided by the embodiments of this application.

[0061] Among them, the method for generating simulation data can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.

[0062] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablets with a touch-sensitive surface (such as a touch screen display and / or a touchpad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (such as a touch screen display and / or a touchpad).

[0063] In each of the following embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse, and a joystick.

[0064] The method for generating simulation data provided by the embodiments of the present application, the execution subject of the method may be an electronic device or a functional module or functional entity in the electronic device that can implement the method. The electronic devices mentioned in the embodiments of the present application include, but are not limited to, mobile phones, tablet computers, computers, cameras, and wearable devices, etc. Hereinafter, taking the electronic device as the execution subject as an example, the method for generating simulation data provided by the embodiments of the present application will be described.

[0065] As Figure 1 shown, the method for generating simulation data includes: step 110, step 120, and step 130.

[0066] Step 110: Obtain a data generation task configured by the user; the data generation task includes a data generation rule and the data type of the required simulation data.

[0067] In the embodiments of the present application, the simulation data is virtual data generated by simulating a real-world scenario or process. One of the purposes of using simulation data is to provide data support that is close enough to the real environment for system testing without using real data.

[0068] The data generation task describes the specific requirements of the user for the simulation data. The data generation task may include a task name, the data volume of the simulation data, a data generation rule, the data type of the simulation data, etc.

[0069] Among them, the data generation rule may be a rule and condition defined by the user, used to guide the process of generating simulation data. For example, the data generation rule may include the range of data (such as the upper and lower limits of a value), the distribution type of data (such as normal distribution, uniform distribution, etc.), the frequency of generating data (such as how many data are generated per second, per hour), the mutual relationship between data (such as the dependency relationship between certain fields), and the data generation rule may also include the regular expression adopted to make the employee numbers of the generated staff conform to the regular expression, or other rules, such as naming rules, including specific letters, symbols, etc. The embodiments of the present application do not limit the data generation rule.

[0070] The data type may include various common types such as numerical type, character type, boolean type, etc., and each type is given a clear specific meaning, attribute, and behavior. Taking the generation of relevant data of staff as an example, the specific applications and characteristics of different data types are as follows:

[0071] Character data can include names. As character data, names carry the identification information of the staff. The meaning of a name clearly refers to the individual appellation of the staff. In terms of attributes, the length limit of the string can be set to adapt to the common length range of names, and the allowed character set can also be specified, such as common letters, Chinese characters, and some specific symbols. In terms of behavior, string comparison operations can be performed on names, such as judging whether two names are the same; name formatting output can also be carried out, such as displaying a name in a specific format, such as "surname, given name" or "given name surname".

[0072] Character data can also include job titles. Job titles can also be represented by character data. The meaning of a job title is a description of the name of the position where the staff is located. The attributes of a job title can include specific naming rules, such as following certain industry norms or internal naming conventions of the enterprise, and there will also be length limits to ensure conciseness and clarity. In terms of behavior, classification operations can be performed on job titles, such as classifying different job titles into different categories, such as management positions, technical positions, etc.; statistics of job titles can also be carried out, such as counting the number of occurrences of a specific job title to understand the distribution of different positions.

[0073] Character data can also include job content descriptions. Job content descriptions can be in character data, and the job content includes a detailed text description of the job responsibilities, tasks, and activities of the staff. In terms of attributes, since the job content may be relatively complex and diverse, the length of the string may be relatively long to accommodate rich information. In terms of behavior, text search operations can be performed on job content descriptions, such as searching for specific keywords or phrases to quickly locate information related to specific job content; key information in job content descriptions can also be extracted, such as extracting the main job responsibilities or important achievements for further analysis and processing.

[0074] Boolean data can include whether on duty. Whether on duty can be represented by boolean data. The meaning of whether on duty is simple and clear, that is, it indicates whether the staff is currently at the work post. Boolean data has only two possible values, true (indicating on duty) or false (indicating not on duty). In terms of behavior, simple conditional judgments can be made based on this value, such as only selecting on-duty staff when arranging work tasks; or when counting the attendance of staff, counting and analyzing according to the value of whether on duty.

[0075] Numeric data can be age, and age can be presented as numeric data. The meaning of age clearly represents the age information of the staff. In terms of attributes, age data usually has a clear value range, for example, from 0 to 120 years old, which conforms to the actual age range of humans. In addition, the precision of the value can also be involved, such as being accurate to an integer. In terms of behavior, comparison operations of age can be performed, for example, determining whether the age of a staff member is greater than or less than that of another staff member; the age difference can also be calculated to analyze the age differences between different staff members.

[0076] Taking the generation of relevant data of staff as an example, the configuration of the data generation task can include: setting the data type of the staff's name as character type, setting the staff's age as character type, setting whether on duty as boolean type, and data generation rules can be set for the staff's name, age, etc. For example, the proportion of different surnames in the generated name, the range of age, etc. can be set.

[0077] Step 120: Traverse the behavior tree according to the data generation task; the behavior tree is a tree-like structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for performing preset behaviors.

[0078] In the embodiment of the present application, the behavior tree is a tree-like structure describing the behavior decision-making and execution process. The behavior tree can include a root node and multiple child nodes. The root node is the starting node of the behavior tree, responsible for guiding the execution process of the behavior tree; the child nodes are the nodes other than the root node in the behavior tree. The child nodes can include behavior nodes, and the behavior nodes can be used to perform preset behavior actions.

[0079] When starting to perform the traversal operation, first start from the root node of the behavior tree and visit the child nodes layer by layer based on the structure of the behavior tree. The root node can be a node with overall control functions. For example, it can be a selection node or a sequence node, used to determine the execution order and logic of the subsequent child nodes. For example, if the root node is a selection node, each child node can be evaluated in turn according to different conditions. Once a child node meets the conditions and returns successfully, and the process is passed to the child node that meets the conditions, no other child nodes will be evaluated; if all child nodes do not meet the conditions, the entire selection node returns failure. When traversing the child nodes, corresponding operations can be performed according to the type of the child nodes.

[0080] In some embodiments, the behavior tree can be pre-constructed, such as Figure 2As shown, the data type mediator can represent the root node in the behavior tree. The data type mediator can be a selection node. The behavior node processor represents the behavior node. The behavior node can be directly connected to the root node or indirectly connected to the root node. After obtaining the user-configured data generation task, the user-expected simulation data can be extracted from the data generation task, the data type of the determined simulation quantity can be determined, and traversal can start from the data type mediator. The data type mediator is like an intelligent scheduling center that can dynamically select appropriate child nodes for execution according to different situations and conditions.

[0081] Step 130: During the traversal process, the root node matches the target behavior node corresponding to the data type from multiple child nodes, and the target behavior node generates the required simulation data according to the data generation rule.

[0082] In the embodiment of the present application, the root node, as the starting point of the behavior tree, is responsible for coordinating and controlling the execution of the child nodes. The traversal process starts from the root node. The root node can find the target behavior node corresponding to the required data type from multiple child nodes according to the data generation task. For example, if the data type of the simulation data required in the data generation task includes character type, the target behavior node corresponding to the character type can be matched; if the data type of the simulation data required in the data generation task includes multiple types, such as character type and numerical type, the target behavior node corresponding to the character type and the target behavior node corresponding to the numerical type can be matched respectively.

[0083] In some embodiments, the root node can match the target behavior node corresponding to the data type from multiple child nodes according to the preset matching logic. For example, tags or attributes can be pre-configured for each behavior node, and the tags or attributes include the data type corresponding to the behavior node. The target behavior node corresponding to the data type can be matched according to the tags or attributes of each behavior node.

[0084] In the embodiment of the present application, after determining the target behavior node, the required simulation data can be generated by the target behavior node according to the data generation rule. Specifically, the behavior node is pre-configured with the executed behavior operation. For example, the behavior operation is to call a preset algorithm or function to generate simulation data. The target behavior node can call the preset algorithm or function to generate the required simulation data based on the data generation rule.

[0085] Such as Figure 2As shown, after determining the target behavior node, the corresponding behavior node processor can be activated. This behavior node processor can call a preset algorithm or function to generate the required simulation data based on the data generation rules. The behavior node processor can also include an observer abort module, which can play a role in monitoring and controlling during the simulation data generation process. When an abnormal situation occurs or a specific abort condition is met during the simulation data generation process, the observer abort module will send a signal in a timely manner to stop the current processing flow to prevent the further expansion of errors and waste of resources.

[0086] In one example, if the behavior operation configured for the target behavior node is to call a random number generator to generate random numbers, the employee numbers of the staff can be generated according to the random number range defined in the data generation rules; if the behavior operation configured for the target behavior node is to call a large model to generate work content, the work content of the staff can be generated according to the keywords defined in the data generation rules.

[0087] It should be noted that each behavior node in the behavior tree has a specific state. After the execution of the behavior node, the execution result needs to be returned. The execution result can be success, failure, or in progress. Moreover, any process of each behavior node supports an interrupt operation, enabling the root node to adjust the execution strategy and make decisions in a timely manner when necessary. For example, if an abnormal situation occurs or the execution condition is no longer met during the execution of a certain behavior node, the root node can immediately interrupt the execution of this behavior node and select other appropriate child nodes to continue the execution.

[0088] In the embodiments of the present application, the generated simulation data can be data that meets the user's needs. For example, it can be the complete information of a single staff member, or the statistical data of a group of staff members, or the transaction data that a financial institution hopes to simulate, etc. The embodiments of the present application do not limit the generated simulation data.

[0089] The method for generating simulation data provided by the embodiments of the present application obtains a data generation task configured by a user; the data generation task includes a data generation rule and the data type of the required simulation data; traverses a behavior tree according to the data generation task; the behavior tree is a tree-like structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors; during the traversal process, the root node matches the target behavior node corresponding to the data type from multiple child nodes, and the target behavior node generates the required simulation data according to the data generation rule. The embodiments of the present application enable dynamic matching and execution of behavior nodes corresponding to the data type during the generation process through a data type-driven manner, thereby generating simulation data. Since the functions of each node in the structure of the behavior tree are relatively independent, even when the simulation scenario or data type changes, the corresponding node can be matched from the behavior tree without a large amount of modification and debugging of the existing code, improving the generation efficiency of the simulation data.

[0090] In practical applications, the method for generating simulation data provided by the embodiments of the present application can provide strong support for public data operations. For example, in financial data testing, simulation data that conforms to specific financial business rules can be generated by configuring a behavior tree, thereby better simulating real transaction scenarios. In government data operations, the method for generating simulation data provided by the embodiments of the present application can generate simulation data that conforms to different government business processes, helping to optimize the government service system.

[0091] In one example, a financial institution can configure a data generation task according to the business requirements of credit approval. The data generation task includes data generation rules, such as the customer income range, credit score range, loan amount range, etc., and the data type of the required simulation data, such as customer basic information, credit record, loan application form, etc. Traverse the behavior tree according to the configured task, starting from the root node, and find the corresponding target behavior node by matching the data type. For example, for the generation of customer credit records, the behavior tree will find the behavior node specifically used for generating credit records. The target behavior node can generate simulation data according to the data generation rule. For example, the generated simulation data can include information such as the customer's income, credit score, and historical loan records. When the test scenario expands from personal credit to corporate credit, only the data generation rule needs to be adjusted, and the code does not need to be modified to quickly generate simulation data that conforms to the new scenario, thereby improving the generation efficiency of the simulation data.

[0092] In some embodiments, obtaining the data generation task configured by the user includes:

[0093] Obtaining the requirement information input by the user in the user interface; wherein, the requirement information includes the attributes, data type, and data generation rule of the required simulation data;

[0094] Generate a data generation task according to the requirement information.

[0095] In this embodiment, a user interface can be provided, and the user interface may include elements such as forms, dropdown menus, checkboxes, text boxes, etc., so that users can conveniently input and select the required configuration parameters.

[0096] In this embodiment, the attributes of the simulation data can be the specific attributes that the user specifies for the required simulation data, such as the name, description, intended use, etc. of the data. For example, if the user wants to generate relevant data of the staff, the attributes of the simulation data may include name, age, employee number, job content, whether on duty, etc. After the user inputs the attributes of the simulation data in the user interface, the corresponding data type can also be selected. For example, for the name and job content, the data type can be selected as character type, for the age and employee number, the data type can be selected as numeric type, and for whether on duty, the data type can be selected as boolean type. Further, the user can also input data generation rules, including the range, distribution (such as normal distribution, uniform distribution), format requirements, constraint conditions, etc. of the data. For example, for the age, the range of the data can be set to 20 - 60, and for the name, the surname distribution requirements can be set.

[0097] In some embodiments, before the user submits the requirement information, the data input by the user can also be verified to ensure the validity and rationality of the input. For example, check whether the required fields have been filled, whether the data type selection is reasonable, whether there are logical errors in the data generation rules, etc. After the user submits the requirement information, a data generation task can be created according to the requirement information.

[0098] In this embodiment, by providing a user interface, the user can input specific requirement information in the user interface, so that the data generation task generated according to these requirement information can more accurately reflect the actual needs of the user.

[0099] In some embodiments, the child node further includes a condition node for performing conditional judgment; during the traversal process, when the condition node passes the judgment, the subsequent child nodes of the condition node are traversed.

[0100] In this embodiment, the condition node is a special node mainly used to evaluate specific conditions. The role of the condition node is to check the state of the current context or environment to decide whether to continue executing the subsequent nodes in the behavior tree without directly executing the behavior. The condition node will return a boolean value after evaluation, such as true or false. If it is true, the traversal process will continue to the subsequent child nodes of this condition node.

[0101] During the traversal process, when reaching a conditional node, the conditional node will execute predefined logic or functions to check the current input parameters, internal states, or environmental conditions. For example, for numerical data representing age, the conditional node can be used to determine whether the age of a staff member meets specific conditions, such as whether the age is greater than a certain threshold or within a certain age range, make a judgment based on the input age data, and output the corresponding result (true or false).

[0102] In this embodiment, by integrating conditional nodes in the behavior tree, the conditional nodes can make judgments according to preset conditions when traversing the behavior tree, and only continue to execute the subsequent child nodes when the conditions are met, enabling the simulation data generation process to be dynamically adjusted according to the needs and changes in the environment, avoiding unnecessary operations, and reducing waste of computing resources.

[0103] In some embodiments, the root node matches the target behavior nodes corresponding to the data types from multiple child nodes, including:

[0104] Obtain the corresponding relationships between different data types and different behavior nodes;

[0105] The root node matches the target behavior nodes corresponding to the data type from the corresponding relationships.

[0106] In this embodiment, the corresponding relationships between different data types and different behavior nodes can be pre-stored. For example, a mapping table or dictionary can be created to describe the corresponding relationships between data types and behavior nodes. Among them, since different attributes of simulation data can correspond to the same data type, for example, both staff numbers and ages correspond to numerical types, therefore, one data type can correspond to multiple behavior nodes, so that different behavior nodes can correspondingly generate simulation data of one attribute.

[0107] In this embodiment, after determining the data type in the data generation task, the corresponding relationships can be obtained, and the root node matches the corresponding target behavior nodes from the corresponding relationships.

[0108] In this embodiment, by obtaining the corresponding relationships between different data types and different behavior nodes, and using the root node to match the target behavior nodes that conform to specific data types from these corresponding relationships, the correct behavior nodes can be accurately selected to execute the corresponding data generation rules, reducing the need for manual search and matching, and further improving the efficiency of simulation data generation.

[0109] In some embodiments, the root node matches the target behavior nodes corresponding to the data type from multiple child nodes, including:

[0110] In the case of matching multiple target behavior nodes, traverse the conditional nodes before the multiple target behavior nodes in sequence;

[0111] In the case of traversing to a target condition node that passes the judgment, the target behavior node after the target condition node is determined as the target behavior node corresponding to the data type.

[0112] In this embodiment, as Figure 2 shown, a quantity type condition channel may include multiple behavior node processors, that is, it means that one data type can correspond to multiple behavior nodes. In this case, the root node will match multiple target behavior nodes.

[0113] The condition nodes before these target behavior nodes can be traversed according to a preset traversal rule. The traversed condition nodes are judged according to the preconditions and return results of "true" or "false". If the returned result is "false", it means the condition is not satisfied, and then continue to traverse the next condition node until a condition node returns a "true" result. The condition node that returns a "true" result is determined as the target condition node, and the target behavior node after the target condition node is selected for subsequent processing. For example, if the data type is numeric, the corresponding behavior nodes may include a behavior node for generating an employee number and a behavior node for generating an age. The root node can traverse the condition nodes before the behavior node for generating an employee number and the behavior node for generating an age in combination with the data generation task. When the condition node before the behavior node for generating an employee number returns a "false" result, then continue to traverse the condition node before the behavior node for generating an age. If this condition node returns a "true" result, then use the behavior node for generating an age to generate simulation data.

[0114] In some embodiments, the preset traversal rule may be sequential traversal, and these target behavior nodes can be traversed in sequence according to their order in the behavior tree. For example, multiple target behavior nodes include a behavior node for generating an employee number and a behavior node for generating an age. If the behavior node for generating an age is ranked before the behavior node for generating an employee number in the behavior tree, then the condition nodes before the behavior node for generating an age can be traversed first, and then the condition nodes before the behavior node for generating an employee number can be traversed.

[0115] In some embodiments, since the characteristics of different target behavior nodes may be different, the preset traversal rule can also be traversal according to priorities, and the condition nodes before the target behavior nodes with higher priorities are traversed first. For example, priorities can be set for different target behavior nodes according to characteristics such as the importance and business requirements of different target behavior nodes. For example, in a business requirement, an employee's employee number may be more important than an employee's age. The priority of the behavior node for generating an employee number can be set to a high level, and the priority of the behavior node for generating an age can be set to a low level.

[0116] In some embodiments, the preset traversal rule may also be to traverse according to the weights of different target behavior nodes, and preferentially traverse the condition nodes before the target behavior nodes with higher weights. For example, weights can be assigned to different target behavior nodes in advance, and during the traversal process, the condition nodes before the target behavior nodes with higher weights are traversed. Of course, the preset traversal rule can also be other traversal methods, which are not limited in the embodiments of the present application.

[0117] In this embodiment, when facing multiple possible target behavior nodes, by sequentially checking the condition nodes before each target behavior node and making a logical judgment based on the condition nodes, the most appropriate target behavior node is selected to generate simulation data, improving the accuracy of simulation data generation and making the generated data more in line with user requirements.

[0118] In some embodiments, the method further includes:

[0119] In the case where no target behavior node corresponding to the data type is matched, the data type is verified;

[0120] If the verification passes, the data type and the data generation rule are extracted from the data generation task;

[0121] A new behavior node is created according to the data type and the data generation rule, and the new behavior node is added to the behavior tree, and the required simulation data is generated by the new behavior node according to the data generation rule.

[0122] In this embodiment, when there is no target behavior node in the behavior tree that matches the data type of the required simulation data, through in-depth analysis and understanding of the user's expectations, the specific expectations of the user can be embodied as corresponding behavior nodes.

[0123] Specifically, first, the data types of the data that have not been matched to the target behavior nodes are verified. For example, it is verified whether the data type is valid, and whether the generation of simulation data of this data type is supported, etc. Since the data type and the corresponding data generation rules, etc. define the specific requirements and characteristic information of the simulation data, which are necessary for generating the simulation data, the specific data type and the corresponding data generation rules can be extracted from the user-configured data generation task when the verification passes. And a new behavior node is created according to the extracted data type and data generation rules. This new behavior node is designed to be able to generate the required type of simulation data according to the provided rules. For example, specific data generation logic can be written for the new behavior node, such as random number generation, data pattern matching, data conversion, etc. After creating the new behavior node, the new behavior node can be added to the behavior tree, that is, the new behavior node is connected to the existing root node and child nodes, and the structure of the behavior tree is updated so that the new behavior node can be recognized and accessed during the traversal of the behavior tree. After the new behavior node is successfully added to the behavior tree, the behavior node can be used to generate the required simulation data.

[0124] In one example, the creation process of the new behavior node is as Figure 3 shown. In this example, after obtaining the user-configured data generation task, the simulation data expected by the user can be extracted from the data generation task, the data type of the determined simulation quantity can be determined, and starting from the data type mediator, if the data type of the target behavior node is not matched, the expected data can be converted into a specific behavior node through in-depth analysis and understanding of the user's expected data. Specifically, the data type can be verified by a type verification processor. Before performing the type verification, preconditions can be set. The preconditions are like checkpoints. Only when the preconditions are met, the type verification processor will execute the type verification process. If the preconditions are not met, the type verification processor will not perform any operation and directly return a failure status so that the data type mediator selection node can adjust the execution strategy in a timely manner. The type verification processor can also include an observer abort module, and the observer abort module can play a role in monitoring and controlling during the type verification process. When an abnormal situation occurs or a specific abort condition is met during the type verification process, the observer abort module will send a signal in time to stop the current processing flow to prevent the further expansion of errors and the waste of resources.

[0125] In this embodiment, after the verification passes, the data type can be conditionally recognized by a condition processor. For example, it can recognize whether the conditions for generating simulation data of this data type are met. Before performing the condition recognition, a precondition can be set, and this precondition can be different from the precondition before the type verification processor. When this precondition is satisfied, the condition recognition processor will execute the condition recognition process. If the precondition is not satisfied, the condition recognition processor will not perform any operation and directly return a failure status, so that the data type mediation selection node can adjust the execution strategy in a timely manner. The condition recognition processor can also include an observer abort module, and the observer abort module can play a role in monitoring and control during the condition recognition process. When an abnormal situation occurs or a specific abort condition is met during the condition recognition process, the observer abort module will send a signal in a timely manner to stop the current processing flow to prevent the further expansion of errors and waste of resources.

[0126] After the condition recognition passes, a behavior tree can be constructed by a behavior tree construction processor, that is, new behavior nodes are constructed and the new behavior nodes are connected to the existing root node and child nodes to update the structure of the behavior tree, so that during the traversal of the behavior tree, new behavior nodes can be recognized and accessed. Before constructing the behavior tree, a precondition can be set, and this precondition can be different from the precondition before the type verification processor. When this precondition is satisfied, the condition recognition processor will execute the condition recognition process. If the precondition is not satisfied, the condition recognition processor will not perform any operation and directly return a failure status, so that the data type mediation selection node can adjust the execution strategy in a timely manner. Of course, a precondition may not be set before the behavior tree construction processor. The behavior tree construction processor can also include an observer abort module, and the observer abort module can play a role in monitoring and control during the construction of the behavior tree. When an abnormal situation occurs or a specific abort condition is met during the construction of the behavior tree, the observer abort module will send a signal in a timely manner to stop the current processing flow to prevent the further expansion of errors and waste of resources.

[0127] After the process of constructing the behavior tree is completed, new behavior nodes are added to the behavior tree, and the behavior tree is traversed to generate simulation data by a data generation processor. The data generation processor can also include an observer abort module, and the observer abort module can play a role in monitoring and control during the data generation process. When an abnormal situation occurs or a specific abort condition is met during the data generation process, the observer abort module will send a signal in a timely manner to stop the current processing flow to prevent the further expansion of errors and waste of resources.

[0128] In this embodiment, when a target behavior node corresponding to a specific data type is not matched, the data type is verified to improve the validity of the data type. After the verification passes, the data type and data generation rules can be automatically extracted from the data generation task, and new behavior nodes can be created accordingly. By adding the new behavior nodes to the behavior tree and using these nodes to generate simulation data, the scalability of the behavior tree structure is fully utilized. New behavior nodes can be easily added according to new data types. When the simulation scenario or data type changes, there is no need to make a large number of modifications and debugging to the existing code, further improving the efficiency of simulation data generation.

[0129] In some embodiments, in the behavior tree, a conditional node corresponds to a behavior node before. Before the target behavior node generates the required simulation data according to the data generation rules, it includes:

[0130] Judging whether the data generation task meets the preconditions through the conditional node before the target behavior node. If the preconditions are met, the judgment passes.

[0131] In this embodiment, before executing the target behavior node to generate simulation data, the conditional node before the target behavior node will be traversed first. The conditional node can evaluate the parameters and context environment of the data generation task according to preset logic or rules to determine whether the preconditions required for executing the target behavior node are met.

[0132] If the evaluation result of the conditional node is true, it can be considered that the data generation task meets the conditions for executing the target behavior node, and the traversal process can be passed to the target behavior node, so that the target behavior node can perform the behavior operation of generating simulation data. If the evaluation result of the conditional node is false, the target behavior node will not perform the behavior operation of generating simulation data, and the conditional node can return to report an error, request additional data, or wait until the conditions are met and then try again.

[0133] In this embodiment, by setting a conditional node before the behavior node, it is possible to judge whether the data generation task meets specific preconditions before executing the data generation rules, thereby reducing the generation of non-compliant or inaccurate simulation data and improving the accuracy and reliability of simulation data generation.

[0134] In the method for generating simulation data provided by the embodiments of the present application, the execution subject can be a device for generating simulation data. In the embodiments of the present application, taking the device for generating simulation data executing the method for generating simulation data as an example, the device for generating simulation data provided by the embodiments of the present application is described.

[0135] The embodiments of the present application also provide a device for generating simulation data.

[0136] Such as Figure 4As shown, the simulation data generation device includes:

[0137] An acquisition module 410, configured to acquire a data generation task configured by a user; the data generation task includes a data generation rule and a data type of required simulation data.

[0138] A traversal module 420, configured to traverse a behavior tree according to the data generation task; the behavior tree is a tree structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors.

[0139] A generation module 430, configured to, during the traversal process, match a target behavior node corresponding to the data type from multiple child nodes through the root node, and generate the required simulation data according to the data generation rule through the target behavior node.

[0140] The simulation data generation device provided by the embodiments of the present application acquires a data generation task configured by a user; the data generation task includes a data generation rule and a data type of required simulation data; traverses a behavior tree according to the data generation task; the behavior tree is a tree structure formed by connecting a root node and multiple child nodes, and the child nodes include behavior nodes for executing preset behaviors; during the traversal process, matches a target behavior node corresponding to the data type from multiple child nodes through the root node, and generates the required simulation data according to the data generation rule through the target behavior node. The embodiments of the present application adopt a data type-driven method, enabling dynamic matching and execution of behavior nodes corresponding to the data type during the generation process, thereby generating simulation data. Since the functions of each node in the structure of the behavior tree are relatively independent, even when the simulation scenario or data type changes, corresponding nodes can be matched from the behavior tree without a large amount of modification and debugging of the existing code, improving the generation efficiency of simulation data.

[0141] In some embodiments, the acquisition module 410 is further configured to:

[0142] Acquire requirement information input by the user in the user interface; wherein, the requirement information includes attributes, data types, and data generation rules of the required simulation data.

[0143] Generate a data generation task according to the requirement information.

[0144] In some embodiments, the generation module 430 is further configured to:

[0145] Acquire the correspondence between different data types and different behavior nodes.

[0146] Match a target behavior node corresponding to the data type from the correspondence through the root node.

[0147] In some embodiments, the generation module 430 is further configured to:

[0148] In the case of matching multiple target behavior nodes, sequentially traverse the conditional nodes before the multiple target behavior nodes;

[0149] In the case of traversing to a target conditional node that passes the judgment, determine the target behavior node after the target conditional node as the target behavior node corresponding to the data type.

[0150] In some embodiments, the generation module 430 is further configured to:

[0151] In the case of not matching the target behavior node corresponding to the data type, verify the data type;

[0152] In the case of passing the verification, extract the data type and the data generation rule from the data generation task;

[0153] Create a new behavior node according to the data type and the data generation rule, add the new behavior node to the behavior tree, and generate the required simulation data according to the data generation rule through the new behavior node.

[0154] In some embodiments, the generation module 430 is further configured to:

[0155] Judge whether the data generation task meets the preconditions through the conditional nodes before the target behavior node, and if the preconditions are met, the judgment passes.

[0156] The simulation data generation device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than the terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0157] The simulation data generation device in the embodiments of the present application can be a device with an operating system. The operating system can be the Microsoft (Windows) operating system, the Android operating system, the IOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.

[0158] In some embodiments, as Figure 5 shown, the embodiments of the present application further provide an electronic device 500, including a processor 501, a memory 502, and a computer program stored on the memory 502 and executable on the processor 501. When the program is executed by the processor 501, it implements each process of the above-mentioned embodiment of the simulation data generation method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0159] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0160] The embodiments of the present application further provide a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process of the above-mentioned embodiment of the simulation data generation method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0161] Among them, the processor is the processor in the electronic device in the above-mentioned embodiment. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.

[0162] The embodiments of the present application further provide a computer program product, including a computer program, which implements the above-mentioned simulation data generation method when executed by a processor.

[0163] Among them, the processor is the processor in the electronic device in the above-mentioned embodiment. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.

[0164] The embodiments of the present application further provide a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above-mentioned embodiment of the simulation data generation method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0165] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0166] It should be noted that in this text, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0167] From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on this understanding, the technical solution of the present application, in essence or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to enable a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.

[0168] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

[0169] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0170] Although embodiments of the present application have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present application. The scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for generating simulation data, characterized in that: include: Get the data generation task configured by the user; The data generation task includes data generation rules and the data type of the required simulation data; Generate a task traversal behavior tree according to the data; The behavior tree is a tree structure formed by connecting a root node and a plurality of child nodes, wherein the child nodes include behavior nodes for executing preset behaviors; During the traversal process, the target behavior node corresponding to the data type is matched from multiple child nodes through the root node, and the required simulation data is generated according to the data generation rule through the target behavior node.

2. The method according to claim 1, characterized in that The task of obtaining user-configured data generation includes: Acquire the demand information input by the user in the user interface; wherein the demand information includes the attributes, data types and data generation rules of the required simulation data; The data generation task is generated according to the demand information.

3. The method according to claim 1, characterized in that The child nodes also include a condition node for executing conditional judgment; during the traversal process, if the condition node is judged to be passed, the subsequent child nodes of the condition node are traversed.

4. The method according to claim 1, characterized in that The step of matching a target behavior node corresponding to the data type from a plurality of child nodes through the root node includes: Get the correspondence between different data types and different behavior nodes; A target behavior node corresponding to the data type is matched from the corresponding relationship through the root node.

5. The method according to claim 1, characterized in that The step of matching a target behavior node corresponding to the data type from a plurality of child nodes through the root node includes: When multiple target behavior nodes are matched, traverse the condition nodes before the multiple target behavior nodes according to the preset traversal rules; In the case of traversing to a target condition node that has passed the judgment, the target behavior node following the target condition node is determined as the target behavior node corresponding to the data type.

6. The method according to claim 1, further comprising: If no target behavior node corresponding to the data type is matched, verify the data type; If the verification is passed, extracting the data type and the data generation rule from the data generation task; A new behavior node is created according to the data type and the data generation rule, and the new behavior node is added to the behavior tree, and the required simulation data is generated according to the data generation rule through the new behavior node.

7. The method according to claim 1, characterized in that In the behavior tree, there is a conditional node before the behavior node, and before the target behavior node generates the required simulation data according to the data generation rule, it includes: It is determined whether the data generation task meets the preconditions through the condition node before the target behavior node, and if the preconditions are met, it is determined to be passed.

8. A device for generating simulation data, characterized in that: include: An acquisition module is used to acquire the data generation task configured by the user; The data generation task includes data generation rules and the data type of the required simulation data; A traversal module, used for generating a task traversal behavior tree according to the data; The behavior tree is a tree structure formed by connecting a root node and a plurality of child nodes, wherein the child nodes include behavior nodes for executing preset behaviors; A generation module is used to match a target behavior node corresponding to the data type from multiple child nodes through the root node during the traversal process, and generate the required simulation data according to the data generation rule through the target behavior node.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Analog data generation method, device and equipment and computer readable storage medium

    CN110221858A

  • Business data generation method and device, electronic equipment and storage medium

    CN113535265A

  • Weapon strength entity behavior simulation meta-modeling method and system based on improved behavior tree

    CN114201885A

  • Method and device for determining matching scheme of service requirements and processor

    CN116796955A

  • Data processing method and device, electronic equipment and storage medium

    CN118660201A