CN114640585B - Resource updating method and device, electronic equipment and storage medium - Google Patents

Resource updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114640585B
CN114640585B CN202210440956.8A CN202210440956A CN114640585B CN 114640585 B CN114640585 B CN 114640585B CN 202210440956 A CN202210440956 A CN 202210440956A CN 114640585 B CN114640585 B CN 114640585B
Authority
CN
China
Prior art keywords
updated
installation
job
environment
host
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
CN202210440956.8A
Other languages
Chinese (zh)
Other versions
CN114640585A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210440956.8A priority Critical patent/CN114640585B/en
Publication of CN114640585A publication Critical patent/CN114640585A/en
Application granted granted Critical
Publication of CN114640585B publication Critical patent/CN114640585B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a resource updating method, apparatus, electronic device, storage medium, and program product, which can be used in the financial field and other fields, and the resource updating method includes: acquiring the environments to be updated of the resources to be updated in all hosts; generating a corresponding installation job for each environment to be updated, wherein the installation job comprises the content to be updated of the resource to be updated; distributing the installation operation corresponding to the environment to be updated to a host corresponding to the environment to be updated aiming at each environment to be updated; each host executes the received installation operation so that the content to be updated in the installation operation is updated to the environment to be updated, and the updating of the resource to be updated is completed. The resource updating method provided by the disclosure generates the corresponding installation operation for each environment to be updated, distributes the installation operation to the corresponding host for execution, and each host independently executes the installation operation without mutual influence, thereby reducing the complexity of updating and improving the updating efficiency.

Description

