A data processing method, device and computer readable storage medium

By obtaining the associated feature set of time data sequences and applying a multi-weighted self-attention mechanism, combining global and local attention information, the problem of incomplete extraction of time data sequence features in the existing technology is solved, and the accuracy of the prediction model is improved and efficiency.

CN114358186BActive Publication Date: 2024-12-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210004186.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-04
Publication Date
2024-12-27
Estimated Expiration
2042-01-04

AI Technical Summary

Technical Problem

When processing time data sequences, it is difficult for the prior art to extract multi-dimensional features comprehensively and accurately, resulting in low prediction accuracy of model and inability to make full use of global and local information.

Method used

By obtaining the associated feature set of the target time data sequence, the subset of feature is processed based on the multi-weighted self-attention mechanism, and data prediction is carried out in combination with global and local attention information to improve the prediction accuracy of the model.

Benefits of technology

The characterization information of time data sequences is comprehensively and accurately extracted in multiple dimensions of time and different sequence characteristics, which improves the accuracy of prediction results of prediction models and improves the accuracy and fitting efficiency of data prediction models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114358186B_ABST
    Figure CN114358186B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data processing method, device and computer-readable storage medium. The method includes: obtaining a set of associated features of a target time data sequence, the associated feature set is determined based on the correlation between the target time data sequence and each time data sequence in at least one time data sequence; obtaining a first associated feature subset from the associated feature set based on a first time and a preset time window; processing the first associated feature subset based on a multi-weighted self-attention mechanism of a data prediction model to obtain feature representation data of the target time data sequence at the first time; calling the data prediction model to predict the feature representation data of the target time data sequence at the first time to obtain predicted data at the second time. By adopting the present application, the representation information of the time data sequence can be comprehensively and accurately extracted in multiple dimensions of time and different sequence features, thereby improving the accuracy of the prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data processing method, device and computer-readable storage medium. Background Art

[0002] At present, the initial model can be trained through a multivariate time data set to obtain a model with certain functions (such as a model with prediction function). However, for a large number of time data sequences in the time data set, the time data sequences that are valid for the current time data sequence are usually manually screened to determine the input data of the initial model. Determining the input data of the initial model in the above manner may miss the time data sequences that are valid for the current time data sequence, and the model cannot fully and accurately learn the deep connection between the features of different dimensions, which makes the prediction accuracy of the trained model low. Summary of the invention

[0003] The embodiments of the present application provide a data processing method, device and computer-readable storage medium, which can comprehensively and accurately extract representation information of time data series in multiple dimensions of time and different sequence characteristics, thereby improving the accuracy of the prediction results of the prediction model.

[0004] On the one hand, an embodiment of the present application provides a data processing method, including:

[0005] Obtaining a set of associated features of a target time data sequence, where the set of associated features is determined based on a correlation between the target time data sequence and each time data sequence in at least one time data sequence, where the target time data sequence is any one of the at least one time data sequence;

[0006] Acquire a first associated feature subset from the associated feature set based on the first time and a preset time window;

[0007] The first associated feature subset is processed based on the multi-weighted self-attention mechanism of the data prediction model to obtain feature representation data of the target time data sequence at the first time;

[0008] The data prediction model is called to perform prediction processing on the feature representation data of the target time data sequence at the first time to obtain the predicted data at the second time.

[0009] An embodiment of the present application provides a data processing device, including:

[0010] an acquisition module, used for acquiring a set of associated features of a target time data sequence, wherein the set of associated features is determined according to a correlation between the target time data sequence and each time data sequence in at least one time data sequence, wherein the target time data sequence is any one of the at least one time data sequence;

[0011] The acquisition module is further configured to acquire a first associated feature subset from the associated feature set based on the first time and the preset time window;

[0012] A processing module, used for processing the first associated feature subset based on a multi-weighted self-attention mechanism of a data prediction model to obtain feature representation data of a target time data sequence at a first time;

[0013] The above-mentioned processing module is also used to call the data prediction model to perform prediction processing on the feature representation data of the target time data sequence at the first time to obtain the predicted data at the second time.

[0014] On the one hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the data processing method provided by the embodiment of the present application.

[0015] On the one hand, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the data processing method provided by the embodiment of the present application is executed.

[0016] On the one hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. When the computer instructions are executed by a processor of a computer device, the data processing method provided by the embodiment of the present application is executed.

[0017] In an embodiment of the present application, a data processing device can obtain a set of associated features determined according to the correlation between a target time data series and each time data series in at least one time data series, so as to obtain the global features learned during the model training process; and obtain a first associated feature subset from the associated feature set based on the first time and a preset time window; process the first associated feature subset based on a multi-weighted self-attention mechanism of a data prediction model to obtain feature representation data of the target time data series at the first time, so as to obtain the features of the internal time dimension of the time data series, and the comprehensive attention through the local attention of the time data series and the global attention interaction between each time data series; call the data prediction model to perform prediction processing on the feature representation data of the target time data series at the first time, and obtain prediction data for the second time, so as to comprehensively and accurately extract the representation information of the time data series in multiple dimensions of time and different sequence features, so as to improve the accuracy of the prediction results of the prediction model, and make full use of the acquired global information and local information, so that the data prediction model can effectively identify the determinants of the prediction value, thereby improving the accuracy of the data prediction model and the information utilization rate of each time data series, thereby improving the fitting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] 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.

[0019] Figure 1 A data processing system provided by an embodiment of the present application;

[0020] Figure 2 It is a flowchart of a data processing method provided in an embodiment of the present application;

[0021] Figure 3 is a schematic diagram of a first associated feature subset provided in an embodiment of the present application;

[0022] Figure 4 is a schematic diagram of another first associated feature subset provided in an embodiment of the present application;

[0023] Figure 5 It is a flowchart of another data processing method provided in an embodiment of the present application;

[0024] Figure 6 It is a schematic diagram of the prediction effect of a target time data sequence provided by an embodiment of the present application;

[0025] Figure 7 It is a flowchart of another data processing method provided in an embodiment of the present application;

[0026] Figure 8 This is a schematic diagram of a flow chart of calculating relevance evaluation information provided by an embodiment of the present application;

[0027] Fig. 9 It is a schematic diagram of a process for determining a set of associated features provided in an embodiment of the present application;

[0028] Fig.10 is a visualization diagram of relevance evaluation information provided by an embodiment of the present application;

[0029] Fig.11 is a schematic diagram of a second associated feature subset provided in an embodiment of the present application;

[0030] Fig.12 It is a flowchart of a multiple self-attention mechanism provided in an embodiment of the present application;

[0031] Fig.13 It is a visualization diagram of a multiple self-attention matrix provided in an embodiment of the present application;

[0032] Fig.14 It is a flowchart of another data processing method provided in an embodiment of the present application;

[0033] Fig.15 It is a schematic diagram of the training effect of an initial model provided in an embodiment of the present application;

[0034] Fig.16 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0035] Fig.17 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] 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.

[0037] The embodiment of the present application provides a data processing method that can effectively combine global data and interactive information of local features to make the performance of the data prediction model more stable. The data processing method provided in the embodiment of the present application can be implemented based on one or more technologies in artificial intelligence technology.

[0038] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0039] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0040] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0041] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0042] In a feasible embodiment, the data processing method provided in the embodiment of the present application can also be implemented based on cloud technology. Specifically, it can involve one or more of cloud storage and cloud database in cloud technology. For example, the associated feature set of the target time data sequence is obtained from the cloud database, or the predicted data of the second time obtained by calling the data prediction model is stored through cloud storage.

[0043] See also Figure 1 , Figure 1 A data processing system is provided in an embodiment of the present application. Figure 1 The data processing device 10 shown may be a server with data processing capabilities; the data processing device 10 may be used to train an initial model, and to call a data prediction model to perform prediction processing on feature representation data of a target time data sequence at a first time. Figure 1 The terminal device 11 shown may have a visualization display function; the terminal device 11 may be used to visualize the various intermediate data, prediction results, etc. generated during the data processing process of the data processing device 10. Optionally, the task of training the initial model may also be completed by the terminal device 11, and this application does not limit this. Among them, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance, a car terminal, etc., but is not limited to this.

[0044] The data processing method provided in the embodiment of the present application can be executed by the data processing device 10, specifically: obtaining a set of associated features of the target time data sequence, and obtaining a first associated feature subset from the above associated feature set based on the first time and the preset time window, processing the first associated feature subset based on the multi-weighted self-attention mechanism of the data prediction model, obtaining the feature representation data of the target time data sequence at the first time, calling the data prediction model to predict the feature representation data of the target time data sequence at the first time, thereby obtaining the predicted data at the second time, and then effectively combining the global data and the interactive information of the local features (i.e., the feature representation data at the first time), to complete the prediction of the data corresponding to the second time. Wherein, the above data prediction model is obtained by training the initial model based on the second associated feature subset of the associated feature set and the multi-weighted self-attention mechanism. Specifically, the training process of the initial model can be executed by the data processing device 10: after obtaining the associated feature set of the target time data sequence, a second associated feature subset can be obtained from the associated feature set based on the third time and the preset time window; and the second associated feature subset is processed based on the multi-weighted self-attention mechanism of the initial model to obtain the feature representation data of the target time data sequence at the third time; and the initial model is trained using the feature representation data of the target time data sequence at the third time, and the corresponding reference data in the target time data sequence (such as the reference data corresponding to the fourth time in the target time data sequence, and the fourth time can be a certain time to be predicted predicted by the feature representation data of the target time data sequence at the third time), so that after multiple training processes, the initial model can have the function of data prediction, and then the above-mentioned data prediction model is obtained to call the data prediction model to predict the data at the second time.

[0045] See also Figure 2 , Figure 2 is a flow chart of a data processing method provided in an embodiment of the present application. The method can be Figure 1 The data processing device shown is executed, and specifically can be executed by a processor of the data processing device. The data processing method comprises the following steps:

[0046] S201, obtaining an associated feature set of a target time data sequence, where the associated feature set is determined based on a correlation between the target time data sequence and each time data sequence in at least one time data sequence, and the target time data sequence is any one of the at least one time data sequence.

[0047] In the embodiment of the present application, the data processing device can call the data prediction model to implement various functions, for example: the data processing device can call the data prediction model to implement the prediction function, or implement the classification function based on the prediction result obtained by calling the data prediction model, etc. When processing the target data, the data processing device can determine the target time data sequence according to the prediction function to be implemented, and obtain relevant information about the target time data sequence from the original data set (i.e., the at least one time data sequence mentioned above) (such as a set of other time data sequences with high correlation, i.e., the above-mentioned associated feature set), so that when predicting the data of the prediction time (such as the second time below) through the data prediction model, the global features can be combined to obtain more accurate prediction data.

[0048] The above-mentioned time data sequence can be a data sequence related to time, for example: a data sequence recording the rainfall of a city at different time points on a certain day, a data sequence recording the net profit of a company in different quarters of a certain year, a data sequence recording the number of people suffering from colds every day in a certain hospital in a certain month, etc. This application does not limit the specific content of the time data sequence. It should be noted that the time corresponding to the above-mentioned time data sequence can be a time point (such as 5 pm) or a time period (such as a month), and this application does not limit this.

[0049] Optionally, the target time data sequence can be one or more, and this application does not limit this. Optionally, if there are multiple target time data sequences, the associated feature set of each target time data sequence can be obtained respectively, and the following steps are performed on each associated feature set respectively, and this application will not repeat them here.

[0050] The above-mentioned associated feature set may include a time data sequence with a high correlation with the target time data sequence. Each time data sequence in the associated feature set may be any time data sequence in the above-mentioned original data set. It should be noted that, since the correlation between the target time data sequence and itself can be the highest value, the above-mentioned time data sequences with a high correlation with the target time data sequence may include the target time data sequence itself.

[0051] For example, in a medical scenario, assuming that the above data processing device needs to realize the function of predicting the number of patients visiting the dental department next week, the data processing device can determine the time data series of the number of patients visiting the dental department as the target time data series, and obtain other time data series with a high correlation with the time data series of the number of patients visiting the dental department from the original data set, such as: the time data series of the total number of patients visiting the hospital, the time data series of the local weather, etc., as the associated feature set of the target time data series. As shown in Table 1, Table 1 can be the associated feature set of the time data series of the number of patients visiting the dental department.

[0052] Table 1

[0053]

[0054] Among them, the first column in Table 1 is the time data corresponding to each time data series, the second column is the number data corresponding to the time data series of the number of patients visiting the dental department, the third column is the number data corresponding to the time data series of the total number of patients visiting the hospital, and the fourth column is the weather data corresponding to the time data series of the local weather.

[0055] It should be noted that the data processing device can obtain other time data sequences with a high correlation with the target time data sequence from the original data set through the method implemented by the combined importance extraction module involved in the following embodiments (such as the correlation evaluation method mentioned below). For specific details, please refer to the detailed description below, and this application will not go into details here.

[0056] S202: Acquire a first associated feature subset from an associated feature set based on the first time and a preset time window.

[0057] Among them, the above-mentioned first time can be the time that is closest to the time to be predicted (i.e., the second time mentioned below) and satisfies the preset time window length. Optionally, the length of the above-mentioned preset time window can be a fixed length (such as a pre-set fixed length) or an adjustable length (such as a length adjusted during the model training process), and this application does not limit this. Optionally, the step size of the preset time window can be a fixed value or an adjustable value, and this application does not limit this.

[0058] After obtaining the time to be predicted, the data processing device can determine the first time based on the time to be predicted and the duration of the preset time window, and intercept the associated feature set of the target time data sequence according to the first time and the preset time window. In other words, the associated feature set is intercepted with the first time as the start time of the preset time window, so as to obtain the first associated feature subset.

[0059] For example, Figure 3As shown in the figure, assuming that the preset time window duration is 3 days and the step length is 1 day per step, if the data processing device needs to predict the total number of hospital patients on the 5th day, that is, the target time data series is the total number of hospital patients time data series ( Figure 3 (denoted by S1 in the figure), then according to the 5th day and the duration of the time window, the 2nd day can be determined as the above-mentioned first time, and based on the first time and the pre-set time window, a first associated feature subset can be obtained from the associated feature set; that is, taking the 2nd day as the starting time of the time window, from the associated feature set of the time data series of the total number of hospital visitors, the data from the 2nd day to the 4th day is intercepted as the above-mentioned first associated feature subset.

[0060] Optionally, after determining the first time based on the time to be predicted, if there is an unpredicted time in the first associated feature subset intercepted by the data processing device with the first time as the starting time of the time window, the unpredicted time can be used as the first time to be predicted, so as to predict the data of the first time to be predicted and then predict the data of the time to be predicted.

[0061] For example, Figure 4 As shown, assuming that the preset time window is 3 days long and the step length is 1 day long per step, if the data processing device needs to predict the total number of hospital patients on the 6th day, the 3rd day can be determined as the first time according to the time window length, and the first associated feature subset can be obtained from the associated feature set based on the first time and the preset time window. Figure 4 As shown, in the first associated feature subset, the 5th day is an unpredicted time, so the 5th day can be used as the first time to be predicted, so that the data of the 5th day is predicted first, and then the data of the 6th day is predicted based on the predicted data of the 5th day.

[0062] Optionally, the first time to be predicted may include at least one unpredicted time, and the data processing device may predict the data of the at least one unpredicted time in turn, and then predict the data of the time to be predicted that needs to be predicted based on the at least one predicted data. Figure 4 Under the premise of the corresponding example, if the data processing device needs to predict the total number of hospital patients on the 10th day, it can process the data from the 5th to the 9th day in turn, and after obtaining the predicted data from the 5th to the 9th day, use the data from the 7th to the 9th day as the first associated feature subset mentioned above to predict the total number of hospital patients on the 10th day.

[0063] It should be noted that when the data processing device predicts the data from the 5th to the 9th day, it can predict and update each time data series in the associated feature set, so as to predict the data of the time to be predicted (i.e. the 10th day mentioned above) according to the updated associated feature set. Through the above update method, after the data processing device predicts and updates a part of the data, it can quickly obtain the updated associated feature set, so as to quickly predict the data of the time to be predicted.

[0064] Optionally, the data processing device can also predict and update at least one time data series in the original data set, so as to determine an updated set of associated features from at least one updated time data series, and then predict the data at the prediction time based on the updated set of associated features. It should be noted that by predicting and updating at least one time data series in the original data set, the global features of the original data set can be evaluated again to predict the data at the prediction time from a global perspective. Optionally, the data processing device can set different prediction update methods according to different needs, and this application does not limit this.

[0065] S203, processing the first associated feature subset based on the multi-weighted self-attention mechanism of the data prediction model to obtain feature representation data of the target time data sequence at the first time.

[0066] The data prediction model is obtained by training the initial model based on the second associated feature subset of the associated feature set and the multi-weighted self-attention mechanism. The second associated feature subset can be the data used when training the initial model. For a detailed description of the second associated feature subset, see Figure 7 The relevant contents in the corresponding embodiments will not be repeated in this application.

[0067] It should be noted that the feature representation data of the target time data sequence at the first time can be the feature representation data that integrates the global features, local features and comprehensive features of the target time data sequence and is closest to the time to be predicted. Among them, the feature representation data of the target time data sequence at the first time can be represented in the form of a vector or a matrix, and this application does not limit this.

[0068] The above-mentioned multi-weighted self-attention mechanism can be a self-attention function module (such as a multi-weighted self-attention module) in the data prediction model, and this application does not limit this. Figure 5 As shown, the first subset of associated features is passed through the self-attention function module of the data prediction model ( Figure 5After the multi-weighted self-attention mechanism, the feature representation data of the target time data sequence at the first time can be obtained. It can be understood that, if Figure 5 As shown, the feature representation data of the target time data sequence at the first time can be used as the output of the self-attention function module or as the input of the data prediction model, and this application does not impose any restrictions on this.

[0069] It should be noted that Figure 2 The relevant contents of S202 and S203 in the corresponding embodiment are the same as those below. Figure 7 The relevant contents of obtaining the second associated feature subset and obtaining the feature representation data of the target time data sequence at the third time involved in the corresponding embodiment can be understood as the same execution steps in different data processing processes. Figure 2 In the corresponding embodiment, the feature representation data of the target time data sequence obtained at the first time is used to predict the data at the second time; Figure 3 In the corresponding embodiment, the feature representation data of the target time data sequence obtained at the third time is used to train the initial model. Therefore, it is still necessary to distinguish the feature representation data in the above two different processes.

[0070] S204, calling the data prediction model to perform prediction processing on the feature representation data of the target time data sequence at the first time to obtain predicted data at the second time.

[0071] After the data processing device obtains the feature representation data of the above-mentioned target time data sequence at the first time, it can call the data prediction model to process the feature representation data, so as to predict the data at the second time (i.e., the time to be predicted) through the data prediction model, thereby obtaining the predicted data at the second time.

[0072] As can be seen from the above content, if there are multiple target time data sequences, the data prediction model can be called to process the feature representation data of multiple target time data sequences at the first time respectively, so as to obtain the prediction data of multiple target time data sequences at the second time. For example, Figure 6 As shown, Figure 6 The prediction effect diagram corresponding to three target time data sequences (ie, target time data sequence 1, target time data sequence 2, and target time data sequence 3) is shown.

[0073] The data processing method provided in the embodiment of the present application can not only be used to predict the number of infectious disease cases, syndrome prediction, disease prevention and control index prediction, and medical insurance population structure prediction, but can also be used for prediction problems of time data series in other fields such as medical care, finance, and manufacturing. The data processing method can effectively solve practical problems such as traditional methods are difficult to process multi-dimensional time data series, cannot fully utilize multi-dimensional time series information, have difficulty in variable screening, have poor model training and fitting effects, and consume a lot of manpower and computing power, and can efficiently support decision-making teams in understanding and predicting the data of the target time data series.

[0074] In an embodiment of the present application, the data processing device can obtain a first associated feature subset from the associated feature set based on the first time and a preset time window by obtaining a set of associated features of the target time data series, and process the first associated feature subset based on the multi-weighted self-attention mechanism of the data prediction model to obtain the feature representation data of the target time data series at the first time, and call the above-mentioned data prediction model to perform predictive processing on the feature representation data of the target time data series at the first time to obtain predicted data at the second time, so that the data processing device can obtain more stable and reliable prediction data based on the time dimension of the target time data series and different feature dimensions (global features, local features and comprehensive features).

[0075] Figure 7 is a flow chart of a data processing method provided in an embodiment of the present application. The method can be Figure 1 The data processing device shown is executed, and specifically can be executed by a processor of the data processing device. The data processing method comprises the following steps:

[0076] S701, obtaining an associated feature set of a target time data sequence, where the associated feature set is determined based on a correlation between the target time data sequence and each time data sequence in at least one time data sequence, and the target time data sequence is any one of the at least one time data sequence.

[0077] In the embodiment of the present application, the data processing device can obtain the associated feature set of the target time data sequence when training the initial model. It is understandable that the time for training the initial model can be earlier than the time for calling the data prediction model for prediction; therefore, in the embodiment of the present application, the time for S701 to obtain the associated feature set of the target time data sequence can be earlier than Figure 2 In the corresponding embodiment, S201 obtains the time of the target time data sequence.

[0078] Optional, Figure 2The target time data sequence obtained by S201 in the corresponding embodiment can be the associated feature set of the target time data sequence obtained by S701 in the embodiment of the present application, that is, the associated feature set used in the application process of the data prediction model can be the associated feature set obtained in the initial model training process.

[0079] It should be noted that the relevant contents of the above S701 can be found in the above Figure 2 The detailed description of S201 in the corresponding embodiment is not repeated here in this application.

[0080] In one implementation, a data processing device may acquire at least one time data sequence; acquire at least one correlation between any two time data sequences in the at least one time data sequence based on at least one correlation evaluation method; determine correlation evaluation information of the at least one time data sequence based on at least one correlation between any two time data sequences; and determine a set of associated features of a target time data sequence based on the correlation evaluation information.

[0081] The data processing device may obtain the at least one time data sequence by grouping the original data set. Optionally, it may also be understood that the original data set includes the at least one time data sequence. That is, before training the initial model, the data processing device may acquire the original data set to train the initial model based on the at least one time data sequence included in the original data set.

[0082] The above correlation evaluation method may be a method for calculating the correlation between any two time data sequences in the above at least one time data sequence. Optionally, the above correlation evaluation method may include one or more correlation evaluation methods. It is understandable that the above one or more correlation evaluation methods may correspond to one or more correlations, that is, one correlation evaluation method may calculate one correlation, and multiple correlation evaluation methods may calculate multiple correlations.

[0083] If there are multiple correlation evaluation methods mentioned above, the data processing device can use each of the multiple correlation evaluation methods to calculate at least one correlation between any two time data sequences in the original data set, so as to determine the correlation evaluation information corresponding to each correlation evaluation method, thereby performing weighted sum operation on the multiple correlation evaluation information corresponding to the multiple correlation evaluation methods to obtain the above correlation evaluation information.

[0084] In an embodiment of the present application, by combining the importance extraction architecture (i.e., the processing method of weighted summation of the above-mentioned multiple correlation evaluation information), the original data set can be processed into a series of time data series groupings, and the correlation evaluation information between the target time data series and other time data series can be calculated, so as to filter out the input set (i.e., the above-mentioned associated feature set) for establishing the data prediction model corresponding to the target time data series through the correlation evaluation information.

[0085] For example, Figure 8 As shown, Figure 8 The original data set S = (s1, s2, ..., s n ) T , any time data series s in the original data set i =(x i1 , x i2 , ..., x iT ) T , where n is the number of time series features, x ij is the jth element in the i-th time data sequence, and T is the total length of the time sequence. Correlation evaluation method o=(o1, o2, ..., o p ), where o i is any one of the correlation evaluation methods, and p is the number of correlation evaluation methods. The data processing device can use each o i Calculate the original data set separately to get each o i Corresponding relevance evaluation information R i (Also called correlation evaluation matrix), where i = 1…p. i Corresponding relevance evaluation information R i After normalization, weighted summation can be performed according to user needs to obtain weighted summation correlation evaluation information (also called combined correlation evaluation information). The weighted summation correlation evaluation information is the correlation evaluation information between the target time data series and other time data series. The specific formula is as follows:

[0086] I=w r1 R1+w r2 R2+…+w rp R p ∈R n×n

[0087] Among them, the above w r1 can be the weight corresponding to R1, w r2 can be the weight corresponding to R2, w rp Can be R p Corresponding weights. It should be noted that each R iThe corresponding weights can be the same (i.e. w r1 =w r2 =…=w rp ), or different (i.e. w r1 ≠w r2 ≠…≠w rp ), or they can be partly the same and partly different (i.e., w r1 =w r2 ≠…≠w rp ), which is not limited in this application. i The corresponding weights can be adjusted according to different needs of users, and this application does not impose any restrictions on this.

[0088] like Fig.10 As shown, Fig.10 It can be a visual diagram of the above I. Fig.10 It can be seen intuitively that each time data series (such as Fig.10 The correlation between any two time data sequences in sequence 1, sequence 2, sequence 3 and sequence 4). Fig.10 In the figure, white is used as the relevance evaluation information of 1, and black is used as the relevance evaluation information of 0, which is only used for example and does not limit the present application.

[0089] Exemplarily, the present application embodiment takes the following three relevance evaluation methods set by the data processing device as an example for detailed description:

[0090] 1. Granger Causality Test Operator.

[0091] Granger causality test method can establish a regression model for the lagged values ​​of two time data series to test whether the past values ​​of the two time data series have a significant impact on the other time data series, so as to explore whether one time data series contributes to the prediction of another time data series and whether there is a temporal causal relationship between the two time data series. The data processing device can define o granger (l) is a causal test method using lagged values. This method can calculate the significance coefficient p of each lagged value of every two time data series in the original data set, and the significance coefficients of lagged values ​​can be added together to serve as the correlation evaluation information of the two time data series (which can be called R1).

[0092] 2. Dynamic time warping operator.

[0093] The dynamic time warping method can be used to measure the similarity of two time data series in terms of shape feature dimensions and trend feature dimensions. The method can calculate the distance by matching the value of a time data series at a certain time step with multiple values ​​of another time data series at similar time steps. While ensuring that the value of each time point can be calculated, the data processing device can use the dynamic time planning method to calculate the shortest distance among all possible matches. The data processing device can define o DTW , calculate the similarity distance between each two time data series to serve as the correlation evaluation information of the two time data series (which may be referred to as R2).

[0094] 3. Linear regression operator.

[0095] Data processing equipment can be defined as OLS , a simple linear regression model is established for each two time data series to calculate the regression coefficients of the two time data series, and obtain its significance p as the correlation evaluation information of the two time data series (which can be called R3). Among them, the above linear regression method can directly calculate the similarity of the original time data series that has not been converted.

[0096] It should be noted that after the data processing device obtains R1, R2 and R3 through the above three relevance evaluation methods, it can perform weighted summation on the three relevance evaluation information to obtain relevance evaluation information after combining the above three relevance evaluation methods.

[0097] Optionally, the above-mentioned correlation evaluation method can be adjusted, modified or replaced according to the data structure of the actual time data sequence. For example: the above-mentioned linear regression method can be used to calculate the correlation using the p-value for the normalized data, and it can be changed to use the combination of the p-value and the regression coefficient to calculate the correlation for the normalized data at the same time, so as to meet the requirements of the size of the correlation between the quantitative time data sequences. Among them, the combination of the p-value and the regression coefficient can be understood as adding the p-value to the regression coefficient, and this application is not limited to this. Optionally, the data processing device can also select various loss functions such as logistic regression, least absolute shrinkage and selection (Least Absolute Shrinkage and Selection Operator, LASSO) regression, spatial distance, or cross entropy as elements according to the actual data type to construct a correlation evaluation method for the data processing model, and this application is not limited to this.

[0098] In one implementation, at least one time data sequence is sorted according to the correlation between the target time data sequence included in the correlation evaluation information and any time data sequence in at least one time data sequence; a preset number of time data sequences is determined from at least one time data sequence according to the sorting result, and the preset number of time data sequences includes the target time data sequence; and the preset number of time data sequences are added to the associated feature set of the target time data sequence.

[0099] It should be noted that for two time data series (such as the ordinal number i c and i r The correlation evaluation information of the two time data series can be The data processing device can evaluate the relevance information ( Figure 8 Each row of the matrix I in the sequence is sorted to obtain a vector of sorted relevance evaluation information. And the time data series sorted by relevance Among them, r i1...n is the subscript of the original time data sequence corresponding to the sorted time data sequence. For example, assuming the target time data sequence is s i , sorted by relevance i Corresponding I i Can include Among them, it can be seen Ranked first in the original time data series, It ranks fourth in the original time data series. Ranked third in the original time data series, Ranked second in the original time data series.

[0100] like Fig. 9 As shown, S i Taking the target time data series as an example, I i is the correlation evaluation information corresponding to the target time data sequence. The data processing device can i Sorting is performed to obtain sorted relevance evaluation information, and according to the sorted relevance evaluation information, determining the i A collection of time data series sorted by relevance. i Included in S i The relevance evaluation information with itself is based on the S i The collection of time series data sorted by relevance can also include S i itself. Optional, due to S i The highest correlation with oneself, therefore Can be S iThe application does not impose any restrictions on the relevance to itself.

[0101] like Fig. 9 As shown, for the target time data series S i , the data processing equipment can be divided into s , to obtain the sorted first n×w s (i.e., the above-mentioned preset number) time data sequences, and the first n×w s The time data series is determined as the target time data series S i The associated feature set G i , to set the associated feature set G i As the training time data sequence S i The corresponding data prediction model input data set. i The target time data series S can be included i itself.

[0102] For example, assuming that there are 10 (ie, n=10) time data sequences, the data processing device may process the target time data sequence s i The corresponding 10 time data series are sorted according to the size of the correlation; if the division ratio w s is 0.5, that is, in the same time series as the target data s i Among the corresponding 10 time data sequences, the first 5 time data sequences are taken as the associated feature set of the target time data sequence.

[0103] It should be noted that the embodiment of the present application is divided according to the ratio w s As a standard for screening the associated feature set of the target time data sequence, it is only used as an example and does not limit the present application. Optionally, when the number of associated features of the target time data sequence is large, a fixed value can be used as the number of associated features, or a correlation evaluation information threshold can be set to determine the number of associated features, and the present application does not limit this.

[0104] By grouping the original data set, at least one of the time data series mentioned above can be determined, and at least one correlation evaluation method can be used to calculate the correlation of the at least one time data series to screen out the associated feature set of the target time data series as the input set of the corresponding data prediction model, thereby greatly reducing the time and labor costs and alleviating the difficulty of model migration. Then, the associated features with higher correlation can be used for model training, which can reduce the calculation complexity while improving the accuracy of the data prediction model and enhancing the stability of the data prediction model.

[0105] S702: Acquire a second associated feature subset from the associated feature set based on the third time and the preset time window.

[0106] Among them, the above-mentioned third time can be any time in the target time data sequence selected during the initial model training process. Optionally, the third time can be the same as the aforementioned first time, or it can be different from the aforementioned first time, and the present application does not limit this. The above-mentioned second associated feature subset can be an associated feature subset intercepted from the above-mentioned associated feature set with the third time as the starting time of the preset time window during the initial model training process. Optionally, when the third time is the same as the aforementioned first time, the second associated feature subset can be the same as the aforementioned first associated feature subset, and the present application does not limit this.

[0107] During the training of the initial model, the data processing device may intercept the associated feature set in sequence according to the step size of the preset time window. That is, the data processing device may obtain multiple associated feature subsets (i.e., the second associated feature subsets) from the associated feature set based on multiple times (i.e., the third time) and the preset time window. For example: Fig.11 As shown in FIG. 1 , assuming that each of the at least one time data series contains data for 5 days (i.e., T=5), if the duration of the preset time window is 3 days and the step length is 1 day per step, the data processing device can respectively use the first day, the second day, and the third day as the start time of the preset time window, and extract three associated feature subsets (such as Fig.11 The associated feature subsets 1, 2 and 3 in .

[0108] It should be noted that the relevant contents of S702 in the embodiment of the present application can be found in the aforementioned Figure 2 The detailed description of S202 in the corresponding embodiment is not repeated here in this application.

[0109] S703, processing the second associated feature subset based on the multi-weighted self-attention mechanism of the initial model to obtain feature representation data of the target time data sequence at a third time.

[0110] After acquiring the above-mentioned second associated feature subset, the data processing device can process the second associated feature subset based on the multi-weighted self-attention mechanism of the initial model, so that the second associated feature subset can learn the attention on the time dimension and the attention of the interaction between time series within the attention mechanism, and use the relevance evaluation information externally to synthesize the results of multiple attentions, thereby making the training of the initial model more effective.

[0111] In one implementation, occlusion processing is performed on each time data sequence included in the second correlation feature subset to obtain at least one local correlation feature matrix of the target time data sequence; based on the self-attention information of each local correlation feature matrix in the at least one local correlation feature matrix, and the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix, the multiple weighted self-attention information of the second correlation feature subset is determined; based on the second correlation feature subset and the multiple weighted self-attention information, the feature representation data of the target time data sequence at a third time is determined.

[0112] like Fig.12 As shown, the data processing device can perform masking processing (also called masking processing) on ​​each time data sequence included in the second associated feature subset, so as to remove the masked time data sequence in the second associated feature subset, and then obtain the common nw s The local correlation feature matrix (i.e. Fig.12 X in im ). Among them, X imj It can be any local correlation feature matrix in the local correlation feature matrix, j = (1,...,nw s ). Optionally, the data processing device may set the blocked time data sequence to 0 to achieve the effect of blocking it, which is not limited in this application.

[0113] In one implementation, based on the self-attention parameters of the initial model, each local correlation feature matrix in at least one local correlation feature matrix is ​​processed to obtain first self-attention information of each local correlation feature matrix; the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix is ​​obtained from the correlation evaluation information of the target time data sequence; based on the first self-attention information of each local correlation feature matrix and the above correlation, the second self-attention information of each local correlation feature matrix is ​​determined; based on the second self-attention information of each local correlation feature matrix, the multi-weighted self-attention information of the second correlation feature subset is determined.

[0114] It should be noted that the data processing device can use at least one self-attention parameter, for each X imj Calculate to get each X imj The first self-attention information of . The specific calculation formula is as follows:

[0115]

[0116] Among them, LocalAttention(X imj ) can represent X imj The first self-attention information, Wa It can represent the first self-attention parameter, W b can represent the second self-attention parameter, Can represent L t The scaling factor under dimension (where L t The duration of the time window can be preset).

[0117] It should be noted that in the formula for calculating the first self-attention information, there are two self-attention parameters (i.e., W a and W b ) is used as an example for illustration, which does not limit the present application. Optionally, the above self-attention parameters can be a matrix or a vector, which is not limited in the present application. Optionally, for the first local self-attention matrix (i.e., X im1 ) used by W a1 and W b1 , can be combined with the second local self-attention matrix (i.e. X im2 ) used by W a2 and W b2 The two may be the same or different, or partly the same and partly different, and this application does not impose any limitation on this.

[0118] After obtaining the first self-attention information of each local correlation feature matrix, the data processing device can obtain the correlation between the target time data sequence and the corresponding occluded time data sequence of each local correlation feature matrix from the correlation evaluation information of the target time data sequence, so as to multiply the first self-attention information by the correlation, thereby obtaining the second self-attention information of each local correlation feature matrix, and then perform a weighted average operation on the second self-attention information of each local correlation feature matrix to obtain the multiple weighted self-attention information of the second correlation feature subset. The specific calculation formula is as follows:

[0119]

[0120] Among them, Attention(X i ) can represent the multi-weighted self-attention information of the second associated feature subset, Score ij It can represent the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix. Can represent X imj The first self-attention information is the aforementioned LocalAttention(X imj ).

[0121] For example, assuming that the first local correlation feature matrix X im1The first time data sequence S1 is shielded in the process, then the data processing device can obtain the correlation between the target time data sequence and the first time data sequence S1 from the aforementioned correlation evaluation information (i.e. ), and based on this And the aforementioned first self-attention information, determine the second self-attention information.

[0122] It can be understood that the data processing device can perform the above processing on each local correlation feature matrix respectively, so as to obtain the second self-attention information of each local correlation feature matrix, and then perform weighted averaging operation on the second self-attention information of each local correlation feature matrix to obtain the multiple weighted self-attention information of the second correlation feature subset.

[0123] In one implementation, based on a scaler and a residual connection, the multi-weighted self-attention information is processed to obtain the processed multi-weighted self-attention information; based on the second associated feature subset and the processed multi-weighted self-attention information, feature representation data of the target time data sequence at a third time is obtained.

[0124] The data processing device obtains the second associated feature subset (i.e., the above X i )’s multi-weighted self-attention information (i.e., the above Attention(X i )), the multi-weighted self-attention information can be input into a scaler (such as a multi-layer perceptron (MLP) scaler) to use a fully connected network to expand the multi-weighted self-attention information to a high dimension and then reduce it to the original dimension, thereby obtaining the high-dimensional interaction information of the multi-weighted self-attention information and obtaining MLP (Attention (X i )). Optionally, the data processing device can use a residual connection to convert Attention(X i ) and MLP(Attention(X i )) to obtain the multi-weighted attention information after the above processing; and add the processed multi-weighted self-attention information to X i Add together to obtain the feature representation data of the target time data sequence at the third time.

[0125] like Fig.13 As shown, Fig.13 A visualization diagram of a multiple self-attention matrix provided in an embodiment of the present application. Fig.13The size of the self-attention of the data sequence can be clearly seen, that is, which coordinate corresponds to the lighter data color, so that the comprehensive self-attention of the target time data series and other time data series can be intuitively understood, and then the representation information of the time data series can be comprehensively and accurately extracted in multiple dimensions of time and different sequence characteristics, so as to improve the accuracy of the prediction results of the prediction model.

[0126] In the embodiment of the present application, through the combination of the correlation evaluation method and the multi-weighted self-attention mechanism, the initial model can simultaneously learn the local attention of the time dimension and partial features within each associated feature set, the global attention between the time data series features represented by each column of the associated feature set, and the comprehensive attention obtained by the interaction of the above local attention and all attention. The multi-weighted self-attention mechanism makes full use of the local information on the time series within the associated feature set, as well as the global information outside the associated feature set obtained by the correlation evaluation method, which can help the initial model effectively identify the determinants of the predicted value, so as to improve the accuracy of the initial model and the utilization rate of multivariate sequence information, thereby improving the fitting efficiency of the initial model.

[0127] It should be noted that the use of a preset time window in the above-mentioned multiple weighted self-attention mechanism to obtain a subset of associated features is only for example and does not limit the present application. Optionally, the data processing device can also use other methods to process the above-mentioned input data (such as the above-mentioned associated feature set), and the present application does not limit this. For example: performing a convolution operation on the original data to form input data; setting the model structure to a recurrent neural network (RNN) model or an encoder-decoder (Encoder-Decoder) model, and forming input data by adjusting the time step interval. Optionally, the data processing device can also add commonly used mathematical models and expert knowledge in the corresponding industry as input data for the initial model according to different application scenarios. For example: in the construction of an infectious disease prediction model, the parameters and results of the infectious disease dynamics (Susceptible-Exposed-Infected-Removed, SEIR) model are added as features to the initial model of the embodiment of the present application, thereby increasing the interpretability of the model and being able to better adapt to the application scenario requirements.

[0128] S704, training the initial model using the feature representation data of the target time data sequence at the third time and the corresponding reference data in the target time data sequence to obtain a data prediction model.

[0129] The reference data may be real data obtained during the initial model training process. For example, the data on the third day that actually exists in the time data series of the total number of patients visiting the hospital may be a reference data in the time data series of the total number of patients visiting the hospital.

[0130] From the above content, it can be seen that the feature representation data of the target time data sequence at the third time can be used as the output of the self-attention function module, and can also be used as the input of the data prediction model. That is to say, after the associated feature set of the target time data sequence is processed by the multi-weighted self-attention mechanism of the initial model, the feature representation data of the target time data sequence at the third time obtained can be used as the input data for model training of the data prediction model, such as Fig.12 INPUT(X i ).

[0131] The data processing device can train the initial model through the input data to obtain the predicted data of the target time data sequence at the third time, and train the initial model according to the reference data corresponding to the third time in the target time data sequence to obtain the data prediction model.

[0132] In one implementation, the feature representation data of the target time data sequence at the third time is processed using the initial model to obtain the predicted data at the fourth time; the reference data corresponding to the fourth time is obtained from the target time data sequence; based on the predicted data at the fourth time and the reference data corresponding to the fourth time, the model parameters of the initial model are adjusted to obtain the data prediction model. The model parameters include the self-attention parameters.

[0133] The data processing device uses the initial model to process the feature representation data of the target time data sequence at the third time to predict the data at the fourth time. After obtaining the predicted data at the fourth time, the reference data corresponding to the fourth time can be obtained from the target data sequence, so that the predicted data at the fourth time and the reference data corresponding to the fourth time can be compared, and then the model parameters of the initial model can be adjusted according to the comparison results to adjust to the optimal model parameters, and the initial model can be trained as a data prediction model with certain functions.

[0134] It should be noted that the above model parameters may include self-attention parameters, that is, the above W a and W b That is to say, during the training of the initial model, the above W a and W bAdjustments are made so that the trained initial model can achieve better prediction results. Optionally, if the computing power of the data processing device allows, the weights of the aforementioned multiple relevance evaluation information can also be regarded as model parameters and added to the learning, or the calculation process of the relevance can also be added to the training, so as to obtain better weight parameters. Optionally, the above-mentioned model parameters can also include parameters in other initial models, which is not limited in this application.

[0135] See also Fig.14 , Fig.14 Flow chart of the data processing method provided in the embodiment of the present application. Fig.14 As shown, the data processing device can collect the original data set and pre-process the original data set, so as to obtain the importance scoring matrix (i.e. the above-mentioned relevance evaluation information) and the time series feature selection grouping (i.e. the above-mentioned associated feature set) by combining the importance extraction module (i.e. the above-mentioned relevance evaluation method), and then train the data prediction model through the multi-weighted self-attention module (i.e. the above-mentioned multi-weighted self-attention mechanism) and the prediction model architecture (i.e. the above-mentioned initial model), and the relevance evaluation information schematic diagram during the training process (as shown in Fig.10 As shown in the figure), the effect diagram of multiple self-attention mechanisms (as shown in the figure Fig.13 As shown in the figure), training effect diagram (as shown in the figure Fig.15 ) etc. are displayed visually.

[0136] It should be noted that the data processing method provided in the embodiment of the present application can be implemented on multiple platforms, such as using a python data processing package for data preprocessing, using statsmodels, scikit-learn and other statistical and machine learning packages to build a combined importance extraction module, and using pytorch and other deep learning frameworks to build multiple weighted self-attention modules and prediction models. Among them, the architecture of the prediction model can be a fully connected neural network, convolutional neural network and other structures designed according to specific problems, and this application does not limit this.

[0137] like Fig.15 As shown, Fig.15 A schematic diagram of the training effect of the initial model provided in an embodiment of the present application. Fig.15 The training 1 in the figure can be a schematic diagram of the effect of the first training, and the training 2 can be a schematic diagram of the effect of the 100th training. From the comparison between the training 1 and the training 2, it can be seen that the prediction results predicted by the initial model after multiple trainings are getting closer and closer to the real data (for example, the loss value of the ordinate is getting closer and closer to 0), and the required training time is getting shorter and shorter.

[0138] In an embodiment of the present application, a data processing device obtains a set of associated features of a target time data sequence, and obtains a second associated feature subset from the associated feature set based on a third time and a preset time window, and processes the second associated feature subset based on a multi-weighted self-attention mechanism of an initial model to obtain feature representation data of the target time data sequence at the third time; thereby, the initial model is trained using the feature representation data of the target time data sequence at the third time and the corresponding reference data in the target time data sequence, so that the initial model can learn the local attention of the internal time dimension and partial features of each group of input data, the global attention between the time series features represented by each column of the input data, and the comprehensive attention obtained by the interaction between the two; thereby, the trained data prediction model can effectively identify the determinants of the prediction value, so as to improve the accuracy of the data prediction model and the information utilization rate of the multivariate time data series, thereby improving the fitting efficiency.

[0139] In addition, in the specific implementation of the present application, the data involved in at least one time data series (which may include the total number of hospital patients, the number of dental patients, the net profit of a company, etc.) are all authorized by the user. When the above embodiments of the present application are applied to specific products or technologies, the data involved need to obtain user permission or consent, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0140] For further information, see Fig.16 , Fig.16 Schematic diagram of a data processing device provided in an embodiment of the present application. Fig.16 As shown, the data processing device 1600 can be applied to the above Figure 1 The data processing device in the corresponding embodiment. Specifically, the data processing device 1600 may be a computer program (including program code) running in the data processing device, for example, the data processing device 1600 is an application software; the data processing device 1600 may be used to execute Figure 2 and Figure 7 The corresponding steps in the method provided in the corresponding embodiment.

[0141] The data processing device 1600 may include: an acquisition unit 1601 and a processing unit 1602 .

[0142] An acquiring unit 1601 is used to acquire a correlation feature set of a target time data sequence, where the correlation feature set is determined according to a correlation between the target time data sequence and each time data sequence in at least one time data sequence, where the target time data sequence is any one of the at least one time data sequence;

[0143] The acquisition unit 1601 is further configured to acquire a first associated feature subset from the associated feature set based on the first time and the preset time window;

[0144] A processing unit 1602 is used to process the first associated feature subset based on a multi-weighted self-attention mechanism of the data prediction model to obtain feature representation data of the target time data sequence at the first time;

[0145] The processing unit 1602 is further configured to call the data prediction model to perform prediction processing on the feature representation data of the target time data sequence at the first time, so as to obtain prediction data at the second time.

[0146] In a possible implementation, the acquisition unit 1601 is also used to acquire a second associated feature subset from the associated feature set based on the third time and a preset time window; the processing unit 1602 is also used to process the second associated feature subset based on the multi-weighted self-attention mechanism of the initial model to obtain feature representation data of the target time data sequence at the third time; the processing unit 1602 is also used to train the initial model using the feature representation data of the target time data sequence at the third time and the corresponding reference data in the target time data sequence to obtain a data prediction model.

[0147] In a possible implementation, the processing unit 1602 is further used to perform occlusion processing on each time data sequence included in the second correlation feature subset to obtain at least one local correlation feature matrix of the target time data sequence; the processing unit 1602 is further used to determine the multiple weighted self-attention information of the second correlation feature subset based on the self-attention information of each local correlation feature matrix in at least one local correlation feature matrix, and the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix; the processing unit 1602 is further used to determine the feature representation data of the target time data sequence at a third time based on the second correlation feature subset and the multiple weighted self-attention information.

[0148] In a possible implementation, the processing unit 1602 is also used to process each local correlation feature matrix in at least one local correlation feature matrix based on the self-attention parameters of the initial model to obtain first self-attention information of each local correlation feature matrix; the acquisition unit 1601 is also used to obtain the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix from the correlation evaluation information of the target time data sequence; the processing unit 1602 is also used to determine the second self-attention information of each local correlation feature matrix based on the first self-attention information of each local correlation feature matrix and the above correlation; the processing unit 1602 is also used to determine the multi-weighted self-attention information of the second correlation feature subset based on the second self-attention information of each local correlation feature matrix.

[0149] In one possible implementation, the above-mentioned processing unit 1602 is also used to process the multiple weighted self-attention information based on the scaler and the residual connection to obtain the processed multiple weighted self-attention information; the above-mentioned processing unit 1602 is also used to obtain the feature representation data of the target time data sequence at a third time based on the second associated feature subset and the processed multiple weighted self-attention information.

[0150] In a possible implementation, the processing unit 1602 is further used to process the feature representation data of the target time data sequence at the third time using the initial model to obtain the prediction data at the fourth time; the acquisition unit 1601 is further used to obtain the reference data corresponding to the fourth time from the target time data sequence; the processing unit 1602 is further used to adjust the model parameters of the initial model based on the prediction data at the fourth time and the reference data corresponding to the fourth time to obtain the data prediction model. The model parameters include self-attention parameters.

[0151] In a possible implementation, the acquisition unit 1601 is further used to acquire at least one time data series; the acquisition unit 1601 is further used to acquire at least one correlation between any two time data series in at least one time data series based on at least one correlation evaluation method; the processing unit 1602 is further used to determine the correlation evaluation information of the at least one time data series based on at least one correlation between any two time data series; the processing unit 1602 is further used to determine the associated feature set of the target time data series based on the correlation evaluation information.

[0152] In a possible implementation, the above-mentioned processing unit 1602 is also used to sort at least one time data sequence according to the correlation between the target time data sequence included in the correlation evaluation information and any time data sequence in at least one time data sequence; the above-mentioned processing unit 1602 is also used to determine a preset number of time data sequences from at least one time data sequence according to the sorting result, and the preset number of time data sequences includes the target time data sequence; the above-mentioned processing unit 1602 is also used to add the preset number of time data sequences to the associated feature set of the target time data sequence.

[0153] According to an embodiment of the present application, Fig.16 The various units in the data processing device shown can be respectively or completely combined into one or several other units to constitute, or some of the units (some) can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, other units can also be included based on the data processing device. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0154] According to the embodiments of the present application, the following can be executed by running on a general computing device such as a computer including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM) and other processing elements and storage elements. Figure 2 and Figure 7 A computer program (including program code) for each step involved in the corresponding method shown in FIG. Fig.16 The data processing device shown in the embodiment of the present application is used to implement the data processing method of the present application. The above computer program can be recorded on a computer storage medium, for example, and loaded into the above computing device through the computer storage medium and run therein.

[0155] For further information, see Fig.17 , Fig.17 1700 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 1700 can also be used to implement the functions of the server in the above method embodiment. Fig.17 As shown, the computer device 1700 may include at least: a processor 1701, a communication interface 1702, and a computer storage medium 1703. The processor 1701, the communication interface 1702, and the computer storage medium 1703 may be connected via a bus or other means.

[0156] The computer storage medium 1703 may be stored in the memory 1704 of the computer device 1700. The computer storage medium 1703 is used to store a computer program, which includes program instructions. The processor 1701 is used to execute the program instructions stored in the computer storage medium 1703. The processor 1701 (or CPU (Central Processing Unit)) is the computing core and control core of the computer device 1700, which is suitable for implementing one or more instructions, and is specifically suitable for loading and executing:

[0157] Obtaining a set of associated features of a target time data sequence, where the set of associated features is determined based on a correlation between the target time data sequence and each time data sequence in at least one time data sequence, where the target time data sequence is any one of the at least one time data sequence;

[0158] Acquire a first associated feature subset from the associated feature set based on the first time and a preset time window;

[0159] The first associated feature subset is processed based on the multi-weighted self-attention mechanism of the data prediction model to obtain feature representation data of the target time data sequence at the first time;

[0160] The data prediction model is called to perform prediction processing on the feature representation data of the target time data sequence at the first time to obtain the predicted data at the second time.

[0161] In one possible implementation, the processor 1701 is further used to obtain a second associated feature subset from the associated feature set based on a third time and a preset time window; the processor 1701 is further used to process the second associated feature subset based on the multi-weighted self-attention mechanism of the initial model to obtain feature representation data of the target time data sequence at the third time; the processor 1701 is further used to train the initial model using the feature representation data of the target time data sequence at the third time and the corresponding reference data in the target time data sequence to obtain a data prediction model.

[0162] In one possible implementation, the processor 1701 is further used to perform occlusion processing on each time data sequence included in the second correlation feature subset to obtain at least one local correlation feature matrix of the target time data sequence; the processor 1701 is further used to determine the multiple weighted self-attention information of the second correlation feature subset based on the self-attention information of each local correlation feature matrix in at least one local correlation feature matrix, and the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix; the processor 1701 is further used to determine the feature representation data of the target time data sequence at a third time based on the second correlation feature subset and the multiple weighted self-attention information.

[0163] In a possible implementation, the processor 1701 is further used to process each local correlation feature matrix in at least one local correlation feature matrix based on the self-attention parameters of the initial model to obtain first self-attention information of each local correlation feature matrix; the processor 1701 is further used to obtain the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix from the correlation evaluation information of the target time data sequence; the processor 1701 is further used to determine the second self-attention information of each local correlation feature matrix based on the first self-attention information of each local correlation feature matrix and the above correlation; the processor 1701 is further used to determine the multi-weighted self-attention information of the second correlation feature subset based on the second self-attention information of each local correlation feature matrix.

[0164] In one possible implementation, the processor 1701 is also used to process the multiple weighted self-attention information based on the scaler and the residual connection to obtain the processed multiple weighted self-attention information; the processor 1701 is also used to obtain feature representation data of the target time data sequence at a third time based on the second associated feature subset and the processed multiple weighted self-attention information.

[0165] In a possible implementation, the processor 1701 is further used to process the feature representation data of the target time data sequence at the third time using the initial model to obtain the prediction data at the fourth time; the processor 1701 is further used to obtain the reference data corresponding to the fourth time from the target time data sequence; the processor 1701 is further used to adjust the model parameters of the initial model based on the prediction data at the fourth time and the reference data corresponding to the fourth time to obtain the data prediction model. The model parameters include self-attention parameters.

[0166] In a possible implementation, the processor 1701 is further used to obtain at least one time data series; the processor 1701 is further used to obtain at least one correlation between any two time data series in at least one time data series based on at least one correlation evaluation method; the processor 1701 is further used to determine the correlation evaluation information of the at least one time data series based on at least one correlation between any two time data series; the processor 1701 is further used to determine the associated feature set of the target time data series based on the correlation evaluation information.

[0167] In a possible implementation, the processor 1701 is further used to sort at least one time data sequence according to the correlation between the target time data sequence included in the correlation evaluation information and any time data sequence in at least one time data sequence; the processor 1701 is further used to determine a preset number of time data sequences from at least one time data sequence according to the sorting result, the preset number of time data sequences including the target time data sequence; the processor 1701 is further used to add the preset number of time data sequences to the associated feature set of the target time data sequence.

[0168] It should be understood that the computer device 1700 described in the embodiment of the present application can execute the above Figure 2 and Figure 7 The description of the data processing method in the corresponding embodiment can also be performed as described above. Fig.16 The data processing device 1600 in the embodiment will not be described in detail here. In addition, the description of the beneficial effects of the same method will not be described in detail here either.

[0169] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores a computer program executed by the data processing device 1600 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figure 2 and Figure 7 The description of the data processing method in the corresponding embodiment will therefore not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, program instructions can be deployed on a computer device for execution, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected by a communication network. Multiple computer devices distributed in multiple locations and interconnected by a communication network can be combined into a blockchain network.

[0170] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device can perform the above Figure 2 and Figure 7 The method in the corresponding embodiment will therefore not be described in detail here.

[0171] Those of ordinary skill in the art will appreciate that the units and steps of each example described in conjunction with the embodiments disclosed in this application 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.

[0172] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer storage medium or transmitted through a computer storage medium. The computer instructions can be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

[0173] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data processing method based on artificial intelligence, characterized in that: The method comprises: Acquire a set of associated features of a target time data sequence; the associated feature set includes the target time data sequence and a preset number of time data sequences with a high correlation with the target time data sequence in at least one time data sequence; the target time data sequence is any one of the at least one time data sequence; the target time data sequence includes a data sequence of the number of people changing over time; Acquire a first associated feature subset from the associated feature set based on the first time and a preset time window; Processing the first associated feature subset based on a multiple weighted self-attention mechanism of a data prediction model to obtain feature representation data of the target time data sequence at the first time; Calling the data prediction model to perform prediction processing on the feature representation data of the target time data sequence at the first time to obtain prediction data at a second time, wherein the prediction data includes the number of people; The multi-weighted self-attention mechanism based on the data prediction model processes the first associated feature subset to obtain feature representation data of the target time data sequence at the first time, including: Based on the multi-weighted self-attention mechanism of the data prediction model, each time data sequence included in the first correlation feature subset is subjected to occlusion processing to obtain at least one local correlation feature matrix of the target time data sequence; Determine the multi-weighted self-attention information of the first correlation feature subset based on the self-attention information of each local correlation feature matrix in the at least one local correlation feature matrix and the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix; Based on the first associated feature subset and the multi-weighted self-attention information, feature representation data of the target time data sequence at the first time is determined.

2. The method according to claim 1, characterized in that The method further comprises: Acquire a second associated feature subset from the associated feature set based on a third time and the preset time window; Processing the second associated feature subset based on the multi-weighted self-attention mechanism of the initial model to obtain feature representation data of the target time data sequence at the third time; The initial model is trained using the feature representation data of the target time data sequence at the third time and the corresponding reference data in the target time data sequence to obtain the data prediction model.

3. The method according to claim 2, characterized in that The multiple weighted self-attention mechanism based on the initial model processes the second associated feature subset to obtain feature representation data of the target time data sequence at the third time, including: Performing occlusion processing on each time data sequence included in the second correlation feature subset to obtain at least one local correlation feature matrix of the target time data sequence; Determine the multi-weighted self-attention information of the second correlation feature subset based on the self-attention information of each local correlation feature matrix in the at least one local correlation feature matrix and the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix; Based on the second associated feature subset and the multi-weighted self-attention information, feature representation data of the target time data sequence at the third time is determined.

4. The method according to claim 3, characterized in that The step of determining the multi-weighted self-attention information of the second correlation feature subset based on the self-attention information of each local correlation feature matrix in the at least one local correlation feature matrix and the correlation between the target time data sequence and the time data sequence occluded corresponding to each local correlation feature matrix comprises: Based on the self-attention parameter of the initial model, processing each local correlation feature matrix in the at least one local correlation feature matrix to obtain first self-attention information of each local correlation feature matrix; Obtaining the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix from the correlation evaluation information of the target time data sequence; Determining second self-attention information of each local correlation feature matrix based on the first self-attention information of each local correlation feature matrix and the correlation; Determine the multi-weighted self-attention information of the second correlation feature subset based on the second self-attention information of each local correlation feature matrix.

5. The method according to claim 3 or 4, characterized in that: The determining, based on the second associated feature subset and the multi-weighted self-attention information, feature representation data of the target time data sequence at the third time comprises: Processing the multi-weighted self-attention information based on a scaler and a residual connection to obtain processed multi-weighted self-attention information; Based on the second associated feature subset and the processed multi-weighted self-attention information, feature representation data of the target time data sequence at the third time is obtained.

6. The method according to any one of claims 2 to 4, characterized in that The training of the initial model using the feature representation data of the target time data sequence at the third time and the reference data corresponding to the target time data sequence to obtain the data prediction model includes: Using the initial model, processing the feature representation data of the target time data sequence at the third time to obtain prediction data at a fourth time; Acquire reference data corresponding to the fourth time from the target time data sequence; Based on the predicted data at the fourth time and the reference data corresponding to the fourth time, the model parameters of the initial model are adjusted to obtain the data prediction model, and the model parameters include self-attention parameters.

7. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Obtain at least one time data series; Acquire at least one correlation between any two time data sequences in the at least one time data sequence based on at least one correlation evaluation method; Determining correlation evaluation information of the at least one time data series based on at least one correlation between the arbitrary two time data series; A set of associated features of the target time data series is determined according to the relevance evaluation information.

8. The method according to claim 7, characterized in that The determining of the associated feature set of the target time data sequence according to the correlation evaluation information includes: sorting the at least one time data sequence according to the correlation between the target time data sequence and any time data sequence of the at least one time data sequence included in the correlation evaluation information; Determine a preset number of time data sequences from the at least one time data sequence according to the sorting result, wherein the preset number of time data sequences includes the target time data sequence; The preset number of time data sequences are added to the associated feature set of the target time data sequence.

9. A data processing device based on artificial intelligence, characterized in that: include: an acquisition module, configured to acquire a set of associated features of a target time data sequence; the associated feature set includes the target time data sequence and a preset number of time data sequences with a high correlation with the target time data sequence in at least one time data sequence; the target time data sequence is any one of the at least one time data sequence; the target time data sequence includes a data sequence of the number of people changing over time; The acquisition module is further used to acquire a first associated feature subset from the associated feature set based on the first time and the preset time window; A processing module, configured to process the first associated feature subset based on a multi-weighted self-attention mechanism of a data prediction model to obtain feature representation data of the target time data sequence at the first time; The processing module is further used to call the data prediction model to perform prediction processing on the feature representation data of the target time data sequence at the first time to obtain prediction data at a second time, wherein the prediction data includes the number of people; Wherein, the processing module is specifically used for: Based on the multi-weighted self-attention mechanism of the data prediction model, each time data sequence included in the first correlation feature subset is subjected to occlusion processing to obtain at least one local correlation feature matrix of the target time data sequence; Determine the multi-weighted self-attention information of the first correlation feature subset based on the self-attention information of each local correlation feature matrix in the at least one local correlation feature matrix and the correlation between the target time data sequence and the occluded time data sequence corresponding to each local correlation feature matrix; Based on the first associated feature subset and the multi-weighted self-attention information, feature representation data of the target time data sequence at the first time is determined.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, a computer device having the processor executes the steps of the method according to any one of claims 1 to 8.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a computer processor, the method described in any one of 1-8 is implemented.