Construction method of space-time multi-task prediction large model based on data fusion

A spatiotemporal multi-task prediction model addresses urban traffic forecasting challenges by data fusion and multi-task output, enhancing prediction accuracy and reducing costs in complex urban environments.

CN119203032APending Publication Date: 2024-12-27SOUTHWEST JIAOTONG UNIV
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411284012.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Urban traffic forecasting faces challenges due to the complexity of the urban traffic network, the influence of uncontrollable factors like weather and traffic accidents, and the lack of strong correlations among multi-source, heterogeneous urban traffic data, making it difficult for traditional single-task models to effectively predict traffic conditions.

Method used

A spatiotemporal multi-task prediction model is constructed through data fusion, incorporating a data fusion module, input embedding, spatial encoding, and a large-scale model prediction, with optional features like time series alignment, region fusion, and feature splicing, and utilizing a multi-task output module based on the MMoE multi-gated hybrid expert model.

Benefits of technology

The model enhances multi-task prediction capabilities, reduces computing and deployment costs, and provides rapid responses in urban traffic scenarios by fusing data across time, space, and features, improving prediction accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203032A_ABST
    Figure CN119203032A_ABST
Patent Text Reader

Abstract

The invention relates to a method for constructing a space-time multi-task prediction large model based on data fusion. The method comprises the steps that firstly, a data fusion module is constructed, the data fusion module comprises a time sequence alignment sub-module, a region fusion sub-module and a feature splicing sub-module, and original data sets are fused based on the three dimensions of time, space and features; then, constructing an input embedding module, and extracting time features of the data set while embedding the fused data set into a high-dimensional space; constructing a spatial coding module, and extracting spatial features of the data set; then, a base large model prediction module is constructed, and reasoning prediction is carried out; and finally, designing a multi-task output module, and performing multi-task splitting on a prediction result to obtain a space-time multi-task prediction large model. According to the method, multiple tasks can be predicted at the same time, the multi-task prediction capability of the model is improved, the calculation cost and deployment cost are reduced, and the method has great advantages in an urban traffic comprehensive scene needing quick response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of multi-task urban traffic spatiotemporal prediction, and in particular to a method for constructing a large spatiotemporal multi-task prediction model based on data fusion. Background Art

[0002] As cities continue to develop, urban computing has become a key discipline for sustainable development. As a key area of ​​multimodal urban applications, transportation has provided great convenience for people's travel in terms of public transportation services and traffic recommendations. Urban traffic prediction is an important direction in the field of transportation, and is of great significance to urban planning, traffic management, travel decisions, etc. Accurate traffic prediction can help decision makers make more reasonable decisions and improve the efficiency and accuracy of urban transportation systems. With the help of artificial intelligence technology, traffic conditions can be accurately and quickly predicted to provide effective support for decision-making, which is also a mainstream means of dealing with complex problems.

[0003] However, urban traffic forecasting also faces many challenges. First, the urban traffic network is complex and it is difficult to capture the correlation of traffic information between different regions. Second, urban traffic forecasting is affected by many uncontrollable factors, such as weather and traffic accidents. These uncontrollable factors have brought great difficulties to the prediction of future urban traffic conditions. In addition, urban traffic data is multi-source and heterogeneous. The data required for different prediction tasks such as traffic flow prediction, traffic speed prediction, and ride demand prediction do not have strong correlations, and the shared features of urban traffic data are difficult to extract. The traditional single-task model cannot meet the multi-task prediction of urban traffic at the same time. A more comprehensive and robust multi-task model is needed to meet the comprehensive prediction of urban traffic. Summary of the invention

[0004] Based on this, it is necessary to provide a method for constructing a large spatiotemporal multi-task prediction model based on data fusion that can meet the multi-task prediction needs of urban traffic in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for constructing a spatiotemporal multi-task prediction model based on data fusion. The method comprises:

[0006] Constructing a data fusion module, which includes a time series alignment submodule, a region fusion submodule, and a feature splicing submodule, and fuses the original data set based on three dimensions: time, space, and features;

[0007] Constructing an input embedding module to embed the fused data set into a high-dimensional space while extracting the temporal features of the data set;

[0008] Constructing a spatial encoding module to extract the spatial features of the data set;

[0009] Build a large-scale model prediction module for the base to perform inference prediction;

