CN106708558B - Method and device for closing application program - Google Patents

Method and device for closing application program Download PDF

Info

Publication number
CN106708558B
CN106708558B CN201610978044.0A CN201610978044A CN106708558B CN 106708558 B CN106708558 B CN 106708558B CN 201610978044 A CN201610978044 A CN 201610978044A CN 106708558 B CN106708558 B CN 106708558B
Authority
CN
China
Prior art keywords
closing
button
application program
program
operation window
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.)
Active
Application number
CN201610978044.0A
Other languages
Chinese (zh)
Other versions
CN106708558A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610978044.0A priority Critical patent/CN106708558B/en
Publication of CN106708558A publication Critical patent/CN106708558A/en
Application granted granted Critical
Publication of CN106708558B publication Critical patent/CN106708558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

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)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to a method and a device for closing an application program, wherein the method comprises the following steps: acquiring window change monitoring authority and simulation operation authority for a system program through an auxiliary function service code; the system program has the authority of closing the application program; controlling the system program to enter an operation window for closing the application program; monitoring the window change of the system program; when the system program is monitored to enter the operation window, positioning a closing button used for closing the application program in the operation window; performing simulation operation on the closing button in the operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program. According to the method and the device for closing the application program, the application program can be closed without cracking the operating system, and potential safety hazards caused by cracking the operating system can be avoided.

Description

