CN110968472A - Process processing method and device, storage medium and processor - Google Patents

Process processing method and device, storage medium and processor Download PDF

Info

Publication number
CN110968472A
CN110968472A CN201811163434.8A CN201811163434A CN110968472A CN 110968472 A CN110968472 A CN 110968472A CN 201811163434 A CN201811163434 A CN 201811163434A CN 110968472 A CN110968472 A CN 110968472A
Authority
CN
China
Prior art keywords
target
file
running
condition
under
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811163434.8A
Other languages
Chinese (zh)
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 Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology 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 Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201811163434.8A priority Critical patent/CN110968472A/en
Publication of CN110968472A publication Critical patent/CN110968472A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Abstract

The invention discloses a process processing method, a process processing device, a storage medium and a processor. Wherein, the method comprises the following steps: under the condition that a target process needs to be operated, a target file corresponding to the target process is created; under the condition that a duplicate name file with the same name as the target file exists in the preset storage area, acquiring a process identifier of an existing process from the duplicate name file; detecting whether a process identifier of a target process exists in process identifiers of existing processes of a duplicate name file; and running the target process under the condition that the detection result is negative. The invention solves the technical problem of process conflict caused by a plurality of processes creating a plurality of files with the same name.

Description

Process processing method and device, storage medium and processor
Technical Field
The present invention relates to the field of computers, and in particular, to a process processing method, apparatus, storage medium, and processor.
Background
A process refers to an instance of a program that is running. In practical application, however, it needs to be ensured that when some processes are running, other processes related to the processes stop running, i.e. process singletons are kept. For example, for a write process, it is guaranteed that only one write process is running at the same time, otherwise, a write conflict is caused.
In order to ensure a single instance of a process, the prior art judges whether a file corresponding to the process exists or not, and returns to the existing process when detecting that the file exists; and if the file does not exist, creating the process, and deleting the file corresponding to the process when the process is finished.
However, if the file name corresponding to the other process is the same as the file name corresponding to the process but the processes are different, the process may not be run. In addition, when a process is abnormally finished, a file corresponding to the process is not deleted, and a process conflict is also generated.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a process processing method, a process processing device, a storage medium and a processor, which are used for at least solving the technical problem of process conflict caused by a plurality of processes creating a plurality of files with the same name.
According to an aspect of an embodiment of the present invention, a method for processing a process is provided, including: under the condition that a target process needs to be operated, a target file corresponding to the target process is created; under the condition that a duplicate name file with the same name as the target file exists in the preset storage area, acquiring a process identifier of an existing process from the duplicate name file; detecting whether a process identifier of a target process exists in process identifiers of existing processes of a duplicate name file; and running the target process under the condition that the detection result is negative.
Further, the preset storage area is a storage area for storing the target file in the running process of the target process.
Further, the process processing method further includes: creating a target file; running a target process; and deleting the target file under the condition that the execution of the target process is detected to be finished.
Further, the process processing method further includes: and controlling the target process to stop running under the condition of detecting that the process identification of the target process exists in the process identifications of the existing processes of the rename file.
Further, the process processing method further includes: monitoring the running state of a target process; and deleting the target file under the condition that the running state indicates that the target process is abnormally ended.
According to another aspect of the embodiments of the present invention, there is also provided a processing apparatus for a process, including: the creating module is used for creating a target file corresponding to the target process under the condition that the target process needs to be operated; the acquisition module is used for acquiring the process identifier of the existing process from the duplicate name file under the condition of judging that the duplicate name file with the same name as the target file exists in the preset storage area; the detection module is used for detecting whether a process identifier of a target process exists in process identifiers of existing processes of the duplicate name file; and the running module is used for running the target process under the condition that the detection result is negative.
Further, the processing device of the process further comprises: the first creating module is used for creating a target file; the running module is used for running the target process; and the deleting module is used for deleting the target file under the condition that the execution of the target process is detected to be finished.
Further, the processing device of the process further comprises: the monitoring module is used for monitoring the running state of the target process; and the processing module is used for deleting the target file under the condition that the running state indicates that the target process is abnormally ended.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein the program executes a processing method of a process.
According to another aspect of the embodiments of the present invention, there is also provided a processor configured to execute a program, where the program executes a processing method of a process when running.
In the embodiment of the invention, the target file corresponding to the target process is created by writing the process identifier into the file corresponding to the process under the condition that the target process needs to be operated. And then under the condition that the duplicate name file with the same name as the target file exists in the preset storage area, acquiring the process identification of the existing process from the duplicate name file, detecting whether the process identification of the target process exists in the process identification of the existing process of the duplicate name file, and operating the target process under the condition that the detection result is negative. In the above process, because the file names are the same and the process identifiers contained in the file may be different, when a duplicate file with the same name as the target file is detected, it is further detected whether the process identifier in the duplicate file is the same as the process identifier of the target process, and only when the process identifiers are the same, it is determined that the target process conflicts with the existing process; and under the condition that the process identifications are different, the target process can be executed, so that the problem of process conflict when the file names are the same and the processes are different is avoided, and a process single instance is ensured.
Therefore, the technical problem of process conflict caused by the fact that multiple processes create multiple files with the same name can be solved through the scheme provided by the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a method of processing a process according to an embodiment of the invention;
FIG. 2 is a flow chart of a method of processing an alternative process according to an embodiment of the invention; and
fig. 3 is a schematic structural diagram of a processing device of a process according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided a method of processing an embodiment of a process, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of a processing method of a process according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, under the condition that the target process needs to be operated, a target file corresponding to the target process is created.
It should be noted that the target process is a process to be run, and before running, the target process first creates a file corresponding to the target process, where the file includes a target process identifier of the target process, that is, a process number of the target process. In an alternative, the file names of the files created by the processes of the same type are the same, for example, the file names of the files created by the two writing processes are the same, and the file names of the files created by the reading process and the writing process are different. In another alternative, the file name is determined according to the area accessed by the process, for example, if the areas operated by the writing process a and the reading process B are the same, the file names of the files corresponding to the two processes are the same although the writing process a and the reading process B are different processes.
In addition, it should be noted that the existence of the target file indicates that the target process corresponding to the target file is running, and the target file is also deleted when the target process is finished, i.e. the life cycle of the target file is the life cycle of the target process.
And step S104, under the condition that the duplicate name file with the same name as the target file exists in the preset storage area, acquiring a process identifier of the existing target process from the duplicate name target file, wherein the target process identifier is used for identifying the target process.
It should be noted that the preset storage area is a storage area where the target file is stored in the target process running process. After the process creates the file, the file is stored in the preset storage area, that is, only the file corresponding to the running process is stored in the preset storage area, the file created by the process to be run is temporarily stored in other storage areas, and only after the process to be run is determined to be able to run normally, the file corresponding to the process to be run is stored in the preset storage area.
In addition, since the file name of the target file created by the target process may be the same as the file name corresponding to the existing process, in order to avoid process conflict, when there is a duplicate file having the same name as the target file, the processor may further obtain the process identifier of the existing process from the duplicate file, and further detect the process identifier. For example, if process a is a target process, the file name of the target file corresponding to process a is a, and the existing process is process B, and if the file name corresponding to process B is also a, the processor determines that the file names of process a and process B are the same, and obtains the process identifier of process B from the file corresponding to process B, and then compares whether the process identifier of process a is the same as the process identifier of process B.
In another optional scheme, the processor may further obtain a target process identifier corresponding to the target process from the target file, and compare whether the target process identifier in the target file is the same as the process identifier in the rename file.
Step S106, whether the process identification of the target process exists in the process identifications of the existing processes of the duplicate name file is detected.
It should be noted that, when it is detected that a duplicate name file having the same name as the target file exists, the processor acquires the process identifier of the existing process from the duplicate name file, acquires the identifier of the target process from the target file, and then determines whether the target process identifier is the same as the content included in the duplicate name file by comparing whether the target process identifier and the content included in the duplicate name file are the same, if the target process identifier and the identifier of the target process are the same, it is determined that the target process identifier exists in the duplicate name file, otherwise, it is determined that the target process identifier does not exist in the duplicate name file.
And step S108, running the target process under the condition that the detection result is negative.
It should be noted that, when it is detected that the target process identifier does not exist in the rename file, it is indicated that the target process is a different process from the existing process corresponding to the rename file, at this time, the processor controls the target process to run, and after the target process runs, deletes the target file corresponding to the target process. For example, the file names of the files created by the writing process a and the writing process B operating on different areas are the same, but the process identifications contained in the files are different, and at this time, the writing process a and the writing process B can run simultaneously.
Based on the schemes defined in steps S102 to S108, it can be known that, in a manner of writing a process identifier in a file corresponding to a process, a target file corresponding to a target process is created by running the target process when the target process needs to be run. And then under the condition that the duplicate name file with the same name as the target file exists in the preset storage area, acquiring the process identification of the existing process from the duplicate name file, detecting whether the process identification of the target process exists in the process identification of the existing process of the duplicate name file, and operating the target process under the condition that the detection result is negative.
It is easy to note that, because the file names are the same, the process identifiers contained in the files may be different, so that, when a duplicate name file with the same name as the target file is detected, whether the process identifier in the duplicate name file is the same as the process identifier of the target process is further detected, and only when the process identifiers are the same, it is determined that the target process conflicts with the existing process; and under the condition that the process identifications are different, the target process can be executed, so that the problem of process conflict when the file names are the same and the processes are different is avoided, and a process single instance is ensured.
Therefore, the technical problem of process conflict caused by the fact that multiple processes create multiple files with the same name can be solved through the scheme provided by the application.
When the duplicate name file contains the target process identifier, it indicates that the process that is the same as the target process is running, and at this time, the processor controls the target process to stop running. For example, the writing process a and the writing process B write to the same storage area, the file names of the files created by the writing process a and the writing process B are the same, and the process identifications are also the same, when the writing process a is running and the writing process B is going to run, the processor controls the writing process B to be prohibited from running.
In an alternative scheme, the processor may obtain a process identifier of an existing process from the rename file, and may also obtain a target process identifier from the target file, where obtaining the target process identifier from the target file may include the following steps:
step S1020, obtaining a first file name and a second file name of the target file, where the second file name is a file name of a file corresponding to an existing process;
step S1022, detecting whether the first file name is the same as the second file name;
step S1024, under the condition that the first file name is the same as the second file name, acquiring the target process identification from the target file.
For example, when the process a is a target process, the first file name of the target file corresponding to the process a is X, and the second file name corresponding to the other process B running in the processor is also X, at this time, the processor acquires the target process identifier from the target file to further determine whether the process a and the process B are the same process.
If the first file name corresponding to the process A is X and the second file name corresponding to the process B is Y, namely the first file name is different from the second file name, namely the target file corresponding to the process A does not exist, at the moment, the processor creates the target file, operates the target process, and then deletes the target file under the condition that the execution of the target process is detected to be finished, so that process conflict is avoided.
It should be noted that the method for obtaining the process identifier of the existing process from the rename file is the same as the method for obtaining the target process identifier from the target file, and details are not repeated here.
Further, in order to avoid the problem that the process conflict is caused because the file corresponding to the process cannot be deleted due to abnormal end of the process, the processor monitors the running state of the target process after the target process is run, and deletes the target file when the running state indicates that the target process is abnormally ended.
It should be noted that, since the operation of deleting a file is generally located at the end of the process, if the process is abnormally ended in the execution process, the file may not be deleted, so that the processor may misunderstand that the process still exists. In order to solve the above problems, the scheme provided by the application can also monitor the process state, and when the process is abnormally ended, the monitoring module in the processor can receive a signal of the abnormal ending of the process and replace the process to delete the file, so that the situation that the file cannot be deleted when the process is abnormally ended is avoided.
In an alternative, fig. 2 illustrates an alternative process for the above. Specifically, before the target process starts to run, the processor detects whether a file with the same name as the target file corresponding to the target process exists, if so, further obtains a process identifier of the target process, detects whether a process with the same process identifier as the target process exists, and if so, the processor ends running the target process. And if the process with the same process identification as the target process does not exist, the processor creates a file, writes the process identification into the created file, then runs the target process, and deletes the file after the target process finishes running. In addition, when the processor detects that no file with the same name as the target file corresponding to the target process exists, the processor also creates the file, writes the process identification into the created file, then runs the target process, and deletes the file after the target process finishes running. In the process, the monitoring module in the processor also monitors the running state of the target process in real time, and deletes the file corresponding to the process when the process is abnormally finished so as to prevent process conflict.
Example 2
According to an embodiment of the present invention, an embodiment of a process processing apparatus is further provided, and the apparatus can execute the process processing method provided in embodiment 1. Fig. 3 is a schematic structural diagram of a processing apparatus of a process according to an embodiment of the present invention, and as shown in fig. 3, the apparatus includes: a creation module 301, an acquisition module 303, a detection module 305, and an execution module 307.
The creating module 301 is configured to create a target file corresponding to a target process under the condition that the target process needs to be run; an obtaining module 303, configured to obtain a process identifier of an existing process from a rename file when it is determined that the rename file having the same name as the target file exists in the preset storage area; a detection module 305, configured to detect whether a process identifier of a target process exists in process identifiers of existing processes of a rename file; and an executing module 307, configured to execute the target process if the detection result is negative.
The preset storage area is a storage area for storing the target file in the running process of the target process.
It should be noted that the creating module 301, the obtaining module 303, the detecting module 305, and the running module 307 correspond to steps S102 to S108 in embodiment 1, and the four modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in embodiment 1.
In an optional scheme, the processing device of the process further includes: the device comprises a first creating module, an operating module and a deleting module. The first creating module is used for creating a target file; the running module is used for running the target process; and the deleting module is used for deleting the target file under the condition that the execution of the target process is detected to be finished.
In an optional scheme, the processing device of the process further includes: and a control module. The control module is used for controlling the target process to stop running under the condition that the process identification of the target process exists in the process identifications of the existing processes of the duplicate name file.
In an optional scheme, the processing device of the process further includes: monitoring module and processing module. The monitoring module is used for monitoring the running state of the target process; and the processing module is used for deleting the target file under the condition that the running state indicates that the target process is abnormally ended.
In addition, the processing device of the process further includes a processor and a memory, the creating module, the obtaining module, the detecting module, the running module, and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the target file corresponding to the target process is created by adjusting the kernel parameters under the condition that the target process needs to be operated. And then under the condition that the duplicate name file with the same name as the target file exists in the preset storage area, acquiring the process identification of the existing process from the duplicate name file, detecting whether the process identification of the target process exists in the process identification of the existing process of the duplicate name file, and operating the target process under the condition that the detection result is negative. In the above process, because the file names are the same and the process identifiers contained in the file may be different, when a duplicate file with the same name as the target file is detected, it is further detected whether the process identifier in the duplicate file is the same as the process identifier of the target process, and only when the process identifiers are the same, it is determined that the target process conflicts with the existing process; and under the condition that the process identifications are different, the target process can be executed, so that the problem of process conflict when the file names are the same and the processes are different is avoided, and a process single instance is ensured.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing a processing method of a process when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program runs to execute a processing method of a process.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: under the condition that a target process needs to be operated, a target file corresponding to the target process is created; under the condition that a duplicate name file with the same name as the target file exists in the preset storage area, acquiring a process identifier of an existing process from the duplicate name file; detecting whether a process identifier of a target process exists in process identifiers of existing processes of a duplicate name file; and running the target process under the condition that the detection result is negative. The preset storage area is a storage area for storing the target file in the running process of the target process.
Optionally, the program running on the processor, when the processor executes the program, further implements the following steps: creating a target file; running a target process; and deleting the target file under the condition that the execution of the target process is detected to be finished.
Optionally, the program running on the processor, when the processor executes the program, further implements the following steps: and controlling the target process to stop running under the condition of detecting that the process identification of the target process exists in the process identifications of the existing processes of the rename file.
Optionally, the program running on the processor, when the processor executes the program, further implements the following steps: monitoring the running state of a target process; and deleting the target file under the condition that the running state indicates that the target process is abnormally ended.
It should be noted that the device in this document may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: under the condition that a target process needs to be operated, a target file corresponding to the target process is created; under the condition that a duplicate name file with the same name as the target file exists in the preset storage area, acquiring a process identifier of an existing process from the duplicate name file; detecting whether a process identifier of a target process exists in process identifiers of existing processes of a duplicate name file; and running the target process under the condition that the detection result is negative. The preset storage area is a storage area for storing the target file in the running process of the target process.
Optionally, the device in which the storage medium is controlled to execute the following functions when the program runs: creating a target file; running a target process; and deleting the target file under the condition that the execution of the target process is detected to be finished.
Optionally, the device in which the storage medium is controlled to execute the following functions when the program runs: and controlling the target process to stop running under the condition of detecting that the process identification of the target process exists in the process identifications of the existing processes of the rename file.
Optionally, the device in which the storage medium is controlled to execute the following functions when the program runs: monitoring the running state of a target process; and deleting the target file under the condition that the running state indicates that the target process is abnormally ended.
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). The 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 identical elements in the process, method, article, or apparatus that comprises the element.
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 above are merely examples of the present application and are 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 (10)

