CN116204197A - Plug-in deployment method and device, storage medium and electronic equipment - Google Patents

Plug-in deployment method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN116204197A
CN116204197A CN202111473869.4A CN202111473869A CN116204197A CN 116204197 A CN116204197 A CN 116204197A CN 202111473869 A CN202111473869 A CN 202111473869A CN 116204197 A CN116204197 A CN 116204197A
Authority
CN
China
Prior art keywords
target
plug
node
nodes
loading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111473869.4A
Other languages
Chinese (zh)
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.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202111473869.4A priority Critical patent/CN116204197A/en
Publication of CN116204197A publication Critical patent/CN116204197A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a plug-in deployment method, a device, a storage medium and an electronic device, wherein the method comprises the following steps: sending plug-in downloading instructions to a plurality of target nodes under the condition that the target plug-ins to be deployed exist; sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-in, so as to instruct each target node to load the target plug-in according to the plug-in loading instruction; and sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully, so as to control the plurality of target nodes to take the target plug-in as the current application plug-in of the target node. In this way, the process of plug-in downloading, plug-in loading and plug-in application of the plurality of target nodes is uniformly controlled, so that the version consistency of the target plug-ins finally deployed by the plurality of target nodes can be ensured.

Description

Plug-in deployment method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a plug-in deployment method, a device, a storage medium and electronic equipment.
Background
With the continuous development of machine learning technology, machine learning algorithms are widely applied to various business scenes such as take-out distribution, flash purchase and the like, and machine learning processes are divided into two stages of offline training and online prediction. The machine learning model can be obtained through offline training, and an algorithm measurement code corresponding to the machine learning model can be manufactured as a plug-in, for example, an algorithm plug-in stored in a JAR (Java Archive, java Archive file, a software package file format); before on-line prediction, the plug-in obtained after off-line training needs to be deployed into the memory of each node of the server for executing plug-in calculation, and then relevant features or parameters are input into the plug-in for machine learning calculation and prediction. In an actual application scene, because the data volume to be processed is huge, in order to increase the processing speed, the distributed environment can be used for carrying out calculation and prediction of machine learning, the distributed environment comprises a plurality of nodes, and the processing speed can be increased by running the same machine learning task through plug-ins deployed in the plurality of nodes. However, in the related art, the online deployment process of the plugin is independently performed by each node, and synchronous execution cannot be guaranteed, that is, the versions of the plugin on each node cannot be guaranteed to be completely consistent, and if the versions of plugins of a plurality of nodes for processing the same machine learning task are inconsistent, the result of online prediction is affected, so that the prediction accuracy is reduced.
Disclosure of Invention
An object of the present disclosure is to provide a card deployment method, apparatus, storage medium, and electronic device, to partially solve the above-mentioned problems existing in the related art.
To achieve the above object, a first aspect of the present disclosure provides
To achieve the above object, a first aspect of the present disclosure provides a plug-in deployment method, applied to a control node, the method including:
sending plug-in downloading instructions to a plurality of target nodes under the condition that the target plug-ins to be deployed exist; the plug-in downloading instruction is used for indicating the target node to download the target plug-in from a first server;
sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-ins, so as to instruct each target node to load the target plug-ins according to the plug-in loading instruction;
and under the condition that the target nodes are determined to finish loading the target plugin successfully, sending plugin application instructions to the target nodes so as to control the target nodes to take the target plugin as a current application plugin of the target node.
Optionally, the method further comprises:
and if a processing success message for the target processing item sent by the target node is received, determining that the target processing item is successfully completed by the target node, wherein the target processing item comprises a downloading target plug-in or a loading target plug-in.
Optionally, the method further comprises:
if a processing failure message sent by the target node for the target processing item is received, or if a processing success message sent by the target node for the target processing item is not received within a first preset time, determining that the target node does not successfully complete the target processing item;
under the condition that any one of the target nodes does not successfully complete the target processing item, accumulating the first failure times of the target node for the target processing item, and controlling the target node to execute the target processing item again until a processing success message sent by the target node for the target processing item is received, or the accumulated first failure times are larger than or equal to the first preset failure times.
Optionally, after the accumulated first failure number is greater than or equal to the first preset failure number, the method further includes:
And sending plug-in deployment stopping instructions to the plurality of target nodes so as to control the plurality of target nodes to stop plug-in deployment.
In a second aspect, the present disclosure provides another plug-in deployment method applied to a target node, the method comprising:
in response to receiving a plug-in downloading instruction sent by a control node, downloading a target plug-in to be deployed from a first server;
loading the target plug-in which is successfully downloaded in response to receiving a plug-in loading instruction sent by the control node; the plug-in loading instruction is an instruction sent to the target node by the control node under the condition that a plurality of target nodes are determined to successfully download the target plug-in;
responding to a plug-in application instruction sent by the control node, and taking the target plug-in which is successfully loaded as a current application plug-in of the target node; the plug-in application instruction is an instruction sent to the plurality of target nodes by the control node under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully.
Optionally, the method further comprises:
if the target processing item is successfully completed, a processing success message aiming at the target processing item is sent to the control node, so that the control node determines that the target node successfully completes the target processing item according to the processing success message; wherein the target processing item includes downloading a target plug-in or loading a target plug-in.
Optionally, the method further comprises:
if the target processing item fails, accumulating the second processing failure times corresponding to the target processing item, and re-executing the target processing item until the target processing item is successful or the accumulated second processing failure times are greater than or equal to the second preset failure times.
Optionally, after the accumulated number of second processing failures is greater than or equal to a second preset number of failures, the method further includes:
and sending a processing failure message aiming at the target processing item to the control node, so that the control node determines that the target processing item is not successfully completed by the target node according to the processing failure message.
In a third aspect, the present disclosure provides a plug-in deployment apparatus for use in a control node, the apparatus comprising:
the plug-in downloading instruction sending module is used for sending plug-in downloading instructions to a plurality of target nodes under the condition that the existence of the target plug-in to be deployed is determined; the plug-in downloading instruction is used for indicating the target node to download the target plug-in from a first server;
the plug-in loading instruction sending module is used for sending plug-in loading instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-ins, so as to instruct each target node to load the target plug-ins according to the plug-in loading instructions;
And the plug-in application instruction sending module is used for sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-ins successfully, so as to control the plurality of target nodes to take the target plug-ins as current application plug-ins of the target nodes.
Optionally, the apparatus further comprises:
and the first target item processing module is used for determining that the target node successfully completes the target item if receiving a processing success message for the target item sent by the target node, wherein the target item processing module comprises a download target plug-in or a load target plug-in.
Optionally, the first target transaction processing module is further configured to determine that the target node has not successfully completed the target transaction if a transaction failure message for the target transaction sent by the target node is received, or a transaction success message for the target transaction sent by the target node is not received within a first preset time; under the condition that any one of the target nodes does not successfully complete the target processing item, accumulating the first failure times of the target node for the target processing item, and controlling the target node to execute the target processing item again until a processing success message sent by the target node for the target processing item is received, or the accumulated first failure times are larger than or equal to the first preset failure times.
Optionally, the apparatus further comprises:
and the plug-in stopping instruction sending module is used for sending plug-in deployment stopping instructions to the plurality of target nodes after the accumulated first failure times are greater than or equal to the first preset failure times so as to control the plurality of target nodes to stop plug-in deployment.
In a fourth aspect, the present disclosure provides another plug-in deployment apparatus for application to a target node, the apparatus comprising:
the plug-in downloading module is used for responding to a plug-in downloading instruction sent by the control node and downloading a target plug-in to be deployed from the first server;
the plug-in loading module is used for loading the target plug-in which is successfully downloaded in response to receiving a plug-in loading instruction sent by the control node; the plug-in loading instruction is an instruction sent to the target node by the control node under the condition that a plurality of target nodes are determined to successfully download the target plug-in;
the plug-in application module is used for responding to the plug-in application instruction sent by the control node and taking the target plug-in which is successfully loaded as the current application plug-in of the target node; the plug-in application instruction is an instruction sent to the plurality of target nodes by the control node under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully.
Optionally, the apparatus further comprises:
the second target item processing module is used for sending a processing success message aiming at the target item to the control node if the target item is successfully completed, so that the control node determines that the target node successfully completes the target item according to the processing success message; wherein the target processing item includes downloading a target plug-in or loading a target plug-in.
Optionally, the second target transaction processing module is further configured to accumulate a second processing failure number corresponding to the target transaction if the target transaction processing fails, and re-execute the target transaction until the target transaction processing is successful or the accumulated second processing failure number is greater than or equal to a second preset failure number.
Optionally, the second target transaction processing module is further configured to send a processing failure message for the target transaction to the control node after the accumulated second processing failure number is greater than or equal to a second preset failure number, so that the control node determines that the target node does not successfully complete the target transaction according to the processing failure message.
In a fifth aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of the first aspect of the present disclosure.
In a sixth aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the method of the second aspect of the present disclosure.
In a seventh aspect, the present disclosure provides an electronic device, comprising: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of the first aspect of the disclosure.
In an eighth aspect, the present disclosure provides an electronic device, comprising: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of the second aspect of the present disclosure.
Through the technical scheme, under the condition that the existence of the target plug-in to be deployed is determined, plug-in downloading instructions are sent to a plurality of target nodes; sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-in, so as to instruct each target node to load the target plug-in according to the plug-in loading instruction; and sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully, so as to control the plurality of target nodes to take the target plug-in as the current application plug-in of the target node. In this way, the unified control of the plug-in downloading, plug-in loading and plug-in application processes of the plurality of target nodes can enable the versions of the target plug-ins finally deployed by the plurality of target nodes to be consistent, so that the influence of the inconsistent versions of the plug-ins on the online prediction result is avoided, and the accuracy of online prediction is improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
fig. 1 is a schematic diagram of a plug-in deployment system provided by an embodiment of the present disclosure.
Fig. 2 is a flowchart of a method for deploying a plug-in provided in an embodiment of the present disclosure.
Fig. 3 is a flowchart of another plug-in deployment method provided by an embodiment of the present disclosure.
Fig. 4 is a flowchart of another plug-in deployment method provided by an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of a card deployment device according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of a second card deployment device provided in an embodiment of the present disclosure.
Fig. 7 is a schematic structural diagram of a third card deployment device provided in an embodiment of the present disclosure.
Fig. 8 is a schematic structural view of a fourth card deployment device provided in an embodiment of the present disclosure.
Fig. 9 is a schematic structural view of a fifth card deployment device provided in an embodiment of the present disclosure.
Fig. 10 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
It should be noted that, in this disclosure, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or order of indication or implying any particular order; the terms "S101", "S102", "S201", "S202", etc. are used to distinguish steps and are not necessarily to be construed as performing the method steps in a particular order or sequence; when the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated.
First, an application scenario of the present disclosure will be described. The present disclosure may be applied in a plug-in deployment scenario in a distributed file system (Hadoop Distributed File System, HDFS), provided that a service (e.g., take-out delivery duration prediction service) requires that the target distributed system make online predictions via target plug-ins (e.g., plug-ins for executing deep neural network model algorithms), while the target plug-ins may be periodically retrained to generate a new version of plug-ins, assuming that the target distributed system has 100 target nodes, the new version of plug-ins will need to be deployed into 100 target nodes after the new version of plug-ins are generated, in order to make more accurate online predictions. In the related art, each of the 100 target nodes executes plug-in deployment tasks at regular time, that is, each of the flows of deploying plug-ins by the 100 target nodes is an independent task, synchronous execution cannot be guaranteed, when any link of the deployment tasks has a problem, the plug-in version deployed by the node is possibly inconsistent with other nodes, but if the plug-in version is inconsistent, the on-line prediction result is affected, and the prediction accuracy is reduced.
In order to solve the problems, the present disclosure provides a method, an apparatus, a storage medium, and an electronic device for deploying plug-ins, where the plug-in downloading, loading, and application processes of plug-ins of a plurality of target nodes are uniformly controlled by a control node, so that versions of target plug-ins eventually deployed by a plurality of target nodes are consistent, thereby avoiding an influence on an online prediction result due to inconsistent versions of plug-ins, and improving accuracy of online prediction.
The following describes specific embodiments of the present disclosure with reference to the drawings.
Fig. 1 is a schematic diagram of a card deployment system provided in an embodiment of the disclosure, as shown in fig. 1, the card deployment system may include a control node 101, a plurality of target nodes 102 (e.g., a first target node 102-1, a second target node 102-2, … …, an nth target node 102-N), and a first server 103, where the control node 101 may be used to control card deployment or update of the plurality of target nodes, the first server 103 may be used to store target cards, and each target node may download target cards from the first server and deploy the target cards to the target nodes according to control instructions of the control node.
It should be noted that, in order to improve the efficiency of system deployment and update, in the embodiments of the present disclosure, a service and algorithm policy code decoupling manner may be adopted, and for example, a software system of each target node may include two parts of basic service software and a plugin, and the algorithm policy code is implemented in a plugin form to implement hot deployment. Therefore, when the plug-in is redeployed, basic service software does not need to be redeployed and started, and the efficiency of plug-in deployment is improved.
Wherein, the deployment of the plug-in may comprise the steps of: plug-in download, plug-in loading, and plug-in switching (alternatively referred to as plug-in applications). Plug-in downloading is used for representing a target node to download the target plug-in from a first server storing the target plug-in; the plug-in loading is used for representing that a target node loads the target plug-in which is successfully downloaded into a memory of the target node; the plug-in switch or plug-in application is used to characterize the step of taking the target plug-in that the target node will load successfully as the current application plug-in for the target node. Each target node can complete the steps of plug-in downloading, plug-in loading and plug-in switching under the control of the control node, so that plug-in deployment is completed.
Fig. 2 is a flowchart of a plug-in deployment method provided in an embodiment of the present disclosure, where the method may be applied to the control node described above, and as shown in fig. 2, the method includes the following steps:
s201, sending plug-in downloading instructions to a plurality of target nodes under the condition that the target plug-ins to be deployed exist.
The plug-in downloading instruction is used for instructing the target node to download the target plug-in from the first server. The target plugin may include a newly trained version of the plugin (e.g., periodically collecting sample data and training to obtain the target plugin), or any version of the plugin selected by the user (e.g., the user selects a version of the plugin as the target plugin such that the current application plugin of the target node is restored to a previous version), may include an algorithm package plugin, and may be stored in the form of a JAR. The first server may be a server storing the target plugin. The first server may be the same server as the control node (i.e. the target plug-in is stored on the control node), although the first server may also be a different server than the control node.
In this step, it may be determined that there is a target plug-in to be deployed by receiving a target plug-in update indication sent by the first server.
The target plug-in update instruction may be an instruction that is actively sent to the control node after the first server obtains a new plug-in version; or the first server can be an instruction sent to the control node when receiving the plug-in query message sent by the control node and determining that a new plug-in version exists on the first server; or the first server determines the target plug-in according to the selection of the user and then sends the indication to the control node.
For example, the first server may be a plugin management server, in the distributed system, before obtaining the latest version of plugins through offline training, plugin registration may be performed on the first server, for example, plugin information such as a plugin name, a plugin type, plugin version information, and a storage path of plugins under a preset file directory of the distributed system, so after generating the latest version of plugins through offline training, the plugins obtained through the latest training may be marked according to the plugin information, and the new plugin version may be uploaded to a corresponding storage path for storage. Thus, the method is applicable to a variety of applications. In this way, the first server may periodically scan the preset file directory under the distributed system to determine whether a new plug-in version exists, and if it is determined that the new plug-in version exists, the first server may actively send a target plug-in update indication to the control node, where the target plug-in update indication may include plug-in information of the target plug-in.
In addition, the control node may periodically send a plug-in query message to the first server, and after receiving the plug-in query message sent by the control node, the first server may scan a preset file directory in the distributed system to determine whether a new plug-in version exists, and if it is determined that the new plug-in version exists, may send a target plug-in update instruction to the control node.
For another example, considering that in an actual application scenario, the user may also select any version of plug-ins from the generated multiple plug-in versions to deploy as the target plug-ins, for example, the user may operate the plug-in version to degrade, so that the current application plug-in of the target node is restored to a previous version, and therefore, if the first server obtains the plug-ins selected by the user, the first server sends the update indication of the target plug-ins to the control node.
In this way, the control node may send a plug-in download instruction to a plurality of target nodes according to the target plug-in update indication. The plurality of target nodes may be all nodes of the target distributed system to which the control node belongs, or may be part of nodes executing the same target task in the target distributed system. Further, the plurality of target nodes may be uniformly controlled as one target node group.
S202, under the condition that the plurality of target nodes are determined to successfully download the target plug-in, a plug-in loading instruction is sent to the plurality of target nodes so as to instruct each target node to load the target plug-in according to the plug-in loading instruction.
For example, the control node may periodically query the download progress of each target node, and when the download progress of each of the plurality of target nodes reaches 100%, it may determine that each of the plurality of target nodes successfully downloads the target plugin, and at this time, may send a plugin loading instruction to the plurality of target nodes so as to continue plugin loading.
Otherwise, if any target node does not successfully download the target plug-in, the plug-in loading is not continued, so that the problem of inconsistent plug-in versions of different target nodes can be avoided.
And S203, sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully, so as to control the plurality of target nodes to take the target plug-in as the current application plug-in of the target nodes.
Similarly, the control node may periodically query the loading progress of each target node, and when the loading progress of the plurality of target nodes reaches 100%, it may determine that the plurality of target nodes each successfully load the target plugin, and at this time, may send a plugin application instruction to the plurality of target nodes so as to continue plugin application, that is, control the plurality of target nodes to use the target plugin as a current application plugin of the target node.
By adopting the method, under the condition that the existence of the target plug-in to be deployed is determined, a plug-in downloading instruction is sent to a plurality of target nodes; sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-in, so as to instruct each target node to load the target plug-in according to the plug-in loading instruction; and sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully, so as to control the plurality of target nodes to take the target plug-in as the current application plug-in of the target node. In this way, the unified control of the plug-in downloading, plug-in loading and plug-in application processes of the plurality of target nodes can enable the versions of the target plug-ins finally deployed by the plurality of target nodes to be consistent, so that the influence of the inconsistent versions of the plug-ins on the online prediction result is avoided, and the accuracy of online prediction is improved.
Fig. 3 is a flowchart of another method for deploying a plug-in, which is provided in an embodiment of the present disclosure, and may be applied to the above-mentioned target node, as shown in fig. 3, and includes the following steps:
s301, in response to receiving a plug-in downloading instruction sent by the control node, downloading a target plug-in to be deployed from a first server.
The plug-in downloading instruction may include plug-in information of the target plug-in, where the plug-in information may include a plug-in name, a plug-in type, plug-in version information, or a download path of the plug-in. The path of the target plugin stored on the first server can be obtained through the download path, and the first server can be a server for storing the target plugin.
S302, loading the target plug-in which is successfully downloaded in response to receiving a plug-in loading instruction sent by the control node.
The plug-in loading instruction is an instruction sent to the target node by the control node under the condition that a plurality of target nodes are determined to successfully download the target plug-in.
S303, responding to the received plug-in application instruction sent by the control node, and taking the target plug-in which is successfully loaded as the current application plug-in of the target node.
The plug-in application instruction is an instruction sent to the plurality of target nodes by the control node under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully.
By adopting the method, the target nodes finish plug-in deployment step by step according to the instructions of the control nodes, and the control nodes uniformly control the plug-in downloading, plug-in loading and plug-in application processes of the plurality of target nodes, so that the versions of the target plug-ins finally deployed by the plurality of target nodes are consistent, thereby avoiding the influence of inconsistent plug-in versions on online prediction results and improving the accuracy of online prediction.
Fig. 4 is a flowchart of another method for deploying a plug-in, which is provided in an embodiment of the present disclosure, and as shown in fig. 4, each step of deploying the target plug-in (plug-in downloading, plug-in loading and plug-in switching) may be controlled through message interaction between a control node and a target node, and the method includes the following steps:
s401, the control node sends target processing item instructions to a plurality of target nodes.
The target transaction instructions may include plug-in download instructions, plug-in load instructions, or plug-in application instructions as described above.
S402, the target node executes the target processing item corresponding to the target processing item instruction according to the received target processing item instruction.
Likewise, the target transaction may include a download target plug-in, a load target plug-in, or an application target plug-in.
S403, the target node determines whether the target processing item is successfully completed.
If the target processing item is successfully completed, steps S404 and S405 are performed; otherwise, if the target transaction is not completed successfully, step S406 is performed.
S404, the target node sends a processing success message aiming at the target processing item to the control node.
S405, if the control node receives a processing success message sent by the target node and aiming at the target processing item, the control node determines that the target node successfully completes the target processing item.
Further, if the target transaction is a download target plug-in, the control node may send a plug-in loading instruction to the plurality of target nodes when determining that the plurality of target nodes each successfully download the target plug-in, so as to instruct each of the target nodes to load the target plug-in according to the plug-in loading instruction.
If the target processing item is loading the target plugin, the control node may send a plugin application instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to complete loading the target plugin successfully, so as to control the plurality of target nodes to use the target plugin as a current application plugin of the target node.
If the target processing item is an application target plug-in, the control node can determine that plug-in deployment is completed and end plug-in deployment work under the condition that the plurality of target nodes are determined to successfully complete application of the target plug-in.
S406, if the target processing item fails, accumulating the second processing failure times corresponding to the target processing item, and re-executing the target processing item until the target processing item succeeds or the accumulated second processing failure times are greater than or equal to the second preset failure times.
The second preset number of identification may be any preset positive integer greater than 0, for example, may be 3.
If the target transaction processing is successful after the re-execution a plurality of times, steps S404 and S405 are executed.
If the number of the accumulated second processing failures is greater than or equal to the second preset failure number after the re-execution for multiple times, steps S407 to S410 are executed.
S407, after the accumulated second processing failure number is greater than or equal to the second preset failure number, the target node may send a processing failure message for the target processing item to the control node.
S408, if the control node receives the processing failure message sent by the target node and aiming at the target processing item, the control node determines that the target node does not successfully complete the target processing item.
It should be noted that, if the control node does not receive the processing success message for the target processing item sent by the target node within the first preset time, it may also be determined that the target node does not successfully complete the target processing item.
S409, under the condition that any one of the target nodes does not successfully complete the target processing item, the control node accumulates the first failure times of the target node for the target processing item, and controls the target node to execute the target processing item again until a processing success message sent by the target node for the target processing item is received, or the accumulated first failure times are greater than or equal to the first preset failure times.
The first preset number of identification may be any preset positive integer greater than 0, for example, may be 3.
If the target node is controlled to execute the target transaction again a plurality of times, and then a successful message of the target transaction is received, the step S405 is executed.
If the accumulated first failure number is greater than or equal to the first preset failure number, step S410 is executed.
S410, if the accumulated first failure times are greater than or equal to the first preset failure times, the control node sends plug-in deployment stop instructions to the target nodes.
S411, the target node stops the plug-in deployment according to the received plug-in deployment stop instruction.
For example, the target node may delete the already loaded target plug-in from memory or delete the already downloaded target plug-in from memory.
Further, if other available plug-in versions are stored in the target node, the target node may continue to use the plug-in of the version as the current application plug-in.
By adopting the method, the plug-in downloading, plug-in loading and plug-in application processes of a plurality of target nodes are uniformly controlled through the target processing item instruction, the processing success message or the processing failure message between the control node and the target nodes, so that the versions of the target plug-ins finally deployed by the plurality of target nodes are consistent, the influence of the inconsistent versions of the plug-ins on the online prediction result is avoided, and the accuracy of the online prediction is improved.
In another embodiment of the present disclosure, if the control node does not receive any message (such as a processing success message or a processing failure message for the target processing item) sent by the target node within a second preset time after sending the target processing item instruction to the target node, it may be determined that the target node is faulty (such as the target node is down or communication is interrupted), and the target node may be deleted from the plurality of nodes. And performing plug-in deployment on the new multiple nodes after deleting the target node, so that the situation that the multiple target nodes cannot perform plug-in deployment due to partial target node faults is avoided.
Further, after the control node determines that the target node has a fault, the control node can also display alarm information of the fault of the target node. For example, the alarm information is sent to the user by means of sound, mail, short message, etc. so that the user can process the fault in time.
In summary, if it is determined that there is a target plugin to be deployed, a plugin downloading instruction is sent to a plurality of target nodes; sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-in, so as to instruct each target node to load the target plug-in according to the plug-in loading instruction; and sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully, so as to control the plurality of target nodes to take the target plug-in as the current application plug-in of the target node. In this way, the unified control of the plug-in downloading, plug-in loading and plug-in application processes of the plurality of target nodes can enable the versions of the target plug-ins finally deployed by the plurality of target nodes to be consistent, so that the influence of the inconsistent versions of the plug-ins on the online prediction result is avoided, and the online prediction accuracy is improved.
Fig. 5 is a block diagram of a plug-in deployment apparatus for use with a control node, according to an exemplary embodiment, as shown in fig. 5, the apparatus 500 comprising:
a plug-in download instruction sending module 501, configured to send plug-in download instructions to a plurality of target nodes when it is determined that there is a target plug-in to be deployed; the plug-in downloading instruction is used for instructing the target node to download the target plug-in from the first server;
the plug-in loading instruction sending module 502 is configured to send a plug-in loading instruction to the plurality of target nodes, so as to instruct each of the target nodes to load the target plug-in according to the plug-in loading instruction, if it is determined that each of the plurality of target nodes successfully downloads the target plug-in;
and the plug-in application instruction sending module 503 is configured to send plug-in application instructions to the plurality of target nodes, so as to control the plurality of target nodes to use the target plug-in as a current application plug-in of the target node, if it is determined that the plurality of target nodes all successfully completes loading the target plug-in.
FIG. 6 is a block diagram of a second type of plug-in deployment apparatus, as shown in FIG. 6, according to an exemplary embodiment, the apparatus further comprising:
a first target transaction processing module 601, configured to determine that the target node successfully completes the target transaction if a transaction success message for the target transaction sent by the target node is received, where the target transaction includes downloading a target plug-in or loading a target plug-in.
Optionally, the first target transaction processing module 601 is further configured to determine that the target node has not successfully completed the target transaction if a processing failure message for the target transaction sent by the target node is received, or a processing success message for the target transaction sent by the target node is not received within a first preset time; under the condition that any one of the target nodes does not successfully complete the target processing item, accumulating the first failure times of the target node for the target processing item, and controlling the target node to execute the target processing item again until a processing success message sent by the target node for the target processing item is received, or the accumulated first failure times are larger than or equal to the first preset failure times.
FIG. 7 is a block diagram of a third plug-in deployment apparatus, applied to a control node, shown in FIG. 7, according to an exemplary embodiment, the apparatus comprising:
the plug-in stopping instruction sending module 701 is configured to send a plug-in deployment stopping instruction to the plurality of target nodes after the accumulated first failure number is greater than or equal to a first preset failure number, so as to control the plurality of target nodes to stop plug-in deployment.
Fig. 8 is a block diagram of a fourth plug-in deployment apparatus, shown in accordance with an exemplary embodiment, for application to a target node, as shown in fig. 8, the apparatus 800 comprising:
a plug-in downloading module 801, configured to download, from a first server, a target plug-in to be deployed in response to receiving a plug-in downloading instruction sent by a control node;
a plug-in loading module 802, configured to load the target plug-in that has been successfully downloaded in response to receiving a plug-in loading instruction sent by the control node; the plug-in loading instruction is an instruction sent to the target node by the control node under the condition that a plurality of target nodes are determined to successfully download the target plug-in;
a plug-in application module 803, configured to respond to receiving a plug-in application instruction sent by the control node, and take the target plug-in that has been loaded successfully as a current application plug-in of the target node; the plug-in application instruction is an instruction sent to the plurality of target nodes by the control node under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully.
FIG. 9 is a block diagram of a fifth plug-in deployment apparatus, as shown in FIG. 9, according to an exemplary embodiment, the apparatus further comprising:
A second target transaction processing module 901, configured to send a processing success message for the target transaction to the control node if the target transaction is successfully completed, so that the control node determines that the target node successfully completes the target transaction according to the processing success message; wherein the target transaction includes downloading a target plug-in or loading a target plug-in.
Optionally, the second target transaction processing module 901 is further configured to accumulate a second processing failure number corresponding to the target transaction if the target transaction processing fails, and re-execute the target transaction until the target transaction processing is successful or the accumulated second processing failure number is greater than or equal to a second preset failure number.
Optionally, the second target transaction processing module 901 is further configured to send a processing failure message for the target transaction to the control node after the accumulated second processing failure number is greater than or equal to a second preset failure number, so that the control node determines that the target node has not successfully completed the target transaction according to the processing failure message.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
By adopting the device, under the condition that the existence of the target plug-in to be deployed is determined, a plug-in downloading instruction is sent to a plurality of target nodes; sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-in, so as to instruct each target node to load the target plug-in according to the plug-in loading instruction; and sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully, so as to control the plurality of target nodes to take the target plug-in as the current application plug-in of the target node. In this way, the unified control of the plug-in downloading, plug-in loading and plug-in application processes of the plurality of target nodes can enable the versions of the target plug-ins finally deployed by the plurality of target nodes to be consistent, so that the influence of the inconsistent versions of the plug-ins on the online prediction result is avoided, and the online prediction accuracy is improved.
Fig. 10 is a block diagram of an electronic device 1000, shown in accordance with an exemplary embodiment. For example, the electronic device 1000 may be provided as a server. Referring to fig. 10, the electronic device 1000 includes a processor 1022, which may be one or more in number, and a memory 1032 for storing computer programs executable by the processor 1022. The computer programs stored in memory 1032 may include one or more modules each corresponding to a set of instructions. Further, processor 1022 may be configured to execute the computer program to perform the plug-in deployment method described above.
In addition, the electronic device 1000 may also include a power component 1026 and a communication component 1050, the power component 1026 may be configured to perform power management of the electronic device 1000, and the communication component 1050 may be configured to enable communication of the electronic device 1000, such as wired or wireless communication. In addition, the electronic device 1000 may also include an input/output (I/O) interface 1058. The electronic device 1000 may operate based on an operating system stored in memory 1032, such as Windows Server, mac OS, unix, linux, etc.
In another exemplary embodiment, a computer readable storage medium is also provided, comprising program instructions which, when executed by a processor, implement the steps of the above-described plug-in deployment method. For example, the computer readable storage medium may be the memory 1032 described above that includes program instructions executable by the processor 1022 of the electronic device 1000 to perform the plug-in deployment method described above.
In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described plug-in deployment method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the foregoing embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, the present disclosure does not further describe various possible combinations.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (12)

