Method for evaluating merging and forwarding delay time of smart phone

文档序号:1835112 发布日期:2021-11-12 浏览:24次 中文

阅读说明:本技术 一种智能手机合并转发延迟时间评估方法 (Method for evaluating merging and forwarding delay time of smart phone ) 是由 朱晨阳 薛普俊 朱正伟 诸燕平 谢云欣 于 2021-07-27 设计创作,主要内容包括:本发明公开了一种智能手机合并转发延迟时间评估方法,包括以下步骤:建立智能手机Wi-Fi模块模型、用户请求模型、阻塞控制器模型、唤醒控制器模型,进而由四个模型构成智能手机进行网络请求的PTA模板;对网络请求获取和释放唤醒锁概率分布进行配置,对用户请求参数进行配置;对智能手机网络请求进行蒙特卡洛模拟并得到不同网络请求概率分布下的智能手机Wi-Fi模块能耗数据和用户不适感数据;根据步骤三所生成数据的显著性计算不同场景下通用的合并转发延迟时间。本发明准确反映不同合并转发延迟时间在不同使用场景下对智能手机能耗以及用户不适感方面的影响,帮助程序员定量分析通用的最优合并转发延迟时间,在满足用户需求的情况下最小化网络请求能耗。(The invention discloses a method for evaluating merging and forwarding delay time of a smart phone, which comprises the following steps: establishing a Wi-Fi module model, a user request model, a blocking controller model and a wake-up controller model of the smart phone, and further forming a PTA template for the smart phone to perform network request by using the four models; configuring the probability distribution of acquiring and releasing the wake-up lock by the network request, and configuring the user request parameters; carrying out Monte Carlo simulation on network requests of the smart phone and obtaining energy consumption data and user discomfort data of a Wi-Fi module of the smart phone under different network request probability distributions; and calculating the universal combined forwarding delay time under different scenes according to the significance of the data generated in the step three. The method accurately reflects the influence of different combining and forwarding delay times on the energy consumption of the smart phone and the discomfort of the user in different use scenes, helps programmers quantitatively analyze the universal optimal combining and forwarding delay time, and minimizes the energy consumption of network requests under the condition of meeting the requirements of the user.)

1. A method for evaluating merging forwarding delay time of a smart phone is characterized by comprising the following steps:

firstly, establishing a smart phone Wi-Fi module model, a user request model, a blocking controller model and a wake-up controller model by using a probability time automaton PTA (pure terephthalic acid), and further forming a PTA template for a network request of the smart phone by using the four models;

secondly, the network requests to acquire and release the wake-up lock, the probability distribution of the wake-up lock acquired and released by the network requests is configured, and user request parameters are configured; the user request parameters comprise probability distribution of network requests sent by users;

thirdly, according to the probability distribution of the network requests in the second step, a query engine is adopted to carry out Monte Carlo simulation on the network requests of the smart phone, the probability distribution of each different network request is simulated for N times, a group of data is obtained each time, and each group of data comprises delay time T for merging and forwarding the network requests, energy consumption data of a Wi-Fi module of the smart phone and user discomfort data;

and step four, calculating general combined forwarding delay time under different scenes according to the significance of the energy consumption data of the Wi-Fi module of the smart phone and the uncomfortable data of the user generated in the step three.

2. The smart phone merge forwarding delay of claim 1The inter-evaluation method is characterized in that the probability distribution of each different network request in the step three is simulated for N times to obtain N groups of data, and each group of data is (T)(i,j),energy(i,j),discomfort(i,j)) Wherein, the jth delay time T under the ith scene(i,j)Assigned randomly and each T in the N groups of data(i,j)The distribution is balanced; energy y(i,j)Is T(i,j)Energy consumption data, disconfort, of Wi-Fi module of smart phone(i,j)Is T(i,j)The discomfort feeling data of the user is that I is more than or equal to 1 and less than or equal to I, J is more than or equal to 1 and less than or equal to J, I, J belongs to N*I is the total number of scenes, J is the total number of delay times, N*Is a positive integer.

3. The method for evaluating the merging forwarding delay time of the smart phone according to claim 2, wherein the fourth step is as follows:

