Nothing Special   »   [go: up one dir, main page]

CN109101324A - Method of adjustment, operating system and the AR equipment of application state - Google Patents

Method of adjustment, operating system and the AR equipment of application state Download PDF

Info

Publication number
CN109101324A
CN109101324A CN201710469545.0A CN201710469545A CN109101324A CN 109101324 A CN109101324 A CN 109101324A CN 201710469545 A CN201710469545 A CN 201710469545A CN 109101324 A CN109101324 A CN 109101324A
Authority
CN
China
Prior art keywords
state
application
applications
resources
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710469545.0A
Other languages
Chinese (zh)
Inventor
张哲�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710469545.0A priority Critical patent/CN109101324A/en
Publication of CN109101324A publication Critical patent/CN109101324A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

This application provides a kind of method of adjustment of application state, device and augmented reality equipment, wherein, method of adjustment includes: to change in response to having been turned on the state of application in the AR equipment, determines total expected computing resource that the current state of application is had been turned on described in maintaining;Judge whether the practical computing resource of the AR equipment meets total expected computing resource;If it is not, having been turned on the application state of application described in adjustment then according to the principle for reducing total expected computing resource.Using the embodiment of the present application, the state that application is had been turned in AR equipment can be adjusted from the current demand of user.It is thereby achieved that while meeting user's current demand, the practical computing resource of AR equipment maintain after adjustment state using required total expected computing resource.

Description

Application state adjusting method, operating system and AR device
Technical Field
The present application relates to the field of augmented reality technologies, and in particular, to an adjustment method and an operating system for an application state; and an application state adjusting method and an application are also disclosed.
Background
Augmented Reality (AR) technology is a sensory experience beyond Reality in which information that is difficult to experience in a certain time and space range of the real world, such as visual information and sound information, is simulated through scientific technology and then overlaid onto the real world to be perceived by human senses, so that the real world is achieved. An Augmented Reality (AR) device is composed of three components, a head-mounted display, a tracking AR device and mobile computing power, integrated into one unit and placed in a strapped device, which is the AR device.
The AR device is capable of wirelessly relaying information to a display similar to glasses, e.g., a person wearing the AR device is driving a car on the road, at which time an application consistent with the current road scenario is displayed on the display of the AR device for selection by the user, e.g., a navigation software icon, a music software icon, etc. In general, a user selects a plurality of applications, and the plurality of applications selected by the user are all started on the AR device, and in response to a user operation, the applications started on the AR device transition among a standby state, a running state, and a dormant state.
For example, a started application on the AR device first enters a standby state, at this time, the display of the AR device does not display the content of the application, and the AR device consumes less computing resources to determine whether the application needs to enter a running state; when the trigger condition of the running state is satisfied, for example, a user operation is triggered, at this time, the application enters the running state, and running content is displayed on the display of the AR device. When the application is in a standby state, a running state or a dormant state, the AR device allocates different computing resources to the application, wherein the AR device allocates more computing resources to the application in the running state.
Disclosure of Invention
The inventor of the present application finds, in research, that under the condition of limited computing resources of the AR device, when the expected computing resources of applications that have been started on the AR device and are in different states exceed the actual computing resources of the AR device, the running effect of some applications may not meet the requirements of the user, and user experience is affected. Therefore, when the actual computing resources of the AR device cannot maintain the expected computing resources required by the current state of the started application, the AR device is required to adjust the state of the started application, so that the computing resources of the AR device meet the expected computing resources of the application after the state is adjusted, and the application after the state is adjusted can meet the current needs of the user.
Based on this, the present application provides an application state adjustment method, where when an expected computing resource of a started application in an AR device exceeds an actual computing resource of the AR device, the AR device adjusts a state of the started application according to a current running condition of the started application, so that the actual computing resource of the AR device meets the expected computing resource of the application after the state adjustment, and the application after the state adjustment can meet a current demand of a user.
The application also provides an application state adjusting device, which is used for ensuring the realization and the application of the method in practice.
In order to solve the above problem, the present application discloses an application state adjustment method, where the adjustment method is applied to an operating system of an augmented reality AR device, and the adjustment method includes:
in response to a change in a state of a launched application in the AR device, calculating a total expected computing resource required to maintain a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate; determining whether actual computing resources of the AR device meet the total expected computing resources; if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
The application also discloses an operating system, operating system integrates in augmented reality AR equipment, operating system includes:
a calculating unit, configured to calculate, in response to a change in a state of a started application in the AR device, a total expected calculation resource required to maintain a current state of the started application; the state corresponds to a computing resource that the AR device needs to allocate; a determining unit configured to determine whether an actual computing resource of the AR device satisfies the total expected computing resource; and the adjusting unit is used for adjusting the application state of the started application according to the principle of reducing the total expected computing resource under the condition that the result of the judging unit is negative.
The application also discloses an application state adjusting method, which is applied to the adjustment application of the AR, and the adjusting method comprises the following steps:
the adjusting application detects whether the states of other started applications are changed; if so, calculating a total expected computing resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate; determining whether actual computing resources of the AR device meet the total expected computing resources; if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
The application also discloses an adjustment application of application state, the adjustment application is installed on augmented reality AR equipment, the adjustment application includes:
the detection unit is used for detecting whether the states of other started applications are changed or not; the calculating unit is used for calculating total expected calculation resources for maintaining the current state of the started application under the condition that the result of the detecting unit is changed; the state corresponds to a computing resource that the AR device needs to allocate; a determining unit configured to determine whether an actual computing resource of the AR device satisfies the total expected computing resource; if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
The present application also discloses a readable medium storing an adjustment program for causing an Augmented Reality (AR) device to execute an application state, the process including the steps of:
a detection step, which is to detect whether the states of other started applications are changed; a calculation step of calculating, in the event of a change, a total expected computational resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate; a determining step of determining whether actual computing resources of the AR device satisfy the total expected computing resources; an adjusting step, in case of not being satisfied, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
The application also discloses augmented reality AR equipment includes: a processor and a memory;
the memory for storing program instructions and/or data; the processor is used for reading the instructions and/or data stored in the memory and executing the following operations:
the adjusting application detects whether the states of other started applications are changed; if so, calculating a total expected computing resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate; determining whether actual computing resources of the AR device meet the total expected computing resources; if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
Compared with the prior art, the method has the following advantages:
in this embodiment of the application, when the application state in the AR device changes, if the actual computing resource of the AR device cannot maintain the total expected computing resource required by the started application, the AR device adjusts the state of the started application in the AR device on the basis of reducing the total expected computing resource required by the started application in the AR device on the premise of meeting the current requirement of the user. According to the embodiment of the application, the state of the started application in the AR equipment is adjusted according to the current requirement of the user. Therefore, the embodiment of the application can realize that the actual computing resource of the AR device maintains the total expected computing resource needed by the application after the state is adjusted while the current requirement of the user is met.
Of course, it is not necessary for any product to achieve all of the above-described advantages at the same time for the practice of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a schematic life cycle diagram of the application of the present application in practical use;
FIG. 2 is an exemplary flow chart of an embodiment of a method for adjusting application states of the present application;
FIG. 3 is a flow chart of step 203 in an embodiment of the method of the present application;
FIG. 4 is a block diagram of an embodiment of an apparatus for adjusting an application state according to the present application;
fig. 5 is a schematic diagram of a hardware structure of the AR device of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In an actual application scenario, developers of the AR device program the application functions according to a certain rule, and the rule is an application framework. Specifically, the application framework specifies the lifecycle of the application, the lifecycle of the application may include the timing for the AR device to call the application code and the sequence for executing the application code, and for the lifecycle of the application specified by the application framework, reference may be made to fig. 1. The application framework can be preset in an operating system of the AR device, and when the operating system is started, the life cycle of each application can be read from the application framework, so that the time for calling the application codes and the sequence for executing the application codes are known.
As can be seen from fig. 1, the lifecycle of an application may include a "normal standby state", a "minimum standby state", a "normal running state", a "minimum running state", and a "dormant state". When the application is in a "normal standby state" or a "minimum standby state", the content of the application is not displayed on the AR device, the AR device allocates less computing resources for the application to use, and the AR device can determine whether the application needs to enter a "normal running state" or a "minimum running state"; when the application is in a normal running state or a minimum running state, the running content of the application is completely displayed on the AR equipment, and at the moment, the AR equipment allocates more computing resources for the application to use; when the application is in the "dormant state," the application is not run and is woken up while waiting for the AR device to have free computing resources.
In practice, the application framework specifies, in addition to the lifecycle of the applications, the frame rates required by the applications in the "normal standby state", "minimum standby state", "normal running state", and "minimum running state". The Frame rate (Frame rate) is a measure for measuring the number of display Frames, and the so-called measurement unit is the number of display Frames Per Second (FPS) or "hertz" (Hz). The AR device may calculate, according to frame rates required by the respective application programs in the "normal standby state", "minimum standby state", "normal running state", and "minimum running state", calculation resources required by the respective applications in the "normal standby state", "minimum standby state", "normal running state", and "minimum running state". In general, the "minimum standby state" requires less computing resources than the "normal standby state", and the "minimum run state" also requires less computing resources than the "normal run state".
For example, the applications currently launched on the AR device are a play video application, a music application, and a chat application, respectively. Wherein, it is assumed that the playing video application is currently in a "minimum running state", the music application is currently in a "normal standby state", and the chat application is currently in a "dormant state"; because the three applications are in different states, the AR device allocates different computing resources to the three applications, and the computing resource allocated to the video playing application is the largest, the computing resource allocated to the music application is the next largest, and the computing resource allocated to the chat application is the smallest. Of course, the AR device may also allocate more computing resources to the music application in the "normal standby state" than to the played video in the "minimum running state", and may allocate corresponding computing resources to each state according to actual needs.
The main principle for adjusting the states of the applications in the embodiments of the present application is that the application framework specifies that each application has a unique current state at any time and a frame rate required by each state. Therefore, the AR device counts the computing resources required to maintain the current state of the started application according to the current state of the application and the frame rate required by the current state, and adjusts the states of some applications in the started application on the basis that the AR device meets the current requirements of the user and the actual resources of the current AR device can maintain the computing resources required by the application after the state adjustment when the computing resources of the AR device cannot maintain the computing resources required by the started application.
For example, the application consumes the most computing resources in the "normal running state", in which case, if the AR device needs to save computing resources, the application may be adjusted from the current state "normal running state" to the target state "normal standby state" or "minimum running state"; and under the condition that the current state of the application is the 'minimum running state', the application can be adjusted to a target state 'normal standby state'; and under the condition that the current state of the application is the 'normal standby state', the application can be adjusted to the target state 'minimum standby state'; in the case that the current state of the application is the "minimum standby state", the application may be adjusted from the "minimum standby state" to the target state "sleep state". Therefore, the application is adjusted from the current state to the target state which consumes less computing resources than the current state, so that the purpose of saving the actual computing resources of the AR device is achieved.
The application in the embodiment of the present application may include a software program that is installed on the AR device and is capable of implementing a certain function. For example, the payment application may implement a payment function in an internet transaction, such as a pay bank, a WeChat payment, and the like; the music application can realize the online or local playing function of songs, pure music and the like, and can be music of a hot dog, QQ music and the like. Of course, the applications in the embodiments of the present application are not limited to the above, and in practical applications, software programs that can be installed on the AR device to implement a specific function are all within the application scope of the embodiments of the present application.
Referring to fig. 2, a flowchart of an embodiment of an application state adjustment method according to the present application is shown, where the embodiment may be applied to an operating system of an AR device, and the embodiment may include the following steps:
step 201: in response to a change in a state of a launched application in the AR device, calculating a total expected computing resource required to maintain a current state of the launched application; the states correspond to computing resources that the AR device needs to allocate.
In this embodiment, when the state of the application started in the AR device changes, for example, some applications are converted according to the state in the life cycle, some applications exit, or some applications are started, so that the state of the application in the AR device changes. At this time, the AR device counts the computational resources required to satisfy the current state of each application according to the frame rate required to maintain the current state of each started application. And accumulating the computing resources required by the current state of each started application, and computing the total computing resources required by the AR equipment for maintaining the current state of all the started applications, wherein the total computing resources are called total expected computing resources.
For example, the AR device detects that a new application is started, and assumes that there are 3 applications that have been started at this time, namely, a play video application, a music application, and a chat application. The video playing application is currently in a minimum running state, the music application is currently in a normal running state, and the chat application is currently in a normal running state. The AR device calculates the computational resources required to maintain the current state of the 3 applications according to the frame rate required to maintain the current state of the 3 applications.
It is assumed that the AR device calculates the computational resource required to maintain the current minimum running state of the video playing application to be 10M, the computational resource required to maintain the current normal running state of the music application to be 20M, and the computational resource required to maintain the current normal running state of the chat application to be 10M. At this point, the AR device calculates the total expected computing resources needed to maintain the current state of playing the video application, the music application, and the chat application to be 40M.
The above example describes a process in which the AR device calculates the calculation resources required to maintain the current state of each application according to the frame rate of the current state of each application, taking 3 video applications, music applications, and chat applications as examples. In an actual application, generally, there are more applications that have been started on the AR device, and at this time, the AR device calculates a process of maintaining a total expected calculation resource of the current state of the started application according to the current state of the started application, which is similar to the method in the above example and is not described here again.
Step 202: and judging whether the actual computing resources of the AR equipment meet the total expected computing resources, if not, entering a step 203, and if so, entering a step 204.
In this embodiment, the AR device obtains, by calculation, the total expected computational resources required to maintain the current state of all the launched applications according to the frame rate required by the current state of the launched applications. In this step, the AR device needs to determine whether the actual computing resource of the current AR device meets the total expected computing resource according to the total expected computing resource obtained by the calculation and the current actually available computing resource of the AR device, that is, the current actually available computing resource of the AR device is not less than the total expected computing resource, which indicates that the actual computing resource of the AR device can meet the total expected computing resource, and then step 204 is performed; if the current actual available computing resources of the AR device are less than the total expected computing resources, it indicates that the actual computing resources of the AR device cannot satisfy the total expected computing resources, and then step 203 is entered.
For example, the total expected computing resource required by the AR device to maintain the current state of the started application is 1G, the actual available resource of the current AR device is 800M, and since 800M is smaller than 1G, the actual computing resource of the current AR device cannot satisfy the total expected computing resource, and step 203 is entered.
Step 203: adjusting an application state of the launched application in accordance with a principle of reducing the total expected computing resources.
In this embodiment, when the actual computing resource of the AR device cannot maintain the total expected computing resource of the current state of the started application, the AR device adjusts the state of the started application in the AR device on the principle of reducing the total expected computing resource. Specifically, a state rule is preset in the AR device, a target state corresponding to a current state of each application is determined according to the state rule, and a target function corresponding to each target state is called to trigger the application to be adjusted from the current state to the target state.
When the target state corresponding to the current state is determined according to the state rule, for example, if the current state of the started application is a "normal running state", the corresponding target state may be a "normal standby state"; if the current state of the started application is the minimum running state, the corresponding target state can be a normal standby state; if the current state of the started application is the 'normal standby state', the corresponding target state can be the 'minimum standby state'; and if the current state of the started application is the minimum standby state, the corresponding target state can be the dormant state.
Of course, the above state rules are merely examples, and the preset state rules in the AR device only need to follow the target state with less computing resources than the current state. After the target state is obtained, the AR device inquires a preset target function corresponding to the target state, and triggers the application to enter the target state from the current state by calling the target function. For example, when the normal running state is adjusted to the minimum running state, the running of the target function requestgradient is triggered, and if the return value is "true", which indicates that the application agrees to degrade (i.e. degrade from the normal state to the standby state), the normal running state can be adjusted to the normal standby state; if the return value is "false", indicating that the application does not agree to the degradation, the application may be adjusted within the normal state, i.e., from the normal operation state to the minimum operation state.
It will be appreciated that after the application is adjusted from the current state to the target state, a callback function may be executed against the target state to notify the application that the application has been adjusted to the target state. For example, when the application is adjusted from the "normal running state" to the "minimum running state", the callback function "onDegrade" may be executed to notify that the application is currently in the minimum running state, and so on.
Step 204: and awakening the application in the dormant state in the started application.
When the actual computing resources of the AR device meet, e.g., are greater than the total expected computing resources, the AR device will wake up the applications that are in the dormant state among the currently launched applications. For example, when the AR device detects that the user is currently exiting certain applications, and the AR device detects that there are computing resources remaining in addition to those needed to maintain the current state of the launched application, the AR device wakes up the application in the "dormant state".
By adopting the method of the embodiment of the application, the target application needing to be adjusted in state in the started application is determined, so that the current requirement of the user can be met, and meanwhile, the total expected computing resources required by the started application are reduced, so that the computing resources of the AR equipment can maintain the computing resources required by the application after the state is adjusted, and the user experience is not influenced.
In practical application, the AR device adjusts the state of the started application in the AR device according to a target state set according to a preset state rule to meet the current requirement of the user and a principle of reducing total expected computing resources, and the implementation process of the specific step 203 may refer to fig. 3, which shows a flowchart of step 203 in the embodiment of the method of the present application, where the step 203 may include the following steps:
step 301: calculating a difference between the total expected computing resources and the actual computing resources as resources to be saved, and calculating an expected savable resource for the started application to adjust from a current state to a target state.
Since the AR device needs to determine which applications of the launched applications need to have their states adjusted when the actual computing resources of the AR device cannot meet the total expected computing resources required by all the launched applications, the actual computing resources of the AR device may maintain the applications after the states are adjusted.
Specifically, in the process of determining the application requiring state adjustment, the AR device first needs to determine a difference between a total expected computing resource required to maintain a current state of the started application and an actual computing resource of the AR device, that is, a resource required to be saved by the AR device to adjust the application state, and in this embodiment, the resource required to be saved is referred to as a resource to be saved; then, the AR device determines, according to the calculated resource saving requirement, an application that needs to be adjusted in state, that is, a target application, among the started applications.
In the process of determining the target application, the AR device needs to calculate, according to the preset state rule, the expected resource that can be saved when each started application is adjusted from the current state to the target state.
Specifically, the expected resource saving of each started application is calculated, the calculation resource allocated by the AR device for the current state of the application may be subtracted from the calculation resource allocated by the AR device for the target state of the application, and the obtained difference is the expected resource saving corresponding to the application. For example, if the current state of the started application is the "normal running state", the corresponding target state is the "normal standby state". Specifically, the difference between the computing resources allocated by the AR device for the application in the "normal running state" and the computing resources allocated for the application in the "normal standby state" is an expected resource saving for the application.
Step 302: and determining the target application of the started application, the state of which needs to be adjusted, according to the resource needing to be saved, the expected saved resource of the started application and the use time interval.
After the AR device obtains the resources needed to be saved and the expected savable resources of each started application, in this step, the target application in the started application that needs to be adjusted in state is determined according to the resources needed to be saved and the expected savable resources of each started application and the usage time interval of each application. Specifically, the time interval is used to indicate: the time interval between the time the user last used each launched application and the current time.
In practical applications, the implementation process of step 302 may include steps B1 to B10:
step B1: and acquiring each normal state application of which the current state is the normal running state in the started applications.
In the AR device, when some applications are in the "normal running state" in the current state, the service provided by the application to the user may also be implemented in the "normal standby state", and if the application is adjusted from the "normal running state" to the "normal standby state", more resources may also be saved for the AR device. Therefore, the AR device first considers an application whose current state is the "normal running state" when determining an application whose state needs to be adjusted among the launched applications. Therefore, in this embodiment, the AR device first obtains applications in the started applications, which are currently in the "normal running state", and these applications are referred to as normal state applications.
Step B2: and calculating the total expected saved resource of each normal state application according to each expected saved resource corresponding to each normal state application.
After the normal state applications in the started applications, the current state of which is the "normal running state", are obtained, in this step, when the corresponding respective normal state applications are adjusted from the "normal running state" to the target state of the "normal standby state", the corresponding respective expectations can save resources, and the total expectations of the respective normal state applications can save resources by calculating.
Step B3: and judging whether the total expected saved resources are less than the resources needing to be saved, if so, entering the step B4, and if not, entering the step B5.
In this embodiment, the size relationship between the total expected saved resources and the saved resources of each normal application determines the way of determining the target application that needs to be adjusted in the started application. If the total expected saved resources are less than the saved resources, it indicates that even if all normal state applications are adjusted from the current "normal running state" to the "normal standby state", the saved resources for the AR device are not enough to maintain the AR device with the computing resources required by the started applications after the adjusted state, in this case, the target application needs to be determined from other started applications besides the normal state applications, and the specific process may refer to step B4. If the total expected saved resources are not less than the saved resources, it indicates that the resources saved for the AR device can enable the AR device to maintain the computing resources required by the started applications after the state adjustment if all the normal state applications are adjusted from the current "normal running state" to the "normal standby state", in this case, the applications that need to be adjusted in state need to be determined from the normal state applications, and the specific process may refer to step B5.
Step B4: determining the applications with adjustable states in the normal state applications as a first part of target applications, determining a second part of target applications according to the product size of the expected resources saved by the started applications except the first part of target applications and the time interval, and ending the process.
Since the AR device first considers adjusting the state of the application, the current state of which is the "normal running state", to the "normal standby state" when the actual computing resources of the AR device cannot satisfy the total expected computing resources of the current state of the started application. However, current demands for applications by different users are different, and therefore, applications of AR devices are divided into two types of applications, that is, applications with adjustable states and applications with non-adjustable states. Generally, a developer who has started an application sets a section of instruction code in a program code of the application, and when the AR device triggers to run the instruction code corresponding to the application, a running result may indicate whether the application may be adjusted from a "normal running state" to a "normal standby state".
For example, applications currently in the "normal running state" on the AR device are a play video application, a music application. Generally, the computing resource required when the video application plays the video is large, so that when a developer presets a code instruction in an AR device running program, the running result of the code instruction may be configured to be unable to be adjusted from a "normal running state" to a "normal standby state". Of course, the developer playing the video application may also configure the running result to be adjustable from the "normal running state" to the "normal standby state". For music application, the computing resource required when playing music is smaller than that of playing video application, so that when a developer presets a code instruction in an AR device running program, the running result of the code instruction can be configured to be adjustable from a "normal running state" to a "normal standby state". Of course, the developer of the music application may configure the operation result not to be adjustable from the "normal operation state" to the "normal standby state".
Therefore, in order to determine whether each normal-state application can be adjusted from the "normal operation state" to the "normal standby state", the AR device may respectively execute a section of code instructions preset in each normal-state application, and determine, as the first part of target applications, normal-state applications whose execution results indicate that they can be adjusted from the "normal operation state" to the "normal standby state". Wherein the target state of the normal state applications other than the first part of target applications is adjusted to a "minimum running state".
After the first part of target applications are determined, the second part of target applications are determined according to the product size of the expected saved resources and the time interval of the started applications except the first part of target applications. Specifically, according to the first part of resources saved by the first part of target applications, a difference between the resources to be saved and the first part of resources may be calculated, and for each started application except the first part of target applications, a product of each expected and savable resource and a usage time interval may be calculated, where the usage time interval may be: the time interval between the time when the user used the application last time and the current time; and determining a second part of target application meeting the difference value according to the sequence of the products from large to small.
Specifically, the AR device calculates a first portion of resources saved when the first portion of the target application is adjusted from the "normal running state" to the "normal standby state". Since the first portion of resources is less than the resources to be saved, the AR device then calculates a difference between the resources to be saved and the first portion of resources, the difference representing: the AR device needs to determine the resources that the second portion of target applications can save from the launched applications other than the first portion of target applications. In this embodiment, for normal state applications other than the first part of target applications, the target state is determined as the "minimum running state", and therefore, the corresponding expected saved resources are the difference between the computing resources allocated by the AR device for the "normal running state" and the computing resources allocated by the AR device for the "minimum running state".
And for the started applications except the normal-state application, the AR device continues to work in a target state specified by a preset state rule to calculate expected resource saving, and calculates the use time interval of the other started applications except the first part of target applications, wherein the use time interval is used for representing the time interval between the current moment and the moment when the user uses the application last time, and the use time interval reflects the value of the application. The larger the time interval is, the longer the time from the moment when the user uses the application last time to the current moment is, and the smaller the application value of the application to the user is; the smaller the time interval is, the shorter the time from the current moment when the user uses the application last time is, and the higher the application value of the application to the user is.
In this embodiment, the ratio of the expected savable resources of the application to the application value is defined as the degradation value, and it can be derived from the definition of the degradation value that the degradation value is inversely proportional to the application value, i.e., the greater the application value, the smaller the degradation value; the smaller the application value, the greater the degradation value. Also, because the application value is inversely proportional to the time interval, the degradation value is proportional to the time interval. Thus, the degradation value of an application is proportional to the expected savable resources and proportional to the time interval, and in order to represent the relationship of the degradation value, the expected savable resources, and the time interval, the degradation value in this embodiment can be expressed as the product of the expected savable resources and the time interval.
It should be noted that the indication of the degraded value is directly proportional to the expected savable resources and directly proportional to the time interval, and for the concrete expression between the degraded value, the expected savable resources and the time interval, the skilled person can determine the value according to the actual situation, and is not limited to the application of the expression of the product of the expected savable resources and the time interval to indicate the degraded value.
After calculating the degraded values of other started applications except the first part of target applications, the applications are arranged according to the descending order of the degraded values, and a certain number of second part of target applications are determined according to the ascending order and the descending order, wherein the second part of target applications should be matched with the difference value between the resources to be saved and the first part of resources. For example, if the application with the greatest degraded value is application a, the resource that can be saved is 10M, the application with the next greatest degraded value is application B, the resource that can be saved is 8M, and the difference between the resources is 15M, then the second part of the target applications determined in this case are applications a and B. Finally, after the AR device determines the first part of the target application and the second part of the target application, the aggregate of the first part of the target application and the second part of the target application is the target application whose state needs to be adjusted.
Step B5: calculating the product size of the expected resource saving and the time interval of each normal state application, and selecting a fixed number of applications to be determined according to the sequence of products from large to small.
Calculating each expectation of each normal state application in this step may save the product of the resource and the usage time interval, i.e. calculate the degradation value of each normal state application. After the degradation values corresponding to the normal state applications are calculated, the normal state applications with the fixed number are determined according to the descending order of the degradation values, and the calculation resources which can be saved and correspond to the normal state applications with the fixed number need to be saved. For example, the sum of the resources that can be saved by the application with the largest degraded value and the second largest degraded value is 12M, the resources that need to be saved is 15M, and the sum of the resources that can be saved by the application with the largest degraded value, the second largest application and the third application is 15M, then the applications to be determined in this step are the three applications with the highest degraded value ranking three. It will be appreciated that these three applications are not the final target applications because the AR device in this step does not yet know whether these three applications are state-tunable applications.
Step B6: judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources; if so, proceed to step B7, and if not, proceed to step B8.
Then, the AR device runs a section of code instruction preset in the application to be determined, and according to the running result of the preset code instruction, the AR device can obtain the application in the adjustable state, and calculates the sum of each expected resource saving of the application in the adjustable state, which can be referred to as a second part of resources, and judges whether the second part of resources meets the requirement for saving the resources, if the second part of resources meets the requirement for saving the resources, the AR device enters step B7; if the second portion of resources is not sufficient to save resources, step B8 is entered.
Step B7: and determining a target application from the applications to be determined with adjustable states, and ending the process.
And when the second part of resources meets the requirement of saving the resources, determining a third part of to-be-determined applications corresponding to the second part of resources as target applications. Specifically, if the second part of resources exactly satisfy the target application, all the applications to be determined, which have adjustable states, may be used as the target application, and if the second part of resources is more than the resources to be saved, the applications that exactly satisfy the resources to be saved may be selected as the target application according to the degradation value of the applications to be determined, which have adjustable states.
Step B8: and determining all the applications to be determined with adjustable states as a third part of target applications, and calculating the difference value between the resources to be saved and the total saved resources as resources to be supplemented.
And if the second part of resources are not satisfied, for example, the second part of resources are less than the resources to be saved, at this time, all the applications to be determined with adjustable states are determined as the third part of target applications. Because the second part of resources do not satisfy the requirement of saving resources, it is indicated that the state of the third part of target applications cannot satisfy the requirement of saving resources after adjustment, and therefore, the difference value between the resources to be saved and the second part of resources is also required to be used as resources to be supplemented, and another part of target applications is determined.
Step B9: according to the sequence that the product of the expected resources to be saved and the use time interval is from large to small, selecting a fixed number of applications from the normal state applications except the third part of target applications as the applications to be determined, judging whether the normal state applications are selected completely, if not, returning to the step B6 until the resources to be saved corresponding to the applications capable of adjusting the state in the normal running state applications meet the requirement of the resources to be saved; if so, step B10 is entered.
Then, according to the sequence of the degradation value of each normal state application, selecting the part of the applications meeting the resource to be supplemented from the normal state applications except the third part of target applications as the applications to be determined, continuously judging whether the states of the applications to be determined are adjustable, and taking the applications to be determined with adjustable states as the fourth part of target applications; taking the resources saved by the third part of target applications and the fourth part of target applications as the resources which can be saved, calculating a difference value between the resources which need to be saved and the resources which can be saved by the AR equipment, continuously determining the application to be determined which meets the difference value in normal state applications except the third part of target applications and the fourth part of target applications, and repeating the steps until the difference value between the resources which need to be saved and the resources which can be saved by each part of target applications is not more than 0, namely the resources which can be saved by each part of target applications meet the requirements of the resources which need to be saved; alternatively, although the available resources of the target application of each part are not sufficient to save resources, the normal application programs are selected, and the process proceeds to step B10.
Step B10: and determining the target application in which the state needs to be adjusted according to the sequence from large to small of the product of the expected resource saving and the use time interval from the started application except the normal application.
And if the normal state applications are selected completely and the resources saved by the normal state applications capable of adjusting the state are still less than the resources needing to be saved, determining the target application needing to adjust the state in the started applications except the normal state applications according to the descending order of the degradation value. Specifically, for each target application composed of all applications capable of adjusting the state in the normal state application, resources saved by each target application are calculated, a difference between the resources to be saved and the resources saved by each target application is calculated, the difference is referred to as a second part of resources to be saved, then, from other started applications except the normal state application, applications meeting the second part of resources to be saved are determined according to the descending order of the degradation value of each application, and the applications and each target application determined from the normal state application are determined as the target applications needing adjusting the state in the embodiment.
Then, returning to step 303: and adjusting the target application from the current state to the target state in a mode of calling a callback function of the target state corresponding to the target application.
After the target application needing to be adjusted in state is obtained, the AR device adjusts the target application from the current state to the target state by calling a callback function of the target state corresponding to the target application.
For example, a normal state application, which can adjust the state to the "normal standby state", in the target application is adjusted from the current "normal running state" to the "normal standby state", and a normal state application, which cannot adjust the state to the "normal standby state", in the target application is adjusted from the current "normal running state" to the "minimum running state"; adjusting the state of the target application with the current state of the minimum running state into a normal standby state; adjusting the state of the target application with the current state of a normal standby state to be a minimum standby state; or, the state of the target application with the current state of the minimum standby state is adjusted to be the sleep state.
In an actual scenario, if the state of the target application in the "minimum standby state" is adjusted to the "sleep state", the AR device may further send a prompt message to the user, where the prompt message is used to prompt the user that "the application is to be adjusted from the minimum standby state to the sleep state" is about to be performed.
In this embodiment, when the AR device determines that the total expected available resources of the started applications are not less than the resources that need to be saved, the AR device determines the target application whose state needs to be adjusted according to the product of the time interval and the expected available resources of the started applications that need to be saved. It can be seen that by calculating the degradation value of an application, the behavior and resource allocation of individual applications in an AR device can be optimized so that a user can experience more effective services within limited resources.
The embodiment of the present application further provides an application state adjustment method, where the adjustment method may be applied to adjustment application of an augmented reality AR device, and the adjustment method may include the following steps C1 to C4:
step C1: and the adjusting application detects whether the states of other started applications are changed or not, wherein the states correspond to the computing resources needing to be allocated by the AR equipment.
In this step, the adjustment application is an APP installed in the AR device, and after the APP is installed in the AR device, the user may detect the state of other already-started applications installed on the AR device by activating or opening the APP. Specifically, the adjustment application may determine whether the state of each started application changes by acquiring the operating parameters of other started applications. For example, the system resources of the AR device occupied by the started application are obtained to determine that, if the occupied system resources suddenly increase from zero, the application is already started; or, if the occupied system resource is reduced, the application is changed from the normal operation state to the normal standby state, and the like. Those skilled in the art may configure the change of the system resource corresponding to the change of the state of each application in advance.
Step C2: calculating a total expected computing resource that maintains a current state of the launched application.
After the adjustment application detects a change in the state of other launched applications, the total expected computing resources of the AR device that maintain the current state of the launched applications are calculated. Of course, if the adjustment application does not detect a change in the status of other launched applications, step C2 may not be performed.
Specifically, the detailed process of calculating the total expected computing resource may refer to the description of step 201, and is not described herein again.
Step C3: determining whether actual computing resources of the AR device meet the total expected computing resources; if not, step C4 is entered.
The tuning application then determines whether the actual computing resources of the AR device can satisfy the calculated total expected computing resources, and if so, may proceed to step C5, and if not, may proceed to step C4. Specifically, the implementation of this step may refer to the description of step 202, and is not described herein again.
Step C4: adjusting an application state of the launched application in accordance with a principle of reducing the total expected computing resources.
Then, the adjusting application adjusts the application state of the started application according to the principle of reducing the total expected computing resources. Specifically, the implementation of this step may refer to the description shown in fig. 3, and is not described herein again.
Step C5: and awakening the application in the dormant state in the started application.
When the actual computing resources of the AR device meet the total expected computing resources, the adjustment application may wake up the application in the dormant state among the currently started applications. For example, when the tuning application detects that the user is currently exiting some applications and detects that there are computing resources remaining in addition to those needed to maintain the current state of the launched application, the tuning application wakes up the application in the "dormant state" so that the application in the "dormant state" can also serve the user of the AR device.
For simplicity of explanation, the foregoing method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some steps may occur in other orders or concurrently with other steps based on the disclosure herein. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Referring to fig. 4, the present application further provides an embodiment of an operating system, in this embodiment, the operating system may be integrated on an AR device, and components of the operating system may include:
a calculating unit 401, configured to determine, in response to a change in a state of a started application in the AR device, a total expected computing resource required to maintain a current state of the started application; the state corresponds to a computing resource that the AR device needs to allocate.
A determining unit 402, configured to determine whether an actual computing resource of the AR device satisfies the total expected computing resource.
An adjusting unit 403, configured to, if the result of the determining unit is negative, adjust the application state of the started application according to a principle of reducing the total expected computing resource.
The adjusting unit 403 may specifically include:
a first calculating subunit, configured to calculate a difference between the total expected calculation resource and the actual calculation resource as a resource to be saved; the second calculating subunit is used for calculating the expected resource saving of each started application from the current state to the target state; a first determining subunit, configured to determine, according to the resource needing to be saved, the expected resource that can be saved, and a usage time interval, a target application that needs to be adjusted in state in the started application, where the usage time interval is: the time interval between the time when the user uses each started application last time and the current time; and the adjusting subunit is used for adjusting the target application from the current state to the target state in a mode of calling a callback function of the target state corresponding to the target application.
The second calculating subunit may specifically include:
the second determining subunit is configured to determine, according to a state relationship specified by a preset state rule, a target state corresponding to the current state of the started application; the states include: a normal running state, a minimum running state, a normal standby state, a minimum standby state and a dormant state; and a third subunit for determining a difference between the computational resources required to maintain the current state of the launched application and the computational resources required to maintain the target state of the launched application as the expected savable resources of the launched application.
The third determining subunit may be specifically configured to:
when the current state of the started application is a normal running state, determining that the target state of the started application is a normal standby state; when the current state of the started application is the minimum running state, determining that the target state of the started application is a normal standby state; when the current state of the started application is a normal standby state, determining that the target state is a minimum standby state; or when the current state of the started application is the minimum standby state, determining that the target state is the dormant state.
The first determining subunit may specifically include:
the acquiring subunit is used for acquiring each normal state application of which the current state is a normal running state in the started applications;
a calculating subunit, configured to calculate a total expected resource saving of each normal application according to the expected resource saving corresponding to each normal application;
a first judging subunit, configured to judge whether the total expected resource saving is less than the resource needing to be saved;
the first processing subunit is configured to, when the result of the first determining subunit is smaller than the first threshold, determine an application with an adjustable state in each normal-state application as a first part of target applications, and determine a second part of target applications according to a product size of expected resources that can be saved and a time interval of an application that has been started other than the first part of target applications; and the number of the first and second groups,
the first processing subunit is configured to select a fixed number of applications to be determined according to a product size of expected resource saving and a usage time interval of each normal state application when a result of the first judging subunit is not less than a predetermined value; judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources; and if so, determining the target application from the applications to be determined with adjustable states.
The first determining subunit may further include:
the fourth determining subunit is used for determining all the applications to be determined with adjustable states as the third part of target applications;
a selecting subunit, configured to select a fixed number of applications from normal-state applications other than the third part of target applications as applications to be determined;
the second judgment subunit is used for judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources;
a fifth determining subunit, configured to determine, when the result of the second determining subunit is satisfied, a fourth part of target applications from the applications to be determined, and use the third part of target applications and the fourth part of target applications as target applications;
a third judging subunit, configured to, when the result of the second judging subunit is not satisfied, select, in order from large to small, a fixed number of applications from the normal-state applications other than the third part of target applications as applications to be determined according to a product of the expected resource saving and the usage time interval, and judge whether the normal-state applications are selected completely;
the triggering subunit is configured to trigger the second judging subunit when the result of the third judging subunit is that the selection is not completed, until the resource that can be saved corresponding to the application in the state that can be adjusted in the normal running state application satisfies the resource that needs to be saved; and the number of the first and second groups,
and a sixth determining subunit, configured to determine, when the result of the third determining subunit is that the selection is completed, the target application in which the state needs to be adjusted according to a sequence from a large to a small of a product of the expected resource saving and the usage time interval from the started application other than the normal-state application.
The first processing subunit is specifically configured to: under the condition that the result of the first judgment subunit is less than the first judgment subunit, determining the application with adjustable state in each normal state application as a first part of target application, calculating the difference value between the resource to be saved and the part of resource according to the part of resource saved by the first part of target application, and calculating the product of the expected saved resource and the use time interval aiming at each started application except the first part of target application; and determining the second part of target applications meeting the difference values according to the sequence of the products from large to small.
Wherein, the adjusting device may further include:
and the awakening unit is used for awakening the application in the dormant state in the started application.
By adopting the operating system of the embodiment of the application, the target application needing to be adjusted in state in the started application is determined, so that the current requirement of a user can be met, and meanwhile, the total expected computing resources required by the started application are reduced, so that the computing resources of the AR equipment can maintain the computing resources required by the application after the state is adjusted, and the user experience is not influenced.
The embodiment of the present application further provides an application for adjusting an application state, where the application for adjusting may be installed in an augmented reality AR, and each unit of the application for adjusting may include:
and the detection unit is used for detecting whether the states of other started applications are changed. The calculating unit is used for calculating total expected calculation resources for maintaining the current state of the started application under the condition that the result of the detecting unit is changed; the state corresponds to a computing resource that the AR device needs to allocate. A determining unit configured to determine whether an actual computing resource of the AR device satisfies the total expected computing resource. And an adjusting unit, configured to adjust the application state of the started application according to a principle of reducing the total expected computing resource when the result of the determining unit is not satisfied.
An embodiment of the present application further provides a readable medium storing an adjustment program for causing an augmented reality AR device to execute an application state, where the processing includes:
a detection step, which is to detect whether the states of other started applications are changed; a calculation step of calculating, in the event of a change, a total expected computational resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate; a determining step of determining whether actual computing resources of the AR device satisfy the total expected computing resources; an adjusting step, in case of not being satisfied, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
Fig. 5 is a schematic diagram of a hardware structure of an AR device 500 in the embodiment of the present application. The AR device 500 may be used to implement the adjustment of the application state. I.e., the AR device 500 may be used to perform the methods provided in the above-described embodiments. In the present embodiment, the AR device 500 includes: a processor 501, a memory 502, a network interface 503, and a bus system 504.
The bus system 504 is used to couple the various hardware components of the AR device 500 together.
The network interface 503 is configured to implement communication connection between the AR device 500 and at least one other AR device, and may use the internet, a wide area network, a local area network, a metropolitan area network, or the like.
The memory 502 is used to store program instructions and/or data.
The processor 501 is configured to read instructions and/or data stored in the memory 502, and perform the following operations:
in response to a change in a state of a launched application in the AR device, calculating a total expected computing resource required to maintain a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate;
determining whether actual computing resources of the AR device meet the total expected computing resources;
if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
Wherein the processor 501 may further execute the following instructions:
wherein the adjusting the application state of the started application according to the principle of reducing the total expected computing resources may include: calculating a difference value between the total expected computing resource and the actual computing resource as a resource to be saved, and calculating an expected saved resource of each started application adjusted from a current state to a target state; determining a target application needing to be adjusted in state in the started applications according to the resources needing to be saved, the expected resources needing to be saved and a use time interval, wherein the use time interval is as follows: the time interval between the time when the user uses each started application last time and the current time; and adjusting the target application from the current state to the target state in a mode of calling a callback function of the target state corresponding to the target application.
Wherein the calculating of the expected resource saving for each of the started applications to adjust from the current state to the target state may include: determining a target state corresponding to the current state of the started application according to a state relation specified by a preset state rule; the states include: a normal running state, a minimum running state, a normal standby state, a minimum standby state and a dormant state; determining a difference between the computational resources required to maintain the current state of the launched application and the computational resources required to maintain the target state of the launched application as the expected savings in resources for the launched application.
The determining the target state corresponding to the current state of the started application according to the state relationship specified by the preset state rule may include: when the current state of the started application is a normal running state, determining that the target state of the started application is a normal standby state; when the current state of the started application is the minimum running state, determining that the target state of the started application is a normal standby state; when the current state of the started application is a normal standby state, determining that the target state is a minimum standby state; or when the current state of the started application is the minimum standby state, determining that the target state is the dormant state.
The determining, according to the resource to be saved, the expected resource to be saved of the started application, and the usage time interval, a target application of the started application that needs to be adjusted in state may include: acquiring each normal state application of which the current state is a normal running state in the started applications; calculating the total expected saved resources of each normal state application according to the expected saved resources corresponding to each normal state application; judging whether the total expected saved resources are smaller than the resources needing to be saved; if the current time interval is less than the first time interval, determining the applications with adjustable states in the normal-state applications as a first part of target applications, and determining a second part of target applications according to the product size of the expected resources saved by the started applications except the first part of target applications and the time interval; if not, selecting a fixed number of applications to be determined according to the expected product size of the saved resources and the use time interval of each normal state application; judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources; and if so, determining the target application from the applications to be determined with adjustable states.
If the total expected savable resources corresponding to the application to be determined, which is adjustable in state, do not satisfy the resource saving requirement, the processor 501 may further execute the following instructions: determining all applications to be determined with adjustable states as a third part of target applications; selecting a fixed number of applications from the normal state applications except the third part of target applications as the applications to be determined, judging whether the total saved resources corresponding to the applications to be determined with adjustable states meet the resources to be saved, if so, determining the fourth part of target applications from the applications to be determined, and taking the third part of target applications and the fourth part of target applications as target applications; if not, selecting a fixed number of applications from the normal state applications except the third part of target applications as the applications to be determined according to the sequence that the product of the expected resources to be saved and the service time interval is from large to small, and judging whether the normal state applications are selected completely; if not, executing a step of judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources until the saved resources corresponding to the application with adjustable state in the normal running state meet the requirement of saving the resources; and if the selection is finished, determining the target application of which the state needs to be adjusted according to the sequence from the product of the expected resource saving and the use time interval from the started application except the normal application to the small application.
Wherein the determining a second portion of the target applications according to the product size of the started expected savable resources and the time interval, which is different from the first portion of the target applications, may include: calculating the difference value between the resources needing to be saved and the partial resources according to the partial resources saved by the first part of target applications, and calculating the product of the expected saved resources and the use time interval for each started application except the first part of target applications; and determining the second part of target applications meeting the difference values according to the sequence of the products from large to small.
In the event that the actual computing resources of the AR device meet the expected computing resources, or in response to the user exiting the launched application, the processor 501 may further execute the following instructions: and awakening the application in the dormant state in the started application.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method for adjusting the application state, the operating system, and the AR device provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (13)

1. An adjustment method for an application state, the adjustment method being applied to an operating system of an Augmented Reality (AR) device, the adjustment method comprising:
in response to a change in a state of a launched application in the AR device, calculating a total expected computing resource required to maintain a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate;
determining whether actual computing resources of the AR device meet the total expected computing resources;
if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
2. The method of claim 1, wherein said adjusting the application state of the launched application based on the principle of reducing the total expected computing resources comprises:
calculating a difference value between the total expected computing resource and the actual computing resource as a resource to be saved, and calculating an expected saved resource of each started application adjusted from a current state to a target state;
determining a target application needing to be adjusted in state in the started applications according to the resources needing to be saved, the expected resources needing to be saved and a use time interval, wherein the use time interval is as follows: the time interval between the time when the user uses each started application last time and the current time;
and adjusting the target application from the current state to the target state in a mode of calling a callback function of the target state corresponding to the target application.
3. The method of claim 2, wherein calculating the expected savings in resources for each of the launched applications to adjust from the current state to the target state comprises:
determining a target state corresponding to the current state of the started application according to a state relation specified by a preset state rule; the states include: a normal running state, a minimum running state, a normal standby state, a minimum standby state and a dormant state;
determining a difference between the computational resources required to maintain the current state of the launched application and the computational resources required to maintain the target state of the launched application as the expected savings in resources for the launched application.
4. The method according to claim 3, wherein the determining the target state corresponding to the current state of the started application according to the state relationship specified by the preset state rule comprises:
when the current state of the started application is a normal running state, determining that the target state of the started application is a normal standby state;
when the current state of the started application is the minimum running state, determining that the target state of the started application is a normal standby state;
when the current state of the started application is a normal standby state, determining that the target state is a minimum standby state; or,
and when the current state of the started application is the minimum standby state, determining that the target state is the dormant state.
5. The method according to claim 4, wherein the determining the target application of the started applications that needs to be adjusted in state according to the resource-saving requirement, the expected resource-saving requirement of the started applications and the usage time interval comprises:
acquiring each normal state application of which the current state is a normal running state in the started applications;
calculating the total expected saved resources of each normal state application according to the expected saved resources corresponding to each normal state application;
judging whether the total expected saved resources are smaller than the resources needing to be saved;
if the current time interval is less than the first time interval, determining the applications with adjustable states in the normal-state applications as a first part of target applications, and determining a second part of target applications according to the product size of the expected resources saved by the started applications except the first part of target applications and the time interval;
if not, selecting a fixed number of applications to be determined according to the expected product size of the saved resources and the use time interval of each normal state application; judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources; and if so, determining the target application from the applications to be determined with adjustable states.
6. The method of claim 5, wherein if the total expected savable resources corresponding to the application to be determined with adjustable status do not satisfy the resource saving requirement, further comprising:
determining all applications to be determined with adjustable states as a third part of target applications;
selecting a fixed number of applications from the normal state applications except the third part of target applications as the applications to be determined, judging whether the total saved resources corresponding to the applications to be determined with adjustable states meet the resources to be saved, if so, determining the fourth part of target applications from the applications to be determined, and taking the third part of target applications and the fourth part of target applications as target applications;
if not, selecting a fixed number of applications from the normal state applications except the third part of target applications as the applications to be determined according to the sequence that the product of the expected resources to be saved and the service time interval is from large to small, and judging whether the normal state applications are selected completely;
if not, executing a step of judging whether the total saved resources corresponding to the application to be determined with adjustable state meet the requirement of saving the resources until the saved resources corresponding to the application with adjustable state in the normal running state meet the requirement of saving the resources;
and if the selection is finished, determining the target application of which the state needs to be adjusted according to the sequence from the product of the expected resource saving and the use time interval from the started application except the normal application to the small application.
7. The method of claim 5, wherein determining the second portion of the target applications according to the product size of the started expected savable resources and the time interval, other than the first portion of the target applications, comprises:
calculating the difference value between the resources needing to be saved and the partial resources according to the partial resources saved by the first part of target applications, and calculating the product of the expected saved resources and the use time interval for each started application except the first part of target applications;
and determining the second part of target applications meeting the difference values according to the sequence of the products from large to small.
8. The method of claim 1, wherein, if the actual computing resources of the AR device meet the expected computing resources, or in response to the user exiting the launched application, further comprising:
and awakening the application in the dormant state in the started application.
9. An operating system integrated with an Augmented Reality (AR) device, the operating system comprising:
a calculating unit, configured to calculate, in response to a change in a state of a started application in the AR device, a total expected calculation resource required to maintain a current state of the started application; the state corresponds to a computing resource that the AR device needs to allocate;
a determining unit configured to determine whether an actual computing resource of the AR device satisfies the total expected computing resource;
and the adjusting unit is used for adjusting the application state of the started application according to the principle of reducing the total expected computing resource under the condition that the result of the judging unit is negative.
10. An adjustment method for an application state is applied to adjustment application of an Augmented Reality (AR), and the adjustment method comprises the following steps: the adjusting application detects whether the states of other started applications are changed;
if so, calculating a total expected computing resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate;
determining whether actual computing resources of the AR device meet the total expected computing resources;
if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
11. An adjustment application of an application state, wherein the adjustment application is installed in an Augmented Reality (AR), and wherein the adjustment application comprises:
the detection unit is used for detecting whether the states of other started applications are changed or not;
the calculating unit is used for calculating total expected calculation resources for maintaining the current state of the started application under the condition that the result of the detecting unit is changed; the state corresponds to a computing resource that the AR device needs to allocate;
a determining unit configured to determine whether an actual computing resource of the AR device satisfies the total expected computing resource;
if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
12. A readable medium storing a readable program for causing an Augmented Reality (AR) device to execute an adjustment program for an application state, the process comprising the steps of:
a detection step, which is to detect whether the states of other started applications are changed;
a calculation step of calculating, in the event of a change, a total expected computational resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate;
a determining step of determining whether actual computing resources of the AR device satisfy the total expected computing resources;
an adjusting step, in case of not being satisfied, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
13. An Augmented Reality (AR) device, comprising: a processor and a memory;
the memory for storing program instructions and/or data; the processor is used for reading the instructions and/or data stored in the memory and executing the following operations:
the adjusting application detects whether the states of other started applications are changed;
if so, calculating a total expected computing resource that maintains a current state of the launched application; the state corresponds to a computing resource that the AR device needs to allocate;
determining whether actual computing resources of the AR device meet the total expected computing resources;
if not, adjusting the application state of the started application according to the principle of reducing the total expected computing resources.
CN201710469545.0A 2017-06-20 2017-06-20 Method of adjustment, operating system and the AR equipment of application state Pending CN109101324A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710469545.0A CN109101324A (en) 2017-06-20 2017-06-20 Method of adjustment, operating system and the AR equipment of application state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710469545.0A CN109101324A (en) 2017-06-20 2017-06-20 Method of adjustment, operating system and the AR equipment of application state

Publications (1)

Publication Number Publication Date
CN109101324A true CN109101324A (en) 2018-12-28

Family

ID=64795630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710469545.0A Pending CN109101324A (en) 2017-06-20 2017-06-20 Method of adjustment, operating system and the AR equipment of application state

Country Status (1)

Country Link
CN (1) CN109101324A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493724A (en) * 2007-12-20 2009-07-29 英特尔公司 Location based policy system and method for changing computing environments
CN103631661A (en) * 2013-11-27 2014-03-12 青岛海信电器股份有限公司 Internal storage management method and device
CN103645955A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Running management method and device for application program
CN106201679A (en) * 2016-06-28 2016-12-07 联想(北京)有限公司 Information processing method and electronic equipment
CN106528296A (en) * 2016-11-21 2017-03-22 滁州职业技术学院 Control method for running memory of mobile terminal, and mobile terminal
CN106844047A (en) * 2017-01-11 2017-06-13 上海传英信息技术有限公司 A kind of application program optimization method of intelligent terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101493724A (en) * 2007-12-20 2009-07-29 英特尔公司 Location based policy system and method for changing computing environments
CN103631661A (en) * 2013-11-27 2014-03-12 青岛海信电器股份有限公司 Internal storage management method and device
CN103645955A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Running management method and device for application program
CN106201679A (en) * 2016-06-28 2016-12-07 联想(北京)有限公司 Information processing method and electronic equipment
CN106528296A (en) * 2016-11-21 2017-03-22 滁州职业技术学院 Control method for running memory of mobile terminal, and mobile terminal
CN106844047A (en) * 2017-01-11 2017-06-13 上海传英信息技术有限公司 A kind of application program optimization method of intelligent terminal

Similar Documents

Publication Publication Date Title
WO2021008543A1 (en) Resource scheduling method and electronic device
US9626295B2 (en) Systems and methods for scheduling tasks in a heterogeneous processor cluster architecture using cache demand monitoring
US8397239B2 (en) Virtual computer systems and computer virtualization programs
CN106648747B (en) Process preloading processing method and device
CN104424031B (en) Method and device for controlling working frequency of processor
US20170153917A1 (en) Account activity level based-system resource allocating method and device
CN111045814A (en) Resource scheduling method and terminal equipment
CN112333556B (en) Control method for monitoring video transmission bandwidth, terminal equipment and readable storage medium
Ju et al. Symphoney: A coordinated sensing flow execution engine for concurrent mobile sensing applications
US20190080113A1 (en) Apparatus for recommending user's privacy control and method for the same
CN113703962B (en) Cloud resource allocation method and device, electronic equipment and storage medium
CN113934615A (en) Data monitoring method, device and equipment
CN108415765B (en) Task scheduling method and device and intelligent terminal
CN114138341A (en) Scheduling method, device, program product and chip of micro-instruction cache resources
CN111338575B (en) Storage service quality control method, device, equipment and storage medium
CN113885956A (en) Service deployment method and device, electronic equipment and storage medium
CN115202889A (en) Computing resource adjusting method and computing system
CN111784418B (en) Display control method and device for live broadcasting room, computer medium and electronic equipment
CN109189204A (en) Application power consumption statistical method and electronic equipment
CN109101324A (en) Method of adjustment, operating system and the AR equipment of application state
CN116661964A (en) Task processing method and device and electronic equipment
US11275424B2 (en) Method for operating a device having a switchable power saving mode for reducing its power consumption
CN116302485A (en) CPU scheduling method and device, electronic equipment and readable storage medium
CN116069619A (en) Method and device for detecting performance of applet, electronic equipment and medium
CN115774602A (en) Container resource allocation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20181228

RJ01 Rejection of invention patent application after publication