1. A method of plug-in deployment, for application to a control node, the method comprising:
sending plug-in downloading instructions to a plurality of target nodes under the condition that the target plug-ins to be deployed exist; the plug-in downloading instruction is used for indicating the target node to download the target plug-in from a first server;
sending a plug-in loading instruction to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-ins, so as to instruct each target node to load the target plug-ins according to the plug-in loading instruction;
And under the condition that the target nodes are determined to finish loading the target plugin successfully, sending plugin application instructions to the target nodes so as to control the target nodes to take the target plugin as a current application plugin of the target node.
2. The method according to claim 1, wherein the method further comprises:
and if a processing success message for the target processing item sent by the target node is received, determining that the target processing item is successfully completed by the target node, wherein the target processing item comprises a downloading target plug-in or a loading target plug-in.
3. The method according to claim 2, wherein the method further comprises:
if a processing failure message sent by the target node for the target processing item is received, or if a processing success message sent by the target node for the target processing item is not received within a first preset time, determining that the target node does not successfully complete the target processing item;
under the condition that any one of the target nodes does not successfully complete the target processing item, accumulating the first failure times of the target node for the target processing item, and controlling the target node to execute the target processing item again until a processing success message sent by the target node for the target processing item is received, or the accumulated first failure times are larger than or equal to the first preset failure times.
4. A method according to claim 3, wherein after the accumulated first number of failures is greater than or equal to a first preset number of failures, the method further comprises:
and sending plug-in deployment stopping instructions to the plurality of target nodes so as to control the plurality of target nodes to stop plug-in deployment.
5. A method of plug-in deployment, applied to a target node, the method comprising:
in response to receiving a plug-in downloading instruction sent by a control node, downloading a target plug-in to be deployed from a first server;
loading the target plug-in which is successfully downloaded in response to receiving a plug-in loading instruction sent by the control node; the plug-in loading instruction is an instruction sent to the target node by the control node under the condition that a plurality of target nodes are determined to successfully download the target plug-in;
responding to a plug-in application instruction sent by the control node, and taking the target plug-in which is successfully loaded as a current application plug-in of the target node; the plug-in application instruction is an instruction sent to the plurality of target nodes by the control node under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully.
6. The method of claim 5, wherein the method further comprises:
if the target processing item is successfully completed, a processing success message aiming at the target processing item is sent to the control node, so that the control node determines that the target node successfully completes the target processing item according to the processing success message; wherein the target processing item includes downloading a target plug-in or loading a target plug-in.
7. The method of claim 6, wherein the method further comprises:
if the target processing item fails, accumulating the second processing failure times corresponding to the target processing item, and re-executing the target processing item until the target processing item is successful or the accumulated second processing failure times are greater than or equal to the second preset failure times.
8. The method of claim 7, wherein after the accumulated number of second processing failures is greater than or equal to a second preset number of failures, the method further comprises:
and sending a processing failure message aiming at the target processing item to the control node, so that the control node determines that the target processing item is not successfully completed by the target node according to the processing failure message.
9. A plug-in deployment apparatus for application to a control node, the apparatus comprising:
the plug-in downloading instruction sending module is used for sending plug-in downloading instructions to a plurality of target nodes under the condition that the existence of the target plug-in to be deployed is determined; the plug-in downloading instruction is used for indicating the target node to download the target plug-in from a first server;
the plug-in loading instruction sending module is used for sending plug-in loading instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to successfully download the target plug-ins, so as to instruct each target node to load the target plug-ins according to the plug-in loading instructions;
and the plug-in application instruction sending module is used for sending plug-in application instructions to the plurality of target nodes under the condition that the plurality of target nodes are determined to finish loading the target plug-ins successfully, so as to control the plurality of target nodes to take the target plug-ins as current application plug-ins of the target nodes.
10. A plug-in deployment apparatus for application to a target node, the apparatus comprising:
the plug-in downloading module is used for responding to a plug-in downloading instruction sent by the control node and downloading a target plug-in to be deployed from the first server;
The plug-in loading module is used for loading the target plug-in which is successfully downloaded in response to receiving a plug-in loading instruction sent by the control node; the plug-in loading instruction is an instruction sent to the target node by the control node under the condition that a plurality of target nodes are determined to successfully download the target plug-in;
the plug-in application module is used for responding to the plug-in application instruction sent by the control node and taking the target plug-in which is successfully loaded as the current application plug-in of the target node; the plug-in application instruction is an instruction sent to the plurality of target nodes by the control node under the condition that the plurality of target nodes are determined to finish loading the target plug-in successfully.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the program when being executed by a processor implements the steps of the method according to any one of claims 1-4, or the program when being executed by a processor implements the steps of the method according to any one of claims 5-8.
12. An electronic device, comprising:
a memory having a computer program stored thereon;
A processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1-4 or to carry out the steps of the method of any one of claims 5-8.
CN202111473869.4A 2021-11-30 2021-11-30 Plug-in deployment method and device, storage medium and electronic equipment Pending CN116204197A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111473869.4A CN116204197A (en) 2021-11-30 2021-11-30 Plug-in deployment method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111473869.4A CN116204197A (en) 2021-11-30 2021-11-30 Plug-in deployment method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116204197A true CN116204197A (en) 2023-06-02

Family

ID=86506545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111473869.4A Pending CN116204197A (en) 2021-11-30 2021-11-30 Plug-in deployment method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116204197A (en)

Similar Documents

Publication Publication Date Title
CN109194538B (en) Testing method, device, server and storage medium based on distributed coordination
CN110297640B (en) Model deployment method and device, storage medium and electronic equipment
CN111083722A (en) Model pushing method, model requesting method, model pushing device, model requesting device and storage medium
CN109634733A (en) Task scheduling and managing method, device and operation management server
CN109787858B (en) Method and terminal for issuing services in batches
US20090144743A1 (en) Mailbox Configuration Mechanism
CN111651352B (en) Warehouse code merging method and device
CN113162888B (en) Security threat event processing method and device and computer storage medium
CN110618853B (en) Detection method, device and equipment for zombie container
CN109828830B (en) Method and apparatus for managing containers
CN111506358A (en) Method and device for updating container configuration
CN113419818B (en) Basic component deployment method, device, server and storage medium
CN114489711A (en) Terminal upgrading method and device and storage medium
CN111506388B (en) Container performance detection method, container management platform and computer storage medium
CN112130889A (en) Resource management method and device, storage medium and electronic device
CN114168252A (en) Information processing system and method, network scheme recommendation component and method
CN111240698A (en) Model deployment method and device, storage medium and electronic equipment
CN116204197A (en) Plug-in deployment method and device, storage medium and electronic equipment
CN115173569B (en) Power distribution equipment testing method, device, equipment and medium based on BS (browser/server) framework
CN109375946B (en) Method and system for managing component package of node package manager
CN114546842A (en) Interface test method and device, storage medium and electronic equipment
US11288092B2 (en) Dynamically adjusting reconciliation time-delays
CN111381932B (en) Method, device, electronic equipment and storage medium for triggering application program change
US20220027137A1 (en) Automatically orchestrating deployments of software-defined storage stacks
CN112395072A (en) Model deployment method and device, storage medium and electronic equipment

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