first, T is calculated(i,j)Energy of lower energy(i,j)And disconfort(i,j)According to the calculated significance parameter, then calculating each T under the probability distribution of different network requests(i,j)Average energy consumption average of Wi-Fi module of the ith scene and the jth delay time corresponding to the ith scene(i,j)And average user discomfort avgd(i,j)

By avge(i,j)And avgd(i,j)Selecting a delay time T under a probability distribution of different network requests(i,j)Pareto optima of; weight sum Wsum=w1*avge(i,j)+w2*avgd(i,j),w1,w2Is a weight and w1+w2Obtaining W in pareto optimum (1)sumThe minimum M optimal delay times, M ∈ [3,5 ]]And selecting the delay time with the most occurrence times as the optimal delay time by counting M optimal delay times obtained under the probability distribution of different network requests.

4. The smart phone merge forwarding delay of claim 1The PTA template describes a common behavior mode of the four models in the step one, and can access a lower probability deviation-delta, an upper probability deviation + delta, a false negative probability alpha, a false positive probability beta, a probability uncertainty epsilon and a lower ratio limit u0Upper limit of the ratio u1The probability distribution of the wake-up lock acquired and released by the network request and the probability distribution of the network request sent by the user are configured in the PTA template; wherein PTA ═<L,L0,X,Act,inv,enab,prob>(ii) a Where L is a finite set of states, L0E L represents the initial state of the PTA, X represents a finite clock set, Act represents a finite action set, inv represents an invariant condition of the state under the time constraint, and enab represents an action allowable condition under the time constraint; prob represents a probability function of motion transition.

5. The method for evaluating the merged forwarding delay time of the smart phone according to claim 1, wherein in step three, a monte carlo simulation method is adopted, N times of simulation are carried out on different probability distribution conditions of each scene, and energy consumption data energy of a Wi-Fi module of the smart phone and user discomfort data generated within t seconds under different delay times are simulated;

wherein energy ═ 0.6 × wifi.xhp +0.4 × wifi.xll +0.01 × wifi.xds +0.12 × wifi.xls;

in the formula, WiFi.xHP is the time for keeping the high power consumption state of the Wi-Fi module of the smart phone within one hour in a set scene, WiFi.xIL is the time for keeping the Wi-Fi module of the smart phone in an idle monitoring state within one hour in the set scene, WiFi.xDS is the time for keeping the Wi-Fi of the smart phone in a deep sleep state within one hour in the set scene, and WiFi.xLS is the time for keeping the Wi-Fi of the smart phone in a light sleep state within one hour in the set scene.

6. The method as claimed in claim 1, wherein the smartphone Wi-Fi module model simulates four power states of a Wi-Fi module, namely a high power consumption state, an idle listening state, a deep sleep state, and a light sleep state.

7. The method of claim 1, wherein the smart phone merge forwarding delay time evaluation method,

simulating the time of the Wi-Fi module of the smart phone in different power states within t seconds, so that the time is used for calculating the energy consumption of the Wi-Fi module;

simulating the change of the number of the wake-up locks within t seconds, so as to check whether the wake-up locks obtained and released by the smart phone are normal or not, wherein normal means non-failure;

verifying whether the energy consumption of the Wi-Fi module is larger than the probability value p of the preset energy value E within t seconds, wherein the probability value p is larger than or equal to the set probability value p, and is not less than 0 and not more than 1; therefore, the energy-saving effect of the network request on the Wi-Fi module of the smart phone is verified and forwarded;

verifying the probability that the WiFi module reaches the light sleep state within t seconds, so as to verify whether the Wi-Fi module of the smart phone is in the light sleep state within more than half of the time within t seconds when the network requests are merged and forwarded;

verifying the probability that the energy consumption of the Wi-Fi module is lower than E and the discomfort is lower than D within t seconds, wherein D is a set discomfort value; thereby verifying the effect of combining forwarding delay times on balancing energy consumption and user experience.

8. The method as claimed in claim 1, wherein the Wi-Fi module is responsible for communicating with the user request model and the congestion controller model via a beacon channel, and the Wi-Fi module receives a command of forwarding the request, so that the Wi-Fi module performs power state transition.

9. The method for evaluating the merging forwarding delay time of the smart phone according to claim 1, wherein a user request is modeled, the user request is divided into an instant request and a delayed request, the user request information is stored by setting a circular queue as a cache, and the user request model is synchronized with a Wi-Fi module through a beacon channel;

the method comprises the steps that a request for delaying transmission of a network request is not transmitted in a blocking controller model, a user request is transmitted after delay time is reached, and the blocking controller model is synchronous with a Wi-Fi module through a beacon channel;

and the wake-up controller model is used for simulating that a part of user network requests need to obtain the wake-up lock so as to ensure that the Wi-Fi module can respond and release the wake-up lock. The network requests acquisition of the wake-up lock and release of the wake-up lock obeys the probability distribution of the set parameters.

10. The method of claim 1, wherein in step three, UPPAAL-SMC is used as a query engine.

Technical Field

The invention relates to the technical field of communication, in particular to a method for evaluating merging and forwarding delay time of a smart phone.

Background

With the rapid development of modern technologies, smart phones are greatly developed in screen, response speed, network functions and other aspects, and the powerful functions of the smart phones not only meet the use requirements of users, but also bring great convenience to the lives of people. However, due to the limitations of the physical size of the smart phone and the battery technology, the endurance problem of the smart phone has become a big problem nowadays. The deep research and improvement of the energy-saving technology of the smart phone can greatly improve the cruising ability of the smart phone.

The application scene of the smart phone cannot be supported by the network. Various applications need to continuously update their own data through network requests, which results in the network requests becoming one of the most energy-consuming operations in the smart phone. The network request of the smart phone is realized through a mobile network 3G/4G or a Wi-Fi module. In order to better save energy, the wireless device does not stay in the high-power state for a long time, and can be switched to other low-power states such as sleep and the like at a certain moment and then switched to the high-power state when needed. This state transition occurs in the presence of network requests, and some sporadic network requests further increase the time the wireless device is in a high power state, resulting in increased power consumption. In order to reduce the occurrence of such situations as much as possible to reduce power consumption, the merging forwarding may be performed by blocking part of the network request. For network requests in the smart phone, the types are different, and the required response speed is also different. Some requests which do not need to be responded in time can be delayed appropriately and merged and forwarded with subsequent requests. Delaying requests and combining several requests may reduce the time that the Wi-Fi module is in a high power state, thereby reducing power consumption.

However, delaying the network request may affect the user satisfaction, and it is important to select an appropriate delay time. The actual measurement method will generate huge manpower and material resources.

Disclosure of Invention

The invention provides a method for evaluating the merging forwarding delay time of a smart phone, aiming at overcoming the defects of the prior art, and the method can ensure the satisfaction degree of users while reducing the energy consumption; the method mainly realizes the separation of the Wi-Fi module of the smart phone and the user request model, and can provide a Monte Carlo simulation result for the network request of the smart phone, thereby realizing the evaluation of the influence of the delay time for combining and forwarding the network request on the mobile phone consumption and the user satisfaction, and further calculating the optimal universal optimal delay time.

The invention adopts the following technical scheme for solving the technical problems:

the method for evaluating the merging forwarding delay time of the smart phone provided by the invention comprises the following steps:

firstly, establishing a smart phone Wi-Fi module model, a user request model, a blocking controller model and a wake-up controller model by using a probability time automaton PTA (pure terephthalic acid), and further forming a PTA template for a network request of the smart phone by using the four models;

secondly, the network requests to acquire and release the wake-up lock, the probability distribution of the wake-up lock acquired and released by the network requests is configured, and user request parameters are configured; the user request parameters comprise probability distribution of network requests sent by users;

thirdly, according to the probability distribution of the network requests in the second step, a query engine is adopted to carry out Monte Carlo simulation on the network requests of the smart phone, the probability distribution of each different network request is simulated for N times, a group of data is obtained each time, and each group of data comprises delay time T for merging and forwarding the network requests, energy consumption data of a Wi-Fi module of the smart phone and user discomfort data;

and step four, calculating general combined forwarding delay time under different scenes according to the significance of the energy consumption data of the Wi-Fi module of the smart phone and the uncomfortable data of the user generated in the step three.

As a further optimization scheme of the evaluation method for the combining and forwarding delay time of the smart phone, the probability distribution of each different network request in the third step is simulated for N times to obtain N groups of data,each set of data is (T)(i,j),energy(i,j),discomfort(i,j)) Wherein, the jth delay time T under the ith scene(i,j)Assigned randomly and each T in the N groups of data(i,j)The distribution is balanced; energy y(i,j)Is T(i,j)Energy consumption data, disconfort, of Wi-Fi module of smart phone(i,j)Is T(i,j)The discomfort feeling data of the user is that I is more than or equal to 1 and less than or equal to I, J is more than or equal to 1 and less than or equal to J, I, J belongs to N*I is the total number of scenes, J is the total number of delay times, N*Is a positive integer.

The fourth step is specifically as follows:

first, T is calculated(i,j)Energy of lower energy(i,j)And disconfort(i,j)According to the calculated significance parameter, then calculating each T under the probability distribution of different network requests(i,j)Average energy consumption average of Wi-Fi module of the ith scene and the jth delay time corresponding to the ith scene(i,j)And average user discomfort avgd(i,j)

By avge(i,j)And avgd(i,j)Selecting a delay time T under a probability distribution of different network requests(i,j)Pareto optima of; weight sum Wsum=w1*avge(i,j)+w2*avgd(i,j),w1,w2Is a weight and w1+w2Obtaining W in pareto optimum (1)sumThe minimum M optimal delay times, M ∈ [3,5 ]]And selecting the delay time with the most occurrence times as the optimal delay time by counting M optimal delay times obtained under the probability distribution of different network requests.

As a further optimization scheme of the method for evaluating the merging and forwarding delay time of the smart phone, the PTA template describes a common behavior mode of the four models in the step one, and can access a lower probability deviation-delta, an upper probability deviation + delta, a false negative probability alpha, a false positive probability beta, a probability uncertainty epsilon and a ratio lower limit u0Upper limit of the ratio u1The probability distribution of the wake-up lock acquired and released by the network request and the probability distribution of the network request sent by the user are configured in the PTA template; wherein PTA ═<L,L0,X,Act,inv,enab,prob>(ii) a Where L is a finite set of states, L0E L represents the initial state of the PTA, X represents a finite clock set, Act represents a finite action set, inv represents an invariant condition of the state under the time constraint, and enab represents an action allowable condition under the time constraint; prob represents a probability function of motion transition.

As a further optimization scheme of the smart phone merging forwarding delay time evaluation method, in the third step, a monte carlo simulation method is adopted, simulation is carried out on different probability distribution conditions of each scene for N times, and energy consumption data energy and user discomfort data of a Wi-Fi module of the smart phone generated within t seconds under different delay times are simulated;

wherein energy ═ 0.6 × wifi.xhp +0.4 × wifi.xll +0.01 × wifi.xds +0.12 × wifi.xls;

in the formula, WiFi.xHP is the time for keeping the high power consumption state of the Wi-Fi module of the smart phone within one hour in a set scene, WiFi.xIL is the time for keeping the Wi-Fi module of the smart phone in an idle monitoring state within one hour in the set scene, WiFi.xDS is the time for keeping the Wi-Fi of the smart phone in a deep sleep state within one hour in the set scene, and WiFi.xLS is the time for keeping the Wi-Fi of the smart phone in a light sleep state within one hour in the set scene.

As a further optimization scheme of the method for evaluating the combined forwarding delay time of the smart phone, the smart phone Wi-Fi module model simulates four power states of a Wi-Fi module, namely a high power consumption state, an idle monitoring state, a deep sleep state and a light sleep state.

As a further optimization scheme of the evaluation method for the combined forwarding delay time of the smart phone,

simulating the time of the Wi-Fi module of the smart phone in different power states within t seconds, so that the time is used for calculating the energy consumption of the Wi-Fi module;

simulating the change of the number of the wake-up locks within t seconds, so as to check whether the wake-up locks obtained and released by the smart phone are normal or not, wherein normal means non-failure;

