CN109032777B - Process restarting method and device, computing equipment and computer storage medium - Google Patents

Process restarting method and device, computing equipment and computer storage medium Download PDF

Info

Publication number
CN109032777B
CN109032777B CN201810712658.3A CN201810712658A CN109032777B CN 109032777 B CN109032777 B CN 109032777B CN 201810712658 A CN201810712658 A CN 201810712658A CN 109032777 B CN109032777 B CN 109032777B
Authority
CN
China
Prior art keywords
file
specific signal
current task
updated
idle state
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
CN201810712658.3A
Other languages
Chinese (zh)
Other versions
CN109032777A (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.)
Beijing Hongxiang Technical Service Co Ltd
Original Assignee
Beijing Hongxiang Technical Service 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 Beijing Hongxiang Technical Service Co Ltd filed Critical Beijing Hongxiang Technical Service Co Ltd
Priority to CN201810712658.3A priority Critical patent/CN109032777B/en
Publication of CN109032777A publication Critical patent/CN109032777A/en
Application granted granted Critical
Publication of CN109032777B publication Critical patent/CN109032777B/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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution

Abstract

The invention discloses a process restarting method, a device, a computing device and a computer storage medium, wherein the method comprises the following steps: when the file which is depended on by the process is detected to be updated, generating a specific signal; when the process actively inquires the specific signal every time the process is in an idle state or the process finishes processing the current task, the process stops running; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running; and restarting the process and loading the updated file. According to the scheme, the specific signal is obtained through two modes of active query or passive receiving, and the process is controlled to stop running under the condition that the process is in an idle state or the process finishes processing the current task, so that data is prevented from being damaged or lost; and then restarting to load the updated file, and further automatically completing the loading of the file.

Description

Process restarting method and device, computing equipment and computer storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a process restarting method, a process restarting device and a computer storage medium.
Background
In the course of computer work, there are usually processes that run all the time in the background, and the running of these processes needs to rely on other files, for example, some algorithm files. When the processes are in the running state, if other files which the processes depend on are updated, the updated files need to be reloaded, so that the processes run by depending on the updated files.
In the prior art, after other dependent files are updated, the process is controlled to restart and the updated other files are loaded in a manual mode, and the loading and updating mode needs manpower input; and, directly restarting and loading the process can interrupt the task being processed by the process, and data damage or loss is easily caused.
Disclosure of Invention
In view of the above, the present invention has been developed to provide a process restart method, apparatus, computing device, and computer storage medium that overcome or at least partially address the above-identified problems.
According to an aspect of the present invention, there is provided a process restarting method, including:
when the file which is depended on by the process is detected to be updated, generating a specific signal;
when the process actively inquires the specific signal every time the process is in an idle state or the process finishes processing the current task, the process stops running; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running;
and restarting the process and loading the updated file.
According to another aspect of the present invention, there is provided a process restart apparatus, including:
the generating module is suitable for generating a specific signal when detecting that the file which is depended on by the process is updated;
the stopping module is suitable for stopping the process when the process is in an idle state or the process finishes processing the current task and actively inquires the specific signal; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running;
and the restarting module is suitable for restarting the process and loading the updated file.
According to yet another aspect of the present invention, there is provided a computing device comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the process restarting method.
According to still another aspect of the present invention, a computer storage medium is provided, where at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform an operation corresponding to the process restarting method.
According to the process restarting method, the device, the computing equipment and the computer storage medium, when the update of a file which a process depends on is detected, a specific signal is generated; when the process actively inquires the specific signal every time the process is in an idle state or the process finishes processing the current task, the process stops running; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running; and restarting the process and loading the updated file. According to the scheme of the invention, the specific signal is obtained by two modes of active query or passive receiving, and the process is controlled to stop running under the condition that the process is in an idle state or the process finishes processing the current task, so that the task currently processed by the process is prevented from being influenced, and data is prevented from being damaged or lost; and then the updated file is restarted and loaded, so that the loading of the file is automatically completed without human input.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a flow diagram of a process restart method according to one embodiment of the invention;
FIG. 2 illustrates a flow diagram of a process restart method according to another embodiment of the present invention;
FIG. 3 illustrates a flow diagram of a process restart method according to yet another embodiment of the present invention;
FIG. 4 shows a functional block diagram of a process restart apparatus according to one embodiment of the present invention;
FIG. 5 illustrates a schematic structural diagram of a computing device according to an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 1 shows a flow diagram of a process restart method according to one embodiment of the invention. As shown in fig. 1, the method comprises the steps of:
step S110: when a process-dependent file update is detected, a specific signal is generated.
Specifically, whether a file dependent on a process is updated or not can be detected through real-time or quasi-real-time detection, and a specific signal is generated when the file is detected to be updated.
The invention does not specifically limit the detection mode for detecting whether the file is updated, and when the detection mode is specifically implemented, a person skilled in the art can detect the file according to any condition capable of determining that the file is updated. Optionally, whether the process-dependent file is updated or not is detected according to the file size, the characteristic value of the file content, the timestamp of the file, and/or according to the file modification record.
Step S120: and after the process is in an idle state or the process finishes processing the current task, the control process stops running.
After the specific signal is generated, according to the specific signal, the corresponding process is controlled to stop running, and then the restarting loading is carried out. In order to avoid data damage or loss of a task being processed due to blind process stopping, the process is controlled to stop running when the process is in an idle state or after the process finishes processing the current task.
Specifically, the manner of acquiring the specific signal by the process is divided into two types, namely active query and passive reception, and the corresponding processes for controlling the process to stop running are also different: in the first mode, the process stops running when the process is in an idle state or actively inquires a specific signal after the process finishes processing the current task. And in the second mode, when the process passively receives a specific signal and is in an idle state or finishes processing the current task, the process stops running. By the two modes, the control process can stop running under the condition that the process does not have the task currently processed.
Step S130: and restarting the process and loading the updated file.
According to the process restarting method provided by the embodiment, when the update of the file which the process depends on is detected, a specific signal is generated; when the process is in an idle state or the process finishes processing the current task and actively inquires a specific signal, the process stops running; or, when the process passively receives a specific signal and is in an idle state or finishes processing the current task, the process stops running; and restarting the process and loading the updated file. According to the scheme of the embodiment, the specific signal is obtained through two modes of active query or passive receiving, and the process is controlled to stop running under the condition that the process is in an idle state or the process finishes processing the current task, so that data damage or loss is avoided; and then the updated file is restarted and loaded, so that the loading of the file is automatically completed without human input.
FIG. 2 illustrates a flow diagram of a process restart method according to another embodiment of the present invention. In the present embodiment, the specific signal is obtained by means of active query. As shown in fig. 2, the method comprises the steps of:
step S210: when the file which is depended on by the process is detected to be updated, generating a specific signal; storing the particular signal for querying by at least one process that depends on the file for which the update occurred.
When the file is updated, the time stamp of the file is updated to the time when the file is updated. Based on the above, when the time stamp corresponding to the process-dependent file is detected to be changed, the process-dependent file is determined to be updated. Specifically, a timestamp corresponding to a file dependent on a process is detected, and if the time corresponding to the timestamps of the files detected in the last two times is different, it is indicated that the file is updated, and a specific signal is generated.
After the specific signal is generated, the specific signal is stored in a database or a specific file. Further, in order to facilitate the process to directly determine whether a specific signal for updating a file that the process depends on exists through active query, in some embodiments of the present invention, the generated specific signal is represented by different identifiers for different files or different processes depending on the file that the process depends on, and during the active query, the process may directly determine whether the specific signal for updating the file that the process depends on exists according to different identifiers of the specific signal, or may directly determine the specific file that the process depends on. For example, process 1 depends on file a, and process 2 depends on file b, and generates a specific signal 1 when file a is updated, and generates a specific signal 2 when file b is updated. If the specific signal 1 is queried in an active query manner, the process 1 may directly determine that there is a specific signal for updating a file that the process depends on, and the process 2 determines that there is no specific signal for updating a file that the process depends on.
In other embodiments of the present invention, when storing the specific signal, the specific signal is stored in the specific location associated with the corresponding process according to the relationship list between the process and the file on which the process depends, and in the active query process, the process may query the corresponding specific location to directly determine whether there is a specific signal in which the file on which the process depends is updated.
Step S220: and stopping the process when the process is in an idle state or actively inquires a specific signal when the process finishes processing the current task.
In this embodiment, the process acquires the specific signal in an active query manner, and this acquisition manner can control the time of active query by the process, and by actively querying the specific signal whenever the process is in an idle state or when the process finishes processing the current task, the purpose of not affecting the processing of the current task by the process and maintaining the integrity of data can be achieved to the greatest extent.
When a plurality of threads exist in the process, the process is in an idle state, specifically, each thread in the process is in an idle state, and no task is being processed in each thread at the moment; when a plurality of threads exist in the process, the process finishes processing the current task, specifically, each thread in the process finishes processing the corresponding thread current task, and correspondingly, whether the process finishes processing the current task is determined, that is, whether each thread finishes processing the corresponding thread current task is determined. In some embodiments of the present invention, the method for determining whether a process has finished processing a current task is: when any thread in the process finishes processing the corresponding thread current task, the thread judges whether other threads in the process finish processing the corresponding thread current task, if so, the process is determined to finish processing the current task; if not, waiting until all threads finish the current tasks of the corresponding threads. The method has a premise that a signal is checked when a thread finishes processing a current task, and if the signal exists, the thread does not receive a new task any more, so that the thread processes the state of the finished task and waits for other threads to judge the state. When any thread finishes processing the current task of the corresponding thread, the method for judging whether other threads finish processing the current tasks of the corresponding threads is triggered, so that the judgment of all threads at the same time at high frequency is avoided, and the calculation amount is reduced; and when any thread finishes processing the corresponding thread current task, triggering judgment, and accurately determining the time when all threads finish processing the corresponding thread current task each time so as to inquire a specific signal in time. However, the present invention is not limited thereto, and in the specific implementation, a person skilled in the art may determine whether the process has finished processing the current task in other ways according to hardware conditions and actual requirements, for example, determine whether the process has finished processing the current task at preset time intervals.
Specifically, when the process is in an idle state or the process finishes processing the current task, the process actively queries whether a specific signal for updating the file depended by the process exists in a database or a specific file, and if the specific signal exists, the process is controlled to stop running. If not, the next time the process is in an idle state or the process finishes processing the current task, and the active query and the subsequent steps are executed again.
Step S230: and restarting the process and loading the updated file.
Specifically, whether the process is in a running state is detected by an activation process at preset time intervals; if not, the process is restarted.
According to the process restarting method provided by the embodiment, when the file on which the process depends is detected to be updated, a specific signal is generated and stored in a database or a specific file, so that the process actively queries the specific signal; when the process is in an idle state or the process finishes processing the current task and actively inquires a specific signal, the process stops running; detecting whether the process is in a running state or not at preset time intervals by the activation process; if not, the process is restarted. By using the process restarting method provided by the embodiment, the generated specific signal is acquired in an active query mode, the time of active query can be controlled by the process, and the purpose of not influencing the process to process the current task and maintaining the integrity of data can be achieved to the greatest extent by actively querying the specific signal every time the process is in an idle state or the process finishes processing the current task; and then the updated file is restarted and loaded, so that the loading of the file is automatically completed without human input.
FIG. 3 illustrates a flow diagram of a process restart method according to yet another embodiment of the present invention. In this embodiment, the specific signal is acquired by passive reception. As shown in fig. 2, the method comprises the steps of:
step S310: a relational list of processes and files on which the processes depend is established.
By establishing a relationship list of processes and files on which the processes depend, when a plurality of processes exist, it is convenient to determine at least one process which depends on a file which is updated and corresponds to a specific signal.
Step S320: when a process-dependent file update is detected, a specific signal is generated.
When the file is updated, the time stamp of the file is updated to the time when the file is updated. Based on the above, when the time stamp corresponding to the process-dependent file is detected to be changed, the process-dependent file is determined to be updated. Specifically, a timestamp corresponding to a file dependent on a process is detected, and if the time corresponding to the timestamps of the files detected in the last two times is different, it is indicated that the file is updated, and a specific signal is generated.
Step S330: querying the relationship list to obtain at least one process depending on the updated file; a particular signal is sent to at least one process.
After the specific signal is generated, the updated file corresponding to the specific signal is inquired in the relation list, at least one process corresponding to the updated file in the relation list is obtained through the corresponding relation between the process in the relation list and the updated file, then the specific signal is sent to the at least one process, and therefore the process which needs to be restarted and the updated file is loaded is rapidly and accurately determined.
Step S340: and stopping the process when the process passively receives a specific signal and is in an idle state or the process finishes processing the current task.
In the embodiment, the process acquires the specific signal in a passive receiving manner, and the acquisition manner can enable the process to acquire the specific signal in time, so that the improvement of the loading timeliness is facilitated; and the process directly and passively receives a specific signal that the file depended on by the process is updated, and other processing processes determine at least one process depending on the updated file, so that the processing flow of the process is reduced, and the influence on the efficiency and the progress of the process processing task is further reduced.
Specifically, when the process passively receives a specific signal, whether the process is in an idle state or whether the process finishes processing the current task is judged, if the judgment result is that the process is not in the idle state or the process finishes processing the current task, the process is continuously judged in the process of processing the task until the process is judged to be in the idle state or the process finishes processing the current task, the process is controlled to stop running, and therefore the purposes of not influencing the process to process the current task and maintaining the integrity of data are achieved.
When a plurality of threads exist in the process, the process is in an idle state, specifically, each thread in the process is in an idle state, and no task is being processed in each thread at the moment; the method has a premise that a signal is checked when a thread finishes processing a current task, and if the signal exists, the thread does not receive a new task any more, so that the thread processes the state of the finished task and waits for other threads to judge the state. When a plurality of threads exist in the process, the process finishes processing the current task, specifically, each thread in the process finishes processing the corresponding thread current task, and correspondingly, whether the process finishes processing the current task is determined, that is, whether each thread finishes processing the corresponding thread current task is determined. In some embodiments of the present invention, the method for determining whether a process has finished processing a current task is: when any thread in the process finishes processing the corresponding thread current task, the thread judges whether other threads in the process finish processing the corresponding thread current task, if so, the process is determined to finish processing the current task; if not, waiting until all threads finish the current tasks of the corresponding threads. When any thread finishes processing the current task of the corresponding thread, the method for judging whether other threads finish processing the current tasks of the corresponding threads is triggered, so that the judgment of all threads at the same time at high frequency is avoided, and the calculation amount is reduced; and when any thread finishes processing the corresponding thread current task, triggering judgment, and accurately determining the time when all threads finish processing the corresponding thread current task each time so as to inquire a specific signal in time. However, the present invention is not limited thereto, and in the specific implementation, a person skilled in the art may determine whether the process has finished processing the current task in other ways according to hardware conditions and actual requirements, for example, determine whether the process has finished processing the current task at preset time intervals.
Step S350: and restarting the process and loading the updated file.
Specifically, whether the process is in a running state is detected by an activation process at preset time intervals; if not, the process is restarted.
According to the process restarting method provided by the embodiment, a relationship list of the process and the file on which the process depends is established so as to determine at least one process which depends on the updated file corresponding to the specific signal; when the file which is depended on by the process is detected to be updated, generating a specific signal; querying the relationship list to obtain at least one process depending on the updated file; sending a specific signal to at least one process; when the process passively receives a specific signal and is in an idle state or finishes processing the current task, the process stops running; and restarting the process and loading the updated file. By using the process restarting method provided by the embodiment, at least one process depending on the updated file is determined timely and accurately by querying the relationship list when a plurality of processes exist by establishing the relationship list of the process and the file depending on the process; the process acquires the generated specific signal in a passive receiving mode, so that the process can acquire the specific signal in time, and the loading timeliness is further improved; and when the process is in an idle state or the process finishes processing the current task, the process stops running, so that the aims of not influencing the process to process the current task and maintaining the integrity of data can be achieved to the greatest extent; and then the updated file is restarted and loaded, so that the loading of the file is automatically completed without human input.
FIG. 4 shows a functional block diagram of a process restart apparatus according to one embodiment of the present invention. As shown in fig. 4, the apparatus includes: the generating module 410, the stopping module 420, and the restarting module 430, optionally, the apparatus further includes: a construction module 440, a query module 450, a sending module 460, and a storage module 470.
A generating module 410 adapted to generate a specific signal when detecting that a process-dependent file is updated;
a stopping module 420, adapted to stop the process when the specific signal is actively queried whenever the process is in an idle state or the process finishes processing a current task; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running;
and the restarting module 430 is adapted to restart the process and load the updated file.
In an alternative embodiment, the generating module 410 is further adapted to: and when detecting that the time stamp corresponding to the process-dependent file changes, determining that the process-dependent file is updated.
The stop module 420 further comprises: when any thread in the process finishes processing the corresponding thread current task, the thread judges whether other threads in the process finish processing the corresponding thread current task, if so, the process is determined to finish processing the current task; if not, waiting until all the threads finish the current tasks of the corresponding threads.
Wherein the process being in an idle state specifically includes: each thread in the process is in an idle state.
The building module 440 is adapted to build a relationship list of processes and files on which the processes depend.
A query module 450 adapted to query the relationship list for at least one process dependent on the updated file;
a sending module 460 adapted to send the specific signal to the at least one process.
A storage module 470 adapted to store the specific signal for querying by at least one process dependent on the file for which the update occurred.
The storage module 470 is further adapted to: and storing the specific signal in a specific position associated with the corresponding process according to the relation list of the process and the file on which the process depends.
The restart module 430 is further adapted to: detecting whether the process is in a running state at preset time intervals; if not, restarting the process.
The specific structure and operation principle of each module described above may refer to the description of the corresponding step in the method embodiment, and are not described herein again.
The embodiment of the application provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the process restarting method in any method embodiment.
Fig. 5 is a schematic structural diagram of a computing device according to an embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
As shown in fig. 5, the computing device may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein:
the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508.
A communication interface 504 for communicating with network elements of other devices, such as clients or other servers.
The processor 502 is configured to execute the program 510, and may specifically execute the relevant steps in the above process restart method embodiment.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations:
when the file which is depended on by the process is detected to be updated, generating a specific signal;
when the process actively inquires the specific signal every time the process is in an idle state or the process finishes processing the current task, the process stops running; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running;
and restarting the process and loading the updated file.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations:
and when detecting that the time stamp corresponding to the process-dependent file changes, determining that the process-dependent file is updated.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations:
when any thread in the process finishes processing the corresponding thread current task, the thread judges whether other threads in the process finish processing the corresponding thread current task, if so, the process is determined to finish processing the current task; if not, waiting until all the threads finish the current tasks of the corresponding threads.
In an optional manner, the process being in the idle state specifically includes: each thread in the process is in an idle state.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations: a relational list of processes and files on which the processes depend is established.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations:
querying the relationship list to obtain at least one process depending on the updated file;
transmitting the particular signal to the at least one process.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations:
storing the particular signal for querying by at least one process that depends on the file for which the update occurred.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations:
and storing the specific signal in a specific position associated with the corresponding process according to the relation list of the process and the file on which the process depends.
In an alternative manner, the program 510 may specifically be further configured to cause the processor 502 to perform the following operations: detecting whether the process is in a running state at preset time intervals; if not, restarting the process.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in a process restart apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.

Claims (16)

1. A process restart method, comprising:
when the file which is depended on by the process is detected to be updated, generating a specific signal;
inquiring a relation list of the process and the process-dependent file to obtain at least one process dependent on the updated file;
sending the particular signal to the at least one process;
when the process actively inquires the specific signal every time the process is in an idle state or the process finishes processing the current task, the process stops running; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running;
and restarting the process and loading the updated file.
2. The method of claim 1, wherein the process-dependent file is determined to be updated when a change in a timestamp corresponding to the process-dependent file is detected.
3. The method of claim 1, wherein the process completing a current task further comprises:
when any thread in the process finishes processing the corresponding thread current task, the thread judges whether other threads in the process finish processing the corresponding thread current task, if so, the process is determined to finish processing the current task; if not, waiting until all the threads finish the current tasks of the corresponding threads.
4. The method according to claim 1, wherein the process being in an idle state is specifically: each thread in the process is in an idle state.
5. The method of claim 1, wherein after generating a particular signal when an update of a process-dependent file is detected, the method further comprises:
storing the particular signal for querying by at least one process that depends on the file for which the update occurred.
6. The method of claim 5, wherein storing the particular signal further comprises:
and storing the specific signal in a specific position associated with the corresponding process according to the relation list of the process and the file on which the process depends.
7. The method according to any of claims 1-6, wherein the restarting the process is in particular: detecting whether the process is in a running state at preset time intervals; if not, restarting the process.
8. A process restart apparatus, comprising:
the generating module is suitable for generating a specific signal when detecting that the file which is depended on by the process is updated;
the construction module is suitable for establishing a relation list of the process and the file on which the process depends;
the query module is suitable for querying the relation list to obtain at least one process depending on the updated file;
a transmitting module adapted to transmit the specific signal to the at least one process;
the stopping module is suitable for stopping the process when the process is in an idle state or the process finishes processing the current task and actively inquires the specific signal; or, when the process passively receives the specific signal and is in an idle state or after the process finishes processing the current task, the process stops running;
and the restarting module is suitable for restarting the process and loading the updated file.
9. The apparatus of claim 8, wherein the generation module is further adapted to: and when detecting that the time stamp corresponding to the process-dependent file changes, determining that the process-dependent file is updated.
10. The apparatus of claim 8, wherein the stopping means further comprises:
when any thread in the process finishes processing the corresponding thread current task, the thread judges whether other threads in the process finish processing the corresponding thread current task, if so, the process is determined to finish processing the current task; if not, waiting until all the threads finish the current tasks of the corresponding threads.
11. The apparatus according to claim 8, wherein the process being in an idle state is specifically: each thread in the process is in an idle state.
12. The apparatus of claim 8, wherein the apparatus further comprises:
a storage module adapted to store the specific signal for querying by at least one process dependent on the file for which the update occurred.
13. The apparatus of claim 12, wherein the storage module is further adapted to:
and storing the specific signal in a specific position associated with the corresponding process according to the relation list of the process and the file on which the process depends.
14. The apparatus of any of claims 8-13, wherein the restart module is further adapted to: detecting whether the process is in a running state at preset time intervals; if not, restarting the process.
15. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the process restarting method according to any one of claims 1-7.
16. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to the process restart method of any one of claims 1-7.
CN201810712658.3A 2018-06-29 2018-06-29 Process restarting method and device, computing equipment and computer storage medium Active CN109032777B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810712658.3A CN109032777B (en) 2018-06-29 2018-06-29 Process restarting method and device, computing equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810712658.3A CN109032777B (en) 2018-06-29 2018-06-29 Process restarting method and device, computing equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN109032777A CN109032777A (en) 2018-12-18
CN109032777B true CN109032777B (en) 2021-02-05

Family

ID=65521389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810712658.3A Active CN109032777B (en) 2018-06-29 2018-06-29 Process restarting method and device, computing equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN109032777B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001147814A (en) * 1999-11-18 2001-05-29 Seiko Epson Corp Start processing updating device
CN101515234A (en) * 2009-03-26 2009-08-26 华亚微电子(上海)有限公司 Associated data processing method and associated data device
CN100543683C (en) * 2006-12-26 2009-09-23 华为技术有限公司 The method and system that process is monitored

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090133014A1 (en) * 2007-11-16 2009-05-21 Nokia Corporation Methods, apparatuses and computer program product for automatic download of software dependencies on installation
US9116759B2 (en) * 2011-02-18 2015-08-25 Ab Initio Technology Llc Restarting data processing systems
US9588576B2 (en) * 2011-09-12 2017-03-07 Microsoft Technology Licensing, Llc Managing processes within suspend states and execution states
CN104461723B (en) * 2014-12-16 2019-06-25 北京奇安信科技有限公司 A kind of course control method, apparatus and system
CN105117265B (en) * 2015-09-17 2019-02-15 珠海豹趣科技有限公司 A kind of method, apparatus and terminal of document upgrading
CN105893076A (en) * 2015-12-25 2016-08-24 乐视致新电子科技(天津)有限公司 Over the air upgrade method and device
CN107544828A (en) * 2017-09-01 2018-01-05 北京奇虎科技有限公司 Configuring load application method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001147814A (en) * 1999-11-18 2001-05-29 Seiko Epson Corp Start processing updating device
CN100543683C (en) * 2006-12-26 2009-09-23 华为技术有限公司 The method and system that process is monitored
CN101515234A (en) * 2009-03-26 2009-08-26 华亚微电子(上海)有限公司 Associated data processing method and associated data device

Also Published As

Publication number Publication date
CN109032777A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN107872528B (en) Message pushing method and device
CN108123851B (en) Survival detection method and device for master-slave node synchronous link in distributed system
CN107404540B (en) Data synchronization method and device
US7971110B2 (en) System and method for testing a serial attached small computer system interface
WO2017193737A1 (en) Software testing method and system
CN111988240B (en) Data transmission method and device, electronic equipment and storage medium
US20130117755A1 (en) Apparatuses, systems, and methods for distributed workload serialization
CN106656675B (en) Detection method and device for transmission node cluster
US9979783B2 (en) Distributed coordinated snapshots
CN105049240A (en) Message processing method and server
CN109032777B (en) Process restarting method and device, computing equipment and computer storage medium
CN106649584B (en) Index processing method and device in master-slave database system
CN110765392A (en) Data loading method and device, storage medium and terminal
CN116521573A (en) Automatic test method, device, equipment and storage medium
CN110955460A (en) Service process starting method and device, electronic equipment and storage medium
CN105630889B (en) Universal caching method and device
CN111367921A (en) Data object refreshing method and device
CN110022296B (en) Real-time data processing method and device, storage medium and computer equipment
CN112084014A (en) Data processing method, device, equipment and medium
CN112015551A (en) Coroutine pool management method and coroutine pool management device
CN111737036A (en) Service processing method and device based on robot process automation
CN109286672A (en) A kind of processing method, device and the server of user's request
CN111124923B (en) Running state query method and device, server equipment and storage medium
CN111104167B (en) Calculation result submitting method and device
CN115883556A (en) Signal processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20201203

Address after: 1765, 15 / F, 17 / F, building 3, 10 Jiuxianqiao Road, Chaoyang District, Beijing 100020

Applicant after: Beijing Hongxiang Technical Service Co., Ltd

Address before: 100088 Beijing city Xicheng District xinjiekouwai Street 28, block D room 112 (Desheng Park)

Applicant before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant