A dynamic migration method for mobile Web tasks based on deep neural network

The deep neural network model is used to perform feature extraction and SVM classification algorithm judgment on the status of mobile devices to achieve dynamic migration of Web tasks, solve the problems of limited resources and high latency of mobile devices, and improve user experience and performance.

CN112241331BActive Publication Date: 2024-10-01NORTHWEST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011301843.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-19
Publication Date
2024-10-01
Estimated Expiration
2040-11-19

AI Technical Summary

Technical Problem

The problem of resource constraints on mobile devices and high latency of web applications, especially when processing computationally intensive tasks, leads to degraded user experience and high energy consumption.

Method used

The deep neural network model is used to extract features from the mobile device’s CPU status, memory status, network status, and Web worker calculation amount, and the SVM classification algorithm is used to determine whether Web tasks need to be migrated to edge servers or cloud servers to achieve computing Offload, reduce latency and energy consumption.

Benefits of technology

It effectively reduces the energy consumption of web applications, improves user experience and performance, and reduces the load and latency of mobile devices by processing computing-intensive tasks on edge servers or cloud servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112241331B_ABST
    Figure CN112241331B_ABST
Patent Text Reader

Abstract

A method for dynamic migration of mobile Web tasks based on deep neural network includes a support vector machine classification algorithm learning module, a mobile device and Web application information feature extraction module and an edge server or cloud server load rate calculation module. Aiming at the difficulty of running Web applications with high computational intensity on resource-constrained mobile devices, the present invention extracts information features such as CPU status, memory status, network status and the computational amount of Web workers of Web applications in mobile devices, and inputs the processed feature information into an SVM classification algorithm Hou Jian prediction model to determine whether it is necessary to migrate Web tasks to edge servers or cloud servers. If migration is required, the best server can be found for migration according to the server load rate calculation algorithm; otherwise, it is executed locally. The method can effectively reduce the energy consumption and execution delay of Web applications and quickly respond to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of neural network and edge computing technology, and specifically relates to a method for dynamic migration of mobile Web tasks based on deep neural network. Background Art

[0002] As the number of smart devices increases, the world will usher in an Internet era with explosive growth in network data information. In addition, with the increasing popularity of 5G networks, the three major business types of enhanced mobile bandwidth, large-scale machine communication, and ultra-reliable low-latency communication pose huge challenges to operators' transmission networks and core networks. Since these application scenarios can bring higher bandwidth rates, more network connections, and lower latency to users, the size of data and business requests that the core network needs to process per unit time are growing exponentially. Therefore, with the increase in network traffic carried by mobile devices, the centralized processing mode adopted by the mobile cloud computing model can no longer meet the daily needs of users because it is far away from the terminal device. In addition, for computing services with high performance requirements such as latency and energy consumption, this model will cause problems such as high latency and network congestion.

[0003] Emerging mobile applications, such as mobile cloud gaming or VR technology, require strict latency constraints and high computing power. For example, cloud gaming services must calculate the interactions of game objects (e.g., characters, landscapes) and present the objects on the screen of the mobile device within a certain time threshold. A survey report on game latency pointed out that for games with time requirements, the network latency is preferably less than 50ms, which is difficult to achieve in traditional cloud systems because the computing servers are located in data centers far away from the clients.

[0004] With the increasing integration of mobile devices and the Internet, coupled with the current platform's spending on offline applications, the boundaries between native applications and mobile Web applications are no longer clear, especially with the continuous development of HTML5, mobile Web applications will become more powerful. While the HTML5 standard makes Web applications more and more powerful, Web applications are also becoming more and more complex and consume more and more resources. However, the computing, storage, power and other resources in smart terminals are limited, which may reduce application performance and affect user experience.

[0005] Before Web Workers, JavaScript was the core of modern web applications. JavaScript and DOM are single-threaded at their core, which means that only one JavaScript method can be executed at any time. When a script that takes a long time to run is executed in an HTML page, all page functions will be blocked until the script is completed. The page UI elements are unresponsive, animations will pause, and other code in the application cannot be executed. When JavaScript needs to be used for large-scale calculations, the task needs to be divided into small code blocks, and timers are used to separate the execution of each code block, which will slow down the execution. With Web Workers, some computationally intensive code can be handed over to Web Workers for execution without affecting the user interface.

[0006] Web Worker is independent of the browser UI thread. It is a JavaScript script that is loaded and run in the background. It is independent of other scripts and does not affect the performance of the page. It provides a JavaScript multi-threading solution. In the main thread of the current JavaScript, Web Worker uses the Worker class to load a JavaScript file to create a new worker thread. When a web application has multiple tasks to process, the tasks can be assigned to different workers. Summary of the invention

[0007] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a method for dynamic migration of mobile Web tasks based on deep neural networks to solve the problems of limited resources of existing mobile devices and high latency of Web applications; the present invention uses HTML5 web worker to migrate computationally intensive code in the web worker to an edge server or cloud server for execution, thereby achieving low latency, reducing the energy consumption of mobile devices, making applications more responsive, and improving user experience.

[0008] In order to achieve the above object, the technical solution adopted by the present invention is:

[0009] A method for dynamic migration of mobile Web tasks based on deep neural networks extracts information features such as CPU status, memory status, network status, and the computing amount of Web workers of Web applications in mobile devices, and inputs the processed feature information into a prediction model of an SVM classification algorithm to determine whether Web tasks need to be migrated to an edge server or a cloud server. The method includes the following steps:

[0010] Step S1, extracting information features of mobile devices and Web applications, where the mobile device information includes CPU status, running memory, and network status; the Web application only considers the computing capacity of the Web worker;

[0011] Step S2, using the prediction model implemented by the SVM classification algorithm to determine whether the Web worker in the Web application needs to be migrated to the edge server or cloud server to achieve computation offloading;

[0012] Step S3, using the result obtained in step S2, if migration is required, find the best server to implement the migration according to the server load rate algorithm, otherwise, directly execute it locally;

[0013] Step S4, if the migration is implemented in step S3, the Web worker will be migrated to the server side, the server will process the worker, and establish communication with the client by calling the function, and return the execution result.

[0014] The step S1 comprises the following steps:

[0015] Step S11, using the browser plug-in to collect characteristic information such as the CPU status, memory status and network status of the mobile device, the computing amount of the web worker can be determined according to the number of workers, the more workers there are, the greater the computing amount;

[0016] Step S12, normalize the feature information to provide feature input values ​​for the next machine learning module.

[0017] In step S11, the current CPU utilization and memory occupancy of the mobile device, that is, the current load of the mobile device, can be obtained through the plug-in in the browser, and the network status can be 4G, 5G or WiFi; the worker contains JavaScript and Webassembly code, in which the more loop statements and conditional statements, the greater the calculation amount, that is, the more workers there are, the greater the calculation amount.

[0018] In step S12, before the feature values ​​are input into the learning algorithm, in order to balance the influence of different features on the classification results, the feature values ​​are normalized by min-max normalization of formula (1); then the processed feature information is input into the SVM classification algorithm to construct a prediction model;

[0019]

[0020] Among them, x i is the original value of the input feature, max{x j} is the maximum eigenvalue of a certain type of feature, min{xj} is the minimum value of a certain type of feature, y i is the new eigenvalue after normalization.

[0021] In step S2, the specific process is as follows:

[0022] Step 1) Introduce a mobile Web worker manager in the mobile device and the server to manage the creation, migration and termination of workers; the model implemented by the SVM classification algorithm is placed in the mobile Web worker manager in the mobile device;

[0023] Step 2) Using browser plug-ins to collect CPU, memory and network status characteristic information of mobile devices;

[0024] Step 3) obtaining the computational load of the program according to the number of Web workers of the Web application;

[0025] Step 4) Based on the support vector machine algorithm, according to the content collected in steps 1), 2) and 3), a prediction model constructed by the support vector machine algorithm is used to determine whether the mobile Web task needs to be migrated to the edge server or the cloud server.

[0026] In the step 4), the characteristic values ​​in step 2) and step 3) are input into the SVM-RBF algorithm, and then the SVM-RBF misclassification cost parameter C and γ value are determined by the grid search method, and the search is automatically performed. After the best prediction result is determined, the search is stopped, and the parameter C and γ value are saved to determine whether the current mobile device needs to be migrated when running the Web application.

[0027] In step S3, when the mobile Web task needs to be migrated, it is necessary to obtain the load status of the destination server to determine whether it is the best server for migration. The specific determination method is as follows:

[0028] This method fully considers the running status of the edge server and evaluates the server in four aspects: CPU utilization, disk I / O rate, memory capacity, and network bandwidth. CPU utilization reflects the busyness of the server CPU, disk I / O rate reflects the throughput of server data operations, memory capacity reflects the running status of the server system, and network bandwidth reflects the amount of data received by the server.

[0029] 1) The performance of the server is: P = (P cpu , P i / o , P m , P b ), where P cpu , P i / o , P m , P bThey represent the server's CPU processing power, disk I / O read / write capability, memory capacity, and network bandwidth. Usually, the P cpu , P i / o , P m , P b is a fixed value;

[0030] 2) The server load condition is: K = (K cpu , K i / o , K m , K b ), where K cpu , K i / o , K m , K b They represent the server's current CPU processing capacity, current disk I / O read / write capacity, current memory usage, and current network bandwidth usage.

[0031] 3) The server load rate is:

[0032] S load =θ cpu R cpu +θ i / o R i / o +θ m R m +θ b R b (2)

[0033] and

[0034] θ cpu +θ i / o +θ m +θ b =1 (3)

[0035] θ param Indicates the weight of the indicator. The higher the value, the greater the proportion of the corresponding resource and the stronger the dependence. For example, if only the CPU is needed at a certain moment, then θ cpu ,θ i / o ,θ m ,θ b The corresponding values ​​are 1.0, 0, 0, 0; or other cases such as θ cpu ,θ i / o ,θ m ,θ b 0.4, 0.3, 0.2, 0.1, which needs to be determined based on the resources currently processed by the server;

[0036] 4) R cpu , R i / o , R m , R bThey represent the server's CPU processing rate, disk I / O rate, memory utilization, and bandwidth occupancy, respectively. The calculation method is as follows:

[0037] R cpu =K cpu / P cpu (4)

[0038] R i / o =K i / o / P i / o (5)

[0039] R m =K m / P m (6)

[0040] R b =K b / P b (7)

[0041] 5) According to the load rate obtained by formula (1), the high load rate threshold can be set and low load threshold and The value can be set according to the actual situation of the server;

[0042] Let D represent the load status of the server:

[0043]

[0044] when When D = 0, it means that the server is currently in a low-load state and can give priority to accepting the transferred computing tasks; when When D = 1, it means that the server is currently in a normal load state and can consider accepting the transferred computing tasks; when , it means that the server is currently in a high-load state. If a computing task is connected at this time, the computing task should be transferred to other low-load servers.

[0045] In step S4, the Web worker needs to be migrated, and before that, the following operations need to be performed:

[0046] 1) Save user-defined data, recursively traverse user-defined global variables in the global scope of the worker, and send them to the server as JavaScript code;

[0047] 2) Save built-in data. The initial state of each built-in object is saved and directly migrated to the server;

[0048] 3) Use the mobile web worker manager to migrate web workers.

[0049] After the Web worker is migrated to the server, the server processes it and uses the mobile Web worker manager to establish communication with the client main thread to return the processing results to the client; after the worker completes its work, the main thread can call a function called terminal to delete the worker.

[0050] The beneficial effects of the present invention are:

[0051] The present invention provides a method for dynamic migration of mobile Web tasks based on deep neural networks. Aiming at the high latency and high energy consumption problems of Web applications, a neural network model is used to extract characteristic information such as the CPU status, memory status, network status and worker computing amount of the mobile device to determine whether computing migration is needed, which can significantly reduce the energy consumption of Web applications and improve performance.

[0052] The server load rate calculation module of the present invention can effectively find the best server around the mobile device by using the server load rate calculation method during the calculation offloading process to implement the calculation offloading, thereby effectively reducing the delay of the Web application program and improving user interactivity. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of the use scenario of the present invention.

[0054] Figure 2 This is a structural diagram of the machine learning module of the present invention.

[0055] Figure 3 The overall architecture diagram for web worker migration.

[0056] Figure 4 Detailed process diagram for web worker migration. DETAILED DESCRIPTION

[0057] The present invention will be further described in detail below in conjunction with the accompanying drawings, but the present invention is not limited to the following embodiments.

[0058] like Figure 1 The schematic diagram of the usage scenario of the present invention is a method for dynamic migration of mobile Web tasks based on deep neural networks, which extracts information features such as the CPU status, memory status, network status and computing power of the Web worker of the Web application in the mobile device, and inputs the processed feature information into the SVM classification algorithm and Hou Jian prediction model to determine whether the Web task needs to be migrated to the edge server or cloud server.

[0059] like Figure 2The structure diagram of the machine learning module of the present invention is shown, which uses the SVM classification algorithm to build a prediction model to determine whether the Web task needs to be migrated to the edge server or cloud server.

[0060] like Figure 3 The framework diagram of web worker migration of the present invention is shown, which utilizes a mobile web worker manager to manage the creation, migration, and termination of workers, and offloads computing to edge servers or cloud servers.

[0061] like Figure 4 The detailed process diagram of the web worker of the present invention shown utilizes the mobile Web worker manager to trigger a migration event, sends the worker, i.e., JavaScript code, to the server for processing, and returns the result to the client.

[0062] Reference Figure 1 to Figure 4 A method for dynamic migration of mobile Web tasks based on deep neural networks is proposed. It extracts information features such as CPU status, memory status, network status, and the computing amount of Web workers of Web applications in mobile devices, and inputs the processed feature information into the SVM classification algorithm Hou Jian prediction model to determine whether the Web task needs to be migrated to the edge server or cloud server. The method specifically includes the following steps:

[0063] Step S1, extracting information features of mobile devices and Web applications, where the mobile device information includes CPU status, running memory, and network status; the Web application only considers the computing capacity of the Web worker;

[0064] Step S2, using the prediction model implemented by the SVM classification algorithm to determine whether the Web worker in the Web application needs to be migrated to the edge server or cloud server to achieve computation offloading;

[0065] Step S3, using the result obtained in step S2, if migration is required, find the best server to implement the migration according to the server load rate algorithm, otherwise, directly execute it locally;

[0066] Step S4, if the migration is implemented in step S3, the Web worker will be migrated to the server side, the server will process the worker, and establish communication with the client by calling the function, and return the execution result.

[0067] The step S1 comprises the following steps:

[0068] Step S11, using the browser plug-in to collect characteristic information such as the CPU status, memory status and network status of the mobile device, the computing amount of the web worker can be determined according to the number of workers, the more workers there are, the greater the computing amount;

[0069] Step S12, normalize the feature information to provide feature input values ​​for the next machine learning module.

[0070] In step S11, the current CPU utilization and memory occupancy of the mobile device, that is, the current load of the mobile device, can be obtained by using the plug-in in the browser, and the network status can be 4G, 5G or WiFi; the worker contains JavaScript and Webassembly code, in which the more loop statements and conditional statements, the greater the calculation amount, that is, the more workers there are, the greater the calculation amount.

[0071] In step S12, the characteristic values ​​are normalized using formula (1), and then the processed characteristic values ​​are input into the SVM classification algorithm to construct a prediction model.

[0072] The step S2 comprises the following steps:

[0073] 1) Introduce a mobile Web worker manager in the mobile device and server to manage the creation, migration and termination of workers; the model implemented by the SVM classification algorithm is placed in the mobile Web worker manager in the mobile device;

[0074] 2) Use browser plug-ins to collect CPU, memory and network status characteristic information of mobile devices;

[0075] 3) Obtain the computational load of the program based on the number of Web workers of the Web application;

[0076] 4) Based on the support vector machine algorithm, according to the content collected in step 1), step 2), and step 3), a prediction model constructed by the support vector machine algorithm is used to determine whether the mobile Web task needs to be migrated to the edge server or the cloud server.

[0077] In the step 4), the characteristic values ​​in step 2) and step 3) are input into the SVM-RBF algorithm, and then the SVM-RBF misclassification cost parameter C and γ value are determined by the grid search method, and the search is automatically performed. After the best prediction result is determined, the search is stopped, and the parameter C and γ value are saved to determine whether the current mobile device needs to be migrated when running the Web application.

[0078] In step S3, when the mobile Web task needs to be migrated, it is necessary to obtain the load status of the destination server to determine whether it is the best server for migration. The server load comprehensively evaluates the server in terms of CPU utilization, disk I / O rate, memory capacity, and network bandwidth. By using formulas (2) to (8), the load rate of the servers around the mobile device can be obtained, so that the best server can be found to implement migration, so as to achieve the purpose of computing offloading.

[0079] In step S4, the Web worker needs to be migrated, and before that, the following operations need to be performed:

[0080] 1) Save user-defined data, recursively traverse user-defined global variables in the global scope of the worker, and send them to the server as JavaScript code;

[0081] 2) Save built-in data. The initial state of each built-in object is saved and directly migrated to the server;

[0082] 3) Use the mobile web worker manager to migrate web workers.

[0083] After the Web worker is migrated to the server, the server will process it and use the mobile Webworker manager to establish communication with the client main thread and return the processing results to the client; after the worker completes its work, the main thread can call a function called "terminal" to delete the worker.

Claims

1. A method for dynamic migration of mobile Web tasks based on deep neural networks, It is characterized in that The following steps are involved: Step S1, extracting information features of mobile devices and Web applications, where the mobile device information includes CPU status, running memory, and network status; the Web application only considers the computing capacity of the Web worker; Step S2, using the prediction model implemented by the SVM classification algorithm to determine whether the Web worker in the Web application needs to be migrated to the edge server or cloud server to achieve computation offloading; In step S2, the specific process is as follows: Step 1) Introduce a mobile Web worker manager in the mobile device and the server to manage the creation, migration and termination of workers; the model implemented by the SVM classification algorithm is placed in the mobile Web worker manager in the mobile device; Step 2) Using browser plug-ins to collect CPU, memory and network status characteristic information of mobile devices; Step 3) obtaining the computational load of the program according to the number of Web workers of the Web application; Step 4) Based on the support vector machine algorithm, according to the content collected in steps 1), 2), and 3), a prediction model constructed by the support vector machine algorithm is used to determine whether the mobile Web task needs to be migrated to the edge server or the cloud server; In the step 4), the characteristic values ​​in step 2) and step 3) are input into the SVM-RBF algorithm, and then the SVM-RBF misclassification cost parameter C and γ value are determined by using the grid search method, and the search is automatically performed. After the best prediction result is determined, the search is stopped, and the parameter C and γ value are saved to determine whether the current mobile device needs to be migrated when running the Web application; Step S3, using the result obtained in step S2, if migration is required, find the best server to implement the migration according to the server load rate algorithm, otherwise, directly execute it locally; In step S3, when the mobile Web task needs to be migrated, it is necessary to obtain the load status of the destination server to determine whether it is the best server for migration. The specific determination method is as follows: This method fully considers the running status of the edge server and evaluates the server in four aspects: CPU utilization, disk I / O rate, memory capacity, and network bandwidth. CPU utilization reflects the busyness of the server CPU, disk I / O rate reflects the throughput of server data operations, memory capacity reflects the running status of the server system, and network bandwidth reflects the amount of data received by the server. 1) The performance of the server is: P = (P cpu , P i / o , P m , P b ), where P cpu , P i / o , P m , P b They represent the server's CPU processing power, disk I / O read / write capability, memory capacity, and network bandwidth. Usually, the P cpu , P i / o , P m , P b is a fixed value; 2) The server load condition is: K = (K cpu , K i / o , K m , K b ), where K cpu , K i / o , K m , K b They represent the server's current CPU processing capacity, current disk I / O read / write capacity, current memory usage, and current network bandwidth usage. 3) The server load rate is: S load =θ cpu R cpu +θ i / o R i / o +θ m R m +θ b R b (2) and i cpu +θ i / o +θ m +θ b =1 (3) θ param Indicates the weight of the indicator. The higher the value, the greater the proportion of the corresponding resource and the stronger the dependence. For example, if only the CPU is needed at a certain moment, then θ cpu ,θ i / o ,θ m ,θ b The corresponding values ​​are 1.0, 0, 0, 0; Or other cases such as θ cpu ,θ i / o ,θ m ,θ b 0.4, 0.3, 0.2, 0.1, which needs to be determined based on the resources currently processed by the server; 4) R cpu , R i / o , R m , R b They represent the server's CPU processing rate, disk I / O rate, memory utilization, and bandwidth occupancy, respectively. The calculation method is as follows: R cpu =K cpu / P cpu (4) R i / o =K i / o / P i / o (5) R m =K m / P m (6) R b =K b / P b (7) 5) According to the load rate obtained by formula (1), the high load rate threshold can be set and low load threshold and The value can be set according to the actual situation of the server; Let D represent the load status of the server: when When D = 0, it means that the server is currently in a low-load state and can give priority to accepting the transferred computing tasks; when When D = 1, it means that the server is currently in a normal load state and can consider accepting the transferred computing tasks; when When , it means that the server is currently in a high-load state. If there is a computing task at this time, the computing task should be transferred to other low-load servers; Step S4, if the migration is implemented in step S3, the Web worker will be migrated to the server side, the server will process the worker, and establish communication with the client by calling the function, and return the execution result.

2. According to claim 1, a method for dynamic migration of mobile Web tasks based on deep neural network, It is characterized in that The step S1 comprises the following steps: Step S11, using the browser plug-in to collect characteristic information such as the CPU status, memory status and network status of the mobile device, the computing amount of the web worker can be determined according to the number of workers, the more workers there are, the greater the computing amount; Step S12, normalize the feature information to provide feature input values ​​for the next machine learning module.

3. According to claim 2, a method for dynamic migration of mobile Web tasks based on deep neural network, It is characterized in that In step S11, the current CPU utilization and memory occupancy of the mobile device, that is, the current load of the mobile device, can be obtained through the plug-in in the browser, and the network status can be 4G, 5G or WiFi; the worker contains JavaScript and Webassembly code, in which the more loop statements and conditional statements, the greater the calculation amount, that is, the more workers there are, the greater the calculation amount.

4. According to claim 2, a method for dynamic migration of mobile Web tasks based on deep neural network, It is characterized in that In step S12, before the feature values ​​are input into the learning algorithm, in order to balance the influence of different features on the classification results, the feature values ​​are normalized by min-max normalization of formula (1); then the processed feature information is input into the SVM classification algorithm to construct a prediction model; Among them, x i is the original value of the input feature, max{x j } is the maximum eigenvalue of a certain type of feature, min{x j } is the minimum value of a certain type of feature, y i is the new eigenvalue after normalization.

5. According to claim 1, a method for dynamic migration of mobile Web tasks based on deep neural network, It is characterized in that In step S4, the Web worker needs to be migrated, and before that, the following operations need to be performed: 1) Save user-defined data, recursively traverse user-defined global variables in the global scope of the worker, and send them to the server as JavaScript code; 2) Save built-in data. The initial state of each built-in object is saved and directly migrated to the server; 3) Use the mobile web worker manager to migrate web workers.

6. According to claim 5, a method for dynamic migration of mobile Web tasks based on deep neural network, It is characterized in that After the Web worker is migrated to the server, the server processes it and uses the mobile Web worker manager to establish communication with the client main thread to return the processing results to the client; after the worker completes its work, the main thread calls a function called terminal to delete the worker.