[0010] Design a multi-task output module, split the prediction results into multiple tasks, and obtain a large spatiotemporal multi-task prediction model.

[0011] Optionally, in one embodiment of the present application, fusing the original data set based on the time dimension includes:

[0012] The time step length of each original dataset is clipped to the shortest time step in the original dataset.

[0013] Optionally, in one embodiment of the present application, fusing the original data set based on the spatial dimension includes:

[0014] The spatial dimension size of each original dataset is expanded to the maximum number of regions in the original dataset.

[0015] Optionally, in one embodiment of the present application, fusing the original data set based on the feature dimension includes:

[0016] The concat operation is used to concatenate the features of the original data set to obtain a fused data set.

[0017] Optionally, in one embodiment of the present application, the input embedding module includes a word vector embedding layer, a position encoding layer, and a time embedding layer.

[0018] Optionally, in one embodiment of the present application, the spatial encoding module includes a position encoding layer and a Transformer encoder.

[0019] Optionally, in one embodiment of the present application, the multi-task output module is built based on the MMoE multi-gated hybrid expert model.

[0020] In a second aspect, the present application also provides a device for constructing a spatiotemporal multi-task prediction large model based on data fusion. The device comprises:

[0021] A data fusion module is used to construct a data fusion module, which includes a time sequence alignment submodule, a region fusion submodule, and a feature splicing submodule, and fuses the original data set based on three dimensions: time, space, and features;

[0022] A time feature extraction module is used to construct an input embedding module to embed the fused data set into a high-dimensional space while extracting the time features of the data set;

[0023] A spatial feature extraction module, used to construct a spatial encoding module to extract the spatial features of the data set;

[0024] The inference prediction module is used to build a large model prediction module for the base and perform inference prediction;

[0025] The multi-task splitting module is used to design a multi-task output module, split the prediction results into multiple tasks, and obtain a large spatiotemporal multi-task prediction model.

[0026] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the methods described in the above embodiments.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in each of the above embodiments are implemented.

[0028] The above-mentioned method for constructing a spatiotemporal multi-task prediction model based on data fusion, first, construct a data fusion module, the data fusion module includes a time series alignment submodule, a regional fusion submodule, and a feature splicing submodule, and fuses the original data set based on the three dimensions of time, space, and features; then, construct an input embedding module, embed the fused data set into a high-dimensional space and extract the time features of the data set; then, construct a spatial encoding module to extract the spatial features of the data set; then, construct a base large model prediction module to perform inference prediction; finally, design a multi-task output module, perform multi-task splitting on the prediction results, and obtain a spatiotemporal multi-task prediction model. In other words, the constructed spatiotemporal multi-task prediction model can fuse multiple data sets, use the base large model for inference prediction, design the MMoE multi-task output module to design the output head, and can predict multiple tasks at the same time, which improves the multi-task prediction capability of the model, reduces the computing cost and deployment cost, and has great advantages in the comprehensive urban traffic scenario that requires rapid response. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 An application environment diagram of a method for constructing a spatiotemporal multi-task prediction large model based on data fusion in one embodiment;

[0030] Figure 2 A schematic flow chart of a method for constructing a spatiotemporal multi-task prediction large model based on data fusion in one embodiment;

[0031] Figure 3 A schematic diagram of a spatiotemporal multi-task prediction large model based on data fusion in one embodiment;

[0032] Figure 4 A schematic diagram of the structure of a GPT2 pre-training model in one embodiment;

[0033] Figure 5 It is a structural block diagram of a device for constructing a spatiotemporal multi-task prediction large model based on data fusion in one embodiment;

[0034] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] The method for constructing a spatiotemporal multi-task prediction model based on data fusion provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0037] In one embodiment, Figure 2 As shown in the figure, a method for constructing a spatiotemporal multi-task prediction model based on data fusion is provided. Figure 1 The server in the example is used to illustrate the following steps:

[0038] S201: Construct a data fusion module, which includes a time alignment submodule, a region fusion submodule, and a feature splicing submodule, and fuses the original data set based on three dimensions: time, space, and features.

[0039] In the embodiment of the present application, first, a data fusion module is constructed, and different fusion processes are designed for the three dimensions of time, space, and features of spatiotemporal data. Specifically, Figure 3As shown in the figure, the data fusion module includes a time series alignment submodule, a region fusion submodule, and a feature splicing submodule. For the time dimension, each data set is cropped by aligning it with the shortest time series; for the spatial dimension, a padding+mask mechanism is used for fusion to expand the spatial dimension size of each data set to be consistent with the maximum number of regions; for the feature dimension, a simple dimension splicing method is used to retain all features to obtain a fused data set. After the above time series alignment, region fusion, and feature splicing operations, the original data set is fused into a data set, which will be sent to subsequent modules as input. Assuming there are N original data sets, the i-th data set is Dataset[i], then the dimension of the data set is After data fusion, the fusion dataset dimension The parameter change formula is as follows:

[0040] T min =min{T 1 ,T 2 ,…,T N}

[0041] D max =max{D 1 ,D 2 ,…,D N}

[0042] Among them, T represents the time dimension, D represents the space dimension, and C represents the feature dimension.

[0043] Specifically, in one embodiment of the present application, fusing the original data set based on the time dimension includes:

[0044] The time step length of the original dataset is trimmed to the shortest time step in the original dataset.

[0045] In one embodiment of the present application, it is assumed that the time step length of the original N data sets is L={L 1 ,L 2 ,…,L N}, where L x is the time step length of the xth data set. Let L a =min{L}, then for N data sets, all their dimensions are cut to L a , the corresponding formula is as follows:

[0046] L i =L a for i∈{1,2,…,N}

[0047] In one embodiment of the present application, fusing the original data set based on the spatial dimension includes:

[0048] The spatial dimension size of the original dataset is expanded to the maximum number of regions in the original dataset.

[0049] In one embodiment of the present application, it is assumed that the spatial dimension of the original N data sets is D={D 1 ,D 2 ,…,D N}, where D x is the number of regions in the xth data set, let D a = max{D}, then for N data sets, all their dimensions are expanded to D a , record the original dataset dimension D as a hyperparameter. Let Mask = [1,1,…,0,0], where the first D x The value of each element is 1, and the value of the remaining elements is 0. During training, the corresponding Mask tensor is generated according to the number of regions in each data set, and multiplied with the corresponding Mask in this dimension to ensure that only the regions corresponding to the data set are calculated during training and updating. The corresponding formula is as follows:

[0050] D i =D a for i∈{1,2,…,N}

[0051] D i =D i ×Mask i for i∈{1,2,…,N}

[0052] Among them, Mask i Represents the mask generated by the i-th data set.

[0053] In one embodiment of the present application, fusing the original data set based on the feature dimension includes:

[0054] The concat operation is used to concatenate the features of the original data set to obtain a fused data set.

[0055] In one embodiment of the present application, the feature dimension fusion formula is as follows:

[0056]

[0057] Among them, C i Represents the number of features of the i-th data set. On this basis, after extracting features based on daily, weekly, monthly, etc. periods, the fused data set can be further expanded in this dimension to achieve the purpose of data enhancement.

[0058] S203: construct an input embedding module to embed the fused data set into a high-dimensional space while extracting the temporal features of the data set.

[0059] In an embodiment of the present application, an input embedding module is constructed to embed the fused data set into a high-dimensional space while extracting the time features contained in the data. Specifically, the data is first upgraded to a hidden layer dimension using a 1*1 convolution kernel, and then additional location information is added to the data through position encoding. Then, the time features of the data at different periods are extracted by setting embedding layers of five scales: minutes, hours, days, weeks, and months. Through the input embedding module, while the model is upgraded, the time period features contained in the original data are also integrated into the data. Suppose the input fused data is X′, then after the input embedding module, the output becomes H, and the corresponding formula is as follows:

[0060] H = InputEmbdding(X′)

[0061] where X′∈R T′×N′×C′ ,H∈R T′×N′×E

[0062] Among them, T′, N′ correspond to the time dimension and space dimension, which do not change after embedding; C′ is the feature dimension; and E is the dimension size after embedding.

[0063] Specifically, in one embodiment of the present application, the input embedding module includes a word vector embedding layer, a position encoding layer, and a time embedding layer.

[0064] In one embodiment of the present application, Figure 3As shown in the figure, the input embedding module includes the token embedding layer, the positional embedding layer, and the temporal embedding layer. The token embedding layer uses a one-dimensional convolution with a convolution kernel size of 1*1 to transform the dimension and upgrade the original data set to the hidden layer dimension. Assuming that the dimension of the input sequence with an original length of N is (N, 1), after passing through the token embedding layer, the dimension of this sequence will be mapped to (N, E, 1), where E is the dimension size of each element embedded. The positional encoding positional embedding layer is the same as the positional encoding in the Transformer. Unlike the recurrent neural network RNN, which reads the input sequence in order, the Transformer uses the attention mechanism to extract the semantic information between the input sequences, which causes the model to directly focus on the global features and cannot capture the temporal relationship between different elements in the input sequence. Therefore, it is necessary to add additional position information to the data as a feature supplement so that the model can capture the temporal information of spatiotemporal data. The temporal embedding layer is an important structure of the input embedding model. Whether it is time series data or spatiotemporal data, the time features are important factors that affect the final feature value of the data. By capturing the long-term and short-term time information in the original data, the periodic features of the data are obtained, so that the model can have a better fitting effect on the data. Specifically, this layer sets up five embedding layers of minutes, hours, days, weeks, and months to capture the periodic features in the input data with different period ranges, integrate the periodic features into the original data, and thus extract the time features of the original data.

[0065] S205: construct a spatial encoding module to extract the spatial features of the data set.

[0066] In the embodiment of the present application, a spatial encoding module is constructed based on the Transformer Encoder structure to extract spatial features. Spatial correlation is the most significant feature that distinguishes spatiotemporal data from time series data. The effectiveness of spatial feature extraction will directly affect the final prediction effect of the model.

[0067] Specifically, in one embodiment of the present application, the spatial encoding module includes a position encoding layer and a Transformer encoder.

[0068] In one embodiment of the present application, Figure 3As shown in the figure, the spatial encoding module consists of a positional encoding Positional Embedding layer and N stacked Transformer encoders. The positional encoding Positional Embedding layer is the same as the positional encoding in the Transformer. Considering that positional encoding is usually used to capture the temporal relationship of data, that is, the sequence, this sequence can be understood as a spatial correlation. In the spatial dimension, the various regions happen to have spatial correlation, so the use of positional encoding can well capture this spatial correlation. Then, the positionally encoded data is sent to the stacked Transformer encoder to extract the features of the data at a deeper level. The input of the spatial encoding module is H, and the output is H′, and the dimension remains unchanged:

[0069] H′=SpatialEncoding(H)

[0070] where H∈B×R T′×N′×E ,H′∈B×R T′×N′×E

[0071] After the input embedding module and the spatial encoding module, the temporal and spatial features of the data are fully learned, and the output will be used as the input of the subsequent base large model prediction module.

[0072] S207: Construct a large base model prediction module to perform inference prediction.

[0073] In the embodiment of the present application, a large model prediction module of the base is constructed, and the GPT2 pre-trained model is used for inference prediction. At the same time, a partial frozen attention mechanism is used to fine-tune the pre-trained model. The large model prediction module of the base is mainly a 12-layer Figure 4 The GPT2 pre-trained model with the structure shown is a large GPT2 base model that only retains the core part. The specific internal structure is as follows Figure 3 As shown in the figure, it includes: a Masked Multi-Head Attention layer and a normalized Layer Norm layer constitute the first part, and use residual connection. A forward Feed Farward layer and a normalized Layer Norm layer constitute the second part, also using residual connection. Then connect a Transformer structure. Different from the Transformer Decoder, this Decoder removes a multi-head attention layer and an Add&LayerNorm layer.

[0074] During training, the large base model is fine-tuned in a supervised manner by partially freezing the attention, that is, only the Add&Layer Norm layer is updated and the Multi-Head Attention layer and the Feed Forward layer are frozen. Assuming that the input of the large base model prediction module is H′, it is necessary to first perform a deformation operation to obtain the intermediate variable H″, and then send it to the large model for training to obtain the output O. The formula is as follows:

[0075] H″=Reshape(H′)

[0076] O = PretrainedLLM(H″)

[0077] where H′∈R T′×N′×E ,H″∈R T′×I ,O∈R T′×I′

[0078] Among them, I = N′×E, which is used to transform the data into a dimension that can be read by the large model; I′ is the embedding dimension size output by the large model.

[0079] S209: Design a multi-task output module, split the prediction results into multiple tasks, and obtain a spatiotemporal multi-task prediction model.

[0080] In the embodiment of the present application, a multi-task output module is designed to split the prediction results into multiple tasks. By training multiple expert models, the input is the output of the base large model prediction module, and the output is targetedly trained according to different prediction tasks to improve the prediction accuracy of a single task.

[0081] Specifically, in one embodiment of the present application, the multi-task output module is built based on the MMoE multi-gated hybrid expert model.

[0082] In one embodiment of the present application, a multi-task output module is built based on the MMoE multi-gated hybrid expert model. The prototype of the single-gated hybrid expert model can be expressed by the following formula:

[0083]

[0084] Among them, f i (x) represents the output value of the i-th expert model; g(x) i represents the weight assigned by the gate to the i-th expert model, indicating the proportion of the prediction results of the i-th expert model in the prediction task. Function g will output a weight distribution, which assigns a weight value to each expert model, satisfying This formula means that the final output of MoE is the sum of the weighted outputs of all expert models under a single gate control, and the underlying layer is still the shared network f.

[0085] The single-gated mixed expert model can only solve a single prediction task. For multi-task scenarios, some improvements need to be made to the model. The key idea is to replace the shared network f with the MoE layer and design an independent gating network g for each task k. k , the design is a multi-gated hybrid expert model. The detailed formula is as follows:

[0086]

[0087] y k =h k (f k (x))

[0088] Among them, the gated network g k (·) The multi-layer perceptron is activated by the ReLU activation function, and the weight output of the corresponding task is obtained after activation by the Softmax layer:

[0089] g k (x) = Softmax(W gk x)

[0090] Among them, W gk ∈R n×d is a trainable matrix; n represents the number of expert models; d represents the feature dimension. h(·) represents the output value of different Towers.

[0091] The input of this module is the output O of the base model prediction module. It is necessary to first perform linear mapping on the output to obtain Y, and then perform deformation operation to obtain the intermediate variable Y 0 , Y 0 After feeding into the MMoE multi-task output, each output Y that meets the output dimension is obtained i , the specific formula is as follows:

[0092] Y=LinearLayer(O)

[0093] Y 0 =Reshape(Y)

[0094] Y i =MMoE(Y 0 )for i∈{1,2,…,N}

[0095]

[0096] In the above-mentioned method for constructing a spatiotemporal multi-task prediction model based on data fusion, first, a data fusion module is constructed, and the data fusion module includes a time series alignment submodule, a regional fusion submodule, and a feature splicing submodule, and the original data set is fused based on the three dimensions of time, space, and features; then, an input embedding module is constructed to embed the fused data set into a high-dimensional space while extracting the time features of the data set; then, a spatial encoding module is constructed to extract the spatial features of the data set; then, a base large model prediction module is constructed to perform inference prediction; finally, a multi-task output module is designed to perform multi-task splitting on the prediction results to obtain a spatiotemporal multi-task prediction model. In other words, the constructed spatiotemporal multi-task prediction model can fuse multiple data sets, and use the base large model for inference prediction at the same time, design the MMoE multi-task output module to design the output head, and can predict multiple tasks at the same time, which improves the multi-task prediction capability of the model, reduces the computing cost and deployment cost, and has great advantages in the comprehensive urban traffic scenario that requires rapid response.

[0097] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0098] Based on the same inventive concept, the embodiment of the present application also provides a device for constructing a large spatiotemporal multi-task prediction model based on data fusion for realizing the method for constructing a large spatiotemporal multi-task prediction model based on data fusion mentioned above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the device for constructing a large spatiotemporal multi-task prediction model based on data fusion provided below can be referred to the limitations of the method for constructing a large spatiotemporal multi-task prediction model based on data fusion above, and will not be repeated here.

[0099] In one embodiment, Figure 5As shown, a device 500 for constructing a spatiotemporal multi-task prediction large model based on data fusion is provided, comprising: a data fusion module 501, a time feature extraction module 503, a spatial feature extraction module 505, an inference prediction module 507 and a multi-task splitting module 509, wherein:

[0100] The data fusion module 501 is used to construct a data fusion module, which includes a time alignment submodule, a region fusion submodule, and a feature splicing submodule, and fuses the original data set based on three dimensions: time, space, and features.

[0101] The time feature extraction module 503 is used to construct an input embedding module to embed the fused data set into a high-dimensional space and extract the time features of the data set.

[0102] The spatial feature extraction module 505 is used to construct a spatial encoding module to extract the spatial features of the data set.

[0103] The inference prediction module 507 is used to construct a base large model prediction module to perform inference prediction.

