Method and apparatus for generating observation data, electronic device, and storage medium
By using a variational autoencoder (VAE) model to generate observation data, the problem of insufficient reliability in observation data generation in existing technologies is solved, and a more reliable data generation method is realized.
Patent Information
- Application Number
- CN202210512465.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-05-12
AI Technical Summary
Existing methods for generating observational data lack reliability in fields such as healthcare and autonomous driving, and the lack of a unified explanation of the underlying principles means that the reliability of the generated observational data needs to be improved.
The model is generated by variational autoencoder (VAE). The encoder transforms the training data into latent variables, extracts feature maps, calculates the correlation scores of the convolutional layers, generates attention maps, and decodes the observed data through the decoder, providing a reliable generation principle.
It improves the reliability of observation data generation, helps users understand the generation method, and ensures the credibility of the generated data.
Smart Images

Figure CN114926561B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data decision, in particular to a method and device for generating observation data, electronic equipment and computer readable storage medium. BACKGROUND
[0002] The variational autoencoder VAE is a kind of generative model, which can be used to randomly generate observation data, and it can capture the dependency between pixels of an image by creating a generative model for the image, and combine the pixels of the image according to the dependency between the pixels to generate the observation data.
[0003] At present, the generation model generates observation data, which has been widely used in the fields of medical care, automatic driving and the like, and these fields have very high requirements for the reliability of the generated observation data, and the application needs to understand the principle behind the generated observation data, but at present, the generation of observation data is mostly designed for classification tasks, and there is no unified principle explanation, therefore, the reliability of the observation data generation needs to be improved. SUMMARY
[0004] The present application provides a method and device for generating observation data, electronic equipment and computer readable storage medium, which mainly aims to improve the reliability of the observation data generation method.
[0005] To achieve the above purpose, the present application provides a method for generating observation data, comprising:
[0006] Obtaining training data, converting the training data into latent variables through an encoder, and extracting feature maps of the latent variables;
[0007] Calculating the correlation scores of each convolution layer in the encoder through a preset algorithm;
[0008] According to the feature maps, linearly combining each correlation score to obtain an attention map of the latent variables;
[0009] Aggregating each attention map to obtain an aggregated attention map, and identifying the generation principle of the observation data corresponding to the training data according to the aggregated attention map;
[0010] According to the generation principle, decoding the latent variables into observation data by using a decoder to obtain the observation data corresponding to the training data.
[0011] Optionally, the conversion of the training data into latent variables through the encoder comprises:
[0012] Converting the training data into spatial parameters in the encoder;
[0013] A normal distribution of the space parameter is defined, and a variable is randomly sampled from the normal distribution to obtain the latent variable.
[0014] Optionally, the feature mapping of the latent variable is extracted, including:
[0015] An initial feature in the latent variable is identified, and a feature model of the initial feature is constructed.
[0016] The feature model is optimized according to a preset evaluation index to obtain a feature model.
[0017] The weight of the feature model is calculated, the key feature is extracted from the initial feature according to the weight, and the feature mapping of the latent variable is generated according to the key feature.
[0018] Optionally, the correlation score of each convolution layer in the encoder is calculated by a preset algorithm, including:
[0019] The neurons of each convolution layer in the encoder are obtained, and the weights of the neurons are calculated by a preset algorithm.
[0020] The correlation score of each convolution layer is calculated according to the weight of the neuron.
[0021] Optionally, the attention map of the latent variable is obtained by linearly combining each correlation score according to the feature mapping, which is realized by the following formula:
[0022]
[0023] Wherein, α i is a weighted component, A i is a feature mapping, i is a neuron, R i represents the correlation score of the i-th layer feature mapping, x i is the output of the neuron, ReLU is the activation function, and n is the number of neurons.
[0024] Optionally, the aggregation of each attention map is performed to obtain an aggregated attention map, including:
[0025] Each attention map is finely divided to obtain a plurality of divided fine-grained maps, and the importance of the divided fine-grained maps is identified.
[0026] According to the importance of the divided fine-grained maps, the divided fine-grained maps are aggregated to obtain the aggregated attention map.
[0027] Optionally, the observation data decoding of the latent variable is performed by the decoder according to the generation principle to obtain the observation data corresponding to the training data, including:
[0028] According to the generation principle of the observation data, the latent variable is randomly combined by a decoder to obtain a randomly combined latent variable;
[0029] A loss value of the randomly combined latent variable and the training data is calculated, and the randomly combined latent variable corresponding to the loss value less than a preset threshold is taken as the observation data corresponding to the training data.
[0030] To solve the above problems, the application further provides an observation data generation device, which comprises:
[0031] A feature map extraction module is configured to obtain training data, convert the training data into a latent variable by an encoder, and extract a feature map of the latent variable.
[0032] A correlation score calculation module is configured to calculate a correlation score of each convolution layer in the encoder according to the feature map by an LRP algorithm.
[0033] An attention map combination module is configured to linearly combine each correlation score to obtain an attention map of the latent variable.
[0034] A generation principle identification module is configured to aggregate each attention map to obtain an aggregated attention map, and identify a generation principle of observation data corresponding to the training data according to the aggregated attention map.
[0035] An observation data decoding module is configured to decode the latent variable by a decoder according to the generation principle to obtain the observation data corresponding to the training data.
[0036] To solve the above problems, the application further provides an electronic device, which comprises:
[0037] At least one processor; and,
[0038] A memory in communication connection with the at least one processor; wherein,
[0039] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to implement the above-mentioned observation data generation method.
[0040] To solve the above problems, the application further provides a computer readable storage medium, which stores at least one computer program, and the at least one computer program is executed by a processor in an electronic device to implement the above-mentioned observation data generation method.
[0041] It can be seen that the embodiment of the present application converts the training data into latent variables by the encoder for analyzing the entity data by each convolution layer, and converts the entity data into abstract data. Further, the embodiment of the present application extracts the feature map of the latent variable for indirectly obtaining the feature map of the training data through the latent variable, so as to facilitate subsequent provision of the feature map for reassembling the training data. Further, the embodiment of the present application calculates the correlation score of each convolution layer in the encoder by a preset algorithm, so as to obtain the data fragments obtained after the convolution layer filters the training data according to the correlation score of the convolution layer, so as to facilitate subsequent integration of the data fragments to obtain observed data. Further, the embodiment of the present application obtains the attention map of the latent variable by linearly combining each correlation score according to the feature map, so as to obtain the attention map of the training data by obtaining the data features of the training data. Further, the embodiment of the present application obtains the aggregated attention map by aggregating each attention map, so as to integrate the fragments of the training data, i.e. the attention map, under machine learning to obtain new training data. Further, the embodiment of the present application identifies the generation principle of the observed data corresponding to the training data according to the aggregated attention map, so that the user can understand the generation method of the observed data when generating the observed data, facilitating the user to judge whether the generation method of the observed data is reliable. Further, the embodiment of the present application decodes the latent variable by the decoder according to the generation principle to obtain the observed data corresponding to the training data, so as to re-integrate the training data by the decoder to obtain new data generated by machine learning. Therefore, the generation method, device, electronic equipment and computer readable storage medium of the observed data provided by the embodiment of the present application can improve the reliability of the generation of the observed data. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 The flowchart of the generation method of the observed data provided by an embodiment of the present application is shown in the figure.
[0043] Figure 2 The module diagram of the generation device of the observed data provided by an embodiment of the present application is shown in the figure.
[0044] Figure 3 The internal structure diagram of the electronic equipment for implementing the generation method of the observed data provided by an embodiment of the present application is shown in the figure.
[0045] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application.
[0047] The embodiment of the present application provides a method for generating observation data. The execution subject of the method for generating observation data includes but is not limited to at least one of electronic devices such as a server, a terminal and the like which can be configured to execute the method provided by the embodiment of the present application. In other words, the method for generating observation data can be executed by software or hardware installed in a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to a single server, a server cluster, a cloud server or a cloud server cluster and the like. The server can be a stand-alone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (CDN), and big data and artificial intelligence platforms and the like basic cloud computing services.
[0048] Referring to Figure 1 FIG. 1 shows a flowchart of the method for generating observation data provided by an embodiment of the present application. In the embodiment of the present application, the method for generating observation data includes the following steps S1-S5:
[0049] S1, obtaining training data, converting the training data into latent variables through an encoder, and extracting feature mapping of the latent variables.
[0050] In the embodiment of the present application, the training data refers to a set of initial data applied in neural networks and other artificial intelligence programs, and is also basic data for further application and use. The initial data is the basis of the growing information base of the program.
[0051] Further, the embodiment of the present application converts the training data into latent variables through an encoder, so as to analyze entity data through each convolutional layer, and convert the entity data into abstract data.
[0052] The encoder refers to a VAE variational autoencoder, which evolves from an auto-encoder. The variational autoencoder VAE is a generative model, which can be used to randomly generate observation data. It creates a generative model for images, captures the dependency relationship between pixels of the image by using the generative model, combines the pixels of the image according to the dependency relationship between the pixels, and generates observation data. The VAE variational autoencoder is generally composed of two parts of networks, i.e., encoder, which maps from a high-dimensional input to a low-dimensional latent variable, and decoder, which maps from the low-dimensional latent variable to the high-dimensional input.
[0053] The hidden variable refers to a comprehensive variable that cannot be directly observed, and the hidden variable is an abstract function composed of independent variables, and the abstract function is also a mapping relationship, and the value range of the independent variables and the corresponding relationship between the independent variables will affect the value of the hidden variable.
[0054] In an embodiment of the present application, the training data is converted into hidden variables by an encoder, comprising: converting the training data into spatial parameters in the encoder; defining a normal distribution of the spatial parameters, and performing variable random sampling from the normal distribution to obtain hidden variables.
[0055] Exemplarily, the training data sample is converted into mean and variance, a normal distribution is obtained according to a combination of a plurality of mean and variance, and each normal distribution corresponds to a hidden variable.
[0056] Further, in the embodiment of the present application, the feature mapping of the hidden variable is extracted for indirectly obtaining the feature mapping of the training data through the hidden variable, so as to facilitate subsequent re-splicing of the training data by the feature mapping.
[0057] The feature mapping refers to the number of features, for example, for an image, the feature mapping is the number of feature vectors in the image, and the feature vector can be understood as a coordinate axis, one feature vector defines a straight line, which is one-dimensional, two mutually perpendicular feature vectors define a plane, that is, an orthogonal coordinate system, and three mutually perpendicular feature vectors define a space, that is, a three-dimensional orthogonal coordinate system.
[0058] In an embodiment of the present application, the feature mapping of the hidden variable comprises: identifying an initial feature in the hidden variable, and constructing a feature model of the initial feature; optimizing the feature model according to a preset evaluation index to obtain a feature model; calculating a weight value of the feature model, extracting a key feature from the initial feature according to the weight value, and generating a feature mapping of the hidden variable according to the key feature.
[0059] Exemplarily, the initial feature in the hidden variable is identified by calculating the missing value, the abnormal value, the normalization and the like of the hidden variable. Further, the feature model of the initial feature is constructed by using a logistic regression model. Further, the optimization of the feature model according to the preset evaluation index is realized by calculating the accuracy and the AUC.
[0060] S2, calculating the correlation score of each convolution layer in the encoder through a preset algorithm.
[0061] The embodiment of the present application calculates the correlation scores of each convolution layer in the encoder through a preset algorithm, so as to obtain data fragments obtained after the convolution layer filters the training data according to the correlation scores of the convolution layer, and facilitate subsequent integration of the data fragments to obtain observed data.
[0062] The convolution layer is the core of the convolutional neural network, and most of the calculations are performed in the convolution layer. On each convolution layer, there is a whole set of filters, and when the filters slide along the width and height of the input data (convolution), a two-dimensional activation map is generated, and each spatial position on the activation map represents the reaction of the original picture to the filter. Intuitively, the network allows the filter to learn to activate when it sees certain types of visual features, and the specific visual features can be boundaries, colors, contours, or even honeycomb or wheel patterns on higher layers of the network.
[0063] The preset algorithm can be a layered relevance propagation algorithm (LRP), which assigns a relevance score to an important component of the input by using the topology of the learned model itself to explain the classifier's prediction specific to a given data point.
[0064] In an embodiment of the present application, the calculation of the correlation scores of each convolution layer in the encoder through a preset algorithm comprises: obtaining neurons of each convolution layer in the encoder, and calculating the weights of the neurons through a preset algorithm; and calculating the correlation scores of each convolution layer according to the weights of the neurons.
[0065] Further, as an embodiment of the present application, the initialization of the weights of the neurons can be achieved by Gaussian distribution initialization, that is, random initialization of the parameters of the neurons from a Gaussian distribution with a fixed mean and a fixed variance.
[0066] Further, as an embodiment of the present application, the calculation of the correlation scores of each convolution layer according to the weights of the neurons is obtained through the following formula:
[0067]
[0068] wherein R i and R j respectively represent the correlation scores of the i-th layer and the j-th layer, w ij represents the weights of the neurons, x i represents the output of the neurons.
[0069] S3, according to the feature mapping, linearly combining each of the correlation scores to obtain an attention map of the latent variable.
[0070] The embodiment of the application obtains the attention map of the hidden variable by linearly combining each correlation score according to the feature mapping, so as to obtain the data features of the training data, and facilitate subsequent integration of the data features to obtain the attention map of the training data.
[0071] In the embodiment of the application, the attention map of the hidden variable is obtained by linearly combining each correlation score according to the feature mapping, which is realized by the following formula:
[0072]
[0073] Wherein, α i is a weighted component, A i is a feature mapping, i is a neuron, R i represents the correlation score of the i-th layer feature mapping, x i is the output of the neuron, ReLU is an activation function, and n is the number of neurons.
[0074] S4, aggregating each attention map to obtain an aggregated attention map, and identifying the generation principle of the observation data corresponding to the training data according to the aggregated attention map.
[0075] The embodiment of the application aggregates each attention map to obtain an aggregated attention map, so as to integrate the fragments of the training data, i.e., the attention map, under machine learning to obtain new training data.
[0076] In the embodiment of the application, the aggregation of each attention map to obtain an aggregated attention map comprises: finely splitting each attention map to obtain a plurality of split fine-grained maps, and identifying the importance of the split fine-grained maps; and aggregating the split fine-grained maps according to the importance of the split fine-grained maps to obtain the aggregated attention map.
[0077] The fine-grained splitting refers to subdividing objects in a business model to obtain a more scientific and reasonable object model, that is, intuitively, a plurality of objects are divided.
[0078] Further, the embodiment of the application identifies the generation principle of the observation data corresponding to the training data according to the aggregated attention map, so that the user can understand the generation method of the observation data when generating the observation data, and facilitates the user to judge whether the generation method of the observation data is reliable.
[0079] The observation data refers to new data generated by analyzing and arranging the training data by artificial intelligence through detection of the training data, and is new data created by artificial intelligence through learning of surrounding things.
[0080] In the embodiment of the present application, the generation principle of the observation data corresponding to the training data is identified according to the aggregated attention graph, the language description of the aggregated attention graph is obtained by identifying the aggregated attention graph through the deep visual language model, and the language description is taken as the generation principle of the observation data corresponding to the training data.
[0081] The deep visual language model takes a picture and a corresponding human language description as model input and takes the description corresponding to the picture as output.
[0082] S5, according to the generation principle, the observation data of the latent variable is decoded by using the decoder, and the observation data corresponding to the training data is obtained.
[0083] In the embodiment of the present application, the observation data corresponding to the training data is obtained by decoding the latent variable through the decoder according to the generation principle, so as to reorganize the training data through the decoder to obtain new data generated by machine learning.
[0084] In the embodiment of the present application, the observation data corresponding to the training data is obtained by decoding the latent variable through the decoder according to the generation principle, including: according to the generation principle of the observation data, the random combination of the latent variable is obtained by decoding the latent variable through the decoder, and the loss value of the random combination of the latent variable and the training data is calculated.
[0085] Exemplarily, the loss value of the combined latent variable and the training data can be realized by a python script language, and the preset threshold can be 0.5.
[0086] It can be seen that the embodiment of the present application converts the training data into latent variables by the encoder for analyzing the entity data by each convolution layer, and converts the entity data into abstract data. Further, the embodiment of the present application extracts the feature map of the latent variables for indirectly obtaining the feature map of the training data through the latent variables, so as to facilitate subsequent re-splicing of the feature map on the training data. Further, the embodiment of the present application calculates the correlation score of each convolution layer in the encoder by a preset algorithm, so as to obtain the data fragments obtained after the convolution layer filters the training data according to the correlation score of the convolution layer, so as to facilitate subsequent integration of the data fragments to obtain observed data. Further, the embodiment of the present application obtains the attention map of the latent variables by linearly combining each correlation score according to the feature map, so as to facilitate subsequent integration of the data features to obtain the attention map of the training data by obtaining the data features of the training data. Further, the embodiment of the present application obtains the aggregated attention map by aggregating each attention map, so as to integrate the fragments of the training data, i.e. the attention map, under machine learning to obtain new training data. Further, the embodiment of the present application identifies the generation principle of the observed data corresponding to the training data according to the aggregated attention map, so that the user can understand the generation method of the observed data when generating the observed data, facilitating the user to judge whether the generation method of the observed data is reliable. Further, the embodiment of the present application decodes the latent variables by the decoder according to the generation principle to obtain the observed data corresponding to the training data, so as to re-integrate the training data by the decoder to obtain new data generated by machine learning. Therefore, the generation method of the observed data provided by the embodiment of the present application can improve the reliability of the current generation method of the observed data.
[0087] As shown in Figure 2 FIG. 1 is a functional module diagram of the generation device of the observed data.
[0088] The generation device 100 of the observed data can be installed in an electronic device. According to the functions implemented, the generation device of the observed data can include a feature map extraction module 101, a correlation score calculation module 102, an attention map combination module 103, a generation principle identification module 104, and an observed data decoding module 105. The modules of the present application can also be referred to as units, which refer to a series of computer program segments that can be executed by the processor of the electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
[0089] In this embodiment, the functions of each module / unit are as follows:
[0090] The feature mapping extraction module 101 is configured to acquire training data, convert the training data into a latent variable through an encoder, and extract a feature mapping of the latent variable.
[0091] The correlation score calculation module 102 is configured to calculate a correlation score of each convolutional layer in the encoder according to the feature mapping through an LRP algorithm.
[0092] The attention map combination module 103 is configured to linearly combine each correlation score to obtain an attention map of the latent variable.
[0093] The generation principle identification module 104 is configured to aggregate each attention map to obtain an aggregated attention map, and identify a generation principle of observed data corresponding to the training data according to the aggregated attention map.
[0094] The observed data decoding module 105 is configured to perform observed data decoding on the latent variable through a decoder according to the generation principle, to obtain the observed data corresponding to the training data.
[0095] In detail, the modules in the observed data generation device 100 in the embodiment of the present application use the same technical means as the observed data generation method in the above Figure 1 , and can produce the same technical effects, which will not be described here.
[0096] As shown in Figure 3 , it is a structural schematic diagram of an electronic device 1 for implementing an observed data generation method.
[0097] The electronic device 1 can include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and can further include a computer program stored in the memory 11 and executable on the processor 10, such as an observed data generation program.
[0098] The processor 10 may, in some embodiments, be composed of integrated circuits, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits of the same or different functions, including one or more combinations of central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control unit of the electronic device 1, and is connected to various components of the electronic device 1 through various interfaces and lines, and executes programs or modules stored in the memory 11 (for example, a program for generating observation data), and calls data stored in the memory 11, to perform various functions and process data of the electronic device 1.
[0099] The memory 11 includes at least one type of readable storage medium, including a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may, in some embodiments, be an internal storage unit of the electronic device 1, for example, a mobile hard disk of the electronic device 1. The memory 11 may, in other embodiments, also be an external storage device of the electronic device 1, for example, a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like. Further, the memory 11 may, in some embodiments, include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may, in some embodiments, be used to store application software and various data installed in the electronic device 1, for example, a code of a program for generating observation data, and may, in some embodiments, be used to temporarily store data that has been or will be output.
[0100] The communication bus 12 may, in some embodiments, be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus may, in some embodiments, be divided into an address bus, a data bus, a control bus, and the like. The bus is configured to enable connection and communication between the memory 11, the processor 10, and the like.
[0101] The communication interface 13 is used for communication between the electronic device 1 and other devices, including network interface and employee interface. Optionally, the network interface can include wired interface and / or wireless interface (such as WI-FI interface, Bluetooth interface, etc.), which is usually used to establish a communication connection between the electronic device 1 and other electronic devices 1. The employee interface can be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the employee interface can also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display can be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch, etc. Among them, the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display the visual employee interface.
[0102] Figure 3 Only the electronic device 1 with components is shown, and those skilled in the art can understand that, Figure 3 The structure shown does not constitute a limitation on the electronic device 1, and can include fewer or more components than shown, or combine certain components, or different component arrangements.
[0103] For example, although not shown, the electronic device 1 can also include a power supply (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charge management, discharge management, and power consumption management. The power supply can also include one or more direct current or alternating current power supplies, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and any other components. The electronic device 1 can also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which are not described here.
[0104] It should be understood that the embodiments are only for illustration and do not limit the scope of the patent invention.
[0105] The generation program of the observation data stored in the memory 11 in the electronic device 1 is a combination of multiple computer programs, which can realize:
[0106] Obtaining training data, converting the training data into latent variables through an encoder, and extracting feature maps of the latent variables;
[0107] Calculating the correlation score of each convolution layer in the encoder through a preset algorithm;
[0108] linearly combine each of the correlation scores according to the feature mapping to obtain an attention map of the latent variable;
[0109] aggregate each of the attention maps to obtain an aggregated attention map, and identify a generation principle of the observation data corresponding to the training data according to the aggregated attention map;
[0110] decode the observation data corresponding to the training data by using a decoder according to the generation principle.
[0111] Specifically, the specific implementation method of the processor 10 to the above computer program can refer to Figure 1 The description of related steps in the corresponding embodiments will not be repeated here.
[0112] Further, the modules / units integrated in the electronic device 1, if realized in the form of software function units and sold or used as independent products, can be stored in a non-volatile computer readable storage medium. The computer readable storage medium can be volatile or non-volatile. For example, the computer readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM).
[0113] The application also provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor of an electronic device 1, the following steps can be implemented:
[0114] obtain training data, convert the training data into a latent variable by using an encoder, and extract a feature mapping of the latent variable;
[0115] calculate a correlation score of each convolution layer in the encoder by using a preset algorithm;
[0116] linearly combine each of the correlation scores according to the feature mapping to obtain an attention map of the latent variable;
[0117] aggregate each of the attention maps to obtain an aggregated attention map, and identify a generation principle of the observation data corresponding to the training data according to the aggregated attention map;
[0118] decode the observation data corresponding to the training data by using a decoder according to the generation principle.
[0119] In several embodiments provided by the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. For example, the division of the modules is merely a logical function division. There can be another division manner for the actual implementation, for example, multiple modules or components can be combined or can be integrated into another system, or some features can be left out or not implemented.
[0120] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purposes of the embodiments.
[0121] In addition, each functional module in the various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of hardware plus software functional modules.
[0122] It is obvious for those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.
[0123] Therefore, the embodiments should be regarded as exemplary and non-limiting, and the scope of the present application is defined by the appended claims rather than the above description, and all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present application. Any reference signs in the claims should not be regarded as limiting the claims to which they relate.
[0124] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (AI) is to use digital computers or digital computer controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0125] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The plurality of units or devices stated in the system claims can also be implemented by one unit or device through software or hardware. The second word is used to indicate the name, and does not indicate any specific order.
[0126] Finally, it should be noted that the above examples are merely intended to illustrate the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A method of generating observation data, characterized by, The method comprises: obtaining training data, converting the training data into latent variables through an encoder, calculating missing values, abnormal values and normalized values of the latent variables to identify initial features in the latent variables, and constructing a feature model of the initial features, optimizing the feature model according to a preset evaluation index to obtain an optimized feature model, calculating a weight value of the optimized feature model, extracting key features from the initial features according to the weight value, and generating a feature mapping of the latent variables according to the key features; calculating a correlation score of each convolution layer in the encoder through a preset algorithm; linearly combining each correlation score according to the feature mapping to obtain an attention map of the latent variables; aggregating each attention map to obtain an aggregated attention map, and identifying a generation principle of observation data corresponding to the training data according to the aggregated attention map; decoding the latent variables into observation data through a decoder according to the generation principle, obtaining observation data corresponding to the training data, wherein the decoder is a variational autoencoder, the variational autoencoder creates a generation model for an input image, captures the dependency between pixels of the input image through the generation model, and combines the pixels of the input image to generate observation data according to the dependency between the pixels.
2. The method of claim 1, wherein, The conversion of the training data into latent variables through the encoder comprises: converting the training data into spatial parameters in the encoder; defining a normal distribution of the spatial parameters, and randomly sampling variables from the normal distribution to obtain latent variables.
3. The method of claim 1, wherein, The calculation of the correlation score of each convolution layer in the encoder through the preset algorithm comprises: obtaining neurons of each convolution layer in the encoder, calculating the weight of the neurons through a preset algorithm; calculating the correlation score of each convolution layer according to the weight of the neurons.
4. The method of claim 3, wherein, The linear combination of each correlation score according to the feature mapping to obtain the attention map of the latent variables is realized through the following formula: = wherein, is a weighted component, is a feature map, i is a neuron, represents a correlation score of the i-th layer feature map, is an output of a neuron, is an activation function, n is a number of neurons.
5. The method of claim 1, wherein, The aggregation of each attention map to obtain the aggregated attention map comprises: finely splitting each attention map to obtain a plurality of split fine-grained maps, and identifying the importance of the split fine-grained maps; aggregating the split fine-grained maps according to the importance of the split fine-grained maps to obtain the aggregated attention map.
6. The method of claim 1, wherein, The decoding of the latent variables into observation data through the decoder according to the generation principle to obtain observation data corresponding to the training data comprises: randomly combining the latent variables through the decoder according to the generation principle of the observation data to obtain randomly combined latent variables; calculating a loss value of the randomly combined latent variables and the training data, and regarding the randomly combined latent variables corresponding to the loss value less than a preset threshold as the observation data corresponding to the training data.
7. An observation data generation apparatus characterized by comprising: The device comprises: The feature mapping extraction module is configured to obtain training data, convert the training data into latent variables through an encoder, calculate missing values, abnormal values and normalized values of the latent variables to identify initial features in the latent variables, construct a feature model of the initial features, optimize the feature model according to a preset evaluation index to obtain an optimized feature model, calculate a weight value of the optimized feature model, extract key features from the initial features according to the weight value, and generate a feature mapping of the latent variables according to the key features. The correlation score calculation module is configured to calculate a correlation score of each convolution layer in the encoder through a preset algorithm. The attention map combination module is configured to combine each correlation score linearly to obtain an attention map of the latent variables according to the feature mapping. The generation principle identification module is configured to aggregate each attention map to obtain an aggregated attention map, and identify a generation principle of observation data corresponding to the training data according to the aggregated attention map. The observation data decoding module is configured to decode the latent variables into observation data corresponding to the training data according to the generation principle through a decoder, wherein the decoder is a variational autoencoder, the variational autoencoder creates a generation model for an input image, captures a dependency relationship between pixels of the input image through the generation model, and combines the pixels of the input image according to the dependency relationship between the pixels to generate the observation data.
8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the observation data generation method of any one of claims 1 to 6.
9. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to implement the observation data generation method of any one of claims 1 to 6.
Citation Information
Patent Citations
Time variant data time super-resolution visualization method based on deep learning model
CN113269675A
Artificial intelligence-based speech synthesis method and device, equipment and storage medium
CN113870835A