Method and device for closing application program
Technical Field
The present invention relates to the field of terminal application technologies, and in particular, to a method and an apparatus for closing an application.
Background
With the continuous upgrade of terminal configuration and the continuous innovation of each application program developer, the terminal can support massive application programs, such as a photographing program, a game program, a social program or an office program. Although the hardware performance of the terminal is continuously improved, it is still difficult to meet the user requirement. When the number of the application programs running on the terminal exceeds a certain number, the terminal can be blocked or even halted, and the normal use of the terminal can be influenced. There are currently some tool software by which running applications can be closed.
However, the current implementation of tool software to close the application requires the operating system to open the right to close the application to the tool software. In consideration of safety, the current operating system generally cannot open the permission of closing the application program to the tool software, and a user needs to crack the operating system, so that potential safety hazards exist in the operating system.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for closing an application program, aiming at the problem of potential safety hazard caused by the fact that the operating system needs to be cracked when the application program is closed by the current tool software.
A method of closing an application, comprising:
acquiring window change monitoring authority and simulation operation authority for a system program through an auxiliary function service code; the system program has the authority of closing the application program;
controlling the system program to enter an operation window for closing the application program;
monitoring the window change of the system program;
when the system program is monitored to enter the operation window, positioning a closing button used for closing the application program in the operation window;
performing simulation operation on the closing button in the operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program.
An apparatus for closing an application, comprising:
the authority acquisition module is used for acquiring window change monitoring authority and simulation operation authority for the system program through the auxiliary function service code; the system program has the authority of closing the application program;
the system program control module is used for controlling the system program to enter an operation window for closing the application program;
the window monitoring module is used for monitoring the window change of the system program;
a closing button positioning module, configured to position a closing button used for closing the application program in the operation window when it is monitored that the system program enters the operation window;
the simulation operation module is used for performing simulation operation on the closing button in the operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program.
According to the method and the device for closing the application program, the window change monitoring authority and the simulation operation authority of the system program are obtained through the auxiliary function service code, and the operation window displayed by the system program can be monitored by monitoring the window change of the system program. The system program has the permission of closing the application program, a closing button for closing the application program is positioned in the operation window, and the closing button is simulated to realize the closing of the application program by means of the system program with the permission of closing the application program. Because the auxiliary function service is a service supported by the operating system, the closing of the application program can be realized without cracking the operating system, and the potential safety hazard caused by cracking the operating system can be avoided.
Drawings
FIG. 1 is a diagram of an application environment for a system to close an application in one embodiment;
fig. 2 is a schematic diagram of the internal structure of the terminal in one embodiment;
FIG. 3 is a flow diagram that illustrates a method for closing an application, according to one embodiment;
FIG. 4 is a diagram of an operating window in one embodiment;
FIG. 5 is a flowchart illustrating steps for guiding a user to open accessibility service codes in one embodiment;
FIG. 6 is one of the operation guidance information display interfaces in one embodiment;
FIG. 7 is a second exemplary embodiment of an operation guidance information display interface;
FIG. 8 is a flowchart illustrating steps in one embodiment for controlling a system program to enter an operating window for closing an application program one by one;
FIG. 9 is a flowchart illustrating steps in one embodiment for displaying progress of application shutdown in a cover layer;
FIG. 10 is a schematic interface diagram of the facility software in one embodiment;
FIG. 11 is one illustration of a masking layer in one embodiment;
FIG. 12 is a second schematic view of an exemplary masking layer;
FIG. 13 is a flowchart illustrating steps for adaptively obtaining off button positioning configuration information in one embodiment;
FIG. 14 is a flowchart illustrating steps taken in one embodiment to obtain close button location configuration information and locate a button in an operating window for closing an application based on the close button location configuration information;
FIG. 15 is a flowchart illustrating a method for closing an application in accordance with another embodiment;
FIG. 16 is a block diagram showing the structure of an apparatus for closing an application in one embodiment;
fig. 17 is a block diagram showing the structure of an apparatus for closing an application program according to another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
FIG. 1 is a diagram of an application environment for a system to close an application in one embodiment. Referring to fig. 1, the system includes a terminal 110 and a server 120. The terminal 110 may be configured to obtain a window change monitoring authority and a simulation operation authority for the system program through the auxiliary function service code; the system program has the authority to close the application program. The terminal 110 may be configured to obtain the close button positioning configuration information from the server 120, and position a button for closing the application in the operation window according to the close button positioning configuration information. The terminal 110 may be used to control the system program to enter an operation window for closing the application program; and monitoring the window change of the system program. When it is monitored that the system program enters the operation window, the terminal 110 may be configured to locate a button for closing the application program in the operation window according to the closing button location configuration information; carrying out simulation operation on a closing button in an operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program.
Fig. 2 is a schematic diagram of an internal structure of the terminal 110 in one embodiment. Referring to fig. 2, the terminal includes a processor, a non-volatile storage medium, an internal memory, a network interface, a display screen, and an input device, which are connected through a system bus. The non-volatile storage medium of the terminal stores an operating system and also stores a device for closing the application program, and the device for closing the application program is used for realizing a method for closing the application program. The processor of the terminal is used to provide computing and control capabilities to support the operation of the entire terminal. The internal memory in the terminal provides an environment for the operation of the device for closing the application program in the nonvolatile storage medium. The internal memory may have computer readable instructions stored therein which, when executed by the processor, may cause the processor to perform a method of shutting down an application. The network interface of the terminal is used for carrying out network communication with the server, such as downloading the positioning configuration information of the closing button. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the terminal, an external keyboard, a touch pad or a mouse and the like. The terminal may be a personal computer or a mobile terminal, such as a mobile phone, a tablet computer, a personal digital assistant, or a wearable device. Those skilled in the art will appreciate that the configuration shown in fig. 2 is a block diagram of only a portion of the configuration associated with the present application and does not constitute a limitation on the terminal to which the present application is applied, and that a particular terminal may include more or less components than those shown in fig. 2, or may combine certain components, or have a different arrangement of components.
FIG. 3 is a flowchart illustrating a method for closing an application according to an embodiment. The embodiment is exemplified by applying the method to the terminal 110 in the system for closing the application program in fig. 1. In this embodiment, the terminal may run an operating system, and may run tool software, an application program, and a system program in an environment provided by the operating system. The tool software is used for executing a method for closing the application program, and the system program has the authority of closing the application program. Referring to fig. 3, the method for closing the application specifically includes the following steps:
s302, acquiring window change monitoring authority and simulation operation authority for a system program through an auxiliary function service code; the system program has the authority to close the application program.
Among them, the Accessibility Service (Accessibility Service) is a Service provided by the operating system to assist the terminal to use the terminal by the disabled person. The person with the terminal use disorder is a person with certain disorder in using the terminal, such as a person with inconvenient movement and poor eyesight or hearing. The auxiliary function service code is a custom code compiled according to the coding standard of the auxiliary function service.
An Operating System (OS) is a computer program for managing and controlling hardware and software resources of a terminal, and is the most basic System software directly running on a bare computer of the terminal, and an application program needs to run under the support of the Operating System. The operating system may be a desktop operating system such as a Windows (Windows) operating system, a Linux operating system, or a Mac OS (apple desktop operating system), or may be a mobile terminal operating system such as an iOS (apple mobile terminal operating system) or an Android (Android) operating system.
Further, the window change monitoring right for the system program is a right for monitoring the window change of the system program, and the simulation operation right for the system program is a right for simulating user operation on the system program. The window change listening right and the simulation operation right may be directed only to the system program for closing the application program right or may be directed to a plurality of system programs including the system program for closing the application program right. The system program is a program built in the operating system. A system program with the right to close an application, such as a Settings (Settings) program or security software provided by the operating system.
Specifically, the terminal may register an auxiliary function service code in the operating system when installing the tool software, where the auxiliary function service code may inherit an auxiliary function service class provided by the operating system, and obtain a capability of receiving and processing an auxiliary function Event (access Event). The terminal can start an auxiliary function service process, and execute an auxiliary function service code in the auxiliary function service process, so that the auxiliary function service process obtains window change monitoring authority and simulation operation authority for the system program.
S304, the control system program enters an operation window for closing the application program.
Specifically, the system program may provide an application programming interface, and the terminal may control the system program to enter an operation window for closing the application program by calling the application programming interface provided by the system program. The operating window may correspond to a plurality of applications, and the operating window is used to close the corresponding plurality of applications. The operating windows may correspond to the applications to be closed one to one, and the operating windows are used for closing the applications in one to one correspondence. The terminal can specifically determine the application program identifier to be closed, so as to control the system program to display an operation window for closing the application program identified by the application program identifier.
In one embodiment, the terminal may control the system program such that the system program enters the operation window for closing the application program according to a menu path of the operation window in a menu structure of the system program. The terminal can perform simulation operation according to a menu path of the operation window in the menu structure of the system program through the auxiliary function service code, specifically, through an auxiliary function service process of operating the auxiliary function service code, so as to enter the operation window for closing the application program. The terminal may also directly call an application programming interface provided by the system program, for example, call the application programming interface provided by the system program through a background process created by the tool software, so as to enter the operation window according to a menu path of the operation window in a menu structure of the system program. The menu structure comprises menu levels and a level relation, and the menu path comprises options in each level of menu passed by the operation window.
S306, monitoring the window change of the system program.
Specifically, the terminal may monitor a window change of the system program through the auxiliary function service code, specifically, through an auxiliary function service process running the auxiliary function service code. After the auxiliary function service code is registered to the operating system, the operating system can actively provide a window change event of the system program to the running auxiliary function service code, and the window change event is received by the auxiliary function service code so as to monitor the window change of the system program.
S308, when the fact that the system program enters the operation window is monitored, a closing button used for closing the application program in the operation window is located.
Specifically, the operating system may trigger a corresponding auxiliary function event when the system program enters the operating window, and the terminal may monitor the auxiliary function event through the auxiliary function service code and locate a close button for closing the application program in the operating window. The terminal can also judge whether the monitored window entered by the system program is an operation window for closing the application program or not when the auxiliary function service code monitors that the window changes; if so, positioning a closing button for closing the application program in the operation window; if not, the monitoring is continued.
Further, the terminal may position a close button for closing the application in the operating window according to the close button identifier. The terminal can also position a closing button for closing the application program in the operation window according to the sequencing position of the closing button in the interface element structure of the operation window. The terminal can also position a close button for closing the application in the operating window according to the close button character. Wherein the close button is a button for closing the application. The close button character is a character displayed by the close button to describe the function of the close button. In different versions and/or different language types of operating systems, there may be differences in the close button characters, such as "Force Stop", or "Force Stop". The operation window may further include various attributes of the application, such as an icon, a function description, and a name of the application.
S310, simulating the closing button in the operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program.
The simulation operation is an operation for simulating a user behavior, specifically, a click operation, a long-time press operation, or a drag operation. And simulating a click operation, such as simulating a cursor click operation or simulating a single-point touch click operation. The simulated operation is matched with the close button. And when the system program detects the simulation operation, executing the operation of closing the application program.
For example, referring to fig. 4, an operation window of a system program corresponding to an application program is shown in fig. 4, and the operation window is covered by a cover layer when the cover layer is displayed and cannot be seen by a user. The operation window has a close button 402 therein, and the close button character of the close button 402 is "force stop". The tool software performs simulated clicking on the close button 402, so that the system program closes the application program corresponding to the operating window.
According to the method for closing the application program, the window change monitoring authority and the simulation operation authority of the system program are obtained through the auxiliary function service code, and the operation window displayed by the system program can be monitored by monitoring the window change of the system program. The system program has the permission of closing the application program, a closing button for closing the application program is positioned in the operation window, and the closing button is simulated to realize the closing of the application program by means of the system program with the permission of closing the application program. Because the auxiliary function service is a service supported by the operating system, the closing of the application program can be realized without cracking the operating system, and the potential safety hazard caused by cracking the operating system can be avoided.
In one embodiment, the method for closing the application program further comprises the step of guiding the user to open the auxiliary function service code. Referring to fig. 5, the step of guiding the user to open the auxiliary function service code specifically includes the following steps:
s502, displaying operation guide information; the operation guide information is used for guiding a user to start an auxiliary function service switch registered by tool software in an auxiliary function service management interface provided by the operating system.
The operation guide information is used for guiding a user to start the auxiliary function service switch. The operation guidance information may include at least one of text, pictures, and moving images. The auxiliary function service switch is positioned in the auxiliary function service management interface and used for controlling whether the auxiliary function service code is started or not. The auxiliary function service management interface is used for carrying out centralized management on various auxiliary function service codes. The terminal can register the corresponding auxiliary function service code to the operating system when the tool software is installed, so that the operating system adds a corresponding auxiliary function service switch in the auxiliary function service management interface.
S504, when an auxiliary function service switch registered by the tool software in an auxiliary function service management interface provided by the operating system is turned on, the auxiliary function service code is run.
Specifically, the terminal detects whether an auxiliary function service switch registered by the tool software in the auxiliary function service management interface is turned on through the operating system, and if the auxiliary function service switch is turned on, the tool software obtains the authority of operating the auxiliary function service code, so that the auxiliary function service code is operated.
For example, referring to fig. 6, the terminal may provide operation guidance information for guiding entry into the service management interface of the auxiliary function, and then, referring to fig. 7, further provide operation guidance information for turning on a service switch of the auxiliary function in the service management interface of the auxiliary function.
In the embodiment, the operation guide information is displayed, so that the user can be conveniently and quickly guided to know the condition for using the auxiliary function service code, and the user is guided to start the auxiliary function service code, and the operation convenience is improved.
In one embodiment, step S304 further includes the step of controlling the system program to enter the operation window for closing the application program one by one. Referring to fig. 8, the step of the control system program entering the operation windows for closing the application programs one by one specifically includes the following steps:
s802, acquiring an application program identification set to be closed.
The application program identification set to be closed is a set formed by the identifications of the application programs needing to be closed. Specifically, the terminal may query the identifier of the application program currently in the background running state and unlocked, so as to form the set of identifiers of the application program to be closed. The terminal can also select an application program identifier from the identifiers of the application programs in the background running state according to a user selection instruction so as to form an application program identifier set to be closed.
S804, traversing the application program identifications in the application program identification set.
Specifically, the terminal may sort the application identifiers in the application identifier set according to a preset sorting manner, so as to traverse the sorted application identifiers one by one. The terminal may further randomly extract one application identifier from the set of application identifiers at a time and perform step S806 until the set of application identifiers is empty.
S806, the control system program sequentially enters an operation window for closing the application program identified by the traversed application program identification.
Specifically, the terminal may control the system program to sequentially enter an operation window corresponding to the application identifier according to the currently traversed application identifier, where the operation window is used to close the application identified by the application identifier. After executing step S310, the terminal may return to step S804 to perform traversal until all the application identifiers in the application identifier set are traversed.
In the embodiment, the operating window of each application program can be entered one by means of the system program, the application programs are closed in batches, and the efficiency of closing the application programs is improved.
In one embodiment, the method for closing the application further comprises: when the control system program enters an operation window for closing the application program, the window change of the monitoring system program, a closing button for closing the application program in the operation window is positioned, and the closing button in the operation window is subjected to simulation operation, the covering layer is displayed.
Wherein, the cover layer is a layer directly facing to the user for display. The cover layer can cover window changes of the system program, an operation window and simulated operation of a closing button in the operation window. The cover layer may be implemented with a floating window. The cover layer may be provided and managed by an interface process created by the tool software. The interface process may be a different process than the background process.
In the embodiment, the whole process of closing the application program by the aid of the system program is hidden for the user through the covering layer, the user is prevented from being disturbed by the change of the system program window and the simulation operation of the closing button in the operation window, and the operation convenience is improved.
In one embodiment, the method of closing an application further comprises the step of displaying progress of closing the application in the cover layer. Referring to fig. 9, the step of displaying the closing progress of the application program in the cover layer specifically includes the following steps:
s902, when the control system program enters the operation window for closing the application program, when the window of the monitoring system program changes, when the closing button for closing the application program in the operation window is positioned, and when the closing button in the operation window is subjected to simulation operation, the cover layer is displayed.
And S904, acquiring the total number of the applications needing to be closed and the number of the closed applications.
The total number of the applications to be closed is the total number of the applications to be closed, and the number of the applications to be closed is the number of the applications that have been closed in the applications to be closed currently.
And S906, calculating the closing progress of the application programs according to the total number of the application programs needing to be closed and the number of the closed application programs.
The closing progress of the application program can be represented by the ratio of the number of the closed application programs to the total number of the application programs needing to be closed. The application closing progress can also be represented by a ratio of the number of applications not closed to the total number of applications to be closed, and the number of applications not closed is equal to the difference between the total number of applications to be closed and the number of applications closed.
And S908, displaying the closing progress of the application program in the cover layer.
Further, the terminal may also display an icon of the application being closed in the cover layer. Resource data saved by the closed application may also be displayed in the overlay.
For example, referring to fig. 10, the terminal may display an interface through the utility software, on which a start button 1001 is displayed. The terminal can also collect the number of the application programs in the background running state at present as the total number of the application programs needing to be closed and display the application programs in the covering layer, and can also collect performance data caused by the application programs in the background running state and display the performance data in the covering layer. When the terminal detects the triggering operation of the start button 1001 through the tool software, the terminal displays the cover layer, controls the system program to enter an operation window for closing the application program under the cover of the cover layer, monitors the window change of the system program, positions a close button for closing the application program in the operation window when the system program is monitored to enter the operation window, and performs simulation operation on the close button in the operation window. Referring to fig. 11, the terminal may also show an icon of an application closing progress and an application being closed in the cover layer. Referring to fig. 12, when all the applications that need to be closed are closed, the terminal may display a prompt indicating that the task of closing the applications has been completed in the cover layer, and may also display resource data saved by the closed applications in the cover layer.
In this embodiment, the application closing progress is displayed in the cover layer, so that a user can intuitively know the progress of closing the application, the process of closing the application can be quantized and expected, and the user can conveniently know the progress of closing the application in time.
In one embodiment, the method for closing the application further comprises: a step of adaptively acquiring the off button positioning configuration information, and step S308 includes: and positioning a button for closing the application program in the operation window according to the closing button positioning configuration information.
As shown in fig. 13, the step of adaptively acquiring the off button positioning configuration information specifically includes:
s1302, local operating system information is acquired.
The operating system information may include a terminal model and/or an operating system version identifier, and the operating system information may further include a language type. The operating systems adopted by terminals of the same terminal model are usually the same or only slightly different, and therefore can be used as operating system information.
S1304, sends the operating system information to the server.
And S1306, receiving the closing button positioning configuration information matched with the operating system information fed back by the server.
Specifically, the server stores the adaptation relationship between the operating system information and the closing button positioning configuration information, and after receiving the operating system information, the server searches the matched closing button positioning configuration information according to the adaptation relationship and sends the closing button positioning configuration information to the terminal. Further, after receiving the closing button positioning configuration information fed back by the server, the terminal positions the closing button in the operation window according to the configuration information in the closing button positioning configuration information. Wherein the close button positioning configuration information is configuration information on which the close button in the positioning operation window depends.
In this embodiment, the closing button positioning configuration information may be obtained in a self-adaptive manner according to the operating system information, and the closing button may be positioned according to the closing button positioning configuration information.
In one embodiment, the method for closing the application program further comprises the steps of acquiring the closing button positioning configuration information, and positioning a button for closing the application program in the operation window according to the closing button positioning configuration information. As shown in fig. 14, the step of acquiring the close button positioning configuration information and positioning the button for closing the application program in the operation window according to the close button positioning configuration information specifically includes the following steps:
s1402, obtaining the positioning configuration information of the closing button; the close button positioning configuration information comprises a close button identification, a sequencing position of a close button in an interface element structure of the operation window and a close button character set.
Wherein the close button identification is a string uniquely identifying the close button. The interface elements including the close button in the operation window are structured and organized into an interface element structure, such as a tree structure, and the close button has a unique sorting position in the interface element structure. The close button character set is a set of possible close button characters.
And S1404, positioning a closing button for closing the application program in the operation window according to the closing button identification.
Specifically, the terminal can search the interface element identified by the closing button identifier in the interface element structure of the operation window through tool software; if the user finds the interface element, the positioning of the closing button is successful, and the interface element marked by the closing button mark is used as the closing button; if not, go on to step S1406. If the interface element structure is a tree structure, the root node of the interface element structure comprises the identifier of each interface element, so that the interface element identified by the identifier of the close button is searched from the root node.
S1406, if the positioning of the close button according to the close button identifier fails, positioning a close button for closing the application program in the operation window according to the sequencing position of the close button in the interface element structure of the operation window.
Specifically, the terminal can obtain the interface element structure of the operation window through tool software, and search the corresponding interface element in the interface element structure of the operation window according to the sequencing position of the closing button in the interface element structure of the operation window; if the found interface element is found, the closing button is positioned successfully, and the found interface element is used as the closing button; if not, go to step S1408. If the interface element structure is a tree structure, the root node of the interface element structure comprises the sequencing record of each interface element, and the terminal can search the corresponding interface element from the root node according to the sequencing position of the closing button in the interface element structure of the operation window. Whether the positioning of the closing button fails can be judged by judging whether a return value corresponding to the closing button is generated or not when the simulation operation is acted on the searched interface element.
S1408, if the positioning of the close button according to the sort position of the close button in the interface element structure of the operation window fails, then the close button having the button character included in the close button character set is positioned in the operation window.
In particular, the terminal may compare the characters of each interface element in the interface element structure of the operating window to the close button characters in the close button character set. And if the close button character set has a close button character matched with the interface element in the interface element structure, taking the interface element in the interface element structure matched with the matched close button character as a close button. If the interface element structure is a tree structure, the child nodes of the interface element structure represent each interface element in the operation window, and the terminal can traverse each child node of the interface element structure to compare with the close button characters in the close button character set in sequence. Whether the positioning of the closing button fails can be judged by judging whether a return value corresponding to the closing button is generated or not when the simulation operation is acted on the searched interface element.
Further, if a close button character matching the interface element in the interface element structure does not exist in the close button character set, the server may be notified to perform manual analysis. And when the server is informed to perform manual analysis, the server stores the positioning configuration information of the closing button determined by the manual analysis.
In the embodiment, a plurality of modes are provided for positioning the closing button for closing the application program in the operation window, and when one mode cannot be positioned, other modes can be tried for positioning, so that the fault-tolerant capability is high.
In one embodiment, the method further comprises: if the button character contained in the operation window is successfully positioned and the closing button contained in the closing button character set is successfully closed, extracting the closing button identification and the sequencing position of the closing button in the button sequence of the operation window in the operation window; and updating the closing button positioning configuration information according to the extracted closing button identification and the sequencing position of the closing button in the button sequence of the operation window.
Specifically, whether the positioning of the close button fails can be determined by whether a return value corresponding to the close button is generated when the simulation operation is applied to the searched interface element. Positioning the close button succeeds, but the close button identification in the close button positioning configuration information and the sorting position of the close button in the button sequence of the operation window are wrong, wherein the close button positioning configuration information is updated by using the close button identification of the positioned close button and the sorting position thereof in the button sequence of the operation window. The terminal can specifically report the extracted closing button identification and the sequencing position of the closing button in the button sequence of the operation window to the server, and the server updates the corresponding closing button positioning configuration information. The server can specifically update the closing button positioning configuration information corresponding to each voice type of the operating system with the same version.
In the embodiment, after the button is successfully closed through the button character set positioning, the button closing positioning configuration information is updated, so that the button closing identifier and the sequencing position of the button closing in the button sequence of the operation window can be directly utilized for positioning in the subsequent button closing positioning process, and the processing efficiency is improved.
As shown in fig. 15, in an embodiment, the method for closing the application specifically includes the following steps:
s1502, displaying operation guidance information; the operation guide information is used for guiding a user to start an auxiliary function service switch registered by tool software in an auxiliary function service management interface provided by the operating system.
S1504, when an auxiliary function service switch registered by the tool software in an auxiliary function service management interface provided by the operating system is turned on, operating an auxiliary function service code.
S1506, acquiring window change monitoring authority and simulation operation authority for the system program through the auxiliary function service code; the system program has the authority to close the application program.
S1508, local operating system information is obtained; sending operating system information to a server; receiving closing button positioning configuration information which is fed back by a server and is adaptive to operating system information; the close button positioning configuration information comprises a close button identification, a sequencing position of a close button in an interface element structure of the operation window and a close button character set.
S1510, acquiring an application program identifier set to be closed; traversing the application program identifiers in the application program identifier set; the control system program sequentially enters an operating window for closing the application program identified by the traversed application program identification.
S1512, monitoring the window change of the system program.
And S1514, when it is monitored that the system program enters the operation window, positioning a closing button for closing the application program in the operation window according to the closing button identifier. If the positioning is successful, step S1520 is executed, and if the positioning is failed, step S1516 is executed.
S1516, positioning a close button for closing the application program in the operation window according to the sequencing position of the close button in the interface element structure of the operation window. If the positioning is successful, step S1520 is executed, and if the positioning is failed, step S1518 is executed.
S1518, according to the close button positioning configuration information, positioning the button for closing the application program in the operation window. If the positioning is successful, step S1520 is executed, and if the positioning is failed, the server is notified to perform manual analysis.
S1520, carrying out simulation operation on a closing button in the operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program.
S1522, if the positioning of the close button having the button character included in the close button character set in the operation window is successful, extracting the close button identifier and the sort position of the close button in the button sequence of the operation window in the operation window.
S1524, sending the extracted close button identifier and the sorted position of the close button in the button sequence of the operation window to the server, so that the server updates the close button positioning configuration information.
According to the method for closing the application program, the window change monitoring authority and the simulation operation authority of the system program are obtained through the auxiliary function service code, and the operation window displayed by the system program can be monitored by monitoring the window change of the system program. The system program has the permission of closing the application program, a closing button for closing the application program is positioned in the operation window, and the closing button is simulated to realize the closing of the application program by means of the system program with the permission of closing the application program. Because the auxiliary function service is a service supported by the operating system, the closing of the application program can be realized without cracking the operating system, and the potential safety hazard caused by cracking the operating system can be avoided.
FIG. 16 is a block diagram of an apparatus 1600 for closing an application in one embodiment. Referring to fig. 16, the apparatus 1600 for closing an application includes: the system comprises a right acquisition module 1601, a system program control module 1602, a window monitoring module 1603, a close button positioning module 1604 and a simulation operation module 1605.
The authority acquisition module 1601 is used for acquiring window change monitoring authority and simulation operation authority for the system program through the auxiliary function service code; the system program has the authority to close the application program.
A system program control module 1602, configured to control the system program to enter an operation window for closing the application program.
A window monitoring module 1603, configured to monitor a window change of the system program.
And a close button positioning module 1604, configured to position a close button for closing the application in the operating window when it is monitored that the system program enters the operating window.
A simulation operation module 1605, configured to perform simulation operation on the close button in the operation window; the simulation operation is used for triggering the system program to execute the operation of closing the application program.
The device 1600 for closing the application program obtains the window change monitoring authority and the simulation operation authority for the system program through the auxiliary function service code, and can monitor the operation window displayed by the system program by monitoring the window change of the system program. The system program has the permission of closing the application program, a closing button for closing the application program is positioned in the operation window, and the closing button is simulated to realize the closing of the application program by means of the system program with the permission of closing the application program. Because the auxiliary function service is a service supported by the operating system, the closing of the application program can be realized without cracking the operating system, and the potential safety hazard caused by cracking the operating system can be avoided.
As shown in fig. 17, in one embodiment, the apparatus 1600 for closing the application further comprises: an operation guidance information display module 1606 and an auxiliary function service code execution module 1607.
An operation guidance information display module 1606 for displaying operation guidance information; the operation guide information is used for guiding a user to start an auxiliary function service switch registered by tool software in an auxiliary function service management interface provided by the operating system.
An auxiliary function service code running module 1607, configured to run the auxiliary function service code when an auxiliary function service switch registered by the tool software in an auxiliary function service management interface provided by the operating system is turned on.
In the embodiment, the operation guide information is displayed, so that the user can be conveniently and quickly guided to know the condition for using the auxiliary function service code, and the user is guided to start the auxiliary function service code, and the operation convenience is improved.
In one embodiment, the system program control module 1602 is further configured to obtain a set of identifiers of applications to be closed; traversing the application program identifiers in the application program identifier set; the control system program sequentially enters an operating window for closing the application program identified by the traversed application program identification.
In the embodiment, the operating window of each application program can be entered one by means of the system program, the application programs are closed in batches, and the efficiency of closing the application programs is improved.
In one embodiment, the apparatus 1600 for closing an application further comprises: the cover layer management module 1608 is configured to display a cover layer when the control system program enters the operation window for closing the application program, when the window of the monitoring system program changes, when a close button for closing the application program in the operation window is located, and when a simulated operation is performed on the close button in the operation window.
In the embodiment, the whole process of closing the application program by the aid of the system program is hidden for the user through the covering layer, the user is prevented from being disturbed by the change of the system program window and the simulation operation of the closing button in the operation window, and the operation convenience is improved.
In one embodiment, the cover layer management module 1608 is further configured to obtain a total number of applications to be closed and a number of applications that have been closed; calculating the closing progress of the application programs according to the total number of the application programs needing to be closed and the number of the closed application programs; and displaying the closing progress of the application program in the cover layer.
In this embodiment, the application closing progress is displayed in the cover layer, so that a user can intuitively know the progress of closing the application, the process of closing the application can be quantized and expected, and the user can conveniently know the progress of closing the application in time.
In one embodiment, the apparatus 1600 for closing an application further comprises: a closing button positioning configuration information adaptation module 1609 for acquiring local operating system information; sending operating system information to a server; and receiving the closing button positioning configuration information which is fed back by the server and is matched with the operating system information.
The close button location module 1604 is further configured to locate a button in the operating window for closing the application according to the close button location configuration information.
In the embodiment, the closing button positioning configuration information can be acquired in a self-adaptive manner according to the operating system information, and the closing button is positioned according to the closing button positioning configuration information, so that the method is more universal.
In one embodiment, the close button location module 1604 is further configured to obtain close button location configuration information; the closing button positioning configuration information comprises a closing button identifier, a sequencing position of a closing button in an interface element structure of the operation window and a closing button character set; and if the positioning fails, positioning a closing button which is used for closing the application program in the operation window according to the sequencing position of the closing button in the interface element structure of the operation window, and if the positioning fails, positioning the closing button which is provided with the button character and included in the closing button character set in the operation window.
In the embodiment, a plurality of modes are provided for positioning the closing button for closing the application program in the operation window, and when one mode cannot be positioned, other modes can be tried for positioning, so that the fault-tolerant capability is high.
In one embodiment, the apparatus 1600 for closing an application further comprises: a reporting module 1610, configured to, if the positioning of the close button in the operation window, where the button character includes in the close button character set, succeeds, extract, in the operation window, the close button identifier and the sorting position of the close button in the button sequence of the operation window; and updating the closing button positioning configuration information according to the extracted closing button identification and the sequencing position of the closing button in the button sequence of the operation window.
In the embodiment, after the button is successfully closed through the button character set positioning, the button closing positioning configuration information is updated, so that the button closing identifier and the sequencing position of the button closing in the button sequence of the operation window can be directly utilized for positioning in the subsequent button closing positioning process, and the processing efficiency is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), or the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only show some embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A method of closing an application, comprising:
acquiring window change monitoring authority and simulation operation authority for a system program through an auxiliary function service code; the system program is a program built in an operating system and has the authority of closing the application program;
displaying a cover layer directly facing to a user, and controlling the system program to enter an operation window for closing the application program under the cover layer; wherein the controlling the system program to enter an operation window for closing an application program comprises: controlling the system program to enable the system program to enter an operation window for closing the application program according to a menu path of the operation window in a menu structure of the system program; the menu structure comprises menu hierarchies and hierarchical relations, and the menu path comprises options in each layer of menu through which an operation window passes;
monitoring window change of the system program under the cover layer;
when the system program is monitored to enter the operation window, positioning a closing button used for closing the application program in the operation window under the cover layer;
performing simulated operation on the closing button in the operation window under the cover layer; the simulation operation is used for triggering the system program to execute the operation of closing the application program;
and acquiring the closing progress of the application program when the operation of closing the application program is executed, and displaying the closing progress of the application program in the cover layer.
2. The method of claim 1, further comprising:
displaying operation guide information; the operation guide information is used for guiding a user to start an auxiliary function service switch registered by tool software in an auxiliary function service management interface provided by an operating system;
and when an auxiliary function service switch registered by the tool software in an auxiliary function service management interface provided by the operating system is turned on, the auxiliary function service code is run.
3. The method of claim 1, wherein the step of controlling the system program to enter an operating window for closing an application program comprises:
acquiring an application program identifier set to be closed;
traversing the application program identifiers in the application program identifier set;
and controlling the system program to sequentially enter an operation window for closing the application program identified by the traversed application program identification.
4. The method according to claim 1, wherein the obtaining an application closing progress when performing an operation of closing the application comprises:
acquiring the total number of application programs needing to be closed and the number of closed application programs;
and calculating the closing progress of the application programs according to the total number of the application programs needing to be closed and the number of the closed application programs.
5. The method of claim 1, further comprising:
acquiring local operating system information;
sending the operating system information to a server;
receiving closing button positioning configuration information which is fed back by the server and is adaptive to the operating system information;
the step of positioning a close button for closing the application in the operation window comprises:
and positioning a button used for closing the application program in the operation window according to the closing button positioning configuration information.
6. The method of claim 1, wherein the step of positioning a close button in the operating window for closing the application comprises:
acquiring positioning configuration information of a closing button; the closing button positioning configuration information comprises a closing button identification, a sequencing position of a closing button in an interface element structure of the operation window and a closing button character set;
positioning a closing button used for closing the application program in the operation window according to the closing button identification; if the positioning fails, then
Positioning a closing button used for closing the application program in the operation window according to the sequencing position of the closing button in the interface element structure of the operation window; if the positioning fails, then
Positioning, in the operating window, a close button having a button character included in the close button character set.
7. The method of claim 6, further comprising:
if the button character included in the closing button character set is successfully positioned in the operation window, extracting a closing button identifier and a sorting position of the closing button in a button sequence of the operation window in the operation window;
and updating the closing button positioning configuration information according to the extracted closing button identification and the sequencing position of the closing button in the button sequence of the operation window.
8. An apparatus for closing an application, comprising:
the authority acquisition module is used for acquiring window change monitoring authority and simulation operation authority for the system program through the auxiliary function service code; the system program is a program built in an operating system and has the authority of closing the application program;
the system program control module is used for displaying a cover layer directly facing a user and controlling the system program to enter an operation window for closing the application program under the cover layer; wherein the controlling the system program to enter an operation window for closing an application program comprises: controlling the system program to enable the system program to enter an operation window for closing the application program according to a menu path of the operation window in a menu structure of the system program; the menu structure comprises menu hierarchies and hierarchical relations, and the menu path comprises options in each layer of menu through which an operation window passes;
the window monitoring module is used for monitoring the window change of the system program under the cover layer;
a closing button positioning module, configured to position, under the cover layer, a closing button for closing the application program in the operation window when it is monitored that the system program enters the operation window;
the simulation operation module is used for performing simulation operation on the closing button in the operation window under the covering layer; the simulation operation is used for triggering the system program to execute the operation of closing the application program;
and the cover layer management module is used for acquiring the closing progress of the application program when the operation of closing the application program is executed, and displaying the closing progress of the application program in the cover layer.
9. The apparatus of claim 8, further comprising:
the operation guide information display module is used for displaying operation guide information; the operation guide information is used for guiding a user to start an auxiliary function service switch registered by tool software in an auxiliary function service management interface provided by an operating system;
and the auxiliary function service code running module is used for running the auxiliary function service code when an auxiliary function service switch registered by the tool software in an auxiliary function service management interface provided by the operating system is turned on.
10. The apparatus of claim 8, wherein the system program control module is further configured to obtain a set of identifiers of applications to be closed; traversing the application program identifiers in the application program identifier set; and controlling the system program to sequentially enter an operation window for closing the application program identified by the traversed application program identification.
11. The apparatus of claim 8, wherein the coverage management module is further configured to obtain a total number of applications to be closed and a number of applications that have been closed; and calculating the closing progress of the application programs according to the total number of the application programs needing to be closed and the number of the closed application programs.
12. The apparatus of claim 8, further comprising:
the closing button positioning configuration information adaptation module is used for acquiring local operating system information; sending the operating system information to a server; receiving closing button positioning configuration information which is fed back by the server and is adaptive to the operating system information;
the closing button positioning module is further used for positioning a button used for closing the application program in the operation window according to the closing button positioning configuration information.
13. The apparatus of claim 8, wherein the close button location module is further configured to obtain close button location configuration information; the closing button positioning configuration information comprises a closing button identification, a sequencing position of a closing button in an interface element structure of the operation window and a closing button character set; and positioning a closing button used for closing the application program in the operation window according to the closing button identifier, if the positioning fails, positioning the closing button used for closing the application program in the operation window according to the sequencing position of the closing button in the interface element structure of the operation window, and if the positioning fails, positioning the closing button with the button character included in the closing button character set in the operation window.
14. The apparatus of claim 13, further comprising:
a reporting module, configured to, if positioning a close button in the close button character set, where the button character is included in the close button character set, in the operation window is successful, extract a close button identifier and a sorting position of the close button in a button sequence of the operation window from the operation window; and updating the closing button positioning configuration information according to the extracted closing button identification and the sequencing position of the closing button in the button sequence of the operation window.
15. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
16. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN201610978044.0A 2016-10-31 2016-10-31 Method and device for closing application program Active CN106708558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610978044.0A CN106708558B (en) 2016-10-31 2016-10-31 Method and device for closing application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610978044.0A CN106708558B (en) 2016-10-31 2016-10-31 Method and device for closing application program

Publications (2)

Publication Number Publication Date
CN106708558A CN106708558A (en) 2017-05-24
CN106708558B true CN106708558B (en) 2020-06-23

Family

ID=58940776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610978044.0A Active CN106708558B (en) 2016-10-31 2016-10-31 Method and device for closing application program

Country Status (1)

Country Link
CN (1) CN106708558B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107621977B (en) * 2017-09-28 2021-06-18 努比亚技术有限公司 Application control method, terminal and computer readable storage medium
CN112083973B (en) * 2020-09-18 2024-07-23 珠海豹趣科技有限公司 Window closing method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673216A (en) * 2008-09-09 2010-03-17 联想(北京)有限公司 Method and device for closing application program
CN104820545A (en) * 2015-04-30 2015-08-05 北京奇虎科技有限公司 Memory cleaning method and memory cleaning device of mobile terminal
CN105677407A (en) * 2008-09-09 2016-06-15 联想(北京)有限公司 Application program closing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8046712B2 (en) * 2004-06-29 2011-10-25 Acd Systems International Inc. Management of multiple window panels with a graphical user interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101673216A (en) * 2008-09-09 2010-03-17 联想(北京)有限公司 Method and device for closing application program
CN105677407A (en) * 2008-09-09 2016-06-15 联想(北京)有限公司 Application program closing method and device
CN104820545A (en) * 2015-04-30 2015-08-05 北京奇虎科技有限公司 Memory cleaning method and memory cleaning device of mobile terminal

Also Published As

Publication number Publication date
CN106708558A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
CN106648779B (en) A kind of intelligent terminal suspended window authority setting method
US7398469B2 (en) Automated test system for testing an application running in a windows-based environment and related methods
CN110851114A (en) Business system development method and device, electronic equipment and storage medium
CN108399124B (en) Application testing method and device, computer equipment and storage medium
JP2011192296A (en) Help utility application program
CN105989122A (en) Application recommendation method and device
CN109343926A (en) Application program image target display methods, device, terminal and storage medium
CN111866158B (en) Routing method, routing device, computer equipment and storage medium
CN106557669A (en) A kind of authority control method and device of application program installation process
US11544088B1 (en) System and method for providing a customized graphical user interface based on user inputs
CN110570846B (en) Voice control method and device and mobile phone
US20210117174A1 (en) Providing context-based application suggestions
CN110222243A (en) Determine the method, apparatus and storage medium of abnormal behaviour
CN106708558B (en) Method and device for closing application program
CN102855129B (en) The method of automatic establishment detached process and system thereof
CN107766068B (en) Application system patch installation method and device, computer equipment and storage medium
CN105630320A (en) Screen unlocking method and screen unlocking apparatus for terminal
CN117112124A (en) Parameter verification method, server and terminal for Kubernetes object
CN115098116A (en) Simulation operation method and device of application program, terminal and storage medium
CN111966367B (en) Data deleting method and device and electronic equipment
CN115080036A (en) Service providing tool generation method, electronic device and storage medium
CN114780330A (en) Code monitoring method and device
CN113986768A (en) Application stability testing method, device, equipment and medium
CN111443907A (en) Method and device for calling SDK function
CN112612469A (en) Interface element processing method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant