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

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

Info

Publication number
CN111522615B
CN111522615B CN202010329816.4A CN202010329816A CN111522615B CN 111522615 B CN111522615 B CN 111522615B CN 202010329816 A CN202010329816 A CN 202010329816A CN 111522615 B CN111522615 B CN 111522615B
Authority
CN
China
Prior art keywords
version
line interface
command line
interest
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010329816.4A
Other languages
Chinese (zh)
Other versions
CN111522615A (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
Shenzhen Saiante Technology Service 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 Shenzhen Saiante Technology Service Co Ltd filed Critical Shenzhen Saiante Technology Service 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

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 updating instruction of a target command line interface and extracting current version information based on the updating instruction; extracting 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 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 the command line interface version update 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 update prompt information is obtained, so that automatic update of the command line interface is realized in development and operation, and the stability of the command line interface is improved.

Description

Method, device, equipment and storage medium for updating command line interface
Technical Field
The present invention relates to the field of user interface version updating technologies in artificial intelligence, and in particular, to a method, an apparatus, a device, 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 the graphic user Interface is popularized, it usually does not support a mouse, a user inputs an instruction through a keyboard, and a computer receives the instruction and then executes the instruction.
Currently, the update of the command line interface is typically performed manually by the user. However, the method of manual update is difficult to acquire the latest version information in time, which results in untimely update. And is not suitable for non-open items, and it is difficult to ensure the stability of the command line interface.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for updating a command line interface, which aim to realize automatic detection of updating of the command line interface and improve 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 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 the command line interface version update 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:
executing version cloning on the interest version library, and setting depth parameters;
acquiring the history submission of the corresponding number according to the depth parameter as the interest version library, and storing the interest version library into a machine directory file;
and extracting the interest 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, and obtaining 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 obtaining a target version number consistent with the current version number from the interest version number;
acquiring a 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 unsupported version, the detection result is the unsupported version.
Preferably, the step of outputting the prompt information of the command line interface version update according to the detection result includes:
acquiring parameters of the detection result based on a version information strategy of the command line interface, wherein the parameters comprise version exit and version warning;
if the parameter is version exit, forcedly exiting, and outputting prompt information of forcedly updating;
and if the parameter is the 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;
after the installation is completed, the relevant information updated at this time is prompted.
Preferably, the step of obtaining the updated version of the command line interface and installing the updated version locally includes:
adding a version library sub-module through a version library command, wherein the version library command comprises a path and a catalog of the version library sub-module, and the updated version comprises an application program package or a template type code;
if the updated version is an application program package, the application program package is installed to a global variable, and then a related dependent package is installed; or alternatively
If the updated version is a template type code, the dependent package is installed directly.
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 update instruction, and automatically sending the update 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, where the update apparatus for a command line interface includes:
the acquisition module is used for acquiring an update instruction of the 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 the interest version library of the target command line interface, wherein the interest version library is generated through cloning the 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 of the update of the command line interface version 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, the present embodiment further provides a command line interface update detection apparatus, where the update apparatus for a command line interface includes a processor, a memory, and an update program for a command line interface stored in the memory, where the update program for a command line interface implements the steps of the command line interface update detection method described above when executed by the processor.
In addition, in order 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, where the command line interface update detection method includes the steps of implementing the command line interface update detection method described above when the update program is executed by a processor.
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 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 the command line interface version update 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 update prompt information is obtained, so that automatic update of the command line interface is realized in development and operation and maintenance, and the stability of the command line interface is improved.
Drawings
FIG. 1 is a schematic hardware architecture of a command line interface update device according to various embodiments of the present invention;
FIG. 2 is a flow chart of a first embodiment of a method for updating a command line interface according to the present invention;
FIG. 3 is a flow chart of a second embodiment of a method for updating a command line interface according to the present invention;
FIG. 4 is a functional block diagram of a first embodiment of an update apparatus for a command line interface according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The updating device of the command line interface mainly related to the embodiment of the invention refers to network connection equipment 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 hardware configuration diagram of an update apparatus for a command line interface according to various embodiments of the present invention. In an embodiment of the present invention, the update device of the command line interface may include a processor 1001 (e.g. a central processing unit Central Processing Unit, a CPU), a communication bus 1002, an input port 1003, an output port 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communications between these components; the input port 1003 is used for data input; the output port 1004 is used for data output, and the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may be an optional storage device independent of the processor 1001. Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 is not limiting of the invention and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
With continued reference to FIG. 1, the memory 1005 of FIG. 1, which is a 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 with a server and performing data communication with the server; and 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 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 the command line interface version update 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:
executing version cloning on the interest version library, and setting depth parameters;
acquiring a plurality of historical submissions as the interest version library according to the depth parameters, and storing the interest version library into a machine directory file;
and reading the interest 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 obtaining a target version number consistent with the current version number from the interest version number;
acquiring a 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 unsupported version, the detection result is the unsupported version.
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 parameters of the detection result based on a version information strategy of the command line interface, wherein the parameters comprise version exit and version warning;
if the parameter is version exit, forcedly exiting, and outputting prompt information of forcedly updating;
and if the parameter is the 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;
after the installation is completed, the relevant information updated at this time is prompted.
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 sub-module through a version library command, wherein the version library command comprises a path and a catalog of the version library sub-module, and the updated version comprises an application program package or a template type code;
if the updated version is an application program package, the application program package is installed to a global variable, and then a related dependent package is installed; or alternatively
And if the updated version of the command line interface is a 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 the 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, various embodiments of the update method of the command line interface are provided.
A Command Line Interface (CLI), also known as CUI (character user Interface ). A command line interface is the most widely used user interface before the graphical user interface is widely used, typically not supporting mouse operations, and a computer receives and executes instructions entered by a user via a keyboard. The software of the command line interface typically 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 over the graphical user interface. On the premise of memorizing commands, the operation speed of using the command line interface is faster than that of using the graphical user interface. Therefore, the optional 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 method for updating a command line interface according to the present invention.
In this embodiment, the method for updating the command line interface is applied to the device for updating the command line interface, and the method includes:
step S101, acquiring an update instruction of a target command line interface, and extracting current version information based on the update instruction;
in this embodiment, the update command may be triggered temporarily by a user or by a 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 current version information from the local cache. Typically, the version information includes version number, historical commit time, updated content, 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 the 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 version information, the background process does not block the execution of a main command, and after a request is successful, the version information and the check time are cached into a machine directory file smt-pkg-updater. 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 points on the morning every week.
Step S102, 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 history version library;
generally, when a developer updates a command line interface, the updated command line interface version is submitted to a server for downloading, installation and use by a user. In this embodiment, the versions of the command line interface submitted by several histories are marked as an interest 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:
executing version cloning on the interest version library by the interest version library, and setting depth parameters;
in executing version clone (Git clone), a depth parameter is set. Typically, the Git clone is used to clone a repository to local, and this embodiment clones version libraries to local via the Git clone. In this embodiment, the depth parameter is set to < depth > +1, where depth is an integer greater than or equal to 1, and a history submission corresponding to the depth parameter is obtained according to the depth parameter and used as the interesting version library, so that the volume of the detected code can be reduced, and the detection efficiency is improved.
Shallow cloning refers to creating a new object, the attribute of which is identical to the original object, and for non-basic type attributes, the memory address of the object pointed to by the original attribute is still pointed to. That is, shallow cloning copies a reference in the heap memory, assigns a new variable, essentially two points to the same address in the heap memory, and the contents are the same, and one changes the other (the same object is changed fundamentally).
The present example provides a shallow cloning mode clone version library. Typically, the version store is cloned by shallow cloning, each committed SHA1 hash value is the same as the source version store, including the committed root node is also the same time, but Git is implemented in a special way so that the shallow cloned root node commit appears to have no parent commit. Just as the SHA1 hash value of the commit object of the shallow clone is consistent with the source version store, the shallow clone version store may execute a gatfetch or gatpull to obtain a new commit from the source version store. This example creates shallow clones by the Git clone command: for example: get clone-depth 2 file// path/to/reops/hello world. Git slot 1.
Typically, the Git fetch is used to pull the latest content of the remote host locally, so the version library of interest can also be obtained by a version library commit (Git fetch).
Further, executing version cloning on the interesting version library, and after the step of setting the depth parameter, further comprising:
acquiring the history submission of the corresponding number according to the depth parameter as the interest version library, and storing the interest version library into a machine directory file;
and acquiring a plurality of historical submissions as the interest version libraries according to the depth parameters, wherein the number of the interest version libraries corresponds to the depth parameters. And after the interest version library is acquired, writing relevant parameters of version information of the interest version library into a machine directory file. In this embodiment, the machine directory file may be smt-pkg-updater. Json, and the machine directory file includes package. Json version information.
Further, after the step of saving the interest version library to the machine directory file, the method further comprises:
and extracting the interest version information of the target command line interface according to the machine directory file.
When the interest version information needs to be acquired, the machine directory file is directly extracted, and the interest version information can be acquired.
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, the current version number is read from the current version information, and the 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 a 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 unsupported version, the detection result is the unsupported version. And reading the interest version information of the interest version library from the machine directory file smt-pkg-updater. Json. And then comparing the interest version number in the interest version information with the current version number in the current version information. Specifically, the 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 the interest version numbers, further judging the version state of the 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 interest version numbers consistent with the current version number. Specifically, a version state of the target interesting version is obtained, wherein the version state comprises the latest version, temporary supported version, unsupported version and the like. And determining a corresponding detection result according to the version state: if the current command line interface version is the latest version, the current command line interface version of the detection result is the latest version; if the current command line interface version is the temporary support version, the current command line interface version of the detection result is an available version; if the version is not supported, the detection result is that the current command line interface version is not supported.
Step S104, outputting prompt information of the command line interface version update 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, the version exit indicates that the condition is met, the forced exit cannot be used, the warning version indicates that the parameter is met and needs to be actively prompted to update and still can be used normally, and the version exit indicates that the parameter is not met and can be continuously used and does not prompt any information.
Specifically, the step of outputting the corresponding update prompt information according to the comparison result includes:
parameters of the comparison result are obtained based on a command line interface version information strategy, wherein the parameters comprise version exit extversion and version warning version;
the parameter corresponds to the detection result, and if the detection result is the latest version, the parameter can be empty; if the detection result is a temporary support version, the corresponding parameter may be version warning version; if the detection result is that the version is not supported, the corresponding parameter may be version exit exitVersion.
If the parameter is exitVersion, the user forcedly exits and outputs prompt information of forcedly updating;
and if the parameter is the warning version, outputting prompt information for prompting upgrading.
In general, for npm modules, there are three general cases for updating version a.b.c:
patch (Patch): c bit, small version update, typically bug fix;
minor (Minor): b, updating the middle version, and generally adding new functions and bug fixes;
major (Major): a bit, large version updates, are typically incompatible upgrades.
For major form, the command line tool will exit directly, forcing the user to upgrade before use, which can ensure that all users can update in time after pushing a large version, rather than continuing to use the old version, which can cause version fragmentation. For patch or minor formats, then an update may be suggested, with the user selecting whether to update.
According to the embodiment, through 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 through 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 the update of 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 update prompt information is obtained, so that automatic update of the command line interface is realized in development and 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 prompt 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 sub-module through a version library command, wherein the version library command comprises a path and a catalog of the version library sub-module, and the command line interface updating version comprises an application program package or a template type code;
further, the step of adding the version library sub-module through the version library command further comprises: if the updated version is an application program package, the application program package is installed to a global variable, and then a related dependent package is installed; or alternatively
And if the updated version of the command line interface is a template type code, directly installing the dependent package.
Further, a version library sub-template is added through a version control command, wherein the version library command comprises a path of the version library sub-template and a directory.
Version control Git is an open-source distributed version control system for agilely and efficiently handling any small or large items. Git Submodule is a tool for using a common class library by multiple modules, wherein the class library module is used as a restore (repository), and the sub-module is used as a single Git module to be stored in a parent module. The submodule comprises independent commit, push and pull commands; the parent module comprises one or more sub-modules, the parent module can specify the sub-module header, 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 recloned.
Specifically, a Git command is used to add a submodulee, wherein the Git command needs to make a path of the submodulee and a directory path stored by the submodulee; after the module is cloned, no content exists under a default Submodule directory, 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: after the installation is completed, the relevant information updated at this time is prompted.
After the installation is completed, prompting the updated relevant information and continuing to execute other operations. The related information may include version information, newly added functions, rights settings, etc.
According to the embodiment, through the scheme, the updated version of the target command line interface is obtained, and the updated version is installed locally; after the installation is completed, the relevant information updated at this time is prompted. Therefore, automatic detection of the update of the command line interface is realized in the 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 schematic functional block diagram of a first embodiment of an update apparatus for a command line interface according to the present invention.
In this embodiment, the update device of the command line interface is a virtual device, and is stored in the memory 1005 of the update device of the command line interface shown in fig. 1, so as to implement all functions of the update program of the command line interface: acquiring 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 information with the interesting version information to obtain a detection result aiming at the version information; and outputting prompt information of the command line interface version update according to the detection result so as to update the target command line interface according to the prompt information.
Specifically, the updating device of the command line interface comprises:
the acquisition module is used for acquiring an update instruction of the 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 the 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 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 of the update of the command line interface version 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 depth parameters;
the storage unit is used for acquiring a plurality of historical submissions as the interest version library according to the depth parameters and storing the interest version library into a machine directory file;
and the reading unit is used for reading the interest 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 forcedly exiting if the parameter is version exiting and outputting prompt information of forcedly updating;
and the second output unit is used for outputting prompt information for prompting upgrading if the parameter is the 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 at the time after the installation is completed.
Further, the acquisition unit includes:
the system comprises a pulling subunit, a version library sub-module and a storage subunit, wherein the pulling subunit is used for adding the version library sub-module through a version library command, the version library command comprises a path and a catalog of the version library sub-module, and the updated version comprises an application program package or a template type code;
a first installation subunit, configured to install the application program package to a global variable if the updated version is an application program package, and then install a related dependency package; or alternatively
And the second installation subunit is used for directly installing the dependence package if the updated version is the template type code.
Further, the acquisition module further includes:
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, the embodiment of the present invention further provides a computer storage medium, where a command line interface update detection program is stored in the computer storage medium, and when the update program of the command line interface is executed by the processor, the steps of the command line interface update detection method described above are implemented, which is 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 acquiring an updating instruction of a target command line interface and extracting current version information 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 through 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 the update of 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 update prompt information is obtained, so that automatic update of the command line interface is realized in development and 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 one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of embodiments, it will be clear to a person skilled in the art that the above embodiment method may be implemented by means of software plus a necessary general hardware platform, but may of course also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or modifications in the structures or processes described in the specification and drawings, or direct or indirect application in other relevant fields are included in the scope of the invention.

Claims (9)

1. The updating method of the command line interface is characterized by being applied to the command line interface and comprising the following steps of:
acquiring 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;
outputting prompt information of the command line interface version update according to the detection result so as to update the target command line interface according to the prompt information;
the extracting the interest version information of the interest version library of the target command line interface comprises the following steps:
executing version cloning on the interest version library, and setting depth parameters;
acquiring the history submission of the corresponding number according to the depth parameter as the interest version library, and storing the interest version library into a machine directory file;
and extracting the interest version information of the target command line interface according to the machine directory file.
2. The method of claim 1, wherein comparing the current version number in the current version information with the version number of interest in the version information of interest, obtaining a 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 a 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 unsupported version, the detection result is the unsupported version.
3. The method of claim 1, wherein the step of outputting the prompt for the command line interface version update based on the detection result comprises:
acquiring parameters of the detection result based on a version information strategy of the command line interface, wherein the parameters comprise version exit and version warning;
if the parameter is version exit, forcedly exiting, and outputting prompt information of forcedly updating;
and if the parameter is the version warning, outputting prompt information for prompting upgrading.
4. The method according to claim 1, wherein the step of outputting the corresponding update-prompting message according to the detection result further comprises:
acquiring an updated version of the target command line interface, and installing the updated version to the local;
after the installation is completed, the relevant information updated at this time is prompted.
5. The method of claim 4, wherein the step of obtaining the updated version of the command line interface and installing the updated version locally comprises:
adding a version library sub-module through a version library command, wherein the version library command comprises a path and a catalog of the version library sub-module, and the updated version comprises an application program package or a template type code;
if the updated version is an application program package, the application program package is installed to a global variable, and then a related dependent package is installed; or alternatively
If the updated version is a template type code, the dependent package is installed directly.
6. The method of claim 1, wherein the step of obtaining the update command of the target command line interface and extracting the current version information based on the update command 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.
7. An updating device for a command line interface, wherein the updating device for the command line interface comprises:
the acquisition module is used for acquiring an update instruction of the 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 the interest version library of the target command line interface, wherein the interest version library is generated through cloning the 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;
the output module is used for outputting prompt information of the command line interface version update according to the detection result so as to update the target command line interface according to the prompt information;
the extraction module is also used for executing version cloning on the interest version library and setting depth parameters;
acquiring the history submission of the corresponding number according to the depth parameter as the interest version library, and storing the interest version library into a machine directory file;
and extracting the interest version information of the target command line interface according to the machine directory file.
8. A command line interface update detection apparatus, characterized in that the update apparatus of a command line interface comprises a processor, a memory and an update program of a command line interface stored in the memory, which when executed by the processor, implements the steps of the command line interface update detection method according to any one of claims 1-6.
9. A computer storage medium, wherein a command line interface update detection program is stored on the computer storage medium, and the command line interface update detection program, when executed by a processor, implements the steps of the command line interface update detection method according to any one of claims 1 to 6.
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 CN111522615A (en) 2020-08-11
CN111522615B true 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 (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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
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
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
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
CN110830258A (en) * 2018-08-13 2020-02-21 台湾积体电路制造股份有限公司 Device for receiving secure software update information from a server

Family Cites Families (7)

* 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
CN114741043A (en) * 2014-03-31 2022-07-12 莫拉尔公司 System and method for generating an output display based on ambient conditions
US10891022B2 (en) * 2014-03-31 2021-01-12 Netgear, Inc. System and method for interfacing with a display device
US20150370272A1 (en) * 2014-06-23 2015-12-24 Google Inc. Intelligent configuration of a smart environment based on arrival time
US10353893B2 (en) * 2015-05-14 2019-07-16 Deephaven Data Labs Llc Data partitioning and ordering
US20170295058A1 (en) * 2016-04-12 2017-10-12 Johnson Controls Technology Company Devices and methods for network integration of an hvac device
US10416891B2 (en) * 2016-09-15 2019-09-17 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

Patent Citations (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN104850311A (en) * 2015-05-26 2015-08-19 中山大学 Generation method and system of graphical descriptions of version updates of mobile applications
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
CN108170476A (en) * 2018-01-26 2018-06-15 郑州云海信息技术有限公司 A kind of method and system for recording server B ios release information
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
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
CN111522615A (en) 2020-08-11

Similar Documents

Publication Publication Date Title
US11106446B2 (en) Preinstalled application management method for mobile terminal and mobile terminal
US7310801B2 (en) Servicing a component-based software product throughout the software product lifecycle
US7703090B2 (en) Patch un-installation
US6434744B1 (en) System and method for patching an installed application program
US20200057654A1 (en) Method and system for mirror image package preparation and application operation
US9063819B2 (en) Extensible patch management
EP2805233B1 (en) Installation engine and package format for parallelizable, reliable installations
US8769521B2 (en) Calendar aware adaptive patching of a computer program
CN108459868A (en) A kind of software start-up method, device, terminal and storage medium
CN114546588A (en) Task deployment method and device, storage medium and electronic device
CN111522615B (en) Method, device, equipment and storage medium for updating command line interface
CN108664255B (en) Software upgrading method and device
US11431795B2 (en) Method, apparatus and storage medium for resource configuration
CN111159616A (en) Multi-language-based switch management method and device and storage medium
CN114721784B (en) Application running method and device, electronic equipment and readable medium
CN113900723B (en) Common platform updating method, network device and computer readable storage medium
CN113741966A (en) Method, system, equipment and storage medium for Kickstart file conversion
CN109996262B (en) AC starting method and device
CN116204199B (en) Command line-based project management method, system, equipment and storage medium
CN111722866B (en) OpenStack code repairing method, device, equipment and storage medium
US20230305817A1 (en) Dynamic importation of external dependency information to support autocompletion in an interactive development environment
CN115421785B (en) Method, device and medium for transplanting application program
CN116991355B (en) Method, system and device for supporting LED driving chip by modifying and iterating script
CN114647526A (en) Module checking method, device, equipment and storage medium of distributed system
CN108733426B (en) Method and device for running application by electronic equipment and electronic equipment

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