Data processing method, apparatus, and computer-readable storage medium

By acquiring and analyzing datasets from multiple time windows in the CDN billing system, and utilizing data fitting curves and offset ratios, the problem of inaccurate predictions caused by differences in user daytime traffic data was solved, achieving higher prediction accuracy.

CN115905728BActive Publication Date: 2026-03-17TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, the traffic data generated by users varies greatly on different natural days, resulting in insufficient accuracy of traffic data prediction when CDN billing is based on daily settlement.

Method used

By acquiring the dataset of the target object in the first time window, predicting the dataset in the second time window, and combining it with the reference dataset of the first historical time window, predicting the dataset in the third time window, the prediction accuracy is improved by utilizing the data fitting curve and the data volume offset ratio.

Benefits of technology

This improves the accuracy of future dataset predictions and ensures the precision and reliability of traffic data predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115905728B_ABST
    Figure CN115905728B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method, device and computer readable storage medium. The method comprises the following steps: obtaining a first data set generated by a target object in a first time window; predicting a second data set corresponding to a second time window according to fluctuation amplitudes between data amounts corresponding to N time points; obtaining a first reference data set corresponding to a first historical time window; predicting a third data set corresponding to a third time window according to the first data set, the second data set and the first reference data set; and generating a predicted data set of the target object according to the second data set and the third data set. The application can improve the accuracy of the predicted data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and specifically to a data processing method, apparatus, and computer-readable storage medium. Background Technology

[0002] With the continuous development of the computer field, different types of billing systems have emerged, such as Content Delivery Network (CDN) billing and billing systems. CDN billing and billing systems statistically analyze the traffic data generated by users using CDN services in the cloud and generate billing invoices based on the user's account type, billing type, and billing range.

[0003] In existing applications, when users choose the daily CDN billing method, the traffic data generated by the user on historical natural days can be used as the predicted traffic data generated by the user on the current natural day. However, the traffic data generated by the user on different natural days usually varies greatly. Therefore, the existing application will result in the lack of accuracy of the predicted traffic data by directly using the traffic data generated by the user on historical natural days as the predicted traffic data for the current natural day. Summary of the Invention

[0004] This application provides a data processing method, apparatus, and computer-readable storage medium that can improve the accuracy of the predicted dataset.

[0005] This application provides a data processing method, which includes:

[0006] Obtain the first dataset generated by the target object in the first time window; the first dataset contains the amount of data generated by the target object at N time points in the first time window, where N is a positive integer;

[0007] The second dataset corresponding to the second time window is predicted based on the fluctuation range between the data volume corresponding to N time points. The second time window is adjacent to the first time window and is located after the first time window. The second dataset contains the data volume corresponding to M time points of the predicted second time window, where M is a positive integer.

[0008] Obtain the first reference dataset corresponding to the first historical time window; the first reference dataset contains the data volume corresponding to L1 time points of the first historical time window, where L1 is a positive integer;

[0009] The third dataset corresponding to the third time window is predicted based on the first dataset, the second dataset, and the first reference dataset. The third dataset contains the data volume corresponding to the K time points of the predicted third time window, where K is a positive integer. The third time window is adjacent to the second time window and is located after the second time window. The K time points are associated with L1 time points one by one, and the associated time points are at the same time on different natural days.

[0010] Generate a prediction dataset for the target object based on the second and third datasets.

[0011] This application provides a data processing apparatus, which includes:

[0012] The acquisition module is used to acquire the first dataset generated by the target object in the first time window; the first dataset contains the amount of data generated by the target object at N time points in the first time window, where N is a positive integer; it is used to acquire the first reference dataset corresponding to the first historical time window; the first reference dataset contains the amount of data corresponding to L1 time points in the first historical time window, where L1 is a positive integer;

[0013] The data prediction module is used to predict the second dataset corresponding to the second time window based on the fluctuation range between the data amounts corresponding to N time points. The second time window is adjacent to the first time window and is located after the first time window. The second dataset contains the data amounts corresponding to M time points of the predicted second time window, where M is a positive integer. The module is also used to predict the third dataset corresponding to the third time window based on the first dataset, the second dataset, and the first reference dataset. The third dataset contains the data amounts corresponding to K time points of the predicted third time window, where K is a positive integer. The third time window is adjacent to the second time window and is located after the second time window. The K time points are associated one-to-one with the L1 time points, and the associated time points are at the same time on different natural days.

[0014] The processing module is used to generate a prediction dataset for the target object based on the second and third datasets.

[0015] Optionally, the above data prediction module is used for:

[0016] A data fitting curve is generated based on the data volume corresponding to N time points; the data fitting curve is used to characterize the fluctuation range between the data volume corresponding to N time points.

[0017] Predict the amount of data corresponding to M time points based on the fitted curve;

[0018] A second dataset is constructed based on the data volume corresponding to each of the M time points.

[0019] Optionally, the method by which the above data prediction module generates data fitting curves based on the data volume corresponding to N time points includes:

[0020] Obtain the initial fitted curve; the initial fitted curve contains curve parameters;

[0021] Based on the initial fitted curve, obtain the amount of fitted data corresponding to N time points respectively;

[0022] The amount of differential data corresponding to each of the N time points is determined based on the amount of data corresponding to each of the N time points and the amount of fitted data.

[0023] The target differential data volume is obtained by summing the differential data volumes corresponding to N time points.

[0024] The curve parameters of the initial fitted curve are updated based on the target difference data volume, and the initial fitted curve with updated curve parameters is determined as the data fitted curve.

[0025] Optionally, the above data prediction module is used for:

[0026] Obtain the second reference dataset corresponding to the second historical time window; the second historical time window contains L2 time points, where L2 is a positive integer and L2 equals N+M. The L2 time points are associated with N+M time points one by one, and the associated time points are at the same time on different natural days. The second reference dataset contains the data volume corresponding to each of the L2 time points.

[0027] Determine the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset;

[0028] Predict the third dataset based on the data volume offset ratio and the first reference dataset.

[0029] Optionally, the method by which the above data prediction module determines the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset includes:

[0030] The data volume corresponding to N time points and the data volume corresponding to M time points constitute the fourth dataset;

[0031] The amount of data corresponding to the time points associated with L2 time points in the fourth dataset is determined as the reference data amount corresponding to each of the L2 time points;

[0032] Based on the data volume and reference data volume corresponding to each of the L2 time points, determine the offset ratio corresponding to each of the L2 time points;

[0033] The offset ratios corresponding to the L2 time points are averaged to obtain the data offset ratio.

[0034] Optionally, the method by which the above data prediction module determines the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset includes:

[0035] Based on the data offset ratio, the data volume corresponding to each of the LI time points is offset to obtain the offset data volume corresponding to each of the K time points.

[0036] A third dataset is generated based on the offset data volume corresponding to each of the K time points.

[0037] Optionally, the target object is an object in the target application;

[0038] If the target object does not generate any data within the first natural day, the data volume corresponding to each of the L1 time points is obtained based on the data volume generated by all objects in the target application at each of the L1 time points, and the data volume corresponding to each of the L2 time points is obtained based on the data volume generated by all objects at each of the L2 time points; the first natural day is the natural day to which the first historical time window and the second historical time window belong.

[0039] If the target object generates data within the first natural day, then the data volume corresponding to each of the L1 time points is the data volume generated by the target object at each of the L1 time points, and the data volume corresponding to each of the L2 time points is the data volume generated by the target object at each of the L2 time points.

[0040] Optionally, the above processing module is also used for:

[0041] Obtain the amount of resources transferred per unit;

[0042] Based on the first dataset and the predicted dataset, the total estimated data volume generated by the target object on the second natural day is calculated.

[0043] The estimated resource transfer volume for the target object on the second natural day is determined based on the unit resource transfer volume and the estimated total data volume.

[0044] This application provides a computer device, characterized in that it includes a processor and a memory interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the method as described in one aspect of this application.

[0045] This application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the method described in the above-mentioned aspect.

[0046] This application provides a computer program product, including a computer program, characterized in that the computer program / instructions, when executed by a processor, implement the method described in the above-mentioned aspect.

[0047] This application predicts the second dataset contained in the second time window using the first dataset corresponding to the first time window, thus obtaining the second dataset. It then uses the first dataset, the second dataset, and the first reference dataset contained in the first historical time window to predict the third dataset contained in the third time window, thereby determining the third dataset. The first natural day includes the first historical time window, and the second natural day includes the first, second, and third time windows. The first natural day is located before the second natural day. The second and third datasets are datasets not generated on the second natural day. By combining the dataset from the first natural day with the dataset already generated on the second natural day to predict the dataset not yet generated on the second natural day, the accuracy of the predicted datasets (such as the second and third datasets) can be improved. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a schematic diagram of a data processing system architecture provided in this application;

[0050] Figure 2 This is a schematic diagram of a data processing scenario provided in this application;

[0051] Figure 3 This is a schematic diagram of a time structure provided in this application;

[0052] Figure 4 This is a flowchart illustrating a data processing method provided in this application;

[0053] Figure 5 This is a schematic diagram of a process for obtaining a data fitting curve provided in this application;

[0054] Figure 6 This is a flowchart illustrating a method for calculating the data volume offset ratio provided in this application;

[0055] Figure 7 This is a flowchart illustrating a data processing method provided in this application;

[0056] Figure 8This is a schematic diagram illustrating a scenario for obtaining a data fitting curve, as provided in this application.

[0057] Figure 9 This is a schematic diagram of the structure of a data processing device provided in this application;

[0058] Figure 10 This is a schematic diagram of the structure of a computer device provided in this application. Detailed Implementation

[0059] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0060] Cloud computing is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" appear infinitely scalable, readily available, on-demand, and expandable, with payment based on usage.

[0061] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.

[0062] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.

[0063] This application primarily relates to the field of data processing in cloud computing. The data processing process involves the technical process of analyzing and manipulating numerical and / or non-numerical data. This process includes the analysis, organization, calculation, and editing of various raw data. The data processing involved in this application mainly refers to acquiring data from the "cloud," processing the acquired dataset, and predicting at least one type of data to be generated based on the processed dataset.

[0064] Please see Figure 1 , Figure 1 This is a schematic diagram of a data processing system architecture provided in this application. For example... Figure 1 As shown in the diagram, the system architecture includes a server 100 and multiple terminal devices, which may include terminal device 200a, terminal device 200b, and terminal device 200c. Terminal devices 200a, 200b, and 200c can all communicate with the server 100 via a network. These terminal devices can be mobile phones, tablets, laptops, PDAs, mobile internet devices (MIDs), or wearable devices (such as smartwatches and smart bracelets).

[0065] Please see Figure 2 , Figure 2 This is a schematic diagram of a data processing scenario provided in this application. For example... Figure 2 As shown, the dataset acquired by server 100a may be disorganized. Therefore, it is necessary to process the acquired dataset first, and then make predictions based on the processed dataset and / or the acquired dataset. Processing the dataset acquired by server 100a can involve filtering the dataset to obtain filtered data. The filtering method can be to delete data outside a preset data size range. The preset data size range can be set using empirical values ​​or historical data; for example, it can be set to 0 to positive infinity, inclusive. The entity executing the data processing can be a terminal device or a server, depending on the actual application scenario. Here, we will use a server as the data processing entity. The following describes the process of server 100 processing the acquired dataset:

[0066] like Figure 2As shown, assuming the application scenario is that the server obtains user A's historical dataset, the historical dataset includes a first dataset, a first reference dataset, and a second reference dataset. The first dataset consists of the data volume corresponding to N time points within the first time window of the second natural day. Time points can be instantaneous points, and the time length between instantaneous points can be 1 minute or 1 hour, without restriction. The data volume corresponding to a time point can be understood as the data volume generated between adjacent time points, and the data volume generated by adjacent time points is taken as the data volume corresponding to the next time point. The first reference dataset consists of the data volume corresponding to L1 time points within the first historical time window of the first natural day. The second reference dataset consists of the data volume corresponding to L2 time points within the second historical time window of the first natural day. See [link to documentation for first time window, first historical time window, and second historical time window]. Figure 3 The relevant description is as follows: The first calendar day is before the second calendar day. The server can use the least squares algorithm to make predictions based on N data points in the first dataset to obtain the second dataset. The second dataset consists of the data points corresponding to M time points within the second time window of the second calendar day. See [link to second time window description] for details. Figure 3 The relevant descriptions are as follows: Based on the first dataset, the second dataset, and the second reference dataset, the data offset ratio is obtained. The third dataset is obtained by multiplying the data offset ratio by the first reference dataset. The third dataset contains the data volume corresponding to the K time points within the third time window of the second natural day. N and M can be set based on empirical values ​​or historical data. L2 equals N+M, and K is the total number of time points remaining after the second time window. L1 equals K.

[0067] Please see Figure 3 , Figure 3 This is a schematic diagram of a time structure provided in this application. Specifically, as shown... Figure 3As shown, the first time window contains N time points, and the first dataset is the data volume corresponding to each of the N time points contained in the first time window; the second time window contains M time points, and the second dataset is the data volume corresponding to each of the M time points contained in the second time window; the third time window contains K time points, and the third dataset is the data volume corresponding to each of the K time points contained in the third time window; the first historical time window contains L1 time points, and the first reference dataset is the data volume corresponding to each of the L1 time points contained in the first historical time window; the second historical time window contains L2 time points, and the second reference dataset is the data volume corresponding to each of the L2 time points contained in the second historical time window. The first natural day includes the first historical time window and the second historical time window; the first natural day includes the first time window, the second time window, and the third time window, and the first natural day is before the second natural day. The first time window and the second time window are adjacent, with the first time window preceding the second time window. The current time T is at the last time point of the first time window. The second time window and the third time window are adjacent, with the second time window preceding the first time window. The second historical time window and the first historical time window are adjacent, with the second historical time window preceding the first historical time window. The time points included in the second historical time window are associated one-to-one with the time points included in both the first and second time windows, with L2 equal to N+M. The time points included in the first historical time window correspond one-to-one with the time points included in the third time window, with L1 equal to K. N and M can be set based on empirical values ​​or historical data.

[0068] For example, assuming the time length between adjacent time points (i.e., time points) is 1 hour, N is 5, M is 3, and the current time T is 12:00 on September 21, 2021, then the first time window is from 7:01 to 12:00 on September 21, 2021, and the first dataset is [V8, V9, V...]. 10 V 11 V 12 The second time window is from 12:00 to 15:00 on September 21, 2021, and the second dataset is [V]. 13 V 14 V 15 The third time window is from 15:01 to 24:00 on September 21, 2021, and the third dataset is [V]. 16 V 17 V 18 V 19 V 20 V 21 V 22 V 23 V 24 ], where V iLet i represent the amount of data generated on the second natural day, where i is a time point and is a positive integer; the second historical time window can be from 7:01 to 15:00 on September 20, 2021, and the second reference dataset is: [v8, v9, v 10 ,v 11 ,v 12 ,v 13 ,v 14 ,v 15 The first historical time window can be from 15:01 to 24:00 on September 20, 2021, and the first reference dataset is [v]. 16 ,v 17 ,v 18 ,v 19 ,v 20 ,v 21 ,v 22 ,v 23 ,v 24 ], v i This refers to the amount of data generated on the first natural day.

[0069] In this application, the second dataset is obtained by predicting the second dataset contained in the second time window using the first dataset corresponding to the first time window. Then, the third dataset is determined by predicting the third dataset contained in the third time window using the first dataset, the second dataset, and the first reference dataset contained in the first historical time window. The second and third datasets are datasets not generated on the second natural day. This method of predicting data not generated on the second natural day results in higher accuracy of the predicted data.

[0070] Please see Figure 4 , Figure 4 This is a flowchart illustrating a data processing method provided in this application, such as... Figure 4 As shown, the method may include:

[0071] Step S101: Obtain the first dataset generated by the target object in the first time window; the first dataset contains the amount of data generated by the target object at N time points in the first time window, where N is a positive integer;

[0072] Specifically, in this embodiment, the executing entity can be a terminal device or a server. If the executing entity is a terminal device, the data obtained by the terminal device can be sent to it by the server or imported from the database. Here, we will use a server as the executing entity in this embodiment for explanation.

[0073] The target object can be a user of the server, and the target object can refer to any user.

[0074] The server acquires the first dataset corresponding to the first time window preceding the current time T when the target object is using the server. The first time window includes the current time T. The first time window and the current time T are as follows: Figure 3 As shown in the diagram. For example, if the current time T is 12:00 and the time length between adjacent time points (i.e., time points) is 1 minute, then the first time window can be the period from 11:00 to 12:00. The length of the first time window can be determined according to the actual application scenario. For example, assuming the current time T is 1:00 and the data length between adjacent time points is 1 hour, the length of the first time window is two hours, then steps S102-S105 are not performed; assuming the current time T is 1:00 and the time length between adjacent time points is 1 minute, then the size of the first time window can be 30 time points.

[0075] For example, suppose the calendar day corresponding to the current time T (i.e., the day on which the current time T is located) contains the following time points in sequence: [T1, T2, ..., T t-N ,T t-N+1 ,…,T t ,T t+1 ,…,T t+M ,T t+M+1 ,…,T t+M+K Furthermore, the relationship between adjacent time points is that the preceding time point is earlier than the following time point, for example, T1 is less than T2, where T... t Let T be the current time. Then, the N time points contained in the first time window can be [T]. t-N+1 ,…,T t ].

[0076] The time point can be a specific instant, and the time interval between these instants can be 1 minute or 1 hour; there are no restrictions here. The data volume corresponding to each time point can be understood as the amount of data generated between adjacent time points, with the data volume generated at adjacent time points being considered the data volume for the next time point. For example, assuming the time interval between instants is 1 minute, when a user generates internet traffic, the traffic data generated in one minute is considered a single data volume, which could be 10 MB, 20 MB, etc.

[0077] The method by which the server obtains the first dataset of the first time window can be:

[0078] A1. Assuming the target object uses a server, the server can collect the amount of data generated by the target object using the server at each time point, and then combine the data generated at the N time points corresponding to the first time window into the first dataset.

[0079] A2. Assume the target object uses a server. The server receives the data corresponding to N time points within the first time window collected by the target object and uses it as the first dataset.

[0080] In addition, the server can also obtain the first dataset through databases, cloud devices, blockchains, etc. This application uses A1 as an example for illustration. The server can process the acquired data by installing data processing software, the functionality of which includes all the methods mentioned in this application.

[0081] Step S102: Predict the second dataset corresponding to the second time window based on the fluctuation range between the data volume corresponding to the N time points respectively; the second time window is adjacent to the first time window and is located after the first time window; the second dataset contains the data volume corresponding to the M time points of the predicted second time window respectively, where M is a positive integer.

[0082] The fluctuation range can be understood as the difference between the data amounts at different points in time.

[0083] The second dataset consists of data collected after the current time T when the target object is using the server. For example, if the current time T is 12:00, the second time window could be the period from 12:00 to 14:00. The specific length of the second time window can be determined based on the actual application scenario or set according to experience. For example, the specific length of the second time window could be 15 minutes or 30 minutes.

[0084] For example, suppose the day containing the current time T is: [T1, T2, ..., T t-N ,T t-N+1 ,…,T t ,T t+1 ,…,T t+M ,T t+M+1 ,…,T t+M+K ], where T t If the current time is T, then the M time points contained in the second time window are [T] t+1 ,…,T t+M ].

[0085] The method for predicting the second dataset corresponding to the second time window based on the fluctuation range of the data volume at N time points can be as follows:

[0086] B1. The server generates a data fitting curve based on the data volume corresponding to N time points; the data fitting curve is used to characterize the fluctuation range between the data volume corresponding to N time points.

[0087] B2. The server predicts the amount of data corresponding to M time points based on the data fitting curve.

[0088] B3. The server constructs a second dataset based on the data volume corresponding to each of the M time points.

[0089] The data fitting curve can be obtained by fitting the least squares polynomial to the data volume corresponding to N time points. The data fitting curve can be expressed by a power function. In this method, the data fitting curve is used to characterize the fluctuation range between the data volume corresponding to N time points. The data fitting curve can be determined based on historical data, which can be the historical data of the target object or the total historical data volume of all objects at the same time point. The usage of each object is obtained by dividing the total historical data volume by the number of objects contained in all objects. For example, assuming that the total number of objects contained in all objects is 10 and the total historical data volume is 10 MB, then the usage of each object is 1 MB, and the usage of each object is used as the historical data of the target object. The first time window and the second time window are adjacent, and the number of time points contained in the second time window is relatively small. For example, suppose the first time window contains 60 time points, while the second time window contains only 10 time points. Therefore, the fluctuation range of the second time window is likely to be close to that of the first time window. Thus, predicting the second dataset corresponding to the second time window by using the fluctuation range of the data volume corresponding to the N time points contained in the first time window will result in a more accurate second dataset.

[0090] Step S103: Obtain the first reference dataset corresponding to the first historical time window; the first reference dataset contains the data volume corresponding to L1 time points of the first historical time window, where L1 is a positive integer;

[0091] The first historical time window can contain L1 time points, and the first reference dataset can contain the amount of data corresponding to each of the L1 time points generated by the target object.

[0092] The method for obtaining the first reference dataset corresponding to the first historical time window is the same as the method for obtaining the first dataset in step S101 above. For details, please refer to the relevant description in step S101 above.

[0093] Assume the time points included in the natural days corresponding to the first historical time window are: [T1, T2, ..., T L-(L1)-(L2) ,T L-(L1)-(L2)+1 ,…,T L-(L1) ,T L-(L1)+1 ,…,T L ], where T LLet T be the time point corresponding to the last moment of the first natural day. The time point can be any specific moment, and the time interval between moments is assumed to be 1 minute. Then, the time points included in the first historical time window are: [T] L-(L1)+1 ,…,T L ], of which the first natural day T L-(L1) The corresponding time and the second natural day T M+t The corresponding times are at the same time. For example, assuming the current time T is 1:00 AM on September 21, 2021, and the specific length M of the second time window is 15 minutes, then T M+t If the time is 1:15 on September 21, 2021, then T L-(L1) It can be 1:15 AM on September 20, 2021, therefore the T of the first historical time window L-(L1)+1 The time was 1:16 on September 20, 2021.

[0094] Step S104: Predict the third dataset corresponding to the third time window based on the first dataset, the second dataset, and the first reference dataset; the third dataset contains the data volume corresponding to K time points of the predicted third time window, where K is a positive integer, the third time window is adjacent to the second time window, the third time window is located after the second time window, the K time points are associated with L1 time points one by one, and the one-to-one associated time points are at the same time on different natural days.

[0095] Specifically, the time relationship between the first historical time window and the third time window is as follows: Figure 3 As shown in the diagram. For example: Suppose the time points included in the calendar day corresponding to the current time T are: [T1, T2, ..., T t-N ,T t-N+1 ,…,T t ,T t+2 ,…,T t+M ,T t+M+1 ,…,T t+M+K ], where T t Let T be the current time. Then, the K time points contained in the third time window are [T]. t+M+1 ,…,T t+M+K Since the first historical time window includes time points [T], L-(L1)+1 ,…,T L The one-to-one correspondence is T on the second natural day. M+t+1 The point in time (i.e., moment) referred to is T of the first natural day. L-(L1)+1The time points referred to are the same, and the number of time points contained in the first historical time window and the third time window is the same. For example, assuming that the first historical time window is from 1:16 to 24:00 on September 20, 2021, and the time length between the time points (i.e., time points) in the first historical time window is 1 minute, then the third time window is from 1:16 to 24:00 on September 21, 2021, and the time length between the time points (i.e., time points) in the third time window is also 1 minute.

[0096] The method for predicting the third dataset corresponding to the third time window based on the first dataset, the second dataset, and the first reference dataset can be as follows:

[0097] C1. The server obtains the second reference dataset corresponding to the second historical time window;

[0098] C2. The server determines the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset.

[0099] C3. The server predicts the third dataset based on the data volume offset ratio and the first reference dataset.

[0100] The time sequence structure diagram of the first time window, second time window, third time window, first historical time window, and second historical time window is as follows: Figure 3 As shown in the diagram. The data volume offset ratio measures the change in the L2 data points contained in the second reference dataset compared to the N+M data points contained in both the first and second datasets. The data volume sets corresponding to the K time points in the third dataset are obtained by multiplying the data volume offset ratio by the data volume sets corresponding to the L2 time points in the first reference dataset. The specific process for obtaining the data volume offset ratio can be found in the following... Figure 7 The relevant descriptions in the corresponding embodiments.

[0101] For example, the second historical window contains L2 time points [T L-(L1)-(L2)+1 ,…,T L-(L1) The first and second time windows contain N+M time points, which are [T] t-N+1 ,…,T t ,T t+1 ,…,T t+M ], then T on the second natural day t-N+1 The point in time (i.e., moment) referred to is T of the first natural day. L-(L1)-(L2)+1The time points referred to are the same, and the number of time points included in the second historical time window is the same as the number of time points jointly included by the first and second time windows. For example, assuming the first time window is from 0:30 to 1:00 on September 21, 2021, and the time length between the time points (i.e., moments) in the first time window is assumed to be 1 minute, and the second time window is from 1:00 to 1:15 on September 21, 2021, and the time length between the time points (i.e., moments) in the second time window is also assumed to be 1 minute, then the second historical time window is from 0:30 to 1:15 on September 20, 2021, and the time length between the time points (i.e., moments) in the second historical time window is also 1 minute.

[0102] For example, suppose the first dataset contains 4 data points [4, 6, 8, 10], the second dataset contains 2 data points [12, 14], the second reference dataset contains 6 data points [2, 3, 4, 5, 6, 7], and the first reference dataset contains 5 data points [0, 12, 2, 4, 6], then the data offset ratio is: The third dataset consists of 5 data sets: [0, 12, 2, 4, 6].

[0103] Step S105: Generate a prediction dataset for the target object based on the second dataset and the third dataset.

[0104] Specifically, since the second time window is [T] t+1 ,…,T t+M The third time window is [T]; t+M+1 ,…,T t+M+K The time window corresponding to the predicted dataset is:

[0105] [T t+1 ,…,T t+M ,T t+M+1 ,…,T t+M+K The prediction dataset is constructed by combining the data amounts corresponding to the M times within the second time window and the data amounts corresponding to the K times within the third time window. For example, if the data amounts corresponding to the M times within the second time window are [12, 14] and the data amounts corresponding to the K times within the third time window are [0, 12, 2, 4, 6], then the data amounts corresponding to the M+K times within the prediction dataset are [12, 14, 0, 12, 2, 4, 6].

[0106] In one possible implementation, the unit resource transfer amount can be obtained, and then the predicted dataset and the unit resource transfer amount can be multiplied to obtain the resource transfer amounts corresponding to the M+K time points in the predicted dataset. Then, the data volume corresponding to the M+K time points and the resource transfer amount can be summed to obtain the total resource transfer amount not generated on the second natural day. The unit resource transfer amount can be the unit price of traffic data. For example, assuming the unit resource transfer amount is a traffic unit price of 10 megabytes / yuan, and the data volume corresponding to the M+K time points in the predicted dataset is [12,14,0,12,2,4,6], where the unit of data volume is megabytes (MB), then the total resource transfer amount is: (12*10+14*10+0*10+12*10+2*10+4*10+6*10)=500.

[0107] This application predicts the second dataset contained in the second time window using the first dataset corresponding to the first time window, thus obtaining the second dataset. It then uses the first dataset, the second dataset, and the first reference dataset contained in the first historical time window to predict the third dataset contained in the third time window, thereby determining the third dataset. The first natural day includes the first historical time window, and the second natural day includes the first, second, and third time windows. The first natural day is located before the second natural day. The second and third datasets are datasets not generated on the second natural day. By combining the dataset from the first natural day with the dataset already generated on the second natural day to predict the dataset not yet generated on the second natural day, the accuracy of the predicted datasets (such as the second and third datasets) can be improved.

[0108] Please see Figure 5 , Figure 5 This is a schematic diagram of a process for obtaining a data fitting curve provided in this application, such as... Figure 5 As shown, the method may include:

[0109] Step S201: Obtain the initial fitted curve;

[0110] The initial fitted curve includes curve parameters, dependent variable, and independent variable. The curve parameters in the initial fitted curve are unknowns. In other words, the curve parameters in the initial fitted curve are letters representing numbers. The initial fitted curve can be a power function curve, an exponential function curve, or other functions, without any restrictions.

[0111] The method for obtaining the initial fitted curve can be preset.

[0112] Step S202: Based on the initial fitting curve, obtain the amount of fitting data corresponding to N time points respectively;

[0113] The N time points are the time points contained in the first time window, that is, the N time points are: [T t-N+1 ,…,T t The amount of fitted data is obtained by substituting N time points into the initial fitted curve to obtain the values ​​corresponding to N time points. Each of the N time points can correspond to one amount of fitted data.

[0114] Step S203: Determine the amount of differential data corresponding to each of the N time points based on the amount of data corresponding to the N time points and the amount of fitted data;

[0115] The difference data volume is the data value obtained by subtracting the data volume corresponding to each of the N time points from the fitted data volume.

[0116] Step S204: Sum the difference data amounts corresponding to the N time points respectively to obtain the target difference data amount;

[0117] The target difference data volume is the data value obtained by adding the difference data volumes corresponding to N time points respectively.

[0118] Step S205 updates the curve parameters of the initial fitted curve according to the target difference data volume, and determines the initial fitted curve with updated curve parameters as the data fitted curve.

[0119] The magnitude of the target difference can affect the specific data value of the curve parameter. The specific data value of the curve parameter can be determined by making assumptions about the target difference and then determining the curve parameter based on the assumed data value. The curve parameter determined in this way can make the fitted data amount corresponding to the N time points of the data fitting curve more closely approximate the data amount corresponding to the N time points, and the predicted data is more accurate.

[0120] For example, suppose the initial fitted curve is y = ax 2+bx+c, where a, b, and c are curve parameters, x is the independent variable, and y is the dependent variable; time points can be instantaneous points. Assuming N is 5, then the 5 time points can be [1:01, 1:02, 1:03, 1:04, 1:05], the corresponding values ​​of the 5 time points can be [1, 2, 3, 4, 5], and the data quantities corresponding to the 5 time points are [1, 4, 9, 16, 25]. Therefore, the 5 time points and 5 data quantities can form 5 data points [(1,1), (2,4), (3,9), (4,16), (5,25)]. Substituting the values ​​corresponding to the 5 time points into the initial fitted curve yields the fitted data quantities for each of the 5 time points as follows: [a+b+c, 4a+2b+c, 9a+3b+c, 16a+4b+c, 25a+5b+c]. Specifically, substituting the values ​​corresponding to the 5 time points into the independent variables of the initial fitted curve results in 5 data points: [(1, a+b+c), (2, 4a+2b+c), (3, 9a+3b+c), (4, 16a+4b+c), (5, 25a+5b+c)]. Subtracting the data quantity and fitted data quantity at the same time point yields the difference data quantity. Therefore, the difference data quantities for each of the 5 time points are: [1-(a+b+c), 4-(4a+2b+c), 9-(9a+3b+c), 16-(16a+4b+c), 25-(25a+5b+c)]. The data volume, fitted data volume, and differential data volume corresponding to the five time points are as follows: Figure 7 As shown. According to the formula, the target variance data ratio = {∑i-th variance data} 2} / N, where i is a positive integer less than or equal to N, then

[0121] The values ​​of curve parameters (such as curve parameters a, b, and c above) can be adjusted to make the target variance ratio infinitely close to or equal to 0. When the adjusted curve parameters minimize the target variance ratio (i.e., closest to or equal to 0), the adjusted curve parameters can be used as the final adjusted curve parameters. These adjusted curve parameters can then replace the initial fitted curve parameters to obtain the data fitting curve. Assuming the target variance ratio is 0, then... Based on this equation, we can determine that a = 1, b = 0, and c = 0. Finally, substituting a = 1, b = 0, and c = 0 into the initial fitted curve, we obtain the data fitted curve as y = x. 2 .

[0122] In this application, since the first time window and the second time window are adjacent, and the second time window is a short time window immediately following the first time window, the fluctuation range of the data volume to be generated after the second time window is very likely to be similar to or the same as the fluctuation range of the data volume generated by the first time window. Therefore, by fitting the fitting curve of the data volume of the first time window, and then using the fitting curve to predict the data volume to be generated in the second time window, it will be more accurate, more representative, and more in line with the current pattern of the data volume generated by the target object.

[0123] Please see Figure 6 , Figure 6 This is a flowchart illustrating a method for calculating the data volume offset ratio provided in this application, such as... Figure 6 As shown, the method may include:

[0124] Step S301: Construct the fourth dataset;

[0125] The fourth dataset can be the sum of the data volume corresponding to the N time points contained in the first time window and the data volume corresponding to the M time points contained in the second time window. Therefore, the fourth dataset is composed of the first dataset and the second dataset, and the fourth time window is the N time points contained in the first time window and the M time points contained in the second time window.

[0126] For example, as can be seen from step S101, the first time window is [T t-N+1 ,…,T t As can be seen from step S102, the second time window is [T]. t+1 ,…,T t+M ], then the fourth time window is: [T t-N+1 ,…,T t ,T t+1 ,…,T t+MThe fourth dataset consists of N+M data points corresponding to different time points. For example, assuming the first time window is [1:00, 2:00, 3:00, 4:00, 5:00], and the first dataset is [2, 4, 6, 8, 10]; the second time window is [6:00, 7:00, 8:00], and the second dataset is [12, 14, 16], then the fourth time window is [1:00, 2:00, 3:00, 4:00, 5:00]. The fourth dataset is [2,4,6,8,10,12,14,16]. The data points in the fourth dataset and the corresponding time points in the fourth time window are combined to form the fourth data point set, which is [(1,2),(2,4),(3,6),(4,8),(5,10),(6,12),(7,14),(8,16)]. Assume the fourth dataset is [V1,V2,…,V…]. N V N+1 ,…,V N+M ].

[0127] Step S302: Determine the data volume corresponding to the time points associated with L2 time points in the fourth dataset as the reference data volume corresponding to each of the L2 time points;

[0128] As can be seen from step S104, the time points included in the second historical time window are: [T L-(L1)-(L2)+1 ,…,T L-(L1) ], where L2 time points are the L2 time points contained in the second historical time window.

[0129] Depend on Figure 3 It can be seen that T in the second historical time window L-(L1)-(L2)+1 The time point referred to (i.e., the moment of time) and T in the fourth time window t-N If the referenced time points are the same, the second historical time window contains L2 time points, and the fourth time window contains N+M time points, then L2 equals N+M. For example, the second historical time window is [1:00, 2:00, 3:00, 4:00, 5:00, 6:00, 7:00, 8:00], and the second reference dataset is [1, 2, 3, 4, 5, 6, 7, 8]. The data amounts corresponding to the second reference dataset and the time points corresponding to the second historical time window are combined to form the second reference data point set, which is [(1,1), (2,2), (3,3), (4,4), (5,5), (6,6), (7,7), (8,8)]. The data amounts corresponding to the same time points in the second reference data point set and the fourth data point set are taken as reference data amounts, then the reference data amount set is [1, 2, 3, 4, 5, 6, 7, 8].

[0130] As can be seen from the above, assuming the second reference datasets are [v1, v2, ..., v N ,v N+1 ,…,v N+M If the reference data set is [v1, v2, ..., v], then the reference data set is [v1, v2, ..., v]. N ,v N+1 ,…,v N+M ].

[0131] Step S303: Determine the offset ratio corresponding to each of the L2 time points based on the data volume and reference data volume corresponding to each of the L2 time points.

[0132] Here, the offset ratio measures the change between the same time on different natural days in the second reference dataset and the fourth dataset. Let the i-th offset ratio be R. i , where is a positive integer less than or equal to L2. Offset ratio V i v is the i-th data item in the fourth dataset. i This is the reference data point for the i-th data element in the dataset. For example, when i = 1, the offset ratio is...

[0133] Therefore, the offset ratios corresponding to the L2 time points can be expressed as [R1, R2, ..., R N ].

[0134] For example: the fourth dataset is [2,4,6,8,10,12,14,16]; the reference data set is [1,2,3,4,5,6,7,8]; then the 8 offset ratios can be represented as [1,1,1,1,1,1,1,1].

[0135] Step S304: Average the offset ratios corresponding to the L2 time points to obtain the data offset ratio.

[0136] The data offset ratio is calculated by first summing the offset ratios corresponding to L2 time points to obtain the total offset ratio, and then dividing the total offset ratio by L2 to obtain the average offset ratio. The average offset ratio is used as the data offset ratio. For example, if the eight offset ratios [1,1,1,1,1,1,1,1] are added together and the average value is 1, then the data offset ratio is 1.

[0137] In this application, by combining the amount of data generated on the current day (e.g., the second natural day) and historical days (e.g., the first natural day, which can be the day before the current day), the current data volume offset ratio relative to historical days is predicted. The calculated data volume offset ratio is more accurate, which in turn makes the third dataset predicted by the data volume offset ratio more accurate.

[0138] Please see Figure 7 , Figure 7 This is a flowchart illustrating a data processing method provided in this application, such as... Figure 7 As shown, the method may include:

[0139] Step S401: Real-time acquisition of N data points prior to the current time T, using a sliding window of size N, i.e., [V1, V2, ..., V...]. N ];

[0140] When a user uses CDN services, the CDN billing system statistically analyzes the user's traffic data in real time, at minute intervals. A sliding window of size N is set, and the system retrieves the user's traffic dataset based on the time point corresponding to the sliding window. This traffic dataset can be the first dataset. The sliding window can be a fixed-size time window that slides sequentially, or a non-fixed-size time window that slides sequentially. Here, we use a fixed-size time window that slides sequentially as an example.

[0141] A data point can be represented as (time point, traffic data), where the amount of traffic data generated in the time interval corresponding to a time point is the amount of data corresponding to that time point.

[0142] Please refer to the method described in step S101 for the value of N.

[0143] Step S402: Based on the least squares curve fitting algorithm, according to the sliding window of N data points, fit 15 data points after the current time T in real time as the second dataset, i.e., [V n+1 V n+2 ,…,V n+15 ];

[0144] The specific steps are as follows: First, determine the data fitting curve based on N data points in a sliding window and the least squares curve fitting algorithm. Then, based on the data fitting curve, fit 15 data points from the current time T onwards in real time as the second dataset. For the steps on determining the data fitting curve, please refer to [link to relevant documentation]. Figure 5 The steps to fit 15 data points from the current time T onwards as the second dataset are as follows: substitute the time points included in the second dataset into the data fitting curve to obtain M data values, and use the M data values ​​as the data volume in the second dataset.

[0145] Step S403: Obtain the complete data set of the day before the current time T;

[0146] The CDN billing system will statistically analyze and store the amount of traffic data used by each user. This data can be stored in a blockchain or a cloud platform; there are no restrictions on this. Data generated by the CDN service at the time specified by the storage time T prior to the current time will be read and used as the complete data set.

[0147] Step S404: Calculate the offset ratio;

[0148] Wherein, this offset ratio is Figure 6 For the data volume offset ratio in the corresponding embodiment, please refer to the above for the method of calculating the offset ratio. Figure 6 Detailed description of the corresponding embodiments.

[0149] Step S405: Calculate the third dataset that will be generated 15 time points after the current time T;

[0150] The offset ratio is multiplied by the data in the first reference dataset to determine the third dataset. The first historical time window corresponding to the first reference dataset is the time point of the previous day associated with the time point after the current time T+15 time points.

[0151] Step S406: Take the amount of data generated in the natural day corresponding to the current time T, the second dataset, and the third dataset as the complete traffic dataset for the day;

[0152] Step S407: Calculate the CDN traffic cost for the day in real time based on the user-configured data and the complete traffic data set for the day.

[0153] Configuration data may include calculation method data, settlement method data, and price discount data. Among them, billing method data includes customers who settle billing monthly and customers who settle billing daily; settlement method data includes billing based on traffic and billing based on bandwidth; and price discount data includes single billing price, tiered billing price, and discount.

[0154] The total traffic data is calculated by summing the complete traffic dataset for the day. This total traffic data is then multiplied by the configuration data to calculate the CDN traffic cost, which is then sent to the user as an estimated cost. This method provides more accurate CDN traffic cost predictions.

[0155] For example: If a user is billed based on traffic volume and the price is Price1, then the CDN traffic cost P for that day is:

[0156] P = Total traffic data * Price1 * Discount;

[0157] For example: Based on the traffic dataset of the day, a forecast curve is plotted, and the peak bandwidth at each time point in the forecast curve is determined. The formula for calculating the peak bandwidth is peak bandwidth = traffic data bytes * 8 / 60. The forecast curve is then sent to the user.

[0158] If the user is billed based on bandwidth at a price of Price2, then the user's CDN traffic cost for that day would be:

[0159] P = Estimated peak bandwidth at each point on the curve * Price2 * Discount.

[0160] In this application, the potential data usage cost (e.g., data cost P, i.e., the estimated resource transfer volume) of a target object throughout the day can be predicted in real time (at each time point of the day). This data usage cost can then be provided to the target object for reference, allowing them to view their estimated data usage cost for the entire day at each time point. Alternatively, waveforms representing time and data volume can be generated from the data volume at each time point of the second day in the various datasets (including the first, second, and third datasets). These waveforms can be dynamically updated at each time point, allowing the target object to view the fluctuations in their potential data volume for the day, thus improving the user experience.

[0161] Please see Figure 8 , Figure 8 This is a schematic diagram of a scenario for obtaining a data fitting curve provided in this application, such as... Figure 8 As shown:

[0162] Obtain the initial fitting curve, which can be stored in a database, cloud platform, etc., without restriction. The initial fitting curve can be y = ax + b, where a and b are curve parameters, x is the independent variable, and y is the dependent variable. The first time window contains N time points, and the first dataset contains the data volume corresponding to each of the N time points. Substituting the N time points into the independent variables of the initial fitting curve yields the fitted data volume corresponding to each of the N time points. The fitted data volume set then contains the fitted data volume corresponding to each of the N time points. Each time point can be a specific instant, and the time length between adjacent instant points can be 1 minute. Assuming N is 5, the 5 time points can be [1:01, 1:02, 1:03, 1:04, 1:05], and the corresponding values ​​can be [1, 2, 3, 4, 5]. The first dataset consists of the data volume corresponding to each of the 5 time points, so the first dataset is [1, 2, 3, 4, 5]. The 5 time points and 5 data volumes together form 5 data points, which can be [(1, 1), (2, 2), (3, 4, 5). Substituting the values ​​corresponding to the 5 time points into the initial fitted curve, we obtain the fitted data quantities corresponding to the 5 time points as [a+b, 2a+b, 3a+b, 4a+b, 5a+b]. Substituting the values ​​corresponding to the 5 time points into the independent variables of the initial fitted curve, we obtain 5 data points [(1,a+b), (2,2a+b), (3,3a+b), (4,4a+b), (5,5a+b)]. Subtracting the data quantities corresponding to the N time points from the fitted data quantities, we obtain the difference data quantities. The difference data quantity set contains the difference data quantities corresponding to the N time points. For example, the difference data quantities corresponding to the 5 time points are [1-(a+b), 2-(2a+b), 3-(3a+b), 4-(4a+b), 5-(5a+b)]. Squaring each of the N variance data points yields the squared variance data points for each of the N time points. Summing the N squared variance data points and dividing by N gives the target variance data point. For example, the squared variance data points for the N time points are [(1-(a+b))]. 2 ,(2-(2a+b)) 2 ,(3-(3a+b)) 2 ,(4-(4a+b)) 2 ,(5-(5a+b)) 2 If the target difference data volume is {[1-(a+b)]}, then the target difference data volume is {[1-(a+b)]}. 2 +[2-(2a+b)] 2 +[3-(3a+b)] 2 +[4-(4a+b)] 2 +[5-(5a+b)] 2} / 5, or it can be calculated using the formula: target variance data ratio = {∑i-th variance data amount] 2 The target variance data ratio is calculated using} / N, where i is a positive integer less than or equal to N. In other words, the target variance data ratio can be {[1-(a+b)]}. 2 +[2-(2a+b)] 2 +[3-(3a+b)] 2 +[4-(4a+b)] 2 +[5-(5a+b)] 2} / 5.

[0163] The values ​​of curve parameters (such as a, b, and c mentioned above) can be adjusted to make the target variance ratio approach 0 or equal to 0. When the adjusted curve parameters minimize the target variance ratio (i.e., approach 0 or equal to 0), the adjusted curve parameters can be used as the final adjusted curve parameters. These final adjusted curve parameters can then replace the initial fitted curve parameters to obtain the data fitting curve. Assuming the target variance ratio is 0, such that 0 = {[1-(a+b)]} 2 +[2-(2a+b)] 2 +[3-(3a+b)] 2 +[4-(4a+b)] 2 +[5-(5a+b)] 2 Based on this equation, we can determine that a = 1 and b = 0. Finally, substituting a = 1 and b = 0 into the initial fitted curve, we obtain the data fitted curve as y = x.

[0164] Based on the data fitting curve, the amount of data in the second time window from 1:06 to 1:08 can be predicted. The second time window contains three time points [6,7,8]. Substituting the data corresponding to the three time points into the data fitting curve, we can obtain the amount of data corresponding to the three time points, i.e., the amount of data corresponding to the three time points is [6,7,8]. The second dataset contains the amount of data corresponding to the three time points, i.e., the second dataset is [6,7,8].

[0165] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a data processing device provided in this application. It should be noted that... Figure 9 The data processing apparatus shown is used to execute this application. Figure 2 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8The methods in the illustrated embodiments are shown only in the parts relevant to the embodiments of this application for ease of explanation; specific technical details are not disclosed. Reference to this application is required. Figure 2 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 The illustrated embodiment. The data processing device 900 may include: an acquisition module 901, a data prediction module 902, and a processing module 903. Wherein:

[0166] The acquisition module 901 is used to acquire the first dataset generated by the target object in the first time window; the first dataset contains the amount of data generated by the target object at N time points in the first time window, where N is a positive integer; it is also used to acquire the first reference dataset corresponding to the first historical time window; the first reference dataset contains the amount of data corresponding to L1 time points in the first historical time window, where L1 is a positive integer.

[0167] The data prediction module 902 is used to predict the second dataset corresponding to the second time window based on the fluctuation range between the data amounts corresponding to N time points. The second time window is adjacent to the first time window and is located after the first time window. The second dataset contains the data amounts corresponding to M time points of the predicted second time window, where M is a positive integer. It is also used to predict the third dataset corresponding to the third time window based on the first dataset, the second dataset, and the first reference dataset. The third dataset contains the data amounts corresponding to K time points of the predicted third time window, where K is a positive integer. The third time window is adjacent to the second time window and is located after the second time window. The K time points are associated one-to-one with the L1 time points, and the associated time points are at the same time on different natural days.

[0168] Processing module 903 is used to generate a prediction dataset of the target object based on the second dataset and the third dataset.

[0169] In one possible implementation, the data prediction module 902 described above is used for:

[0170] A data fitting curve is generated based on the data volume corresponding to N time points; the data fitting curve is used to characterize the fluctuation range between the data volume corresponding to N time points.

[0171] Predict the amount of data corresponding to M time points based on the fitted curve;

[0172] A second dataset is constructed based on the data volume corresponding to each of the M time points.

[0173] In one possible implementation, the method by which the data prediction module 902 generates a data fitting curve based on the data volume corresponding to N time points includes:

[0174] Obtain the initial fitted curve; the initial fitted curve contains curve parameters;

[0175] Based on the initial fitted curve, obtain the amount of fitted data corresponding to N time points respectively;

[0176] The amount of differential data corresponding to each of the N time points is determined based on the amount of data corresponding to each of the N time points and the amount of fitted data.

[0177] The target differential data volume is obtained by summing the differential data volumes corresponding to N time points.

[0178] The curve parameters of the initial fitted curve are updated based on the target difference data volume, and the initial fitted curve with updated curve parameters is determined as the data fitted curve.

[0179] In one possible implementation, the data prediction module 902 predicts a third dataset corresponding to a third time window based on the first dataset, the second dataset, and the first reference dataset, including:

[0180] Obtain the second reference dataset corresponding to the second historical time window; the second historical time window contains L2 time points, where L2 is a positive integer and L2 equals N+M. The L2 time points are associated with N+M time points one by one, and the associated time points are at the same time on different natural days. The second reference dataset contains the data volume corresponding to each of the L2 time points.

[0181] Determine the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset;

[0182] Predict the third dataset based on the data volume offset ratio and the first reference dataset.

[0183] In one possible implementation, the method by which the data prediction module 902 determines the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset includes:

[0184] The data volume corresponding to N time points and the data volume corresponding to M time points constitute the fourth dataset;

[0185] The amount of data corresponding to the time points associated with L2 time points in the fourth dataset is determined as the reference data amount corresponding to each of the L2 time points;

[0186] Based on the data volume and reference data volume corresponding to each of the L2 time points, determine the offset ratio corresponding to each of the L2 time points;

[0187] The offset ratios corresponding to the L2 time points are averaged to obtain the data offset ratio.

[0188] In one possible implementation, the method by which the data prediction module 902 determines the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset includes:

[0189] Based on the data offset ratio, the data volume corresponding to each of the LI time points is offset to obtain the offset data volume corresponding to each of the K time points.

[0190] A third dataset is generated based on the offset data volume corresponding to each of the K time points.

[0191] In one possible implementation, the target object is an object in the target application;

[0192] If the target object does not generate any data within the first natural day, the data volume corresponding to each of the L1 time points is obtained based on the data volume generated by all objects in the target application at each of the L1 time points, and the data volume corresponding to each of the L2 time points is obtained based on the data volume generated by all objects at each of the L2 time points; the first natural day is the natural day to which the first historical time window and the second historical time window belong.

[0193] If the target object generates data within the first natural day, then the data volume corresponding to each of the L1 time points is the data volume generated by the target object at each of the L1 time points, and the data volume corresponding to each of the L2 time points is the data volume generated by the target object at each of the L2 time points.

[0194] In one possible implementation, the first time window, the second time window, and the third time window constitute a second calendar day; the processing module 903 is further configured to:

[0195] Obtain the amount of resources transferred per unit;

[0196] Based on the first dataset and the predicted dataset, the total estimated data volume generated by the target object on the second natural day is calculated.

[0197] The estimated resource transfer volume for the target object on the second natural day is determined based on the unit resource transfer volume and the estimated total data volume.

[0198] Please see Figure 10 , Figure 10 This is a schematic diagram of the structure of a computer device provided in this application, such as... Figure 10As shown, the device includes a processor and memory. Optionally, the computer device may also include a network interface. The processor, memory, and network interface can exchange data. The network interface, controlled by the processor, is used to send and receive messages. The memory stores computer programs, including program instructions, and the processor executes the program instructions stored in the memory. The processor is configured to invoke the program instructions to execute the aforementioned method.

[0199] The memory may include volatile memory, such as random-access memory (RAM); it may also include non-volatile memory, such as flash memory, solid-state drive (SSD); and it may also include a combination of the above types of memory.

[0200] The processor can be a central processing unit (CPU). In one embodiment, the processor can also be a graphics processing unit (GPU). The processor can also be a combination of a CPU and a GPU.

[0201] In one possible implementation, the memory is used to store program instructions, which the processor can invoke to perform the following steps:

[0202] Obtain the first dataset generated by the target object in the first time window; the first dataset contains the amount of data generated by the target object at N time points in the first time window, where N is a positive integer;

[0203] The second dataset corresponding to the second time window is predicted based on the fluctuation range between the data volume corresponding to N time points. The second time window is adjacent to the first time window and is located after the first time window. The second dataset contains the data volume corresponding to M time points of the predicted second time window, where M is a positive integer.

[0204] Obtain the first reference dataset corresponding to the first historical time window; the first reference dataset contains the data volume corresponding to L1 time points of the first historical time window, where L1 is a positive integer;

[0205] The third dataset corresponding to the third time window is predicted based on the first dataset, the second dataset, and the first reference dataset. The third dataset contains the data volume corresponding to the K time points of the predicted third time window, where K is a positive integer. The third time window is adjacent to the second time window and is located after the second time window. The K time points are associated with L1 time points one by one, and the associated time points are at the same time on different natural days.

[0206] Generate a prediction dataset for the target object based on the second and third datasets.

[0207] In one possible implementation, when the processor is used to predict the second dataset corresponding to the second time window based on the fluctuation range between the data amounts corresponding to the N time points, it is specifically used for:

[0208] A data fitting curve is generated based on the data volume corresponding to N time points; the data fitting curve is used to characterize the fluctuation range between the data volume corresponding to N time points.

[0209] Predict the amount of data corresponding to M time points based on the fitted curve;

[0210] A second dataset is constructed based on the data volume corresponding to each of the M time points.

[0211] In one possible implementation, when the processor generates a data fitting curve based on the data volume corresponding to N time points, it specifically performs the following:

[0212] Obtain the initial fitted curve; the initial fitted curve contains curve parameters;

[0213] Based on the initial fitted curve, obtain the amount of fitted data corresponding to N time points respectively;

[0214] The amount of differential data corresponding to each of the N time points is determined based on the amount of data corresponding to each of the N time points and the amount of fitted data.

[0215] The target differential data volume is obtained by summing the differential data volumes corresponding to N time points.

[0216] The curve parameters of the initial fitted curve are updated based on the target difference data volume, and the initial fitted curve with updated curve parameters is determined as the data fitted curve.

[0217] In one possible implementation, when the processor is used to predict the third dataset corresponding to the third time window based on the first dataset, the second dataset, and the first reference dataset, it specifically performs the following:

[0218] Obtain the second reference dataset corresponding to the second historical time window; the second historical time window contains L2 time points, where L2 is a positive integer and L2 equals N+M. The L2 time points are associated with N+M time points one by one, and the associated time points are at the same time on different natural days. The second reference dataset contains the data volume corresponding to each of the L2 time points.

[0219] Determine the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset;

[0220] Predict the third dataset based on the data volume offset ratio and the first reference dataset.

[0221] In one possible implementation, the data volume corresponding to N time points and the data volume corresponding to M time points constitute the fourth dataset;

[0222] When the processor is used to determine the data volume offset ratio based on the first dataset, the second dataset, and the second reference dataset, it specifically performs the following tasks:

[0223] The amount of data corresponding to the time points associated with L2 time points in the fourth dataset is determined as the reference data amount corresponding to each of the L2 time points;

[0224] Based on the data volume and reference data volume corresponding to each of the L2 time points, determine the offset ratio corresponding to each of the L2 time points;

[0225] The offset ratios corresponding to the L2 time points are averaged to obtain the data offset ratio.

[0226] In one possible implementation, when the processor is used to predict the third dataset based on the data volume offset ratio and the first reference dataset, it specifically performs the following:

[0227] Based on the data offset ratio, the data volume corresponding to each of the LI time points is offset to obtain the offset data volume corresponding to each of the K time points.

[0228] A third dataset is generated based on the offset data volume corresponding to each of the K time points.

[0229] In one possible implementation, the target object is an object in the target application;

[0230] If the target object does not generate any data within the first natural day, the data volume corresponding to each of the L1 time points is obtained based on the data volume generated by all objects in the target application at each of the L1 time points, and the data volume corresponding to each of the L2 time points is obtained based on the data volume generated by all objects at each of the L2 time points; the first natural day is the natural day to which the first historical time window and the second historical time window belong.

[0231] If the target object generates data within the first natural day, then the data volume corresponding to each of the L1 time points is the data volume generated by the target object at each of the L1 time points, and the data volume corresponding to each of the L2 time points is the data volume generated by the target object at each of the L2 time points.

[0232] In one possible implementation, the first time window, the second time window, and the third time window constitute a second calendar day; the processor is further configured to:

[0233] Obtain the amount of resources transferred per unit;

[0234] Based on the first dataset and the predicted dataset, the total estimated data volume generated by the target object on the second natural day is calculated.

[0235] The estimated resource transfer volume for the target object on the second natural day is determined based on the unit resource transfer volume and the estimated total data volume.

[0236] In specific implementations, the devices, processors, memory, etc. described above can execute the implementation methods described in the above method embodiments, or they can execute the implementation methods described in the embodiments of this application, which will not be repeated here.

[0237] This application also provides a computer-readable storage medium storing a computer program. The computer program includes program instructions, which, when executed by a processor, enable the processor to perform some or all of the steps described in the above method embodiments. Optionally, the computer storage medium can be volatile or non-volatile. The computer-readable storage medium may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application program required for a given function, etc.; the data storage area may store data created based on the use of blockchain nodes, etc.

[0238] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program that causes a computer to perform some or all of the steps of any of the data processing methods described in the above method embodiments.

[0239] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0240] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The aforementioned program can be stored in a computer storage medium, which can be a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0241] The above-disclosed embodiments are merely some of the embodiments of this application, and should not be construed as limiting the scope of this application. Those skilled in the art can understand that all or part of the processes for implementing the above embodiments, and equivalent changes made in accordance with the claims of this application, still fall within the scope of this application.

Claims

1. A data processing method, characterized by, The method is applied to a content distribution network (CDN) charging system, and comprises the following steps: obtaining a first data set generated by a target object in a first time window; the first data set comprises traffic data amounts generated by the target object at N time points in the first time window, N being a positive integer; generating a data fitting curve according to the traffic data amounts corresponding to the N time points, the data fitting curve being used to represent fluctuation amplitudes between the traffic data amounts corresponding to the N time points; predicting a second data set corresponding to a second time window according to the data fitting curve; the second time window is adjacent to the first time window, the second time window is located after the first time window, and the second data set comprises predicted traffic data amounts corresponding to M time points in the second time window, M being a positive integer; obtaining a first reference data set corresponding to a first historical time window; the first reference data set comprises traffic data amounts corresponding to L1 time points in the first historical time window, L1 being a positive integer; obtaining a second reference data set corresponding to a second historical time window; the second historical time window comprises L2 time points, L2 being a positive integer, L2 being equal to N+M, the L2 time points being in one-to-one correspondence with the N+M time points, the time points in one-to-one correspondence being at the same time of different natural days, and the second reference data set comprising traffic data amounts corresponding to the L2 time points; determining a data amount offset ratio according to the first data set, the second data set and the second reference data set; predicting a third data set according to the data amount offset ratio and the first reference data set; the third data set comprises predicted traffic data amounts corresponding to K time points in a third time window, K being a positive integer, the third time window being adjacent to the second time window, the third time window being located after the second time window, and the K time points being in one-to-one correspondence with the L1 time points, the time points in one-to-one correspondence being at the same time of different natural days; generating a predicted data set of the target object according to the second data set and the third data set.

2. The method of claim 1, wherein, The method comprises the following steps: predicting traffic data amounts corresponding to the M time points according to the data fitting curve; constructing the second data set according to the traffic data amounts corresponding to the M time points.

3. The method of claim 1, wherein, The method comprises the following steps: obtaining an initial fitting curve; the initial fitting curve comprises curve parameters; obtaining fitting traffic data amounts corresponding to the N time points according to the initial fitting curve; determining difference data amounts corresponding to the N time points according to the traffic data amounts and the fitting traffic data amounts corresponding to the N time points; summing the difference data amounts corresponding to the N time points to obtain a target difference data amount; Updating the curve parameters of the initial fitting curve according to the target difference data amount, and determining the initial fitting curve on which the curve parameter updating is performed as the data fitting curve.

4. The method of claim 1, wherein, The flow data amounts corresponding to the L2 time points in the fourth data set are determined as the reference flow data amounts corresponding to the L2 time points respectively. The method further comprises: The flow data amounts corresponding to the L2 time points in the fourth data set are determined as the reference flow data amounts corresponding to the L2 time points respectively. The method further comprises: The flow data amounts corresponding to the L2 time points in the fourth data set are determined as the reference flow data amounts corresponding to the L2 time points respectively.

5. The method of claim 1, wherein, The method further comprises: The method further comprises: The method further comprises:

6. The method of claim 1, wherein, The target object is an object in a target application. If the target object does not generate flow data amounts in a first natural day, the flow data amounts corresponding to the L1 time points are obtained according to the flow data amounts generated by all objects in the target application at the L1 time points respectively, and the flow data amounts corresponding to the L2 time points are obtained according to the flow data amounts generated by the all objects at the L2 time points respectively; the first natural day is a natural day to which the first historical time window and the second historical time window belong. If the target object generates flow data amounts in the first natural day, the flow data amounts corresponding to the L1 time points are the flow data amounts generated by the target object at the L1 time points respectively, and the flow data amounts corresponding to the L2 time points are the flow data amounts generated by the target object at the L2 time points respectively.

7. The method of claim 1, wherein, The first time window, the second time window and the third time window constitute a second natural day. The method further comprises: Obtaining a unit resource transfer amount; According to the first data set and the predicted data set, the total amount of estimated data generated by the target object in the second natural day is calculated; According to the unit resource transfer amount and the total amount of estimated data, the estimated resource transfer amount of the target object in the second natural day is determined.

8. A data processing apparatus, characterized by, The device is applied to a content distribution network (CDN) charging system, and the device comprises: The acquisition module is configured to acquire a first data set generated by the target object in a first time window, wherein the first data set comprises traffic data amounts generated by the target object at N time points in the first time window, and N is a positive integer; and to acquire a first reference data set corresponding to a first historical time window, wherein the first reference data set comprises traffic data amounts corresponding to L1 time points in the first historical time window, and L1 is a positive integer. The data prediction module is configured to generate a data fitting curve according to the traffic data amounts corresponding to the N time points, wherein the data fitting curve is used to represent fluctuation amplitudes between the traffic data amounts corresponding to the N time points; to predict a second data set corresponding to a second time window according to the data fitting curve, wherein the second time window is adjacent to the first time window, the second time window is located after the first time window, the second data set comprises traffic data amounts predicted for M time points in the second time window, and M is a positive integer; to acquire a second reference data set corresponding to a second historical time window, wherein the second historical time window comprises L2 time points, L2 is a positive integer, L2 is equal to N+M, the L2 time points are in one-to-one correspondence with the N+M time points, the time points in one-to-one correspondence are at the same time of different natural days, and the second reference data set comprises traffic data amounts corresponding to the L2 time points; to determine a data amount offset ratio according to the first data set, the second data set and the second reference data set; and to predict a third data set according to the data amount offset ratio and the first reference data set, wherein the third data set comprises traffic data amounts predicted for K time points in a third time window, K is a positive integer, the third time window is adjacent to the second time window, the third time window is located after the second time window, the K time points are in one-to-one correspondence with the L1 time points, and the time points in one-to-one correspondence are at the same time of different natural days. The processing module is configured to generate a predicted data set of the target object according to the second data set and the third data set.

9. A computer device, comprising: The computer readable storage medium stores a computer program, and the computer program comprises program instructions. When the program instructions are executed by a processor, the processor executes the method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program comprises program instructions. When the program instructions are executed by a processor, the processor executes the method according to any one of claims 1-7.

11. A computer program product comprising a computer program, characterized in that, The computer program / instructions are executed by a processor to implement the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Method and device for outputting information

    CN108880931A

  • Object flow prediction method, device and apparatus

    CN111461384A