verifying whether the energy consumption of the Wi-Fi module is larger than the probability value p of the preset energy value E within t seconds, wherein the probability value p is larger than or equal to the set probability value p, and is not less than 0 and not more than 1; therefore, the energy-saving effect of the network request on the Wi-Fi module of the smart phone is verified and forwarded;

verifying the probability that the WiFi module reaches the light sleep state within t seconds, so as to verify whether the Wi-Fi module of the smart phone is in the light sleep state within more than half of the time within t seconds when the network requests are merged and forwarded;

verifying the probability that the energy consumption of the Wi-Fi module is lower than E and the discomfort is lower than D within t seconds, wherein D is a set discomfort value; thereby verifying the effect of combining forwarding delay times on balancing energy consumption and user experience.

As a further optimization scheme of the method for evaluating the combined forwarding delay time of the smart phone, the Wi-Fi module is responsible for communicating with the user request model and the blocking controller model through the beacon channel, and receives the instruction of the forwarding request, so that the Wi-Fi module performs power state transfer.

The method for evaluating the merging forwarding delay time of the smart phone is used as a further optimization scheme, modeling is carried out on a user request, the user request is divided into an instant request and a delayed request, the user request information is stored by setting a circular queue as a cache, and the user request model is synchronous with a Wi-Fi module through a beacon channel;

the method comprises the steps that a request for delaying transmission of a network request is not transmitted in a blocking controller model, a user request is transmitted after delay time is reached, and the blocking controller model is synchronous with a Wi-Fi module through a beacon channel;

and the wake-up controller model is used for simulating that a part of user network requests need to obtain the wake-up lock so as to ensure that the Wi-Fi module can respond and release the wake-up lock. The network requests acquisition of the wake-up lock and release of the wake-up lock obeys the probability distribution of the set parameters.

In the third step, UPPAAL-SMC is used as a query engine.

Compared with the prior art, the invention adopting the technical scheme has the following technical effects:

the method can accurately reflect the influence of the combined forwarding delay time on the energy consumption of the mobile phone and the discomfort of the user in different scenes, and help programmers to perform quantitative analysis and evaluation on the network request combined forwarding delay time applied to the smart mobile phone, so that the universal delay time is selected, and the energy consumption of the mobile phone is reduced as much as possible while the satisfaction degree of the user is ensured.

Drawings

FIG. 1 is a block diagram of the present invention.

FIG. 2 is a flow chart of the present invention.

FIG. 3 is a schematic diagram of modeling a smartphone Wi-Fi module in accordance with the present invention.

Fig. 4 is a schematic diagram of modeling a user network request module in the present invention.

FIG. 5 is a schematic diagram of modeling user discomfort in the present invention.

Fig. 6 is a schematic diagram of modeling an intermediate control module blocking network request in accordance with the present invention.

Fig. 7 is a schematic diagram of modeling a wake lock release module in the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.

The model based on the probability time automaton can simulate a real scene through a statistical model testing method so as to conveniently obtain a universal optimal delay time. The delay time evaluation method for merging and forwarding the network request by the smart phone is constructed, and the reference of the optimal delay time can be provided for a smart phone application developer when designing the application related to the network request.

The invention provides an evaluation method of delay time of intelligent mobile phone merging forwarding network requests in different scenes, and FIG. 1 is a frame diagram of the evaluation method of delay time of merging forwarding network requests in the invention.

Referring to fig. 1, the evaluation method of the general delay time of the whole merged forwarding network request is reflected. Firstly, a smart phone Wi-Fi module model, a user request model, a blocking controller model and a wake-up controller model are established by using PTA, and then a PTA template for the smart phone to carry out network request is formed by the four models. The probability distribution of the network request acquisition and release wake-up lock can be configured, and user request parameters in different scenes of daily use of the smart phone can be configured. The Wi-Fi module simulates four power states of the Wi-Fi module, namely a high power consumption state, an idle monitoring state, a deep sleep state and a light sleep state. And calculating the energy consumption of the whole Wi-Fi module within a certain time range according to the time consumed by each power state of the Wi-Fi module. The user behavior modeling mainly divides the user request into an instant request and a request which can be delayed, and stores the user request information by setting a circular queue as a cache. The blocking controller models blocking of requests that can be deferred to send by building an intermediate control model and sending them out after a delay time is reached. The wake-up controller models that part of the user network requests needs to acquire the wake-up lock and release the wake-up lock. And after the PTA template is generated and corresponding parameters are configured, the system modeling is completed. Using UPPAAL-SMC as a query engine to carry out Monte Carlo simulation on the network request of the smart phone, calculating a P value of the generated data through variance analysis (the P value is the probability that a sample which is at least as extreme as an actual observed sample is observed when a null hypothesis in hypothesis test is true), and judging the significance of the data. And finally, calculating the average energy consumption and average discomfort corresponding to each combined forwarding delay time, and finding out the pareto optimal value.

