Traffic prediction method, device and storage medium
By acquiring sample traffic data under the overall traffic, using a prediction model to predict, and determining the target reference traffic data with the greatest similarity in the reference traffic data, the problem of large prediction error in the subdivided direction traffic in the prior art is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202110572395.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-25
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-05-25
AI Technical Summary
The prior art has a large error in predicting the flow in the subdivided direction under the overall flow rate, especially in the case of daily proportion changes, which have a large error.
By acquiring multiple sample traffic data, using a prediction model to predict, extract the target characteristic information of the predicted traffic data, and determine the target reference traffic data with the greatest similarity to the predicted traffic data in the reference traffic data. Based on the traffic proportion information of the reference traffic data, the target traffic information of the predicted traffic data is determined.
The flow prediction accuracy in the subdivided direction under the overall flow rate is improved, and prediction errors are reduced, especially in the case of daily proportion changes.
Smart Images

Figure CN113420906B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of Internet technology, and in particular to a traffic prediction method, device, and storage medium. Background Art
[0002] At present, with the rapid development of the Internet industry, the behavior of users on the Internet has become supervised, recordable, and traceable. Through repeated clicks and browsing behaviors, user flow has become information flow. For enterprises, how to deal with information flow at the lowest cost has become the key to reducing costs and increasing efficiency. This has given rise to the development of time series traffic prediction in the industry, including in customer service, advertising, logistics and other business scenarios, where traffic prediction has been applied.
[0003] In the prior art, there are many flows in different subdivided directions under a large overall flow. It is necessary to know not only the overall flow but also the small flows. There are currently two mainstream methods. One is top-down, predicting the overall flow, and then splitting the overall flow into small flows according to a preset ratio. This method cannot cope well with daily changes in proportions and has large errors. The other is bottom-up, predicting small flows in each subdivided direction and finally adding them up to form the overall flow. The disadvantage of this method is that the magnitude of the small flows is too small, and the prediction error is extremely large, which will amplify the error after accumulation. The problem in the prior art is that the prediction error of the flows in the subdivided directions under the overall flow is large. Summary of the invention
[0004] A flow prediction method, device and storage medium provided by the embodiments of the present invention can improve the flow prediction accuracy in a subdivided direction under the overall flow.
[0005] The technical solution of the present invention is achieved in this way:
[0006] An embodiment of the present invention provides a flow prediction method, including:
[0007] Acquire a plurality of sample flow data corresponding to a plurality of first time periods within a first preset time period; each sample flow data represents flow distribution information of the corresponding first time period in at least one dimension;
[0008] Using a prediction model to predict the multiple sample flow data to obtain predicted flow data for a target time period; the predicted flow data represents predicted flow distribution information for the target time period in the at least one dimension;
[0009] Extracting target characteristic information of the predicted traffic data, and based on the target characteristic information, determining target reference traffic data having the greatest similarity to the predicted traffic data from a plurality of reference traffic data; the plurality of reference traffic data are traffic data corresponding to a plurality of second time periods within a second preset time period; the second preset time period includes the first preset time period;
[0010] Based on the traffic proportion information of the target reference traffic data in the at least one dimension, it is determined that the target traffic information of the at least one dimension respectively corresponds to the predicted traffic data.
[0011] In the above scheme, the step of extracting target feature information of the predicted traffic data and determining, based on the target feature information, target reference traffic data having the greatest similarity to the predicted traffic data from among multiple reference traffic data comprises:
[0012] Extracting target feature information from the predicted traffic data, and determining, based on the target feature information, target sample traffic data having the greatest similarity to the predicted traffic data among the plurality of sample traffic data;
[0013] Target sample feature information is extracted from the target sample flow data, and based on the target sample feature information, the target reference flow data is determined from the plurality of reference flow data.
[0014] In the above solution, the target feature information includes: target dimension feature information;
[0015] The step of extracting target feature information from the predicted traffic data and determining, based on the target feature information, target sample traffic data having the greatest similarity to the predicted traffic data from among the plurality of sample traffic data comprises:
[0016] Extracting target dimension feature information of the predicted traffic data in any dimension;
[0017] Extracting a plurality of sample feature information corresponding to the plurality of sample flow data on the corresponding dimensions of the predicted flow data;
[0018] Similarity calculations are performed on the target dimension feature information and the multiple sample feature information respectively to determine the target sample flow data having the greatest similarity to the predicted flow data.
[0019] In the above solution, the at least one dimension includes: a time dimension and a business dimension; the target dimension feature information includes: any one of a target time vector and a target business vector;
[0020] The extracting target dimension feature information of the predicted traffic data in any dimension includes one of the following:
[0021] Compare the traffic data of multiple time periods in the time dimension with the traffic data of preset time periods, and obtain information of multiple preset time points corresponding to the multiple time periods;
[0022] Combining the plurality of preset time point information to obtain the target time vector;
[0023] The predicted traffic data is compared with the traffic data corresponding to the multiple services in the service dimension, and the preset service traffic data corresponding to the preset service is compared, to obtain information of multiple preset service points corresponding to the multiple services;
[0024] The target service vector is obtained by combining the plurality of preset service point information.
[0025] In the above solution, the sample feature vector includes: any one of a sample time vector and a sample business vector;
[0026] The extracting a plurality of sample feature information corresponding to the plurality of sample flow data in the corresponding dimension of the predicted flow data includes one of the following:
[0027] In the time dimension, each sample flow data of the plurality of sample flow data in the plurality of time periods is compared with the preset time flow data of the preset time period to obtain a plurality of preset sample time point information corresponding to the plurality of time periods;
[0028] Combining the plurality of preset sample time point information to obtain a plurality of sample time vectors corresponding to the plurality of sample flow data;
[0029] In the business dimension, each sample flow data of the multiple sample flow data is compared with the flow data corresponding to the multiple businesses, and the preset business flow data of the preset business is calculated to obtain multiple preset sample business point information corresponding to the multiple businesses;
[0030] The plurality of preset sample service point information are combined to obtain the plurality of sample service vectors corresponding to the plurality of sample traffic data.
[0031] In the above scheme, the similarity calculation is performed on the target dimension feature information and the plurality of sample feature information respectively to determine the target sample flow data having the greatest similarity to the predicted flow data, including one of the following:
[0032] Performing similarity calculations on the target time vector and the multiple sample time vectors respectively to obtain first cosine distances between the target time vector and the multiple sample time vectors respectively, and determining the target sample flow data corresponding to the maximum first cosine distance;
[0033] Similar calculations are performed on the target business vector and the multiple sample business vectors respectively to obtain second cosine distances between the target business vector and the multiple sample business vectors respectively, and the target sample traffic data corresponding to the maximum second cosine distance is determined.
[0034] In the above solution, extracting target sample feature information from the target sample flow data, and determining the target reference flow data from the plurality of reference flow data based on the target sample feature information, includes:
[0035] The target sample characteristic information is calculated based on a plurality of flow data within a third preset time period; the third preset time period is a time period before the first time period corresponding to the target sample flow data; the plurality of flow data are flow data corresponding to a plurality of third time periods within the third preset time period;
[0036] Similarity calculations are performed on the target sample feature information and the multiple reference feature information respectively to determine the target reference flow data with the greatest similarity to the target sample flow data; the multiple reference feature information is reference information corresponding to the multiple pre-stored reference flow data.
[0037] In the above solution, the target sample characteristic information is calculated based on a plurality of flow data in the third preset time period, including:
[0038] Compare the plurality of flow data with preset flow data among the plurality of flow data respectively, to obtain target sample point information corresponding to the plurality of flow data respectively; the preset flow data represents the maximum or minimum flow data among the plurality of flow data;
[0039] Acquire external point information respectively corresponding to the plurality of third time periods in the third preset time period; the external point information represents the quantity information of transaction activities respectively corresponding to the plurality of third time periods;
[0040] The target sample point information and the external point information are combined to obtain the target sample feature information.
[0041] In the above solution, the similarity calculation is performed on the target sample feature information and the multiple reference feature information respectively to determine the target reference flow data with the greatest similarity to the target sample flow data, including:
[0042] Similarity calculations are performed on the target sample characteristic information and the multiple reference characteristic information respectively to obtain the third cosine distances between the target sample characteristic information and the multiple reference characteristic information respectively, and the target reference flow data corresponding to the maximum third cosine distance is determined.
[0043] In the above scheme, the at least one dimension includes: a time dimension and a business dimension; the flow proportion information includes: time flow proportion information and business flow proportion information; the target flow information includes: target time flow information and target business flow information;
[0044] The determining, based on the traffic proportion information of the target reference traffic data in the at least one dimension, target traffic information of the at least one dimension corresponding to the predicted traffic data respectively includes at least one of the following:
[0045] Acquire multiple time flow ratio information of multiple time periods of the target reference flow data on the time dimension, and multiply the multiple time flow ratio information by the predicted flow data to obtain the target time flow information of the predicted flow data in the multiple time periods on the time dimension;
[0046] Obtain multiple business flow proportion information corresponding to multiple businesses in the business dimension of the target reference flow data, and multiply the multiple business flow proportion information by the predicted flow data to obtain the target business flow information corresponding to the multiple businesses in the business dimension of the predicted flow data.
[0047] The embodiment of the present invention further provides a flow prediction device, comprising:
[0048] A data acquisition unit, used to acquire sample flow data corresponding to a plurality of first time periods within a first preset time period; the sample flow data represents flow distribution information of the corresponding first time period in at least one dimension;
[0049] A prediction unit, configured to predict a plurality of sample flow data using a prediction model to obtain predicted flow data for a target time period; the predicted flow data represents predicted flow distribution information for the target time period in the at least one dimension;
[0050] A first processing unit is used to extract target feature information of the predicted traffic data, and based on the target feature information, determine target reference traffic data with the greatest similarity to the predicted traffic data from a plurality of reference traffic data; the plurality of reference traffic data are reference traffic data corresponding to a plurality of second time periods within a second preset time period; the second preset time period includes the first preset time period;
[0051] The second processing unit is used to determine the target flow information of the at least one dimension corresponding to the predicted flow data based on the flow proportion information of the target reference flow data in the at least one dimension.
[0052] An embodiment of the present invention further provides a traffic prediction device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the steps in the above method.
[0053] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are implemented.
[0054] In an embodiment of the present invention, sample flow data corresponding to multiple first time periods within a first preset time period are obtained; a prediction model is used to predict multiple sample flow data to obtain predicted flow data for a target time period; target feature information of the predicted flow data is extracted, and target reference flow data with the greatest similarity to the predicted flow data is determined based on the target feature information; based on flow proportion information of the target reference flow data in at least one dimension, target flow information of at least one dimension corresponding to the predicted flow data is determined; since the target reference flow data is the flow data with the greatest similarity to the predicted flow data in each dimension, the flow data in the dimension corresponding to the predicted flow data is determined based on the flow distribution information of the target reference flow data in at least one dimension, thereby improving the flow data prediction accuracy of the predicted flow data in the corresponding dimension. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The effect of the existing traffic prediction method is shown in FIG. Figure 1 ;
[0056] Figure 2 The effect of the existing traffic prediction method is shown in FIG. Figure 2 ;
[0057] Figure 3 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0058] Figure 4 An optional effect diagram of the flow prediction method provided by an embodiment of the present invention;
[0059] Figure 5 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0060] Figure 6 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0061] Figure 7 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0062] Figure 8 An optional effect diagram of the flow prediction method provided by an embodiment of the present invention;
[0063] Fig. 9 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0064] Fig.10 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0065] Fig.11 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0066] Fig.12 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0067] Fig.13 An optional effect diagram of the flow prediction method provided by an embodiment of the present invention;
[0068] Fig.14 An optional flow chart of a flow prediction method provided in an embodiment of the present invention;
[0069] Fig.15 A schematic diagram of the structure of a flow prediction device provided by an embodiment of the present invention;
[0070] Fig.16 A schematic diagram of a hardware entity of a traffic prediction device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0072] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0073] If similar descriptions of "first / second" appear in the invention document, the following description is added. In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the invention described herein can be implemented in an order other than that illustrated or described herein.
[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.
[0075] There are two types of traffic prediction methods in the prior art: one is single-step rolling prediction, and the other is multi-step output prediction. Figure 1 , which is a schematic diagram of the effect of the existing traffic prediction method Figure 1 . Among them, the single-step rolling prediction model will train a single-step prediction model, that is, the single-step rolling prediction model only outputs the traffic prediction value of one time point in one prediction. When the server needs to predict the traffic prediction value corresponding to time N+1 and time N+2. The server inputs the traffic values corresponding to time 1, time 2, ..., and time N into the single-step rolling prediction model, and then the single-step rolling prediction model will output the traffic prediction value corresponding to time N+1. The server then determines the subdivided traffic value corresponding to time N+1 according to the preset ratio corresponding to time N+1. The server then inputs the traffic values corresponding to time 2, time 3, ..., time N, and time N+1 into the single-step rolling prediction model, and then the single-step rolling prediction model will output the traffic prediction value corresponding to time N+2. The server then determines the subdivided traffic value corresponding to time N+1 according to the preset ratio corresponding to time N+1. The single-step rolling prediction only predicts the traffic value of one future time point each time, and then uses the predicted value of the predicted time point as the new feature to continue predicting the traffic value of the next time point. In this case, the predicted time series feature points have no real data, so the error will also accumulate to a large extent. The prediction error of the segmented traffic of the overall traffic is also large. Figure 2 , which is a schematic diagram of the effect of the existing traffic prediction method Figure 2. Multi-step output prediction is equivalent to training x models, where x is the number of time points that need to be predicted. The server inputs the traffic values corresponding to time 1, time 2... and time N into the multi-step output prediction model corresponding to time N+1. The multi-step output prediction model will then output the traffic prediction value corresponding to time N+1. The server then determines the segmented traffic value corresponding to time N+1 based on the preset ratio corresponding to time N+1. The server then inputs the traffic values corresponding to time 1, time 2... and time N into the multi-step output prediction model corresponding to time N+2. The multi-step output prediction model will then output the traffic prediction value corresponding to time N+2. The server then determines the segmented traffic value corresponding to time N+2 based on the preset ratio corresponding to time N+2.
[0076] In the above technical solution, the server determines the segmented traffic according to a preset ratio. This solution cannot cope well with the situation of daily ratio changes and has a large error.
[0077] In order to solve the above technical problem, an embodiment of the present invention provides a flow prediction method. Figure 3 An optional flow chart of the flow prediction method provided by the embodiment of the present invention is combined with Figure 3 The steps shown are explained.
[0078] S101. Obtain multiple sample flow data corresponding to multiple first time periods within a first preset time period.
[0079] In the embodiment of the present invention, the server extracts sample flow data corresponding to multiple first time periods within the first preset time period from its own database, wherein the sample flow data represents flow distribution information of the corresponding first time period in at least one dimension.
[0080] In an embodiment of the present invention, a server can carry multiple clients. Multiple clients will upload their own traffic data to the database of the server in multiple first time periods within the first preset time period. The server extracts the traffic data of multiple clients in multiple first time periods within the first preset time period in the corresponding database. The server aggregates the traffic data of multiple clients to form sample traffic data corresponding to each first time period. Among them, the sample traffic data represents the traffic distribution information of multiple clients in at least one dimension in the corresponding first time period.
[0081] In the embodiment of the present invention, the server predicts the predicted traffic data of the target time period through multiple sample traffic data. The first preset time period is the time period before the target time period. The first time period and the target time period have the same length cycle.
[0082] Exemplarily, the target time period may be Monday, and the first preset time period may be from Monday of last week to Sunday of last week, wherein the first time period may be Monday of last week or Tuesday of last week, etc.
[0083] S102: Use a prediction model to predict multiple sample flow data to obtain predicted flow data for a target time period.
[0084] In the embodiment of the present invention, the server inputs a plurality of sample flow data corresponding to a plurality of first time periods into a trained prediction model, and outputs the predicted flow data of the target time period through the prediction model.
[0085] In the embodiment of the present invention, the server may input a plurality of sample traffic data into a Gradient Boost Regression Tree (GBRT) model, and the server outputs the predicted traffic data of the target time period through the GBRT.
[0086] In the embodiment of the present invention, the server may input a plurality of sample traffic data into a Gradient Boost Decision Tree (GBDT) model, and the server outputs the predicted traffic data of the target time period through the GBDT.
[0087] In the embodiment of the present invention, the server may input a plurality of sample traffic data into a Multiple Additive Regression Tree (MART) model, and the server outputs the predicted traffic data for the target time period through MART.
[0088] The predicted traffic data represents the predicted traffic distribution information of multiple clients in the target time period in at least one dimension. Exemplarily, the predicted traffic data may represent the predicted traffic distribution information of multiple clients in the target time period in multiple time periods in the time dimension. The predicted traffic data may also represent the predicted traffic distribution information corresponding to multiple services of multiple clients in the service dimension at the target time end.
[0089] Exemplary, combined Figure 4 , is an optional effect diagram of the flow prediction method provided by an embodiment of the present invention. The server obtains predicted flow data for Wednesday. The server first extracts sample flow data from the database, that is, sample flow data for Monday and Tuesday.
[0090] Among them, the sample traffic data on Monday includes: traffic data on Monday in each time period of 0 o'clock, 1 o'clock, 2 o'clock, ..., 24 o'clock or traffic data on Monday corresponding to business 1, business 2, business 3, ..., business n.
[0091] The sample traffic data on Tuesday includes: the traffic data on Tuesday in each time period of 0:00, 1:00, 2:00, ..., 24:00 or the traffic data on Tuesday corresponding to business 1, business 2, business 3, ..., business n. The server inputs the sample traffic data on Monday and the sample traffic data on Tuesday into the prediction model to obtain the predicted traffic data on Wednesday. The predicted traffic data on Wednesday includes: the traffic data on Wednesday in each time period of 0:00, 1:00, 2:00, ..., 24:00 or the traffic data on Wednesday corresponding to business 1, business 2, business 3, ..., business n.
[0092] S103: extract target feature information of the predicted traffic data, and based on the target feature information, determine target reference traffic data having the greatest similarity to the predicted traffic data from among multiple reference traffic data.
[0093] In an embodiment of the present invention, first, the server needs to calculate the reference feature information corresponding to the reference flow data corresponding to the multiple second time periods within the second preset time period. The server calculates the target feature information corresponding to the predicted flow data. The server performs similarity calculations on the target feature information and the multiple reference feature information respectively, and obtains the similarities corresponding to the multiple reference flow data respectively. The server determines the target reference flow data corresponding to the minimum similarity.
[0094] The second preset time period may include the first preset time period. For example, the first preset time period may be one week before the target time period, and the corresponding second preset time period may be one month or one year before the target time period.
[0095] The reference traffic data may be traffic distribution information of multiple clients in at least one dimension in the corresponding second time period.
[0096] In an embodiment of the present invention, the server first calculates sample feature information corresponding to multiple sample flow data. The server then calculates target feature information of the predicted flow data. The server performs similarity calculations on the target feature information and multiple sample feature information respectively, and obtains the similarities between the predicted flow data and the multiple sample flow data respectively. The server determines that the sample flow data corresponding to the greatest similarity is the target sample flow data. The server performs similarity calculations on the target sample feature information corresponding to the target sample flow data and multiple pre-stored reference feature information respectively, and obtains the similarities between the target sample flow data and the multiple reference flow data respectively. The server determines that the reference flow data corresponding to the greatest similarity is the target reference flow data.
[0097] S104: Based on the traffic proportion information of the target reference traffic data in at least one dimension, determine the target traffic information of at least one dimension corresponding to the predicted traffic data.
[0098] In an embodiment of the present invention, the server obtains traffic distribution information of the target reference traffic data in at least one dimension. The traffic distribution information may be traffic proportion information of the target reference traffic data in at least one dimension. The server calculates the traffic distribution information and the predicted traffic data, and the predicted traffic data respectively corresponds to the target traffic information of each segment in at least one dimension.
[0099] Among them, at least one dimension may include a time dimension and a business dimension.
[0100] In an embodiment of the present invention, the server may obtain the flow ratio information of each time period of the target reference flow data in the time dimension. For example, the flow ratio information of a time period may be: 1%. The server multiplies the predicted flow data by the flow ratio information corresponding to each time period to obtain the target flow information corresponding to each time period of the predicted flow data.
[0101] In the embodiment of the present invention, the server can obtain the traffic proportion information of each service corresponding to the target reference traffic data in the service dimension. The server multiplies the predicted traffic data by the traffic proportion information corresponding to each service to obtain the target traffic information corresponding to each service.
[0102] In an embodiment of the present invention, sample flow data corresponding to multiple first time periods are obtained; a prediction model is used to predict multiple sample flow data to obtain predicted flow data for a target time period; target feature information of the predicted flow data is extracted, and target reference flow data having the greatest similarity to the predicted flow data is determined based on the target feature information; target flow information corresponding to at least one dimension of the predicted flow data is determined based on flow proportion information of the target reference flow data in at least one dimension; since the target reference flow data is the flow data having the greatest similarity to the predicted flow data in all dimensions, the flow data in the dimension corresponding to the predicted flow data is determined based on the flow distribution information of the target reference flow data in at least one dimension, thereby improving the flow data prediction accuracy of the predicted flow data in the corresponding dimension.
[0103] In some embodiments, see Figure 5 , Figure 5 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Figure 3 The illustrated S103 can be implemented through S105 to S106, which will be described in conjunction with each step.
[0104] S105. Extract target feature information from the predicted traffic data, and determine, based on the target feature information, target sample traffic data having the greatest similarity to the predicted traffic data among multiple sample traffic data.
[0105] In an embodiment of the present invention, the server can extract corresponding target feature information from the predicted traffic data. The target feature information can be a multidimensional vector corresponding to the predicted traffic data. The server then calculates that multiple sample traffic data respectively correspond to the sample feature information. The server performs similarity calculation on the target feature information and the multiple sample feature information, and obtains the similarity between the predicted traffic data and the multiple sample traffic data. The server determines that the sample traffic data corresponding to the maximum similarity is the target sample traffic data.
[0106] In the embodiment of the present invention, the server obtains the traffic data of multiple time periods in the time dimension of the predicted traffic data. The server performs normalization calculation on the traffic data of multiple time periods, unifies the traffic data of multiple time periods into one order of magnitude, and obtains the preset time point information corresponding to the multiple time periods. The server can obtain the target feature information of the predicted traffic data by combining the multiple preset time point information. Correspondingly, the server can calculate the sample feature information of the sample traffic data by a similar method.
[0107] S106. Extract target sample characteristic information from the target sample flow data, and determine target reference flow data from multiple reference flow data based on the target sample characteristic information.
[0108] In an embodiment of the present invention, the server first needs to extract corresponding reference feature information from multiple reference flow data. The server stores multiple reference feature information. The server then extracts target sample feature information of the target sample flow data. The server calculates similarity between the target sample feature information and multiple reference feature information. The server obtains the similarity between the target sample feature data and multiple reference flow data. The server determines that the reference flow data corresponding to the maximum similarity is the target reference flow data.
[0109] In an embodiment of the present invention, the server can extract multiple flow data corresponding to multiple third time periods within a third preset time period before the first time period corresponding to the target sample flow data. The server calculates and processes the multiple flow data to obtain target sample characteristic information corresponding to the target sample flow data. Correspondingly, the server can calculate the reference characteristic information corresponding to the reference flow data by the same method. It should be noted that when calculating the reference characteristic information, the server needs to extract multiple flow data within the third preset time period before the second time period corresponding to each reference flow data.
[0110] In an embodiment of the present invention, the server first determines the target sample flow data from multiple sample flow data through the target characteristic information of the predicted flow data, and determines the target reference flow data that is most similar to the predicted flow from multiple reference flow data based on the target sample characteristic information of the target flow data. Since the time period to which the reference flow data belongs is greater than the first preset time period, the target reference flow data determined by this scheme is closer in similarity to the predicted flow data.
[0111] In some embodiments, see Figure 6 , Figure 6 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Figure 5 The illustrated S105 can be implemented through S107 to S109, which will be described in conjunction with each step.
[0112] S107: Extract target dimension feature information of the predicted traffic data in any dimension.
[0113] In the embodiment of the present invention, the server may obtain target feature information of the predicted traffic data in any dimension by calculating the traffic data of multiple nodes in any dimension of the predicted traffic data.
[0114] In the embodiment of the present invention, at least one dimension may include a time dimension and a business dimension. The server may obtain target feature information of the predicted traffic data in the time dimension by calculating traffic data in multiple time periods of the predicted traffic data in the time dimension.
[0115] In the embodiment of the present invention, the server may obtain target feature information of the predicted traffic data in the business dimension by calculating the traffic data of multiple businesses corresponding to the predicted traffic data in the business dimension.
[0116] S108. Extract multiple sample feature information corresponding to multiple sample flow data on corresponding dimensions of predicted flow data.
[0117] In the embodiment of the present invention, if the server calculates the target feature information of the predicted traffic data in the time dimension in S107, the server calculates the sample feature information corresponding to the multiple sample traffic data in the time dimension in S108.
[0118] In the embodiment of the present invention, if the server calculates the target feature information of the predicted traffic data in the business dimension in S107, the server calculates the sample feature information corresponding to the multiple sample traffic data in the business dimension in S108.
[0119] S109: Perform similarity calculations on the target dimension feature information and multiple sample feature information respectively to determine the target sample flow data with the greatest similarity to the predicted flow data.
[0120] In the embodiment of the present invention, the server can perform similarity calculations on the target feature information in the time dimension and the multiple sample feature information in the time dimension, and obtain the similarities corresponding to the predicted traffic data and the multiple sample traffic data. The server determines that the sample traffic data corresponding to the maximum similarity among the multiple similarities is the target sample traffic data.
[0121] In an embodiment of the present invention, the server can perform similarity calculations on the target feature information on the business dimension and the multiple sample feature information on the business dimension, and obtain the similarities between the predicted traffic data and the multiple sample traffic data. The server determines that the sample traffic data corresponding to the maximum similarity among the multiple similarities is the target sample traffic data.
[0122] The server performs similarity calculation on the target feature information and the plurality of sample feature information respectively, so as to achieve the calculation by calculating the cosine distance or Euclidean distance between the target feature information and the plurality of sample feature information respectively.
[0123] In the embodiment of the present invention, the server calculates the target feature information corresponding to the predicted traffic data, and then calculates the sample feature information corresponding to the multiple sample traffic data. The server can accurately determine the similarity between the predicted traffic data and the multiple sample traffic data by calculating the similarity between the target feature information and the multiple sample feature information.
[0124] In some embodiments, see Figure 7 , Figure 7 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Figure 6 S107 to S109 shown can be implemented through S110 to S114, which will be described in conjunction with each step.
[0125] S110, comparing the traffic data of multiple time periods in the time dimension of the predicted traffic data with the preset time traffic data of the preset time period, to obtain information of multiple preset time points corresponding to the multiple time periods.
[0126] In the embodiment of the present invention, the server has previously obtained the predicted traffic data, and has also obtained the traffic data of multiple time periods in the time dimension of the predicted traffic data. The server compares the traffic data of multiple time periods with the preset traffic data of the preset time period. Furthermore, the server can obtain information of multiple preset time points of multiple traffic data at the same level.
[0127] The preset flow data may be the maximum flow data or the minimum flow data.
[0128] S111. Combine multiple preset time point information to obtain a target time vector.
[0129] In the embodiment of the present invention, the server lists the preset time point information of the predicted traffic data corresponding to multiple time periods in order to obtain the target time vector corresponding to the predicted traffic data, wherein the target time vector is a multi-dimensional vector.
[0130] Exemplary, combined Figure 8 The server obtains the traffic data for Wednesday's forecast at 0:00, 1:00, 2:00, ..., 24:00, which are 1000, 2000, 3000 ..... 10000. The server compares the traffic data for each time period with the maximum traffic data value of 10000, and then obtains the preset time point information 0.1, 0.2, 0.3 ..... 1 for each time period of the forecast traffic data corresponding to 0:00, 1:00, 2:00, ..., 24:00. The server combines 0.1, 0.2, 0.3 ..... 1 to obtain the target time vector of the forecast traffic data.
[0131] S112. In the time dimension, compare the traffic data of each sample traffic data in multiple time periods with the preset time traffic data of the preset time period to obtain multiple preset sample time point information corresponding to the multiple time periods.
[0132] In the embodiment of the present invention, the server has previously obtained multiple sample flow data, and also obtained flow data of each sample flow data in multiple time periods in the time dimension. The server compares the flow data of each sample flow data in multiple time periods with the preset flow data of each sample flow data in the preset time period. Then, the server can obtain multiple preset sample time point information of multiple flow data of each sample flow data at the same level.
[0133] The preset flow data may be the largest flow data or the smallest flow data among multiple flow data of the sample flow data.
[0134] S113. Combine multiple preset sample time point information to obtain multiple sample time vectors corresponding to multiple sample flow data.
[0135] In the embodiment of the present invention, the server lists the preset sample time point information of each sample flow data corresponding to multiple time periods in order, and obtains the sample time vector corresponding to each sample flow data. Then, the sample time vectors corresponding to multiple sample flow data can be obtained by the same method. Among them, the sample time vector is a multi-dimensional vector.
[0136] Exemplary, combined Figure 8 The server obtains sample traffic data for Monday. The traffic data for each time period at 0:00, 1:00, 2:00, ..., 24:00 on Monday are 100, 200, 300 ..... 1000 respectively.
[0137] The server compares the traffic data of each time period with the maximum traffic data value 1000, and then obtains the sample time point information 0.1, 0.2, 0.3...1 of each time period corresponding to 0:00, 1:00, 2:00, ..., 24:00 of the sample traffic data on Monday. The server combines 0.1, 0.2, 0.3.....1 to obtain the sample time vector of the sample traffic data on Monday.
[0138] Exemplary, combined Figure 8 The server obtains the sample traffic data of Tuesday at 0:00, 1:00, 2:00, ..., 24:00, which are 300, 400, 500...1000 respectively. The server compares the traffic data of each time period with the maximum traffic data value 1000, and then obtains the sample time point information of Tuesday's sample traffic data corresponding to 0:00, 1:00, 2:00, ..., 24:00, 0.3, 0.4, 0.5...1. The server combines 0.3, 0.4, 0.5...1 to obtain the sample time vector of Tuesday's sample traffic data.
[0139] S114. Perform similarity calculations on the target time vector and the multiple sample time vectors respectively to obtain the first cosine distances between the target time vector and the multiple sample time vectors respectively, and determine the target sample flow data corresponding to the maximum first cosine distance.
[0140] In the embodiment of the present invention, the server calculates the first cosine distances between the target time vector and the multiple sample time vectors respectively. The server can obtain the first cosine distances corresponding to the multiple sample flow data respectively. The server determines that the sample flow data corresponding to the largest first cosine distance is the target sample flow data.
[0141] Exemplary, combined Figure 8 The server can calculate the first cosine distance cosθ between the target time vector and multiple sample time vectors through formula (1).
[0142]
[0143] Wherein, the target time vector is a and the sample time vector is b. The server can multiply the target time vector and the sample time vector, and then multiply the modulus of the target time vector and the modulus of the sample time vector to obtain the first cosine distance corresponding to the sample time vector.
[0144] In an embodiment of the present invention, the server normalizes the predicted traffic data and the traffic data of multiple time periods of the sample traffic to a uniform order of magnitude in the time dimension, and then the server can quickly calculate the similarity between the predicted traffic data and the multiple sample traffic data.
[0145] In some embodiments, see Fig. 9 , Fig. 9 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Figure 7 S110 to S114 shown can be implemented through S115 to S119, which will be described in conjunction with each step.
[0146] S115. Compare the traffic data corresponding to multiple businesses in the business dimension with the traffic data corresponding to the preset business, and obtain information of multiple preset business points corresponding to the multiple businesses.
[0147] In the embodiment of the present invention, the server has previously obtained the predicted traffic data, and has also obtained the traffic data of multiple services corresponding to the predicted traffic data in the service dimension. The server compares the traffic data of multiple services with the preset service traffic data corresponding to the preset service. Furthermore, the server can obtain information of multiple preset service points at the same level of multiple traffic data.
[0148] The preset service flow data may be the maximum service flow data or the minimum service flow data.
[0149] S116: Combine information of multiple preset service points to obtain a target service vector.
[0150] In the embodiment of the present invention, the server lists the information of multiple preset service points corresponding to the predicted traffic data in order to obtain the target service vector corresponding to the predicted traffic data, wherein the target service vector is a multi-dimensional vector.
[0151] S117. In the business dimension, each sample flow data of the multiple sample flow data is compared with the flow data corresponding to the multiple businesses, and the preset business flow data of the preset business is calculated to obtain multiple preset sample business point information corresponding to the multiple businesses.
[0152] In the embodiment of the present invention, the server has previously obtained multiple sample traffic data, and also obtained traffic data of multiple services corresponding to each sample traffic data in the service dimension. The server compares the traffic data corresponding to multiple services of each sample traffic data with the preset service traffic data of the preset service of each sample traffic data. Then, the server can obtain multiple preset sample service point information of the same magnitude for multiple traffic data of each sample traffic data.
[0153] S118. Combine multiple preset sample service point information to obtain multiple sample service vectors corresponding to multiple sample flow data.
[0154] In the embodiment of the present invention, the server lists the preset sample service point information of multiple services corresponding to each sample flow data in order, and obtains the sample service vector corresponding to each sample flow data. Then, the sample service vectors corresponding to multiple sample flow data can be obtained by the same method. Among them, the sample service vector is a multi-dimensional vector.
[0155] S119. Perform similarity calculations on the target business vector and multiple sample business vectors respectively to obtain second cosine distances between the target business vector and multiple sample business vectors respectively, and determine target sample traffic data corresponding to the maximum second cosine distance.
[0156] In the embodiment of the present invention, the server calculates the second cosine distances between the target business vector and the plurality of sample business vectors. The server can obtain the second cosine distances corresponding to the plurality of sample flow data. The server determines the sample flow data corresponding to the largest second cosine distance as the target sample flow data.
[0157] In an embodiment of the present invention, the server normalizes the predicted traffic data and the traffic data corresponding to multiple services of the sample traffic to a uniform order of magnitude in the time dimension, and then the server can quickly calculate the similarity between the predicted traffic data and the multiple sample traffic data.
[0158] In some embodiments, see Fig.10 , Fig.10 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Figure 6 The illustrated S106 can be implemented through S120 to S121 , which will be described in conjunction with each step.
[0159] S120. Calculate target sample characteristic information based on multiple traffic data within a third preset time period; the third preset time period is the time period before the first time period corresponding to the target sample traffic data; the multiple traffic data are traffic data corresponding to multiple third time periods within the third preset time period.
[0160] In an embodiment of the present invention, the server first needs to extract multiple flow data in a third preset time period before the first time period corresponding to the target sample flow data. The multiple flow data are flow data corresponding to multiple third time periods in the third preset time period. The server obtains the target sample feature information based on the numerical normalization processing of the multiple flow data.
[0161] For example, the server may compare each flow data with the maximum flow data to obtain point information corresponding to multiple flow data respectively. The server arranges the multiple point information in order to obtain the target sample feature information.
[0162] S121. Perform similarity calculations on the target sample feature information and multiple reference feature information respectively to determine the target reference flow data with the greatest similarity to the target sample flow data.
[0163] In the embodiment of the present invention, the server first needs to calculate the reference feature information corresponding to the multiple reference flow data in the same way as the target sample feature information. The server then calculates the similarity between the target sample feature information and the multiple reference feature information. Then the server obtains the similarity corresponding to the multiple reference flow data, and the server determines the target reference flow data corresponding to the maximum similarity.
[0164] In the embodiment of the present invention, the server determines the corresponding target sample characteristic information through multiple flow data in the third preset time period before the first time period corresponding to the target sample flow data. At the same time, the server also uses the same method to determine the reference characteristic information corresponding to the reference flow data. Since the above two types of information are determined based on the flow in the corresponding time period, the determination standard of the characteristic information is unified, and then the server can accurately determine the similarity between the target sample flow data and multiple reference flow data.
[0165] In some embodiments, see Fig.11 , Fig.11 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Fig.10 S120 to S121 shown can be implemented through S122 to S125, which will be described in conjunction with each step.
[0166] S122. Compare the plurality of flow data with the preset flow data in the plurality of flow data to obtain target sample point information corresponding to the plurality of flow data.
[0167] In an embodiment of the present invention, the server compares multiple flow data within a third preset time period corresponding to the target sample flow data with the maximum flow data or the minimum flow data among the multiple flow data to obtain target sample point information corresponding to the multiple flow data.
[0168] S123: Obtain external point information corresponding to a plurality of third time periods in the third preset time period.
[0169] In the embodiment of the present invention, the server obtains external point information corresponding to multiple third time periods within a third preset time period corresponding to the target sample flow data.
[0170] The external point information may be activity quantity values corresponding to a plurality of clients in a corresponding third time period.
[0171] S124: Combine multiple target sample point information and multiple external point information to obtain target sample feature information.
[0172] In the embodiment of the present invention, the server arranges the multiple target sample point information and the multiple external point information in sequence to obtain the target sample feature information.
[0173] It should be noted that the server can calculate multiple reference feature information corresponding to multiple reference traffic data using the same method.
[0174] S125. Perform similarity calculations on the target sample feature information and multiple reference feature information respectively to obtain the third cosine distances between the target sample feature information and multiple reference feature information respectively, and determine the target reference flow data corresponding to the maximum third cosine distance.
[0175] In the embodiment of the present invention, the server calculates the third cosine distances between the target sample feature information and the plurality of reference feature information, and determines the reference flow data corresponding to the largest third cosine distance as the target flow data.
[0176] The value range of the third cosine distance is between (-1, 1). The closer the third cosine distance is to 1, the greater the similarity between the target sample flow data and the corresponding reference flow data.
[0177] In some embodiments, see Fig.12 , Fig.12 An optional flow chart of a flow prediction method provided by an embodiment of the present invention, Figure 3 The illustrated S104 can be implemented through S126 to S127, which will be described in conjunction with each step.
[0178] S126. Obtain multiple time flow proportion information of multiple time periods of the target reference flow data in the time dimension, and multiply the multiple time flow proportion information by the predicted flow data to obtain the target time flow information of the predicted flow data in the multiple time periods in the time dimension.
[0179] In the embodiment of the present invention, the server obtains the flow ratio information of the target reference flow data in multiple time periods in the time dimension. The server multiplies the multiple flow ratio information by the predicted flow data, and then obtains the target time flow information in multiple time periods corresponding to the predicted flow data in the target time period.
[0180] S127. Obtain multiple business flow proportion information corresponding to multiple businesses in the business dimension of the target reference flow data, and multiply the multiple business flow proportion information by the predicted flow data to obtain target business flow information corresponding to multiple businesses in the business dimension of the predicted flow data.
[0181] In an embodiment of the present invention, the server obtains traffic proportion information corresponding to multiple services in the service dimension of the target reference traffic data. The server multiplies the multiple traffic proportion information by the predicted traffic data to obtain target service traffic information corresponding to multiple services corresponding to the predicted traffic data in the target time period.
[0182] Exemplary, combined Fig.13 The target reference traffic data obtained by the server is 100, and the predicted traffic data obtained by the server is 1000. At the same time, the server obtains the traffic proportion information corresponding to multiple services of the target reference traffic data as 10%, 20%, 30% and 40%. The server multiplies the traffic proportion information corresponding to multiple services of 10%, 20%, 30% and 40% by the predicted traffic data of 1000, and the target business traffic information corresponding to the predicted traffic data corresponding to multiple services is 100, 200, 300 and 400 respectively.
[0183] In some embodiments, see Fig.14 , Fig.14 An optional flow chart of the traffic prediction method provided for an embodiment of the present invention will be described in conjunction with each step.
[0184] S128. The server obtains predicted traffic data.
[0185] In the embodiment of the present invention, the server first obtains a plurality of sample flow data, and then inputs the plurality of sample flow data into a prediction model to obtain predicted flow data.
[0186] S129. The server calculates the similarity between the predicted traffic data and multiple sample traffic data.
[0187] In the embodiment of the present invention, the server first calculates the target feature information of the predicted traffic data, and then performs similarity calculations on the target feature information and multiple sample feature information, and obtains the similarity of the corresponding multiple sample traffic data.
[0188] S130. The server determines the target sample traffic data with the greatest similarity.
[0189] In the embodiment of the present invention, the server determines the similarity sample flow data as the target sample flow data.
[0190] S131. The server drills down on the predicted traffic data based on the traffic proportion information of each dimension of the target sample traffic data.
[0191] In the embodiment of the present invention, the server obtains the flow proportion information of each node in each dimension of the target sample flow data. The server multiplies the multiple flow proportion information by the predicted flow data to obtain the target flow information of each node in each dimension of the predicted flow data.
[0192] See also Fig.15 , Fig.15 A schematic diagram of the structure of a flow prediction device provided in an embodiment of the present invention.
[0193] The embodiment of the present invention further provides a traffic prediction device 800 , including: a data acquisition unit 803 , a prediction unit 804 , a first processing unit 805 and a second processing unit 806 .
[0194] The data acquisition unit 803 is used to acquire a plurality of sample flow data corresponding to a plurality of first time periods within a first preset time period; each sample flow data represents flow distribution information of the corresponding first time period in at least one dimension;
[0195] The prediction unit 804 is used to predict the multiple sample flow data using the prediction model to obtain the predicted flow data of the target time period; the predicted flow data represents the predicted flow distribution information of the target time period in at least one dimension;
[0196] The first processing unit 805 is used to extract target feature information of the predicted traffic data, and based on the target feature information, determine the target reference traffic data with the greatest similarity to the predicted traffic data from among multiple reference traffic data; the multiple reference traffic data are traffic data corresponding to multiple second time periods within a second preset time period; the second preset time period includes the first preset time period;
[0197] The second processing unit 806 is used to determine the target flow information of at least one dimension corresponding to the predicted flow data based on the flow proportion information of the target reference flow data in at least one dimension.
[0198] In an embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to extract target feature information from the predicted traffic data, and based on the target feature information, determine the target sample traffic data with the greatest similarity to the predicted traffic data among multiple sample traffic data; extract target sample feature information from the target sample traffic data, and based on the target sample feature information, determine the target reference traffic data among multiple reference traffic data.
[0199] In an embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to extract target dimension feature information of the predicted traffic data in any dimension; extract multiple sample feature information corresponding to multiple sample traffic data in the corresponding dimension of the predicted traffic data; perform similarity calculations on the target dimension feature information and the multiple sample feature information respectively, and determine the target sample traffic data with the greatest similarity to the predicted traffic data.
[0200] In an embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to compare the traffic data of multiple time periods in the time dimension of the predicted traffic data with the preset time traffic data of the preset time period to obtain multiple preset time point information corresponding to the multiple time periods; combine the multiple preset time point information to obtain a target time vector; compare the traffic data corresponding to multiple businesses in the business dimension of the predicted traffic data with the preset business traffic data corresponding to the preset business to obtain multiple preset business point information corresponding to the multiple businesses; combine the multiple preset business point information to obtain a target business vector.
[0201] In an embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to, in the time dimension, compare each sample traffic data of multiple sample traffic data in multiple time periods with the traffic data of preset time periods, to obtain multiple preset sample time point information corresponding to the multiple time periods; combine the multiple preset sample time point information to obtain multiple sample time vectors corresponding to the multiple sample traffic data; in the business dimension, compare each sample traffic data of multiple sample traffic data with the traffic data corresponding to multiple businesses, to the preset business traffic data of preset businesses, to obtain multiple preset sample business point information corresponding to the multiple businesses; combine the multiple preset sample business point information to obtain multiple sample business vectors corresponding to the multiple sample traffic data.
[0202] In an embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to perform similarity calculations on the target time vector and multiple sample time vectors respectively, obtain the first cosine distances between the target time vector and multiple sample time vectors respectively, and determine the target sample traffic data corresponding to the maximum first cosine distance; perform similarity calculations on the target business vector and multiple sample business vectors respectively, obtain the second cosine distances between the target business vector and multiple sample business vectors respectively, and determine the target sample traffic data corresponding to the maximum second cosine distance.
[0203] In the embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to calculate the target sample characteristic information based on multiple traffic data in a third preset time period; the third preset time period is a time period before the first time period corresponding to the target sample traffic data; the multiple traffic data are traffic data corresponding to multiple third time periods in the third preset time period;
[0204] Similarity calculations are performed on the target sample feature information and multiple reference feature information respectively to determine the target reference flow data with the greatest similarity to the target sample flow data; the multiple reference feature information is reference information corresponding to multiple pre-stored reference flow data.
[0205] In the embodiment of the present invention, the first processing unit 805 in the flow prediction device 800 is used to compare the multiple flow data with the preset flow data among the multiple flow data to obtain the target sample point information corresponding to the multiple flow data respectively; the preset flow data represents the maximum or minimum flow data among the multiple flow data;
[0206] Acquire external point information corresponding to a plurality of third time periods in the third preset time period; the external point information represents the quantity information of transaction activities corresponding to the plurality of third time periods;
[0207] The target sample point information and the external point information are combined to obtain the target sample feature information.
[0208] In an embodiment of the present invention, the first processing unit 805 in the traffic prediction device 800 is used to perform similarity calculations on the target sample feature information and multiple reference feature information respectively, obtain the third cosine distances between the target sample feature information and multiple reference feature information respectively, and determine the target reference traffic data corresponding to the maximum third cosine distance.
[0209] In the embodiment of the present invention, the second processing unit 806 in the traffic prediction device 800 is used to obtain multiple time traffic proportion information of multiple time periods of the target reference traffic data in the time dimension, and multiply the multiple time traffic proportion information by the predicted traffic data to obtain the target time traffic information in the multiple time periods of the predicted traffic data in the time dimension;
[0210] The target reference traffic data is obtained for multiple business traffic proportion information corresponding to multiple businesses in the business dimension, and the multiple business traffic proportion information is multiplied by the predicted traffic data to obtain the target business traffic information corresponding to the multiple businesses in the business dimension of the predicted traffic data.
[0211] In the embodiment of the present invention, the data acquisition unit 803 acquires sample flow data corresponding to a plurality of first time periods within a first preset time period; the prediction unit 804 predicts the plurality of sample flow data using a prediction model to obtain predicted flow data for a target time period; the first processing unit 805 extracts target feature information of the predicted flow data, and determines target reference flow data having the greatest similarity to the predicted flow data based on the target feature information; the second processing unit 806 determines target flow information corresponding to at least one dimension of the predicted flow data based on flow proportion information of the target reference flow data in at least one dimension. Since the target reference flow data is the flow data having the greatest similarity to the predicted flow data in all dimensions, the flow data in the corresponding dimension of the predicted flow data is determined based on the flow distribution information of the target reference flow data in at least one dimension, thereby improving the flow data prediction accuracy of the predicted flow data in the corresponding dimension.
[0212] It should be noted that in the embodiment of the present invention, if the above-mentioned traffic prediction method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including a number of instructions for a traffic prediction device (which can be a personal computer, etc.) to execute all or part of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), disk or optical disk, etc. Various media that can store program codes. In this way, the embodiment of the present invention is not limited to any specific combination of hardware and software.
[0213] Correspondingly, an embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method are implemented.
[0214] Correspondingly, an embodiment of the present invention provides a traffic prediction device 800, including a memory 802 and a processor 801, the memory 802 stores a computer program that can be executed on the processor 801, and the processor 801 implements the steps in the above method when executing the program.
[0215] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present invention, please refer to the description of the method embodiments of the present invention for understanding.
[0216] It should be noted that Fig.16 A schematic diagram of a hardware entity of a traffic prediction device provided by an embodiment of the present invention, such as Fig.16 As shown, the hardware entity of the traffic prediction device 800 includes: a processor 801 and a memory 802, wherein;
[0217] The processor 801 generally controls the overall operation of the traffic prediction device 800 .
[0218] The memory 802 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by the processor 801 and each module in the traffic prediction device 800 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM).
[0219] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0220] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0221] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0222] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0223] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0224] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.
[0225] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a mobile storage device, ROM, a magnetic disk or an optical disk.
[0226] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art 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 invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A flow prediction method, characterized in that: include: Acquire a plurality of sample flow data corresponding to a plurality of first time periods within a first preset time period; Each sample traffic data represents traffic distribution information in at least one dimension in the corresponding first time period; Using a prediction model to predict the multiple sample flow data to obtain predicted flow data for a target time period; the predicted flow data represents predicted flow distribution information for the target time period in the at least one dimension; Extracting target feature information from the predicted traffic data, and determining, based on the target feature information, target sample traffic data having the greatest similarity to the predicted traffic data among the plurality of sample traffic data; Extracting target sample characteristic information from the target sample flow data, and determining target reference flow data from a plurality of reference flow data based on the target sample characteristic information; the plurality of reference flow data are flow data corresponding to a plurality of second time periods within a second preset time period; The second preset time period includes the first preset time period; Based on the traffic proportion information of the target reference traffic data in the at least one dimension, it is determined that the target traffic information of the at least one dimension respectively corresponds to the predicted traffic data.
2. The flow prediction method according to claim 1, characterized in that: The target feature information includes: target dimension feature information; The step of extracting target feature information from the predicted traffic data and determining, based on the target feature information, target sample traffic data having the greatest similarity to the predicted traffic data among the plurality of sample traffic data comprises: Extracting target dimension feature information of the predicted traffic data in any dimension; Extracting a plurality of sample feature information corresponding to the plurality of sample flow data on the corresponding dimensions of the predicted flow data; Similarity calculations are performed on the target dimension feature information and the multiple sample feature information respectively to determine the target sample flow data having the greatest similarity to the predicted flow data.
3. The flow prediction method according to claim 2, characterized in that: The at least one dimension includes: a time dimension and a business dimension; the target dimension feature information includes: any one of a target time vector and a target business vector; The extracting target dimension feature information of the predicted traffic data in any dimension includes one of the following: Compare the traffic data of multiple time periods in the time dimension with the traffic data of preset time periods, and obtain information of multiple preset time points corresponding to the multiple time periods; Combining the plurality of preset time point information to obtain the target time vector; The predicted traffic data is compared with the traffic data corresponding to the multiple services in the service dimension, and the preset service traffic data corresponding to the preset service is compared, to obtain information of multiple preset service points corresponding to the multiple services; The target service vector is obtained by combining the plurality of preset service point information.
4. The flow prediction method according to claim 3, characterized in that: The sample feature vector includes: any one of a sample time vector and a sample business vector; The extracting a plurality of sample feature information corresponding to the plurality of sample flow data in the corresponding dimension of the predicted flow data includes one of the following: In the time dimension, each sample flow data of the plurality of sample flow data in the plurality of time periods is compared with the preset time flow data of the preset time period to obtain a plurality of preset sample time point information corresponding to the plurality of time periods; Combining the plurality of preset sample time point information to obtain a plurality of sample time vectors corresponding to the plurality of sample flow data; In the business dimension, each sample flow data of the multiple sample flow data is compared with the flow data corresponding to the multiple businesses, and the preset business flow data of the preset business is calculated to obtain multiple preset sample business point information corresponding to the multiple businesses; The plurality of preset sample service point information are combined to obtain the plurality of sample service vectors corresponding to the plurality of sample traffic data.
5. The flow prediction method according to claim 4, characterized in that: The performing similarity calculation on the target dimension feature information and the plurality of sample feature information respectively to determine the target sample flow data having the greatest similarity to the predicted flow data comprises one of the following: Performing similarity calculations on the target time vector and the multiple sample time vectors respectively to obtain first cosine distances between the target time vector and the multiple sample time vectors respectively, and determining the target sample flow data corresponding to the maximum first cosine distance; Similar calculations are performed on the target business vector and the multiple sample business vectors respectively to obtain second cosine distances between the target business vector and the multiple sample business vectors respectively, and the target sample traffic data corresponding to the maximum second cosine distance is determined.
6. The flow prediction method according to any one of claims 1 to 5, characterized in that: The step of extracting target sample feature information from the target sample flow data, and determining the target reference flow data from the plurality of reference flow data based on the target sample feature information, comprises: The target sample characteristic information is calculated based on a plurality of flow data within a third preset time period; the third preset time period is a time period before the first time period corresponding to the target sample flow data; the plurality of flow data are flow data corresponding to a plurality of third time periods within the third preset time period; Similarity calculations are performed on the target sample feature information and multiple reference feature information respectively to determine the target reference flow data with the greatest similarity to the target sample flow data; the multiple reference feature information is reference information corresponding to the multiple pre-stored reference flow data.
7. The flow prediction method according to claim 6, characterized in that: The target sample characteristic information is calculated based on a plurality of flow data within a third preset time period, including: Compare the plurality of flow data with preset flow data among the plurality of flow data respectively, to obtain target sample point information corresponding to the plurality of flow data respectively; the preset flow data represents the maximum or minimum flow data among the plurality of flow data; Acquire external point information respectively corresponding to the plurality of third time periods in the third preset time period; the external point information represents the quantity information of transaction activities respectively corresponding to the plurality of third time periods; The target sample point information and the external point information are combined to obtain the target sample feature information.
8. The flow prediction method according to claim 6, characterized in that: The performing similarity calculation on the target sample feature information and the plurality of reference feature information respectively to determine the target reference flow data having the greatest similarity to the target sample flow data includes: Similarity calculations are performed on the target sample characteristic information and the multiple reference characteristic information respectively to obtain the third cosine distances between the target sample characteristic information and the multiple reference characteristic information respectively, and the target reference flow data corresponding to the maximum third cosine distance is determined.
9. The flow prediction method according to any one of claims 1 to 5, characterized in that: The at least one dimension includes: a time dimension and a business dimension; the flow ratio information includes: time flow ratio information and business flow ratio information; the target flow information includes: target time flow information and target business flow information; The determining, based on the traffic proportion information of the target reference traffic data in the at least one dimension, target traffic information of the at least one dimension corresponding to the predicted traffic data respectively includes at least one of the following: Acquire multiple time flow ratio information of multiple time periods of the target reference flow data on the time dimension, and multiply the multiple time flow ratio information by the predicted flow data to obtain the target time flow information of the predicted flow data in the multiple time periods on the time dimension; Obtain multiple business flow proportion information corresponding to multiple businesses in the business dimension of the target reference flow data, and multiply the multiple business flow proportion information by the predicted flow data to obtain the target business flow information corresponding to the multiple businesses in the business dimension of the predicted flow data.
10. A flow prediction device, characterized in that: include: A data acquisition unit, used to acquire sample flow data corresponding to a plurality of first time periods within a first preset time period; The sample traffic data represents traffic distribution information in at least one dimension in the corresponding first time period; A prediction unit, configured to predict a plurality of sample flow data using a prediction model to obtain predicted flow data for a target time period; the predicted flow data represents predicted flow distribution information for the target time period in the at least one dimension; A first processing unit, configured to extract target feature information from the predicted traffic data, and determine, based on the target feature information, target sample traffic data having the greatest similarity to the predicted traffic data among the plurality of sample traffic data; Extracting target sample characteristic information from the target sample flow data, and determining target reference flow data from a plurality of reference flow data based on the target sample characteristic information; the plurality of reference flow data are reference flow data corresponding to a plurality of second time periods within a second preset time period; The second preset time period includes the first preset time period; The second processing unit is used to determine the target flow information of the at least one dimension corresponding to the predicted flow data based on the flow proportion information of the target reference flow data in the at least one dimension.
11. A flow prediction device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Traffic flow prediction method and device based on deep learning
CN110929962A
Flow fluctuation trend prediction method and device and electronic equipment
CN111740865A