CN111176751A - Method and system for completely closing application software - Google Patents
Method and system for completely closing application software Download PDFInfo
- Publication number
- CN111176751A CN111176751A CN201911306985.XA CN201911306985A CN111176751A CN 111176751 A CN111176751 A CN 111176751A CN 201911306985 A CN201911306985 A CN 201911306985A CN 111176751 A CN111176751 A CN 111176751A
- Authority
- CN
- China
- Prior art keywords
- software
- application software
- starting time
- closed
- closing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 230000008569 process Effects 0.000 claims abstract description 130
- 238000012795 verification Methods 0.000 claims abstract description 20
- 238000012163 sequencing technique Methods 0.000 claims abstract description 19
- 230000004044 response Effects 0.000 claims abstract description 3
- 238000004590 computer program Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 claims description 3
- 230000004913 activation Effects 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44594—Unloading
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and a system for completely closing application software in the technical field of application software closing, and aims to solve the technical problems that the application software is slowly closed, the application software is wrongly reported after being closed, the application software cannot be opened again after being closed, and the memory occupancy rate after being closed is high in the prior art. The method comprises the following steps: in response to a closing instruction of the application software, sequencing the software processes according to starting time based on the acquired software processes related to the application software and the starting time thereof; verifying whether the software process with the latest starting time is closed or not; if the software process with the latest starting time is not closed after verification, closing the software process with the latest starting time based on the sequencing result; verifying whether the application software is closed; and if the application software is not closed after verification, returning to execute the step of sequencing the software processes according to the starting time.
Description
Technical Field
The invention relates to a method and a system for completely closing application software, and belongs to the technical field of application software closing.
Background
With the development of software technology and artificial intelligence, more and more application software is available in the internet market, and the requirements of users on software performance are higher and higher. Therefore, how to efficiently improve the software performance becomes a problem which needs to be considered by many software developers. In many application software, software closing is a necessary function of the application software, and most of the existing application software has the problems of slow software closing, error reporting after the software is closed, incapability of being opened again after the software is closed, high memory occupancy rate after the software is closed and the like.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to provide a method and a system for completely closing application software, so as to solve the technical problems that the application software is slowly closed, error is reported after closing, the application software cannot be opened again after closing, and the memory occupancy rate is high after closing in the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method for completely shutting down application software, comprising the steps of:
in response to a closing instruction of the application software, sequencing the software processes according to starting time based on the acquired software processes related to the application software and the starting time thereof;
verifying whether the software process with the latest starting time is closed or not;
if the software process with the latest starting time is not closed after verification, closing the software process with the latest starting time based on the sequencing result;
verifying whether the application software is closed;
and if the application software is not closed after verification, returning to execute the step of sequencing the software processes according to the starting time.
Further, if the software process with the latest starting time is verified to be closed, the step of sorting the software processes according to the starting time is returned to be executed.
Further, after the software process with the latest starting time is closed based on the sorting result, the method further comprises the following steps: verifying whether the software process with the latest starting time is successfully closed;
and if the software process with the latest starting time is verified to be not successfully closed, acquiring the reason of the unsuccessful closing and prompting the user that the application software closing operation fails to be executed.
Further, the operating system running the application software comprises Windows and Linux.
Further, the programming language for developing the application software comprises C #, JAVA.
In order to achieve the above object, the present invention further provides a system for completely shutting down application software, comprising:
software process time sequencing module: the software process scheduling system is used for responding to a closing instruction of the application software, and sequencing the software processes according to starting time based on the acquired software processes related to the application software and the starting time of the software processes;
the software process closing correctness verification module: the software process is used for verifying whether the software process with the latest starting time is closed or not;
a software process closing module: the software process with the latest starting time is closed based on the sequencing result;
a software shutdown correctness verification module: for verifying whether the application software has been shut down.
Further, the method also comprises the following steps:
the software process starting time identification module: for obtaining the software process associated with the application software and its start time.
Further, still include:
software process shutdown alarm module: the method is used for acquiring the reason of unsuccessful shutdown and prompting the user that the shutdown operation of the application software fails to be executed.
In order to achieve the above object, the present invention also provides a computer processing control apparatus, comprising:
a memory: for storing instructions;
a processor: for operating in accordance with the instructions to perform the steps of a method for completely shutting down application software provided by the present invention.
To achieve the above object, the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of a method for completely shutting down application software according to the present invention.
Compared with the prior art, the invention has the following beneficial effects: the method and the system circularly close the software process with the latest starting time in the application software until driving other associated processes to be closed one by one. Compared with the method for forcibly closing all software processes of the application software at one time, the method solves the problem that residual processes continuously occupy the memory of the computer after the application software is closed, avoids the risks of errors caused by forcibly closing all the processes of the application software at one time, errors caused after a user repeatedly opens the application software and the problem that developers waste a large amount of time to search, reduces the maintenance cost of the application software, saves the memory of the computer, improves the performance of the computer and enhances the user experience.
Drawings
FIG. 1 is a flow chart illustrating a process of completely closing an application software by the patented method based on the system of the present invention;
FIG. 2 is a flow chart of completely closing two types of application software by the patented method based on the system of the invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
The specific implementation mode of the invention provides a method and a system for completely closing application software by using a cyclic process time difference algorithm, and the method is realized based on the system.
The system comprises the following modules:
(1) a software process starting time identification module;
(2) a software process time ordering module;
(3) the software process closes the correctness verification module;
(4) a software process closing module;
(5) a software process closing alarm module;
(6) and the software closes the correctness verification module.
The method comprises the following steps:
step one, after the application software receives an operation instruction, a software process starting time identification module identifies all software processes related to the application software and starting time thereof.
Step two, after the application software receives the closing instruction,
(1) the software process time sorting module screens out the software process with the latest starting time in the software processes;
(2) whether the software process which is screened out by the software process closing correctness verifying module and has the latest starting time is closed or not is judged, if the software process is not closed through verification, the step (3) is executed, and if the software process is closed through verification, the step (1) is executed again;
(3) the software process closing module closes the screened software process with the latest starting time;
(4) verifying whether the software process with the latest starting time is successfully closed or not, if so, executing the step (5), and if not, recording the reason why the software process is not successfully closed and prompting a user that the software closing operation fails;
(5) and (3) the software closing correctness verifying module verifies whether the application software is closed, if the application software is not closed, the residual software process still exists, and at the moment, the step (1) is returned to be executed.
The application software can be software developed based on different programming languages such as C #, JAVA, and the like, and the application software covers software running under different operating systems such as Window, Linux, and the like.
The embodiment of the present invention also provides a computer processing control apparatus, including:
a memory: for storing instructions;
a processor: for operating in accordance with the instructions to perform the steps of a method for completely shutting down application software provided by the present invention.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of a method for completely shutting down application software according to the present invention.
The method for closing the application software is to circularly close the software process with the latest starting time in the application software until other associated processes are driven to be closed one by one. Compared with the method for forcibly closing all software processes of the application software at one time, the method solves the problem that residual processes continuously occupy the memory of the computer after the application software is closed, avoids the risks of errors caused by forcibly closing all the processes of the application software at one time, errors caused after a user repeatedly opens the application software and the problem that developers waste a large amount of time to search, reduces the maintenance cost of the application software, saves the memory of the computer, improves the performance of the computer and enhances the user experience.
The method and system of the present invention are further described below with reference to examples.
Example 1: and completely closing a piece of application software running in the Windows operating system. As shown in fig. 1, the present invention is a schematic flow chart of completely closing an application software by using the method of the present invention, and the working principle is as follows:
1. after the application software starts to run, software processes associated with the application software are sequentially started. At this point, the software process activation time identification module identifies all software processes associated with the application software and their activation times.
2. After a user executes the application software closing operation, the application software receives a closing instruction, the starting time of all software processes related to the application software is set to be combined into a time array TimeArray, a software process time sorting module sorts the time array TimeArray through a custom sorting algorithm, and the last element in the time array TimeArray after sorting is the software process with the latest starting time in all the software processes related to the application software. The principle of the custom sorting algorithm is as follows:
2.1, set the array TimeArray for short T, assuming that T has n elements, i.e., { T [1], T [2], …, T [ n }. In the formula, T1 represents the starting time of the 1 st software process, T2 represents the starting time of the 2 nd software process, and T n represents the starting time of the nth software process.
2.2, assuming T1 through Tk have been sorted, it is now necessary to put Tk + 1 in the appropriate location. Where k is used to represent a certain position of the array, typically starting with 1.
2.3, comparing the values of Tk + 1 and Tk, and exchanging the values if Tk + 1 < Tk; if Tk + 1 is equal to or greater than Tk, then no swap is required. Assuming successful swapping, then T [ k ] now holds the original value of T [ k + 1], and the new value of T [ k ] may be smaller than the previous position, so it is necessary to compare T [ k ] again with T [ k-1 ], and so on. Until a certain position Tp (p is a number between 1 and k) is found whose value is not less than that of Tp-1, the comparison is complete and the value of Tk + 1 has been placed in the appropriate position Tp, now T1 to Tk + 1 are an ordered array.
2.4, sequentially carrying out the operation of the step 2.3 for each element from T [ k + 2] to T [ n ] after T [ k + 1], and finally obtaining an ordered array.
3. And after the step 2 is completed, the software process closing correctness verification module verifies whether the process with the latest starting time in the application software is closed or not, and if the process is not closed, the software process closing module is executed. If the process is closed, the process with the latest starting time in the application software can be screened again directly according to the time array TimeArray sequenced in the step 2, and the operation of the software process closing correctness verification module is executed again.
4. And after the step 3 is completed, immediately closing the process with the latest starting time in the application software by the software process closing module, and if the process is successfully closed, driving other associated processes to be automatically closed by the operation. If the software process shutdown fails, the software process shutdown alarm module records the reason of unsuccessful software process shutdown and prompts a user that the software shutdown operation fails to be executed.
5. And finally, a software closing verification module in the application software starts to verify whether the software is successfully closed, and if a residual process exists, the steps 2 to 5 are executed again until the application software is successfully closed.
Example 2: and completely closing two pieces of application software running in the Windows operating system, wherein the two pieces of application software are application software A and application software B respectively. As shown in fig. 2, it is a schematic flow diagram of completely closing two types of application software by using the method of the present invention based on the system of the present invention, and the working principle is as follows:
1. after the application software starts to run, the software processes of the associated application software A are started in sequence, the user starts the application software B in the application software A, and after the application software B receives the running instruction, the software processes of the associated application software B are started in sequence. The software process start time identification module in the application software a identifies all software processes and their start times associated with the application software B.
2. After the user executes the operation of closing the application software B in the application software A, the application software A receives an instruction of closing the application software B. Setting the starting time of all software processes of the associated application software B to combine into a time array TimeArray, sequencing the time array TimeArray by a software process time sequencing module in the application software A through a custom sequencing algorithm, and obtaining the last element of the time array TimeArray after sequencing is the software process with the latest starting time in the application software B. The principle of the custom sorting algorithm is the same as that of the custom sorting algorithm in embodiment 1.
3. And after the step 2 is completed, a software process closing correctness verification module in the application software A verifies whether a process with the latest starting time in the application software B is closed or not, and if the process is not closed, the next step is executed. If the process is closed, the process with the latest starting time in the application software B can be screened again directly according to the time array TimeArray sequenced in the step 2, and the operation of the software process closing correctness verification module is executed again.
4. And (3) after the step (3) is completed, immediately closing the process with the latest starting time in the application software B by the software process closing module in the application software A, and if the process is successfully closed, driving other associated processes to be automatically closed. If the closing fails, the software process closing alarm module in the application software A records the reason that the software process in the application software B which is started at the latest time is not successfully closed, and prompts a user that the closing operation of the application software B fails to be executed.
5. And finally, a software closing verification module in the application software A starts to verify whether the application software B is successfully closed, and if a residual process exists, the steps 2 to 5 are executed again until the application software B is successfully closed.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.
Claims (10)
1. A method for completely closing application software is characterized by comprising the following steps:
in response to a closing instruction of the application software, sequencing the software processes according to starting time based on the acquired software processes related to the application software and the starting time thereof;
verifying whether the software process with the latest starting time is closed or not;
if the software process with the latest starting time is not closed after verification, closing the software process with the latest starting time based on the sequencing result;
verifying whether the application software is closed;
and if the application software is not closed after verification, returning to execute the step of sequencing the software processes according to the starting time.
2. A method for completely shutting down application software as claimed in claim 1, wherein if it is verified that the software process with the latest start-up time has been shut down, returning to the step of performing the software process ordering by start-up time.
3. The method for completely shutting down application software according to claim 1, further comprising, after shutting down the software process whose startup time is the latest based on the sorting result: verifying whether the software process with the latest starting time is successfully closed;
and if the software process with the latest starting time is verified to be not successfully closed, acquiring the reason of the unsuccessful closing and prompting the user that the application software closing operation fails to be executed.
4. A method for completely closing application software according to claim 1, wherein the operating system running the application software comprises Windows, Linux.
5. The method of claim 1, wherein the programming language for developing the application software comprises C #, JAVA.
6. A system for completely shutting down application software, comprising:
software process time sequencing module: the software process scheduling system is used for responding to a closing instruction of the application software, and sequencing the software processes according to starting time based on the acquired software processes related to the application software and the starting time of the software processes;
the software process closing correctness verification module: the software process is used for verifying whether the software process with the latest starting time is closed or not;
a software process closing module: the software process with the latest starting time is closed based on the sequencing result;
a software shutdown correctness verification module: for verifying whether the application software has been shut down.
7. The system for completely shutting down application software of claim 6, further comprising:
the software process starting time identification module: for obtaining the software process associated with the application software and its start time.
8. The system for completely shutting down application software of claim 6, further comprising:
software process shutdown alarm module: the method is used for acquiring the reason of unsuccessful shutdown and prompting the user that the shutdown operation of the application software fails to be executed.
9. Computer processing control device, characterized by, includes:
a memory: for storing instructions;
a processor: for operating in accordance with the instructions to perform the steps of the method of any one of claims 1 to 5.
10. Computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911306985.XA CN111176751A (en) | 2019-12-18 | 2019-12-18 | Method and system for completely closing application software |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911306985.XA CN111176751A (en) | 2019-12-18 | 2019-12-18 | Method and system for completely closing application software |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111176751A true CN111176751A (en) | 2020-05-19 |
Family
ID=70653851
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911306985.XA Pending CN111176751A (en) | 2019-12-18 | 2019-12-18 | Method and system for completely closing application software |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111176751A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103645898A (en) * | 2013-12-13 | 2014-03-19 | 浪潮电子信息产业股份有限公司 | Automatic scripting tool |
CN104503841A (en) * | 2014-12-15 | 2015-04-08 | 北京奇虎科技有限公司 | Process clearing method and process clearing device |
CN104503750A (en) * | 2014-12-15 | 2015-04-08 | 北京奇虎科技有限公司 | Process clearing method and process clearing device |
-
2019
- 2019-12-18 CN CN201911306985.XA patent/CN111176751A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103645898A (en) * | 2013-12-13 | 2014-03-19 | 浪潮电子信息产业股份有限公司 | Automatic scripting tool |
CN104503841A (en) * | 2014-12-15 | 2015-04-08 | 北京奇虎科技有限公司 | Process clearing method and process clearing device |
CN104503750A (en) * | 2014-12-15 | 2015-04-08 | 北京奇虎科技有限公司 | Process clearing method and process clearing device |
Non-Patent Citations (1)
Title |
---|
WJXIAOIT: "根据进程启动时间进行kill" * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11249887B2 (en) | Deep Q-network reinforcement learning for testing case selection and prioritization | |
US7634687B2 (en) | Checkpoint restart system and method | |
CN110673936B (en) | Breakpoint continuous operation method and device for arrangement service, storage medium and electronic equipment | |
US8930761B2 (en) | Test case result processing | |
US9384020B2 (en) | Domain scripting language framework for service and system integration | |
CN104572436B (en) | Automatic debugging and error proofing method and device | |
CN113377667B (en) | Scene-based testing method and device, computer equipment and storage medium | |
CN113377484A (en) | Popup window processing method and device | |
CN109857642B (en) | Blocking type debugging method and debugging tool for UI automation script | |
CN107977206B (en) | Method and device for processing batch service data files | |
CN117033209A (en) | AI model training method, BIOS testing method, device, equipment and storage medium | |
CN113721948A (en) | Database upgrading method, system and storage medium | |
CN111176751A (en) | Method and system for completely closing application software | |
US9880813B2 (en) | RTE code generating method and apparatus performing the same | |
CN109063846B (en) | Machine learning operation method, device, equipment and storage medium | |
CN110795121A (en) | Virtualization system upgrading method, device, equipment and computer readable storage medium | |
RU128741U1 (en) | SYSTEM FOR FORMING SOLVING PROBLEMS OF FUNCTIONING COMPUTER SYSTEMS | |
CN115640155A (en) | Program automatic repairing method and system based on statement dependence and patch similarity | |
CN111061642B (en) | Full-automatic competition data processing system and method based on user data | |
CN113703804A (en) | System upgrading method, system, device and storage medium | |
CN112685328B (en) | Graphical interface testing method and device and storage medium | |
CN114546456B (en) | Upgrading method and device and electronic equipment | |
US20220334954A1 (en) | Automated verification of a test model for a plurality of defined bdd test scenarios | |
CN109710319B (en) | Method and system for identifying in-place hard disk of computer | |
CN114880205B (en) | Method, system, equipment and storage medium for ordering test cases |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200519 |
|
RJ01 | Rejection of invention patent application after publication |