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

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

Info

Publication number
CN111414212B
CN111414212B CN202010226450.8A CN202010226450A CN111414212B CN 111414212 B CN111414212 B CN 111414212B CN 202010226450 A CN202010226450 A CN 202010226450A CN 111414212 B CN111414212 B CN 111414212B
Authority
CN
China
Prior art keywords
program
script
storage path
program storage
spliced
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010226450.8A
Other languages
Chinese (zh)
Other versions
CN111414212A (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 global process control device, computer equipment and a storage medium, wherein the global process control method comprises the following steps: program storage paths of a plurality of programs are configured in a process list, and when a certain program is configured with a self-contained script, the program storage paths of the program are spliced with the script storage paths of the self-contained script; acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs; searching program storage paths of the one or more target programs; when the program storage path is found, whether the program storage path is spliced with the script storage path is detected, if so, the script storage path matched with the operation command is found from the spliced script storage path, then the corresponding self-contained script is obtained and started according to the matched script storage path, and when the script storage path is not spliced or the script storage path matched with the operation command is not found, the operation command to the corresponding target program is executed. The invention can realize unified configuration management of a plurality of programs and is convenient for maintenance.

Description

Global process control method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of process control, and in particular, to a global process control method, apparatus, computer device, and storage medium.
Background
When the program is started, stopped or checked on the linux server, the starting, stopping or checking command is mainly called. In order to facilitate maintenance and enable a program to be started, stopped or checked more quickly, a start command, a stop command or a check command is usually written in a script, and then the internal command is called by executing the script, so that the start operation, the stop operation or the check 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 logic relationship and run simultaneously.
In practical applications, an item generally includes a plurality of programs for implementing different service functions, and in order to uniformly control operations of the plurality of programs, in the prior art, corresponding operation commands are generally configured for the plurality of programs in a same script, so as to implement simultaneous operations of the plurality of programs. However, the existing script can only operate the programs under the same directory as the existing script, but in reality, each program in the project is not necessarily stored in the same directory location. In addition, some programs in the project may be configured with self-contained scripts, for example, some projects may include a third party standard program such as Apache, tomcat, and all the programs are provided with dedicated start, stop or view scripts, in this case, a plurality of scripts are required in the prior art to realize control over all program processes in the project, so that unified configuration management cannot be performed on each program in the project, and maintenance is inconvenient.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides a global process control method, a global process control device, computer equipment and a storage medium, so as to realize unified configuration management of a plurality of programs.
In order to achieve the above object, the present invention provides a global process control method, including:
program storage paths of a plurality of programs are configured in a pre-established process list, wherein when a certain program is configured with a self-contained script, the program storage paths of the certain program are spliced with the script storage paths of the self-contained script;
acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs;
searching program storage paths of the one or more target programs from the process list;
when the program storage path corresponding to the target program is found, whether a script storage path is spliced after the found program storage path is detected, when the script storage path is spliced, the script storage path matched with the operation command is found from the spliced script storage path, then the corresponding self-contained script is obtained according to the matched script storage path, the obtained self-contained script is started, and when the script storage path is not spliced or the script storage path matched with the operation command is not found, the operation command corresponding to the target program is executed.
In one embodiment of the present invention, when the command to be executed is an operation command for a plurality of target programs, searching program storage paths of the plurality of target programs from the process list includes:
and searching program storage paths of the plurality of target programs from the process list according to the arrangement sequence of the plurality of target programs in the command to be executed.
In one embodiment of the present invention, the searching the program storage paths 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-stage catalogue of each program storage path in the process list, and if the matching is successful, taking the matched program storage paths as the program storage paths of the corresponding target programs.
In one embodiment of the present invention, the detecting whether the script storage path is spliced after the searched program storage path includes:
and detecting whether a preset self-contained script identifier is spliced behind the program storage path, if so, judging that the script storage path is spliced behind the program storage path, otherwise, judging that the script storage path is not spliced behind the program storage path.
In one embodiment of the invention, the operation command includes a view, start or stop command.
In one embodiment of the present invention, the program storage path for configuring a plurality of programs in a pre-established process list includes:
and arranging program storage paths of the programs according to the dependency relation sequence and the reverse order among the programs.
In one embodiment of the invention, the method further comprises: and when the program storage path of the corresponding 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, the script storage paths of the self-contained script are spliced behind the program storage paths 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;
a program storage path searching module, configured to search a program storage path 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 after 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 after the searched program storage path or the script storage path matched with the operation command is not searched.
In one 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 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 prompt module is used for outputting corresponding prompt information when the program storage path of the corresponding target program is not found.
In one embodiment of the present invention, the program storage path search module is specifically configured to:
and matching the program names of the one or more target programs with the last-stage catalogue of each program storage path in the process list, and if the matching is successful, taking the matched program storage paths as the program storage paths of the target programs.
In one embodiment of the present invention, the script storage path detection module is specifically configured to:
when a program storage path corresponding to the target program is found, whether a preset self-contained script identifier is spliced after the found program storage path is detected, if so, the found program storage path is judged to be spliced with a script storage path, otherwise, the program storage path is judged to be not spliced with the script storage path.
In one embodiment of the invention, the operation command includes a view, start or stop command.
In one embodiment of the present invention, the configuration module arranges program storage paths of the plurality of programs in order of dependency relationship between the plurality of programs and in reverse 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, which processor implements 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:
the method comprises the steps that program storage paths of a plurality of programs are configured in a pre-established process list, wherein when a certain program is configured with a self-contained script, the script storage paths of the self-contained script are spliced behind the program storage paths of the certain program, and before an operation command for a target program is executed, the program storage paths of the target program are searched from the pre-set process list; when a program storage path of the target program is searched, detecting whether a script storage path is spliced after the program storage path, if so, searching a script storage path matched with the operation command from the spliced script storage path, then acquiring a corresponding self-contained script according to the matched script storage path, starting the self-contained script, and if not, executing the operation command. Therefore, on one hand, the position of the program in the project can be flexibly placed, only 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 each program in the project is not necessarily stored in the same catalog position, and certain programs in the project have the exclusive self-contained script, unified configuration management of each program 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 device according to the present invention;
FIG. 3 is a hardware architecture diagram of a computer device of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 or all possible combinations of one or more of the associated listed items.
Example 1
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, where the method specifically includes the following steps:
s1, program storage paths of a plurality of programs are configured in a pre-established process list, wherein when a certain program is configured with a self-contained script, the script storage paths of the self-contained script are spliced behind the program storage paths of the program.
For example, a list of configured processes is shown in table 1 below:
TABLE 1
Figure BDA0002427830900000061
In the process list shown in table 1, the program storage path of each program in a certain item is included, for example, "…/a" indicates the program storage path of the program a, "…/B" indicates the program storage path of the program B, "…/Tomcat" indicates the program storage path of the program Tomcat, and the program a, B, tomcat may be a program written in a language such as JAVA/c++.
When a program is configured with a self-contained script, the self-contained script storage path is spliced after the 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: start/project/Tomcat/bin/start. Sh is spliced after the program storage path of the program Tomcat; stop/pro-object/Tomcat/bin/stop. Sh; show project/Tomcat/bin/show. Sh). Wherein, OTPS represents a self-contained script identification, "start/project/Tomcat/bin/start.sh" represents a script storage path of a self-contained start script start.sh of a program Tomcat, "stop/project/Tomcat/bin/stop.sh" represents a script storage path of a self-contained stop script stop.sh of the program Tomcat, "show project/Tomcat/bin/sh-ow.sh" represents a script storage path of a self-contained view script show.sh of the program Tomcat. In this 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, a start.sh is preset as a script for executing a start operation command, a stop.sh is preset as a script for executing a stop operation command, and a show.sh is preset as a script for executing a view operation command. In table 1, the script storage paths and the corresponding program storage paths pass through "," separate, different script storage paths pass through "; "separate", it is understood that the terms "divide", "and"; "spaced apart" may be replaced with any other suitable symbol, and the script-carrying identifier may be replaced with any other suitable identifier other than "OTPS", and the invention is not limited in this regard.
S2, acquiring a command to be executed, wherein the command to be executed is an operation command for the target program. In this embodiment, the operation command to the target program may include a start, stop, or view command.
S3, searching a 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 the program storage path, the program name of the target program may be specifically matched with the last-stage directory (i.e. the main entry execution class of the program) of each program storage path in the process list, if the matching is successful, the matched program storage path is used as the program storage path of the target program, and step S4 is executed, otherwise, the program storage path which is not in the target program in the process list is indicated, and step S5 is executed.
S4, when the program storage path of the target program is found from the process list, detecting whether a script storage path is spliced after the program storage path of the target program, if the script storage path is spliced after the program storage path, finding a script storage path matched with the operation command from the spliced script storage path, acquiring a 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 the script storage path is not spliced after the program storage path or the script storage path matched with the operation command is not found from the spliced script storage path, executing the operation command to the target program.
In this embodiment, whether the script storage path is included in the program 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 the script storage path, 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 searched for by: and matching the operation command with the last-stage catalogue in each script storage path contained in the program storage path, and if the matching is successful, acquiring a 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, a view command for the program a is executed, the program storage path of the program a is searched for from table 1, and after the program storage path of the program a is searched for, it is further determined whether the script storage path is spliced. 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 view command of the program a is directly executed to view the current state, start time, and other information 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 is predefined as a stop function), that is, a stop command for the program tomcat is executed, whether a program storage path of the program tomcat exists is searched from table 1, and after the program storage path of the program tomcat is searched, whether a script storage path is spliced or not is continuously judged. As can be seen from table 1, the program storage path of the program Tomcat is spliced with the self-contained script identifier OTPS, that is, the program storage path of the program Tomcat is spliced with the script storage path, then the script storage path matched with the stop command is searched from the spliced script storage paths, and since the stop.sh is preset as the script for executing the stop function, the script storage path "stop/project/Tomcat/bin/stop.sh" corresponding to the stop.sh is determined as the script storage path matched with the stop command, and then the corresponding self-contained script stop.sh is acquired according to the matched script storage path "stop/project/Tomcat/bin/stop.sh", and the acquired self-contained script stop.sh is started to stop the program Tomcat.
S5, when the program storage path of the target program is not found from the process list, outputting corresponding prompt information to prompt that the target program does not exist, and ending the flow. 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 the program d is executed, whether a program storage path for the program d exists is searched for in table 1, and if not, a prompt message for not searching for the program d is output and the flow is ended.
In one embodiment of the present invention, the command to be executed may be an operation command for a plurality of target programs, that is, process control for a plurality of programs may be implemented by one operation command, for example, a start, stop or show instruction may be followed by a plurality of program names, such as a, b, c, so as to implement batch start, stop or view operations for the programs a, b, c. In this case, the programs a, b, and c may be sequentially executed as the target programs in the steps S3 to S5.
In one embodiment of the invention, batch operation of all programs in the process list can also be realized through one operation command. For example, when no program name is set in an operation command, the operation command may be identified as a batch control for all programs in the process list, e.g., if a 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 performing the batch operation on all programs, the foregoing steps S3 to S5 may be performed with each program in the progress list sequentially as a target program in a predetermined order.
In practical application, when the process list is established, the program storage paths can be ordered according to the dependency relationship among the programs. For example, assuming A, B that two programs, if the B program starts to need to rely on the a program, the program storage path of a is written before and the program storage path of B is written after in the process list, and when the start command to all the programs in the process list is executed, the start is performed in sequence; when executing the stop command to all programs in the process list, stopping is performed in the reverse order. Of course, the program storage path of the program B can be written before in the process list, the program storage path of the program A can be written after, and when the starting command of all the programs in the process list is executed, the starting is performed according to the reverse order; when executing the stop command to all programs in the process list, stopping is performed in sequence.
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, so when each program in the project is not necessarily stored in the same catalog position, and some programs in the project have the exclusive self-contained script, the unified configuration management of each program in the project can be realized, and the maintenance is convenient.
It should be noted that, for simplicity of description, the present embodiment is shown as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts, as some steps may be performed in other order or simultaneously in accordance with the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required for the present invention.
Example two
The present embodiment provides a global process control apparatus 10, as shown in fig. 2, the apparatus 10 includes:
a configuration module 11, 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, the program storage path of the certain program is spliced with the script storage path of the self-contained script. For example, in the process list shown in Table 1, "…/A/a" indicates the program storage path of the program a, "…/B/B" indicates the program storage path of the program B,
"…/Tomcat" means a program storage path of the program Tomcat, and the program a, b, tomcat may be a program written in a language such as JAVA/c++.
When a program is configured with a self-contained script, a script storage path with 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 paths and the corresponding program storage paths may be passed through "," separated ", and the different script storage paths may be passed through"; "spaced apart".
The command obtaining module 12 is configured to obtain a command to be executed, where the command to be executed is an operation command for one or more target programs. The operation commands include view, start, or stop commands.
Program storage path finding module 13, for finding program storage paths of the one or more target programs from the process list.
In this embodiment, the specific implementation procedure of the program storage path searching module 13 is as follows: and matching the program name of the corresponding target program with the last-stage 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 a pre-established process list is shown in table 1, assuming that the currently executed operation command is show a (show is predefined as a view function), that is, a view command for the program a is executed, a program storage path of the last-level directory a is matched from table 1, and the program storage path is "…/a" from table 1.
The script storage path detection module 14 is configured to detect 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. 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 behind the program storage path, if so, judging that the script storage path is spliced behind the program storage path, otherwise, judging that the script storage path is not spliced behind the program storage path.
And the self-contained script running module 15 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 after the searched program storage path, then acquiring a corresponding self-contained script according to the matched script storage path, and starting the self-contained script to run so as to realize the operation on the target program.
In this embodiment, the self-contained script running module 15 may find a script storage path matching the operation command by: and matching the operation command with the last-stage catalogue in each script storage path contained in the program storage path, and if the matching is successful, acquiring a corresponding self-contained script according to the matched script storage path. For example, assuming that the currently executed operation command is stop tomcat (stop is predefined as a stop function), that is, a stop command for the program tomcat is executed, first, whether a program storage path of the program tomcat exists is searched from table 1, and after the program storage path of the program tomcat is searched, whether a script storage path is spliced or not is continuously determined. As can be seen from table 1, the program storage path of the program Tomcat is spliced with the self-contained script identifier OTPS, that is, the program storage path of the program Tomcat is spliced with the script storage path, then the script storage path matched with the stop command is searched from the spliced script storage paths, if the stop.sh is preset as the script for executing the stop function, the script storage path "stop/project/Tomcat/bin/stop.sh" corresponding to the 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 execution module 16 is configured to execute the operation command for the corresponding target program when no script storage path is spliced after the searched program storage path or no script storage path matching the operation command is searched.
And the prompting module 17 is used for outputting corresponding prompting 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, where the program storage paths of the plurality of programs may be ordered sequentially or in reverse order according to a dependency relationship between the plurality of programs. For example, assuming A, B that two programs, if the B program starts to need to rely on the a program, the program storage path of a is written before and the program storage path of B is written after in the process list, and when the start command to all the programs in the process list is executed, the start is performed in sequence; when executing the stop command to all programs in the process list, stopping is performed in the reverse order. Of course, the program storage path of the program B can be written before in the process list, the program storage path of the program A can be written after, and when the starting command of all the programs in the process list is executed, the starting is performed according to the reverse order; when executing the stop command to all programs in the process list, stopping is performed in sequence.
For this embodiment of the device, it is substantially similar to the method embodiment of embodiment one, so the description herein is relatively simple, and reference is made to the description of the method embodiment for its part. It should also be appreciated by those skilled in the art that the embodiments described in the specification are preferred embodiments and that the modules referred to are 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-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster formed by a plurality of servers) that can execute a program. 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 should be noted that fig. 3 only shows a computer device 20 having components 21-22, but it should be understood that not all of the illustrated 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., readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card 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 memory 21 may be an internal storage unit of the computer device 20, such as a hard disk or 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, which are provided on the computer device 20. Of course, the memory 21 may also include both internal storage units of the computer device 20 and external storage devices. In this embodiment, the memory 21 is generally used to store an operating system and various types of application software installed on the computer device 20, such as program codes of the global process control apparatus 10 of the second embodiment. Further, the memory 21 may be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 22 is generally used to control the overall operation of the computer device 20. In this embodiment, the processor 22 is configured to execute the program code or process data stored in the memory 21, for example, execute the global process control apparatus 10, to implement the global process control method of the first embodiment.
Example IV
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 store, etc., on which a computer program is stored, which when executed by a processor, performs a corresponding function. The computer readable storage medium of the present embodiment is used for storing the global process control apparatus 10, and when executed by a processor, implements the global process control method of the first embodiment.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A global process control method, comprising executing the following steps by script:
program storage paths of a plurality of programs are configured in a pre-established process list, wherein when a certain program is configured with a self-contained script, the program storage paths of the certain program are spliced with the script storage paths of the self-contained script;
acquiring a command to be executed, wherein the command to be executed is an operation command for one or more target programs;
searching program storage paths of the one or more target programs from the process list;
when the program storage path corresponding to the target program is found, whether a script storage path is spliced after the found program storage path is detected, when the script storage path is spliced, the script storage path matched with the operation command is found from the spliced script storage path, then the corresponding self-contained script is obtained according to the matched script storage path, the obtained self-contained script is started, and when the script storage path is not spliced or the script storage path matched with the operation command is not found, the operation command corresponding to the target program is executed.
2. The global process control method according to claim 1, when the command to be executed is an operation command to a plurality of target programs, searching program storage paths of the plurality of target programs from the process list, comprising:
and searching program storage paths of the plurality of target programs from the process list according to the arrangement sequence of the plurality of target programs in the command to be executed.
3. The global process control method according to claim 1, wherein the searching the program storage paths of the one or more target programs in the preset process list includes:
and matching the program names of the one or more target programs with the last-stage catalogue of each program storage path in the process list, and if the matching is successful, taking the matched program storage paths as the program storage paths of the corresponding target programs.
4. The global process control method according to claim 1, wherein detecting whether the script storage path is spliced after the searched program storage path comprises:
and detecting whether a preset self-contained script identifier is spliced behind the program storage path, if so, judging that the script storage path is spliced behind the program storage path, otherwise, judging that the script storage path is not spliced behind the program storage path.
5. The global process control method according to claim 1, wherein the operation command includes a view, start or stop command.
6. The global process control method according to claim 1, wherein said configuring program storage paths of a plurality of programs in a pre-established process list comprises:
and arranging program storage paths of the programs according to the dependency relation sequence and the reverse order among the programs.
7. The global process control method according to claim 1, further comprising: and when the program storage path of the corresponding 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, the script storage paths of the self-contained script are spliced behind the program storage paths of the certain program;
the device comprises a command to be executed acquisition module, a command processing module and a command processing module, wherein the command to be executed is an operation command for one or more target programs;
a program storage path searching module, configured to search a program storage path 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 after 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 after 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 processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to 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 CN111414212A (en) 2020-07-14
CN111414212B true 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013012225A (en) * 2012-08-30 2013-01-17 Hitachi Ltd Name specification program, configuration management server and information processing system
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

Family Cites Families (4)

* 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
CN105630526B (en) * 2014-11-03 2019-04-19 阿里巴巴集团控股有限公司 The loading control method and device of script
CN109032895A (en) * 2018-07-26 2018-12-18 郑州云海信息技术有限公司 A kind of detection method, device, equipment and storage medium monitoring fuse process
CN110781491B (en) * 2019-10-25 2022-02-18 苏州浪潮智能科技有限公司 Method and device for controlling process to access file

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013012225A (en) * 2012-08-30 2013-01-17 Hitachi Ltd Name specification program, configuration management server and information processing system
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

Also Published As

Publication number Publication date
CN111414212A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN108121559B (en) Configuration file pushing method, server and storage medium
US10120672B2 (en) Method for offline updating virtual machine images
US20120191960A1 (en) Booting computing devices
US10372463B1 (en) Provisioning a computerized device with an operating system
CN102262574B (en) Boot protecting method and device of operating system
CN110866258B (en) Rapid vulnerability positioning method, electronic device and storage medium
CN110515795B (en) Big data component monitoring method and device and electronic equipment
US20150326564A1 (en) Method And Browser For Online Banking Login
CN111078481B (en) Method, device, electronic equipment and storage medium for acquiring configuration checklist
CN108920691B (en) Front-end static resource management method and device, computer equipment and storage medium
CN105426293A (en) Method and system for recording kernel exception stack and vmcore file
CN113448862B (en) Software version testing method and device and computer equipment
CN108399125B (en) Automatic testing method and device, computer equipment and storage medium
CN115277677A (en) Batch archive hooking method and device, computer equipment and storage medium
CN111414212B (en) Global process control method, device, computer equipment and storage medium
CN112631621A (en) Dependency package management method, device, server and storage medium
CN106445737B (en) Multi-backup starting method
CN110471828B (en) Operating system testing method, device and equipment thereof
CN111125721A (en) Control method for process starting, computer equipment and readable storage medium
CN107766228B (en) Multi-language-based automatic testing method and device
CN109828752B (en) Project code automatic generation method, device, computer equipment and storage medium
CN110825795A (en) Method, device and equipment for accessing database and computer readable storage medium
CN112328288A (en) Method, system, equipment and storage medium for updating server component
CN112558982A (en) Code detection method and device and computer equipment
CN106502863B (en) software version prompting 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