Resource updating method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer software, and in particular, to a resource updating method, apparatus, electronic device, storage medium, and program product.
Background
The existing multi-host version deployment scheme is to use a certain host as a local host to deploy an MV; the other hosts act as remote hosts. After submitting the version, the developer uploads the version to the local host computer through ftp, the MV on the local host computer judges which environments need to be updated according to the version update configuration file on the host computer, then the installation job containing the environments is generated for submitting, and the environments are sequentially installed in series. If some environments are deployed on the remote host, uploading relevant versions and information to the remote host for installation through ftp, and writing installation results back into the MV database after the installation is completed. The existing manual installation scheme of multiple hosts is unified on the MV of a local host, and is respectively installed aiming at the local host and a remote host by using different independent-developed installation commands.
Although the prior art scheme can achieve the purposes of local and remote installation and deployment, there are a plurality of problems, such as: the interaction between the local host and the remote host is complex, and if a certain service is abnormal, interaction failure can be caused; part of DSNs need to open sharing rights, so that data security is reduced; the generation of the installation job and the submission of the installation job are required to distinguish between local and remote commands, and misoperation and the like are easy.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a resource updating method, apparatus, electronic device, storage medium, and program product.
According to a first aspect of the present disclosure, there is provided a resource updating method, the method comprising:
acquiring the environments to be updated of the resources to be updated in all hosts;
generating a corresponding installation operation for each environment to be updated, wherein the installation operation comprises the content to be updated of the resource to be updated;
distributing an installation job corresponding to the environment to be updated to a host corresponding to the environment to be updated for each environment to be updated;
each host executes the received installation operation so that the content to be updated in the installation operation is updated to the environment to be updated, and the updating of the resource to be updated is completed.
In an embodiment of the present disclosure, for each environment to be updated, the distributing the installation job corresponding to the environment to be updated to the host corresponding to the environment to be updated specifically includes:
acquiring a configuration file;
analyzing the configuration file to obtain the IP address of the host corresponding to each environment to be updated;
And distributing the installation operation corresponding to the environment to be updated to the host corresponding to the environment to be updated according to the IP address of the host corresponding to the environment to be updated for each environment to be updated.
In an embodiment of the present disclosure, the configuration file further includes a media path corresponding to each of the environments to be updated;
each installation operation comprises a medium path corresponding to the corresponding environment to be updated;
the media path is used to determine the location of the environment to be updated.
In an embodiment of the disclosure, the method further includes:
for each host, generating installation information and return information after the host executes the received installation operation, and uploading the installation information, the return information and the names of the corresponding environments to be updated to a database;
acquiring the version number of the resource to be updated, and acquiring the installation information and the return information from the database according to the version number and the name of the resource to be updated;
judging the execution result of the installation operation according to the installation information and the return information;
each installation operation comprises M operation steps, wherein M is more than or equal to 2;
The installation information includes an execution result of the installation job, and the return information includes a name of a job step of the execution failure in the installation job.
In an embodiment of the disclosure, the method further includes:
and for each host, when the execution result of the host executing the received installation operation is failure, cutting out the operation steps successfully executed in the installation operation, taking the operation steps successfully executed as new installation operation, and executing the new installation operation by the host until all the operation steps in the installation operation are successfully executed.
In an embodiment of the disclosure, each host includes a job login subsystem, and the method further includes:
each host executes the received installation job using the job login subsystem described above.
A second aspect of the present disclosure provides a resource updating apparatus, the apparatus comprising:
the acquisition module is used for acquiring the environments to be updated of the resources to be updated in all the hosts;
the generation module is used for generating a corresponding installation operation for each environment to be updated, wherein the installation operation comprises the content to be updated of the resource to be updated;
the distribution module is used for distributing the installation operation corresponding to the environment to be updated to the host corresponding to the environment to be updated aiming at each environment to be updated;
And the execution module is used for each host machine executing the received installation operation so as to update the content to be updated in the installation operation to the environment to be updated and finish the update of the resource to be updated.
A third aspect of the present disclosure provides an electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform a method in accordance with performing the resource update.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described resource updating method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above-described resource updating method.
The resource updating method provided by the disclosure comprises the following steps: obtaining the to-be-updated environments of the to-be-updated resources in all hosts, generating corresponding installation jobs for each to-be-updated environment, wherein the installation jobs comprise to-be-updated contents of the to-be-updated resources, distributing the installation jobs corresponding to the to-be-updated environments to the hosts corresponding to the to-be-updated environments for each to-be-updated environment, and executing the received installation jobs by each host to enable the to-be-updated contents in the installation jobs to be updated to the to-be-updated environments, so that the updating of the to-be-updated resources is completed. The resource updating method provided by the disclosure generates the corresponding installation operation for each environment to be updated, distributes the installation operation to the corresponding host for execution, and each host independently executes the installation operation without mutual influence, thereby reducing the complexity of updating and improving the updating efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 schematically illustrates an application scenario diagram of a resource update method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flowchart of a resource update method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow diagram of a method for distributing installation jobs to hosts provided by an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flowchart of another resource update method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart of another resource update method according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of a resource updating device according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a block diagram of a distribution module of a resource updating device according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a block diagram of still another resource updating device provided by an embodiment of the present disclosure; and
fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement a resource updating method according to an embodiment of the disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a formulation similar to at least one of "A, B or C, etc." is used, in general such a formulation should be interpreted in accordance with the ordinary understanding of one skilled in the art (e.g. "a system with at least one of A, B or C" would include but not be limited to systems with a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). It should also be appreciated by those skilled in the art that virtually any disjunctive word and/or phrase presenting two or more alternative items, whether in the description, claims, or drawings, should be understood to contemplate the possibilities of including one of the items, either of the items, or both. For example, the phrase "a or B" should be understood to include the possibility of "a" or "B", or "a and B".
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart. The techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable medium having instructions stored thereon, the computer program product being usable by or in connection with an instruction execution system. In the context of this disclosure, a computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a computer-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the computer readable medium include: magnetic storage devices such as magnetic tape or hard disk (HDD); optical storage devices such as compact discs (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or a wired/wireless communication link.
The present disclosure provides a resource updating method, including: obtaining the to-be-updated environments of the to-be-updated resources in all hosts, generating corresponding installation jobs for each to-be-updated environment, wherein the installation jobs comprise to-be-updated contents of the to-be-updated resources, distributing the installation jobs corresponding to the to-be-updated environments to the hosts corresponding to the to-be-updated environments for each to-be-updated environment, and executing the received installation jobs by each host to enable the to-be-updated contents in the installation jobs to be updated to the to-be-updated environments, so that the updating of the to-be-updated resources is completed. The resource updating method provided by the disclosure generates the corresponding installation operation for each environment to be updated, distributes the installation operation to the corresponding host for execution, and each host independently executes the installation operation without mutual influence, thereby reducing the complexity of updating and improving the updating efficiency.
The present disclosure provides a resource updating method, apparatus, electronic device, storage medium, and program product. The following is an exemplary description with reference to the accompanying drawings. It should be noted that the sequence numbers of the respective operations in the following methods are merely representative of the operations for the purpose of description, and should not be construed as representing the order of execution of the respective operations. The method need not be performed in the exact order shown unless explicitly stated.
It should be noted that the resource updating method, apparatus, electronic device, storage medium and program product provided by the present disclosure may be used in the financial field, and may also be used in any field other than the financial field, and the application field of the resource updating method, apparatus, electronic device, storage medium and program product provided by the present disclosure is not limited.
In addition, in the technical scheme of the disclosure, the related processes of data collection, storage, use, processing, transmission, provision, disclosure, application and the like all conform to the regulations of related laws and regulations, necessary security measures are taken, and the public order is not violated.
In the technical scheme of the disclosure, the authorization or consent of the data attribution is obtained before the data is obtained or acquired.
Fig. 1 schematically illustrates an application scenario diagram of a resource update method according to an embodiment of the present disclosure. As shown in fig. 1, an application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server/server cluster 105. Network 104 is the medium used to provide communication links between terminal devices 101, 102, 103 and server/server cluster 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server/server cluster 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various client applications may be installed on the terminal devices 101, 102, 103, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, and the like (just examples).
The terminal devices 101, 102, 103 may interact with the server/server cluster 105 through various client applications to send various requests to the server/server cluster 105 or to receive results returned by the server/server cluster 105.
The terminal devices 101, 102, 103 may be a variety of electronic devices including, but not limited to, smartphones, tablets, laptop portable computers, desktop computers, and the like.
The server/server cluster 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, a resource update method provided by an embodiment of the present disclosure may be generally performed by the server/server cluster 105. Accordingly, a resource updating device provided by embodiments of the present disclosure may be generally disposed in server/server cluster 105. A resource update method provided by embodiments of the present disclosure may also be performed by a server or server cluster other than server/server cluster 105 and capable of communicating with terminal devices 101, 102, 103 and/or server/server cluster 105. Accordingly, a resource updating apparatus provided by an embodiment of the present disclosure may also be provided in a server or a server cluster different from the server/server cluster 105 and capable of communicating with the terminal devices 101, 102, 103 and/or the server/server cluster 105.
It should be understood that the number of terminal devices, networks and server/server clusters in fig. 1 is merely illustrative. There may be any number of terminal devices, networks and server/server clusters, as is practical.
A resource updating method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 5 based on the scenario described in fig. 1. The technical solutions of the present disclosure can be more clearly understood by those skilled in the art. It should be understood that the following description is only exemplary to assist those skilled in the art in understanding the aspects of the present disclosure and is not intended to limit the scope of the present disclosure.
Fig. 2 schematically illustrates a flowchart of a resource updating method according to an embodiment of the disclosure.
As shown in fig. 2, in an embodiment of the present disclosure, the method includes operations S210 to S240.
In operation S210, the environment to be updated of the resource to be updated in all hosts is acquired.
In this embodiment, after it is determined that the resource to be updated needs to be updated, the version number of the resource to be updated and the configuration file corresponding to the resource to be updated are obtained, where the configuration file includes all the environments to be updated corresponding to the version number of the resource to be updated, so that all the environments to be updated of the resource to be updated can be determined from the configuration file. In this embodiment, the configuration file may further include a media path corresponding to each environment to be updated, where the media path is used to determine a location of the environment to be updated.
In operation S220, a corresponding installation job is generated for each of the environments to be updated, where the installation job includes contents to be updated of the resources to be updated.
In this embodiment, each installation job may include a media path corresponding to the corresponding environment to be updated, so as to determine the location of the environment to be updated.
In operation S230, for each environment to be updated, the installation job corresponding to the environment to be updated is distributed to the host corresponding to the environment to be updated.
Each environment to be updated has an installation job corresponding to the environment to be updated, and the installation job needs to be distributed to the host where the corresponding environment to be updated is located when the update of the resource to be updated is completed, and particularly, the distribution method may be a plurality of methods.
In operation S231, a configuration file is acquired.
In operation S232, the configuration file is parsed to obtain the IP address of the host corresponding to each of the environments to be updated.
In operation S233, for each environment to be updated, the installation job corresponding to the environment to be updated is distributed to the host corresponding to the environment to be updated according to the IP address of the host corresponding to the environment to be updated.
In this embodiment, the configuration file further includes an IP address of the host where each environment to be updated is located, so after generating the installation job corresponding to each environment to be updated, only the configuration file corresponding to the resource to be updated needs to be parsed, and the IP address of each host is obtained from the configuration file, so that the installation job can be distributed to the host where the corresponding environment to be updated is located.
It should be understood that the method of distributing the installation job to the host in the corresponding environment to be updated by the main IP address in this embodiment is merely exemplary, so as to help those skilled in the art understand the technical solution of the present disclosure, and is not intended to limit the protection scope of the present disclosure.
In operation S240, each host executes the received installation job, so that the content to be updated in the installation job is updated to the environment to be updated, thereby completing the update of the resource to be updated.
When a resource needs to be updated, first, the environment to be updated of the resource to be updated in all hosts needs to be determined, where the environment to be updated refers to an environment in which the resource to be updated is installed in a host, and each environment to be updated has a corresponding installation job. After generating a corresponding installation job for each environment to be updated, the installation job needs to be distributed to a host corresponding to the environment to be updated, namely, each installation job is distributed to the host corresponding to the environment to be updated, so that the host executes the received installation job, and the updated content in the installation job is updated to the host corresponding to the environment to be updated, thereby completing the updating of the resource to be updated. In this embodiment, a job login subsystem may also be set for each host, and each host executes the received installation job using the job login subsystem. The resource updating method provided by the disclosure generates the corresponding installation operation for each environment to be updated, distributes the installation operation to the corresponding host for execution, does not need to distinguish whether the host is local or remote, and simultaneously, each host independently executes the installation operation without mutual influence, thereby reducing the complexity of updating and improving the updating efficiency.
It should be understood that the illustration of the content and the like included in the installation work in the present embodiment is merely exemplary to help those skilled in the art understand the technical solutions of the present disclosure, and is not intended to limit the protection scope of the present disclosure.
Fig. 4 schematically illustrates a flowchart of another resource updating method according to an embodiment of the disclosure.
As shown in FIG. 4, in this embodiment, each installation job includes M job steps, where M.gtoreq.2, the installation information includes the execution result of the installation job, and the return information includes the name of the job step that failed to be executed in the installation job. The method includes operations S410 to S470. The operations S410 to S440 are implemented in the same manner as the operations S210 to S240, respectively, and repeated parts will not be described again.
In operation S450, for each host, the host executes the received installation job, generates installation information and return information, and uploads the installation information, the return information, and the names of the corresponding environments to be updated to the database.
In operation S460, the version number of the resource to be updated is obtained, and the installation information and the return information are obtained from the database according to the version number and the name of the resource to be updated.
In operation S470, an execution result of the installation job is determined based on the installation information and the return information.
In this embodiment, after each host machine completes execution of the received installation job, no matter whether the execution of the installation job is successful or not, installation information and return information corresponding to the execution are generated, and the installation information and the return information are synchronized to a database, where the installation information includes the execution result of the installation job, the return information includes the name of the job step of the execution failure in the installation job, and after the synchronization to the database, the user can quickly know the execution result of the installation job corresponding to each environment to be updated from the database according to the version number of the resource to be updated and the name of the resource to be updated, and if the execution failure of the installation job exists, the user is convenient to modify the installation job of the execution failure in time. In addition, besides actively uploading the installation information and returning the information to the database after each host computer completes the installation operation each time, the execution results of each host computer can be periodically collected, for example, the execution results of each host computer are collected every 1min, so that the host computers with abnormal execution conditions can be found out in time. The execution condition of the installation operation of each host is monitored, so that the execution condition of each host can be known in time, and the updating efficiency of the resources to be updated is improved.
It should be understood that the illustration of the installation information, the return information, etc. in the present embodiment is merely exemplary to help those skilled in the art understand the technical solutions of the present disclosure, and is not intended to limit the protection scope of the present disclosure.
Fig. 5 schematically illustrates a flowchart of another resource updating method according to an embodiment of the disclosure.
As shown in FIG. 5, in the present embodiment, each installation job includes M job steps, where M.gtoreq.2, the method includes operations S510-S540. Operations S510 to S530 are implemented in the same manner as operations S450 to S470, respectively, and repeated parts will not be described in detail.
In operation S540, when the execution result of the host machine execution of the received installation job is failure, the host machine executes the new installation job by cutting out the job steps of the installation job that were executed successfully, and taking the job steps of the execution failure as the new installation job until all the job steps of the installation job are executed successfully.
In this embodiment, each installation job includes at least two job steps, where the function of the last job step is to obtain the execution result and write the execution result into the database, while the other job steps are used to update the update content to the environment to be updated, the installation job is not necessarily executed once, and if the installation job fails to be executed, the execution is only performed from the job step that fails to be executed, and the executed job step is not required to be executed again. Acquiring the name of the job step which fails to be executed in the installation job, for example, acquiring the name of the job step which fails to be executed from the return information, cutting out the installation job again, cutting out the job step which is executed successfully, only retaining the job step which fails to be executed and the job step which is executed after the job step which fails to be executed, and continuing to execute the installation job after the cutting out again until all the job steps in the installation job are executed successfully. In addition, in order to save the time period for successful execution of the installation job, a threshold may be set, for example, if the number of times of execution failure of a certain job step is greater than or equal to the threshold, the user is reminded that there may be a problem for the job step, and after the user modifies the job step or determines to continue to execute the job step, the job step is continued to be executed. When the execution of the installation job fails, only the execution failure and the non-execution job steps in the last execution are executed, so that the time for repeatedly executing the successfully executed job steps can be saved, and the efficiency of updating the resource to be updated is improved.
It should be understood that the illustration of the threshold value or the like for setting the number of execution failures of the job steps in the present embodiment is merely exemplary to help those skilled in the art understand the technical solution of the present disclosure, and is not intended to limit the protection scope of the present disclosure.
Based on the resource updating method, the disclosure also provides a resource updating device. The device will be described in detail with reference to fig. 6 to 8.
Fig. 6 schematically illustrates a block diagram of a resource updating device according to an embodiment of the present disclosure.
As shown in fig. 6, in an embodiment of the present disclosure, the apparatus 600 includes: an acquisition module 610, a generation module 620, a distribution module 630, and an execution module 640.
The obtaining module 610 is configured to obtain an environment to be updated of the resource to be updated in all hosts. In an embodiment, the obtaining module 610 may be configured to perform the operation S210 described above, which is not described herein.
The generating module 620 is configured to generate a corresponding installation job for each of the environments to be updated, where the installation job includes contents to be updated of the resources to be updated. In an embodiment, the generating module 620 may be configured to perform the operation S220 described above, which is not described herein.
The distributing module 630 is configured to distribute, for each environment to be updated, an installation job corresponding to the environment to be updated to a host corresponding to the environment to be updated. In an embodiment, the distributing module 630 may be configured to perform the operation S230 described above, which is not described herein.
And an execution module 640, configured to execute the received installation job by each host, so that the content to be updated in the installation job is updated to the environment to be updated, thereby completing the update of the resource to be updated. In an embodiment, the execution module 640 may be configured to execute the operation S240 described above, which is not described herein.
Fig. 7 schematically illustrates a block diagram of a distribution module of a resource updating device according to an embodiment of the present disclosure.
As shown in fig. 7, in the present embodiment, the distribution module 630 includes: a first acquisition module 631, a parsing module 632, and a first distribution module 633.
The first obtaining module 631 is configured to obtain a configuration file. In an embodiment, the first obtaining module 631 may be configured to perform the operation S231 described above, which is not described herein.
The parsing module 632 is configured to parse the configuration file to obtain an IP address of the host corresponding to each of the environments to be updated. In an embodiment, the parsing module 632 may be used to perform the operation S232 described above, which is not described herein.
The first distributing module 633 is configured to distribute, for each environment to be updated, an installation job corresponding to the environment to be updated to a host corresponding to the environment to be updated according to an IP address of the host corresponding to the environment to be updated. In an embodiment, the first distributing module 633 may be configured to perform the operation S233 described above, which is not described herein.
Fig. 8 schematically illustrates a block diagram of still another resource updating device according to an embodiment of the present disclosure.
As shown in fig. 8, in the present embodiment, the apparatus 800 includes: the second acquisition module 810, the second generation module 820, the second distribution module 830, the second execution module 840, the return module 850, the third acquisition module 860, and the determination module 870.
The second acquiring module 810, the second generating module 820, the second distributing module 830, and the second executing module 840 are implemented in the same manner as the acquiring module 610, the generating module 620, the distributing module 630, and the executing module 640, respectively, and repeated parts will not be described again.
And a return module 850, configured to generate, for each host, installation information and return information after the host executes the received installation job, and upload the installation information, the return information, and the names of the corresponding environments to be updated to the database. In an embodiment, the return module 850 may be configured to perform the operation S450 described above, which is not described herein.
And a third obtaining module 860, configured to obtain the version number of the resource to be updated, and obtain the installation information and the return information from the database according to the version number and the name of the resource to be updated. In an embodiment, the third obtaining module 860 may be configured to perform the operation S460 described above, which is not described herein.
A judging module 870 for judging the execution result of the installation job according to the installation information and the return information. In an embodiment, the determining module 870 may be configured to perform the operation S470 described above, which is not described herein.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the acquisition module 610, the generation module 620, the distribution module 630, and the execution module 640 may be combined and implemented in one module, or any of the modules may be split into multiple modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the acquisition module 610, the generation module 620, the distribution module 630, and the execution module 640 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable way of integrating or packaging circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware, according to embodiments of the present disclosure. Alternatively, at least one of the acquisition module 610, the generation module 620, the distribution module 630, and the execution module 640 may be at least partially implemented as a computer program module, which when executed, may perform the corresponding functions.
Fig. 9 schematically illustrates a block diagram of an electronic device adapted to implement a resource updating method according to an embodiment of the disclosure.
As shown in fig. 9, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage portion 908 into a Random Access Memory (RAM) 903. The processor 901 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 901 may also include on-board memory for caching purposes. Processor 901 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM903, various programs and data necessary for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM903 are connected to each other by a bus 904. The processor 901 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 902 and/or the RAM 903. Note that the program may be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the disclosure, the electronic device 900 may also include an input/output (I/O) interface 905, the input/output (I/O) interface 905 also being connected to the bus 904. The electronic device 900 may also include one or more of the following components connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 908 including a network interface card such as a LAN card, a modem, or the like. The communication section 908 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
The present disclosure also provides a computer-readable storage medium having stored thereon a computer program comprising a resource updating method as described above. The computer-readable storage medium may be embodied in the apparatus/device described in the above embodiments; or may exist alone without being assembled into the apparatus/device. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 902 and/or RAM 903 and/or one or more memories other than ROM 902 and RAM 903 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement a resource updating method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or installed from a removable medium 911 via the communication portion 908. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 908, and/or installed from the removable media 911. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The principles and embodiments of the present disclosure have been described with reference to specific examples, which are intended to be merely illustrative of the methods of the present disclosure and their core ideas; meanwhile, as one of ordinary skill in the art will have variations in the detailed description and the application scope in light of the ideas of the present disclosure, the present disclosure should not be construed as being limited to the above description.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or the claims may be combined in various combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. While the present disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. The scope of the disclosure should, therefore, not be limited to the above-described embodiments, but should be determined not only by the following claims, but also by the equivalents of the following claims.

Claims (7)

1. A method for updating a resource, comprising:
acquiring the environments to be updated of the resources to be updated in all hosts;
generating a corresponding installation job for each environment to be updated, wherein the installation job comprises the content to be updated of the resource to be updated;
distributing an installation job corresponding to each environment to be updated to a host corresponding to the environment to be updated;
each host executes the received installation operation so that the content to be updated in the installation operation is updated to the environment to be updated, and the updating of the resource to be updated is completed;
generating installation information and return information after the host executes the received installation operation aiming at each host, and uploading the installation information, the return information and the names of the corresponding environments to be updated to a database;
acquiring a version number of the resource to be updated, and acquiring the installation information and the return information from the database according to the version number and the name of the resource to be updated;
judging an execution result of the installation operation according to the installation information and the return information;
each installation operation comprises M operation steps, wherein M is more than or equal to 2;
The installation information comprises an execution result of the installation job, and the return information comprises a name of a job step of which the execution fails in the installation job;
and for each host, when the execution result of the host executing the received installation job is failure, cutting out the job steps successfully executed in the installation job, taking the job steps successfully executed as new installation jobs, and executing the new installation jobs by the host until all the job steps in the installation job are successfully executed.
2. The resource updating method according to claim 1, wherein the distributing, for each environment to be updated, the installation job corresponding to the environment to be updated to the host corresponding to the environment to be updated, specifically comprises:
acquiring a configuration file;
analyzing the configuration file to obtain the IP address of the host corresponding to each environment to be updated;
and distributing the installation operation corresponding to the environment to be updated to the host corresponding to the environment to be updated according to the IP address of the host corresponding to the environment to be updated for each environment to be updated.
3. The resource updating method according to claim 2, wherein the configuration file further includes a media path corresponding to each of the environments to be updated;
Each installation job comprises a medium path corresponding to the corresponding environment to be updated;
the media path is used to determine a location of the environment to be updated.
4. The resource updating method of claim 1, wherein each host includes a job logging subsystem, the method further comprising:
each host executes the received installation job using the job login subsystem.
5. A resource updating apparatus, comprising:
the acquisition module is used for acquiring the environments to be updated of the resources to be updated in all the hosts;
the generation module is used for generating a corresponding installation job for each environment to be updated, wherein the installation job comprises the content to be updated of the resource to be updated;
the distribution module is used for distributing the installation operation corresponding to each environment to be updated to the host corresponding to the environment to be updated;
the execution module is used for each host to execute the received installation operation so that the content to be updated in the installation operation is updated to the environment to be updated, and the update of the resource to be updated is completed; generating installation information and return information after the host executes the received installation operation aiming at each host, and uploading the installation information, the return information and the names of the corresponding environments to be updated to a database; acquiring a version number of the resource to be updated, and acquiring the installation information and the return information from the database according to the version number and the name of the resource to be updated; judging an execution result of the installation operation according to the installation information and the return information; each installation operation comprises M operation steps, wherein M is more than or equal to 2; the installation information comprises an execution result of the installation job, and the return information comprises a name of a job step of which the execution fails in the installation job; and for each host, when the execution result of the host executing the received installation job is failure, cutting out the job steps successfully executed in the installation job, taking the job steps successfully executed as new installation jobs, and executing the new installation jobs by the host until all the job steps in the installation job are successfully executed.
6. An electronic device, the electronic device comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the resource updating method of any of claims 1-4.
7. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to perform the resource updating method according to any of claims 1 to 4.
CN202210440956.8A 2022-04-25 2022-04-25 Resource updating method and device, electronic equipment and storage medium Active CN114640585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210440956.8A CN114640585B (en) 2022-04-25 2022-04-25 Resource updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210440956.8A CN114640585B (en) 2022-04-25 2022-04-25 Resource updating method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114640585A CN114640585A (en) 2022-06-17
CN114640585B true CN114640585B (en) 2024-01-30

Family

ID=81951115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210440956.8A Active CN114640585B (en) 2022-04-25 2022-04-25 Resource updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114640585B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275723A (en) * 2019-06-25 2019-09-24 北京字节跳动网络技术有限公司 Obtain method, apparatus, electronic equipment and the readable medium of resource
CN112925559A (en) * 2021-04-09 2021-06-08 网易(杭州)网络有限公司 Resource packaging method, device, medium and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110275723A (en) * 2019-06-25 2019-09-24 北京字节跳动网络技术有限公司 Obtain method, apparatus, electronic equipment and the readable medium of resource
CN112925559A (en) * 2021-04-09 2021-06-08 网易(杭州)网络有限公司 Resource packaging method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN114640585A (en) 2022-06-17

Similar Documents

Publication Publication Date Title
US10289468B1 (en) Identification of virtual computing instance issues
US11561889B2 (en) Orchestration for automated performance testing
US20190199785A1 (en) Determining server level availability and resource allocations based on workload level availability requirements
CN111427701A (en) Workflow engine system and business processing method
US20150142786A1 (en) Modification of cloud application service levels based upon document consumption
US20130124971A1 (en) Real time web script refresh using asynchronous polling without full web page reload
CN111800511B (en) Synchronous login state processing method, system, equipment and readable storage medium
US11611629B2 (en) Inline frame monitoring
CN113362173A (en) Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN116521317A (en) Mirror image management method and device, electronic equipment and computer readable storage medium
CN116302561A (en) State control method, device, equipment and storage medium for application instance
CN114640585B (en) Resource updating method and device, electronic equipment and storage medium
CN113722007B (en) Configuration method, device and system of VPN branch equipment
CN113392311A (en) Field searching method, field searching device, electronic equipment and storage medium
US20130290830A1 (en) System and method for managing a viewstate of a web application
CN116401319B (en) Data synchronization method and device, electronic equipment and computer readable storage medium
CN114938341B (en) Environment detection method and device, electronic equipment and storage medium
CN113535568B (en) Verification method, device, equipment and medium for application deployment version
CN113515326B (en) Data conversion method, device, electronic equipment and storage medium
CN117176576A (en) Network resource changing method, device, equipment and storage medium
CN114780221A (en) Host job scheduling method and device, electronic equipment and storage medium
CN114528592A (en) Service processing method, device, equipment, medium and program product
CN117555932A (en) Multi-cluster retrieval method, device, equipment, medium and program product
CN116257375A (en) Kafka data automatic stream processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant