CN116738238A - Method and device for building weather scene and electronic equipment - Google Patents

Method and device for building weather scene and electronic equipment Download PDF

Info

Publication number
CN116738238A
CN116738238A CN202311014618.9A CN202311014618A CN116738238A CN 116738238 A CN116738238 A CN 116738238A CN 202311014618 A CN202311014618 A CN 202311014618A CN 116738238 A CN116738238 A CN 116738238A
Authority
CN
China
Prior art keywords
scene
weather
decision tree
scenes
tree model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311014618.9A
Other languages
Chinese (zh)
Inventor
何丰
郝运泽
张旋
谭哲
陈旭中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Saimu Technology Co ltd
Original Assignee
Beijing Saimu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Saimu Technology Co ltd filed Critical Beijing Saimu Technology Co ltd
Priority to CN202311014618.9A priority Critical patent/CN116738238A/en
Publication of CN116738238A publication Critical patent/CN116738238A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/01Dynamic search techniques; Heuristics; Dynamic trees; Branch-and-bound
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method and a device for constructing a weather scene and electronic equipment, and relates to the technical field of automatic driving scene construction, wherein the method comprises the following steps: acquiring an original scene data set, wherein the original scene data set comprises a plurality of weather scenes, and each weather scene comprises a plurality of weather function points; sampling an original scene data set by using a random forest method, and constructing a plurality of decision tree models according to sampling results; determining importance indexes corresponding to each weather function point according to the multiple decision tree models; extracting a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point; and constructing and forming a plurality of effective weather scenes by utilizing a plurality of target weather function points. According to the method, the weather function points are extracted and combined through the decision tree to form the effective weather scene, so that the construction efficiency and coverage of the weather scene are effectively improved.

Description

Method and device for building weather scene and electronic equipment
Technical Field
The application relates to the technical field of automatic driving scene construction, in particular to a weather scene construction method and device and electronic equipment.
Background
Weather conditions, which are an important part of natural scenes, have a great influence on automatic driving, and change the way in which an automatic driving vehicle is recognized. For example: cameras are essentially useless in heavy fog, heavy rain or snow, as lidar cameras may reflect to such conditions so as to be indistinguishable.
In the automatic driving simulation scene, the weather environment is taken as an important simulation environment, which is crucial to the accurate establishment of the weather environment, and the currently established weather simulation scene is written based on experience, so that the writing efficiency is low, and the coverage cannot be ensured.
Disclosure of Invention
Therefore, the application aims to at least provide a method, a device and an electronic device for constructing a weather scene, which are used for extracting and combining weather function points through a decision tree to form an effective weather scene, so that the construction efficiency and coverage of the weather scene are effectively improved.
The application mainly comprises the following aspects:
in a first aspect, an embodiment of the present application provides a method for building a weather scene, where the method includes: acquiring an original scene data set, wherein the original scene data set comprises a plurality of weather scenes, and each weather scene comprises a plurality of weather function points; sampling an original scene data set by using a random forest method, and constructing a plurality of decision tree models according to sampling results; determining importance indexes corresponding to each weather function point according to the multiple decision tree models; extracting a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point; and constructing and forming a plurality of effective weather scenes by utilizing a plurality of target weather function points.
In one possible implementation, the sampling result includes a plurality of scene training sets, wherein the step of sampling the original scene data set using a random forest method and constructing a plurality of decision tree models according to the sampling result includes: sampling the original scene dataset a plurality of times for each sample: randomly selecting a plurality of training weather scenes from the original scene data set with the replaced scene, and generating a scene training set corresponding to the sampling by the plurality of training weather scenes; and calculating the information gain corresponding to each weather function point by utilizing a decision tree algorithm and a plurality of training weather scenes corresponding to each scene training set aiming at each scene training set, and constructing a decision tree model corresponding to the scene training set according to the information gain corresponding to each weather function point.
In one possible implementation, each weather scene carries a scene type tag, the scene type tag is used for indicating a scene type corresponding to the weather scene, the scene type comprises a natural scene and a non-natural scene, and a decision tree model corresponding to each scene training set is created by the following method: determining a scene type corresponding to each training weather scene according to a scene type tag carried by each training weather scene in the scene training set; according to the scene type corresponding to each training weather scene in the scene training set, calculating the information entropy corresponding to the scene training set; calculating a conditional entropy corresponding to each weather function point; for each weather function point, calculating a difference value between the information entropy and the conditional entropy corresponding to the weather function point, and determining the difference value as the information gain corresponding to the weather function point; and taking the weather function point corresponding to the maximum information gain as a characteristic splitting point, and constructing a decision tree model corresponding to the scene training set.
In one possible implementation, the information entropy corresponding to each scene training set is calculated by the following formula:
in the course of this formula (ii) the formula,representing scene training set +.>Corresponding information entropy, < >>Representing a natural scene in a scene training set +.>The ratio of>Representing unnatural scenes in a scene training set +.>The ratio of (2), wherein->Representing scene training set +.>Total number of training weather scenes>Representing scene training set +.>The number of training weather scenes belonging to natural scenes, < ->,/>Representing scene training set +.>The number of training weather scene samples belonging to unnatural scenes, < +.>Label representing scene type,/->Representing natural scenes->Representing an unnatural scene.
In one possible implementation, for each scene training set, the conditional entropy corresponding to each function point is calculated by the following formula:
wherein ,indicate->Personal weather function Point->Scene training set +.>Conditional entropy of>Indicating weather function point->Scene training set +.>Different values of->Indicating weather function point->Value->Time-of-day scene training set->The ratio of>Indicating weather function point->Scene training set +.>Corresponding different scene types->The sum of the lower duty cycles, wherein,
wherein ,representing scene type +.>Corresponding values, including natural scenes and unnatural scenes,>indicating weather function point->Value->The duty cycle in a plurality of training weather scenes belonging to scene type Y.
In one possible implementation, the step of determining the importance index corresponding to each weather function point according to the plurality of decision tree models includes: for each decision tree model, the following is performed: determining an out-of-bag data set corresponding to the decision tree model, wherein the out-of-bag data set comprises a plurality of verification weather scenes, and the out-of-bag data set is a difference set between an original scene data set and a scene training set corresponding to the decision tree model; respectively inputting a plurality of verification weather scenes into the decision tree model, and obtaining a first classification result corresponding to each verification weather scene output by the decision tree model; determining a first out-of-bag data error corresponding to the decision tree model according to a first classification result corresponding to each verification weather scene; adding noise interference at the weather function point corresponding to each verification weather function point aiming at each weather function point, inputting a plurality of verification weather scenes after the noise interference corresponding to the weather function point is added into the decision tree model, and obtaining a second classification result corresponding to each verification weather scene output by the decision tree model; determining a second out-of-bag data error corresponding to the decision tree model according to a second classification result corresponding to each verification weather scene; and calculating a sum value of error differences corresponding to each weather function point in each decision tree model according to each weather function point, and determining a ratio of the sum value to the number of the decision tree models as an importance index corresponding to the weather function point, wherein the error differences are differences between the first out-of-bag data errors and the second out-of-bag data errors.
In one possible implementation, the classification result indicates a predicted scene type corresponding to the verified weather scene identified by the decision tree model, wherein the first out-of-bag data error corresponding to each decision tree model is determined by: determining the actual scene type corresponding to each verification weather scene according to the scene type label of each verification weather scene corresponding to the decision tree model; aiming at each verification weather scene corresponding to the decision tree model, verifying and comparing the predicted scene type corresponding to the verification weather scene with the actual scene type to obtain a comparison result; counting the quantity value of verification weather scenes with inconsistent comparison results between the predicted scene type and the actual scene type in the decision tree model; and determining the ratio between the quantity value and the total number of the verification weather scenes corresponding to the decision tree model as a first out-of-bag data error corresponding to the decision tree model.
In one possible implementation, the formation of a plurality of active weather scenes is built up by: the importance indexes corresponding to the weather function points are ordered in a descending order, the weather function points with the number preset before in the ordering result are selected, and the weather function points are determined to be a plurality of target weather function points; taking a plurality of target weather function points as a scene training set, and constructing a target decision tree model; traversing and taking values of a plurality of target weather function points, constructing a plurality of candidate weather scenes, and inputting a target decision tree model to classify scene types; and for each candidate weather scene, if the scene type corresponding to the candidate weather scene output by the target decision tree model is a natural scene, determining the candidate weather scene as an effective weather environment scene.
In a second aspect, an embodiment of the present application further provides a device for building a weather scene, where the device includes: the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring an original scene data set, the original scene data set comprises a plurality of weather scenes, and each weather scene comprises a plurality of weather function points; the construction module is used for sampling the original scene data set by utilizing a random forest method and constructing a plurality of decision tree models according to sampling results; the determining module is used for determining importance indexes corresponding to each weather function point according to the multiple decision tree models; the extraction module is used for extracting a plurality of target weather function points from a plurality of weather function points according to the importance index corresponding to each weather function point; and the building module is used for building and forming a plurality of effective weather scenes by utilizing a plurality of target weather function points.
In a third aspect, an embodiment of the present application further provides an electronic device, including: the system comprises a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory are communicated through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the method for constructing the weather scene in the first aspect or any possible implementation manner of the first aspect.
The embodiment of the application provides a method and a device for constructing a weather scene and electronic equipment, wherein the method comprises the following steps: acquiring an original scene data set, wherein the original scene data set comprises a plurality of weather scenes, and each weather scene comprises a plurality of weather function points; sampling an original scene data set by using a random forest method, and constructing a plurality of decision tree models according to sampling results; determining importance indexes corresponding to each weather function point according to the multiple decision tree models; extracting a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point; and constructing and forming a plurality of effective weather scenes by utilizing a plurality of target weather function points. According to the method, the weather function points are extracted and combined through the decision tree to form the effective weather scene, so that the construction efficiency and coverage of the weather scene are effectively improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows a flowchart of a method for constructing a weather scene according to an embodiment of the present application;
FIG. 2 illustrates a decision tree model creation flow chart provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a weather scene building device according to an embodiment of the present application;
fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for the purpose of illustration and description only and are not intended to limit the scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present application. It should be appreciated that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art under the direction of the present disclosure.
In addition, the described embodiments are only some, but not all, embodiments of the application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art based on embodiments of the application without making any inventive effort, fall within the scope of the application.
At present, the simulation scene is built based on experience, the writing efficiency is low, and the coverage cannot be ensured.
Based on the above, the embodiment of the application provides a method, a device and an electronic device for constructing a weather scene, which are used for extracting and combining weather function points through a decision tree to form an effective weather scene, so that the construction efficiency and coverage of the weather scene are effectively improved, and the method comprises the following steps:
referring to fig. 1, fig. 1 shows a flowchart of a method for setting up a weather scene according to an embodiment of the present application. As shown in fig. 1, the method provided by the embodiment of the application includes the following steps:
s100, acquiring an original scene data set.
The original scene data set includes a plurality of weather scenes, each weather scene including a plurality of weather function points.
And S200, sampling the original scene data set by using a random forest method, and constructing a plurality of decision tree models according to sampling results.
S300, determining importance indexes corresponding to each weather function point according to the multiple decision tree models.
S400, extracting a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point.
S500, constructing and forming a plurality of effective weather scenes by utilizing a plurality of target weather function points.
In step S100, the original scene data set includes a plurality of weather scenes built in advance, and each weather scene may be noted as:
wherein ,represents the j-th weather scene in the original scene dataset, < + >>Representing +.j in the j-th weather scene>For example, for a weather function point, the value of the weather function point in different weather scenes indicates different fog concentrations, and if the value of a certain weather function point dimension in the weather scene is zero, the weather function point is indicated to be not in the weather scene.
In step S200, the sampling result includes a plurality of scene training sets.
In a preferred embodiment, step S200 includes:
sampling the original scene dataset a plurality of times for each sample: randomly selecting a plurality of training weather scenes from the original scene data set with the replaced scene, and generating a scene training set corresponding to the sampling by the plurality of training weather scenes; and calculating the information gain corresponding to each weather function point by utilizing a decision tree algorithm and a plurality of training weather scenes corresponding to each scene training set aiming at each scene training set, and constructing a decision tree model corresponding to the scene training set according to the information gain corresponding to each weather function point.
Specifically, a Boosting method is applied to each sampling, a plurality of weather scenes can be selected from the original scene data set in a random manner, each selected weather scene is determined to be a training weather scene, each sampling can form a scene training set, for example, n_tree times of sampling are carried out, n_tree scene training sets can be obtained, and the number of the training weather scenes selected in each scene training set is the same.
Each weather scene carries a scene type tag, the scene type tag is used for indicating a scene type corresponding to the weather scene, the scene type includes a natural scene and an unnatural scene, the natural scene is defined as an effective scene for automatic driving simulation training, the unnatural scene is defined as an ineffective scene for automatic driving simulation training, for example, if the scene type tag is represented by Y, when the scene type tag y=1 corresponding to the weather scene, the weather scene is represented as the natural scene, and when the scene type tag y= -1 corresponding to the weather scene, the weather scene is represented as the unnatural scene.
Referring to fig. 2, fig. 2 shows a flowchart for creating a decision tree model according to an embodiment of the present application. As shown in fig. 2, a decision tree model corresponding to each scene training set is created by:
s2001, determining a scene type corresponding to each training weather scene according to a scene type label carried by each training weather scene in each scene training set.
S2002, aiming at each scene training set, calculating the information entropy corresponding to each training weather scene in the scene training set according to the scene type corresponding to the scene training set.
In another preferred embodiment, the information entropy corresponding to each scene training set is calculated by the following formula:
in the course of this formula (ii) the formula,representing scene training set +.>Corresponding information entropy, < >>Representing a natural scene in a scene training set +.>The ratio of>Representing unnatural scenes in a scene training set +.>The ratio of (2), wherein->Representing scene training set +.>Total number of training weather scenes>Representing scene training set +.>The number of training weather scenes belonging to natural scenes, < ->,/>Representing scene training set +.>The number of training weather scene samples belonging to unnatural scenes, < +.>Label representing scene type,/->Representing natural scenes->Representing an unnatural scene.
For example, if scene training setIn (1) include->Natural scene->An unnatural scene, scene training set +.>The total number of the weather scenes for middle training is 2->Then->=/>=/>=/>Similarly, the->I.e. scene training set +.>Corresponding information entropy->Is->
S2003, calculating the conditional entropy corresponding to each weather function point according to each scene training set.
In a preferred embodiment, for each scene training set, the conditional entropy corresponding to each function point is calculated by the following formula:
wherein ,indicate->Personal weather function Point->Scene training set +.>Conditional entropy of>Indicating weather function point->Scene training set +.>Different values of->Indicating weather function point->Value->Time-of-day scene training set->The ratio of>Indicating weather function point->Scene training set +.>Corresponding different scene types->The sum of the lower duty cycles, wherein,
wherein ,representing scene type +.>Corresponding values, including natural scenes and unnatural scenes,>indicating weather function point->Value->The duty cycle in a plurality of training weather scenes belonging to scene type Y.
In particular, by weather function pointsFor mist illustration, it is in the scene training set +.>There are three values: light, moderate and severe, taking light fog as an example, firstly calculating light fog in a scene training set +.>The ratio of->Then, the +.f corresponding to the slight fog is calculated again>In determining mild mist in training set +.>The ratio of->Corresponding to mild mist->The product of the two components can be calculated by the same way to obtain the corresponding +.>Then, light mist, medium mist and medium mist correspond toSumming to obtain fog in the scene training set +.>Corresponding conditional entropy in (a).
S2004, calculating a difference value between the information entropy and the conditional entropy corresponding to each weather function point in each scene training set, and determining the difference value as the information gain corresponding to the weather function point.
Specifically, the information gain corresponding to each weather function point can be determined by the following formula:
wherein ,representing the corresponding information gain of the ith weather function point in the scene training set D.
S2005, aiming at each scene training set, taking a weather function point corresponding to the maximum information gain as a characteristic splitting point, and constructing a decision tree model corresponding to the scene training set.
In a preferred embodiment, step S300 includes:
for each decision tree model, the following is performed:
determining an out-of-bag data set corresponding to the decision tree model, wherein the out-of-bag data set comprises a plurality of verification weather scenes, inputting the verification weather scenes into the decision tree model respectively, obtaining a first classification result corresponding to each verification weather scene output by the decision tree model, determining a first out-of-bag data error corresponding to the decision tree model according to the first classification result corresponding to each verification weather scene, adding noise interference at the weather function point corresponding to each weather function point, inputting the verification weather scenes after adding the noise interference corresponding to the weather function point into the decision tree model, obtaining a second classification result corresponding to each verification weather scene output by the decision tree model, determining a second out-of-bag data error corresponding to the decision tree model according to the second classification result corresponding to each verification weather scene, calculating a sum value between error differences of the weather function point in each decision tree model according to each weather function point, determining a ratio between the sum value and the number of the decision tree model as an importance index difference value corresponding to the weather function point, and determining the difference value as the out-of-bag data error difference value between the first out-of-bag data error and the second out-of-bag data error.
The out-of-bag data set is a difference set between an original scene data set and a scene training set corresponding to the decision tree model, the decision tree model is used for classifying the input weather scene, and identifying whether the weather scene is a natural scene or a non-natural scene, if the original data set comprisesEach weather scene, if the scene training set corresponding to one of the decision tree models comprises the weather scene/>The out-of-bag dataset corresponding to the decision tree model includes verification of weather scenes
In a specific implementation, the classification result indicates a predicted scene type corresponding to the verified weather scene identified by the decision tree model, wherein the first out-of-bag data error corresponding to each decision tree model is determined by:
determining an actual scene type corresponding to each verification weather scene according to a scene type tag of each verification weather scene corresponding to the decision tree model, verifying and comparing a predicted scene type corresponding to the verification weather scene with the actual scene type for each verification weather scene corresponding to the decision tree model, obtaining a comparison result, counting a number value of verification weather scenes, of which the comparison result between the predicted scene type and the actual scene type is inconsistent, in the decision tree model, and determining a ratio between the number value and the total number of verification weather scenes corresponding to the decision tree model as a first out-of-bag data error corresponding to the decision tree model.
For example, the verification weather scene corresponding to the decision tree model is taken asFor example, the verification weather scenes +.>Corresponding scene type label Y, and determining verification weather scene ++through the scene type label Y>The corresponding actual scene types respectively, and meanwhile, the decision tree model pair verifies weather scenes +.>After classification, the weather scene verification is output>And comparing the corresponding actual scene type with the predicted scene type for each verification weather scene respectively, if the comparison results are consistent, indicating that the prediction of the scene type of the verification weather scene by the decision tree model is correct, if the comparison results are inconsistent, indicating that the prediction of the scene type of the verification weather scene by the decision tree model is incorrect, counting the duty ratio of the verification weather scene quantity with incorrect prediction in the out-of-bag data set, and determining the first out-of-bag data error.
And then, for each decision tree model, randomly adding noise interference to each weather function point in the weather scene for each out-of-bag data of the decision tree model, and then, inputting the corresponding electrothermal decision tree model again to determine a second out-of-bag data error, wherein the determination mode of the second out-of-bag data error is the same as that of the first out-of-bag data error, and the description is omitted.
In one example, the importance index corresponding to each weather function point may be calculated by the following formula:
in the course of this formula (ii) the formula,representing the number of decision tree models, +.>Indicating the data error of the ith weather function point outside the first bag corresponding to the mth decision tree,/I>And representing the data error of the ith weather function point outside the second bag corresponding to the mth decision tree.
In a preferred embodiment, step S500 includes:
the method comprises the steps of carrying out descending order sorting on importance indexes corresponding to all weather function points, selecting a preset number of weather function points in a sorting result, determining the weather function points as a plurality of target weather function points, taking the plurality of target weather function points as a scene training set, constructing a target decision tree model, carrying out traversal value taking on the plurality of target weather function points, constructing a plurality of candidate weather scenes, inputting the target decision tree model for classifying scene types, and determining the candidate weather scenes as effective weather environment scenes if the scene types corresponding to the candidate weather scenes output by the target decision tree model are natural scenes for each candidate weather scene.
Based on the same application conception, the embodiment of the application also provides a weather scene building device corresponding to the weather scene building method provided by the embodiment, and because the principle of solving the problem of the device in the embodiment of the application is similar to that of the weather scene building method of the embodiment of the application, the implementation of the device can be referred to the implementation of the method, and the repetition is omitted.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a weather scene building device according to an embodiment of the present application. As shown in fig. 3, the apparatus includes:
the acquiring module 600 is configured to acquire an original scene data set, where the original scene data set includes a plurality of weather scenes, and each weather scene includes a plurality of weather function points.
The construction module 610 is configured to sample the original scene data set by using a random forest method, and construct a plurality of decision tree models according to the sampling result.
The determining module 620 is configured to determine an importance index corresponding to each weather function point according to the plurality of decision tree models.
The extracting module 630 is configured to extract a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point.
The building module 640 is configured to build and form a plurality of effective weather scenes by using a plurality of target weather function points.
Preferably, the sampling result includes a plurality of scene training sets, and the construction module 610 is further configured to: sampling the original scene dataset a plurality of times for each sample: randomly selecting a plurality of training weather scenes from the original scene data set with the replaced scene, and generating a scene training set corresponding to the sampling by the plurality of training weather scenes; and calculating the information gain corresponding to each weather function point by utilizing a decision tree algorithm and a plurality of training weather scenes corresponding to each scene training set aiming at each scene training set, and constructing a decision tree model corresponding to the scene training set according to the information gain corresponding to each weather function point.
Preferably, each weather scene carries a scene type tag, where the scene type tag is used to indicate a scene type corresponding to the weather scene, and the scene type includes a natural scene and a non-natural scene, and the building module 610 is further configured to: determining a scene type corresponding to each training weather scene according to a scene type tag carried by each training weather scene in the scene training set; according to the scene type corresponding to each training weather scene in the scene training set, calculating the information entropy corresponding to the scene training set; calculating a conditional entropy corresponding to each weather function point; for each weather function point, calculating a difference value between the information entropy and the conditional entropy corresponding to the weather function point, and determining the difference value as the information gain corresponding to the weather function point; and taking the weather function point corresponding to the maximum information gain as a characteristic splitting point, and constructing a decision tree model corresponding to the scene training set.
Preferably, the construction module 610 is further configured to calculate the information entropy corresponding to each scene training set according to the following formula:
in the course of this formula (ii) the formula,representing scene training set +.>Corresponding information entropy, < >>Representing a natural scene in a scene training set +.>The ratio of>Representing unnatural scenes in a scene training set +.>The ratio of (2), wherein->Representing scene training set +.>Total number of training weather scenes>Representing scene training set +.>The number of training weather scenes belonging to natural scenes, < ->,/>Representing scene training set +.>The number of training weather scene samples belonging to unnatural scenes, < +.>Label representing scene type,/->Representing natural scenes->Representing an unnatural scene.
Preferably, the construction module 610 is further configured to calculate, for each scene training set, a conditional entropy corresponding to each function point according to the following formula:
wherein ,indicate->Personal weather function Point->Scene training set +.>Conditional entropy of>Indicating weather function point->Scene training set +.>Different values of->Indicating weather function point->Value->Time-of-day scene training set->The ratio of>Indicating weather function point->Scene training set +.>Corresponding different scene types->The sum of the lower duty cycles, wherein,
wherein ,representing scene type +.>Corresponding values, including natural scenes and unnatural scenes,>indicating weather function point->Value->The duty cycle in a plurality of training weather scenes belonging to scene type Y.
Preferably, the determining module 620 is further configured to: for each decision tree model, the following is performed: determining an out-of-bag data set corresponding to the decision tree model, wherein the out-of-bag data set comprises a plurality of verification weather scenes, and the out-of-bag data set is a difference set between an original scene data set and a scene training set corresponding to the decision tree model; respectively inputting a plurality of verification weather scenes into the decision tree model, and obtaining a first classification result corresponding to each verification weather scene output by the decision tree model; determining a first out-of-bag data error corresponding to the decision tree model according to a first classification result corresponding to each verification weather scene; adding noise interference at the weather function point corresponding to each verification weather function point aiming at each weather function point, inputting a plurality of verification weather scenes after the noise interference corresponding to the weather function point is added into the decision tree model, and obtaining a second classification result corresponding to each verification weather scene output by the decision tree model; determining a second out-of-bag data error corresponding to the decision tree model according to a second classification result corresponding to each verification weather scene; and calculating a sum value of error differences corresponding to each weather function point in each decision tree model according to each weather function point, and determining a ratio of the sum value to the number of the decision tree models as an importance index corresponding to the weather function point, wherein the error differences are differences between the first out-of-bag data errors and the second out-of-bag data errors.
Preferably, the classification result indicates a predicted scene type corresponding to the verified weather scene identified by the decision tree model, and the determining module 620 is further configured to: determining the actual scene type corresponding to each verification weather scene according to the scene type label of each verification weather scene corresponding to the decision tree model; aiming at each verification weather scene corresponding to the decision tree model, verifying and comparing the predicted scene type corresponding to the verification weather scene with the actual scene type to obtain a comparison result; counting the quantity value of verification weather scenes with inconsistent comparison results between the predicted scene type and the actual scene type in the decision tree model; and determining the ratio between the quantity value and the total number of the verification weather scenes corresponding to the decision tree model as a first out-of-bag data error corresponding to the decision tree model.
Preferably, the building module 640 is further configured to: the importance indexes corresponding to the weather function points are ordered in a descending order, the weather function points with the number preset before in the ordering result are selected, and the weather function points are determined to be a plurality of target weather function points; taking a plurality of target weather function points as a scene training set, and constructing a target decision tree model; traversing and taking values of a plurality of target weather function points, constructing a plurality of candidate weather scenes, and inputting a target decision tree model to classify scene types; and for each candidate weather scene, if the scene type corresponding to the candidate weather scene output by the target decision tree model is a natural scene, determining the candidate weather scene as an effective weather environment scene.
Based on the same application concept, please refer to fig. 4, fig. 4 shows a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 700 includes: the system comprises a processor 710, a memory 720 and a bus 730, the memory 720 storing machine readable instructions executable by the processor 710, the processor 710 and the memory 720 communicating via the bus 730 when the electronic device 700 is in operation, the machine readable instructions being executed by the processor 710 to perform the steps of the method of constructing a weather scene as provided in any of the embodiments described above.
Based on the same application conception, the embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program executes the steps of the method for constructing the weather scene provided by the embodiment when being run by a processor.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. The method for constructing the weather scene is characterized by comprising the following steps:
acquiring an original scene data set, wherein the original scene data set comprises a plurality of weather scenes, and each weather scene comprises a plurality of weather function points;
sampling the original scene data set by using a random forest method, and constructing a plurality of decision tree models according to sampling results;
determining importance indexes corresponding to each weather function point according to the decision tree models;
extracting a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point;
and constructing and forming a plurality of effective weather scenes by utilizing the plurality of target weather function points.
2. The method of claim 1, wherein the sampling results comprise a plurality of scene training sets,
the step of sampling the original scene data set by using a random forest method and constructing a plurality of decision tree models according to sampling results comprises the following steps:
sampling the original scene dataset a plurality of times for each sampling: randomly selecting a plurality of training weather scenes from the original scene data set with the replaced scene, and generating a scene training set corresponding to the sampling by the plurality of training weather scenes;
and calculating the information gain corresponding to each weather function point by utilizing a decision tree algorithm and a plurality of training weather scenes corresponding to each scene training set aiming at each scene training set, and constructing a decision tree model corresponding to the scene training set according to the information gain corresponding to each weather function point.
3. The method of claim 2, wherein each weather scene carries a scene type tag for indicating a scene type corresponding to the weather scene, the scene type including a natural scene and a non-natural scene,
the decision tree model corresponding to each scene training set is created by the following steps:
determining a scene type corresponding to each training weather scene according to a scene type tag carried by each training weather scene in the scene training set;
according to the scene type corresponding to each training weather scene in the scene training set, calculating the information entropy corresponding to the scene training set;
calculating a conditional entropy corresponding to each weather function point;
for each weather function point, calculating a difference value between the information entropy and the conditional entropy corresponding to the weather function point, and determining the difference value as an information gain corresponding to the weather function point;
and taking the weather function point corresponding to the maximum information gain as a characteristic splitting point, and constructing a decision tree model corresponding to the scene training set.
4. A method according to claim 3, wherein the information entropy corresponding to each scene training set is calculated by the following formula:
in the course of this formula (ii) the formula,representing scene training set +.>Corresponding information entropy, < >>Training set for representing natural scene in sceneThe ratio of>Representing unnatural scenes in a scene training set +.>The ratio of (2), wherein->,/>Representing scene training set +.>Total number of training weather scenes>Representing scene training set +.>The number of training weather scenes belonging to natural scenes, < ->,/>Representing scene training set +.>The number of training weather scene samples belonging to unnatural scenes, < +.>Label representing scene type,/->Representing natural scenes->Representing an unnatural scene.
5. The method of claim 4, wherein for each scene training set, the conditional entropy corresponding to each function point is calculated by the following formula:
wherein ,indicate->Personal weather function Point->Scene training set +.>Conditional entropy of>Indicating weather function point->Scene training set +.>Different values of->Indicating weather function point->Value->Time-of-day scene training set->The ratio of>Indicating weather function point->Scene training set +.>Corresponding different scene types->The sum of the lower duty cycles, wherein,
wherein ,representing scene type +.>Corresponding values, including natural scenes and unnatural scenes,>indicating weather function point->Value->The duty cycle in a plurality of training weather scenes belonging to scene type Y.
6. The method of claim 2, wherein determining an importance index for each weather function point based on the plurality of decision tree models comprises:
for each decision tree model, the following is performed:
determining an out-of-bag data set corresponding to the decision tree model, wherein the out-of-bag data set comprises a plurality of verification weather scenes, and the out-of-bag data set is a difference set between an original scene data set and a scene training set corresponding to the decision tree model;
respectively inputting a plurality of verification weather scenes into the decision tree model, and obtaining a first classification result corresponding to each verification weather scene output by the decision tree model;
determining a first out-of-bag data error corresponding to the decision tree model according to a first classification result corresponding to each verification weather scene;
adding noise interference at the weather function point corresponding to each verification weather function point aiming at each weather function point, inputting a plurality of verification weather scenes after the noise interference corresponding to the weather function point is added into the decision tree model, and obtaining a second classification result corresponding to each verification weather scene output by the decision tree model;
determining a second out-of-bag data error corresponding to the decision tree model according to a second classification result corresponding to each verification weather scene;
and calculating a sum value of error difference values corresponding to the weather function points in each decision tree model according to each weather function point, and determining the ratio of the sum value to the number of the decision tree models as an importance index corresponding to the weather function point, wherein the error difference values are difference values between the first out-of-bag data errors and the second out-of-bag data errors.
7. The method of claim 6, wherein the classification result indicates a predicted scene type corresponding to the verified weather scene identified by the decision tree model,
wherein the first out-of-bag data error corresponding to each decision tree model is determined by:
determining the actual scene type corresponding to each verification weather scene according to the scene type label of each verification weather scene corresponding to the decision tree model;
aiming at each verification weather scene corresponding to the decision tree model, verifying and comparing the predicted scene type corresponding to the verification weather scene with the actual scene type to obtain a comparison result;
counting the quantity value of verification weather scenes with inconsistent comparison results between the predicted scene type and the actual scene type in the decision tree model;
and determining the ratio between the quantity value and the total number of the verification weather scenes corresponding to the decision tree model as a first out-of-bag data error corresponding to the decision tree model.
8. The method of claim 1, wherein the forming of the plurality of active weather scenarios is constructed by:
the importance indexes corresponding to the weather function points are ordered in a descending order, the weather function points with the number preset before in the ordering result are selected, and the weather function points are determined to be a plurality of target weather function points;
taking a plurality of target weather function points as a scene training set, and constructing a target decision tree model;
traversing and taking values of a plurality of target weather function points, constructing a plurality of candidate weather scenes, and inputting a target decision tree model to classify scene types;
and for each candidate weather scene, if the scene type corresponding to the candidate weather scene output by the target decision tree model is a natural scene, determining the candidate weather scene as an effective weather environment scene.
9. A device for building a weather scene, the device comprising:
an acquisition module for acquiring an original scene data set, the original scene data set comprising a plurality of weather scenes, each weather scene comprising a plurality of weather function points;
the construction module is used for sampling the original scene data set by utilizing a random forest method and constructing a plurality of decision tree models according to sampling results;
the determining module is used for determining importance indexes corresponding to each weather function point according to the decision tree models;
the extraction module is used for extracting a plurality of target weather function points from the plurality of weather function points according to the importance index corresponding to each weather function point;
and the building module is used for building and forming a plurality of effective weather scenes by utilizing the plurality of target weather function points.
10. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the method of constructing a weather scene according to any one of claims 1 to 8.
CN202311014618.9A 2023-08-14 2023-08-14 Method and device for building weather scene and electronic equipment Pending CN116738238A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311014618.9A CN116738238A (en) 2023-08-14 2023-08-14 Method and device for building weather scene and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311014618.9A CN116738238A (en) 2023-08-14 2023-08-14 Method and device for building weather scene and electronic equipment

Publications (1)

Publication Number Publication Date
CN116738238A true CN116738238A (en) 2023-09-12

Family

ID=87909995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311014618.9A Pending CN116738238A (en) 2023-08-14 2023-08-14 Method and device for building weather scene and electronic equipment

Country Status (1)

Country Link
CN (1) CN116738238A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180357799A1 (en) * 2017-06-13 2018-12-13 Ayasdi, Inc. Landmark feature selection
US20210406722A1 (en) * 2020-06-30 2021-12-30 Waymo Llc Simulating degraded sensor data
CN114565033A (en) * 2022-02-23 2022-05-31 中国电力科学研究院有限公司 Method and system for constructing characteristic parameter system of energy storage operation condition and storage medium
CN115237804A (en) * 2022-08-10 2022-10-25 中国工商银行股份有限公司 Performance bottleneck assessment method, performance bottleneck assessment device, electronic equipment, medium and program product
CN115292153A (en) * 2022-05-20 2022-11-04 武汉光庭信息技术股份有限公司 Construction method and system of automatic driving scene library
CN115438849A (en) * 2022-08-29 2022-12-06 北京航空航天大学 Demand prediction method for subsequent spare parts of equipment based on ensemble learning
CN115689040A (en) * 2022-11-11 2023-02-03 浙江省交通运输科学研究院 Traffic accident severity prediction method and system based on convolutional neural network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180357799A1 (en) * 2017-06-13 2018-12-13 Ayasdi, Inc. Landmark feature selection
US20210406722A1 (en) * 2020-06-30 2021-12-30 Waymo Llc Simulating degraded sensor data
CN114565033A (en) * 2022-02-23 2022-05-31 中国电力科学研究院有限公司 Method and system for constructing characteristic parameter system of energy storage operation condition and storage medium
CN115292153A (en) * 2022-05-20 2022-11-04 武汉光庭信息技术股份有限公司 Construction method and system of automatic driving scene library
CN115237804A (en) * 2022-08-10 2022-10-25 中国工商银行股份有限公司 Performance bottleneck assessment method, performance bottleneck assessment device, electronic equipment, medium and program product
CN115438849A (en) * 2022-08-29 2022-12-06 北京航空航天大学 Demand prediction method for subsequent spare parts of equipment based on ensemble learning
CN115689040A (en) * 2022-11-11 2023-02-03 浙江省交通运输科学研究院 Traffic accident severity prediction method and system based on convolutional neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
康乾坤 等: "随机森林算法在测井岩性分类中的应用", 世界地质, vol. 39, no. 02, pages 398 - 405 *
陈熙源 等: "雨雪天气下的激光雷达滤波算法研究", 仪器仪表学报, pages 1 - 10 *