[0104] The multi-task splitting module 509 is used to design a multi-task output module, split the prediction results into multiple tasks, and obtain a spatiotemporal multi-task prediction large model.

[0105] In one embodiment of the present application, the data fusion module is further used to:

[0106] The time step length of the original dataset is trimmed to the shortest time step in the original dataset.

[0107] In one embodiment of the present application, the data fusion module is further used to:

[0108] The spatial dimension size of the original dataset is expanded to the maximum number of regions in the original dataset.

[0109] In one embodiment of the present application, the data fusion module is further used to:

[0110] The concat operation is used to concatenate the features of the original data set to obtain a fused data set.

[0111] In one embodiment of the present application, the input embedding module includes a word vector embedding layer, a position encoding layer, and a time embedding layer.

[0112] In one embodiment of the present application, the spatial encoding module includes a position encoding layer and a Transformer encoder.

[0113] In one embodiment of the present application, the multi-task output module is built based on the MMoE multi-gated hybrid expert model.

[0114] Each module in the device for constructing a spatiotemporal multi-task prediction large model based on data fusion can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0115] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for constructing a spatiotemporal multi-task prediction large model based on data fusion is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0116] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0117] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0118] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0119] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0120] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0121] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0122] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for constructing a spatiotemporal multi-task prediction model based on data fusion, characterized in that: The method comprises: Constructing a data fusion module, which includes a time series alignment submodule, a region fusion submodule, and a feature splicing submodule, and fuses the original data set based on three dimensions: time, space, and features; Constructing an input embedding module to embed the fused data set into a high-dimensional space while extracting the temporal features of the data set; Constructing a spatial encoding module to extract the spatial features of the data set; Build a large-scale model prediction module for the base to perform inference prediction; Design a multi-task output module, split the prediction results into multiple tasks, and obtain a large spatiotemporal multi-task prediction model.

2. The method for constructing a spatiotemporal multi-task prediction model based on data fusion according to claim 1, characterized in that: The fusing of the original data set based on the time dimension includes: The time step length of each original dataset is clipped to the shortest time step in the original dataset.

3. The method for constructing a spatiotemporal multi-task prediction large model based on data fusion according to claim 1, characterized in that: The fusing of the original data set based on the spatial dimension includes: The spatial dimension size of each original dataset is expanded to the maximum number of regions in the original dataset.

4. The method for constructing a spatiotemporal multi-task prediction model based on data fusion according to claim 1, characterized in that: The fusing of the original data set based on the feature dimension includes: The concat operation is used to concatenate the features of the original data set to obtain the final fused data set.

5. The method for constructing a spatiotemporal multi-task prediction large model based on data fusion according to claim 1, characterized in that: The input embedding module includes a word vector embedding layer, a position encoding layer, and a time embedding layer.

6. The method for constructing a spatiotemporal multi-task prediction large model based on data fusion according to claim 1, characterized in that: The spatial encoding module includes a position encoding layer and a Transformer encoder.

7. The method for constructing a spatiotemporal multi-task prediction model based on data fusion according to claim 1, characterized in that: The multi-task output module is built based on the MMoE multi-gated hybrid expert model.

8. A device for constructing a spatiotemporal multi-task prediction large model based on data fusion, characterized in that: The device comprises: A data fusion module is used to construct a data fusion module, which includes a time sequence alignment submodule, a region fusion submodule, and a feature splicing submodule, and fuses the original data set based on three dimensions: time, space, and features; A time feature extraction module is used to construct an input embedding module to embed the fused data set into a high-dimensional space while extracting the time features of the data set; A spatial feature extraction module, used to construct a spatial encoding module to extract the spatial features of the data set; The inference prediction module is used to build a large model prediction module for the base and perform inference prediction; The multi-task splitting module is used to design a multi-task output module, split the prediction results into multiple tasks, and obtain a large spatiotemporal multi-task prediction model.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, 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 7 are implemented.

Citation Information

Cited By

  • Intelligent load balancing method based on zero sample hybrid expert model

    CN119225983A

  • Battery replacement recommendation method and system based on multi-target deep learning

    CN119397107A

  • Practice method of data elements in urban governance field

    CN119475288A

  • A method for applying data elements in the field of urban governance

    CN119475288B

  • Community multi-task prediction method based on spatial-temporal characteristics and related equipment

    CN121502666A