CN111722886A - Tool starting method and device, computer equipment and computer readable storage medium - Google Patents
Tool starting method and device, computer equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111722886A CN111722886A CN202010578059.4A CN202010578059A CN111722886A CN 111722886 A CN111722886 A CN 111722886A CN 202010578059 A CN202010578059 A CN 202010578059A CN 111722886 A CN111722886 A CN 111722886A
- Authority
- CN
- China
- Prior art keywords
- software medium
- software
- environment
- medium
- tool
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000001419 dependent effect Effects 0.000 claims abstract description 151
- 238000001514 detection method Methods 0.000 claims abstract description 21
- 238000009434 installation Methods 0.000 claims description 48
- 230000008569 process Effects 0.000 claims description 27
- 230000004913 activation Effects 0.000 claims description 13
- 230000008676 import Effects 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 12
- 238000010276 construction Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 8
- 238000004806 packaging method and process Methods 0.000 claims description 6
- 230000000977 initiatory effect Effects 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 description 10
- 238000005259 measurement Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 241001417495 Serranidae Species 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000013479 data entry Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000011900 installation process Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 1
- 238000013499 data model Methods 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44578—Preparing or optimising for loading
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 discloses a tool starting method, a device, computer equipment and a computer readable storage medium, which relate to the technical field of Internet, can automatically construct a dependent environment on which a tool is installed, automatically detect whether the dependent environment is complete or not, and automatically operate the dependent environment after the dependent environment is determined to be complete so as to facilitate the normal starting of a tool to be started. The method comprises the following steps: acquiring at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium; starting an environment detection script to detect a software medium included in the dependent environment; if the software media included in the dependent environment are determined to be consistent with at least one software medium, acquiring a preset running sequence, and running the dependent environment according to the preset running sequence; the tool to be started is started in the dependent environment.
Description
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method and an apparatus for starting a tool, a computer device, and a computer-readable storage medium.
Background
With the continuous development of internet technology, the services that can be provided by the intelligent terminal are more and more comprehensive, and generally, the services provided by the intelligent terminal are realized based on various software. Currently, a measurement and calculation tool is provided in the market, and the measurement and calculation tool is application software for analyzing and testing data input into the measurement and calculation tool based on technologies such as data analysis and model construction, and can realize services such as quality control of medical records. When starting up the measuring and calculating tool, a running environment on which the measuring and calculating tool depends needs to be provided, and the correct use of the measuring and calculating tool is realized in the running environment.
In the related art, the measurement and calculation tool is usually installed and started manually by a service person, and the service person manually calls native commands of various dependents of the middleware in the measurement and calculation tool to realize the starting and stopping of the middleware, so that the running environment of the tool is constructed, and the measurement and calculation tool can be ensured to be correctly used in an intelligent terminal.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems:
the starting and stopping of the middleware are in a certain sequence, a correct operating environment can be established only by executing the starting and stopping of the middleware according to the correct sequence, the whole starting process of the measuring and calculating tool is complicated, the failure rate of the establishment of the operating environment is high, the measuring and calculating tool cannot be started normally, and a large amount of manpower is wasted.
Disclosure of Invention
In view of the above, the present invention provides a tool starting method, an apparatus, a computer device and a computer readable storage medium, and mainly aims to solve the problems that the current starting process is complicated, the failure rate of the construction of the operation environment is high, the normal starting of the measuring and calculating tool is easily impossible, and a large amount of manpower is wasted.
According to a first aspect of the present invention, there is provided a tool activation method comprising:
acquiring at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium, wherein the at least one software medium comprises a service, an environment and a database which are depended by the tool to be started when the tool to be started is started;
starting an environment detection script to detect a software medium included in the dependence environment;
if the software medium included in the dependent environment is determined to be consistent with the at least one software medium, acquiring a preset operation sequence, and operating the dependent environment according to the preset operation sequence;
and starting the tool to be started in the dependent environment.
In another embodiment, the obtaining at least one software medium of the tool to be started and building the dependent environment based on the at least one software medium includes:
acquiring a preset installation sequence marked by the at least one software medium;
determining a first software medium based on the preset installation sequence, and installing the first software medium, wherein the first software medium is the first installed software medium indicated by the preset installation sequence;
after the first software medium is installed, determining a second software medium in the preset installation sequence, wherein the second software medium is the next software medium indicated by the preset installation sequence after the first software medium is installed;
installing the second software medium, and continuously determining and installing the next software medium of the second software medium until the installation of at least one software medium is finished;
and taking the environment constructed by the at least one installed software medium as the dependent environment.
In another embodiment, after the initiating environment detection script detects the software medium included in the dependent environment, the method further includes:
if the software medium included in the dependent environment is determined to be inconsistent with the at least one software medium, comparing the software medium included in the dependent environment with the at least one software medium;
determining, in the at least one software medium, a target software medium not included in the dependency environment;
extracting the medium name of the target software medium and generating a failure response carrying the medium name;
and displaying the failure response.
In another embodiment, the obtaining a preset operation order and operating the dependent environment according to the preset operation order includes:
determining a third software medium in the dependency environment based on the preset running sequence, wherein the third software medium is a first running software medium indicated by the preset running sequence;
running the third software medium;
when the third software medium is successfully operated, determining a fourth software medium in the dependence environment, wherein the fourth software medium is a next software medium indicated by the preset operation sequence after the third software medium is successfully operated;
and operating the fourth software medium, and continuously determining and operating the next software medium of the fourth software medium until the dependent environment is successfully operated.
In another embodiment, after the obtaining a preset operation order and operating the dependent environment according to the preset operation order, the method further includes:
starting data initialization, and acquiring basic data selected by a user, wherein the basic data is data to be processed by the tool to be started;
determining a database in the dependency environment, and importing the basic data into the database in a batch mode.
In another embodiment, after determining a database in the dependency environment and importing the base data into the database in bulk, the method further comprises:
when the failure of batch import of the basic data into the database is detected, calling a command prompt based on the environment detection script;
executing a system query instruction by adopting the command prompt symbol to obtain a plurality of execution results in the process of importing the basic data into a database in batches;
and packaging the execution results into an execution log, and reminding the user based on the execution log.
In another embodiment, the method further comprises:
receiving a stop instruction of the tool to be started, and detecting a software medium included in the dependence environment;
when the software media included in the dependent environment are determined to be consistent with the at least one software media, acquiring a preset stopping sequence, wherein the preset stopping sequence is the reverse preset running sequence;
stopping the operation of the tool to be started;
determining a fifth software medium in the preset stopping sequence, and stopping the operation of the fifth software medium, wherein the fifth software medium is the first stopped software medium indicated by the preset stopping sequence;
determining a sixth software medium after the fifth software medium is successfully stopped, wherein the sixth software medium is the next software medium after the fifth software medium is successfully stopped;
and stopping the running of the sixth software medium, and determining and stopping the next software medium of the sixth software medium until all the at least one software medium is successfully stopped.
According to another aspect of the present invention, there is provided a tool activation device, the device comprising:
the system comprises a construction module, a storage module and a control module, wherein the construction module is used for acquiring at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium, and the at least one software medium comprises a service, an environment and a database which are depended by the tool to be started when the tool to be started is started;
the detection module is used for starting an environment detection script and detecting a software medium included in the dependent environment;
the running module is used for acquiring a preset running sequence if the software medium included in the dependent environment is determined to be consistent with the at least one software medium, and running the dependent environment according to the preset running sequence;
and the starting module is used for starting the tool to be started in the dependence environment.
In another embodiment, the building module includes:
the acquisition unit is used for acquiring the preset installation sequence of the at least one software medium label;
the installation unit is used for determining a first software medium based on the preset installation sequence and installing the first software medium, wherein the first software medium is the first installed software medium indicated by the preset installation sequence;
a determining unit, configured to determine, after the first software medium is installed, the second software medium in the preset installation order, where the second software medium is a next software medium after the first software medium is installed, and the second software medium is indicated by the preset installation order;
the installation unit is further configured to install the second software medium, and continue to determine and install a next software medium of the second software medium until the installation of the at least one software medium is completed;
and the construction unit is used for taking the environment constructed by the at least one installed software medium as the dependent environment.
In another embodiment, the apparatus further comprises:
a comparison module, configured to compare the software medium included in the dependent environment with the at least one software medium if it is determined that the software medium included in the dependent environment is inconsistent with the at least one software medium;
a determination module for determining, among the at least one software medium, a target software medium not included in the dependency environment;
the extraction module is used for extracting the medium name of the target software medium and generating a failure response carrying the medium name;
and the display module is used for displaying the failure response.
In another embodiment, the operation module includes:
a determining unit, configured to determine, based on the preset running sequence, a third software medium in the dependency environment, where the third software medium is a first running software medium indicated by the preset running sequence;
an operation unit for operating the third software medium;
the determining unit is further configured to determine a fourth software medium in the dependency environment after the third software medium is successfully run, where the fourth software medium is a next software medium after the third software medium indicated by the preset running sequence is successfully run;
the running unit is further configured to run the fourth software medium, and continue to determine and run a next software medium of the fourth software medium until the dependent environment is successfully run.
In another embodiment, the apparatus further comprises:
the first acquisition module is used for starting data initialization and acquiring basic data selected by a user, wherein the basic data is data to be processed by the tool to be started;
and the import module is used for determining a database in the dependency environment and importing the basic data into the database in batches.
In another embodiment, the apparatus further comprises:
the calling module is used for calling a command prompt based on the environment detection script when the failure of batch import of the basic data into the database is detected;
the query module is used for executing a system query instruction by adopting the command prompt symbol and acquiring a plurality of execution results in the process of importing the basic data into the database in batches;
and the packaging module is used for packaging the execution results into an execution log and reminding the user based on the execution log.
In another embodiment, the apparatus further comprises:
the receiving module is used for receiving a stopping instruction of the tool to be started and detecting a software medium included in the dependence environment;
a second obtaining module, configured to obtain a preset stop sequence when it is determined that the software media included in the dependent environment are consistent with the at least one software medium, where the preset stop sequence is the reverse preset running sequence;
the stopping module is used for stopping the operation of the tool to be started;
the stopping module is further configured to determine a fifth software medium in the preset stopping sequence, and stop the operation of the fifth software medium, where the fifth software medium is a first stopped software medium indicated by the preset stopping sequence;
the stopping module is further configured to determine a sixth software medium after the fifth software medium is successfully stopped, where the sixth software medium is a next software medium after the fifth software medium is successfully stopped;
the stopping module is further configured to stop the operation of the sixth software medium, and determine and stop a next software medium of the sixth software medium until all the at least one software medium is successfully stopped.
According to a third aspect of the present invention, there is provided a computer device comprising a memory storing a computer program and a processor implementing the steps of the method of the first aspect when the processor executes the computer program.
According to a fourth aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect described above.
By means of the technical scheme, the tool starting method, the tool starting device, the computer equipment and the computer readable storage medium can automatically construct a dependent environment on which a tool is installed, automatically detect whether the dependent environment is complete or not, and automatically operate the dependent environment according to the preset operation sequence of the software media in the dependent environment after the dependent environment is determined to be complete, so that the tool to be started can be started normally.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a tool activation method according to an embodiment of the present invention;
FIG. 2A is a flow chart of a tool activation method according to an embodiment of the present invention;
FIG. 2B is a flow chart of a tool activation method according to an embodiment of the present invention;
FIG. 2C is a flow chart of a tool activation method according to an embodiment of the present invention;
FIG. 2D is a schematic flow chart illustrating a tool activation method according to an embodiment of the present invention;
FIG. 3A is a schematic diagram illustrating a tool actuation apparatus according to an embodiment of the present invention;
FIG. 3B is a schematic diagram illustrating a tool actuation apparatus according to an embodiment of the present invention;
FIG. 3C is a schematic diagram illustrating a tool actuation apparatus according to an embodiment of the present invention;
FIG. 3D is a schematic diagram illustrating a tool actuation apparatus according to an embodiment of the present invention;
FIG. 3E is a schematic diagram illustrating a tool actuation apparatus according to an embodiment of the present invention;
FIG. 3F is a schematic diagram illustrating a tool actuation apparatus according to an embodiment of the present invention;
FIG. 3G is a schematic diagram of a tool activation device according to an embodiment of the present invention;
fig. 4 shows a schematic device structure diagram of a computer apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
An embodiment of the present invention provides a tool starting method, as shown in fig. 1, the method includes:
101. the method comprises the steps of obtaining at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium, wherein the at least one software medium comprises a service, an environment and a database which are depended by the tool to be started when the tool to be started is started.
102. And starting an environment detection script to detect the software medium included in the dependent environment.
103. And if the software media included in the dependent environment are consistent with at least one software medium, acquiring a preset running sequence, and running the dependent environment according to the preset running sequence.
104. The tool to be started is started in the dependent environment.
The method provided by the embodiment of the invention can automatically construct the dependent environment on which the tool is installed, automatically detect whether the dependent environment is complete or not, and automatically operate the dependent environment according to the preset operation sequence of the software medium in the dependent environment after the dependent environment is determined to be complete so as to facilitate the normal start of the tool to be started.
An embodiment of the present invention provides a tool starting method, as shown in fig. 2A, the method includes:
201. acquiring at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium.
The inventors have recognized that successful tool activation depends on whether the various associated facilities are functioning properly, i.e., whether the tool is successfully activated depends on whether the environment in which the tool is built is correct. For example, successful start of a tool can be realized on the basis of successful operation of a PostgreSQL (object-relational database server) database, a Redis (key value storage system) cache service and the like, so in the invention, the installation principle and the start sequence of a software medium and the software medium involved in the installation process of the tool are summarized, when the tool is installed, the software medium can be automatically installed and whether the software medium is missing or not can be detected, and further, when the software medium is not missing, the tool can be automatically started, basic data of the tool in normal business work is imported, and initialization of the tool is completed, thereby ensuring normal installation and operation of the tool.
Before starting the tool to be started, at least one software medium of the tool to be started needs to be prepared. Generally, the at least one software medium includes services, environments and databases on which the tool to be started depends when being started, and specifically may be a data caching service, a front-end page server, a back-end service agent, a measurement and calculation tool running environment, a DRGs (diagnostic related Groups) payment measurement and calculation tool database, and so on. Then, since the installation and the operation of the software media are in a certain order, for example, before the application service is operated, the postgresql database operation, the Redis cache service operation, and the Nginx (reverse proxy server) service operation are to be completed, it is necessary to summarize the installation order of the software media in advance, generate a preset installation order, and install at least one software medium according to the preset installation order. The specific installation process is as follows: firstly, a preset installation sequence marked by at least one software medium is obtained, a first software medium is determined based on the preset installation sequence, and the first software medium is installed, wherein the first software medium is the first installed software medium indicated by the preset installation sequence. After the first software medium is installed, determining a second software medium (namely, the next software medium after the first software medium indicated by the preset installation sequence is installed) in the preset installation sequence, installing the second software medium, and continuously determining and installing the next software medium of the second software medium until at least one software medium is installed. And finally, taking an environment constructed by at least one installed software medium as a dependent environment.
202. Starting an environment detection script, detecting the software media included in the dependent environment, and if the software media included in the dependent environment is determined to be inconsistent with at least one software media, executing the following step 203; if it is determined that the dependent environment includes software media that are consistent with at least one of the software media, step 204 described below is performed.
In the embodiment of the invention, in the actual application process, the possibility of software medium loss may occur, so that the dependent environment formed by installing the software medium is incomplete, and in the incomplete dependent environment, the tool cannot normally run.
When detecting whether the software medium included in the dependent environment is missing, the method can be implemented by using an environment detection script, where the environment detection script may specifically be a Visual Basic (VBS) script, the dependent environment is detected based on the VBS script, and if it is determined that the software medium included in the dependent environment is inconsistent with at least one software medium, it may be determined that a certain software medium is missing in the constructed dependent environment, the currently constructed dependent environment is abnormal and incomplete, and a tool has no way to run in the dependent environment, and needs to remind a user, that is, the process of step 203 is executed. If it is determined that the software medium included in the dependent environment is consistent with at least one software medium, it is determined that no software medium is detected to be absent from the built dependent environment, the currently built dependent environment is normal and complete, the tool can run in the dependent environment, and the import work of the basic data of the tool can be continued, so that the tool can run normally, that is, the process in step 204 described below is performed.
203. If the software medium included in the dependent environment is determined to be inconsistent with the at least one software medium, the software medium included in the dependent environment is compared with the at least one software medium, a target software medium not included in the dependent environment is determined in the at least one software medium, the medium name of the target software medium is extracted, a failure response carrying the medium name is generated, and the failure response is displayed.
In the embodiment of the invention, if it is determined that the software medium included in the dependent environment is inconsistent with at least one software medium, it is determined that a certain software medium is detected to be absent in the constructed dependent environment, the currently constructed dependent environment is abnormal and incomplete, a tool has no way to run in the dependent environment, and a user needs to be reminded, so that the software medium included in the dependent environment is compared with the at least one software medium, a target software medium not included in the dependent environment is determined in the at least one software medium, the medium name of the target software medium is extracted, a failure response carrying the medium name is generated, the failure response is displayed, and the current flow is ended.
204. And if the software media included in the dependent environment are consistent with at least one software medium, acquiring a preset running sequence, and running the dependent environment according to the preset running sequence.
In the embodiment of the invention, if it is determined that the software medium included in the dependent environment is consistent with at least one software medium, it is determined that no software medium is detected to be absent in the built dependent environment, the currently built dependent environment is normal and complete, the tool can run in the dependent environment, and the dependent environment can be continuously run so as to import the basic data of the tool, so that the tool can run normally, and therefore, the running operation of the dependent environment is started. In the same way, in the construction process of the dependent environment, when the dependent environment is running, various services, environments, databases and the like in the dependent environment have a certain running sequence, and the dependent environment can be successfully run only by running according to the sequence, so that the running sequence of the software media needs to be summarized in advance to generate a preset running sequence, and the dependent environment is run according to the preset running sequence. The specific operation process is as follows; first, a third software medium is determined in a dependent environment based on a preset running sequence, wherein the third software medium is a first running software medium indicated by the preset running sequence, and the third software medium is run. And when the third software medium is successfully operated, determining a fourth software medium in the dependent environment, wherein the fourth software medium is the next software medium indicated by the preset operation sequence and successfully operated by the third software medium, operating the fourth software medium, and continuously determining and operating the next software medium of the fourth software medium until the dependent environment is successfully operated.
Taking at least one software medium including PostgreSQL service, Redis service, Nginx service, and DRGs packetizer as an example, the foregoing operation process can be practically summarized as follows:
referring to fig. 2B, when starting the dependent environment, it is determined whether the software medium is installed ready (i.e., whether a certain installation medium is missing in the dependent environment), and if it is determined that a certain software medium is missing, the user is prompted to delete the installation medium, and the current process is ended. And if the fact that a certain software medium is not lost is determined, determining a preset operation sequence, operating the PostgreSQL service according to the preset operation sequence, prompting the operation failure when the PostgreSQL service fails to operate, and ending the current flow. When the PostgreSQL service is successfully operated, determining that the next service to be operated of the PostgreSQL service is a Redis service in a preset operation sequence, and operating the Redis service. And when the Redis service fails to operate, prompting that the operation fails and ending the current flow. When the Redis service is successfully operated, determining that the next service to be operated of the Redis service is the Nginx service in a preset operation sequence, and operating the Nginx service. And when the Nginx service fails to operate, prompting that the operation fails and ending the current process. When the operation of the Nginx service is successful, it is determined that the next service to be operated of the Nginx service is a DRGs packetizer in a preset operation order, and the DRGs packetizer is operated. And when the operation of the DRGs packetizer fails, prompting the failure of the operation and ending the current flow. When the DRGs grouper runs successfully, the currently executed running operation is determined to be successful, and the tool to be started can run normally, so that the user is prompted to finish the running smoothly, and the current process is ended. And when the operation of the DRGs packetizer fails, prompting the failure of the operation and ending the current flow.
205. Starting data initialization, acquiring basic data selected by a user, determining a database in a dependent environment, and importing the basic data into the database in batches.
In the embodiment of the invention, after the operation of the dependent environment is finished, preparation can be made for the starting and normal operation of the tool to be started, namely, the basic data selected by the user is obtained, the database is determined in the dependent environment, and the basic data is imported into the database in batch.
The basic data is data to be processed by the tool to be started, that is, data required by the tool to be started during service processing, such as measurement and calculation tool dictionary data, disease coding information, medical record data, and the like, and is used for providing actual service operation. The basic data can be selected and filled by a user, a specific front end provides a basic data entry page, and data selected and added by the user in the basic data entry page is used as basic data to be subjected to batch import operation.
In the process of practical application, due to factors such as network faults and network delays, the possibility of data initialization failure exists, and the batch import of basic data fails, so that when the data initialization failure is detected, a user needs to be reminded of the data initialization failure, and the user determines whether to re-enter the basic data or finish the operation. In order to enable a user to know which step in the process is abnormal and then causes the failure of the data initialization process, the user can call a command prompt based on the environment detection script, execute a system query instruction by adopting the command prompt, obtain a plurality of execution results in the process of importing basic data into the database in batches, package the plurality of execution results into an execution log, and remind the user based on the execution log. Specifically, a CMD (command prompt) command can be called by the VBS script to execute a system command of PostgreSQL, thereby directly outputting an execution log.
So far, the installation and the starting depending on the environment are completed, the data required by the tool to be started in the normal business processing is successfully imported, the preparation work before the tool to be started is finished, and the whole process is simply summarized as follows:
referring to fig. 2C, the installation of the software medium is started, and after the installation is completed, whether the installation of the software medium is ready (i.e., whether the software medium is missing or not is determined according to the environment). If the software medium is determined not to be installed in order, prompting that the installed medium is missing, and ending the current flow; and if the software medium is determined to be installed in order, starting data initialization import operation, importing the basic data into the dependent environment, and judging whether data initialization is completed. If the data initialization is determined to be completed, prompting that the data initialization is successful, ending the current process, and waiting for the subsequent starting operation of the tool to be started; and if the data initialization is determined to be failed, prompting that the data initialization is failed, and ending the current process.
206. The tool to be started is started in the dependent environment.
In the embodiment of the invention, when the dependent environment is successfully operated and the basic data is successfully imported, the tool to be started can be started in the dependent environment, and corresponding business processing is carried out on the basic data in the dependent environment based on the tool to be started.
In the process of actual application, the user also requests to start the tool to be started to stop. Because the whole starting and stopping process is complex, when a stopping instruction of the tool to be started is received, a prompt can be given to a user to prompt the user whether to confirm that the operation of the tool to be started is stopped. If the user confirms that the operation of stopping the operation of the tool to be started is performed on the basis, the following operation of stopping the measurement and calculation tool may be continued. If the user denies the stop operation of the tool to be started, the user may touch the tool to be started accidentally, and therefore the current operation state of the tool to be started is maintained.
In addition, the stopping operation of the tool to be started is also required to ensure the normal state of the dependent environment, so that a stopping instruction of the tool to be started is received, the software medium included in the dependent environment is detected, when the software medium included in the dependent environment is determined to be consistent with at least one software medium, the dependent environment is determined to be complete, and the stopping operation of the tool to be started and the dependent environment can be performed. The tool to be started and the environment-dependent stopping need to follow a certain sequence, so a preset stopping sequence can be set in advance, and the tool to be started and the environment-dependent stopping can be performed according to the preset stopping sequence. The preset stop sequence is a reverse preset operation sequence, that is, if the preset operation sequence is to start a first, then start B, and finally start C, the preset stop sequence may be to stop C first, then stop B, and finally stop C. When the tool to be started is stopped, the preset stopping sequence is obtained, and the tool to be started is started to run after being started successfully depending on the environment, so that the running of the tool to be started can be stopped firstly, then the fifth software medium is determined in the preset stopping sequence, the running of the fifth software medium is stopped, and the fifth software medium is the first stopped software medium indicated by the preset stopping sequence. And after the fifth software medium is successfully stopped, determining a sixth software medium, wherein the sixth software medium is the next software medium after the fifth software medium is successfully stopped, stopping the operation of the sixth software medium, and continuously determining and stopping the next software medium of the sixth software medium until at least one software medium is successfully stopped. When the software medium included in the dependent environment is determined to be inconsistent with at least one software medium, the dependent environment is not detected, it can be determined that a certain software medium is absent from the dependent environment, the current tool to be started cannot normally stop working, and a user needs to be prompted. And if the dependent environment passes the detection, determining that no software medium is missing in the dependent environment, prompting the user to miss an installation medium, and ending the current flow.
Continuing with the example of FIG. 2B above, the context-dependent stopping process is as follows:
referring to fig. 2D, when the stop operation of the tool to be started is started, it is determined whether the software medium is installed in a ready state (i.e., whether a certain installation medium is missing in the dependent environment), and if it is determined that a certain software medium is missing, the user is prompted to delete the installation medium, and the current process is ended. And if the fact that certain software media are not lacked is determined, acquiring a preset stopping sequence, stopping the tool to be started first, and stopping the DRGs grouper according to the preset stopping sequence after the tool to be started stops. The Nginx service is stopped after the DRGs packetizer stop is completed, and the Redis service is stopped after the Nginx service stop is completed. And stopping PostgreSQL service after the Redis service is stopped, prompting the user to smoothly finish stopping the tool to be started after the PostgreSQL service is stopped, and finishing the current flow.
The method provided by the embodiment of the invention can automatically construct the dependent environment on which the tool is installed, automatically detect whether the dependent environment is complete or not, and automatically operate the dependent environment according to the preset operation sequence of the software medium in the dependent environment after the dependent environment is determined to be complete so as to facilitate the normal start of the tool to be started.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present invention provides a tool activation apparatus, as shown in fig. 3A, the apparatus includes: a building module 301, a detecting module 302, an operating module 303 and an initiating module 304.
The building module 301 is configured to obtain at least one software medium of a tool to be started, and build a dependent environment based on the at least one software medium, where the at least one software medium includes a service, an environment, and a database that the tool to be started depends on when being started;
the detection module 302 is configured to start an environment detection script and detect a software medium included in the dependent environment;
the running module 303 is configured to, if it is determined that the software medium included in the dependent environment is consistent with the at least one software medium, obtain a preset running order, and run the dependent environment according to the preset running order;
the starting module 304 is configured to start the tool to be started in the dependent environment.
In a specific application scenario, as shown in fig. 3B, the building module 301 includes: an acquisition unit 3011, a mounting unit 3012, a determination unit 3013, and a construction unit 3014.
The obtaining unit 3011 is configured to obtain a preset installation order of the at least one software medium label;
the installation unit 3012 is configured to determine a first software medium based on the preset installation order, and install the first software medium, where the first software medium is a first installed software medium indicated by the preset installation order;
the determining unit 3013 is configured to determine, after the first software medium is installed, the second software medium in the preset installation order, where the second software medium is a next software medium after the first software medium is installed, and the second software medium is indicated by the preset installation order;
the installation unit 3012 is further configured to install the second software medium, and continue to determine and install a next software medium of the second software medium until the installation of the at least one software medium is completed;
the constructing unit 3014 is configured to use the environment constructed by the installed at least one software medium as the dependent environment.
In a specific application scenario, as shown in fig. 3C, the apparatus further includes: a comparison module 305, a determination module 306, an extraction module 307 and a presentation module 308.
The comparing module 305 is configured to compare the software medium included in the dependent environment with the at least one software medium if it is determined that the software medium included in the dependent environment is inconsistent with the at least one software medium;
the determining module 306 is configured to determine, among the at least one software medium, a target software medium not included in the dependency environment;
the extracting module 307 is configured to extract the media name of the target software media, and generate a failure response carrying the media name;
the displaying module 308 is configured to display the failure response.
In a specific application scenario, as shown in fig. 3D, the operation module 303 includes: a determination unit 3031 and an execution unit 3032.
The determining unit 3031 is configured to determine, based on the preset running sequence, a third software medium in the dependent environment, where the third software medium is a first running software medium indicated by the preset running sequence;
the operation unit 3032 is used for operating the third software medium;
the determining unit 3031 is further configured to determine, after the third software medium is successfully run, a fourth software medium in the dependency environment, where the fourth software medium is a next software medium after the third software medium indicated by the preset running sequence is successfully run;
the running unit 3032 is further configured to run the fourth software medium, and continue to determine and run a next software medium of the fourth software medium until the dependent environment is successfully run.
In a specific application scenario, as shown in fig. 3E, the apparatus further includes: a first acquisition module 309 and an import module 310.
The first obtaining module 309 is configured to start data initialization, and obtain basic data selected by a user, where the basic data is data to be processed by the tool to be started;
the import module 310 is configured to determine a database in the dependency environment, and import the basic data into the database in batch.
In a specific application scenario, as shown in fig. 3F, the apparatus further includes: a calling module 311, a query module 312, and a packaging module 313.
The calling module 311 is configured to, when it is detected that the basic data is failed to be imported into the database in batch, call a command prompt based on the environment detection script;
the query module 312 is configured to execute a system query instruction by using the command prompt, and obtain a plurality of execution results in the process of importing the basic data into the database in batch;
the packaging module 313 is configured to package the multiple execution results into an execution log, and remind the user based on the execution log.
In a specific application scenario, as shown in fig. 3G, the apparatus further includes: a receiving module 314, a second acquiring module 315, and a stopping module 316.
The receiving module 314 is configured to receive a stop instruction for the tool to be started, and detect a software medium included in the dependency environment;
the second obtaining module 315 is configured to obtain a preset stop sequence when it is determined that the software media included in the dependent environment are consistent with the at least one software medium, where the preset stop sequence is the reverse preset running sequence;
the stop module 316 is used for stopping the operation of the tool to be started;
the stopping module 316 is further configured to determine a fifth software medium in the preset stopping sequence, and stop the operation of the fifth software medium, where the fifth software medium is a first stopped software medium indicated by the preset stopping sequence;
the stopping module 316 is further configured to determine a sixth software medium after the fifth software medium is successfully stopped, where the sixth software medium is a next software medium after the fifth software medium is successfully stopped;
the stopping module 316 is further configured to stop the running of the sixth software medium, and determine and stop a next software medium of the sixth software medium until all the at least one software medium is successfully stopped.
The device provided by the embodiment of the invention can automatically construct the dependent environment on which the tool is installed, automatically detect whether the dependent environment is complete or not, and automatically operate the dependent environment according to the preset operation sequence of the software medium in the dependent environment after the dependent environment is determined to be complete so as to facilitate the normal start of the tool to be started.
It should be noted that other corresponding descriptions of the functional units related to the tool activation device provided in the embodiment of the present invention may refer to the corresponding descriptions in fig. 1 and fig. 2A to fig. 2D, and are not repeated herein.
In an exemplary embodiment, referring to fig. 4, there is further provided a device, where the device 400 includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, where the functional units may communicate with each other through the bus. The memory stores computer programs, and the processor is used for executing the programs stored in the memory and executing the tool starting method in the embodiment.
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 tool activation method.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by hardware, and also by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.
Claims (10)
1. A tool activation method, comprising:
acquiring at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium, wherein the at least one software medium comprises a service, an environment and a database which are depended by the tool to be started when the tool to be started is started;
starting an environment detection script to detect a software medium included in the dependence environment;
if the software medium included in the dependent environment is determined to be consistent with the at least one software medium, acquiring a preset operation sequence, and operating the dependent environment according to the preset operation sequence;
and starting the tool to be started in the dependent environment.
2. The method of claim 1, wherein the obtaining at least one software medium of the tool to be started, and building a dependent environment based on the at least one software medium comprises:
acquiring a preset installation sequence marked by the at least one software medium;
determining a first software medium based on the preset installation sequence, and installing the first software medium, wherein the first software medium is the first installed software medium indicated by the preset installation sequence;
after the first software medium is installed, determining a second software medium in the preset installation sequence, wherein the second software medium is the next software medium indicated by the preset installation sequence after the first software medium is installed;
installing the second software medium, and continuously determining and installing the next software medium of the second software medium until the installation of at least one software medium is finished;
and taking the environment constructed by the at least one installed software medium as the dependent environment.
3. The method of claim 1, wherein after the initiating environment detection script detects the software medium included in the dependent environment, the method further comprises:
if the software medium included in the dependent environment is determined to be inconsistent with the at least one software medium, comparing the software medium included in the dependent environment with the at least one software medium;
determining, in the at least one software medium, a target software medium not included in the dependency environment;
extracting the medium name of the target software medium and generating a failure response carrying the medium name;
and displaying the failure response.
4. The method of claim 1, wherein the obtaining a preset operation order, and operating the dependent environment according to the preset operation order, comprises:
determining a third software medium in the dependency environment based on the preset running sequence, wherein the third software medium is a first running software medium indicated by the preset running sequence;
running the third software medium;
when the third software medium is successfully operated, determining a fourth software medium in the dependence environment, wherein the fourth software medium is a next software medium indicated by the preset operation sequence after the third software medium is successfully operated;
and operating the fourth software medium, and continuously determining and operating the next software medium of the fourth software medium until the dependent environment is successfully operated.
5. The method of claim 1, wherein after obtaining a preset operation order and operating the dependent environment according to the preset operation order, the method further comprises:
starting data initialization, and acquiring basic data selected by a user, wherein the basic data is data to be processed by the tool to be started;
determining a database in the dependency environment, and importing the basic data into the database in a batch mode.
6. The method of claim 5, wherein after determining a database in the dependency environment and importing the underlying data batch into the database, the method further comprises:
when the failure of batch import of the basic data into the database is detected, calling a command prompt based on the environment detection script;
executing a system query instruction by adopting the command prompt symbol to obtain a plurality of execution results in the process of importing the basic data into a database in batches;
and packaging the execution results into an execution log, and reminding the user based on the execution log.
7. The method of claim 1, further comprising:
receiving a stop instruction of the tool to be started, and detecting a software medium included in the dependence environment;
when the software media included in the dependent environment are determined to be consistent with the at least one software media, acquiring a preset stopping sequence, wherein the preset stopping sequence is the reverse preset running sequence;
stopping the operation of the tool to be started;
determining a fifth software medium in the preset stopping sequence, and stopping the operation of the fifth software medium, wherein the fifth software medium is the first stopped software medium indicated by the preset stopping sequence;
determining a sixth software medium after the fifth software medium is successfully stopped, wherein the sixth software medium is the next software medium after the fifth software medium is successfully stopped;
and stopping the running of the sixth software medium, and determining and stopping the next software medium of the sixth software medium until all the at least one software medium is successfully stopped.
8. A tool actuation device, comprising:
the system comprises a construction module, a storage module and a control module, wherein the construction module is used for acquiring at least one software medium of a tool to be started, and constructing a dependent environment based on the at least one software medium, and the at least one software medium comprises a service, an environment and a database which are depended by the tool to be started when the tool to be started is started;
the detection module is used for starting an environment detection script and detecting a software medium included in the dependent environment;
the running module is used for acquiring a preset running sequence if the software medium included in the dependent environment is determined to be consistent with the at least one software medium, and running the dependent environment according to the preset running sequence;
and the starting module is used for starting the tool to be started in the dependence environment.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010578059.4A CN111722886A (en) | 2020-06-23 | 2020-06-23 | Tool starting method and device, computer equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010578059.4A CN111722886A (en) | 2020-06-23 | 2020-06-23 | Tool starting method and device, computer equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111722886A true CN111722886A (en) | 2020-09-29 |
Family
ID=72570040
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010578059.4A Pending CN111722886A (en) | 2020-06-23 | 2020-06-23 | Tool starting method and device, computer equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111722886A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306749A (en) * | 2020-10-26 | 2021-02-02 | 珠海格力电器股份有限公司 | Service processing method and device in control system and control system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103645898A (en) * | 2013-12-13 | 2014-03-19 | 浪潮电子信息产业股份有限公司 | Automatic scripting tool |
CN106933545A (en) * | 2015-12-29 | 2017-07-07 | 阿里巴巴集团控股有限公司 | Application system and its starting protection method and device |
CN108399083A (en) * | 2017-02-07 | 2018-08-14 | 北京京东尚科信息技术有限公司 | A kind of system deployment method, apparatus, electronic equipment and storage medium |
CN110389936A (en) * | 2019-07-25 | 2019-10-29 | 上海连尚网络科技有限公司 | A kind of method, equipment and computer storage medium starting small routine |
-
2020
- 2020-06-23 CN CN202010578059.4A patent/CN111722886A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103645898A (en) * | 2013-12-13 | 2014-03-19 | 浪潮电子信息产业股份有限公司 | Automatic scripting tool |
CN106933545A (en) * | 2015-12-29 | 2017-07-07 | 阿里巴巴集团控股有限公司 | Application system and its starting protection method and device |
CN108399083A (en) * | 2017-02-07 | 2018-08-14 | 北京京东尚科信息技术有限公司 | A kind of system deployment method, apparatus, electronic equipment and storage medium |
CN110389936A (en) * | 2019-07-25 | 2019-10-29 | 上海连尚网络科技有限公司 | A kind of method, equipment and computer storage medium starting small routine |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112306749A (en) * | 2020-10-26 | 2021-02-02 | 珠海格力电器股份有限公司 | Service processing method and device in control system and control system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106951364B (en) | Test method and device | |
US10713437B2 (en) | Method and apparatus for identifying questionable line break characters in an application | |
US9734047B2 (en) | Method and apparatus for an improved automated test of software with a graphical user interface | |
WO2019214109A1 (en) | Monitoring device and method for testing process, and computer readable storage medium | |
CN112612690B (en) | User interface information processing method and device, electronic equipment and storage medium | |
CN112882953A (en) | Automatic demonstration method and system for application program based on android debugging bridge | |
CN107193747B (en) | Code testing method and device and computer equipment | |
CN111211929A (en) | Fault positioning method, fault positioning device, control equipment and intelligent equipment | |
WO2020096665A2 (en) | System error detection | |
US10108474B2 (en) | Trace capture of successfully completed transactions for trace debugging of failed transactions | |
CN109032911B (en) | Frame rate detection method and device for mobile device and electronic device | |
CN114218072A (en) | Test script generation method and device, storage medium and computer equipment | |
CN111722886A (en) | Tool starting method and device, computer equipment and computer readable storage medium | |
CN109240928A (en) | Test method, device, equipment and storage medium | |
CN113495843A (en) | Method and device for testing play-starting performance of video player | |
CN112181853A (en) | Program debugging method, device and system | |
CN116431468A (en) | Test method, test device, test processing equipment and storage medium | |
CN115951947A (en) | Information interaction method and device and storage medium | |
CN111741046B (en) | Data reporting method, data acquisition method, device, equipment and medium | |
CN110020906B (en) | Order information detection method and device | |
CN112612469A (en) | Interface element processing method and device and electronic equipment | |
CN112732538A (en) | Panel performance analysis method and device, terminal and storage medium | |
CN111597101A (en) | SDK access state detection method, computer device and computer readable storage medium | |
CN113254357A (en) | Data processing method and device, electronic equipment and storage medium | |
CN116225943A (en) | Interactive interface testing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200929 |
|
RJ01 | Rejection of invention patent application after publication |