Similar Documents

Publication Publication Date Title
CN113033604B (en) Vehicle detection method, system and storage medium based on SF-YOLOv4 network model
CN111832615A (en) Sample expansion method and system based on foreground and background feature fusion
CN111353549B (en) Image label verification method and device, electronic equipment and storage medium
CN110647886A (en) Interest point marking method and device, computer equipment and storage medium
CN112884802A (en) Anti-attack method based on generation
CN111340831A (en) Point cloud edge detection method and device
CN112801063A (en) Neural network system and image crowd counting method based on neural network system
CN115424053A (en) Small sample image identification method, device and equipment and storage medium
CN113780287A (en) Optimal selection method and system for multi-depth learning model
CN116738238A (en) Method and device for building weather scene and electronic equipment
CN114565092A (en) Neural network structure determining method and device
CN113869431B (en) False information detection method, system, computer equipment and readable storage medium
CN115484112A (en) Payment big data security protection method and system and cloud platform
CN114387266A (en) Training method, device, equipment and storage medium for tubercle bacillus detection model
CN112861689A (en) Searching method and device of coordinate recognition model based on NAS technology
CN112836827B (en) Model training method and device and computer equipment
CN115908444A (en) Image segmentation method, model training method, related device and electronic equipment
CN113704782A (en) Non-material cultural heritage digital protection and verification technology based on block chain technology
CN113239999A (en) Data anomaly detection method and device and electronic equipment
CN112015937A (en) Picture geographical positioning method and system
CN112434648A (en) Wall shape change detection method and system
CN113879338B (en) Driving planning module optimization method, device, equipment and medium
CN112613375B (en) Tire damage detection and identification method and equipment
CN116958954B (en) License plate recognition method, device and storage medium based on key points and bypass correction
CN117710834B (en) Mesoscale vortex recognition analysis method, system and medium based on big data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination