CN111414212A - Global process control method and device, computer equipment and storage medium - Google Patents

Global process control method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111414212A
CN111414212A CN202010226450.8A CN202010226450A CN111414212A CN 111414212 A CN111414212 A CN 111414212A CN 202010226450 A CN202010226450 A CN 202010226450A CN 111414212 A CN111414212 A CN 111414212A
Authority
CN
China
Prior art keywords
storage path
program
script
program storage
programs
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.)
Granted
Application number
CN202010226450.8A
Other languages
Chinese (zh)
Other versions
CN111414212B (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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010226450.8A priority Critical patent/CN111414212B/en
Publication of CN111414212A publication Critical patent/CN111414212A/en
Application granted granted Critical
Publication of CN111414212B publication Critical patent/CN111414212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a global process control method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: configuring program storage paths of a plurality of programs in a process list, and splicing a script storage path of a self-contained script behind the program storage path of a certain program when the self-contained script is configured in the program; acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs; searching a program storage path of the one or more target programs; and when the script storage path is not spliced or the script storage path matched with the operation command is not found, executing the operation command to the corresponding target program. The invention can realize the unified configuration management of a plurality of programs and is convenient to maintain.

Description

Global process control method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of process control, and in particular, to a method and an apparatus for global process control, a computer device, and a storage medium.
Background
When the program is started, stopped or viewed on the linux server, the starting, stopping or viewing command is mainly called to realize the starting, stopping or viewing. In order to facilitate maintenance and more quickly start, stop or view a program, a start, stop or view command is usually written in a script, and then the command in the script is called by executing the script, so that the start, stop or view operation of the program can be realized without using complex commands, and a plurality of commands can be written in one script according to a preset logical relationship and run simultaneously.
In practical applications, a project generally includes a plurality of programs for implementing different service functions, and in order to perform unified control on operations of the plurality of programs in the prior art, corresponding operation commands are generally configured for the plurality of programs in the same script, respectively, so as to implement simultaneous operations on the plurality of programs. However, the existing script can only operate the program under the same directory, but actually, the programs in the project are not necessarily stored in the same directory location. In addition, some programs in the project may be configured with their own scripts, for example, some programs may include third-party standard programs such as Apache and Tomcat, which all have their own dedicated start, stop or view scripts, in which case, the prior art needs multiple scripts to control all program processes in the project, and thus, it is impossible to perform unified configuration management on each program in the project, which is inconvenient for maintenance.
Disclosure of Invention
In view of the above-mentioned deficiencies of the prior art, the present invention provides a method, an apparatus, a computer device and a storage medium for global process control, so as to implement unified configuration management of multiple programs.
In order to achieve the above object, the present invention provides a global process control method, including:
configuring program storage paths of a plurality of programs in a pre-established process list, wherein when a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind the program storage path of the certain program;
acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs;
searching the program storage path of the one or more target programs from the process list;
when the program storage path corresponding to the target program is found, detecting whether a script storage path is spliced after the found program storage path, when the script storage path is spliced, searching the script storage path matched with the operation command from the spliced script storage path, then acquiring the corresponding self-contained script according to the matched script storage path, starting the acquired self-contained script, and when the script storage path is not spliced or the script storage path matched with the operation command is not found, executing the operation command corresponding to the target program.
In an embodiment of the present invention, when the command to be executed is an operation command for a plurality of target programs, finding program storage paths of the plurality of target programs from the process list includes:
and searching program storage paths of the target programs from the process list according to the arrangement sequence of the target programs in the command to be executed.
In an embodiment of the present invention, the searching for the program storage path of the one or more target programs from the preset process list includes:
and matching the program names of the one or more target programs with the last-level directory of each program storage path in the process list, and if the matching is successful, taking the matched program storage path as the program storage path of the corresponding target program.
In an embodiment of the present invention, the detecting whether the found program storage path is spliced with the script storage path includes:
and detecting whether a preset self-contained script mark is spliced after the program storage path, if so, judging that the script storage path is spliced after the program storage path, and otherwise, judging that the script storage path is not spliced after the program storage path.
In one embodiment of the invention, the operation command comprises a view, start or stop command.
In an embodiment of the present invention, the configuring program storage paths of a plurality of programs in a pre-established process list includes:
and arranging the program storage paths of the programs according to the sequence and the reverse order of the dependency relationship among the programs.
In one embodiment of the invention, the method further comprises: and when the program storage path corresponding to the target program is not found, outputting corresponding prompt information.
In order to achieve the above object, the present invention further provides a global process control apparatus, including:
the configuration module is used for configuring program storage paths of a plurality of programs in a pre-established process list, wherein when a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind the program storage path of the certain program;
the command acquisition module is used for acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs;
the program storage path searching module is used for searching the program storage paths of the one or more target programs from the process list;
the script storage path detection module is used for detecting whether a script storage path is spliced after the searched program storage path when the program storage path corresponding to the target program is searched;
the self-contained script running module is used for searching a script storage path matched with the operation command from the spliced script storage path when the script storage path is spliced behind the searched program storage path, then acquiring a corresponding self-contained script according to the matched script storage path and starting the acquired self-contained script;
and the command execution module is used for executing the operation command corresponding to the target program when the script storage path is not spliced behind the searched program storage path or the script storage path matched with the operation command is not searched.
In an embodiment of the present invention, when the command to be executed is an operation command for a plurality of target programs, the program storage path searching module searches the program storage paths of the plurality of target programs from the process list according to an arrangement order of the plurality of target programs in the command to be executed.
In one embodiment of the invention, the apparatus further comprises: and the prompting module is used for outputting corresponding prompting information when the program storage path corresponding to the target program is not found.
In an embodiment of the present invention, the program storage path searching module is specifically configured to:
and matching the program names of the one or more target programs with the last-level directory of each program storage path in the process list, and if the matching is successful, taking the matched program storage path as the program storage path of the target program.
In an embodiment of the present invention, the script storage path detecting module is specifically configured to:
when the program storage path corresponding to the target program is found, whether a preset self-contained script mark is spliced after the found program storage path is detected, if so, the script storage path is spliced after the found program storage path is judged, and otherwise, the script storage path is not spliced after the found program storage path is judged.
In one embodiment of the invention, the operation command comprises a view, start or stop command.
In one embodiment of the present invention, the configuration module arranges the program storage paths of the plurality of programs in the order of the dependency relationship between the plurality of programs and in the reverse order.
In order to achieve the above object, the present invention also provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the aforementioned method when executing the computer program.
In order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the aforementioned method.
By adopting the technical scheme, the invention has the following beneficial effects:
when a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind the program storage path of the certain program, and before an operation command for the target program is executed, the program storage path of the target program is searched from a preset process list; when the program storage path of the target program is found, whether a script storage path is spliced after the program storage path is detected, if the script storage path is spliced, a script storage path matched with the operation command is searched from the spliced script storage path, then a corresponding self-contained script is obtained according to the matched script storage path, the self-contained script is started, and if the script storage path is not spliced after the program storage path or the script storage path matched with the operation command is not searched, the operation command is executed. Therefore, on one hand, the position of the program in the project can be flexibly placed as long as the storage path of the program is configured in the process list, and on the other hand, the self-contained script of the program is integrated, so that when the programs in the project are not necessarily stored in the same directory position and some programs in the project have the exclusive self-contained script, the unified configuration management of the programs in the project can be realized, and the maintenance is convenient.
Drawings
FIG. 1 is a flow chart of a global process control method of the present invention;
FIG. 2 is a block diagram of a global process control apparatus according to the present invention;
fig. 3 is a hardware architecture diagram of the computer apparatus of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
Example one
The present embodiment provides a global process control method, so as to implement unified configuration management on each program in a project through a script (preferably a shell script), as shown in fig. 1, the method specifically includes the following steps:
and S1, configuring program storage paths of a plurality of programs in the pre-established process list, wherein when a certain program is configured with a self-contained script, the script storage path of the self-contained script is spliced behind the program storage path of the program.
For example, the list of processes that are configured is shown in table 1 below:
TABLE 1
Figure BDA0002427830900000061
In the process list shown in table 1, program storage paths of programs in a certain item are included, for example, "…/a" represents a program storage path of program a, "…/B" represents a program storage path of program B, "…/Tomcat" represents a program storage path of program Tomcat, and programs a, B, Tomcat may be programs written in languages such as JAVA/C + +, and the like.
When a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind a program storage path of the program, and a self-contained script identifier is arranged between the program storage path of the program and the spliced script storage path. For example, in the process list shown in table 1, a script storage path "OPTS" is spliced behind the program storage path of the program Tomcat; stop/pro-ject/Tomcat/bin/stop.sh; sh "showproject/Tomcat/bin/show. Wherein, the OTPS represents the self-contained script identifier, "start/project/Tomcat/bin/start.sh" represents the script storage path of the self-contained start script start.sh of the program Tomcat, "stop/project/Tomcat/bin/stop.sh" represents the script storage path of the self-contained stop script stop.sh of the program Tomcat, and "show project/Tomcat/bin/sh-ow.sh" represents the script storage path of the self-contained view script show.sh of the program Tomcat. In the embodiment, each self-contained script is configured to have a script name corresponding to an operation command executed by the self-contained script, for example, the script name is preset to be a script for executing a start operation command in start. In table 1, pass through "," separate, pass through between different script storage paths "between a script storage path and a corresponding program storage path; "spaced apart, it is to be understood that, except," "and"; the "partition" may be replaced by any other suitable symbol, and the self-contained script identifier may be replaced by any other suitable identifier besides "OTPS", and the invention is not limited in any way herein.
S2, acquiring a command to be executed, wherein the command to be executed is an operation command of the target program. In this embodiment, the operation command to the target program may include a start, stop, or view command.
And S3, searching the program storage path of the target program from the process list, if the program storage path of the target program is found, executing the step S4, otherwise, executing the step S5.
For example, assuming that the command to be executed is a start command for the program a, the program storage path of the program a is searched from the process list. When searching for the program storage path, the program name of the target program may be specifically matched with the last-level directory (i.e., the main entry execution class of the program) of each program storage path in the process list, and if the matching is successful, the matched program storage path is taken as the program storage path of the target program, and step S4 is executed, otherwise, it indicates that the program storage path of the target program does not exist in the process list, and step S5 is executed.
S4, when finding the program storage path of the target program from the process list, detecting whether a script storage path is spliced behind the program storage path of the target program, if so, finding the script storage path matched with the operation command from the spliced script storage path, acquiring the corresponding self-contained script according to the matched script storage path, then starting the acquired self-contained script to operate the target program, and if not, executing the operation command of the target program.
In this embodiment, whether the program storage path includes a script storage path may be detected by: and detecting whether the program storage path contains a preset self-contained script identifier (such as OTPS), if so, judging that the program storage path contains a script storage path, and otherwise, judging that the program storage path does not contain the script storage path.
In this embodiment, the script storage path matching the operation command may be found by the following steps: and matching the operation command with the last-stage directory in each script storage path contained in the program storage path, and if the matching is successful, acquiring the corresponding self-contained script according to the matched script storage path.
For example, when the pre-established process list is shown in table 1, assuming that the currently executed command is a show (show is predefined as a view function), that is, the view command for the program a is executed, the program storage path of the program a is searched from table 1, and after the program storage path is found, it is determined whether the script storage path is spliced after the program storage path of the program a is continued. As can be seen from table 1, if the script storage path is not spliced after the program storage path of the program a, the viewing command for the program a is directly executed to view the information of the current state, the start time, and the like of the program a.
For another example, when the pre-established process list is as in table 1, assuming that the currently executed command is stop tomcat (stop predefined as stop function), that is, executing the stop command for the program tomcat, searching whether the program storage path of the program tomcat exists from table 1, and after the program storage path is found, continuing to determine whether the script storage path is spliced after the program storage path of the program tomcat. As can be seen from table 1, the self-contained script identifier OTPS is spliced after the program storage path of the program Tomcat, that is, the script storage path is spliced after the program storage path of the program Tomcat is determined, then the script storage path matched with the stop command is searched from the spliced script storage path, since stop.sh is preset as the script for executing the stop function, the script storage path "stop/project/Tomcat/bin/stop.sh" corresponding to stop.sh is determined as the script storage path matched with the stop command, and then the corresponding self-contained script is obtained according to the matched script storage path "stop/project/Tomcat/bin/stop.sh", and the obtained self-contained script is started to stop the program Tomcat.
And S5, when the program storage path of the target program is not found in the process list, outputting corresponding prompt information to prompt that the target program does not exist, and ending the process. For example, when the pre-established process list is shown in table 1, assuming that the currently executed operation command is start d (start is predefined as a start function), that is, a start command for program d is executed, then it is searched from table 1 whether a program storage path of program d exists, and if not, a prompt message indicating that program d is not found is output and the flow is ended.
In an embodiment of the present invention, the command to be executed may be an operation command for multiple target programs, that is, process control for multiple programs may be implemented by one operation command, for example, a start instruction, a stop instruction, or a show instruction may be followed by multiple program names, such as a, b, and c, to implement batch start, stop, or view operations on the programs a, b, and c. In this case, the previous steps S3 to S5 may be sequentially executed with the programs a, b, and c as target programs.
In an embodiment of the present invention, a batch operation on all programs in the process list can also be realized through one operation command. For example, when a program name is not set in an operation command, the operation command may be identified as a batch control for all programs in the process list, for example, if the show is not followed by any program name, the operation command is considered as a view command for all programs in the process list. When the batch operation on all the programs is performed, the aforementioned steps S3 to S5 may be performed in a predetermined order with each program in the progress list as a target program in turn.
In practical application, program storage paths can be sorted according to the dependency relationship between programs when a process list is established. For example, assuming A, B two programs, if B program start needs to depend on a program, then program storage path of a is written before and B is written after in the process list, and when executing start commands for all programs in the process list, start is performed in order; when a stop command for all programs in the process list is executed, stopping is performed in the reverse order. Of course, the program storage path of B may be written before the program storage path of a in the process list, and then the program storage path of a may be written after the program storage path of B, and when the start command for all the programs in the process list is executed, the program may be started in the reverse order; when a stop command for all programs in the process list is executed, the stop is performed in order.
After the method of the invention is adopted, on one hand, the position of the program in the project can be flexibly placed as long as the storage path of the program is configured in the process list, and on the other hand, the self-contained script of the program is integrated, therefore, when the programs in the project are not necessarily stored in the same directory position and some programs in the project have the exclusive self-contained script, the unified configuration management of the programs in the project can be realized, and the maintenance is convenient.
It should be noted that, for the sake of simplicity, the present embodiment is described as a series of acts, but those skilled in the art should understand that the present invention is not limited by the described order of acts, because some steps can be performed in other orders or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Example two
The present embodiment provides a global process control apparatus 10, as shown in fig. 2, the apparatus 10 includes:
the configuration module 11 is configured to configure program storage paths of a plurality of programs in a pre-established process list, where when a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind the program storage path of the certain program. For example, in the process list shown in Table 1, "…/A/a" indicates the program storage path of program a, "…/B/B" indicates the program storage path of program B,
"…/Tomcat" represents the program storage path of program Tomcat, and programs a, b, Tomcat may be programs written in languages of JAVA/C + +, etc.
When a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind a program storage path of the program, and a self-contained script identifier (such as OTPS) is arranged between the program storage path and the spliced script storage path. In this embodiment, the script storage path and the corresponding program storage path may pass through "," separate ", and different script storage paths may pass through"; "separate.
The command acquiring module 12 is configured to acquire a command to be executed, where the command to be executed is an operation command for one or more target programs. The operation command includes a view, start or stop command.
And a program storage path searching module 13, configured to search the program storage path of the one or more target programs from the process list.
In this embodiment, the specific implementation process of the program storage path searching module 13 is as follows: and matching the program name of the corresponding target program with the last-level directory of each program storage path in the process list, and if the matching is successful, taking the matched program storage path as the program storage path of the target program. For example, when the pre-established process list is as in table 1, assuming that the currently executed operation command is show (show is pre-defined as a view function), i.e. the view command for program a is executed, the program storage path with the last-level directory as a is matched from table 1, and the program storage path can be "…/a" from table 1.
And the script storage path detecting module 14 is configured to detect whether a script storage path is spliced after the found program storage path when the program storage path corresponding to the target program is found. In this embodiment, the specific implementation process of the script storage path detection module is as follows: and detecting whether a preset self-contained script identifier (such as OTPS) is spliced after the program storage path, if so, judging that the script storage path is spliced after the program storage path, and otherwise, judging that the script storage path is not spliced after the program storage path.
And the self-contained script running module 15 is configured to, when a script storage path is spliced behind the searched program storage path, search a script storage path matched with the operation command from the spliced script storage path, then obtain a corresponding self-contained script according to the matched script storage path, and start the self-contained script to run, so as to implement an operation on the target program.
In this embodiment, the self-contained script running module 15 may search for a script storage path matching the operation command by the following steps: and matching the operation command with the last-stage directory in each script storage path contained in the program storage path, and if the matching is successful, acquiring the corresponding self-contained script according to the matched script storage path. For example, if the currently executed operation command is stop tomcat (stop predefined as stop function), that is, a stop command for program tomcat is executed, first, whether a program storage path of program tomcat exists is searched from table 1, and after the program storage path of program tomcat is found, it is determined whether a script storage path is spliced after the program storage path of program tomcat is searched. As can be seen from table 1, the self-contained script identifier OTPS is spliced behind the program storage path of the program Tomcat, that is, the script storage path is spliced behind the program storage path of the program Tomcat, then the script storage path matched with the stop command is searched from the spliced script storage path, if stop.sh is preset as the script for executing the stop function, the script storage path "stop/project/Tomcat/bin/stop.sh" corresponding to stop.sh is determined as the script storage path matched with the stop command, and then the corresponding self-contained script stop.sh is obtained according to the matched script storage path "stop/project/Tomcat/bin/stop.sh". And the command executing module 16 is configured to execute the operation command for the corresponding target program when the script storage path is not spliced after the found program storage path or the script storage path matched with the operation command is not found.
And the prompt module 17 is configured to output corresponding prompt information when the program storage path of the target program is not found.
In this embodiment, the process list includes program storage paths of a plurality of programs, and the program storage paths of the plurality of programs may be sorted in order or in reverse order according to a dependency relationship among the plurality of programs. For example, assuming A, B two programs, if B program start needs to depend on a program, then program storage path of a is written before and B is written after in the process list, and when executing start commands for all programs in the process list, start is performed in order; when a stop command for all programs in the process list is executed, stopping is performed in the reverse order. Of course, the program storage path of B may be written before the program storage path of a in the process list, and then the program storage path of a may be written after the program storage path of B, and when the start command for all the programs in the process list is executed, the program may be started in the reverse order; when a stop command for all programs in the process list is executed, the stop is performed in order.
For the embodiment of the apparatus, it is basically similar to the method embodiment of the first embodiment, so the description herein is relatively simple, and for the relevant points, refer to the partial description of the method embodiment. Also, it should be understood by those skilled in the art that the embodiments described in the specification are preferred embodiments and the reference to the module is not necessarily essential to the invention.
EXAMPLE III
The present embodiment provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of multiple servers) capable of executing programs. The computer device 20 of the present embodiment includes at least, but is not limited to: a memory 21, a processor 22, which may be communicatively coupled to each other via a system bus, as shown in FIG. 3. It is noted that fig. 3 only shows the computer device 20 with components 21-22, but it is to be understood that not all shown components are required to be implemented, and that more or fewer components may be implemented instead.
In the present embodiment, the memory 21 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 20, such as a hard disk or a memory of the computer device 20. In other embodiments, the memory 21 may also be an external storage device of the computer device 20, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 20. Of course, the memory 21 may also include both internal and external storage devices of the computer device 20. In this embodiment, the memory 21 is generally used for storing an operating system and various application software installed in the computer device 20, such as the program code of the global process control device 10 of the second embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 22 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the computer device 20. In this embodiment, the processor 22 is configured to run the program code stored in the memory 21 or process data, for example, run the global process control device 10, so as to implement the global process control method according to the first embodiment.
Example four
The present embodiment provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer-readable storage medium of this embodiment is used for storing the global process control apparatus 10, and when being executed by a processor, the computer-readable storage medium implements the global process control method of the first embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A global process control method, comprising:
configuring program storage paths of a plurality of programs in a pre-established process list, wherein when a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind the program storage path of the certain program;
acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs;
searching the program storage path of the one or more target programs from the process list;
when the program storage path corresponding to the target program is found, detecting whether a script storage path is spliced after the found program storage path, when the script storage path is spliced, searching the script storage path matched with the operation command from the spliced script storage path, then acquiring the corresponding self-contained script according to the matched script storage path, starting the acquired self-contained script, and when the script storage path is not spliced or the script storage path matched with the operation command is not found, executing the operation command corresponding to the target program.
2. The global process control method according to claim 1, when the command to be executed is an operation command for a plurality of target programs, finding program storage paths of the plurality of target programs from the process list, comprising:
and searching program storage paths of the target programs from the process list according to the arrangement sequence of the target programs in the command to be executed.
3. The global process control method according to claim 1, wherein said searching the program storage path of the one or more target programs from the preset process list comprises:
and matching the program names of the one or more target programs with the last-level directory of each program storage path in the process list, and if the matching is successful, taking the matched program storage path as the program storage path of the corresponding target program.
4. The global process control method according to claim 1, wherein the detecting whether the script storage path is spliced after the found program storage path comprises:
and detecting whether a preset self-contained script mark is spliced after the program storage path, if so, judging that the script storage path is spliced after the program storage path, and otherwise, judging that the script storage path is not spliced after the program storage path.
5. The global process control method according to claim 1, wherein the operation command comprises a view, start or stop command.
6. The global process control method according to claim 1, wherein configuring program storage paths of a plurality of programs in a pre-established process list comprises:
and arranging the program storage paths of the programs according to the sequence and the reverse order of the dependency relationship among the programs.
7. The global process control method according to claim 1, further comprising: and when the program storage path corresponding to the target program is not found, outputting corresponding prompt information.
8. A global process control apparatus, comprising:
the configuration module is used for configuring program storage paths of a plurality of programs in a pre-established process list, wherein when a certain program is configured with a self-contained script, a script storage path of the self-contained script is spliced behind the program storage path of the certain program;
the device comprises a to-be-executed command acquisition module, a to-be-executed command acquisition module and a to-be-executed command processing module, wherein the to-be-executed command acquisition module is used for acquiring a to-be-executed command which is an operation command for one or more target programs;
the program storage path searching module is used for searching the program storage paths of the one or more target programs from the process list;
the script storage path detection module is used for detecting whether a script storage path is spliced after the searched program storage path when the program storage path corresponding to the target program is searched;
the self-contained script starting module is used for searching a script storage path matched with the operation command from the spliced script storage path when the script storage path is spliced behind the searched program storage path, then acquiring a corresponding self-contained script according to the matched script storage path and starting the acquired self-contained script;
and the command execution module is used for executing the operation command corresponding to the target program when the script storage path is not spliced behind the searched program storage path or the script storage path matched with the operation command is not searched.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010226450.8A 2020-03-27 2020-03-27 Global process control method, device, computer equipment and storage medium Active CN111414212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010226450.8A CN111414212B (en) 2020-03-27 2020-03-27 Global process control method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010226450.8A CN111414212B (en) 2020-03-27 2020-03-27 Global process control method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111414212A true CN111414212A (en) 2020-07-14
CN111414212B CN111414212B (en) 2023-06-23

Family

ID=71494436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010226450.8A Active CN111414212B (en) 2020-03-27 2020-03-27 Global process control method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111414212B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630262A (en) * 2009-07-17 2010-01-20 北京数帅科技有限公司 Method for monitoring and controlling subprocess based on Linux system
JP2013012225A (en) * 2012-08-30 2013-01-17 Hitachi Ltd Name specification program, configuration management server and information processing system
CN105630526A (en) * 2014-11-03 2016-06-01 阿里巴巴集团控股有限公司 Load control method and device for script
CN107315576A (en) * 2016-04-26 2017-11-03 中兴通讯股份有限公司 A kind of method and system of dynamic expansion software flow
CN108762826A (en) * 2018-04-23 2018-11-06 厦门市美亚柏科信息股份有限公司 Process hiding method and computer readable storage medium
CN109032895A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of detection method, device, equipment and storage medium monitoring fuse process
CN110580185A (en) * 2018-06-07 2019-12-17 中兴通讯股份有限公司 Data preprocessing method, device and storage medium
CN110781491A (en) * 2019-10-25 2020-02-11 苏州浪潮智能科技有限公司 Method and device for controlling process to access file

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101630262A (en) * 2009-07-17 2010-01-20 北京数帅科技有限公司 Method for monitoring and controlling subprocess based on Linux system
JP2013012225A (en) * 2012-08-30 2013-01-17 Hitachi Ltd Name specification program, configuration management server and information processing system
CN105630526A (en) * 2014-11-03 2016-06-01 阿里巴巴集团控股有限公司 Load control method and device for script
CN107315576A (en) * 2016-04-26 2017-11-03 中兴通讯股份有限公司 A kind of method and system of dynamic expansion software flow
CN108762826A (en) * 2018-04-23 2018-11-06 厦门市美亚柏科信息股份有限公司 Process hiding method and computer readable storage medium
CN110580185A (en) * 2018-06-07 2019-12-17 中兴通讯股份有限公司 Data preprocessing method, device and storage medium
CN109032895A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of detection method, device, equipment and storage medium monitoring fuse process
CN110781491A (en) * 2019-10-25 2020-02-11 苏州浪潮智能科技有限公司 Method and device for controlling process to access file

Also Published As

Publication number Publication date
CN111414212B (en) 2023-06-23

Similar Documents

Publication Publication Date Title
US20120191960A1 (en) Booting computing devices
US10268515B2 (en) Releasing resources from processes in a particular order to provide required resources to start an application
US10372463B1 (en) Provisioning a computerized device with an operating system
CN110515795B (en) Big data component monitoring method and device and electronic equipment
US9876777B2 (en) Method and browser for online banking login
CN107133165B (en) Browser compatibility detection method and device
CN106843947B (en) Method and device for processing code defects
CN103559065A (en) Method and system for OTA (Over-the-Air Technology) upgrade
CN111190823A (en) UI automation test method, electronic device and computer readable storage medium
CN112099800A (en) Code data processing method and device and server
US20230315213A1 (en) Program download method for intelligent terminal and intelligent terminal
US20130185602A1 (en) Heap dump occurrence detection
CN111367890A (en) Data migration method and device, computer equipment and readable storage medium
CN110245074B (en) Log record generation method and device, storage medium and server
US8347285B2 (en) Embedded agent for self-healing software
US20140298316A1 (en) Managing method for application program installation and electronic device
CN114385251A (en) Operating system booting method, system, terminal and storage medium based on memory
CN107766228B (en) Multi-language-based automatic testing method and device
CN112631621A (en) Dependency package management method, device, server and storage medium
CN105550575A (en) Method and device for obtaining un-exported function address and data structure offset
CN111414212B (en) Global process control method, device, computer equipment and storage medium
CN109582347B (en) Method and device for acquiring front-end codes
CN115080114A (en) Application program transplanting processing method, device and medium
CN114416442A (en) Hardware change detection method and device, electronic equipment and readable storage medium
CN111400243B (en) Development management system based on pipeline service and file storage method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant