INFORMATION PROCESSING APPARATUS, CONTROL METHOD FOR INFORMATION PROCESSING APPARATUS, AND APPLICATION MANAGEMENT METHOD

An information processing apparatus manages a plurality of operating applications. The information processing apparatus determines whether an activated user interface (UI) application is able to receive a clear execution notification from a system and executes reactivation processing of the UI application to release resources at the end of the UI application.

BACKGROUND OF THE INVENTION

Field of the Invention

One aspect of the disclosed embodiments relates to management of embedded applications in information processing.

Description of the Related Art

Some information apparatuses are already embedded with a plurality of applications. Generally, in an execution environment of the embedded applications of such information apparatuses, a total amount of resources usable by the embedded applications is limited. This is because the resources usable by the embedded applications are dependent on the amount of resources of the information apparatus itself, and the resources such as a memory of the information apparatus is consumed along with activation of the embedded applications in the execution environment thereof.

For example, in a user interface (UI) application described in Java (registered trademark), an object is referred when a UI is to be displayed, so that a memory is consumed. A memory area used for referring to the object is retrieved by a function such as a garbage collection when the UI application terminates the reference of the object. However, in a case where the reference of the object is not terminated, a memory area occupied by the UI application is continuously held without being released.

In recent years, in many cases, function enhancement of the information apparatus embedded with an application has been accompanied by function enhancement of the application, and thus the application has been expanded continuously. If the application is expanded continuously, a memory area that is not released but occupied by the application may also be increased continuously.

There may be a case where a plurality of applications is activated in the execution environment of the embedded application having a limited amount of usable resources. If a plurality of applications is activated in such an environment, a method for releasing the resources such as a memory area by ending unnecessary applications through an application management unit may be necessary for managing activation of the applications.

For example, although a plurality of applications may be activated in a smartphone, it is often the case that a user is provided with means for ending the application. This is possible because a user who operates the smartphone can be limited to a particular individual.

On the other hand, in the case of an information processing apparatus such as an image forming apparatus accessed by a plurality of users, if means which enables a user to freely end the application is provided, there arises a problem that one user can end the application regardless of a usage status of another user.

Further, with regard to a smartphone, there is provided a technique for realizing a stable operation (see Japanese Patent No. 5729767). In the technique, operation of an application is monitored, and the application is reactivated when abnormality arises in the operation thereof.

However, with regard to the embedded UI application used by a plurality of users, means for ending or reactivating the UI application has not been provided. Accordingly, there has been a problem that the reference of the object cannot be terminated and thus the resources are occupied continuously.

SUMMARY OF THE INVENTION

One aspect of the disclosed embodiments is directed to a method for reducing consumption of resources in an information processing apparatus without deteriorating usability of the information processing apparatus.

According to an aspect of the embodiments, an information processing apparatus which manages a plurality of operating applications includes a first determination unit. The first determination unit is configured to determine whether the application has made a declaration of rejecting clear execution in a case where use of the application is ended. In a case where the first determination unit determines that the application has not made the declaration of rejecting clear execution, the information processing apparatus executes reactivation processing of the application.

DESCRIPTION OF THE EMBODIMENTS

Hereinafter, an exemplary embodiment will be described with reference to the appended drawings.

FIG. 1is a diagram illustrating a general configuration of an exemplary embodiment.

An image forming apparatus100is one example of an information processing apparatus. The image forming apparatus100is communicably connected to an information processing apparatus110via a network130.

An application-A101, an application-B102, an application-C103are applications respectively operating on the image forming apparatus100. One or a plurality of applications can be operated on the image forming apparatus100. InFIG. 1, three applications are operated on the image forming apparatus100. A user or an administrator is provided with a basic function of the image forming apparatus100, the application-A101, the application-B102, the application-C103, and a method of managing the image forming apparatus100and applications operating thereon. Further, the user can operate the image forming apparatus100directly or indirectly from the information processing apparatus110via the network130.

FIG. 2is a block diagram illustrating a hardware configuration of the image forming apparatus100.

The image forming apparatus100includes a core unit200, a user interface (UI) panel display unit201, a storage device202, a network interface unit203, a scanner unit204, a printer unit205, and a finisher unit206.

A central processing unit (CPU) and a random access memory (RAM), both of which are not illustrated, are mounted on the core unit200. The CPU loads programs such as an operating system (OS), an application execution platform, and applications which are stored in the storage device202and mounted on the image forming apparatus100onto the RAM, and executes the programs by reading the programs from the RAM. The UI panel display unit201displays the content processed by the core unit200and receives an input from a user through an input unit provided thereon. The storage device202stores a program or a data file processed by the core unit200.

The image forming apparatus100is connected to the network130via the network interface unit203. The scanner unit204having a scanner function, the printer unit205having a printing function, and the finisher unit206having a finishing function are connected to the core unit200, and operations thereof are controlled by the core unit200.

FIG. 3is a block diagram illustrating an execution environment for executing the application-A101, the application-B102, and the application-C103in the image forming apparatus100of the present exemplary embodiment.

An application execution platform301is a platform for operating applications.

Processing of installing, uninstalling, or stopping the application-A101, the application-B102, or the application-C103is managed by an application management framework302operating on the application execution platform301.

When installation processing of the application-A101, the application-B102, or the application-C103is to be executed, the application management framework302refers to an application resource declaration file403(seeFIG. 4A) of the application-A101, the application-B102, or the application-C103. Then, the application management framework302determines whether an upper limit value of the resources declared in the file falls within an amount of a free space of the resources in the current execution environment of applications. Based on the determination result, the application management framework302executes install processing of the application if the upper limit value falls within the amount of the free space. If the upper limit value does not fall within the amount of the free space, the application management framework302executes processing of returning an error.

The UI control module303executes control when the application-A101, the application-B102, or the application-C103forms a UI screen, and manages shifting of the screen from a basic screen to the screens of the application-A101, the application-B102, or the application-C103.

The support library304is a library for allowing the application-A101, the application-B102, or the application-C103to use various functions of the image forming apparatus100.

FIG. 4Ais a diagram illustrating files which constitute each of the application-A101, the application-B102, and the application-C103of the present exemplary embodiment.

Basically, each of the application-A101, the application-B102, and the application-C103includes at least three files, i.e., an application execution code file401, an application fixed data file402, and an application resource declaration file403.

The application execution code file401is a file that includes an execution code of the application-A101, the application-B102, or the application-C103.

The application fixed data file402is a file that stores fixed data such as a constant number or a character string retained by the application-A101, the application-B102, or the application-C103.

The application resource declaration file403is a file for making a declaration of information about the application-A101, the application-B102, or the application-C103and the resources used thereby.

FIG. 4Bis a diagram illustrating an internal configuration of the application resource declaration file403. The application resource declaration file403includes information about the application-A101, the application-B102, or the application-C103, such as an application ID, an application name, and resources used thereby.FIG. 4Bis a diagram illustrating an example of an application for displaying a preview of an image included in the image forming apparatus100. An ID “apli-imag-view” unique to the application is described in ApplicationID411, and an application name “PreviewApp” is described in ApplicationName412.

Further, upper limit values of the respective resources used by the application are described in ApplicationResourece413.

In the example inFIG. 4B, upper limit values of a storage, a memory, a thread, a file descriptor, and a socket used by the application are described in a byte unit or a numerical value.

A first exemplary embodiment will be described.FIG. 5is a flowchart illustrating processing of the application management framework302. The CPU included in the core unit200executes a program to realize the application management framework302.

First, in step S501, the UI control module303detects that an icon of the UI application displayed on the UI panel display unit201is pressed, and the application management framework302executes activation of the UI application having a UI screen.

Then, in step S502, the CPU determines whether the UI application is able to receive a clear execution notification from the application management framework302. Herein, when the UI application capable of receiving the clear execution notification receives the clear execution notification, processing for returning the UI to an initial setting is executed by the application management framework302. For example, in a case where a main unit of the system has not been used for a certain period and entered a sleep mode, the application management framework302executes processing for returning setting content of a color/monochrome print setting or a two-sided print setting for a copy function to a default setting. The above processing is executed by making the clear execution notification as a trigger.

As to whether the UI application is able to receive the above-described clear execution notification can be determined based on whether the UI application is registered in an area managed by the application management framework302as a listener of a clear execution notification event transmitted from the application management framework302.

If the UI application is registered as a listener of the clear execution notification event, the CPU determines that the CPU can return the UI screen to a default screen without storing the UI screen. In other words, the CPU determines that there is no effect on the UI application even if the application management framework302executes initialization of the UI application.

If the CPU determines that the UI application is able to receive the clear execution notification from the application management framework302(YES in step S502), the processing proceeds to step S503. If the CPU determines that the UI application cannot receive the clear execution notification (NO in step S502), the CPU ends the flowchart without executing processing on the UI application.

In step S503, if the UI control module303detects a shift of the UI screen on the UI panel display unit201caused by end of use of the UI application (e.g., a screen of the UI application is shifted to an initial screen) (YES in step S503), the processing proceeds to step S504.

In step S504, the CPU determines whether the UI application is in a clear executable state in which the UI can be returned to an initial setting.

Generally, in a system in which a plurality of applications is operated, an application is provided with a function for prohibiting a state from being cleared or operation from being stopped when processing such as job processing which cannot be stopped halfway is being executed. Herein, if the processing cannot be stopped halfway, the UI application makes a declaration of rejecting the clear execution.

Therefore, in step S504, the CPU determines whether the above-described declaration of rejecting the clear execution is made by the UI application. If the declaration of rejecting the clear execution is not made by the UI application (YES in step S504), the processing proceeds to step S505. On the other hand, if the declaration of rejecting the clear execution is made by the UI application (NO in step S504), the CPU waits until the declaration is cancelled, and the processing proceeds to step S505when the declaration of rejecting the clear execution is cancelled.

In step S505, the application management framework302determines that use of the UI application is ended and executes reactivation processing of the UI application. Then, the processing of this flowchart is ended.

Subsequently, the reactivation processing of the UI application executed in step S505will be described with reference toFIG. 6.

FIG. 6is a conceptual diagram illustrating an example of an internal state and a life cycle of the application of the present system. It is assumed that the system conforms to a service platform known as “open service gateway initiative (OSGi)” based on Java, which is capable of remotely managing installation, activation, stop, or uninstallation of application software or a component.

In the system, when installation processing of the UI application is started, the application management framework302executed by the CPU refers to the application resource declaration file403of the UI application. Then, the application management framework302acquires information about an application name, an application ID, and use resources from the application resource declaration file403.

If the UI application is installable, the application management framework302internally registers the information about the UI application and brings the UI application into an installed state601. Then, the application management framework302executed by the CPU executes activation processing of the UI application automatically or based on the instruction from the user.

In the activation processing of the UI application, the CPU loads a class necessary for activating the UI application itself, so that the UI application is brought into a stopped state602where a dependence relationship is cancelled.

Thereafter, the application management framework302starts executing start processing to shift the UI application to a state under start processing603. In the state under start processing603, the UI application executes UI display registration processing of the UI application with respect to the UI control module303. When the UI display registration processing is executed, the UI control module303displays an icon of the UI application on the UI panel display unit201.

When the above processing is ended, the application management framework302brings the UI application into a started state604.

The processing of the flowchart inFIG. 5is started from a state where the UI of the UI application is displayed as a result of an icon of the UI application in a started state604being pressed at the UI panel display unit201and the application being activated thereby. Thereafter, the screen is shifted when use of the UI application is ended, and processing proceeds to reactivation processing.

Then, in the reactivation processing of the UI application in step S505inFIG. 5, the application management framework302firstly starts stop processing of the UI application. When the stop processing is started, the application management framework302brings the UI application into a state under stop processing605.

In the state under stop processing605, the UI application executes UI display deletion processing with respect to the UI control module303. When the UI display deletion processing is executed, the UI control module303deletes the icon of the UI application and cancels the registration with respect to the UI panel display unit201.

When the UI display deletion processing is completed, the application management framework302shifts the UI application to a stopped state602.

Then, the application management framework302shifts the UI application to the state under start processing603again, executes the UI display registration processing with respect to the UI panel display unit201again, and shifts the UI application to the started state604.

Through the reactivation processing, the UI of the UI application returns to a non-displayed state once, and reference of the resources such as the UI object used until that moment is terminated, and thus it is possible to release the memory.

In the above-described reactivation processing, the deletion processing and the registration processing with respect to the UI panel display unit201are executed in the state under stop processing605and the state under start processing603. However, processing similar to the above processing can be executed by notifying the UI control module303about reactivation while omitting the deletion processing and the registration processing with respect to the UI panel display unit201.

In the first exemplary embodiment, resources used by the UI application is released by executing the reactivation processing. However, there is a case where an amount of resources retrieved by the reactivation processing is small. Further, depending on the condition of the resources in the image forming apparatus100, there is a case where the resources have to be further retrieved because the amount of retrieved resources is not sufficient.

In a second exemplary embodiment, processing for further retrieving more resources will be described.

Processing executed by the application management framework302of the present exemplary embodiment will be described with reference to a flowchart inFIG. 7. In the flowchart inFIG. 7, the same reference numerals are applied to steps common to those described inFIG. 5, and description thereof is omitted.

The processing illustrated in this flowchart is realized by the CPU by executing the application management framework302, which is a program according to an embodiment.

In this flowchart, similar to the first exemplary embodiment, in step S501, the UI control module303firstly detects activation of the UI application. Thereafter, the CPU executes processing in steps S502to S503, so that the processing proceeds to step S504.

In step S504, if the application management framework302determines that the UI application is in a clear executable state (YES in step S504), the processing proceeds to step S707.

On the other hand, if the UI application is not in a clear executable state (NO in step S504), the CPU waits until clearance is executable. When the clearance is executable, the processing proceeds to step S707.

In step S707, activation time of the UI application is acquired. The activation time of the UI application is calculated from information about the application such as a number and a size of Java Archive (jar) files included in the UI application or a number of classes to be loaded.

In addition, the activation time of the UI application may be acquired from a log of the application management framework302.

Then, in step S708, the CPU determines whether the activation time of the UI application falls within a predetermined time. The predetermined time is an assumed period of time the user can wait for the UI application to be activated, and an influence on the user is determined to be small if the UI application can be activated within that period. This predetermined time may be a time previously determined by the system, or may be set through a user input.

In step S708, if the CPU determines that the activation time of the UI application falls within the predetermined time (YES in step S708), the processing proceeds to step S709. If the CPU determines that the activation time of the UI application does not fall within the predetermined time (NO in step S708), the processing proceeds to step S505, and the application management framework302reactivates the UI application.

Next, in step S709, the application management framework302acquires a use amount of the resources within the image forming apparatus100from the application execution platform301, and determines whether the use amount exceeds a specified value.

In step S709, if the application management framework302determines that the use amount of the resources within the image forming apparatus100exceeds the specified value (YES in step S709), the processing proceeds to step S710, and the application management framework302executes end processing of the UI application. If the application management framework302determines that the use amount of the resources does not exceed the specified value (NO in step S709), the processing proceeds to step S505. In step S505, the application management framework302executes reactivation processing of the UI application.

<End Processing of UI Application>

Subsequently, end processing of an application will be described with reference toFIGS. 6, 8A, and 8B.

In the end processing in step S710of the second exemplary embodiment, end of the UI application is determined in the started state604, so that the UI application shifts to the uninstalled state606via the state under stop processing605and the stopped state602.

The stop processing that executed when end of the UI application is determined in the started state604will be described with reference toFIGS. 8A and 8B.FIG. 8Ais a diagram schematically illustrating notifications transmitted between the application management framework302, the UI control module303, and the UI application-A101.

First, when end processing of the UI application is started, in step n801, the application management framework302transmits information about the UI application-A101as a target of the end processing and a notification about ending of the UI application-A101to the UI control module303.

Then, in step n802, the application management framework302instructs the UI application-A101as an end processing target to execute stop processing.

In step n802, the UI application-A101as an end processing target receives the instruction of the stop processing. In step n803, the UI application-A101transmits a request of UI display deletion processing to the UI control module303.

The UI control module303receives the request of UI display deletion processing from the UI application-A101and updates the UI registration table811illustrated inFIG. 8Bbased on the information transmitted from the application management framework302. The UI display is deleted when the UI registration table811is updated.

In step n804, the UI control module303saves the installed package to another area.

The UI registration table811illustrated inFIG. 8Bis managed by the UI control module303. In the table, an icon ID of the application, an application ID, and a state of each application are associated with each other.

Then, in the saving processing in step n804, the UI control module303changes a state813of the information about the UI application-A101(test-uiap-apli) to “Hold” without deleting the information from the UI registration table811. Then, in step n805, the UI control module303returns a notification of completion of deletion processing to the UI application-A101.

In step n806, the UI application-A101notifies the application management framework302about completion of the stop processing.

Then, the application management framework302shifts the UI application-A101to the stopped state602, and executes uninstall processing of the UI application-A101to shift the UI application-A101to the uninstalled state606.

At this time, although the internal state of the application management framework302is brought into a state where the UI application-A101is not installed, the UI is brought into a state (“Hold” state) where the icon is registered thereon.

Next, processing to be executed when an icon of the UI application-A101displayed on the UI panel display unit201is pressed in the above state will be described.

When the UI control module303detects a press of the icon on the UI panel display unit201, the UI control module303acquires an ID of the pressed icon and refers to the UI registration table811.

If an ID of the icon is already registered in the UI registration table811, the UI control module303notifies the application management framework302of execution of the corresponding application and loads the UI of that application.

If the state813of the ID of the icon is registered as “Hold” in the UI registration table811, the UI control module303notifies the application management framework302about a path “/Tmp/UI-App/-01.nlm” of a package of the saved application. Then, the application management framework302starts install processing of the corresponding UI application.

Therefore, the application management framework302shifts the UI application-A101to the started state604via the installed state601, the stopped state602, and the state under start processing603, and loads the UI of the UI application-A101.

In addition, because the UI display registration processing with respect to the UI control module303has already been executed by the UI application-A101in the state under start processing603, only the content of the state813described in the UI registration table811is updated.

As described above, by executing the end processing instead of the reactivation processing, the UI application determined to be ended is uninstalled, so that the resources to be used for staring the UI application can remain unconsumed.

Further, in the present exemplary embodiment, time taken for activation is restricted within the allowable time, and end processing is executed when it is determined that the resources of the image forming apparatus100is decreased. In this way, the usability can be prevented from being lowered considerably.

In a third exemplary embodiment, another processing of the application management framework302will be described with reference toFIG. 9.

In the example described in the first and the second exemplary embodiments, in a case where a declaration of rejecting clear execution is not made by the application when end of the application is detected, the resources consumed by the application is released by executing the reactivation processing or the end processing.

However, for example, if the end processing is executed, considerable amount of time will be required for activating the application. With respect to the application frequently activated by the user, time taken for activating the application is accumulated, and thus usability thereof may be lowered.

In a third exemplary embodiment described below, with respect to the frequently activated application, the end processing and reactivation processing will not be executed promptly, and the application is held in a started state for a predetermined time based on a usage interval of the application. Because the application can be promptly used when the user wishes to use the application again, lowering of the usability can be prevented. Then, in a case where a use interval of the application exceeds predetermined time, the resources held by the application can be released by executing the end processing or the reactivation processing.

The processing illustrated in this flowchart is realized by the CPU by executing the application management framework302, which is a program according to an embodiment.

First, in step S901, the UI control module303executed by the CPU detects the end of use of the application.

In step S902, the CPU starts a timer to start measuring elapsed time K from use-end time point of the application.

In step S903, the application management framework302acquires the previous end time point of the application from a log.

Then, in step S904, the application management framework302acquires the latest activation time point of the application, and calculates and acquires elapsed time A from the previous end time point to the latest activation time point of the application. The elapsed time A represents the use interval of the application.

Then, the application management framework302compares the elapsed time K from detection of the end of the application and the elapsed time A. In step S905, if the elapsed time K exceeds the elapsed time A (YES in step S905), the processing proceeds to step S906. In step S906, the application management framework302executes the above-described reactivation processing of the application. At this time, as described in the second exemplary embodiment, depending on the activation time of the application and the state of the resources in the image forming apparatus100, the application management framework302may determine to execute the end processing of the application instead of executing the reactivation processing.

Further, in the present exemplary embodiment, the elapsed time K from the end of the application is acquired by using a timer. However, the elapsed time K may be acquired by referring to the use-end time point of the application and the current time.

In the first and the second exemplary embodiments, when the end of the application is detected, reactivation processing or end processing is executed promptly. However, it will take considerable time to execute an application after executing the reactivation processing or the end processing. Therefore, the user has to wait if the application is used consecutively, and thus the usability will be deteriorated. However, by executing the processing described in the third exemplary embodiment, the usability can be prevented from being deteriorated.

Processing executed by the application management framework302of a fourth exemplary embodiment will be described with reference toFIG. 10.

In the third exemplary embodiment, a started state of the UI application is retained for a predetermined time before the reactivation processing or the end processing is executed. However, for example, there is a case where the UI application is activated through an operation error in which the user activates the UI application unintentionally. In such a case, if a started state is retained for a predetermined time before the reactivation processing or the end processing is executed as described in the third exemplary embodiment, the resources may be unintentionally occupied by the unnecessary application. In the processing described in a fourth exemplary embodiment, the application activated by the erroneous operation can be promptly ended through detection of unintended user operation.

The processing illustrated in this flowchart is realized by the CPU by executing the application management framework302, which is a program according to an embodiment.

In this flowchart, firstly, similar to the processing in step S501inFIG. 5, in step S1001, the UI control module303detects activation of the UI application.

Then, in step S1002, the UI control module303determines whether user operation is performed with respect to the UI application. If user operation is performed (YES in step S1002), the flowchart is ended without executing any processing.

On the other hand, if user operation is not performed (NO in step S1002), the processing proceeds to step S1003. In step S1003, the CPU stands ready until a shift of the screen is detected. If a shift of the screen is detected (YES in step S1003), the processing proceeds to step S1004.

In step S1004, the UI control module303acquires UI display time of the UI application, and determines whether the UI display time exceeds a specified time (threshold value). If the UI display time of the UI application is the specified time or more (YES in step S1004), the processing is ended.

On the other hand, if the UI display time of the UI application is less than the specified time (NO in step S1004), the CPU determines the activation of the UI application as unnecessarily activation caused by an operation error of the user, so that the processing proceeds to step S1005.

In step S1005, the application management framework302executes reactivation processing of the UI application and ends the processing of this flowchart. In addition, the end processing of the UI application may be executed as described in the second exemplary embodiment instead of executing the reactivation processing.

As described above, according to the present exemplary embodiment, it is possible to prevent consumption of the resources caused by continuous activation of the UI application that is not necessary for the user.

Through the above-described exemplary embodiment, it is possible to manage the application to reduce the consumption of the internal resources of the information processing apparatus without deleting the application.

Further, the resources can be retrieved by making the resources continuously held by the application as a releasing target without deteriorating the usability of the information processing apparatus.

Other Embodiments

This application claims the benefit of Japanese Patent Application No. 2017-058461, filed Mar. 24, 2017, which is hereby incorporated by reference herein in its entirety.