Prediction method, device and storage medium based on multi-source sensor data fusion
Through multi-source sensor data fusion, the problem that a single sensor cannot fully capture real city data is solved, and efficient and comprehensive urban scene prediction is achieved, which is suitable for a variety of application scenarios in smart cities.
Patent Information
- Application Number
- CN202410119428.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-01-29
AI Technical Summary
A single type of sensor has limitations in data collection and processing. It is difficult to fully capture the real data of the city and cannot effectively predict the dynamics of public facilities, crowds, vehicles or other scenes.
A prediction method based on multi-source sensor data fusion is adopted. By preprocessing, feature extraction and feature fusion of raw data from multiple sensors, the prediction model is input to generate prediction results, providing a more comprehensive view and deeper information.
It achieves efficient and comprehensive prediction of real urban scenarios, enables in-depth and effective analysis in complex environments, and is suitable for various scenarios in smart cities, such as traffic flow, crowd density, energy demand and urban maintenance prediction.
Smart Images

Figure CN117932544B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data prediction and processing, and in particular to a prediction method, device and storage medium based on multi-source sensor data fusion. Background Art
[0002] With the advancement of smart city construction, higher requirements are placed on the prediction of urban scenes. At present, a single type of sensor (such as a camera or temperature sensor) has limitations in data collection and processing, making it difficult to fully capture the real data of the city, and thus unable to predict the dynamics of public facilities, crowds, vehicles or other scenes. For example, cameras can provide rich visual information, but they are not effective in low light or obstructed vision; while temperature sensors can monitor ambient temperature, they cannot provide visual information. Since the data from these sensors have certain limitations, it is impossible to make effective predictions based on these data. Summary of the invention
[0003] The present application provides a prediction method, device and storage medium based on multi-source sensor data fusion, which can efficiently and comprehensively predict the real scenes of the city through data fusion.
[0004] On the one hand, the present application provides a prediction method based on multi-source sensor data fusion, the method comprising:
[0005] Preprocessing the raw data from the multi-source sensors respectively to obtain preprocessed data corresponding to each sensor;
[0006] Inputting the preprocessed data of each sensor into the trained feature extraction model corresponding to each sensor, performing feature extraction on the preprocessed data to obtain feature data corresponding to each sensor;
[0007] Using a trained feature fusion model to perform feature fusion on the feature data corresponding to each sensor to obtain feature fusion data;
[0008] The feature fusion data is input into one or more trained prediction models, and the trained prediction models output prediction results corresponding to the original data.
[0009] On the other hand, the present application provides a prediction device based on multi-source sensor data fusion, the device comprising:
[0010] A preprocessing module, used for preprocessing the raw data from the multi-source sensors respectively to obtain preprocessed data corresponding to each sensor;
[0011] A feature extraction module, used to input the preprocessed data of each sensor into a trained feature extraction model corresponding to each sensor, perform feature extraction on the preprocessed data, so as to obtain feature data corresponding to each sensor;
[0012] A fusion module, used for performing feature fusion on the feature data corresponding to each sensor using a trained feature fusion model to obtain feature fusion data;
[0013] The prediction module is used to input the feature fusion data into one or more trained prediction models, and the trained prediction models output prediction results corresponding to the original data.
[0014] In a third aspect, the present application provides a device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the technical solution of the prediction method based on multi-source sensor data fusion as described above when executing the computer program.
[0015] In a fourth aspect, the present application provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the technical solution of the prediction method based on multi-source sensor data fusion as described above.
[0016] From the technical solution provided by the present application, it can be seen that after the pre-processed data of various sensors are respectively input into the trained feature extraction models corresponding to the various sensors to obtain the feature data corresponding to the various sensors, the trained feature fusion model is used to perform feature fusion on the feature data corresponding to the various sensors to obtain feature fusion data, and finally the feature fusion data is input into one or more trained prediction models, and the trained prediction model outputs the prediction result corresponding to the original data. On the one hand, since different types of sensors provide different types of data, by fusing these data features, a more comprehensive view of the same event or phenomenon can be provided; on the other hand, data fusion of different types of sensors can provide deeper information, and the natural and cultural environment of the city is complex and changeable, and data fusion enables in-depth and effective analysis in more complex situations. In summary, the technical solution of the present application can efficiently and comprehensively predict the real scenes of the city through data fusion. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 is a flow chart of a prediction method based on multi-source sensor data fusion provided in an embodiment of the present application;
[0019] Figure 2 It is a structural schematic diagram of a prediction device based on multi-source sensor data fusion provided in an embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the structure of the device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] In this specification, adjectives such as first and second may be used only to distinguish one element or action from another element or action, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be interpreted as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.
[0023] In this specification, for the convenience of description, the sizes of various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0024] Smart cities are based on new-generation information technologies such as the Internet of Things, cloud computing, mobile Internet, and big data. They dynamically acquire, perceive, analyze, and integrate data from all aspects of the city in an Internet-of-Things and interconnected manner, promote efficient and convenient operations in various industries such as transportation, security, services, and medical care in modern cities, and improve the level of intelligent and refined management in the field of urban operation and management. With the advancement of smart city construction, higher requirements are placed on the prediction of urban scenes. At present, a single type of sensor (such as a camera or temperature sensor) has limitations in data collection and processing, making it difficult to fully capture the real data of the city, and thus unable to predict the dynamics of public facilities, crowds, vehicles, or other scenes. For example, cameras can provide rich visual information, but the effect is not good in low light or obstructed vision; while temperature sensors can monitor ambient temperature but cannot provide visual information. Since the data of these sensors have certain limitations, it is impossible to make effective predictions based on these data.
[0025] In view of the above problems of the prior art, this application proposes a prediction method based on multi-source sensor data fusion, which can efficiently and comprehensively predict the real scene of the city through data fusion. The flow chart is shown in the attached figure. Figure 1 As shown, it mainly includes steps S101 to S104, which are described in detail as follows:
[0026] Step S101: pre-processing the raw data from multiple source sensors respectively to obtain pre-processed data corresponding to each type of sensor.
[0027] In the embodiment of the present application, multi-source sensors are sensors of different types, including visual sensors such as cameras and non-visual sensors such as temperature sensors, vibration sensors, and sound sensors. They are deployed at necessary locations in the city to collect first-hand data from these locations. When heterogeneous data from different sensors are received, in order to facilitate subsequent data processing, the raw data from the multi-source sensors can be pre-processed separately, including cleaning the raw data (such as removing outliers and filling missing values, etc.), standardization (including adjusting the data to a unified format and range, ensuring that all data is in the same unit or scale, etc.) and synchronization of data in time and space, etc. It should be noted that if the raw data is images from two different visual sensors, it may be necessary to align these images.
[0028] Step S102: inputting the preprocessed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor respectively, performing feature extraction on the preprocessed data to obtain feature data corresponding to each type of sensor.
[0029] In the embodiment of the present application, the trained feature extraction models corresponding to the various sensors are obtained by training the feature extraction models corresponding to the various sensors in advance. As an embodiment of the present application, the preprocessed data of the various sensors are respectively input into the trained feature extraction models corresponding to the various sensors, and feature extraction is performed on the preprocessed data to obtain the feature data corresponding to the various sensors. The steps S1021 to S1023 are implemented, and the detailed description is as follows:
[0030] Step S1021: Perform multi-level feature extraction on the preprocessed data to obtain a multiple feature set representing features at different levels, wherein the multiple feature combination includes a high-level feature and at least one low-level feature, and the level corresponding to the low-level feature is smaller than the level corresponding to the high-level feature.
[0031] In the embodiment of the present application, the level corresponding to the low-level features is smaller than the level corresponding to the high-level features, which means that the low-level features contain relatively simple information, while the high-level features contain various complex and rich semantics.
[0032] Step S1022: Perform multi-feature focus operations based on multiple feature sets to obtain comprehensive semantic features.
[0033] Specifically, as an embodiment of the present application, performing multi-feature attention operations based on multiple feature sets to obtain comprehensive semantic features can be: merging multiple features in the multiple feature sets to obtain aggregate features, converting hierarchical features into retrieval features in vector form, and using the hierarchical features as mapping value features; performing multi-feature attention operations on the above-mentioned aggregate features, mapping value features, and retrieval features to obtain attention weighted features related to the hierarchical features; and extracting comprehensive semantic features based on the attention weighted features related to the hierarchical features. In the above embodiment, performing multi-feature attention operations on the above-mentioned aggregate features, mapping value features, and retrieval features to obtain attention weighted features related to the hierarchical features can be: using the aggregate features as dependent variable values, the retrieval features as retrieval values, and the mapping value features as independent variable values, performing multi-feature attention calculations, and obtaining multi-feature attention features corresponding to the hierarchical features as mapping value features.
[0034] Step S1023: Fusing the comprehensive semantic features with the low-level features to obtain feature data corresponding to each type of sensor.
[0035] Specifically, the comprehensive semantic features are fused with the low-level features to obtain the feature data corresponding to each type of sensor. The method can be as follows: coarsely sampling the comprehensive semantic features, fusing the comprehensive semantic features with the low-level features, and obtaining the first fused features corresponding to the low-level features; finely sampling the first fused features corresponding to the low-level features, fusing the first fused features corresponding to the low-level features with the comprehensive semantic features, and obtaining the feature data corresponding to each type of sensor.
[0036] It can be seen from step S1021 to step S1023 of the above embodiment that by extracting and aggregating features at different levels of the preprocessed data, an in-depth understanding of the preprocessed data, especially relatively complex visual content such as images and videos, is achieved, especially in the multi-feature operation and feature fusion stages, so that the expression of feature data corresponding to various sensors is richer and more accurate, especially in complex scenes (for example, busy urban roads with complex pedestrian and vehicle flows) and multi-level target recognition tasks. It shows obvious advantages.
[0037] As another embodiment of the present application, the preprocessed data of each type of sensor is respectively input into the trained feature extraction model corresponding to each type of sensor, and feature extraction is performed on the preprocessed data to obtain feature data corresponding to each type of sensor. The steps S'1021 to S'1023 are implemented, and the details are as follows:
[0038] Step S'1021: Inputting the transaction pair represented by the preprocessed data into the trained feature extraction model, wherein the transaction pair includes a first transaction description and a second transaction description.
[0039] In the embodiment of the present application, a transaction pair is a pair of transactions between which a causal relationship is to be determined.
[0040] Step S'1022: Generate a first unit word sequence vector and a second unit word sequence vector according to the first transaction description, and generate a third unit word sequence vector and a fourth unit word sequence vector according to the second transaction description.
[0041] The first unit is different from the second unit in that the word sequence vector of the first unit contains a vector of characters, which only contains the meaning of the characters, while the word sequence vector of the second unit contains a complete expression of transaction semantics.
[0042] Step S'1023: Generate a first fusion vector according to the first unit word sequence vector and the second unit word sequence vector, and generate a second fusion vector according to the third unit word sequence vector and the fourth unit word sequence vector.
[0043] Specifically, generating a first fusion vector based on the first unit word sequence vector and the second unit word sequence vector can be: generating a feature vector of the first transaction description based on the first unit word sequence vector and the second unit word sequence vector; obtaining a transaction relationship graph and edges connecting different transaction descriptions; determining a target transaction description connected to the first transaction description through an edge based on the transaction relationship graph; inputting the feature vector of the first transaction description and the feature vector of the target transaction description into a spatiotemporal graph neural network to obtain a first fusion vector of the first transaction description. In the above embodiment, the transaction relationship graph includes each transaction description, and the edges connecting different transaction descriptions are used to indicate that there is a transaction relationship between the connected different transaction descriptions.
[0044] From step S'1021 to step S'1023 of the above embodiment, it can be seen that by targeting the transaction description and based on the word sequence vectors of different units, the fusion vector corresponding to the transaction description is determined, so that the fusion vector contains more generalized transaction features, so as to improve the accuracy and generalization of determining the transaction relationship between transactions, achieve the purpose of eliminating false data and retaining true data, and lay the foundation for the subsequent prediction link.
[0045] As mentioned above, the trained feature extraction models corresponding to various sensors are obtained by training the feature extraction models corresponding to various sensors in advance. Since the feature extraction model, especially the model used to extract complex images, videos and other visual data, is very important for the accuracy of feature data extraction, the present application provides a method for training a feature extraction model to obtain a trained feature extraction model, including steps S1 to S5, which are described in detail as follows:
[0046] Step S1: obtaining a plurality of sample visual data pairs and labels of each sample visual data in the plurality of sample visual data pairs, wherein the sample visual data pair includes a pair of sample visual data with similar semantics.
[0047] Step S2: Obtain visual features of each sample visual data in a plurality of sample visual data pairs according to the neural network model.
[0048] Step S3: determining a first classification feature of each sample visual data in the plurality of sample visual data pairs based on the visual features of each sample visual data in the plurality of sample visual data pairs, wherein the first classification feature of the sample visual data is used to characterize the type of the predicted sample visual data.
[0049] Step S4: determining a second classification feature of each sample visual data in the plurality of sample visual data pairs based on a label of each sample visual data in the plurality of sample visual data pairs, wherein the second classification feature of the sample visual data is used to characterize the type of the labeled sample visual data.
[0050] Specifically, based on the label of each sample visual data in a plurality of sample visual data pairs, determining the second classification feature of each sample visual data in a plurality of sample visual data pairs can be: for any label of each sample visual data in a plurality of sample visual data pairs, determining a candidate classification that is identical to any label from a plurality of candidate classifications, and determining the classification feature of the candidate classification that is identical to any label as the classification feature of any label; for any sample visual data in a plurality of sample visual data pairs, determining the second classification feature of any sample visual data based on the classification feature of at least one label of any sample visual data.
[0051] Step S5: Based on the visual features, first-type features, and second-type features of each sample visual data in the plurality of sample visual data pairs, the neural network model is adjusted to obtain a trained feature extraction model.
[0052] Specifically, the implementation of step S5 can be: based on the visual data features of each sample visual data in multiple sample visual data pairs, the first classification features of each sample visual data in multiple sample visual data pairs, and the second classification features of each sample visual data in multiple sample visual data pairs, determine the loss value of the neural network model; adjust the neural network model based on the loss value of the neural network model to obtain an adjusted neural network model; if the training end condition is met (for example, the number of training times is the target number of times, or the loss value of the neural network model is within the target range, etc.), use the adjusted neural network model as the feature extraction model. If the training end condition is not met, adjust the adjusted neural network model again in the manner of steps S1 to S5 until the training end condition is met to obtain the feature extraction model.
[0053] It can be seen from steps S1 to S5 of the above embodiment that the neural network model is adjusted based on the visual features of each sample visual data in multiple sample visual data pairs, the first type of features characterizing the prediction type and the second type of features characterizing the label to obtain a feature extraction model, which realizes the use of the prediction type and label of each sample visual data in multiple sample visual data pairs to constrain the extraction of visual features by the feature extraction model, thereby improving the accuracy of the feature extraction model and thus improving the accuracy of the visual features extracted by the feature extraction model.
[0054] Step S103: using the trained feature fusion model to perform feature fusion on the feature data corresponding to each type of sensor to obtain feature fusion data.
[0055] Similar to the trained feature extraction model of the aforementioned embodiment, the trained feature fusion model can also be obtained by training the feature fusion model in advance. After the trained feature fusion model is obtained, the feature data corresponding to each type of sensor obtained through step S101 and step S102 are input into the trained feature fusion model. The trained feature fusion model converts the features corresponding to each type of sensor into standardized feature vectors through normalization processing, and uses a feature fusion algorithm (for example, principal component analysis PCA or multi-core learning method) to fuse these standardized feature vectors into a comprehensive feature representation, namely, feature fusion data. For example, by installing high-definition cameras and deploying road vibration sensors at major traffic intersections in the city, and extracting visual feature data such as the number, type and speed of vehicles and vibration feature data such as road vibration frequency and amplitude characteristics through a trained convolutional neural network, namely, a trained feature extraction model. The visual feature and vibration feature data are converted into feature vectors respectively and normalized. The multi-core learning algorithm is used to fuse the visual feature vector and the vibration feature vector to obtain a comprehensive traffic status feature vector. The fused feature vector can then be used in combination with real-time traffic data to establish a traffic flow model and predict traffic conditions in the future. Through the model prediction results, the traffic management department can formulate traffic guidance strategies in advance, such as adjusting traffic light times and issuing traffic control information.
[0056] Step S104: input the feature fusion data into one or more trained prediction models, and the trained prediction models output prediction results corresponding to the original data.
[0057] It should be noted that the feature fusion data obtained through steps S101 to S103 can be input into one trained prediction model or multiple trained prediction models. When the feature fusion data is input into multiple trained prediction models, the multiple trained prediction models jointly output the prediction results corresponding to the original data. The prediction of the embodiment of the present application can be applied to various scenarios of smart cities, including traffic flow prediction, crowd density prediction, energy demand prediction, urban maintenance prediction and emergency response, etc. For example, by using fused feature data such as past traffic flow data and current road usage, it is possible to predict traffic conditions on various road sections in the future. If a major road usually faces congestion on Friday afternoons, the system can predict the traffic pressure on the road in the next few hours and issue warnings to drivers in advance or suggest alternative routes. For another example, by analyzing fused feature data such as past crowd density data and real-time images provided by cameras, it is possible to predict the density of people in a specific place in the next few hours or days. For example, commercial districts may experience peak traffic around holidays. The smart city system can predict these peak hours and perform security management and service configuration accordingly. For another example, by combining historical facility maintenance data with real-time data collected by vibration sensors, sound sensors, etc., it is possible to predict when urban infrastructure (such as bridges, roads, buildings) may need maintenance or repair. For another example, by analyzing historical natural disaster (such as floods, earthquakes) data and real-time monitoring data, it is possible to predict future emergencies, so that personnel evacuation and resource allocation can be carried out in advance. In all these scenarios, the key to predicting future trends lies in how to effectively integrate and analyze multi-source data and use advanced analytical techniques and algorithms to make smarter and more forward-looking decisions for urban management and residents' lives.
[0058] In the embodiment of the present application, the trained prediction model can also be obtained by training the prediction model. Considering that training a large model is a time-consuming and labor-intensive behavior, in order to improve the training efficiency of the prediction model, the present application provides a method for training a feature extraction model as follows, including steps S'1 to S'5:
[0059] Step S'1: Each node participating in model training initializes the local gradient.
[0060] These initialized gradients reflect the initial performance of the model on the local data and the initial values of the direction and magnitude of its improvement.
[0061] Step S'2: Each node compresses the gradient calculated by itself, obtains a simplified gradient and uploads it to the central node.
[0062] In an embodiment of the present application, each node can reduce the dimension and size of the gradient calculated by each node through gradient quantization, sparse representation or other gradient compression techniques to reduce the communication overhead between each node and the central node. Specifically, gradient quantization mainly refers to reducing the size of the gradient by reducing the number of bits required for gradient representation. For example, the original gradient may be a 32-bit floating point number, which can be converted into a lower-bit representation through quantization, such as 16 bits, 8 bits or even 1 bit, where quantization can be either uniform quantization, that is, each dimension of the gradient is quantized to the same order of magnitude interval; or non-uniform quantization, that is, different gradient values are quantized to different orders of magnitude intervals, which can be determined based on the distribution of values. After quantization, the gradient is transmitted in a compressed form and dequantized at the receiving end to restore it to an approximation of the original value. Sparse representation means reducing the dimension and size of the gradient by transmitting only important gradient values, that is, non-zero values or gradients greater than a certain threshold. For example, if only a small number of values in the calculated gradient are significant, then only the indices and values of these significant values can be sent instead of the entire gradient vector. The receiving end puts these significant values back to the corresponding positions and fills other positions with zero or the previous gradient.
[0063] Step S'3: The central node performs aggregation operations on the simplified gradients uploaded by each node and calculates the global fusion gradient.
[0064] In an embodiment of the present application, the central node performs an aggregation operation on the simplified gradients uploaded by each node, with the purpose of merging the gradient information from different nodes to update the global model. The specific aggregation operation method can be one or a collection of any of weighted average, federated average, gradient clipping, differential privacy aggregation and model averaging. Among them, differential privacy aggregation refers to protecting data privacy by adding noise during aggregation to ensure that even if others can access the aggregated gradients, it is difficult to infer the data information of any individual node. Model averaging directly averages the model parameters trained on different nodes. Each node uploads its model parameters. The central node calculates the average value of these parameters and then distributes them back to the nodes as the new global model degree.
[0065] Step S'4: The central node compresses the global fusion gradient and broadcasts it to each node.
[0066] Step S'5: After receiving the compressed global fusion gradient, each node decompresses the compressed global fusion gradient and uses it to update the local model parameters.
[0067] The above steps S'1 to S'5 are iteratively executed until the model converges or reaches the set number of training rounds; in each round of training, the node can adjust the gradient compression strategy to optimize the communication-accuracy trade-off.
[0068] From step S'1 to step S'5 of the above embodiment, it can be seen that the above model training method effectively improves the training efficiency by reducing the number of communications and the amount of data while protecting the data privacy of each node, while the compression and fusion of gradients reduce the communication overhead, and the centralized fusion gradient calculation ensures the directionality and efficiency of model training.
[0069] from Figure 1 It can be seen from the example prediction method based on multi-source sensor data fusion that after the pre-processed data of each type of sensor is input into the trained feature extraction model corresponding to each type of sensor, and the feature data corresponding to each type of sensor is obtained, the feature fusion model is used to perform feature fusion on the feature data corresponding to each type of sensor to obtain feature fusion data, and finally the feature fusion data is input into one or more trained prediction models, and the trained prediction model outputs the prediction result corresponding to the original data. On the one hand, since different types of sensors provide different types of data, by fusing these data features, a more comprehensive view of the same event or phenomenon can be provided; on the other hand, data fusion of different types of sensors can provide deeper information, and the natural and cultural environment of the city is complex and changeable, and data fusion enables in-depth and effective analysis in more complex situations. In summary, the technical solution of the present application can efficiently and comprehensively predict the real scenes of the city through data fusion.
[0070] Please see attached Figure 2 , is a prediction device based on multi-source sensor data fusion provided in an embodiment of the present application, the device may include a preprocessing module 201, a feature extraction module 202, a fusion module 203 and a prediction module 204, which are described in detail as follows:
[0071] The preprocessing module 201 is used to preprocess the raw data from the multi-source sensors respectively to obtain preprocessed data corresponding to each type of sensor;
[0072] The feature extraction module 202 is used to input the preprocessed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor, perform feature extraction on the preprocessed data, and obtain feature data corresponding to each type of sensor;
[0073] The fusion module 203 is used to perform feature fusion on feature data corresponding to various sensors using a trained feature fusion model to obtain feature fusion data;
[0074] The prediction module 204 is used to input the feature fusion data into one or more trained prediction models, and the trained prediction models output prediction results corresponding to the original data.
[0075] From the above attached Figure 2It can be seen from the example prediction device based on multi-source sensor data fusion that after the pre-processed data of each type of sensor is input into the trained feature extraction model corresponding to each type of sensor, and the feature data corresponding to each type of sensor is obtained, the trained feature fusion model is used to perform feature fusion on the feature data corresponding to each type of sensor to obtain feature fusion data, and finally the feature fusion data is input into one or more trained prediction models, and the trained prediction model outputs the prediction result corresponding to the original data. On the one hand, since different types of sensors provide different types of data, by fusing these data features, a more comprehensive view of the same event or phenomenon can be provided; on the other hand, data fusion of different types of sensors can provide deeper information, and the natural and cultural environment of the city is complex and changeable, and data fusion enables in-depth and effective analysis in more complex situations. In summary, the technical solution of the present application can efficiently and comprehensively predict the real scenes of the city through data fusion.
[0076] Figure 3 Schematic diagram of the structure of the device provided by an embodiment of the present application. Figure 3 As shown, the device 3 of this embodiment mainly includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a program of a prediction method based on multi-source sensor data fusion. When the processor 30 executes the computer program 32, the steps in the above-mentioned prediction method embodiment based on multi-source sensor data fusion are implemented, such as Figure 2 Alternatively, when the processor 30 executes the computer program 32, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 2 The functions of the preprocessing module 201, the feature extraction module 202, the fusion module 203 and the prediction module 204 are shown.
[0077] Exemplarily, the computer program 32 of the prediction method based on multi-source sensor data fusion mainly includes: pre-processing the raw data from the multi-source sensors respectively to obtain pre-processed data corresponding to each type of sensor; inputting the pre-processed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor respectively, extracting features from the pre-processed data to obtain feature data corresponding to each type of sensor; using the trained feature fusion model to perform feature fusion on the feature data corresponding to each type of sensor to obtain feature fusion data; inputting the feature fusion data into one or more trained prediction models, and the trained prediction model outputs the prediction result corresponding to the raw data. The computer program 32 can be divided into one or more modules / units, one or more modules / units are stored in the memory 31, and are executed by the processor 30 to complete the present application. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 32 in the device 3. For example, the computer program 32 can be divided into the functions of a preprocessing module 201, a feature extraction module 202, a fusion module 203 and a prediction module 204 (modules in the virtual device), and the specific functions of each module are as follows: the preprocessing module 201 is used to preprocess the raw data from multiple source sensors respectively to obtain preprocessed data corresponding to each type of sensor; the feature extraction module 202 is used to input the preprocessed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor, and perform feature extraction on the preprocessed data to obtain feature data corresponding to each type of sensor; the fusion module 203 is used to perform feature fusion on the feature data corresponding to each type of sensor using the trained feature fusion model to obtain feature fusion data; the prediction module 204 is used to input the feature fusion data into one or more trained prediction models, and the trained prediction model outputs the prediction result corresponding to the raw data.
[0078] The device 3 may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of device 3 and does not constitute a limitation of device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, a computing device may also include input and output devices, network access devices, buses, etc.
[0079] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0080] The memory 31 may be an internal storage unit of the device 3, such as a hard disk or memory of the device 3. The memory 31 may also be an external storage device of the device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the device 3. The memory 31 is used to store computer programs and other programs and data required by the device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0081] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0082] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0083] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0084] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0085] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple 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.
[0086] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0087] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program of the prediction method based on multi-source sensor data fusion can be stored in a storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments, that is, pre-processing the raw data from the multi-source sensors respectively to obtain pre-processed data corresponding to each type of sensor; inputting the pre-processed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor respectively, extracting features from the pre-processed data to obtain feature data corresponding to each type of sensor; using the trained feature fusion model to perform feature fusion on the feature data corresponding to each type of sensor to obtain feature fusion data; inputting the feature fusion data into one or more trained prediction models, and the trained prediction model outputs the prediction result corresponding to the raw data. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The storage medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the storage medium does not include electric carrier signal and telecommunication signal. The above embodiments are only used to illustrate the technical solution of the present application, but not to limit it; although the present application is described in detail with reference to the above embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalent; and these modifications or replacements do not make the essence of the corresponding technical solution deviate from the spirit and scope of the technical solution of each embodiment of the present application, and should be included in the protection scope of the present application. The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present invention.
Claims
1. A prediction method based on multi-source sensor data fusion, characterized in that: The method comprises: Preprocessing the raw data from multiple source sensors respectively to obtain preprocessed data corresponding to each type of sensor; The preprocessed data of each type of sensor are respectively input into the trained feature extraction model corresponding to each type of sensor, and feature extraction is performed on the preprocessed data to obtain feature data corresponding to each type of sensor, and the trained feature extraction model is obtained by training the feature extraction model in the following manner: obtaining a plurality of sample visual data pairs and labels of each sample visual data in the plurality of sample visual data pairs, wherein the sample visual data pairs include a pair of sample visual data with similar semantics; obtaining visual features of each sample visual data in the plurality of sample visual data pairs according to the neural network model; determining a first classification feature of each sample visual data in the plurality of sample visual data pairs based on the visual features of each sample visual data in the plurality of sample visual data pairs, wherein the first classification feature of the sample visual data is used to characterize the type of the predicted sample visual data; determining a second classification feature of each sample visual data in the plurality of sample visual data pairs based on the labels of each sample visual data in the plurality of sample visual data pairs, wherein the second classification feature of the sample visual data is used to characterize the type of the labeled sample visual data; adjusting the neural network model based on the visual features, first type features, and second type features of each sample visual data in the plurality of sample visual data pairs to obtain the trained feature extraction model; Using the trained feature fusion model to perform feature fusion on the feature data corresponding to the various sensors to obtain feature fusion data; Inputting the feature fusion data into one or more trained prediction models, and having the trained prediction models output prediction results corresponding to the original data; The method of inputting the preprocessed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor, performing feature extraction on the preprocessed data to obtain feature data corresponding to each type of sensor, includes: inputting a transaction pair represented by the preprocessed data into the trained feature extraction model, the transaction pair including a first transaction description and a second transaction description; generating a first unit word sequence vector and a second unit word sequence vector according to the first transaction description, and generating a third unit word sequence vector and a fourth unit word sequence vector according to the second transaction description; generating a first fusion vector according to the first unit word sequence vector and the second unit word sequence vector, and generating a second fusion vector according to the third unit word sequence vector and the fourth unit word sequence vector; and determining the causal feature between the first transaction and the second transaction according to the first fusion vector and the second fusion vector.
2. The prediction method based on multi-source sensor data fusion as claimed in claim 1, characterized in that: The generating a first fusion vector according to the first unit word sequence vector and the second unit word sequence vector includes: generating a feature vector of the first transaction description according to the first unit word sequence vector and the second unit word sequence vector; Get the transaction relationship graph and the edges connecting different transaction descriptions; Determine, according to the transaction relationship graph, a target transaction description connected to the first transaction description through an edge; The feature vector of the first transaction description and the feature vector of the target transaction description are input into a spatiotemporal graph neural network to obtain a first fusion vector of the first transaction description.
3. A prediction device based on multi-source sensor data fusion, characterized in that: The device comprises: A preprocessing module, used to preprocess the raw data from the multi-source sensors respectively to obtain preprocessed data corresponding to each type of sensor; A feature extraction module, used for inputting the preprocessed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor, performing feature extraction on the preprocessed data to obtain feature data corresponding to each type of sensor, the inputting the preprocessed data of each type of sensor into the trained feature extraction model corresponding to each type of sensor, performing feature extraction on the preprocessed data to obtain feature data corresponding to each type of sensor, including: inputting a transaction pair represented by the preprocessed data into the trained feature extraction model, the transaction pair including a first transaction description and a second transaction description; generating a first unit word sequence vector and a second unit word sequence vector according to the first transaction description, and generating a third unit word sequence vector and a fourth unit word sequence vector according to the second transaction description; generating a first fusion vector according to the first unit word sequence vector and the second unit word sequence vector, and generating a second fusion vector according to the third unit word sequence vector and the fourth unit word sequence vector; determining the causal feature between the first transaction and the second transaction according to the first fusion vector and the second fusion vector; The trained feature extraction model is obtained by training the feature extraction model in the following manner: obtaining a plurality of sample visual data pairs and labels of each sample visual data in the plurality of sample visual data pairs, the sample visual data pairs including a pair of sample visual data with similar semantics; obtaining visual features of each sample visual data in the plurality of sample visual data pairs according to a neural network model; determining a first classification feature of each sample visual data in the plurality of sample visual data pairs based on the visual features of each sample visual data in the plurality of sample visual data pairs, the first classification feature of the sample visual data being used to characterize the predicted type of the sample visual data; determining a second classification feature of each sample visual data in the plurality of sample visual data pairs based on the labels of each sample visual data in the plurality of sample visual data pairs, the second classification feature of the sample visual data being used to characterize the type of the labeled sample visual data; adjusting the neural network model based on the visual features, first type features, and second type features of each sample visual data in the plurality of sample visual data pairs to obtain the trained feature extraction model; A fusion module, used for performing feature fusion on the feature data corresponding to the various sensors using a trained feature fusion model to obtain feature fusion data; The prediction module is used to input the feature fusion data into one or more trained prediction models, and the trained prediction models output prediction results corresponding to the original data.
4. A device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 are implemented.
5. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
