A method, device, storage medium and electronic device for generating simulation data
By splitting and clustering the actual motion data of unmanned equipment, determining transition probabilities and synthesizing simulation data, the problem of lack of randomness in simulation data in the existing technology is solved, and more realistic and diverse simulation tests are achieved.
Patent Information
- Application Number
- CN202111301886.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-04
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-11-04
AI Technical Summary
It is difficult to generate simulation data that is both realistic and random with existing technology, resulting in the inability of simulation testing to fully simulate all possible motion modes.
By obtaining the historical actual motion data of unmanned equipment, splitting it into motion phase data segments, clustering and determining the transition probabilities between each motion phase identifier, and randomly selecting motion data segments to synthesize simulation data.
The generated simulation data has a certain degree of randomness, and at the same time is as consistent as possible with the actual situation, and can more comprehensively simulate the movement pattern of unmanned equipment.
Smart Images

Figure CN114117746B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method, device, storage medium and electronic device for generating simulation data. Background Art
[0002] With the development of unmanned driving technology, unmanned equipment such as unmanned vehicles and drones have been widely used in various technical fields. Before unmanned equipment is put into use, it is often necessary to perform simulation tests on the unmanned equipment. When performing simulation tests on unmanned equipment, it is necessary to perform simulation tests on the unmanned equipment based on pre-generated simulation data. For example, when performing simulation tests on unmanned vehicles, it is necessary to control the driving of the unmanned vehicle according to the speed, acceleration and other data in the simulation data.
[0003] In the prior art, there are mainly two methods for generating simulation data.
[0004] The first method is to manually design each motion stage contained in a simulation data, such as first performing the acceleration motion stage, then the uniform motion stage, and finally the deceleration motion stage. Then, for each motion stage, the data of the motion stage is clustered from the actual motion data of the unmanned equipment collected in advance, and the actual motion data of the clustered motion stage is selected as the sub-simulation data. Finally, the sub-simulation data selected for each motion stage are spliced into simulation data.
[0005] The second method is to divide the actual motion data of the unmanned equipment into short-stroke motion data. The division method is to divide the motion data between two adjacent idling starts of the unmanned equipment into one short-stroke motion data. Then randomly splice the short-stroke motion data to obtain simulation data.
[0006] However, in the first method, each motion stage in a simulation data needs to be manually designed, that is, the general motion mode of the unmanned vehicle in the simulation data is fixed, lacking random factors, resulting in subsequent simulations that can only be performed for the designed motion mode, and cannot fully simulate all possible motion modes. The second method ignores the feasibility of splicing different short-stroke motion data, and may result in unrealistic and unfeasible simulation data.
[0007] Obviously, how to generate simulation data that is both realistic and has a certain degree of randomness is an urgent problem to be solved. Summary of the invention
[0008] The embodiments of this specification provide a method, device, storage medium and electronic device for generating simulation data to partially solve the problems existing in the above-mentioned prior art.
[0009] The embodiments of this specification adopt the following technical solutions:
[0010] This specification provides a method for generating simulation data, including:
[0011] Obtain the actual movement data reported by unmanned equipment in history;
[0012] For each piece of actual motion data, the actual motion data is split into data of a plurality of motion stages as motion data segments;
[0013] Clustering each motion data segment according to the motion characteristics of each motion data segment to obtain a plurality of data segment sets; the motion data segments in the same data segment set correspond to the same motion stage identifier, and the motion data segments in different data segment sets correspond to different motion stage identifiers;
[0014] Determine the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data;
[0015] Selecting a number of motion stage identifiers according to the transition probability between the motion stage identifiers, and selecting a motion data segment from the motion data segments corresponding to each of the selected motion stage identifiers;
[0016] The selected motion data segments are used to synthesize simulation data.
[0017] Optionally, the unmanned equipment is an unmanned vehicle;
[0018] The actual motion data is divided into data of several motion stages, including:
[0019] The data between two adjacent designated states of the unmanned vehicle in the actual motion data is divided into data of a motion stage, wherein the designated state includes a state where the unmanned vehicle is powered on and idling.
[0020] Optionally, determining the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data specifically includes:
[0021] For any two motion stage identifiers, the two motion stage identifiers are respectively used as the first identifier and the second identifier. In the actual motion data, the probability that a motion data segment adjacent to the motion data segment corresponding to the first identifier and located after the motion data segment corresponding to the first identifier is the motion data segment corresponding to the second identifier is determined as the transition probability from the first identifier to the second identifier.
[0022] Optionally, according to the transition probability between the motion stage identifiers, several motion stage identifiers are selected, specifically including:
[0023] Select the current exercise stage identifier among various exercise stage identifiers;
[0024] According to the transfer probability of the current motion stage identifier to other motion stage identifiers, selecting the next motion stage identifier of the current motion stage identifier from each motion stage identifier;
[0025] The next motion stage identifier is re-determined as the current motion stage identifier, and the next motion stage identifier of the re-determined current motion stage identifier is continuously selected until the specified condition is met.
[0026] Optionally, selecting a motion data segment from the selected motion data segments corresponding to each motion stage identifier specifically includes:
[0027] After selecting a current motion stage identifier from among the motion stage identifiers, randomly selecting a motion data segment from the motion data segments corresponding to the current motion stage identifier;
[0028] After selecting a next motion stage identifier of the current motion stage identifier, randomly selecting a motion data segment from the motion data segments corresponding to the next motion stage identifier;
[0029] The specified conditions are met, specifically including: the sum of the motion distances corresponding to all the selected motion data segments is not less than a predetermined distance threshold.
[0030] Optionally, the distance threshold is predetermined, specifically including:
[0031] For each actual motion data, the actual motion data is split into data of a plurality of task execution stages in advance as task data segments;
[0032] Determine the probability density distribution of the cumulative movement distance required for the unmanned equipment to perform different numbers of tasks based on the movement distance corresponding to each task data segment;
[0033] The accumulated movement distance corresponding to the specified value of the probability density distribution is determined as the distance threshold.
[0034] Optionally, after synthesizing the simulation data using the selected motion data segments, the method further comprises:
[0035] For each actual motion data, the actual motion data is split into data of a plurality of task execution stages as task data segments;
[0036] Determine the motion characteristics of the synthesized simulation data in a preset dimension, and determine the motion characteristics of each task data segment in the preset dimension;
[0037] If the difference between the motion characteristics of the synthesized simulation data and each task data segment in the preset dimension is less than a first threshold, the synthesized simulation data is used as candidate simulation data;
[0038] After synthesizing the first number of simulation data or obtaining the second number of candidate simulation data, final simulation data for performing simulation test on the unmanned equipment to be tested is selected from each candidate simulation data.
[0039] Optionally, the actual motion data is split into data of several task execution stages, specifically including:
[0040] Determine each task corresponding to the actual motion data;
[0041] For each determined task, determine the time when the unmanned device starts to accelerate from rest within the specified range corresponding to the starting point of the task as the starting time, and determine the time when the unmanned device decelerates to rest within the specified range corresponding to the end point of the task as the ending time;
[0042] The data from the starting time to the ending time in the actual motion data is divided into data of the unmanned vehicle executing the task stage.
[0043] Optionally, among the candidate simulation data, the final simulation data used for simulation testing of the unmanned equipment to be tested is selected, specifically including:
[0044] For each candidate simulation data, according to the motion characteristics of the candidate simulation data in all dimensions and the motion characteristics of each task data segment in all dimensions, determine the comprehensive difference between the candidate simulation data and each task data segment;
[0045] Among the candidate simulation data, the candidate simulation data with the smallest comprehensive difference with each task data segment is selected as the final simulation data for simulating the unmanned equipment to be tested.
[0046] This specification provides a device for generating simulation data, the device comprising:
[0047] The acquisition module is used to obtain the actual motion data reported by the unmanned equipment in history;
[0048] A motion segment division module is used to divide each actual motion data into data of a plurality of motion stages as motion data segments;
[0049] A clustering module, for clustering each motion data segment according to the motion characteristics of each motion data segment to obtain a plurality of data segment sets; the motion data segments in the same data segment set correspond to the same motion stage identifier, and the motion data segments in different data segment sets correspond to different motion stage identifiers;
[0050] A transition probability determination module, used to determine the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data;
[0051] The synthesis module is used to select several motion stage identifiers according to the transition probability between the motion stage identifiers, and select motion data segments from the motion data segments corresponding to each selected motion stage identifier; and use the selected motion data segments to synthesize simulation data.
[0052] This specification provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for generating simulation data is implemented.
[0053] The present specification provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method for generating simulation data when executing the program.
[0054] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0055] The embodiment of this specification splits the actual motion data into several motion data segments, and clusters each motion data segment, and the obtained set of the same data segments corresponds to the same motion stage identifier, and then determines the transition probability between the motion stage identifiers according to the position of the motion data segments of each motion stage identifier in the actual motion data, and selects the motion data segments to synthesize the simulation data according to the transition probability. Since the above method selects the motion data segments to synthesize the simulation data according to the transition probability between the motion stage identifiers, the simulation data has a certain randomness, and because the transition probability is determined according to the position of the motion data segments in the actual motion data, it conforms to the actual situation as much as possible under the premise of ensuring that the simulation data has a certain randomness. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0057] Figure 1A schematic diagram of the generation process of simulation data provided in the embodiments of this specification;
[0058] Figure 2 The process of selecting a motion stage identifier and a motion data segment provided in the embodiments of this specification;
[0059] Figure 3 A schematic diagram of the structure of a device for generating simulation data provided in an embodiment of this specification;
[0060] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0061] In order to generate simulation data that is both realistic and has a certain degree of randomness, the simulation data generation method provided in this specification aims to cluster the motion data segments, determine the transition probability between each motion stage identifier based on the actual motion data, and select motion data segments to synthesize simulation data based on the transition probability.
[0062] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0063] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0064] Figure 1 The schematic diagram of the generation process of the simulation data provided in the embodiment of this specification specifically includes the following steps:
[0065] S100: Acquire actual motion data reported by the unmanned equipment in history.
[0066] In the embodiments of this specification, any electronic device with computing function can be used to perform the following operations: Figure 1 The method shown is used to generate simulation data, and the electronic devices include but are not limited to terminals (such as mobile phones, computers), servers, etc.
[0067] In step S100, the actual motion data reported by at least one unmanned device in history is first obtained. The actual motion data is the motion data of the unmanned device itself collected when the unmanned device moved in history. Specifically, the actual motion data of the unmanned device is composed of the state data of the unmanned device at each historical moment. The state data may include motion speed, cumulative motion distance, location, power-on status of the unmanned device, etc. The sequence obtained by arranging these state data in the order of historical moments is the actual motion data of the unmanned device.
[0068] That is to say, the actual motion data of an unmanned device described in the embodiment of this specification may include: the movement speed v(t), cumulative movement distance s(t), location p(t), and power-on status o(t) of the unmanned device at each historical moment sorted in chronological order, where t represents the historical moment.
[0069] In addition, in the embodiments of this specification, the unmanned equipment includes equipment with automatic driving function and / or auxiliary driving function, such as unmanned vehicles, drones, etc. Specifically, the unmanned equipment can be an unmanned equipment for delivery. The following description only takes the unmanned equipment as an unmanned vehicle as an example.
[0070] S102: For each piece of actual motion data, split the actual motion data into data of a plurality of motion stages as motion data segments.
[0071] In the embodiments of the present specification, several movement stage identifiers may be preset, such as a paved road driving stage, a wading driving stage, and the like.
[0072] After the actual motion data of the unmanned equipment in history is obtained in step S100, for each actual motion data, the actual motion data can be split into motion data segments corresponding to the identifications of each motion stage.
[0073] Since an actual motion data is a sequence of state data of unmanned devices at various historical moments, the actual motion data can be split according to the state data of the unmanned devices at various historical moments. Specifically, when the unmanned device is an unmanned vehicle, the data between two adjacent specified states of the unmanned vehicle in the actual motion data can be divided into data of a motion stage, wherein the specified state includes the state where the unmanned vehicle is powered on and idling.
[0074] That is to say, in the embodiment of this specification, the movement of the unmanned vehicle from the beginning of one idling driving to the end of the next idling driving is regarded as a movement stage of the unmanned vehicle.
[0075] S104: Clustering each motion data segment according to the motion characteristics of each motion data segment to obtain a plurality of data segment sets; the motion data segments in the same data segment set correspond to the same motion stage identifier, and the motion data segments in different data segment sets correspond to different motion stage identifiers.
[0076] After each motion data segment is obtained by dividing in step S102, in step S104, the motion characteristics of the motion data segment can be first counted for each motion data segment. The motion characteristics described in the embodiments of this specification include but are not limited to: idle time ratio (i.e., the ratio of the time when the unmanned vehicle is idling in the motion data segment to the total time of the motion data segment), cruise time ratio (i.e., the ratio of the time when the unmanned vehicle is cruising in the motion data segment to the total time of the motion data segment), acceleration time ratio (i.e., the ratio of the time when the unmanned vehicle is accelerating in the motion data segment to the total time of the motion data segment), deceleration time ratio (i.e., the ratio of the time when the unmanned vehicle is decelerating in the motion data segment to the total time of the motion data segment), average vehicle speed, vehicle speed standard deviation, average acceleration, average deceleration, maximum acceleration, maximum deceleration, maximum vehicle speed, ratio of different vehicle speed segments (e.g., the ratio of the unmanned vehicle in the 0-15km / h vehicle speed segment, the ratio of the 15-25km / h vehicle speed segment), etc. When the statistical motion characteristics include real-time vehicle speed, the real-time vehicle speed can also be smoothed and filtered.
[0077] After the corresponding motion features are obtained by counting each motion data segment, each motion data segment can be clustered according to the motion features of each motion data segment to obtain a number of data segment sets. Specifically, the similarity between each motion data segment can be determined according to the motion features of each motion data segment, and each motion data segment can be clustered according to the similarity between each motion data segment. That is, the similarity between each motion data segment in the same data segment set is high, and the similarity between each motion data segment in different data segment sets is low.
[0078] After obtaining each data segment set, a corresponding motion stage identifier can be set for each motion data segment. The motion data segments in the same data segment set correspond to the same motion stage identifier, and the motion data segments in different data segment sets correspond to different motion stage identifiers. In other words, each motion data segment in a data segment set can represent a working condition in which the unmanned vehicle is traveling. A working condition is represented by a motion stage identifier, and different data segment sets represent different working conditions, which are represented by different motion stage identifiers.
[0079] S106: Determine the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data.
[0080] Since an unmanned vehicle may experience several operating conditions in the entire actual motion data, the Markov model principle is used in the embodiments of this specification to determine the transition probability between different operating conditions. Specifically, for any two motion stage identifiers, the two motion stage identifiers are respectively used as the first identifier and the second identifier. In the actual motion data, the probability that the motion data segment adjacent to the motion data segment corresponding to the first identifier and located after the motion data segment corresponding to the first identifier is the motion data segment corresponding to the second identifier is determined as the transition probability from the first identifier to the second identifier.
[0081] S108: Selecting a number of motion stage identifiers according to the transition probability between the motion stage identifiers, and selecting a motion data segment from the motion data segments corresponding to each of the selected motion stage identifiers.
[0082] S110: Synthesizing simulation data using the selected motion data segments.
[0083] After the transition probabilities between the motion stage identifiers (ie, the working conditions) are determined in step S106, motion data segments can be selected according to the transition probabilities between the working conditions, and the selected motion data segments can be used to synthesize simulation data.
[0084] Since the above method selects motion data segments to synthesize simulation data according to the transition probability between each motion stage identifier, the simulation data has a certain randomness. And because the transition probability is determined according to the position of the motion data segment in the actual motion data, it is as close to the actual situation as possible while ensuring that the simulation data has a certain randomness.
[0085] Furthermore, in the above step S108, according to the transition probability between the motion stage identifiers, a number of motion stage identifiers are selected, and the process of selecting the motion data segment from the motion data segment corresponding to each selected motion stage identifier can be as follows: Figure 2 shown.
[0086] Figure 2 The process of selecting a motion stage identifier and a motion data segment provided in the embodiment of this specification specifically includes the following steps:
[0087] S10800: Select the current exercise stage identifier from among the various exercise stage identifiers.
[0088] In step S10800, one motion stage identifier may be arbitrarily selected from among the motion stage identifiers as the current motion stage identifier.
[0089] S10802: Select a motion data segment from the motion data segments corresponding to the current motion stage identifier.
[0090] Specifically, a motion data segment may be randomly selected from the motion data segments corresponding to the current motion stage identifier.
[0091] S10804: Selecting a next motion stage identifier of the current motion stage identifier from among the motion stage identifiers according to the transition probability of the current motion stage identifier to other motion stage identifiers.
[0092] In the embodiments of the present specification, for each other motion stage identifier, if the transfer probability of the current motion stage identifier to the other motion stage identifier is greater, the probability of selecting the other motion stage identifier as the next motion stage identifier is greater; otherwise, the probability of selecting the other motion stage identifier as the next motion stage identifier is smaller.
[0093] S10806: Select a motion data segment from the motion data segments corresponding to the next motion stage identifier.
[0094] Specifically, a motion data segment may be randomly selected from the motion data segments corresponding to the next motion stage identifier.
[0095] S10808: Determine whether all currently selected motion data segments meet specified conditions. If so, execute step S10810; otherwise, execute step S10812.
[0096] In the embodiment of this specification, the specified condition may refer to: the sum of the movement distances corresponding to all the selected movement data segments is not less than a predetermined distance threshold. Of course, other conditions may also be used, such as the sum of the movement durations corresponding to all the selected movement data segments is not less than a predetermined duration threshold.
[0097] S10810: Use the selected motion data segments to synthesize simulation data.
[0098] S10812: Redefine the next motion stage identifier as the current motion stage identifier, and return to step S10804.
[0099] That is, if all the selected motion data segments meet the specified conditions, the selected motion data segments are used to synthesize the simulation data; otherwise, the next motion stage identifier selected in step S10804 is re-determined as the current motion stage identifier, and the next motion stage identifier of the re-determined current motion stage identifier is continued to be selected until the specified conditions are met.
[0100] The above process will be described below by taking the example that the specified condition is satisfied, that is, the sum of the motion distances corresponding to all the selected motion data segments is not less than a predetermined distance threshold.
[0101] In an embodiment of the present specification, when predetermining the distance threshold, the actual motion data can be split into data of several task execution stages for each actual motion data as task data segments, and the probability density distribution of the cumulative motion distance required for the unmanned equipment to perform different numbers of tasks is determined based on the motion distance corresponding to each task data segment, and the cumulative motion distance corresponding to the specified value when the probability density distribution is determined as the distance threshold.
[0102] Among them, the data of the above-mentioned task execution stage may refer to the motion data generated in the process of the unmanned vehicle executing a task, and the task may specifically be a delivery task. Specifically, when splitting an actual motion data into data of several task execution stages, all tasks performed by the unmanned vehicle in the process of generating the actual motion data may be determined first, that is, the tasks corresponding to the actual motion data, and then for each determined task, the starting point and end point of the delivery task may be determined. For a task, the moment when the unmanned vehicle starts to accelerate from rest within the specified range corresponding to the starting point of the task may be determined as the starting moment, and the moment when the unmanned vehicle decelerates to rest within the specified range corresponding to the end point of the task may be determined as the ending moment, and the data from the above-mentioned starting moment to the above-mentioned ending moment in the actual motion data may be divided into the data of the unmanned vehicle in the execution of the task stage as a task data segment.
[0103] After the actual motion data is divided into each task data segment using the above division method, the probability density distribution of the total motion distance required by the unmanned vehicle when performing different numbers of tasks, that is, the probability density distribution of the cumulative motion distance, can be determined. Based on the probability density distribution, the cumulative motion distance corresponding to the specified value of the probability density can be used as the distance threshold. The specified value can be set as needed, for example, to 50%.
[0104] Therefore, in Figure 2 In the process shown, when the sum of the motion distances corresponding to all the selected motion data segments exceeds the distance threshold determined above, all the selected motion data segments can be synthesized into one simulation data. Specifically, when synthesizing, it is necessary to connect the motion data segments end to end in the order in which the selected motion data segments are selected to synthesize the simulation data.
[0105] In order to make the simulation data used for the simulation test of the unmanned equipment to be tested closer to reality, in the embodiment of this specification, the above Figure 1The method shown synthesizes multiple simulation data, and after synthesizing the multiple simulation data, adopts the above-mentioned method of dividing task data segments, and for each actual motion data, splits the actual motion data into data of several task execution stages as task data segments, determines the motion characteristics of the synthesized simulation data in a preset dimension, and determines the motion characteristics of each task data segment in the preset dimension. If the difference between the motion characteristics of the synthesized simulation data and each task data segment in the preset dimension is less than a first threshold, the synthesized simulation data is used as candidate simulation data. After synthesizing a first number of simulation data or obtaining a second number of candidate simulation data, the final simulation data for simulating the unmanned equipment to be tested is selected from each candidate simulation data.
[0106] Among them, the motion characteristics on the above-mentioned preset dimension can be the probability density distribution of the real-time speed and real-time acceleration of the unmanned equipment. That is, for the simulation data, the two-dimensional probability density p(v,a) with the real-time speed and real-time acceleration of the unmanned equipment as variables in the simulation data is determined, where v is the real-time speed and a is the real-time acceleration, and p(v,a) can be represented by a probability density matrix. Similarly, for each task data segment, the two-dimensional probability density of the unmanned equipment with the real-time speed and real-time acceleration of the unmanned equipment in each task data segment can also be determined. When determining the difference between the motion characteristics of the simulation data and each task data segment on the two-dimensional probability density p(v,a), the square sum of the difference between each element in the probability density matrix of the two-dimensional probability density p(v,a) of the simulation data and the corresponding element in the probability density matrix of the two-dimensional probability density p(v,a) of each task data segment can be directly determined, that is, the eigenvalue error of the two probability density matrices. If the eigenvalue error of the probability density matrix of the simulation data and each task data segment is less than the first threshold, the simulation data is used as candidate simulation data, otherwise the simulation data is not used as candidate simulation data.
[0107] Subsequently, for each candidate simulation data, the comprehensive difference between the candidate simulation data and each task data segment is determined based on the motion characteristics of the candidate simulation data in all dimensions and the motion characteristics of each task data segment in all dimensions. Among the candidate simulation data, the candidate simulation data with the smallest comprehensive difference with each task data segment is selected as the final simulation data for simulating the unmanned equipment to be tested.
[0108] Among them, the motion characteristics in all dimensions, in addition to the probability density distribution of the real-time speed and real-time acceleration mentioned above, may also include: idling time proportion, cruise time proportion, acceleration time proportion, deceleration time proportion, average vehicle speed, vehicle speed standard deviation, average acceleration, average deceleration, maximum acceleration, maximum deceleration, maximum vehicle speed, proportions of different vehicle speed segments, etc.
[0109] Therefore, when a simulation test is to be performed on the unmanned equipment to be tested, the final simulation data determined above can be used to perform a simulation test on the unmanned equipment to be tested.
[0110] The above is a method for generating simulation data provided in an embodiment of this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.
[0111] Figure 3 A schematic diagram of the structure of a device for generating simulation data provided in an embodiment of this specification, the device comprising:
[0112] An acquisition module 301 is used to acquire actual motion data reported by the unmanned equipment in history;
[0113] A motion segment division module 302 is used to divide each actual motion data into data of a plurality of motion stages as motion data segments;
[0114] The clustering module 303 is used to cluster the motion data segments according to the motion characteristics of the motion data segments to obtain a plurality of data segment sets; the motion data segments in the same data segment set correspond to the same motion stage identifier, and the motion data segments in different data segment sets correspond to different motion stage identifiers;
[0115] A transition probability determination module 304, configured to determine the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data;
[0116] The synthesis module 305 is used to select several motion stage identifiers according to the transition probability between the motion stage identifiers, and select a motion data segment from the motion data segments corresponding to each selected motion stage identifier; and use the selected motion data segments to synthesize simulation data.
[0117] Optionally, the unmanned equipment is an unmanned vehicle;
[0118] The motion segment division module 302 is specifically used to divide the data between two adjacent specified states of the unmanned vehicle in the actual motion data into data of a motion stage, wherein the specified state includes the state where the unmanned vehicle is powered on and idling.
[0119] Optionally, the transition probability determination module 304 is specifically used to, for any two motion stage identifiers, use the two motion stage identifiers as the first identifier and the second identifier respectively, and in the actual motion data, determine the probability that a motion data segment adjacent to the motion data segment corresponding to the first identifier and located after the motion data segment corresponding to the first identifier is the motion data segment corresponding to the second identifier, as the transition probability from the first identifier to the second identifier.
[0120] Optionally, the synthesis module 305 is specifically used to select a current motion stage identifier among various motion stage identifiers; select the next motion stage identifier of the current motion stage identifier among various motion stage identifiers based on the transition probability of the current motion stage identifier to other motion stage identifiers; redefine the next motion stage identifier as the current motion stage identifier, and continue to select the next motion stage identifier of the redetermined current motion stage identifier until a specified condition is met.
[0121] Optionally, the synthesis module 305 is specifically used to, after selecting a current motion stage identifier among various motion stage identifiers, randomly select a motion data segment from the motion data segments corresponding to the current motion stage identifier; after selecting a next motion stage identifier of the current motion stage identifier, randomly select a motion data segment from the motion data segments corresponding to the next motion stage identifier; and meet specified conditions, specifically including: the sum of the motion distances corresponding to all selected motion data segments is not less than a predetermined distance threshold.
[0122] Optionally, the device further comprises:
[0123] The task segment division module 306 is used to divide each actual motion data into data of a plurality of task execution stages as task data segments in advance;
[0124] The threshold determination module 307 is used to determine the probability density distribution of the cumulative movement distance required for the unmanned equipment to perform different numbers of tasks based on the movement distance corresponding to each task data segment; and determine the cumulative movement distance corresponding to the specified value when the probability density distribution is determined as the distance threshold.
[0125] Optionally, the device further comprises:
[0126] The task segment division module 306 is used to divide each actual motion data into data of a plurality of task execution stages as task data segments;
[0127] The synthesis module 305 is also used to determine the motion characteristics of the synthesized simulation data in a preset dimension, and determine the motion characteristics of each task data segment in the preset dimension; if the difference between the motion characteristics of the synthesized simulation data and each task data segment in the preset dimension is less than a first threshold, the synthesized simulation data is used as candidate simulation data; after synthesizing a first number of simulation data or obtaining a second number of candidate simulation data, the final simulation data for simulating the unmanned equipment to be tested is selected from each candidate simulation data.
[0128] Optionally, the task segment division module 306 is specifically used to determine the tasks corresponding to the actual motion data; for each determined task, determine the moment when the unmanned device starts to accelerate from a standstill within a specified range corresponding to the starting point of the task as the starting moment, and determine the moment when the unmanned device decelerates to a standstill within a specified range corresponding to the end point of the task as the ending moment; divide the data from the starting moment to the ending moment in the actual motion data into data of the unmanned vehicle executing the task stage.
[0129] Optionally, the synthesis module 305 is specifically used to determine, for each candidate simulation data, the comprehensive difference between the candidate simulation data and each task data segment based on the motion characteristics of the candidate simulation data in all dimensions and the motion characteristics of each task data segment in all dimensions; among each candidate simulation data, select the candidate simulation data with the smallest comprehensive difference with each task data segment as the final simulation data for simulating the unmanned equipment to be tested.
[0130] The present specification also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can be used to execute the simulation data generation method provided above.
[0131] Based on the above-mentioned method for generating simulation data, the present specification also provides Figure 4 The structural diagram of the electronic device shown in FIG. Figure 4 At the hardware level, the unmanned equipment includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above-mentioned method for generating simulation data.
[0132] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0133] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0134] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0136] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0137] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0138] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0142] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0143] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0144] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0145] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0146] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0147] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0148] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for generating simulation data, characterized in that: include: Obtain the actual movement data reported by unmanned equipment in history; For each piece of actual motion data, the actual motion data is split into data of a plurality of motion stages as motion data segments; Clustering each motion data segment according to the motion characteristics of each motion data segment to obtain a plurality of data segment sets; the motion data segments in the same data segment set correspond to the same motion stage identifier, and the motion data segments in different data segment sets correspond to different motion stage identifiers; Determine the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data; Selecting a number of motion stage identifiers according to the transition probability between the motion stage identifiers, and selecting a motion data segment from the motion data segments corresponding to each of the selected motion stage identifiers; synthesizing simulation data using the selected motion data segments; Among them, according to the transition probability between each movement stage identifier, several movement stage identifiers are selected, specifically including: Select the current exercise stage identifier among various exercise stage identifiers; According to the transfer probability of the current motion stage identifier to other motion stage identifiers, selecting the next motion stage identifier of the current motion stage identifier from each motion stage identifier; Re-determining the next motion stage identifier as the current motion stage identifier, and continuing to select the next motion stage identifier of the re-determined current motion stage identifier until a specified condition is met; The step of selecting a motion data segment from the motion data segments corresponding to each selected motion stage identifier specifically includes: After selecting a current motion stage identifier from among the motion stage identifiers, randomly selecting a motion data segment from the motion data segments corresponding to the current motion stage identifier; After selecting a next motion stage identifier of the current motion stage identifier, randomly selecting a motion data segment from the motion data segments corresponding to the next motion stage identifier; The specified conditions are met, specifically including: the sum of the motion distances corresponding to all the selected motion data segments is not less than a predetermined distance threshold; The distance threshold is predetermined, specifically including: For each actual motion data, the actual motion data is split into data of a plurality of task execution stages in advance as task data segments; Determine the probability density distribution of the cumulative movement distance required for the unmanned equipment to perform different numbers of tasks based on the movement distance corresponding to each task data segment; The accumulated movement distance corresponding to the specified value of the probability density distribution is determined as the distance threshold.
2. The method according to claim 1, characterized in that The unmanned equipment is an unmanned vehicle; The actual motion data is divided into data of several motion stages, including: The data between two adjacent designated states of the unmanned vehicle in the actual motion data is divided into data of one motion stage, wherein the designated state includes a state where the unmanned vehicle is powered on and idling.
3. The method according to claim 1, characterized in that Determining the transition probability between the motion stage identifiers according to the positions of the motion data segments respectively corresponding to the motion stage identifiers in the actual motion data, specifically includes: For any two motion stage identifiers, the two motion stage identifiers are respectively used as the first identifier and the second identifier. In the actual motion data, the probability that a motion data segment adjacent to the motion data segment corresponding to the first identifier and located after the motion data segment corresponding to the first identifier is the motion data segment corresponding to the second identifier is determined as the transition probability from the first identifier to the second identifier.
4. The method according to claim 1, characterized in that After synthesizing the simulation data using the selected motion data segments, the method further comprises: For each actual motion data, the actual motion data is split into data of a plurality of task execution stages as task data segments; Determine the motion characteristics of the synthesized simulation data in a preset dimension, and determine the motion characteristics of each task data segment in the preset dimension; If the difference between the motion characteristics of the synthesized simulation data and each task data segment in the preset dimension is less than a first threshold, the synthesized simulation data is used as candidate simulation data; After synthesizing the first number of simulation data or obtaining the second number of candidate simulation data, final simulation data for performing simulation test on the unmanned equipment to be tested is selected from each candidate simulation data.
5. The method according to claim 4, characterized in that The actual motion data is divided into data of several task execution stages, including: Determine each task corresponding to the actual motion data; For each determined task, determine the time when the unmanned device starts to accelerate from rest within the specified range corresponding to the starting point of the task as the starting time, and determine the time when the unmanned device decelerates to rest within the specified range corresponding to the end point of the task as the ending time; The data from the starting time to the ending time in the actual motion data is divided into data of the stage in which the unmanned equipment performs the task.
6. The method according to claim 4, characterized in that Among the candidate simulation data, the final simulation data for simulating the unmanned equipment to be tested is selected, including: For each candidate simulation data, according to the motion characteristics of the candidate simulation data in all dimensions and the motion characteristics of each task data segment in all dimensions, determine the comprehensive difference between the candidate simulation data and each task data segment; Among the candidate simulation data, the candidate simulation data with the smallest comprehensive difference with each task data segment is selected as the final simulation data for simulating the unmanned equipment to be tested.
7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
8. 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 described in any one of claims 1 to 6 is implemented.
