Scene generation method for unmanned ship test task
By building an editable scene feature library and using multiple algorithms for scene classification and segmentation, combined with a generative adversarial network model, the problems of complexity and inefficiency in the generation of unmanned ship test scenarios are solved, and efficient and detailed scene generation is achieved.
Patent Information
- Application Number
- CN202411517505.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is difficult to effectively generate complex and detailed unmanned ship test scenarios, which makes scene generation difficult and inefficient.
By building an editable scene element library, using naive Bayesian model for scene classification, rule-based decision-making system for scene segmentation, combining k-mean algorithm and generative adversarial network (DCGAN) model, a large number of subtask scenarios are automatically generated, and specific test scenarios are formed through integration and definition.
It improves the complexity and detail expression ability of scene generation, reduces the difficulty and time of scene generation, enhances the generation efficiency, and realizes the automated scene generation function.
Smart Images

Figure CN119719942A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of scene generation, and in particular relates to a scene generation method for an unmanned ship testing task. Background Art
[0002] During the design, manufacture, transportation, installation, long-term operation and maintenance of electrical equipment, certain insulation defects often appear inside the equipment. These defects interact with the surrounding air to produce different types of partial discharge. Different types of partial discharge represent different insulation degradation mechanisms, and partial discharges can be strong or weak. The type and strength of the discharge have an absolute effect on the degree of damage to the insulation capacity of the equipment. Therefore, research on partial discharge diagnostic technology for electrical equipment is of great significance to the long-term stable operation of electrical equipment. Summary of the invention
[0003] In order to solve the technical problems in the prior art, the present invention provides a scene generation method for an unmanned ship test task, comprising the following steps:
[0004] Feature library construction and integration: search scene feature information through feature extraction and manual editing to build a feature library;
[0005] Scenario conceptualization and classification, using the naive Bayes model to perform coarse-grained classification of scenarios;
[0006] Refined scene segmentation, using a rule-based decision system to set up scene connection points and subdivide scene segments;
[0007] Subtask scene dataset construction: Use the k-means algorithm to cluster scene fragments and assign subtask labels to obtain the subtask scene dataset;
[0008] Generative adversarial network model training, using the DCGAN model to automatically generate a large number of subtask scenarios;
[0009] Integrate and concretize subtask scenarios, match and combine subtask scenarios to form specific test scenarios.
[0010] Furthermore, the construction and integration of the element library includes:
[0011] Sensors are used to collect real-world scene information, and deep learning algorithms such as target detection are used to identify scene element information. Manually edited data is integrated and saved in the form of structured data to form a scene element library.
[0012] Further, the scene conceptualization classification includes:
[0013] Use the naive Bayes model to perform coarse-grained classification of scenes, statistically analyze the classification results, and screen scene samples based on probability distribution to improve data quality.
[0014] Furthermore, the scene refinement segmentation includes:
[0015] Use a rule-based decision-making system to establish and filter scene connection points, and subdivide scenes into specific scene segments with certain functions or specific attributes.
[0016] Furthermore, the subtask scenario dataset construction includes:
[0017] The k-means algorithm is used to cluster the scene fragments, and sub-task labels are assigned according to the fragment features to form a sub-task scene dataset.
[0018] Furthermore, the training of the generative adversarial network model includes:
[0019] The sub-task scenario dataset is used to iteratively train the deep convolutional generative adversarial network to automatically generate a large number of sub-task scenarios.
[0020] Furthermore, the subtask scenario integration and concretization include:
[0021] Parse the large-category task scenario into several subtask scenarios with time-series relationships, match the subtask scenarios based on the parsing results, and combine them to form a test scenario
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] The present invention enriches the test scenario resources by establishing an editable scenario element library, which helps to increase the complexity of the generated scenarios and can continuously increase the test scenario content according to the gradual refinement of the test evaluation indicators; decomposes complex task scenarios into sub-task scenarios that can achieve specific functions, reduces the difficulty of scenario generation, improves the efficiency of scenario generation and enhances the ability to express scene details; uses a deep convolutional generative adversarial network model to learn a large number of scenario generation cases, realizes the automatic generation function of task scenarios, and improves the efficiency of scenario generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 is a flow chart of the scene generation method of the present invention;
[0025] Figure 2 It is a schematic diagram of the scene generation method of the present invention;
[0026] Figure 3 It is a schematic diagram of some segmentation rules of the present invention; Figure 4 Schematic diagram of the DCGAN network model of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described below in conjunction with the accompanying drawings and specific implementation methods.
[0028] like Figure 1 and Figure 2 As shown, the present application proposes a scenario generation method for an unmanned ship test task, which specifically includes the following steps:
[0029] (1) Construction and integration of element database
[0030] The construction and integration of scene element library is divided into element information extraction and manual editing steps. Typical unmanned ship scene elements include the geometric characteristics and performance characteristics of the main platform; navigation area elements include channel information and shore-based information; natural environment elements include wind field, flow field, environmental field and other characteristics... Some information can be directly obtained through prior data, while some information needs to be collected from the actual environment. In actual application scenarios, unmanned ships collect multimodal data including images, voice, electromagnetic signals, etc. through various sensors. In order to make full use of these data, on the basis of time and space synchronization, combined with deep learning technologies such as target detection and semantic segmentation, the system identifies the main object, seabirds, fish, waves and reefs and other dynamic and static targets in the application process, and their relative relationship with the main unmanned ship in time and space. This method has high accuracy, can process multiple types of data at the same time and is not prone to errors. Finally, structured data is used for storage.
[0031] In order to cover as many scenarios as possible in unmanned ship testing, in addition to natural scene data collection, it is also necessary to integrate artificial environment data according to specific application environments or specific functional requirements. Specifically, according to corresponding legal regulations, inherent attributes of facilities, and meteorological laws, uncollected element data can be manually specified or existing element data can be manually edited to enrich the element library content and meet the needs of unmanned ship test scene construction in complex environments.
[0032] (2) Scenario conceptualization and classification
[0033] The scene conceptualization classification is a coarse-grained classification based on the scene task type, such as intelligence reconnaissance tasks, target tracking tasks, etc. This step uses a classification algorithm based on the naive Bayes model to classify it, as shown below:
[0034]
[0035] Where k = 1, 2, 3…, K, c k represents the kth category, j represents the jth feature (i.e., element value), ∏ j P(X (j) =x (j) |Y=c k ) means that in category ck The probability of sample x appearing under the condition. The category c with the largest final y value k This is the classification result. The purpose of coarse classification is to reduce the complexity of subsequent scene segmentation and clustering, while ensuring that the scene objects of segmentation and clustering operations have a certain relevance and improve data quality. Then, the probability distribution model obtained by statistics is used to filter out inappropriate outliers.
[0036] The scene element library input in this step has the characteristics of complex components and uncertain span. Although it can produce an optimal classification result, the actual scene process may not belong to any category, or may belong to multiple categories at the same time. Therefore, it is necessary to further subdivide the segments according to the status of the main platform.
[0037] (3) Fine-grained scene segmentation
[0038] In the subdivision step, for each category scene set, a series of scene connection points are first defined based on prior knowledge, and the scene is divided into several segments according to these connection points. The connection points are essentially key time points that describe the behavior or state of the scene main platform, such as the change of the working state of the detection system, the change of the power system startup state, the change of the navigation speed or acceleration range, etc. For example, when the state of the main platform (unmanned ship) suddenly changes from detection to movement, it is considered that the task is significantly different at this time, and the place can be determined as a connection point. Based on such connection points, the scene can be further segmented to obtain many sub-task scenes.
[0039] At the same time, in order to further limit the results of the subtask scene segment division and prevent problems such as inaccurate segment division and meaningless segments, a rule-based decision method is used to set different rules such as the shortest segment duration, the maximum number of segments in the same scene, and the weight of the connection point. Figure 3 As shown in the figure, S represents the original scene. First, the four scene connection points a, b, c, and d are determined according to the state change of the main platform. According to the segmentation rule 1, the minimum segment length, the segment after the connection point d is too short, so the connection point d is deleted; according to the segmentation rule 2, the maximum number of segments, when the maximum number of segments is determined to be 3, it is necessary to delete a connection point in a, b, and c again; at this time, considering the connection point weight, it is considered that the existence of the connection point b is meaningless, so the connection point b is deleted, and finally the segmentation results x1, x2, and x3 are obtained. The scene segmentation based on the connection point can ensure that each specific scene segment has a certain function or attribute, which is called a subtask scene.
[0040] (4) Construction of subtask scenario dataset
[0041] After segmenting each category of scenes, the k-means clustering algorithm is used to cluster these fragments. The goal is to find a cluster S that satisfies the following formula: i:
[0042]
[0043] Where x is S i The distribution of the fragment samples of the category, μ i is the sample mean in each category, and k is the number of cluster categories. The k value is iteratively optimized by observing the distance between cluster centers or the effect of subsequent model training. Finally, we can obtain k types of subtask scene fragments based on task type classification and scene connection points, and artificially assign subtask labels according to their fragment characteristics, and obtain a subtask scene dataset with element parameter space and corresponding labels for specific functional scenes.
[0044] Statistical methods such as naive Bayes classification and k-means clustering are used to obtain subtask scene fragments and corresponding subtask labels. The purpose is to reorganize the feature library into a subtask scene library, thereby generating a rich subtask scene data set to provide data support for subsequent network model training.
[0045] (5) Generative Adversarial Network Model Training
[0046] By using the subtask scenario dataset obtained in (4), the neural network can be trained through a deep learning algorithm to learn the correspondence between subtask labels and feature parameters, thereby realizing the automatic generation of test scenarios. Compared with the original generative adversarial network (GAN), the deep convolutional generative adversarial network (DCGAN) does not use a fully connected layer, but instead uses the BatchNormalization normalization method. The mathematical principle of this method is as follows:
[0047]
[0048] Batch Normalization is added after the convolution layer to normalize the data to avoid network instability caused by excessive data. Figure 4 As shown in the figure, the model is mainly composed of a sub-task scene generator and a sub-task scene discriminator.
[0049] The generator network structure is mainly composed of 6 layers of convolution. BatchNormalization normalization operation, Dropout operation and LeakyReLu activation function are added after each convolution layer to accelerate the convergence speed and calculation speed of the neural network. In addition, 2D average pooling operation and upsampling operation are added to the subtask scene generator. The subtask scene discriminator network structure is mainly composed of 6 layers of convolution and a fully connected layer. The rest of the structure is similar to the generator network, and the last layer of sigmoid function is deleted.
[0050] The DCGAN model uses 104-dimensional labeled information to input into the generator to generate subtask scenes, where the 104-dimensional random noise is composed of 100-dimensional random noise Z that is randomly generated and conforms to the standard normal distribution and 4-dimensional feature information C. C is the label information of the subtask scene classification, which has n categories in total. The nn.Embedding() function is used to process the label information and finally output the subtask scene component element set. The input image in the discriminator is also a subtask scene component element set. After a series of convolution and pooling operations, an n-dimensional judgment regression vector is output. The true and false scenes can be judged by this vector. The loss function is calculated by comparing the real sample with the sample, and then the discriminator is back-propagated. With the increase and optimization of the number of iterations, the fake samples generated by the generator in the DCGAN model will be close to the real samples. Finally, the DCGAN model will generate the specified subtask scene according to the input information.
[0051] (6) Integration and concretization of subtask scenarios
[0052] The DCGAN model can generate a large number of subtask scenarios. In order to apply to specific test scenarios for unmanned ship test tasks, the hierarchical task network method is used to perform task analysis on the test scenarios, and the specific large-scale task scenarios are analyzed into several subtask scenarios with time-series relationships. According to the analysis results, the case-based reasoning method is used to match the subtask scenarios with the generated scenario library; for the many subtask scenarios returned by the scenario library matching, the method based on the depth-first search idea is further used to combine them to generate scenarios for test tasks, realizing the integration and concretization of test scenarios.
[0053] In summary, the above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited thereto. All equivalent changes and modifications made according to the patent scope of the present invention and the contents of the specification are within the scope covered by the patent of the present invention.
Claims
1. A scenario generation method for unmanned ship testing tasks, characterized in that: The following steps are involved: Feature library construction and integration: search scene feature information through feature extraction and manual editing to build a feature library; Scenario conceptualization and classification, using the naive Bayes model to perform coarse-grained classification of scenarios; Refined scene segmentation, using a rule-based decision system to set up scene connection points and subdivide scene segments; Subtask scene dataset construction: Use the k-means algorithm to cluster scene fragments and assign subtask labels to obtain the subtask scene dataset; Generative adversarial network model training, using the DCGAN model to automatically generate a large number of subtask scenarios; Integrate and concretize subtask scenarios, match and combine subtask scenarios to form specific test scenarios.
2. The method according to claim 1, characterized in that The construction and integration of feature libraries include: Sensors are used to collect real-world scene information, and deep learning algorithms such as target detection are used to identify scene element information. Manually edited data is integrated and saved in the form of structured data to form a scene element library.
3. The method according to claim 1, characterized in that The scenario conceptualization categories include: Use the naive Bayes model to perform coarse-grained classification of scenes, statistically analyze the classification results, and screen scene samples based on probability distribution to improve data quality.
4. The method according to claim 1, characterized in that The refined segmentation of scenes includes: Use a rule-based decision-making system to establish and filter scene connection points, and subdivide scenes into specific scene segments with certain functions or specific attributes.
5. The method according to claim 1, characterized in that The construction of subtask scenario dataset includes: The k-means algorithm is used to cluster the scene fragments, and sub-task labels are assigned according to the fragment features to form a sub-task scene dataset.
6. The method according to claim 1, characterized in that Generative adversarial network model training includes: The sub-task scenario dataset is used to iteratively train the deep convolutional generative adversarial network to automatically generate a large number of sub-task scenarios.
7. The method according to claim 1, characterized in that The integration and concretization of subtask scenarios include: Parse the large-category task scenario into several sub-task scenarios with time-series relationships, match the sub-task scenarios according to the parsing results, and combine them to form a test scenario.