Referring to fig. 3, four power states of the smartphone Wi-Fi module are a high power consumption state, an idle listening state, a deep sleep state, and a light sleep state, respectively. The method comprises the steps of adopting xDS, xLS, xIL and xHP as clock variables, and recording the time of the Wi-Fi module in four power states by taking seconds as a unit. In the invariant of each node, the derivative of the clock variable is 1, which indicates that when the model runs to the node, the clock variable is timed; the derivative of the clock variable is 0 and the clock variable is not clocked. Therefore, the time of different power states can be recorded at different nodes respectively, so that the energy consumption consumed by the Wi-Fi module can be calculated.

Referring to fig. 3, the power consumption of the Wi-Fi module is calculated according to the time consumed by each power state of the Wi-Fi module by using the formula 0.01 × xDS +0.12 × xLS +0.4 × il +0.6 × xHP (the numerical constants are power values of the respective power states, and the total power consumption is obtained by summing). Since there is some delay in the Wi-Fi module transitioning from the deep sleep state to the high power state and from the light sleep to the high power state, one transition state is set for 3 seconds and 2 seconds of delay, respectively. And the high-power state carries out forwarding request by receiving a user forwarding request instruction and returns to the high-power state. And in the high-power state, if the current request data is completely sent and new request data exists in a cache or a wake-up lock exists in the previous request, the state is transferred to an idle monitoring state. And in the high-power state, if the cache has no data and the previous request does not wake up the lock, the system is transferred to a light sleep state. In the idle listening state, there is an idle latency of 5 seconds. When the idle time is equal to 5 seconds, if the awakening lock is released at the moment, the mild sleep node can be switched to, and if the awakening lock is not released, the idle time is cleared. And when the mild sleep state is transferred to the deep sleep state, if the idle time reaches 10 seconds and no new network request exists, the deep sleep state is transferred. The deep sleep state, the light sleep state and the idle monitoring state are all switched into a high power consumption state after receiving a request instruction forwarded by a user.

See fig. 3, beacon? Represents a synchronized action with beacon! Correspondingly, the two modules communicate with each other, so that the two modules operate synchronously. In Wi-Fi modules, with beacon? And a signal indicating that a request is required to be sent by a receiving user, and the Wi-Fi module is enabled to carry out power state transition.

Referring to fig. 3, after receiving the instruction of forwarding the request, the Wi-Fi module completes sending the request by clearing the request data in the current cache

Referring to fig. 3, in the determination of the transition from the high power consumption state to another state, when the current request data is completely sent, if there is new request data in the cache at this time, but the request mechanism has not been triggered yet or a wake-up lock exists in the previous request, the transition is made to the idle listening state, i.e., the idle listening state; if there is no data in the cache and the previous request did not wake up the lock, a transition is made to the light sleep state.

Referring to fig. 4, network requests made by users are largely divided into instant requests and requests that can be deferred. In view of the above two cases, there are two cases of triggering a request: when the current request is an instant request, the request is directly requested, and the requests in the cache are sent out together; for requests that can be deferred, the requests in the cache are issued again when a predetermined delay time is reached. Regarding the cache, a corresponding circular queue is arranged in the model to store the request information of the user, and the circular queue can continuously perform circular writing and deleting. The set probability distribution is adopted from the transition state to the transition state in the graph, and three operations of instant response request (QM), delayed request (PM) and non-request (NM) are respectively carried out. The state with "C" in the model is the committed state, in which the model has no delay. The dotted line in the figure is the probability representation of uppal, the model can randomly select a path according to a set probability, different paths represent different operations, QM and PM will be stored in a buffer queue, the system determines whether to forward, and NM will not have any operation.

Referring to fig. 4, the clock variable ensures that the model runs every n (n e [1,10]) seconds, thereby obtaining a model requested randomly by the user.

Referring to fig. 4, QR is an identification of instant request (QM), which is a boolean value used to describe the type of request. | A QR is a request (PM) which can postpone transmission, and the request is stored in a cache and is waiting to be transmitted. NO is the NM mark, indicating that the user does not do anything. The two lower edges of fig. 4 are QMs, respectively representing the scenes of the Wi-Fi module at different time periods. Corresponding to fig. 3, identified with wifi _ recvLoc. The corresponding states of the Wi-Fi modules are shown in table 1. And judging the current state of the Wi-Fi module through the wifi _ recvLoc to determine different operations. When wifi _ recvLoc is 2, the Wi-Fi module is in the transition period of state transition, and beacon!is not needed! And synchronizing with the Wi-Fi module, only updating the number of the requests in the current cache queue, and storing the request information into the cache to wait for next forwarding. When the request type is QM, there are two possibilities to return to the transition state from the transit state according to the state of the Wi-Fi module. When the Wi-Fi module is in a deep sleep state, a light sleep state, an idle monitoring state and a high power state, a user sends out a request forwarding instruction and calculates the length of a request queue. And when the Wi-Fi module is in a transition state, the forwarding request of the user enters a waiting state.

TABLE 1 Wi-Fi Module states corresponding to wifi _ recvLoc

wifi _ recvLoc value Status of state
1 In deep sleep, Lightsleep, IdleListen, HighPower
2 In the inteim 1, inteim 2

Referring to fig. 5, a statistical model test is used to generate random delay times, and a delay time T is randomly selected within a defined range.

Referring to fig. 5, a discomfort feeling is recorded using a clock variable disconfort _ time, which varies with time, and when disconfort _ time' is 1, the time passes by 1 second, and disconfort _ time increases by 1; if disconfort _ time' is 0, disconfort _ time does not increase with time; when the disconfort _ time' is 0.1, the time passes by 1 second, and the disconfort _ time increases by 0.1. Thus, the discomfort of the user is reflected by the clock variable disconfort _ time. For the timely request, the delay is the delay brought by the state transition, the influence on the user experience is large, and the disconfort _ value is set to be 1; when the request is a request which can be postponed, the request is subjected to T time blocking, the delay caused by the T time blocking is mainly caused, the influence of the request on the user is small, and the disconfort _ value is set to be 0.1.

Referring to fig. 6, for a request that can be deferred to be sent, an intermediate control model is established to block the request, and the request is sent out after the delay time is reached. And T is set delay time, the clock variable interval _ time starts to time after a first request appears in an empty buffer queue, and when the delay time T is reached, a corresponding request is carried out according to the state of the Wi-Fi module, which is similar to a user request model. If the user has not made a request, the interval _ time is set to zero.

Referring to fig. 7, in the request for immediate response, there is a part of the request to obtain the wake-up lock, and in the user request model, after the user sends the request for immediate response, the system randomly obtains the wake-up lock for the request for immediate response with a probability of 1/2, thereby simulating the real situation. Similarly, a model for releasing the wake-up lock is established, the operation is randomly performed every 1-10 s, the probability of 1/2 is used for determining whether to release the wake-up lock, and after all the wake-up locks are released, the Boolean variable lock is set to false.

After the system modeling is complete, an evaluation step is performed. Firstly, setting probability distribution of network requests sent by users according to different use scenes, and carrying out Monte Carlo simulation on the network requests of the smart phone by adopting UPPAAL-SMC to generate the energy consumption of the smart phone and the uncomfortable feeling of the users caused by delay time T. In order to compare the influence of the delay time on the energy consumption of the smart phone and the discomfort of the user, the following form of query statement is adopted:

simulate N[<=t]{T,energy,discomfort_time}

wherein energy is 0.6 wifi.xhp +0.4 wifi.xll +0.01 wifi.xds +0.12 wifi.xls.

In the formula, T is delay time of merging and forwarding, wifi.xhp is time of keeping a high power consumption state of a smartphone Wi-Fi module within one hour in a set scene, wifi.xil is time of keeping an idle monitoring state of the smartphone Wi-Fi module within one hour in the set scene, wifi.xds is time of keeping a deep sleep state of the smartphone Wi-Fi within one hour in the set scene, wifi.xls is time of keeping a light sleep state of the smartphone Wi-Fi within one hour in the set scene, and disconfort _ time is time of waiting for a user. The query sentence simulates Wi-Fi energy consumption and user discomfort generated within t seconds, and N times of simulation are carried out on different probability distribution conditions of each scene.

Some other analog query formats are as follows:

simulate N[<=t]{WiFi.xHP,WiFi.xIL,WiFi.xDS,WiFi.xLS}

simulating the time of the Wi-Fi module of the smart phone in different power states within t seconds, so that the time is used for calculating the energy consumption of the Wi-Fi module;

simulate N[<=t]{lock_num}

simulating the change of the number of the wake-up locks within t seconds, so as to check whether the wake-up locks obtained and released by the smart phone are normal or not, wherein normal means non-failure;

Pr[<=t](<>(energy>E)>=p)

verifying whether the energy consumption of the Wi-Fi module is larger than the probability value p set within t seconds or not, so as to verify the energy-saving effect of the merged forwarding network request on the Wi-Fi module of the smart phone;

Pr[<=t](<>WiFi.LightSleep)

verifying the probability that the WiFi module reaches the light sleep state within t seconds, so as to verify whether the Wi-Fi module of the smart phone is in the light sleep state in most of the time within t seconds when the network requests are merged and forwarded;

Pr[<=t](<>energy<E&&discomfort_time<D)

verifying the probability that the energy consumption of the Wi-Fi module is lower than E and the discomfort is lower than D within t seconds, wherein D is a set discomfort value; thereby verifying the effect of combining forwarding delay times on balancing energy consumption and user experience.

Simulating N times under the probability distribution of each different network request to obtain N groups of data, wherein each group of data is (T)(i,j),energy(i,j),discomfort(i,j)) Wherein, the jth delay time T under the ith scene(i,j)Assigned randomly and each T in the N groups of data(i,j)The distribution is balanced; energy y(i,j)Is T(i,j)Energy consumption data, disconfort, of Wi-Fi module of smart phone(i,j)Is T(i,j)The discomfort feeling data of the user is that I is more than or equal to 1 and less than or equal to I, J is more than or equal to 1 and less than or equal to J, I, J belongs to N*I is the total number of scenes, J is the total number of delay times, N*Is a positive integer. First, T is calculated(i,j)Energy of lower energy(i,j)And disconfort(i,j)According to the calculated significance parameter, then calculating each T under the probability distribution of different network requests(i,j)Average energy consumption average of Wi-Fi module of the ith scene and the jth delay time corresponding to the ith scene(i,j)And average user discomfort avgd(i,j)

By avge(i,j)And avgd(i,j)Selecting a delay time T under a probability distribution of different network requests(i,j)Pareto optima of; weight sum Wsum=w1*avge(i,j)+w2*avgd(i,j),w1,w2Is a weight and w1+w2Obtaining W in pareto optimum (1)sumThe minimum M optimal delay times, M ∈ [3,5 ]]And by counting M optimal delay times obtained under the probability distribution of different network requests, selecting the delay time with the most occurrence times as the optimal delay time, thereby providing a reference of delay time for merging and forwarding for programmers.

The invention provides a smart phone merging and forwarding delay time evaluation method based on probability model inspection, which is characterized in that a Wi-Fi module, a user behavior, a blocking controller and a wake-up controller of a smart phone are modeled according to a probability time automaton theory, a UPPAAL-SMC is used for carrying out Monte Carlo simulation on a network request of the smart phone, and the influence on the energy consumption and the user satisfaction of the smart phone under different merging and forwarding delay times is analyzed. The smart phone application developer can use the evaluation method to select the merging and forwarding delay time of the network request in the corresponding scene, so that the complex manual test is avoided, and the energy consumption of the smart phone can be reduced under the condition of ensuring the satisfaction degree of the user.

The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:天线覆盖系统、方法、通信设备和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!