The invention relates to a technique of optimal mobile devices user experience which can be implemented by machine code migration, which belongs to a field of mobile computing.
The number of mobile applications has undergone tremendous growth since the inception of application markets. Up to June 2016, more than 2 million applications are available on Google Play. Today's users can access to many and multi-purpose applications. While providing user rich services and attractive features, onerous workload of SoC and frequent data exchanging also make users suffer from some bad user experience, such as severe battery exhaustion, increasing size of user's residual files, and long application initialization latency. Based on the analysis of application use behavior of 90128 volunteers, each application user consumes averagely more than 2,000 J electrical energy and over 100 MB data flow, and then generates more than 3 MB residual user-related files during use process for each day.
In order to optimize energy consumption and latency, existing method includes code offloading which is used in the circumstance where there has been a disparity between the computational powers of available computing devices. The idea has known in popularity with the concept of cloud computing, and many low-powered, well-connected computing devices could benefit from the computation of nearby server-class machines, so as to decrease cost of computing and energy. However, the method requires specialized facilities for undertaking corresponding services in addition to basic network infrastructure, which usually brings expensive cost. Also, the method cannot solve a problem of residual files. As to this drawback, mobile cloud application is proposed, whereby application developers can develop cross-platform applications easily. In particular, mobile cloud app can solve the residual file issue, since all data for running applications are synchronized from server and no file is cached locally. By implementing over CDN, users can further decrease latency when using applications. However, it cannot reduce device's energy consumption. Both prior solutions benefit users from different aspects. Unfortunately, neither of them can provide users all the demands of the mobile app (low latency, no residual files, minimum energy cost, and no specialized facilities).
This invention tends to provide a high quality experience (low latency, no residual file, minimum energy cost, and no specialized facilities) to mobile device users. This invention provides a newly transparent computing mode, which transform functional demands of user into computing and avoid tedious mediate steps. Specifically, the invention designs a method which makes mobile devices directly use machine codes generated by other mobile devices, so that generated machine codes can be shared between devices and can be implemented directly, and complex mediate steps can be avoided. The invention discloses a technique of machine code generation and extraction and OS binder operation, and a mechanism of failure recovery and garbage collection. Moreover, perfect security mechanism is provided to protect the system from viciously attacking. In this invention, low efficient processes, e.g., compilation, are performed beforehand by a small number of mobile devices and then the generated machine codes and the resources are cached in the CDN server. On this basis, any mobile user can send a functionality request to a server, then incrementally download corresponding resource for direct performing. Compared to conventional mobile application approaches, this invention provides an average speed-up of 9.90×. In regular use, it is able to reach as much as 120× speed-up on average. The present invention provides a novel computing way which can significantly change the way user use mobile applications, in order to provide better user experience to users. This invention can be applied in many mobile applications for many mobile devices (e.g., mobile phone, smart watch, tablet, smart glasses) to improve the execution efficiency and save energy cost.
The purpose of the present invention is to provide a mobile transparent computing method based on machine code migration, which will make user directly perform machine codes of desired function by sharing machine codes of application program between mobile devices, so as to meet the high quality experience demand to mobile application (low latency, no residual file, minimum energy cost, and no specialized facilities).
The mobile transparent computing method based on machine code migration of the present invention has following advantages: mobile device user can omit the mediated process of code compilation and interpretation and so on and significantly improve the execution speed and decrease latency by directly running machine codes of desired functions. Compared to conventional mobile application approaches, this invention provides an average speed-up of 9.90×. In regular use, it is able to reach as much as 120× speed-up on average. Since desired resources can be attained by synchronizing from a server and no file is cached locally, user's residual files can be effectively eliminated. At the same time, in the invention, hard tasks are completed beforehand by a small number of mobile devices, then electricity consumption of most of devices will be saved and continuous working time of devices will be prolonged effectively. Moreover, the invention does not need any particular device. The novel computing way of the present invention will can significantly change the way user use mobile applications, in order to provide better user experience to users.
The present invention provides a mobile transparent implement computing method based on machine code migration, and to devices provided with a small amount of machine codes, workflow of the method has following 8 steps as shown in
(1) a mobile device downloads application source program and desired resource (e.g., icons, pictures, audio) from application program service source/server; after downloading a source program pack, an assemble of the application is generated by invoking interpreter interface function when running native Android;
(2) the assembler output from step (1) is input into an assembly module;
(3) the assembler generates OAT file through a linking process;
(4) if the application is from untrusted resource, a system employs a security module to detect malicious code to machine codes output from step (3); if the application is from trusted resource, step (4) will be skipped and step (5) will be executed;
(5) the mobile device uploads the generated machine codes to CDN content servers for further improved malicious code checks;
(6) when the mobile device need to execute an application function, the machine code and the resource of the application are only incrementally synchronized to local from a content server (e.g., use the HTTP/2 and Rsync protocols), and can be directly executed in CPU;
(7) if the uploads and downloads of the machines codes failed, the mobile device or the sever can recover the uploads and downloads process;
(8) after the download machine codes and corresponding resource are used, user is able to cache the downloaded machine codes locally for regular uses, or clean them up. Garbage collection function of the present invention cleans locally residual file automatically.
For most of the device which executes application using the present invention, refer to
(1) when the mobile device need to execute an application function, the machine code and the resource of the application are only incrementally synchronized to local from the content server (e.g., use the HTTP/2 and Rsync protocols), and can be directly executed in CPU;
(2) if the uploads and downloads of the machines failed, the mobile device or the sever can recover the uploads and downloads process;
(3) after the download machine codes and corresponding resource are used, user is able to cache the downloaded machine codes locally for regular uses, or clean them up. Garbage collection function of the present invention cleans locally residual file automatically.
Number | Date | Country | Kind |
---|---|---|---|
2016108613510 | Sep 2016 | CN | national |