CN112416555B - Client restarting method, device and apparatus, and storage medium - Google Patents
Client restarting method, device and apparatus, and storage medium Download PDFInfo
- Publication number
- CN112416555B CN112416555B CN202011314697.1A CN202011314697A CN112416555B CN 112416555 B CN112416555 B CN 112416555B CN 202011314697 A CN202011314697 A CN 202011314697A CN 112416555 B CN112416555 B CN 112416555B
- Authority
- CN
- China
- Prior art keywords
- client application
- application program
- client
- program
- batch processing
- 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
Links
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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
-
- 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/5022—Mechanisms to release resources
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the application provides a client restarting method, a device and a storage medium, which are used for solving the technical problem that when a software design mode of a client is a singleton mode, restarting logic cannot be realized. The method comprises the following steps: receiving a request instruction for restarting a client, wherein the client is a singleton-mode client; calling a main interface closing program in a client application program according to a request instruction for restarting the client; calling a main process ending program in the client application program based on the main interface closing action; calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program; and restarting the client application program based on the preset batch processing file. According to the method and the device, the preset batch processing file is added, and the main process of the client application program is ended, so that the restarting operation can be realized when the software design mode of the client application program is a singleton mode.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a storage medium for restarting a client.
Background
In the current desktop client application program based on the Windows Presentation Foundation (WPF), the client application program itself does not have a restart function under normal conditions, and the client application program is restarted according to a restart method provided by the client application program itself only when the client application program has problems or the configuration file of the client application program needs to be restarted after being modified in batches.
However, when the software design mode of the client application is the singleton mode, when the client application is restarted, after the program itself is exited, there are actually many thread resources based on the host process that are not released. Since the client application is in the singleton mode, in the process of restarting the application, since part of resources are not released and still occupied, the restart process of the client application cannot be realized.
Disclosure of Invention
The embodiment of the application provides a client restarting method, a device and a storage medium, which are used for solving the technical problem that the client application program cannot be restarted when the software design mode of the client application program is a singleton mode.
In a first aspect, an embodiment of the present application provides a client restart method, including: receiving a request instruction for restarting a client, wherein the client is a singleton-mode client; calling a main interface closing program in a client application program according to a request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed; calling a main process ending program in the client application program based on the main interface closing action; calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program; when the preset batch file is executed, the main process of the client application program is ended or the main process of the client application program is restarted; and restarting the client application program based on the preset batch processing file.
According to the client restarting method provided by the embodiment of the application, after a request instruction for restarting the client is received, a client application program uses a WPF (Windows presentation foundation) self-contained main interface closing program to perform self-closing, but only a main interface corresponding to the client application program is closed at the moment, and a main process in the client application program is not finished; calling a main process ending program in the client application program based on the main interface closing action; when the client application program is judged to execute a request instruction for restarting the client, calling a preset batch processing file in the client application program to finish a main process corresponding to the client application program, so that all resources occupied by the main process are released; and finally, calling a starting program of the client application program based on the preset batch processing file to realize the restarting operation of the client application program. According to the method and the device, the client application program can realize the restart logic by adding a preset batch processing file, so that the client application program realizes the restart operation.
In an implementation manner of the present application, invoking a main interface shutdown program in a client application program according to a request instruction for restarting a client specifically includes: calling a main interface closing function according to a request instruction of a restarting client; a main interface close program in the client application is invoked when the main interface close function is executed.
In an implementation manner of the present application, based on a closing action of a main interface, invoking a main process termination program in a client application program specifically includes: calling a main process ending function based on the closing action of the main interface; a host-process-end-program in the client application is invoked when the host-process-end-function is executed.
In an implementation manner of the present application, calling a preset batch processing file in a client application program based on a host process end program specifically includes: in a main process ending program, determining file information corresponding to a preset batch processing file; acquiring a directory of a client application program; comparing file information corresponding to the preset batch files with a plurality of file information contained in a directory of the client application program; under the condition that the file information corresponding to the preset batch processing files is determined to be the same as any file information contained in the directory of the client application program, determining the positions of the preset batch processing files in the client application program; and calling the preset batch processing file according to the position of the preset batch processing file in the client application program.
In an implementation manner of the present application, the file information corresponding to the preset batch file at least includes any one or more of the following items: the file name of the batch processing file and the file type of the batch processing file are preset.
In an implementation manner of the present application, invoking a preset batch file in a client application program to end a main process corresponding to the client application program specifically includes: determining a main process address corresponding to a client application program in a preset batch processing file; determining the position of a main process in a client application program according to the main process address; based on the position of the main process, finishing the main process by presetting a first function in the batch processing file; wherein the first function, when executed, causes the host process of the client application to end.
In an implementation manner of the present application, restarting a client application based on a preset batch file specifically includes: calling a starting program in the client application program through a second function in the preset batch processing file so as to restart the client application program; wherein the second function, when executed, causes the main process of the client application to restart.
In a second aspect, an embodiment of the present application further provides a client reboot device, including: a processor; a memory having executable instructions stored thereon that, when executed, cause the processor to perform a blockchain based production base scoring method as described above.
In a third aspect, an embodiment of the present application further provides a client reboot apparatus, including: the receiving module is used for receiving a request instruction for restarting a client, and the client is a singleton-mode client; the calling module is used for calling a main interface closing program in the client application program according to the request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed; the calling module is also used for calling a main process ending program in the client application program based on the main interface closing action; the calling module is also used for calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program; when the preset batch processing file is executed, the main process of the client application program is ended or the main process of the client application program is restarted; and the restarting module is used for restarting the client application program based on the preset batch processing file.
In a fourth aspect, an embodiment of the present application further provides a non-volatile computer storage medium for client reboot, where the storage medium stores computer-executable instructions, and the computer-executable instructions are configured to: receiving a request instruction for restarting a client, wherein the client is a singleton-mode client; calling a main interface closing program in a client application program according to a request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed; calling a main process ending program in the client application program based on the main interface closing action; calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program; when the preset batch processing file is executed, the main process of the client application program is ended or the main process of the client application program is restarted; and restarting the client application program based on the preset batch processing file.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flowchart of a method for restarting a client according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an internal structure of a client reboot device according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of an internal structure of a client reboot apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With respect to the current desktop client application based on the Windows Presentation Foundation (WPF), when the software design mode of the client application is a singleton mode, when the client application is restarted, the client application is restarted according to a restart method provided by the client application itself, but after the program itself is exited by the method, there are many thread resources based on the host process that are not released.
The embodiment of the application provides a client restarting method, and solves the technical problem that restarting logic cannot be realized when the software design mode of the existing client application program is a single-case mode.
The technical solutions proposed in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, a client reboot method provided in the embodiment of the present application includes the following steps:
it should be noted that the method execution subject provided in the embodiments of the present application is a processor or a computer device having a calculation processing function.
In one embodiment of the present application, when the client application starts, message monitoring is started inside the client application, and based on the started message monitoring, the client application receives a request instruction for restarting the client. The request instruction for restarting the client includes but is not limited to: the request instruction of restarting the client is sent by the remote server, and the request instruction of restarting the client is triggered by a user.
In one embodiment of the application, after the server performs batch modification program configuration on the client application program, the remote server sends a request instruction for restarting the client to the client. Specifically, after the server performs batch modification of the program configuration for the client application program, the running client application program does not actually run the program configuration that the server has just modified, so that if the client application program needs to run the modified program configurations and execute the functions that can be realized in the program configuration, the remote server needs to send a request instruction for restarting the client, so that the client application program is restarted, and the client application program is completely run.
In another embodiment of the present application, the user triggers a request instruction to restart the client through the client application itself. Specifically, a restart option is set in a client application program main interface, and when a user needs to restart the client application program, a request instruction for restarting the client is triggered by clicking the restart option, so that the client application program is restarted; or, a restart selection instruction is set in the client application program, and the instruction is triggered by clicking a fixed keyboard key to trigger a request instruction for restarting the client.
And step 102, calling a main interface closing program in the client application program according to a request instruction for restarting the client.
Calling a main interface closing function after receiving a request instruction for restarting a client based on message monitoring; the main interface closing function is an event processing function for calling a main interface closing program based on a received request instruction for restarting a client; and when the main interface closing function is executed, calling a main interface closing program in the client application program to close the main interface corresponding to the client application program.
It should be noted that the main interface closing program is an exit program provided in the client application program, and after the main interface closing program is executed, only the main interface of the client application program is closed, and the main process of the client application program is not ended, that is, the main process of the client application program is still running in the background. Because the design mode of the client application program is a singleton mode, under the condition that the resources of the client application program are not completely released, the restarting of the client application program can not be realized due to resource occupation. Therefore, when the client application needs to be restarted, the host process must be terminated.
And 103, calling a main process ending program in the client application program based on the main interface closing action.
And calling a main process ending program in the client application program through a main process ending function based on the main interface closing action. Specifically, when detecting that a main interface of a client application program is executing a closing action, the computer device triggers a main process to end function execution; or when the computer device detects that the main interface of the client application program executes the closing action, the time is monitored to determine the closing completion time of the main interface of the client application program, and the main process ending function is triggered to execute immediately at the time. It should be noted that the main process ending function in the embodiment of the present application is an event handling function disposed inside the program, and the trigger condition is that the main interface of the client application program is being closed or the main interface of the client application program is closed completely.
Further, a host-process-end program in the client application is invoked when the host-process-end function is triggered to execute. Specifically, the host process termination function determines the location of the host process termination program in the client application program based on the program name of the host process termination program declared therein, and runs the host process termination program.
And step 104, calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program.
When the main process ending program is executed, judging whether a request instruction required to be executed by the client application program is a request instruction for restarting the client or not according to the request instruction parameter transmitted into the main process ending program; the request instruction parameter is a parameter formed by converting an instruction into data when the client application program receives the instruction; and when the request instruction parameter is determined to be the parameter corresponding to the request instruction of the restarting client, calling a preset batch processing file in the client application program.
In an embodiment of the present application, the invoking of the preset batch file in the client application specifically includes the following processes: firstly, determining file information corresponding to a preset batch processing file in a main process ending program; the file information corresponding to the preset batch processing file at least comprises any one or more of the following items: presetting a file name of a batch file and a file type of the batch file; secondly, obtaining a directory of the client application program; then, comparing file information corresponding to the preset batch processing files with a plurality of file information contained in a directory of the client application program; under the condition that the file information corresponding to the preset batch processing files is determined to be the same as any file information contained in the directory of the client application program, determining the positions of the preset batch processing files in the client application program; and calling the preset batch processing file according to the position of the preset batch processing file in the client application program.
Further, in the preset batch processing file, determining a main process address corresponding to the client application program; determining the position of a main process in a client application program according to the main process address corresponding to the client application program; and ending the main process in the client application program through a first function in the preset batch processing file.
It should be noted that after the main process in the client application program is ended by presetting the first function in the batch file, there is no more resource occupation by the main process of the client application program in the background, at this time, the client application program whose design mode is the singleton mode can implement the restart logic, and the restart operation is no longer affected by the resource occupation and cannot be completed.
And 105, restarting the client application program based on the preset batch processing file.
And after the first function in the preset batch processing file is called to enable the main process of the client application program to be finished, a starting program in the client application program is called through the second function in the preset batch processing file to restart the client application program. When the first function is called, the mode of ending the main process of the client application program is forced closing; when the second function is called, according to the name of the starting program contained in the second function, the position of the starting program is determined in the client application program, so that the starting program is operated, and the restarting process is realized.
Specifically, in a preset batch processing file, determining an identifier of a starting program in a client application program; determining the position of a starting program in a client application program according to the identifier of the starting program in the client application program; and calling the starting program in the client application program through a second function in the preset batch processing file based on the position of the starting program, so as to restart the client application program.
It should be noted that all the functions and programs mentioned in the embodiments of the present application exist in the client application.
According to the client restarting method provided by the embodiment of the application, when the software design mode of the client application program is a singleton mode, the software design mode is realized by adding the preset batch processing file, the main process can be ended by calling the preset batch processing file, the restarting operation of the client application program is further realized, and the smooth execution of the restarting operation of the client application program is ensured.
Based on the same inventive concept, the embodiment of the present application further provides a client rebooting device, and the internal structure of the client rebooting device is shown in fig. 2.
Fig. 2 is a schematic diagram of an internal structure of a client reboot device according to an embodiment of the present disclosure. As shown in fig. 2, the apparatus includes: a processor 201; a memory 202 having executable instructions stored thereon that, when executed, cause the processor 201 to perform a client reboot method as described above.
In an embodiment of the present application, the processor 201 is configured to receive a request instruction to restart a client, where the client is a singleton-mode client; calling a main interface closing program in a client application program according to a request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed; calling a main process ending program in the client application program based on the main interface closing action; calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program; when the preset batch processing file is executed, the main process of the client application program is ended or the main process of the client application program is restarted; and restarting the client application program based on the preset batch processing file.
Based on the same inventive concept, the embodiment of the present application further provides a client reboot device, and an internal structure of the client reboot device is shown in fig. 3.
Fig. 3 is a schematic diagram of an internal structure of a client reboot apparatus according to the present application. As shown in fig. 3, a client reboot apparatus 300 according to an embodiment of the present application includes: a receiving module 301, a calling module 302 and a restarting module 303.
It will be understood by those skilled in the art that the configuration of the client restart apparatus shown in fig. 3 is not intended to be limiting, and in fact, the client restart apparatus may include more or fewer components than those shown in fig. 3, or some components may be combined, or an arrangement of different components may be provided.
In an embodiment of the present application, the receiving module 301 is configured to receive a request instruction for restarting a client, where the client is a singleton-mode client; a calling module 302, configured to call a main interface shutdown program in the client application program according to a request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed; the calling module 302 is further configured to call a main process ending program in the client application program based on the main interface closing action; the calling module 302 is further configured to call a preset batch processing file in the client application program based on the host process end program, so that the host process corresponding to the client application program is ended; when the preset batch processing file is executed, the main process of the client application program is ended or the main process of the client application program is restarted; and a restart module 303, configured to restart the client application based on the preset batch processing file.
Some embodiments of the present application provide a non-volatile computer storage medium corresponding to a client reboot of fig. 1, having stored thereon computer-executable instructions configured to:
receiving a request instruction for restarting a client, wherein the client is a singleton-mode client;
calling a main interface closing program in a client application program according to a request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed;
calling a main process ending program in the client application program based on the main interface closing action;
calling a preset batch processing file in the client application program based on the main process ending program so as to end the main process corresponding to the client application program; when the preset batch file is executed, the main process of the client application program is ended or the main process of the client application program is restarted;
and restarting the client application program based on the preset batch processing file.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one by one, so the device and the medium also have the beneficial technical effects similar to the corresponding method.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (8)
1. A method for restarting a client, the method comprising:
receiving a request instruction for restarting a client, wherein the client is a singleton-mode client;
calling a main interface closing program in a client application program according to the request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed;
calling a main process ending program in the client application program based on the main interface closing action;
calling a preset batch processing file in a client application program based on the main process ending program so as to end a main process corresponding to the client application program; the preset batch file, when executed, causes the host process of the client application program to end or the host process of the client application program to restart;
restarting the client application program based on the preset batch processing file;
based on the main process ending program, calling a preset batch processing file in a client application program to end a main process corresponding to the client application program, and specifically comprising:
in the main process ending program, determining file information corresponding to the preset batch processing files;
acquiring a directory of the client application program;
comparing file information corresponding to the preset batch processing files with a plurality of file information contained in a directory of the client application program;
determining the position of the preset batch processing file in the client application program under the condition that the file information corresponding to the preset batch processing file is determined to be the same as any file information contained in the directory of the client application program;
calling the preset batch processing file according to the position of the preset batch processing file in the client application program;
determining a main process address corresponding to the client application program in the preset batch processing file;
determining the position of the main process in the client application program according to the main process address;
based on the position of the main process, finishing the main process through a first function in the preset batch processing file; wherein the first function, when executed, causes the host process of the client application to end.
2. The method according to claim 1, wherein calling a main interface shutdown program in a client application program according to the request instruction for restarting the client specifically includes:
calling a main interface closing function according to the request instruction of the restarting client;
calling a main interface closing program in the client application program when the main interface closing function is executed.
3. The method for restarting the client according to claim 1, wherein based on the closing action of the host interface, a host process end program in the client application program is invoked, and specifically includes:
calling a main process ending function based on the main interface closing action;
calling a host-process-end program in the client application program when the host-process-end function is executed.
4. The client rebooting method of claim 1, wherein the file information corresponding to the preset batch file at least includes any one or more of the following items: the file name of the preset batch processing file and the file type of the preset batch processing file.
5. The client restarting method according to claim 1, wherein restarting the client application based on the preset batch file specifically includes:
calling a starting program in the client application program through a second function in the preset batch processing file so as to restart the client application program; wherein the second function, when executed, causes a restart of a host process of the client application.
6. A client reboot device comprising:
a processor;
and a memory having executable code stored thereon, which when executed, causes the processor to perform a client restart method as claimed in any one of claims 1-5.
7. An apparatus for restarting a client, the apparatus comprising:
the client comprises a receiving module, a restarting module and a restarting module, wherein the receiving module is used for receiving a request instruction of restarting a client, and the client is a singleton-mode client;
the calling module is used for calling a main interface closing program in the client application program according to the request instruction of the restarting client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed;
the calling module is also used for calling a main process ending program in the client application program based on the main interface closing action;
the calling module is further used for calling a preset batch processing file in a client application program based on the main process ending program so as to end the main process corresponding to the client application program; the preset batch file, when executed, causes the host process of the client application program to end or causes the host process of the client application program to restart;
the restarting module is used for restarting the client application program based on the preset batch processing file;
based on the main process ending program, calling a preset batch processing file in a client application program to end a main process corresponding to the client application program, and specifically comprising:
determining file information corresponding to the preset batch processing files in the main process ending program;
acquiring a directory of the client application program;
comparing file information corresponding to the preset batch processing files with a plurality of file information contained in a directory of the client application program;
determining the position of the preset batch processing file in the client application program under the condition that the file information corresponding to the preset batch processing file is determined to be the same as any file information contained in the directory of the client application program;
calling the preset batch processing file according to the position of the preset batch processing file in the client application program;
determining a main process address corresponding to the client application program in the preset batch processing file;
determining the position of the main process in the client application program according to the main process address;
based on the position of the main process, finishing the main process through a first function in the preset batch processing file; wherein the first function, when executed, causes the host process of the client application to end.
8. A non-transitory computer storage medium having stored thereon computer-executable instructions configured to:
receiving a request instruction for restarting a client, wherein the client is a singleton-mode client;
calling a main interface closing program in a client application program according to the request instruction for restarting the client; when the main interface closing program is executed, the main interface corresponding to the client application program is closed;
calling a main process ending program in the client application program based on the main interface closing action;
calling a preset batch processing file in a client application program based on the main process ending program so as to end a main process corresponding to the client application program; the preset batch file, when executed, causes the host process of the client application program to end or the host process of the client application program to restart;
restarting the client application program based on the preset batch processing file;
based on the main process ending program, calling a preset batch processing file in a client application program to end a main process corresponding to the client application program, and specifically comprising:
determining file information corresponding to the preset batch processing files in the main process ending program;
acquiring a directory of the client application program;
comparing file information corresponding to the preset batch processing files with a plurality of file information contained in a directory of the client application program;
determining the position of the preset batch processing file in the client application program under the condition that the file information corresponding to the preset batch processing file is determined to be the same as any file information contained in the directory of the client application program;
calling the preset batch processing file according to the position of the preset batch processing file in the client application program;
determining a main process address corresponding to the client application program in the preset batch processing file;
determining the position of the main process in the client application program according to the main process address;
based on the position of the main process, finishing the main process through a first function in the preset batch processing file; wherein the first function, when executed, causes the host process of the client application to end.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011314697.1A CN112416555B (en) | 2020-11-20 | 2020-11-20 | Client restarting method, device and apparatus, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011314697.1A CN112416555B (en) | 2020-11-20 | 2020-11-20 | Client restarting method, device and apparatus, and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112416555A CN112416555A (en) | 2021-02-26 |
CN112416555B true CN112416555B (en) | 2022-09-23 |
Family
ID=74778381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011314697.1A Active CN112416555B (en) | 2020-11-20 | 2020-11-20 | Client restarting method, device and apparatus, and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112416555B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115525464A (en) * | 2022-09-30 | 2022-12-27 | 湖北省广播电视局无线台管理中心 | System, method and storage medium for coping with application crash |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10140454B1 (en) * | 2015-09-29 | 2018-11-27 | Symantec Corporation | Systems and methods for restarting computing devices into security-application-configured safe modes |
CN106951291A (en) * | 2017-03-28 | 2017-07-14 | 努比亚技术有限公司 | Application program accelerates to start method and device |
CN110888683B (en) * | 2018-08-16 | 2022-05-06 | 腾讯科技(深圳)有限公司 | Performance optimization method and device of operating system and readable medium |
CN109725950B (en) * | 2018-12-29 | 2022-02-22 | 武汉斗鱼网络科技有限公司 | Method, device and storage medium for realizing single-instance operation of client |
-
2020
- 2020-11-20 CN CN202011314697.1A patent/CN112416555B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN112416555A (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107766101B (en) | Method, device and equipment for processing App starting event | |
CN107016016B (en) | Data processing method and device | |
CN111290949A (en) | Process daemon method and equipment | |
US20220291977A1 (en) | Single flow execution | |
CN112416555B (en) | Client restarting method, device and apparatus, and storage medium | |
CN114064780A (en) | Session information processing method, system, device, storage medium and electronic equipment | |
CN110764930B (en) | Request or response processing method and device based on message mode | |
CN112564956A (en) | Remote upgrading method, equipment and device for client and storage medium | |
CN107301097B (en) | Method and device for storing calling java object and reference address information of java object | |
CN114791884A (en) | Test environment construction method and device, storage medium and electronic equipment | |
CN113076246A (en) | Software system maintenance method and device, computer equipment and readable storage medium | |
CN113609478A (en) | IOS platform application program tampering detection method and device | |
CN113296832A (en) | Data processing method and device and electronic equipment | |
CN112988353A (en) | Operation control method and device for application program | |
CN111176959A (en) | Early warning method, system and storage medium for cross-domain application server | |
CN108268311B (en) | Determination method and device for caller application program | |
EP4346191A1 (en) | Data processing method, and apparatus | |
CN107515780B (en) | Method for determining call relation between applications, method and device for generating call rule | |
US20240028372A1 (en) | Preventing unnecessary registration of virtual machines | |
CN114510495B (en) | Database service data consistency processing method and system | |
CN110365775B (en) | Service data uploading method and device and storage medium | |
CN113744048A (en) | Loan transaction processing method and device | |
CN116594818A (en) | Method, device and equipment for detecting configuration consistency of application system | |
CN113821325A (en) | Application program calling method, device, equipment and medium | |
CN106899650B (en) | Data updating method and device |
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 |