CN111522615A - Method, device and equipment for updating command line interface and storage medium - Google Patents

Method, device and equipment for updating command line interface and storage medium Download PDF

Info

Publication number
CN111522615A
CN111522615A CN202010329816.4A CN202010329816A CN111522615A CN 111522615 A CN111522615 A CN 111522615A CN 202010329816 A CN202010329816 A CN 202010329816A CN 111522615 A CN111522615 A CN 111522615A
Authority
CN
China
Prior art keywords
version
line interface
command line
information
interest
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010329816.4A
Other languages
Chinese (zh)
Other versions
CN111522615B (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.)
Shenzhen Saiante Technology Service Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010329816.4A priority Critical patent/CN111522615B/en
Publication of CN111522615A publication Critical patent/CN111522615A/en
Application granted granted Critical
Publication of CN111522615B publication Critical patent/CN111522615B/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/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates

Abstract

The invention relates to the technical field of artificial intelligence, and discloses a method, a device, equipment and a storage medium for updating a command line interface, wherein the method comprises the steps of obtaining an update instruction of a target command line interface, and extracting current version information based on the update instruction; extracting the interest version information of an interest version library of a target command line interface, wherein the interest version library is generated by cloning a historical version library; comparing a current version number in current version information with an interest version number in the interest version information to obtain a detection result aiming at the current version information; and outputting prompt information of updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information. After the interesting version library is obtained, the current version information is compared with the version information in the interesting version library, and the updating prompt information is obtained, so that the automatic updating of the command line interface is realized in the development, operation and maintenance, and the stability of the command line interface is improved.

Description

Method, device and equipment for updating command line interface and storage medium
Technical Field
The invention relates to the technical field of user interface version updating in artificial intelligence, in particular to a method, a device, equipment and a storage medium for updating a command line interface.
Background
A Command-Line Interface (Command-Line Interface) is the most widely used user Interface before graphical user interfaces are popularized, and generally does not support a mouse, and a user inputs an instruction through a keyboard and a computer executes the instruction after receiving the instruction.
Currently, the updating of the command line interface is typically done manually by the user. However, the manual updating method is difficult to obtain the latest version of information in time, which may result in untimely updating. And the method is not suitable for items without open sources, and the stability of the command line interface is difficult to ensure.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for updating a command line interface, aiming at realizing automatic detection of updating of the command line interface and improving the stability of the command line interface.
In order to achieve the above object, the present invention provides a method for updating a command line interface, including:
acquiring an updating instruction of a target command line interface, and extracting current version information based on the updating instruction;
extracting the interesting version information of an interesting version library of the target command line interface, wherein the interesting version library is generated by cloning a historical version library;
comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information;
and outputting prompt information of updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
Preferably, the step of extracting the interest version information of the interest version library of the target command line interface includes:
performing version cloning on the interesting version library, and setting a depth parameter;
acquiring history submissions with corresponding numbers according to the depth parameters to serve as the interest version library, and storing the interest version library to a machine directory file;
and extracting the interested version information of the target command line interface according to the machine directory file.
Preferably, the comparing the current version number in the current version information with the interest version number in the interest version information to obtain the detection result for the current version information includes:
reading a current version number from the current version information, and reading an interest version number from the interest version information;
comparing the current version number with the interest version number, and acquiring a target version number consistent with the current version number from the interest version number;
acquiring the version state of a target version corresponding to the target version number;
if the version state is the latest version, the detection result is the latest version;
if the version state is a temporary support version, the detection result is an available version;
and if the version state is the version which is not supported, the detection result is the version which is not supported.
Preferably, the step of outputting the prompt information for updating the version of the command line interface according to the detection result includes:
obtaining parameters of the detection result based on a version information strategy of the command line interface, wherein the parameters comprise version quitting and version warning;
if the parameter is the version exit, forcibly exiting and outputting prompt information for forced updating;
and if the parameter is a version warning, outputting prompt information for prompting upgrading.
Preferably, the step of outputting the corresponding update prompt information according to the comparison result further includes:
acquiring an updated version of the target command line interface, and installing the updated version to the local;
and after the installation is finished, prompting the relevant information of the update.
Preferably, the step of obtaining an updated version of the command line interface and installing the updated version locally includes:
adding a version library submodule through a version library command, wherein the version library command comprises a path and a directory of the version library submodule, and the updated version comprises an application package or a template type code;
if the updated version is the application program package, installing the application program package to a global variable, and then installing a related dependency package; or
And if the updated version is the template type code, directly installing the dependent package.
Preferably, the step of obtaining the update instruction of the target command line interface and extracting the current version information based on the update instruction further includes:
setting a timing strategy for triggering an updating instruction, and automatically sending the updating instruction according to the timing strategy.
In addition, in order to achieve the above object, the present invention further provides an update apparatus for a command line interface, including:
the acquisition module is used for acquiring an update instruction of a target command line interface and extracting current version information based on the update instruction;
the extraction module is used for extracting the interest version information of an interest version library of the target command line interface, wherein the interest version library is generated by cloning a historical version library;
the comparison module is used for comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information;
and the output module is used for outputting prompt information for updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
In addition, to achieve the above object, this embodiment further provides a device for detecting update of a command line interface, where the device for detecting update of a command line interface includes a processor, a memory, and an update program of a command line interface stored in the memory, and when the update program of a command line interface is executed by the processor, the steps of the method for detecting update of a command line interface as described above are implemented.
In addition, to achieve the above object, an embodiment of the present invention further provides a computer storage medium, where a command line interface update detection program is stored on the computer storage medium, and when the command line interface update detection program is executed by a processor, the steps of the command line interface update detection method are implemented.
Compared with the prior art, the invention provides a method, a device, equipment and a storage medium for updating a command line interface, which are used for acquiring an updating instruction of a target command line interface and extracting current version information based on the updating instruction; extracting the interested version information of an interested version library of the target command line interface, wherein the interested version library is generated by cloning a historical version library; comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information; and outputting prompt information of updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information. After the interesting version library is obtained, the current version information is compared with the version information in the interesting version library, and the updating prompt information is obtained, so that the automatic updating of the command line interface is realized in the development, operation and maintenance, and the stability of the command line interface is improved.
Drawings
FIG. 1 is a diagram illustrating a hardware architecture of a command line interface update apparatus according to embodiments of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a command line interface update method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a command line interface update method according to the present invention;
FIG. 4 is a functional block diagram of a first embodiment of an apparatus for updating a command line interface according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The updating device of the command line interface mainly related to the embodiment of the invention is a network connection device capable of realizing network connection, and the updating device of the command line interface can be a server, a cloud platform and the like.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an update apparatus of a command line interface according to embodiments of the present invention. In this embodiment of the present invention, the update device of the command line interface may include a processor 1001 (e.g., a Central Processing Unit, CPU), a communication bus 1002, an input port 1003, an output port 1004, and a memory 1005. The communication bus 1002 is used for realizing connection communication among the components; the input port 1003 is used for data input; the output port 1004 is used for data output, the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory, and the memory 1005 may optionally be a storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration depicted in FIG. 1 is not intended to be limiting of the present invention, and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is one type of readable storage medium, may include an operating system, a network communication module, an application module, and an update program for a command line interface. In fig. 1, the network communication module is mainly used for connecting to a server and performing data communication with the server; the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
acquiring an updating instruction of a target command line interface, and extracting current version information based on the updating instruction;
extracting the interesting version information of an interesting version library of the target command line interface, wherein the interesting version library is generated by cloning a historical version library;
comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information;
and outputting prompt information of updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
Further, the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
performing version cloning on the interesting version library, and setting a depth parameter;
acquiring a plurality of historical submissions as the interest version library according to the depth parameters, and storing the interest version library to a machine directory file;
and reading the interested version information from the machine directory file.
Further, the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
reading a current version number from the current version information, and reading an interest version number from the interest version information;
comparing the current version number with the interest version number, and acquiring a target version number consistent with the current version number from the interest version number;
acquiring the version state of a target version corresponding to the target version number;
if the version state is the latest version, the detection result is the latest version;
if the version state is a temporary support version, the detection result is an available version;
and if the version state is the version which is not supported, the detection result is the version which is not supported.
Further, the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
obtaining parameters of the detection result based on a version information strategy of the command line interface, wherein the parameters comprise version quitting and version warning;
if the parameter is the version exit, forcibly exiting and outputting prompt information for forced updating;
and if the parameter is a version warning, outputting prompt information for prompting upgrading.
Further, the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
acquiring an updated version of the target command line interface, and installing the updated version to the local;
and after the installation is finished, prompting the relevant information of the update.
Further, the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
adding a version library submodule through a version library command, wherein the version library command comprises a path and a directory of the version library submodule, and the updated version comprises an application package or a template type code;
if the updated version is the application program package, installing the application program package to a global variable, and then installing a related dependency package; or
And if the updated version of the command line interface is the template type code, directly installing the dependent package.
Further, the processor 1001 is configured to call an update program of the command line interface stored in the memory 1005, and perform the following operations:
setting a timing strategy for triggering an updating instruction, and automatically sending the command line interface updating instruction according to the timing strategy.
Based on the hardware structure of the update device of the command line interface, the embodiments of the update method of the command line interface are provided.
A Command-Line Interface (CLI), also known as CUI (character user Interface). The command line interface is the most widely used user interface before the graphical user interface is widely used, and generally does not support mouse operation, and the computer receives and executes instructions input by a user through a keyboard. The software of the command line interface usually requires the user to memorize the commands of the operation, but due to its own features, the command line interface saves resources of the computer system compared with the graphical user interface. Under the premise of remembering commands, the operation speed of using a command line interface is usually faster than that of using a graphical user interface. Therefore, an alternative command line interface remains in the operating system of the graphical user interface.
The embodiment of the invention provides a method for updating a command line interface.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a command line interface updating method according to the present invention.
In this embodiment, the method for updating a command line interface is applied to a device for updating a command line interface, and the method includes:
step S101, obtaining an updating instruction of a target command line interface, and extracting current version information based on the updating instruction;
in this embodiment, the update instruction may be temporarily triggered by the user, or may be triggered by the timing policy. The target command line interface may be a current command line interface.
And after the updating instruction is acquired, reading a local cache based on the updating instruction, and extracting the current version information from the local cache. Generally, the version information includes information such as version number, historical commit time, update contents, and the like.
Further, the step of obtaining the update instruction of the target command line interface and extracting the current version information based on the update instruction further includes:
setting a timing strategy for triggering an updating instruction, and automatically sending the command line interface updating instruction according to the timing strategy.
Specifically, an independent background process is started in the Node, the update instruction is sent through the background process to obtain the version information, the background process does not block the execution of the main command, and after the request is successful, the version information and the check time are cached in a machine directory file smt-pkg-update. The updating instruction is triggered by a preset timing strategy, and the timing strategy comprises a timing period, a time point and a stopping condition. For example, the timing strategy is set to 9 am every monday.
Step S102, extracting the interest version information of an interest version library of the target command line interface, wherein the interest version library is generated by cloning a historical version library;
generally, when a developer updates a command line interface, the updated command line interface version is provided to a server for a user to download, install and use. In this embodiment, the versions of several historically submitted command line interfaces are marked as an interesting version library.
The step of extracting the interest version information of the interest version library of the target command line interface comprises the following steps:
performing version cloning on the interested version library and setting a depth parameter;
in the course of executing the version clone (gitclone), a depth parameter is set. Typically, a Git clone is used to clone a repository locally, through which the present embodiment clones a version repository locally. In this embodiment, the depth parameter is set to < depth > +1, where depth is an integer greater than or equal to 1, and the history submissions corresponding to the depth parameter are obtained according to the depth parameter and serve as the interest version library, so that the volume of the detected code can be reduced, and the detection efficiency can be improved.
The shallow cloning refers to creating a new object, wherein the attribute of the new object is completely the same as that of the original object, and for the non-basic type attribute, the new object still points to the memory address of the object pointed by the original attribute. That is, the shallow clone copies a reference in the stack memory to a new variable, and essentially two references point to the same address in the heap memory, and the contents are the same, wherein one of the references changes and the other reference also changes (the same object is changed at all).
This example provides a library of shallow clone-mode clone versions. Generally, the version library cloned by shallow cloning has the same hash value of SHA1 for each submission as the source version library, including the root node of the submission, but Git is implemented specifically so that the root node of the shallow cloning commits without a parent commit. Just because the SHA1 hash value of the shallow clone's commit object is consistent with the source version library, the shallow clone version library can execute either gitfetch or gitpull to get a new commit from the source version library. This embodiment creates a shallow clone by a Git clone command: for example: get clone-depth 2file// path/to/reops/hello world.git show 1.
Typically, gitfetch is used to pull up-to-date content of the remote host locally, so the interest version library can also be obtained by a version library submission (gitfetch).
Further, performing version cloning on the interest version library, and setting a depth parameter further includes:
acquiring history submissions with corresponding numbers according to the depth parameters to serve as the interest version library, and storing the interest version library to a machine directory file;
and acquiring a plurality of historical submissions according to the depth parameters to serve as the interest version library, wherein the number of the interest version libraries corresponds to the depth parameters. And after the interesting version library is obtained, writing the relevant parameters of the version information of the interesting version library into a machine directory file. In this embodiment, the machine directory file may be smt-pkg-update.json, and the machine directory file includes package.json version information.
Further, the step of saving the interest version library to the machine directory file further comprises:
and extracting the interested version information of the target command line interface according to the machine directory file.
When the interesting version information needs to be obtained, the machine directory file is directly extracted, and the interesting version information can be obtained.
Step S103, comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information;
specifically, a current version number is read from the current version information, and an interest version number is read from the interest version information; comparing the current version number with the interest version number, and acquiring a target version number consistent with the current version number from the interest version number; acquiring the version state of a target version corresponding to the target version number; if the version state is the latest version, the detection result is the latest version; if the version state is a temporary support version, the detection result is an available version; and if the version state is the version which is not supported, the detection result is the version which is not supported. And reading the interest version information of the interest version library from the machine directory file smt-pkg-update. And then comparing the interest version number in the interest version information with the current version number in the current version information. Specifically, a current version number of the current version information is scanned, and the current version number is compared with a plurality of interest version numbers; if the current version number is consistent with one of a plurality of interest version numbers, further judging the version state of a command line interface version corresponding to a target interest version number, wherein the target interest version number refers to the interest version number in the plurality of interest version numbers consistent with the current version number. Specifically, the version status of the target interest version is obtained, and the version status includes the latest version, a temporary support version, a non-support version, and the like. Determining a corresponding detection result according to the version state: if the current command line interface version is the latest version, detecting that the current command line interface version is the latest version; if the current command line interface version is the temporary support version, detecting that the current command line interface version is an available version; and if the version is the non-support version, the detection result is that the current command line interface version is the non-support version.
And step S104, outputting prompt information for updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
According to the version information strategy under the command line interface, exitVersion (version quit) indicates that the forced quit cannot be used if the condition is met, wanversion alarm indicates that the parameter is met, a user needs to be actively prompted to update and still can be normally used, otherwise, the forced quit is in a normal range, and the forced quit cannot prompt any information if the parameter is not met.
Specifically, the step of outputting the corresponding update prompt information according to the comparison result includes:
obtaining parameters of the comparison result based on a command line interface version information strategy, wherein the parameters comprise version exit exitVersion and version warning warnVersion;
the parameter corresponds to the detection result, and if the detection result is the latest version, the parameter may be null; if the detection result is the temporary support version, the corresponding parameter can be version warning warnVersion; if the detection result is that the version is not supported, the corresponding parameter may be that the version exits the exitvision.
If the parameter is exitVersion, forcibly exiting and outputting prompt information for forced updating;
and if the parameter is wanVersion, outputting prompt information for prompting upgrading.
Generally, for the npm module, there are generally three cases for the update of version a.b.c:
patch (Patch program): c bit, updating small version, generally bug repairing;
minor (Minor repair): b, updating the middle version, generally adding a new function and bug repairing;
major (overhaul): a-bit, large version update, generally incompatible upgrades.
For the major form, the command line tool is directly quitted, and the user is forced to use the tool after upgrading, so that all users can update the tool in time after pushing a large version, and the problem that the version fragments are caused by using the old version is solved. For the patch or minor form, an update may be suggested, with the user selecting whether to update.
According to the scheme, the updating instruction of the target command line interface is obtained, and the current version information is extracted based on the updating instruction; extracting interest version information of an interest version library of the target command line interface, wherein the interest version library is generated by cloning a historical version library; comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information; and outputting prompt information for updating the command line interface version according to the detection result so as to update the target command line interface according to the prompt information. After the interesting version library is obtained, the current version information is compared with the version information in the interesting version library, and the updating prompt information is obtained, so that the automatic updating of the command line interface is realized in the development, operation and maintenance, and the stability of the command line interface is improved.
As shown in fig. 3, a second embodiment of the present invention provides a method for updating a command line interface, based on the first embodiment shown in fig. 2, the step of outputting corresponding update prompting information according to the comparison result further includes:
step S105: acquiring an updated version of the target command line interface, and installing the updated version to the local;
specifically, the step S105 includes:
adding a version library submodule through a version library command, wherein the version library command comprises a path and a directory of the version library submodule, and the updated version of the command line interface comprises an application program package or a template type code;
further, the step of adding the version library sub-module by the version library command further includes: if the updated version is the application program package, installing the application program package to a global variable, and then installing a related dependency package; or
And if the updated version of the command line interface is the template type code, directly installing the dependent package.
Further, adding a version library sub-template through a version control command, wherein the version library command comprises a path and a directory of the version library sub-template.
The version control Git is an open-source distributed version control system for agilely and efficiently processing any or small or large items. The Git Submodule is a tool for multiple modules to use a common class library, the class library module is used as a retrieval (storage library), and the Submodule is used as a single Git module to be stored in a parent module. The sub-modules comprise independent commit, push, pull commands; the parent module comprises one or more sub-modules, the parent module can specify the header of the sub-module, the submission information of the parent module comprises the information of the sub-module, and the sub-module can be initialized when the parent module is cloned again.
Specifically, a Git command is used for adding a Submodule, wherein the Git command needs to establish a path of the Submodule and a directory path stored by the Submodule; after a module is cloned, the Submodule directory is defaulted to have no content, and the Submodule directory can be called by executing initialization operation on the module root directory; when the sub-module needs to be updated, entering the sub-module, switching to a branch needing to be updated, and updating the sub-module; in addition, a delete operation may also be performed on the sub-module.
Step S106: and after the installation is finished, prompting the relevant information of the update.
And after the installation is finished, prompting the relevant information updated this time, and continuously executing other operations. The related information may include version information, added functions, authority settings, and the like.
According to the scheme, the updated version of the target command line interface is acquired, and the updated version is installed locally; and after the installation is finished, prompting the relevant information of the update. Therefore, automatic detection of updating of the command line interface is realized in development, operation and maintenance, and the stability of the command line interface is improved.
In addition, the embodiment also provides a device for updating the command line interface. Referring to fig. 4, fig. 4 is a functional block diagram of an update apparatus of a command line interface according to a first embodiment of the present invention.
In this embodiment, the updating device of the command line interface is a virtual device, and is stored in the memory 1005 of the updating apparatus of the command line interface shown in fig. 1, so as to implement all functions of the updating program of the command line interface: acquiring an updating instruction of a target command line interface, and extracting current version information based on the updating instruction; extracting the interested version information of an interested version library of the target command line interface, wherein the interested version library is generated by a clone history version library; comparing the current version information with the interest version information to obtain a detection result aiming at the version information; and outputting prompt information for updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
Specifically, the device for updating the command line interface includes:
the acquisition module is used for acquiring an update instruction of a target command line interface and extracting current version information based on the update instruction;
the extraction module is used for extracting the interest version information of an interest version library of the target command line interface, wherein the interest version library is generated by a clone history version library;
the comparison module is used for comparing the current version information with the interest version information to obtain a detection result aiming at the version information;
and the output module is used for outputting prompt information for updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
Further, the extraction module further comprises:
the first setting unit is used for executing version cloning on the interest version library and setting a depth parameter;
the saving unit is used for acquiring a plurality of historical submissions according to the depth parameters to serve as the interest version library and saving the interest version library to a machine directory file;
and the reading unit is used for reading the interested version information from the machine directory file.
Further, the setting unit further includes:
the acquisition unit is used for acquiring parameters of the detection result based on the version information strategy of the command line interface, wherein the parameters comprise version exit and version warning;
the first output unit is used for forcibly quitting if the parameter is the version quit and outputting prompt information for forced updating;
and the second output unit is used for outputting prompt information for prompting upgrading if the parameter is a version warning.
Further, the output module further includes:
the acquisition unit is used for acquiring an updated version of the target command line interface and installing the updated version to the local;
and the prompting unit is used for prompting the relevant information updated this time after the installation is finished.
Further, the acquisition unit includes:
the pull subunit is used for adding a version library submodule through a version library command, the version library command comprises a path and a directory of the version library submodule, and the updated version comprises an application program package or a template type code;
the first installation subunit is used for installing the application program package to a global variable and then installing a related dependency package if the updated version is the application program package; or
And the second installation subunit is used for directly installing the dependency package if the updated version is the template type code.
Further, the obtaining module further comprises:
and the second setting unit is used for setting a timing strategy for triggering the updating instruction and automatically sending the updating instruction according to the timing strategy.
In addition, an embodiment of the present invention further provides a computer storage medium, where a command line interface update detection program is stored on the computer storage medium, and when the command line interface update detection program is executed by a processor, the steps of the command line interface update detection method are implemented, which are not described herein again.
Compared with the prior art, the method, the device, the equipment and the storage medium for updating the command line interface provided by the invention comprise the steps of obtaining an update instruction of a target command line interface, and extracting current version information based on the update instruction; extracting interest version information of an interest version library of the target command line interface, wherein the interest version library is generated by cloning a historical version library; comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information; and outputting prompt information of updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information. After the interesting version library is obtained, the current version information is compared with the version information in the interesting version library, and the updating prompt information is obtained, so that the automatic updating of the command line interface is realized in the development, operation and maintenance, and the stability of the command line interface is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for causing a terminal device to execute the method according to the embodiments of the present invention.
The above description is only for the preferred embodiment of the present invention and is not intended to limit the scope of the present invention, and all equivalent structures or flow transformations made by the present specification and drawings, or used directly or indirectly in other related fields are included in the scope of the present invention.

Claims (10)

1. A method for updating a command line interface, applied to the command line interface, includes:
acquiring an updating instruction of a target command line interface, and extracting current version information based on the updating instruction;
extracting the interested version information of an interested version library of the target command line interface, wherein the interested version library is generated by cloning a historical version library;
comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information;
and outputting prompt information of updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
2. The method of claim 1, wherein extracting interest version information for the library of interest versions of the target command line interface comprises:
performing version cloning on the interesting version library, and setting a depth parameter;
acquiring history submissions with corresponding numbers according to the depth parameters to serve as the interest version library, and storing the interest version library to a machine directory file;
and extracting the interested version information of the target command line interface according to the machine directory file.
3. The method of claim 1, wherein comparing the current version number in the current version information with the interest version number in the interest version information to obtain the detection result for the current version information comprises:
reading a current version number from the current version information, and reading an interest version number from the interest version information;
comparing the current version number with the interest version number, and acquiring a target version number consistent with the current version number from the interest version number;
acquiring the version state of a target version corresponding to the target version number;
if the version state is the latest version, the detection result is the latest version;
if the version state is a temporary support version, the detection result is an available version;
and if the version state is the version which is not supported, the detection result is the version which is not supported.
4. The method of claim 1, wherein the step of outputting a prompt for the update of the command line interface version according to the detection result comprises:
obtaining parameters of the detection result based on a version information strategy of the command line interface, wherein the parameters comprise version quitting and version warning;
if the parameter is the version exit, forcibly exiting and outputting prompt information for forced updating;
and if the parameter is a version warning, outputting prompt information for prompting upgrading.
5. The method according to claim 1, wherein the step of outputting the corresponding update prompt information according to the comparison result further comprises:
acquiring an updated version of the target command line interface, and installing the updated version to the local;
and after the installation is finished, prompting the relevant information of the update.
6. The method of claim 5, wherein obtaining an updated version of the command line interface and installing the updated version locally comprises:
adding a version library submodule through a version library command, wherein the version library command comprises a path and a directory of the version library submodule, and the updated version comprises an application package or a template type code;
if the updated version is the application program package, installing the application program package to a global variable, and then installing a related dependency package; or
And if the updated version is the template type code, directly installing the dependent package.
7. The method of claim 1, wherein the step of obtaining an update instruction of the target command line interface based on which the current version information is extracted is preceded by the step of:
setting a timing strategy for triggering an updating instruction, and automatically sending the updating instruction according to the timing strategy.
8. An updating apparatus of a command line interface, the updating apparatus of the command line interface comprising:
the acquisition module is used for acquiring an update instruction of a target command line interface and extracting current version information based on the update instruction;
the extraction module is used for extracting the interest version information of an interest version library of the target command line interface, wherein the interest version library is generated by cloning a historical version library;
the comparison module is used for comparing the current version number in the current version information with the interest version number in the interest version information to obtain a detection result aiming at the current version information;
and the output module is used for outputting prompt information for updating the version of the command line interface according to the detection result so as to update the target command line interface according to the prompt information.
9. A command line interface update detection device, characterized in that the command line interface update device comprises a processor, a memory and a command line interface update program stored in the memory, and when the command line interface update program is executed by the processor, the steps of the command line interface update detection method according to any one of claims 1 to 7 are implemented.
10. A computer storage medium having stored thereon a command line interface update detection program, the command line interface update detection program when executed by a processor implementing the steps of the command line interface update detection method according to any one of claims 1-7.
CN202010329816.4A 2020-04-23 2020-04-23 Method, device, equipment and storage medium for updating command line interface Active CN111522615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010329816.4A CN111522615B (en) 2020-04-23 2020-04-23 Method, device, equipment and storage medium for updating command line interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010329816.4A CN111522615B (en) 2020-04-23 2020-04-23 Method, device, equipment and storage medium for updating command line interface

Publications (2)

Publication Number Publication Date
CN111522615A true CN111522615A (en) 2020-08-11
CN111522615B CN111522615B (en) 2023-08-15

Family

ID=71903165

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010329816.4A Active CN111522615B (en) 2020-04-23 2020-04-23 Method, device, equipment and storage medium for updating command line interface

Country Status (1)

Country Link
CN (1) CN111522615B (en)

Citations (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080177638A1 (en) * 2007-01-12 2008-07-24 Cyphermint, Inc. Real time re-purposing of a mobile application using xml data
EP2654168A1 (en) * 2012-04-19 2013-10-23 austriamicrosystems AG Electrical power transmitting controller device and electrical power receiving controller device for using in a communication system
CN103743406A (en) * 2007-12-28 2014-04-23 纳夫特克有限公司 Difference between management geographical database editions
CN104850311A (en) * 2015-05-26 2015-08-19 中山大学 Generation method and system of graphical descriptions of version updates of mobile applications
US20150279115A1 (en) * 2014-03-31 2015-10-01 Meural Inc. System and method for output display generation based on ambient conditions
US20150370272A1 (en) * 2014-06-23 2015-12-24 Google Inc. Intelligent configuration of a smart environment based on arrival time
US20160335352A1 (en) * 2015-05-14 2016-11-17 Walleye Software, LLC Query dispatch and execution architecture
CN107168693A (en) * 2017-04-17 2017-09-15 北京小米移动软件有限公司 The display methods and device of locking screen interface
US20170295058A1 (en) * 2016-04-12 2017-10-12 Johnson Controls Technology Company Devices and methods for network integration of an hvac device
CN107256149A (en) * 2017-05-26 2017-10-17 北京小米移动软件有限公司 The update method and device of user interface
CN107423069A (en) * 2017-08-02 2017-12-01 深圳市华傲数据技术有限公司 The control method and device that Application Program Interface is shown
CN107608698A (en) * 2017-10-12 2018-01-19 无线生活(杭州)信息科技有限公司 A kind of command-line tool update method and device
CN107797862A (en) * 2017-09-28 2018-03-13 烽火通信科技股份有限公司 One kind realizes the Templated method of qos policy
US20180074719A1 (en) * 2016-09-15 2018-03-15 The United States Of America As Represented By The Secretary Of The Navy Systems and methods for transitioning and updating/tailoring machine instructions from a first system with an older or initial one or set of components to a second system or platform with one or more different components and new or modified operations or functions along with additional potential applications including use in network security and intrusion detection
CN107809452A (en) * 2017-09-05 2018-03-16 杨立军 A kind of data by monitored equipment upload to high in the clouds and carry out regular and analysis system
CN107967153A (en) * 2017-12-13 2018-04-27 维沃移动通信有限公司 The management method and mobile terminal of a kind of application program
CN108055189A (en) * 2017-10-30 2018-05-18 努比亚技术有限公司 A kind of message treatment method, terminal and computer readable storage medium
CN108121803A (en) * 2017-12-22 2018-06-05 维沃移动通信有限公司 A kind of method and server of definite page layout
CN108170476A (en) * 2018-01-26 2018-06-15 郑州云海信息技术有限公司 A kind of method and system for recording server B ios release information
CN108334368A (en) * 2017-09-04 2018-07-27 祖龙(天津)科技有限公司 A kind of update file packing method and strapping tool based on Unity engines
CN108399073A (en) * 2018-01-26 2018-08-14 广东欧珀移动通信有限公司 Information displaying method, device, server and computer-readable medium
CN108881392A (en) * 2018-05-22 2018-11-23 中国联合网络通信集团有限公司 The update method and device of service characteristic data base
CN109302482A (en) * 2018-10-15 2019-02-01 四川长虹电器股份有限公司 Method based on smart television data clone
CN109445835A (en) * 2018-09-03 2019-03-08 平安普惠企业管理有限公司 Method, terminal device and the computer readable storage medium of building project frame
US20190079647A1 (en) * 2014-03-31 2019-03-14 Netgear, Inc. System and method for interfacing with a display device
CN109491698A (en) * 2018-12-29 2019-03-19 武汉思普崚技术有限公司 Method for updating system and device based on hot patch
CN109697079A (en) * 2018-12-13 2019-04-30 杭州迪普科技股份有限公司 The update method and device of bootstrap loader
CN109815150A (en) * 2019-01-29 2019-05-28 腾讯科技(深圳)有限公司 Application testing method, device, electronic equipment and storage medium
CN109918113A (en) * 2019-01-17 2019-06-21 平安城市建设科技(深圳)有限公司 Multiple/hot update method of IOS application hot repair, server and storage medium
CN110012096A (en) * 2019-04-03 2019-07-12 中国工商银行股份有限公司 Mobile client service updates management method, apparatus and system
CN110034969A (en) * 2019-03-12 2019-07-19 平安城市建设科技(深圳)有限公司 Webpage test method, device, equipment and storage medium
CN110045983A (en) * 2019-04-19 2019-07-23 腾讯科技(深圳)有限公司 Version repository management method, device and server
CN110134541A (en) * 2019-05-23 2019-08-16 苏州浪潮智能科技有限公司 Switching method, system, equipment and the storage medium of the configuration information of storage cluster
CN110268379A (en) * 2017-01-06 2019-09-20 甲骨文国际公司 The cloud of file system data hierarchical structure migrates
CN110275872A (en) * 2019-07-18 2019-09-24 中国银行股份有限公司 Version automatic deployment method, device, computer equipment and storage medium
CN110287958A (en) * 2019-06-25 2019-09-27 努比亚技术有限公司 Method, terminal and the computer readable storage medium of adjustment Text region rate
CN110287111A (en) * 2019-06-21 2019-09-27 深圳前海微众银行股份有限公司 A kind of method for generating test case and device of user interface
CN110321254A (en) * 2019-07-09 2019-10-11 西安点告网络科技有限公司 Software version rollback method, device, server and storage medium
CN110830258A (en) * 2018-08-13 2020-02-21 台湾积体电路制造股份有限公司 Device for receiving secure software update information from a server

Patent Citations (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080177638A1 (en) * 2007-01-12 2008-07-24 Cyphermint, Inc. Real time re-purposing of a mobile application using xml data
CN103743406A (en) * 2007-12-28 2014-04-23 纳夫特克有限公司 Difference between management geographical database editions
EP2654168A1 (en) * 2012-04-19 2013-10-23 austriamicrosystems AG Electrical power transmitting controller device and electrical power receiving controller device for using in a communication system
US20150279115A1 (en) * 2014-03-31 2015-10-01 Meural Inc. System and method for output display generation based on ambient conditions
US20190079647A1 (en) * 2014-03-31 2019-03-14 Netgear, Inc. System and method for interfacing with a display device
US20180376313A1 (en) * 2014-06-23 2018-12-27 Google Llc Methods and Apparatus for Using Smart Environment Devices Via Application Program Interfaces
US20190208390A1 (en) * 2014-06-23 2019-07-04 Google Llc Methods And Apparatus For Exploiting Interfaces Smart Environment Device Application Program Interfaces
US20150370272A1 (en) * 2014-06-23 2015-12-24 Google Inc. Intelligent configuration of a smart environment based on arrival time
US20160335352A1 (en) * 2015-05-14 2016-11-17 Walleye Software, LLC Query dispatch and execution architecture
US20170192910A1 (en) * 2015-05-14 2017-07-06 Walleye Software, LLC Data store access permission system with interleaved application of deferred access control filters
US20180052879A1 (en) * 2015-05-14 2018-02-22 Illumon Llc Computer assisted completion of hyperlink command segments
CN104850311A (en) * 2015-05-26 2015-08-19 中山大学 Generation method and system of graphical descriptions of version updates of mobile applications
US20200119982A1 (en) * 2016-04-12 2020-04-16 Johnson Controls Technology Company Devices and methods for network integration of an hvac device
US20170295058A1 (en) * 2016-04-12 2017-10-12 Johnson Controls Technology Company Devices and methods for network integration of an hvac device
US20180074719A1 (en) * 2016-09-15 2018-03-15 The United States Of America As Represented By The Secretary Of The Navy Systems and methods for transitioning and updating/tailoring machine instructions from a first system with an older or initial one or set of components to a second system or platform with one or more different components and new or modified operations or functions along with additional potential applications including use in network security and intrusion detection
CN110268380A (en) * 2017-01-06 2019-09-20 甲骨文国际公司 File system hierarchy structure mirror image across cloud data repository
CN110268379A (en) * 2017-01-06 2019-09-20 甲骨文国际公司 The cloud of file system data hierarchical structure migrates
CN107168693A (en) * 2017-04-17 2017-09-15 北京小米移动软件有限公司 The display methods and device of locking screen interface
CN107256149A (en) * 2017-05-26 2017-10-17 北京小米移动软件有限公司 The update method and device of user interface
CN107423069A (en) * 2017-08-02 2017-12-01 深圳市华傲数据技术有限公司 The control method and device that Application Program Interface is shown
CN108334368A (en) * 2017-09-04 2018-07-27 祖龙(天津)科技有限公司 A kind of update file packing method and strapping tool based on Unity engines
CN107809452A (en) * 2017-09-05 2018-03-16 杨立军 A kind of data by monitored equipment upload to high in the clouds and carry out regular and analysis system
CN107797862A (en) * 2017-09-28 2018-03-13 烽火通信科技股份有限公司 One kind realizes the Templated method of qos policy
CN107608698A (en) * 2017-10-12 2018-01-19 无线生活(杭州)信息科技有限公司 A kind of command-line tool update method and device
CN108055189A (en) * 2017-10-30 2018-05-18 努比亚技术有限公司 A kind of message treatment method, terminal and computer readable storage medium
CN107967153A (en) * 2017-12-13 2018-04-27 维沃移动通信有限公司 The management method and mobile terminal of a kind of application program
CN108121803A (en) * 2017-12-22 2018-06-05 维沃移动通信有限公司 A kind of method and server of definite page layout
CN108399073A (en) * 2018-01-26 2018-08-14 广东欧珀移动通信有限公司 Information displaying method, device, server and computer-readable medium
CN108170476A (en) * 2018-01-26 2018-06-15 郑州云海信息技术有限公司 A kind of method and system for recording server B ios release information
CN108881392A (en) * 2018-05-22 2018-11-23 中国联合网络通信集团有限公司 The update method and device of service characteristic data base
CN110830258A (en) * 2018-08-13 2020-02-21 台湾积体电路制造股份有限公司 Device for receiving secure software update information from a server
CN109445835A (en) * 2018-09-03 2019-03-08 平安普惠企业管理有限公司 Method, terminal device and the computer readable storage medium of building project frame
CN109302482A (en) * 2018-10-15 2019-02-01 四川长虹电器股份有限公司 Method based on smart television data clone
CN109697079A (en) * 2018-12-13 2019-04-30 杭州迪普科技股份有限公司 The update method and device of bootstrap loader
CN109491698A (en) * 2018-12-29 2019-03-19 武汉思普崚技术有限公司 Method for updating system and device based on hot patch
CN109918113A (en) * 2019-01-17 2019-06-21 平安城市建设科技(深圳)有限公司 Multiple/hot update method of IOS application hot repair, server and storage medium
CN109815150A (en) * 2019-01-29 2019-05-28 腾讯科技(深圳)有限公司 Application testing method, device, electronic equipment and storage medium
CN110034969A (en) * 2019-03-12 2019-07-19 平安城市建设科技(深圳)有限公司 Webpage test method, device, equipment and storage medium
CN110012096A (en) * 2019-04-03 2019-07-12 中国工商银行股份有限公司 Mobile client service updates management method, apparatus and system
CN110045983A (en) * 2019-04-19 2019-07-23 腾讯科技(深圳)有限公司 Version repository management method, device and server
CN110134541A (en) * 2019-05-23 2019-08-16 苏州浪潮智能科技有限公司 Switching method, system, equipment and the storage medium of the configuration information of storage cluster
CN110287111A (en) * 2019-06-21 2019-09-27 深圳前海微众银行股份有限公司 A kind of method for generating test case and device of user interface
CN110287958A (en) * 2019-06-25 2019-09-27 努比亚技术有限公司 Method, terminal and the computer readable storage medium of adjustment Text region rate
CN110321254A (en) * 2019-07-09 2019-10-11 西安点告网络科技有限公司 Software version rollback method, device, server and storage medium
CN110275872A (en) * 2019-07-18 2019-09-24 中国银行股份有限公司 Version automatic deployment method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN111522615B (en) 2023-08-15

Similar Documents

Publication Publication Date Title
US10430204B2 (en) System and method for cloud provisioning and application deployment
US10922067B1 (en) System and method for installing, updating and uninstalling applications
US7310801B2 (en) Servicing a component-based software product throughout the software product lifecycle
US5764992A (en) Method and apparatus for automatic software replacement
US11016785B2 (en) Method and system for mirror image package preparation and application operation
US20070143379A1 (en) Metadata driven deployment of applications
US20120174086A1 (en) Extensible Patch Management
CN108664255B (en) Software upgrading method and device
CN117055930A (en) System upgrading deployment method and system
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN111522615A (en) Method, device and equipment for updating command line interface and storage medium
CN113791809B (en) Application exception handling method and device and computer readable storage medium
CN113741966A (en) Method, system, equipment and storage medium for Kickstart file conversion
CN113708971A (en) Openstack cloud platform deployment method and related device
CN115421785B (en) Method, device and medium for transplanting application program
CN109996262B (en) AC starting method and device
CN117130987B (en) Flight control management method for large-scale unmanned aerial vehicle cluster
CN115454827B (en) Compatibility detection method, system, equipment and medium
CN111722866B (en) OpenStack code repairing method, device, equipment and storage medium
CN108733426B (en) Method and device for running application by electronic equipment and electronic equipment
WO2022123843A1 (en) Deployment control system
CN113806382A (en) Implementation method for automatically upgrading database during service upgrading
CN117389653A (en) Method, device, equipment and storage medium for automatically configuring operating system white list
CN116723472A (en) Method and device for reinforcing operation system of short message service equipment
CN115309473A (en) Method, device, equipment and storage medium for managing and controlling logcat

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20210129

Address after: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant after: Shenzhen saiante Technology Service Co.,Ltd.

Address before: 1-34 / F, Qianhai free trade building, 3048 Xinghai Avenue, Mawan, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong 518000

Applicant before: Ping An International Smart City Technology Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant