A server-insensitive data transmission cost optimization method
By building a transmission time and cost prediction model and automatically searching for transmission parameters, the problem of high efficiency and low transmission cost in the server's unaware scenario is solved, and efficient and accurate data transmission is achieved.
Patent Information
- Application Number
- CN202210617619.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-06-01
AI Technical Summary
The prior art is difficult to meet the requirements of data transmission parameter search efficiency, parameter quality and time constraints in the server-free scenario, resulting in high transmission costs and low efficiency.
By detecting the transmission bandwidth and computing power of the server's unaware environment, a prediction model of data transmission time and cost is built, combining file feature sampling and compression performance prediction, it automatically searches for transmission parameters that meet time constraints and are the lowest cost, including memory configuration and concurrency. and data compression method.
It realizes efficient and accurate data transmission cost optimization in the server-free scenario, can complete transmission tasks within a specified time and reduce costs, improving transmission efficiency and accuracy.
Smart Images

Figure CN114996228B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission in a cloud environment, and in particular to a server-unaware data transmission cost optimization method. Background Art
[0002] In today's era, cloud computing, as an important information infrastructure service, supports the operation of applications in many industries. As a traditional technology, the cloud computing virtual machine leasing model (such as AWS EC2) is gradually facing problems such as cumbersome environment configuration, redundant and bulky instances, and poor elasticity. In recent years, server-aware computing is gradually developing into a new generation of cloud computing technology. It provides computing resources in the form of cloud functions (FaaS, such as AWS Lambda), so that users do not need to pay attention to the management of the underlying virtual servers, and has faster scalability and more granular billing methods. The fast delivery, extreme elasticity, and lower cost of server-aware computing have attracted widespread attention from academia and industry. On the other hand, there are a large number of data transmission needs in real applications, such as data disaster recovery, application CDN (Content Delivery Network), and my country's East-West Computing Project. Studies have shown that cloud vendors need to spend hundreds of millions of dollars on data transmission each year, and the problem of poor transmission performance on the cloud has always existed. Therefore, data transmission on a server-aware platform is very promising, especially for those server-aware native applications.
[0003] Existing server-unaware systems usually complete data transmission between cloud functions by reading and writing remote storage. In addition, in cloud functions, data compression can be performed on the transmitted data to reduce the amount of transmitted data and improve transmission efficiency. However, since data compression itself also introduces a lot of additional computing overhead, fixed use of a certain compression method sometimes brings negative effects. Therefore, different compression methods need to be selected according to different scenario requirements. To achieve efficient data transmission in server-unaware scenarios, not only does it require the selection of a suitable compression method, but it also faces the problem of system configuration of cloud functions.
[0004] Existing data transmission optimization methods include the selection of transmission compression methods, automatic search for optimal parameters, and data transmission optimization for server-unaware scenarios.
[0005] The first category of methods for selecting transmission compression methods mainly balances the compression ratio and compression rate of the compression method to achieve the purpose of optimizing transmission energy consumption or transmission efficiency. However, these methods do not consider the characteristics of the server-unaware environment and are difficult to effectively solve the problem of selecting compression methods in server-unaware scenarios.
[0006] The second category is about automatic search methods for system parameters, which are mainly divided into three categories: black box, gray box and white box: 1) Black box search algorithms only sample or traverse in the search space, without considering the characteristics of the problem, but may have problems of low efficiency and poor effect; 2) Gray box algorithms will optimize the next parameter selection based on historical parameters; 3) White box algorithms fully analyze the characteristics of the problem, so that numerical calculation methods can accurately and quickly find better parameters. Currently, existing methods are mainly based on black box algorithms and gray box algorithms, while this method is based on white box algorithms.
[0007] The third category of transmission optimization methods without server awareness mainly optimizes the performance and cost of specific applications, such as big data analysis applications, video analysis systems, and machine learning applications. These methods mainly consider the access cost and access efficiency of remote storage systems. Unlike these methods, this method considers the cross-domain situation of remote storage and cloud functions, in which the transmission efficiency is lower and includes expensive bandwidth costs.
[0008] To sum up, it is difficult for existing methods to simultaneously meet the requirements of parameter search efficiency, parameter quality and time constraints in the server-unaware transmission optimization scenario. Summary of the invention
[0009] Purpose of the invention: In view of the problems and shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide an efficient and accurate data transmission cost optimization method in a server-unaware scenario, which can ensure that the transmission task is completed within the specified time and at the lowest cost.
[0010] Technical solution: To achieve the above-mentioned purpose, the present invention proposes a server-unaware data transmission cost optimization method, comprising the following steps:
[0011] (1) Use standard testing procedures to detect the relationship between the transmission bandwidth, computing power, and system configuration of the server-unaware environment, and statistically analyze the various billing items of server-unaware cloud vendors during the data transmission process;
[0012] (2) constructing a first prediction model of data transmission time and a second prediction model of transmission cost in a server-unaware environment according to the characteristics of the data transmission process and the various relationship information in step (1);
[0013] (3) The user inputs the task description of the transmission task into the system in JSON format, and specifies the time constraint of the transmission task and the address information of the transmission task in the task description;
[0014] (4) For files with unknown compression performance, firstly, feature sampling of the files is performed, and then the compression performance of the files is predicted using the third compression performance prediction model trained in advance;
[0015] (5) automatically searching for transmission parameters that meet the time constraint and have the lowest cost based on the task description of step (3), the compression performance of the file of step (4), and the first prediction model and the second prediction model of step (2), wherein the transmission parameters include the memory configuration, concurrency, and data compression method of the server-unaware cloud function;
[0016] (6) According to the task description of step (3) and the transmission parameters of step (5), use the server's non-aware computing resources to transmit data and monitor the execution of the job;
[0017] (7) After the task execution is completed, the execution information is collected, and then the first prediction model, the second prediction model and the third prediction model are updated.
[0018] Furthermore, in step (1), the relationship between the server-unaware cloud function memory size and the transmission bandwidth and the relationship between the server-unaware cloud function memory size and the computing performance coefficient were tested.
[0019] Furthermore, in the step (2), a first prediction model is constructed with transmission bandwidth and compression rate as bottlenecks, a mathematical function relationship expression of the first prediction model is constructed by a function fitting-based method, and a mathematical relationship expression of the second prediction model is constructed based on the billing items in step (1) and the first prediction model.
[0020] Furthermore, in step (4), the byte entropy of the file is used as a feature, the compression ratio and compression rate of the file are used as labels, and a random forest regression model is used to train a third prediction model of compression performance in advance; for files with known compression performance, step (4) is skipped.
[0021] Furthermore, in step (4), the file is sampled in blocks using Cochran's theorem, and the compression performance of different file blocks is predicted using a third prediction model based on the characteristics of different file blocks. The final result is the average value of the compression performance of different file blocks, and the compression performance includes compression ratio and compression rate information.
[0022] Furthermore, in the step (5), the transmission parameter search problem is abstracted into a nonlinear integer programming problem, and the nonlinear integer programming problem is processed by enumerating variables and non-smooth functions, and then the optimal parameters are quickly searched by sequential quadratic programming method.
[0023] Furthermore, in step (6), a speculative execution method is used to solve the long tail effect generated during large-scale parallel data transmission.
[0024] Beneficial effects of the present invention: The present invention can select the transmission parameters with the lowest transmission cost for the user according to the transmission performance requirements given by the user in a server-unaware scenario. First, the present invention constructs an accurate performance cost prediction model to estimate the transmission time and cost of different transmission parameters without actual transmission. Then, the present invention abstracts the parameter search problem into a nonlinear integer programming problem and designs an ingenious numerical calculation method to achieve the purpose of quickly and accurately searching for the optimal parameters that meet the time constraints. Therefore, the present invention can achieve economical and efficient data transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of the overall process of the present invention;
[0026] FIG2(a) is a comparison diagram of the parameter optimization effect of the present invention on the Lineitem 10GB data set of TPC-H with that of the prior art; FIG2(b) and FIG2(c) are comparison diagrams of the transmission time and transmission cost of the present invention on four data sets with that of the prior art, respectively. DETAILED DESCRIPTION
[0027] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0028] The present invention proposes a method for optimizing data transmission cost without server awareness, which solves the problem that existing methods are difficult to simultaneously meet search efficiency, accuracy, robustness and time constraints in the scenario of server-unaware transmission optimization. Figure 1 As shown, the complete process of the present invention is divided into a modeling phase and a transmission optimization phase. The following takes the transmission of a 10GB Lineitem dataset in a server-unaware environment as an example to illustrate the specific implementation of the present invention.
[0029] The modeling phase includes two steps: server-unaware environment detection and time cost model construction, which serves as the basis for subsequent cost optimization, and the detection results are platform-dependent. For a specific platform, modeling is generally only required once, and it can be dynamically updated based on historical data. The specific implementation methods are as follows:
[0030] The server-unaware environment detection step corresponds to step (1) of the technical solution. The specific implementation method is as follows: first, test the transmission bandwidth under different cloud function memories, set the cloud function memory size to 256-3096MB, and set each interval to 256MB. In a cloud function of a certain memory size, continuously generate data blocks of a fixed size (for example, 64MB), and then write them to the object storage, so as to measure the average transmission bandwidth under the memory size. Next, use a time-limited counting program to test the count value under different cloud function memory sizes, so as to estimate the proportion coefficient of the CPU time slice that can be used by the cloud function under different cloud function memory sizes to the maximum case. This coefficient can be used to estimate the compression rate under different cloud function memories. Finally, analyze and model the pricing items of server-unaware cloud vendors to find out the key cost factors. For example, on AWS, for cross-regional remote data transmission, the costs of the related systems involved are mainly three types of costs: server-unaware computing cost, object storage cost, and bandwidth cost. Table 1 shows the reference values of various pricing items on AWS. The rightmost column shows the various costs of transferring a 50GB English Wikipedia image file in the AWS environment (configured with 1024MB cloud function memory size, 50 function concurrency, and using zlib compression method to compress data).
[0031] Table 1 Reference values for various pricing items on Amazon Cloud (AWS)
[0032] Pricing Items AWS reference values <![CDATA[Total cost × 10 -3 $(US dollars)]]> Lambda calculation unit price 1.67e-5~2.3e-5$ / GB / sec 125.25 Lambda request price 0.2$ / Mops 0.01 S3 storage unit price 1.4e-8$ / GB / sec 0.105 S3 request price 5$ / Mops 64 Unit traffic cost 0.01~0.16$ / GB 142.8
[0033] The step of constructing a data transmission time cost model corresponds to step (2) of the technical solution. The specific implementation method is: divide the data transmission into three processes: reading, compression, and writing, and these three processes are executed in parallel in a pipeline manner. Since the reading rate is generally faster than the writing rate, and the decompression rate is faster than the compression rate, the overall transmission time is modeled as the longest time between the compression time and the writing time. For the relationship between the cloud function transmission bandwidth and the cloud function memory size obtained in step (1), as well as the relationship between the cloud function single-core CPU performance coefficient and the cloud function memory size, a piecewise linear fitting method can be used for fitting, thereby obtaining the mathematical relationship expression of the first prediction model. Finally, the mathematical relationship expression is substituted into the pricing model obtained in step (1), so as to obtain the mathematical relationship expression of the second prediction model. These two expressions can be used to directly calculate the time and cost required for transmission based on the mathematical expressions when the above series of parameters are given.
[0034] The transmission optimization stage is the second stage of the technical solution described in the present invention. This stage includes five steps: submitting transmission tasks, sampling file features and predicting compression performance, searching for optimal transmission parameters, executing data transmission, and updating models, which correspond to steps (3) to (7) of the technical solution respectively.
[0035] The step of submitting the transmission task corresponds to step (3) of the technical solution. The specific implementation method is: the user inputs the description of the transmission task into the system in JSON format, and the time constraint of the transmission task and the address information of the transmission task need to be specified in the task description. For example, if the user wants to transfer a 10GB Lineitem data set within 200 seconds, the source path, target path and time constraint need to be specified using three fields respectively, and the JSON object is used as the input of step (4).
[0036] The file feature sampling and compression performance prediction step corresponds to step (4) of the technical solution. The specific implementation method is as follows: first, the third prediction model of compression performance is trained in advance, and the model is a random forest regression model. The input of the model is the byte entropy of the file, and the output is the compression rate or compression rate of the file. Various types of data files can be divided into multiple small files, and these small files are compressed using a compression method to generate a training data set. Then, for the specified file Lineitem to be transmitted, the file is divided into 2560 non-overlapping blocks according to the size of 4MB. Using Cochran's theorem, a 95% confidence level and a 5% error boundary are taken, 335 file blocks are sampled from the 2560 blocks, and the byte entropy of these file blocks is counted. Then, the third prediction model is used to predict the compression rate and compression rate of these 335 file blocks. Finally, the compression rate and compression rate of the entire Lineitem file are taken as the average value of these 335 file blocks. Since the prediction errors of different file blocks offset each other, the prediction of this method has a high accuracy. Moreover, the sampling method avoids scanning the entire data, making the feature extraction process faster. The feature extraction processes of different file blocks are independent, so the feature sampling process can further improve performance by using parallelization technology. Finally, the prediction information of compression rate and compression ratio will be used as one of the inputs of step (5).
[0037] The optimal transmission parameter search step corresponds to step (5) of the technical solution. The specific implementation method is: first, the parameter search problem is converted into a nonlinear integer programming problem. For this problem, since it is necessary to minimize the transmission cost and meet the transmission time constraint, it is an inequality constraint optimization problem. For the selection of compression methods, the present invention numbers all compression methods and uses the compression method number as one of the search parameters. Since the cloud function memory size, the concurrency of the cloud function and the compression method number are all integer values, it is an integer programming problem. The model in step (2) is generally a nonlinear model in the actual modeling process. Therefore, the parameter search problem can be abstracted into a nonlinear integer programming problem. For the compression method parameters, the present invention enumerates them. Since the number of compression methods is relatively small, the enumeration overhead is not large. Then, for the objective function (cost function) in the problem, since the present invention adopts the method of taking the maximum value and piecewise linear fitting when modeling the transmission time, and the objective function contains the transmission time term (the transmission time affects the server's imperceptible computing cost), the objective function is a polyhedral function and is non-continuously differentiable. The present invention replaces the transmission time term in the objective function with the time constraint given by the user, thereby obtaining the upper bound function of the objective function, and replaces the original objective function with the upper bound function for optimization, so that the new objective function is continuously differentiable. Next, for the time constraint term in the problem, since the transmission time prediction model is a polyhedral function, the present invention splits the constraint term into multiple equivalent continuously differentiable constraints. At this point, all terms in the entire problem are continuously differentiable. Then, the present invention uses the sequential quadratic programming method to solve the problem. Since this method is similar to Newton's method and takes into account both the boundary solution and the internal solution of the problem, it can quickly solve the problem with a better solution. Finally, for the comparison of the parameters corresponding to each compression method, the best one is selected as the final transmission parameter and used as the input of step (6).
[0038] The steps of executing data transmission and updating the model correspond to steps (6) and (7) of the technical solution. The specific implementation method is as follows: according to the parameters obtained in step (5), the function memory size, function concurrency and data compression method of the server-unaware cloud function are set, and then the original Lineitem file is logically divided into different partitions. The number of partitions is the concurrency of the function. Each cloud function processes a partition respectively, and different cloud functions are executed concurrently. In addition, the thread pool technology is used to monitor the execution status of each function. For cloud functions with large concurrency (more than 20), when x% of the cloud functions are completed, for the remaining unfinished cloud functions, new cloud functions are started to transmit the data required to be transmitted by these cloud functions. When all partitions are finally transmitted, the remaining unfinished cloud functions are terminated, thereby reducing the impact of the long tail effect on the overall transmission time. After the task is completed, each cloud function will count the transmission bandwidth, compression rate and other information and return it to the system. The system collects this information and uses it as the input of step (7). Then, the collected information is used to update the three prediction models in steps (2) and (4).
[0039] The present invention proposes a method for optimizing data transmission costs that is efficient, accurate, and oriented to server-unaware scenarios. In order to test the actual performance of the method, the present invention is tested on a real AWS platform. First, the present invention evaluates the efficiency of the optimal transmission parameter search phase. In the test, the parameter search time of the other seven most advanced parameter search methods and the cost required for transmission using the parameters are first compared, and the results are shown in Figure 2(a). The test results show that compared with the most advanced parameter search methods available, the present invention can improve the parameter search efficiency by more than 3 times, and is also superior to most algorithms in terms of accuracy and robustness. Furthermore, the end-to-end transmission time and cost of the entire transmission cost optimization method and the transmission cost optimization method of the prior art are compared, and the results are shown in Figure 2(b). The test results show that the transmission cost optimization method of the present invention has lower transmission costs and higher transmission efficiency.
Claims
1. A method for optimizing data transmission cost without server perception, comprising the following steps: (1) Use standard testing procedures to detect the relationship between the transmission bandwidth, computing power, and system configuration of the server-unaware environment, and statistically analyze the various billing items of server-unaware cloud vendors during the data transmission process; (2) constructing a first prediction model of data transmission time and a second prediction model of transmission cost in a server-unaware environment according to the characteristics of the data transmission process and the various relationship information in step (1); (3) The user inputs the task description of the transmission task into the system in JSON format, and specifies the time constraint of the transmission task and the address information of the transmission task in the task description; (4) For files with unknown compression performance, firstly, feature sampling of the files is performed, and then the compression performance of the files is predicted using the third compression performance prediction model trained in advance; (5) automatically searching for transmission parameters that meet the time constraint and have the lowest cost based on the task description of step (3), the compression performance of the file of step (4), and the first prediction model and the second prediction model of step (2), wherein the transmission parameters include the memory configuration, concurrency, and data compression method of the server-unaware cloud function; (6) According to the task description of step (3) and the transmission parameters of step (5), use the server's non-aware computing resources to transmit data and monitor the execution of the job; (7) After the task execution is completed, the execution information is collected, and then the first prediction model, the second prediction model, and the third prediction model are updated; In the step (5), the transmission parameter search problem is abstracted into a nonlinear integer programming problem, and the nonlinear integer programming problem is processed by enumerating variables and non-smooth functions, and then the optimal parameters are quickly searched by sequential quadratic programming method.
2. According to claim 1, a server-unaware data transmission cost optimization method is characterized by: In the step (1), the relationship between the server-unaware cloud function memory size and the transmission bandwidth and the relationship between the server-unaware cloud function memory size and the computing performance coefficient were tested.
3. According to claim 1, a method for optimizing server-insensitive data transmission costs, characterized in that: In the step (2), a first prediction model is constructed with transmission bandwidth and compression rate as bottlenecks, a mathematical function relationship expression of the first prediction model is constructed based on a function fitting method, and a mathematical relationship expression of a second prediction model is constructed based on the billing items in the step (1) and the first prediction model.
4. According to claim 1, a server-unaware data transmission cost optimization method is characterized by: In the step (4), the byte entropy of the file is used as a feature, the compression ratio and compression rate of the file are used as labels, and the random forest regression model is used to train the third prediction model in advance; for files with known compression performance, step (4) is skipped.
5. According to claim 1, a method for optimizing server-insensitive data transmission costs, characterized in that: In the step (4), the file is sampled in blocks using Cochran's theorem, and the compression performance of different file blocks is predicted using a third prediction model based on the characteristics of different file blocks. The final result is the average value of the compression performance of different file blocks, and the compression performance includes compression ratio and compression rate information.
6. According to claim 1, a method for optimizing server-insensitive data transmission costs, characterized in that: In the step (6), a speculative execution method is used to solve the long tail effect generated during large-scale parallel data transmission.
