A computer software system maintenance method and device in a network environment
By separating the creation and deployment of maintenance resources from computer software systems, and utilizing directory and file name rules to achieve automated deployment and result querying, the problem of existing tools being complex and difficult to use is solved, the maintenance process is simplified, and the professional technical requirements are reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2026-06-16
AI Technical Summary
Existing computer software system maintenance tools are complex, difficult to learn and use, and manual maintenance is inefficient and tedious. Highly specialized maintenance work is difficult for non-computer professionals to complete.
The highly specialized tasks of creating and interpreting maintenance resources are separated from the deployment process. By generating specific directory and filename rules in the host file system, automated resource deployment and result querying are achieved, and file transfer and processing are carried out using the network connection between the first and second hosts.
It reduces the computer expertise required of operators, simplifies tool use, and facilitates result checking, making it suitable for maintenance in organizations with limited computer technical capabilities.
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer operation and maintenance technology, and in particular to a semi-automatic maintenance method and apparatus for computer software systems in the presence of network connectivity. Background Technology
[0002] Many enterprises and institutions use a large number of computers connected by networks in their production and management environments. The software systems of these computers have routine maintenance requirements: installing various patch programs (security patches, performance patches, function patches, etc.) or modifying configuration files according to actual needs.
[0003] Existing technologies include tools for routine maintenance of computer software systems. Some are highly automated, such as Red Hat Satellite and Spacewalker; others are semi-automated, such as Ansible and SaltStack. However, these existing automated tools are used only to a limited extent because they suffer from several problems, such as being overly complex and requiring maintenance (e.g., using databases like MySQL or PostgreSQL); having a steep learning curve and being difficult to use. In reality, a small number of organizations with strong computer technology capabilities have adopted these automated or semi-automated maintenance tools. Most other organizations either completely outsource routine maintenance to professional maintenance service providers (usually the software system's manufacturer or a professional third-party maintenance service provider), or perform maintenance themselves with the assistance of such providers. The maintenance methods mostly involve manually executing maintenance procedures after directly logging into the host or logging in via the network. However, manually performing the same maintenance operations on computers with identical hardware and software configurations is extremely inefficient and tedious. Summary of the Invention
[0004] To overcome the problems of existing tools being complex and difficult to learn and use, this invention proposes a method and apparatus for maintaining computer software systems in a network environment.
[0005] The problem that this method and system aim to solve is:
[0006] The difficulty of deploying, running, and maintaining program packages is reduced by separating the highly specialized work of creating maintenance resources and interpreting the results of maintenance resource execution from the deployment work. This allows non-computer professionals who only know how to copy files to complete the deployment of maintenance program packages and determine whether the maintenance operation is successful.
[0007] The technical solution adopted by this invention to solve its technical problem is:
[0008] According to one aspect of the present invention, a method for maintaining a computer software system in a network environment is provided, applied to at least one first host and at least one second host connected to each other via a network, comprising: generating a first directory in the file system of the first host, wherein the directory path of the first directory is generated according to the rule that the first directory path should contain identification information of the current maintenance cycle or identification information of the host address of the second host being maintained, or a combination of the identification information of the current maintenance cycle and the identification information of the host address of the second host being maintained; generating a second directory in the file system of the first host, wherein the directory path of the second directory is generated according to the rule that the second directory path should contain identification information of the current maintenance cycle or identification information of the host address of the second host being maintained, or a combination of the identification information of the current maintenance cycle and the identification information of the host address of the second host being maintained; and sending the maintenance resource file to be deployed in the first directory of the first host via the network during the corresponding maintenance cycle according to the file name of the maintenance resource file to be deployed in the first directory and the maintenance cycle identifier and the identifier of the host address of the second host contained in the directory path of the first directory. The resource file to be deployed is pre-made according to maintenance needs and then copied to the first directory. The naming convention for the resource file to be deployed is that it should include the identifier information of the current maintenance cycle, or the identifier information that can locate the host address of the second host being maintained, or a combination of the identifier information of the current maintenance cycle and the identifier information that can locate the host address of the second host being maintained. The combination of the filename of the resource file to be deployed and the directory path of the first directory should completely include the maintenance cycle identifier information and the identifier information that locates the host address of the second host being maintained. The second host receives the resource file to be deployed from the first host, processes the resource file according to default rules, and saves the result of the processing performed on the resource file by the second host as a result file. The naming convention for the result file is that, in addition to including the identifier information contained in the filename of the resource file to be deployed, it should also include a classification information identifier generated based on the return result. The second host sends the result file to the first host via the network. The first host receives the result file sent by the second host.On the first host, based on the maintenance cycle identifier information contained in the filename of the received result file and the identifier information of the host address locating the second host being maintained, the result file is stored in the second directory corresponding to the information contained in the directory path. If the filename of the received result file lacks the identifier information required to locate the directory path of the second directory, it can be replaced with the identifier information of the current maintenance cycle and the identifier information corresponding to the host address of the second host from which the result file originated.
[0009] Furthermore, the first directory and the second directory can be the same directory.
[0010] Furthermore, the path to the first directory and the second directory is ".. / [current maintenance cycle]", and the filename of the maintenance resource file to be deployed contains the hostname of the second host or the host address of the second host;
[0011] Alternatively, the directory names of the first and second directories are the hostname of the second host or directly the host address of the second host, and the filename of the corresponding maintenance resource file to be deployed includes the current date; or, the relative path of the first and second directories is ".. / [current maintenance cycle] / [hostname of the second host or host address of the second host]" or ".. / [hostname of the second host or host address of the second host] / [current maintenance cycle]", and there are no specific requirements for the filename of the corresponding maintenance resource file to be deployed; the filename of the maintenance resource file to be deployed may also contain other useful information, such as a brief description of the current maintenance operation.
[0012] Furthermore, the classification identifier information generated based on the returned result can be divided into two categories: success and failure. The system return result should include the information output to stderr and stdout by the second host when processing the resource file to be deployed and maintained according to the default rules, as well as the return value when exiting execution. If the return value is 0 and the stderr output information is Null, it can be determined that the result of executing the resource file to be deployed and maintained is successful; otherwise, it is unsuccessful. The classification identifier representing success can use words such as "ok" and "success," and the classification identifier representing failure can use words such as "fail" and "error." If there are other agreed-upon output results for the execution processing of the resource file to be deployed and maintained, the return result should also include those other agreed-upon output results.
[0013] According to another aspect of the present invention, an apparatus for maintaining a computer software system in a network environment is provided, applied to at least one first host and at least one second host connected to each other via a network, comprising a first module and a second module. The first module is installed on the first host and its function is to generate a first directory in the file system of the first host. The generation rule for the directory path of the first directory is that the first directory path should contain identification information of the current maintenance cycle, or identification information that can locate the host address of the second host being maintained, or a combination of the identification information of the current maintenance cycle and the identification information that can locate the host address of the second host being maintained. The first module further functions to generate a second directory in the file system of the first host. The generation rule for the directory path of the second directory is that the second directory path should contain identification information of the current maintenance cycle, or identification information that can locate the host address of the second host being maintained, or a combination of the identification information of the current maintenance cycle and the identification information that can locate the host address of the second host being maintained. The first module further functions to determine the maintenance cycle identifier and the identifier for locating the host address of the second host based on the filename of the maintenance resource file to be deployed in the first directory of the first host and the maintenance cycle identifier and the identifier for locating the host address of the second host contained in the directory path of the first directory. The resource file to be deployed and maintained is sent to the second host via the network during the corresponding maintenance cycle. The resource file to be deployed is pre-made according to the needs of the maintenance work and then copied to the first directory. The naming rule of the resource file to be deployed is that it should contain the identification information of the current maintenance cycle, or the identification information of the host address of the second host being maintained, or a combination of the identification information of the current maintenance cycle and the identification information of the host address of the second host being maintained. The combination of the file name of the resource file to be deployed and the directory path of the first directory should completely contain the maintenance cycle identification information and the identification information of the host address of the second host being maintained. The function of the first module also includes receiving the result file sent by the second host on the first host, and storing the result file in the second directory corresponding to the information contained in the directory path according to the maintenance cycle identification information and the identification information of the host address of the second host being maintained contained in the file name of the received result file. If the file name of the received result file lacks the identification information required to locate the directory path of the second directory, the identification information of the current maintenance cycle and the identification information corresponding to the host address of the second host from which the result file comes can be used instead.The second module, installed on the second host, has the following functions: receiving the resource file to be deployed and maintained from the first host on the second host; processing the resource file on the second host according to default rules; and saving the result of the processing performed on the resource file by the second host as a result file. The naming convention for the result file is that, in addition to including the identification information contained in the filename of the resource file to be deployed and maintained, it should also include a classification information identifier generated based on the return result. The second module also includes sending the result file from the second host to the first host via the network.
[0014] Furthermore, the first directory and the second directory generated by the first module can be the same directory.
[0015] Furthermore, the path of the first directory and the second directory generated by the first module is ".. / [current maintenance cycle]", and the filename of the corresponding maintenance resource file to be deployed contains the hostname or host address of the second host; or, the directory names of the first directory and the second directory are the hostname or directly the host address of the second host, and the filename of the corresponding maintenance resource file to be deployed contains the date of the day; or, the relative path of the first directory and the second directory is ".. / [current maintenance cycle] / [hostname or host address of the second host]" or ".. / [hostname or host address of the second host] / [current maintenance cycle]", and the filename of the corresponding maintenance resource file to be deployed has no specific requirements; the filename of the maintenance resource file to be deployed may also contain other useful information, such as a brief description of the current maintenance operation.
[0016] Furthermore, the classification identifier information generated by the second module based on the returned result can be divided into two categories: success and failure. The system return result should include the information output to stderr and stdout by the second host when processing the resource file to be deployed and maintained according to the default rules, as well as the return value when exiting execution. If the return value is 0 and the stderr output information is Null, it can be determined that the result of executing the resource file to be deployed and maintained is successful; otherwise, it is unsuccessful. The classification identifier representing success can use words such as "ok" and "success," and the classification identifier representing failure can use words such as "fail" and "error." If there are other agreed-upon output results for the execution processing of the resource file to be deployed and maintained, the return result should also include the other agreed-upon output results.
[0017] Furthermore, the method of using the device for maintaining computer software systems in a network environment is as follows:
[0018] First, the first module generates the first directory and the second directory in the file system of the first host; then, it saves the resource file to be deployed and maintained to the first directory; next, the first module sends the resource file to be deployed and maintained to the second host in the corresponding maintenance cycle, based on the maintenance cycle determined by the filename of the resource file to be deployed and the identification information contained in the directory path of the first directory, and the host address of the second host; then, the second module receives the resource file to be deployed and maintained on the second host, processes it according to default rules, and saves the result of the processing of the resource file by the second host as a result file; then, the second module sends the result file from the second host to the first host; then, the first module stores the result file in the second directory on the first host; finally, as needed, it checks the filename of the result file of the maintenance job in the second directory to determine whether the maintenance of the resource was successful.
[0019] The computer software system maintenance method and apparatus in a network environment provided by this invention separates the highly specialized work of creating maintenance resources and interpreting the execution results of maintenance resources from the work of deploying maintenance resources. This solves the problems caused by the complexity and difficulty in learning and using existing maintenance tools, and provides a new method for deploying and executing maintenance resource files. It also facilitates the query of execution results and reduces the requirements for the computer professional knowledge and skills of operators.
[0020] The beneficial effects of this invention are:
[0021] 1. It is easy to use. To use the tool itself, you only need to learn how to modify the file name and copy the file to the corresponding directory.
[0022] 2. To facilitate checking the results, you can simply view the filename in the corresponding folder.
[0023] 3. For organizations with relatively weak computer expertise, which constitute the majority, the highly specialized tasks of creating and interpreting maintenance resource execution results can be separated from the maintenance resource deployment work. These specialized tasks can be delegated to other organizations or assigned to a few highly skilled employees, while the more demanding maintenance resource deployment work only requires employees with basic computer application skills. Detailed Implementation
[0024] The embodiments mentioned in this article can be applied to computer networks of various typical units or organizations. These networks can be local area networks (LANs) or wide area networks (WANs), and can be private networks or VPNs over public networks. Such networks contain a considerable number of hosts. A small number of hosts used to maintain the majority of the remaining hosts correspond to the first host in the claims and invention, while the remaining large number of hosts performing various business functions correspond to the second host in the claims and invention. These hosts can be desktops, servers, laptops, tablets, etc. The maintenance resource files mentioned in the claims and invention can be different files depending on the host being maintained and the maintenance tasks to be performed. For example, the maintenance resource file for cleaning up temporary files on a Windows operating system host can be a batch file, and the default rule in the claims and invention should be to launch a Command Shell or PowerShell to execute the batch file. As another example, the maintenance resource file for upgrading the Linux kernel version on an Ubuntu operating system host can be multiple .deb files, and the default rule in the claims and invention should be to execute "sudo dpkg --install". *.deb”; For example, when maintenance work requires executing an executable file with parameters, the executable file and the script that executes the executable file with parameters can be packaged into a self-extracting executable file that executes the script itself as a maintenance resource file. The corresponding default rule should be that the operating system of the second host creates a process and loads and executes it; The maintenance cycle mentioned in the claims and the invention content can be daily, weekly or monthly, and the identification information corresponding to the current maintenance cycle on December 24, 2022 can be similar to "2022.01.24" or "2022.01.24-30" or "2022.01".
[0025] The following four examples can be applied to the computer networks of the aforementioned units or organizations. The examples assume the date is January 24, 2022, and that a maintenance operation is performed on a second host (host2) running a Windows system, from a first host (host1) to clean up temporary files. The pre-prepared resource file to be deployed for maintenance is deltempfile.bat.
[0026]
Example 1
[0027] This embodiment 1 provides a method for maintaining a computer software system in a network environment, including:
[0028] Step 1: Create the first directory in the file system of host1, with the path ~ / workspace / 20220124 / ;
[0029] Step 2: Create a second directory in the file system of host1, with the path ~ / workspace / 20220124 / result / ;
[0030] Step 3: Rename the pre-made deltempfile.bat to host2deltempfile.bat and save it to ~ / workspace / 20220124 / host2deltempfile.bat;
[0031] Step 4: Locate the host2deltempfile.bat file in the first directory. Determine "host2" from the filename as the known second host to be maintained. Send host2deltempfile.bat to the host2 host.
[0032] Step 5: Host2 receives host2deltempfile.bat, starts a command shell, and executes host2deltempfile.bat. During execution, it obtains the output of stdout and stderr. After execution, it obtains the return value and saves the three obtained items as a result file. The file name of the result file is determined by whether the return value is 0 and whether stderr is null. The result file is then sent to host1.
[0033] Step 6: When host1 receives host2deltempfile.ok or host2deltempfile.err, it saves it to / workspace / 20220124 / result / host2deltempfile.ok or / workspace / 20220124 / result / host2deltempfile.err.
[0034] As shown in Example 1, since the creation of the maintenance resource file deltempfile.bat is separated from the deployment process, the operator performing the deployment only needs to know the execution date and the hostname of the host to be maintained, and be able to modify and copy the file to complete the deployment. Furthermore, by checking whether a result file is returned in the second directory and its file extension, the operator can determine whether the maintenance was successfully executed. This reduces the difficulty of the work and facilitates the verification of the maintenance's success.
[0035]
Example 2
[0036] In the above embodiment 1, the second directory and the first directory can both be ~ / workspace / 20220124 / .
[0037] In this embodiment 2, if there are multiple maintenance resource files to be executed in this cycle, at the end of this maintenance cycle, check the first directory and the second directory combined into one directory. If the maintenance resource files and result files appear in pairs, it can be known that all maintenance jobs have been executed and the results have been returned, making it convenient to check whether all jobs have been executed.
[0038]
Example 3
[0039] In the above embodiment 1, it is assumed that there are two second hosts to be maintained, host2 and host3, and so on.
[0040] In this embodiment 3, the first directory can be two directories: / workspace / 20220124 / host2 / and / workspace / 20220124 / host3 / . The corresponding resource files to be maintained do not need to be renamed.
[0041]
Example 4
[0042] This embodiment 4 provides a computer software system maintenance device in a network environment, including: a first module and a second module.
[0043] The first module, deployed on host1, performs the following actions: It creates a first directory in host1's file system with the path ~ / workspace / 20220124 / ; it also creates a second directory in host1's file system with the path ~ / workspace / 20220124 / result / ; after host2deltempfile.bat is copied to the first directory, it finds the host2deltempfile.bat file in the first directory, identifies "host2" as the known second host to be maintained from the filename, and sends host2deltempfile.bat to host2; after receiving the result file from the second host, it saves the result file to the second directory.
[0044] The second module, deployed on host2, performs the following actions: upon receiving host2deltempfile.bat, it starts a command shell and executes host2deltempfile.bat. During execution, it retrieves the output of stdout and stderr, retrieves the return value after execution, saves the three retrieved items as a result file, and determines the result file name as host2deltempfile.ok or host2deltempfile.err based on whether the return value is 0 and whether stderr is null. Then, it sends the result file to host1.
Claims
1. A method for maintaining a computer software system in a network environment, applied to at least one first host and at least one second host connected to each other via a network, wherein the first host is used to maintain the second host; the maintenance method requires the use of maintenance resource files to be deployed obtained from an external source; the maintenance method is characterized in that... In the file system of the first host, a first directory and a second directory are generated. The generation rule for the directory paths of the first directory and the second directory is that the paths of the first directory and the second directory should contain the identification information of the current maintenance cycle or the identification information of the host address that can locate the second host being maintained, or a combination of the identification information of the current maintenance cycle and the identification information of the host address that can locate the second host being maintained. Based on the filename of the maintenance resource file to be deployed in the first directory of the first host and the maintenance cycle identifier and the identifier of the host address of the second host contained in the directory path of the first directory, the maintenance resource file to be deployed is sent to the second host via the network in the corresponding maintenance cycle. The maintenance resource file to be deployed is pre-made by an external party according to the needs of maintenance work and then copied to the first directory. The combination of the filename of the maintenance resource file to be deployed and the first directory path completely contains the maintenance cycle identifier information and the identifier information of the host address of the second host being maintained. The second host receives the resource file to be deployed and maintained sent from the first host. The second host processes the resource file according to default rules and saves the result of the second host's processing of the resource file as a result file. The naming convention for the result file is that, in addition to including the identifier information contained in the filename of the resource file, it should also include a classification information identifier generated based on the return result. The classification information identifier is divided into success and failure. The return result should include the information output by the second host to stderr and stdout after processing the resource file according to the default rules, as well as the return value when exiting execution. If the return value is 0 and the stderr output is null, the execution of the resource file is considered successful; otherwise, it is considered unsuccessful. The classification information identifier representing success uses "ok," "success," or other synonyms indicating successful task execution, while the classification information identifier representing failure uses "fail," "error," or other synonyms indicating task failure. The result file is sent from the second host to the first host via the network; the first host receives the result file sent by the second host; On the first host, based on the maintenance cycle identifier information contained in the filename of the received result file, or the identifier information of the host address of the second host being maintained, or the identifier information of the maintenance cycle identifier information and the identifier information of the host address of the second host being maintained, the result file is stored in the second directory corresponding to the information contained in the directory path. If the filename of the received result file lacks the identifier information required to locate the directory path of the second directory, the identifier information of the current maintenance cycle and the identifier information corresponding to the host address of the second host from which the result file originates are used as substitutes.
2. The method according to claim 1, characterized in that, The first directory and the second directory are the same directory; or the first directory and the second directory are different directories.
3. The method according to claim 1, characterized in that, The path to the first directory and the second directory is .. / current maintenance cycle, and the filename of the maintenance resource file to be deployed contains the hostname of the second host or the host address of the second host. Alternatively, the directory names of the first directory and the second directory are the hostname of the second host or directly the host address of the second host, and the filename of the resource file to be deployed and maintained contains the current maintenance cycle. Alternatively, the relative path between the first directory and the second directory is .. / current maintenance cycle / hostname of the second host or host address of the second host, and there are no specific requirements for the filename of the maintenance resource file to be deployed; Alternatively, the relative path between the first and second directories is .. / hostname of the second host or host address of the second host / current maintenance cycle, and there are no specific requirements for the filename of the maintenance resource file to be deployed.
4. The method according to claim 1, characterized in that, The naming convention for the result file is to include a classification information identifier generated based on the returned result. One implementation is that the classification information identifier is used as the file extension of the result file.
5. An apparatus for maintaining a computer software system in a network environment, applied to at least one first host and at least one second host connected to each other via a network, wherein the first host is used to maintain the second host, characterized in that, It includes a first module and a second module. The first module is installed on the first host and its functions include generating a first directory and a second directory in the file system of the first host. The generation rule for the directory paths of the first directory and the second directory is that the first directory and the second directory path should contain the identifier information of the current maintenance cycle, or the identifier information of the host address that can locate the second host being maintained, or a combination of the identifier information of the current maintenance cycle and the identifier information of the host address that can locate the second host being maintained. The first module also includes sending the maintenance resource file to be deployed to the second host via the network during the corresponding maintenance cycle, based on the file name of the maintenance resource file to be deployed in the first directory in the first host and the maintenance cycle identifier and the identifier of the host address that can locate the second host contained in the directory path of the first directory. The maintenance resource file to be deployed is pre-made externally according to the needs of maintenance work and then copied to the first directory. The combination of the filename of the resource file to be deployed and maintained and the first directory path completely includes maintenance cycle identification information and identification information for locating the host address of the second host being maintained; the function of the first module also includes, when the first host receives a result file sent by the second host, storing the result file in the second directory corresponding to the information contained in the directory path according to the identification information in the filename of the received result file, or the identification information for locating the host address of the second host being maintained, or the combination of the identification information of the maintenance cycle and the identification information for locating the host address of the second host being maintained; if the filename of the received result file lacks the identification information required to locate the directory path of the second directory, the identification information of the current maintenance cycle and the identification information corresponding to the host address of the second host from which the result file originates are used as substitutes; The second module, installed on the second host, receives the resource file to be deployed and maintained from the first host on the second host, processes the resource file according to default rules on the second host, and saves the return result of the second host's processing of the resource file as a result file. The naming convention for the result file is that, in addition to including the identifier information contained in the filename of the resource file, it should also include a classification information identifier generated based on the return result. The classification information identifier is divided into success and failure. The return result should include the information output to stderr and stdout by the second host after processing the resource file according to the default rules, as well as the return value when exiting execution. If the return value is 0 and the stderr output is null, the execution of the resource file is considered successful; otherwise, it is considered unsuccessful. The classification information identifier representing success uses "ok," "success," or other synonyms indicating successful task execution; the classification information identifier representing failure uses "fail," "error," or other synonyms indicating failed task execution. The second module also includes the function of sending the result file from the second host to the first host via the network.
6. The apparatus according to claim 5, characterized in that, The first directory and the second directory generated by the first module are one directory, or the first directory and the second directory generated by the first module are different directories.
7. The apparatus according to claim 5, characterized in that, The path of the first directory and the second directory generated by the first module is .. / current maintenance cycle, and the file name of the maintenance resource file to be deployed contains the hostname of the second host or the host address of the second host. Alternatively, the directory names of the first directory and the second directory are the hostname of the second host or directly the host address of the second host, and the filename of the resource file to be deployed and maintained contains the current maintenance cycle. Alternatively, the relative path between the first directory and the second directory is .. / current maintenance cycle / hostname of the second host or host address of the second host, and there are no specific requirements for the filename of the maintenance resource file to be deployed; Alternatively, the relative path between the first and second directories is .. / hostname of the second host or host address of the second host / current maintenance cycle, and there are no specific requirements for the filename of the maintenance resource file to be deployed.
8. The apparatus according to claim 5, characterized in that, The naming convention for the result file is to include a classification information identifier generated based on the returned result. One implementation is that the classification information identifier is used as the file extension of the result file.
Citation Information
Patent Citations
Database maintenance method and device, electronic equipment and storage medium
CN111897794A
Application service deployment method and device
CN112286543A