1. A method for processing a process, comprising:
under the condition that a target process needs to be operated, a target file corresponding to the target process is created;
under the condition that a duplicate name file with the same name as the target file exists in a preset storage area, acquiring a process identifier of an existing process from the duplicate name file;
detecting whether the process identification of the target process exists in the process identifications of the existing processes of the rename file;
and running the target process under the condition that the detection result is negative.
2. The method according to claim 1, wherein the predetermined storage area is a storage area where the target file is stored during the running process of the target process.
3. The method according to claim 2, wherein in case that it is determined that the rename file does not exist in the preset storage area, the method further comprises:
creating the target file;
running the target process;
and deleting the target file under the condition that the execution of the target process is detected to be finished.
4. The method according to claim 1, wherein the target process is controlled to stop running when detecting that the process identifier of the target process exists in the process identifiers of the existing processes of the rename file.
5. The method of claim 1, wherein after running the target process, the method further comprises:
monitoring the running state of the target process;
and deleting the target file under the condition that the running state indicates that the target process is abnormally ended.
6. An apparatus for processing a process, comprising:
the system comprises a creating module, a processing module and a processing module, wherein the creating module is used for creating a target file corresponding to a target process under the condition that the target process needs to be operated;
the acquisition module is used for acquiring a process identifier of an existing process from a duplicate name file under the condition that the duplicate name file with the same name as the target file exists in a preset storage area;
the detection module is used for detecting whether the process identification of the target process exists in the process identifications of the existing processes of the duplicate name file;
and the running module is used for running the target process under the condition that the detection result is negative.
7. The apparatus according to claim 6, wherein the predetermined storage area is a storage area where the target file is stored during the running of the target process.
8. The apparatus of claim 7, further comprising:
the first creating module is used for creating the target file;
the running module is used for running the target process;
and the deleting module is used for deleting the target file under the condition that the execution of the target process is detected to be finished.
9. A storage medium characterized by comprising a stored program, wherein the program executes a processing method of the process of any one of claims 1 to 5.
10. A processor, characterized in that the processor is configured to execute a program, wherein the program executes a processing method of executing the process of any one of claims 1 to 5.
CN201811163434.8A 2018-09-30 2018-09-30 Process processing method and device, storage medium and processor Pending CN110968472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811163434.8A CN110968472A (en) 2018-09-30 2018-09-30 Process processing method and device, storage medium and processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811163434.8A CN110968472A (en) 2018-09-30 2018-09-30 Process processing method and device, storage medium and processor

Publications (1)

Publication Number Publication Date
CN110968472A true CN110968472A (en) 2020-04-07

Family

ID=70029432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811163434.8A Pending CN110968472A (en) 2018-09-30 2018-09-30 Process processing method and device, storage medium and processor

Country Status (1)

Country Link
CN (1) CN110968472A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005078123A (en) * 2003-08-29 2005-03-24 Nippon Telegr & Teleph Corp <Ntt> Failure detection system and method and its program
CN104866342A (en) * 2015-05-07 2015-08-26 北京数字天域科技有限责任公司 Method and device for simultaneously starting multiple same applications on intelligent terminal
CN106557360A (en) * 2016-11-09 2017-04-05 青岛海信电器股份有限公司 Task run method and device
CN106775980A (en) * 2016-12-15 2017-05-31 北京奇虎科技有限公司 A kind of process ID management method, device and computer-readable medium
CN107291322A (en) * 2016-04-11 2017-10-24 中兴通讯股份有限公司 A kind of information processing method and terminal
CN108228472A (en) * 2017-08-14 2018-06-29 珠海市魅族科技有限公司 Terminal equipment control method and device, terminal device and computer readable storage medium
CN111309456A (en) * 2018-12-12 2020-06-19 深圳市茁壮网络股份有限公司 Task execution method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005078123A (en) * 2003-08-29 2005-03-24 Nippon Telegr & Teleph Corp <Ntt> Failure detection system and method and its program
CN104866342A (en) * 2015-05-07 2015-08-26 北京数字天域科技有限责任公司 Method and device for simultaneously starting multiple same applications on intelligent terminal
CN107291322A (en) * 2016-04-11 2017-10-24 中兴通讯股份有限公司 A kind of information processing method and terminal
CN106557360A (en) * 2016-11-09 2017-04-05 青岛海信电器股份有限公司 Task run method and device
CN106775980A (en) * 2016-12-15 2017-05-31 北京奇虎科技有限公司 A kind of process ID management method, device and computer-readable medium
CN108228472A (en) * 2017-08-14 2018-06-29 珠海市魅族科技有限公司 Terminal equipment control method and device, terminal device and computer readable storage medium
CN111309456A (en) * 2018-12-12 2020-06-19 深圳市茁壮网络股份有限公司 Task execution method and system

Similar Documents

Publication Publication Date Title
CN106933733B (en) Method and device for determining memory leak position
CN112346829B (en) Method and equipment for task scheduling
CN109558143B (en) Method and device for deploying applications in cluster
CN109002348B (en) Load balancing method and device in virtualization system
CN110858166A (en) Application exception processing method and device, storage medium and processor
CN112559118A (en) Application data migration method and device, electronic equipment and storage medium
CN116594734A (en) Container migration method and device, storage medium and electronic equipment
CN110888723A (en) Timing task processing method and device
CN110968472A (en) Process processing method and device, storage medium and processor
CN111491021B (en) License data processing method and device for distributed cluster
CN109558249B (en) Control method and device for concurrent operation
CN110968406B (en) Method, device, storage medium and processor for processing task
CN114297630A (en) Malicious data detection method and device, storage medium and processor
CN115080309A (en) Data backup system, method, storage medium, and electronic device
CN114201284A (en) Timed task management method and system
CN114021115A (en) Malicious application detection method and device, storage medium and processor
CN114239098A (en) CAD drawing processing method and device, storage medium and processor
CN114064780A (en) Session information processing method, system, device, storage medium and electronic equipment
US10102052B2 (en) Dumping resources
CN107784040B (en) File issuing method and device
CN110968552B (en) Application information storage method and device
CN110851750B (en) Data acquisition method and device
CN113360168A (en) Configuration file updating method and device, storage medium and processor
CN110333985B (en) Method and device for recording operation information of mobile terminal
CN114116521A (en) Automatic testing method and device for management software

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200407