Summary of the invention
This specification one or more embodiment describes the model loading method based on multi-party computations, can effectively into
Row model iteration.
According in a first aspect, provide a kind of model loading method based on multi-party computations, it is applied to control node,
The control node is for controlling multiple calculate nodes, and each calculate node is respectively provided with new model in the multiple calculate node
Second partial model of first partial model and master mould, the first partial model of each calculate node form complete new mould
Type, the local model group of the second of each calculate node is at complete master mould;Wherein, the control node maintenance has command table
And state record table, the command table be used for record cast operational order, the state record table by record it is described it is each based on
Model state in operator node;The described method includes:
When detecting that the online order of master mould is with new model loading command in the command table, in response to the multiple meter
First heartbeat message of arbitrary calculate node in operator node sends the first feedback message to the calculate node;Wherein, first heart
It jumps message and indicates that the second partial model is in online state, the first feedback message instruction load first partial in the calculate node
Model, and maintain the second partial model online;
In response to the third heartbeat message of arbitrary calculate node, the state record table is updated to the third state, and
Third, which is sent, to the calculate node feeds back message;Wherein, third heartbeat message indicates in the calculate node at first partial model
In stress state, the third state indicates that first partial model is in stress state in each calculate node, the
Three feedback messages indicate online first partial model, and the second partial model is made to enter stress state;
In response to the 5th heartbeat message of arbitrary calculate node, the state record table is updated to the 5th state, and
The 5th feedback message is sent to the calculate node;Wherein, the 5th heartbeat message indicates first partial mould in the calculate node
Type is in online state, and first partial model, which is in, in each calculate node described in the 5th state instruction has gone up threadiness
State, the 5th feedback message indicate online first partial model, and offline second partial model.
In one embodiment, the method also includes: the method also includes: send the to the calculate node described
Before three feedback messages, in response to the second heartbeat message of the calculate node, the state record table is updated to the second state,
And the second feedback message is sent to the calculate node, wherein the second heartbeat message indicates the first partial model of the calculate node
In stress state or the state in load;At least one in the multiple calculate node of second state instruction calculates
First partial model is not in stress state, the second feedback message instruction load first partial model in node, and ties up
It is online to hold the second partial model.
In one embodiment, the method also includes the method also includes sending the to the calculate node described
Before five feedback messages, in response to the 4th heartbeat message of the calculate node, the state record table is updated to the 4th state,
And the 4th feedback message is sent to the calculate node, wherein the 4th heartbeat message indicates first partial model in the calculate node
In online state or in stress state;At least one in the multiple calculate node of 4th state instruction calculates
First partial model is not in online state in node, and the 4th feedback message indicates online first partial model, and makes
Second partial model enters stress state.
In one embodiment, the partial model in the partial model of online state and in stress state
Participate in processing service request.
In one embodiment, the 5th feedback message only includes the order of online new model, does not include master mould
Information.
In one embodiment, after sending the 5th feedback message to the calculate node, further includes: delete the order
The online order of master mould in table, and new model loading command in the command table is revised as the online order of new model.
In one embodiment, the method also includes, it is described to the calculate node send the 5th feedback message after,
Receive the 6th heartbeat message of each calculate node;
When the 6th heartbeat message of each calculate node does not include the state of the second partial model, by the shape
State record sheet is updated to the 6th state, wherein the state record table in the 6th state does not include the second partial model
State.
According to second aspect, a kind of model loading method based on multi-party computations is provided, is applied to first and calculates
Node, first calculate node are any node in multiple calculate nodes of control node control;The multiple calculating section
Each calculate node is respectively provided with first partial model and the second partial model in point;Wherein, the first game of each calculate node
Portion's model forms complete new model, and the local model group of the second of each calculate node is at complete master mould;The method
Include:
The first heartbeat message is sent to control node, the first heartbeat message indicates the second partial model in the first calculate node
In online state;
According to the instruction of the first feedback message received from control node, in response to the first heartbeat message, load first
Partial model, and maintain the second partial model online;
When the first partial model of the first calculate node is in stress state, third heartbeat report is sent to control node
Text, third heartbeat message indicate that first partial model is in stress state in the first calculate node;
According to the instruction from the received third feedback message of control node, online first partial model, and make the second part
Model enters stress state;Wherein, third feedback message is control node in response to third heartbeat message, and described in the judgement
First partial model is in the message sent when stress state in each calculate node;
When the first partial model of the first calculate node is in online state, the 5th heartbeat report is sent to control node
Text, the 5th heartbeat message indicate that the first partial model of the first calculate node is in online state;
It is indicated according to from the received 5th feedback message of control node, offline second partial model, and maintains first partial
Model is online;Wherein, the 5th feedback message is control node in response to the 5th heartbeat message, and is judging each calculating
First partial model is in the message sent when online state in node.
According to the third aspect, a kind of model eedle threader based on multi-party computations is provided, control node is set to,
The control node is for controlling multiple calculate nodes, and each calculate node is respectively provided with new model in the multiple calculate node
Second partial model of first partial model and master mould, the first partial model of each calculate node form complete new mould
Type, the local model group of the second of each calculate node is at complete master mould;Wherein, the control node maintenance has command table
And state record table, the command table be used for record cast operational order, the state record table by record it is described it is each based on
Model state in operator node;Described device includes:
Transmission unit is configured to when detecting that the online order of master mould is with new model loading command in the command table,
In response to the first heartbeat message of calculate node arbitrary in the multiple calculate node, the first feedback is sent to the calculate node
Message;Wherein, the first heartbeat message indicates that the second partial model is in online state, the first feedback message in the calculate node
Instruction load first partial model, and maintain the second partial model online;
The transmission unit is additionally configured to, and in response to the third heartbeat message of arbitrary calculate node, the state is remembered
Record table is updated to the third state, and sends third to the calculate node and feed back message;Wherein, third heartbeat message indicates the calculating
First partial model is in stress state in node, and the third state indicates first partial model in each calculate node
It is in stress state, third feeds back message and indicates online first partial model, and enters the second partial model and loaded
State;
The transmission unit is additionally configured to, and in response to the 5th heartbeat message of arbitrary calculate node, the state is remembered
Record table is updated to the 5th state, and sends the 5th feedback message to the calculate node;Wherein, the 5th heartbeat message instruction should
First partial model is in online state, first partial in each calculate node described in the 5th state instruction in calculate node
Model is in online state, and the 5th feedback message indicates online first partial model, and offline second partial model.
According to fourth aspect, a kind of model eedle threader based on multi-party computations is provided, the first calculating is set to
Node, first calculate node are any node in multiple calculate nodes of control node control;The multiple calculating section
Each calculate node is respectively provided with first partial model and the second partial model in point;Wherein, the first game of each calculate node
Portion's model forms complete new model, and the local model group of the second of each calculate node is at complete master mould;Described device
It include: transmission unit, loading unit, online unit, offline unit;
The transmission unit is configured to, and sends the first heartbeat message, the first meter of the first heartbeat message instruction to control node
The second partial model is in online state in operator node;
The loading unit is configured to, according to the first feedback received from control node, in response to the first heartbeat message
The instruction of message loads first partial model, and maintains the second partial model online;
The transmission unit is additionally configured to, when the first partial model of the first calculate node is in stress state, to
Control node sends third heartbeat message, and first partial model, which is in, in third heartbeat message the first calculate node of instruction has loaded
State;
The online unit is configured to, according to the instruction from the received third feedback message of control node, online first game
Portion's model, and the second model is made to enter stress state;Wherein, third feedback message is control node in response to third heartbeat report
Text, and the message that when first partial model is in stress state in judging each calculate node sends;
The transmission unit is additionally configured to, when the first partial model of the first calculate node is in online state, to
Control node sends the 5th heartbeat message, and the 5th heartbeat message indicates that the first partial model of the first calculate node is in upper threadiness
State;
The offline unit is configured to, and according to from the received 5th feedback message instruction of control node, offline second is local
Model, and maintain first partial model online;Wherein, the 5th feedback message is control node in response to the 5th heartbeat report
Text, and the message that when first partial model is in online state in judging each calculate node sends.
According to the 5th aspect, a kind of computer readable storage medium is provided, computer program is stored thereon with, when described
When computer program executes in a computer, enable computer execute first aspect method or second aspect method.
According to the 6th aspect, a kind of computing terminal, including memory and processor are provided, is stored in the memory
Executable code realizes the method for first aspect or the method for second aspect when the processor executes the executable code.
The method and device that this specification embodiment provides, when the partial model of new model in each calculate node is in
When stress state, the partial model of the online new model of each calculate node is just indicated;When the localized mode of new model in each calculate node
After type completion is online, the partial model of the offline master mould of, to be completed as early as possible new in the case where not stopping master mould service
Model is online, reduce model iteration to MPC system can externally service time influence.
Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
Model based on MPC is divided into multiple partial models (model part), and different partial models is respectively arranged at not
With in the calculate node of mechanism.By taking model shown in FIG. 1 as an example, can be divided into partial model 1, partial model 2, partial model 3,
Partial model 4.Wherein, partial model 1 is arranged in calculate node 1, and calculate node 1 belongs to mechanism (institution) 1;Office
Portion's model 2 is arranged in calculate node 1, and calculate node 2 belongs to mechanism 2;Partial model 3 is arranged in calculate node 3, calculates section
Point 3 belongs to mechanism 3, and partial model 1 is arranged in calculate node 4, and calculate node 4 belongs to mechanism 4.
For the model based on MPC, each partial model after the deployment of respective calculate node is online, just be may be provided in
Line service.When any one calculate node receives the service request of user, service is collectively formed in each partial model of the model
Link, with for user's negotiation result, to complete the processing to service request.
In practical applications, there can be the demand of model iteration.This needs each calculate node in each mechanism online respective
The corresponding partial model for belonging to new model could provide effective model service for user.
It is first that master mould is offline when carrying out model iteration in a kind of scheme, it reloads, online new model.It is easy reason
Solution, model is offline, load is required to holding time, therefore carries out model iteration according to the program, will lead to each calculate node and exists
Following period of time can not provide service for user.
This specification embodiment provides a kind of model loading method based on MPC, can be each when carrying out model iteration
In the case that the memory of calculate node retains the partial model of old model, the localized mode of each calculate node load new model is indicated
Type;After each calculate node loads the partial model success of new model, the part of the online new model of each calculate node is just indicated
Model;After the partial model online success of new model in each calculate node, the offline master mould of each calculate node is just indicated
Partial model.It is online in the case where not stopping master mould service, complete new model as early as possible, model iteration is reduced to MPC
The influence of systems serve time.
Next, in different embodiments, being carried out to the model loading method based on MPC that this specification embodiment provides
It illustrates.
Referring to Fig.2, the model loading method application architecture based on MPC that this specification embodiment provides includes control node
With multiple calculate nodes.
Control node is referred to as coordinator (Coordinator), can receive the operation life of administrator (admin)
It enables, operational order may include upper line model order and lower line model order, with Controlling model iterative process.
Multiple calculate nodes can belong to different mechanisms (Institution), wherein a mechanism may include more
One or both of a calculate node or more calculate node.Each calculate node is for load or online corresponding part
Model.The complete model of each corresponding partial model composition of calculate node, allows each calculate node to cooperate with the online clothes of offer
Business, to handle service request.
In the embodiment of the present application, service request is specifically as follows the service request that any calculate node receives.To this
The processing of service request needs the participation of partial model in each calculate node.
Each calculate node periodically can send heartbeat message to control node, to report the state of its partial model.Control section
The state for the partial model that point can be reported according to each calculate node, feedback the corresponding command gives each calculate node, so that each calculate
Node executes relevant operation.
Next, control node is described in detail in conjunction with Fig. 2.
Control node, i.e. coordinator may include a controller (controller), a record cast operational order
Order (commands) table, state (status) table for recording partial model state in each calculate node.
Command table is used for the operational order of record manager input, and operational order can specifically include online order (to_
) and loading command (to_loaded) online.The specific structure of command table can be as shown in table 1.
Table 1
Wherein, model_id is model name, for example, " old " can be the name of master mould under the scene of model iteration
Claim, " new " is the title of new model." type " is command type, wherein " TO_LOADED " is load partial model or model
Order, the order that " TO_ONLINE " is online partial model or model.
State table is used to record the state of the partial model in each calculate node, and structure can be as shown in table 2.
Table 2
The current state that node_id is calculate node title, model_id is model name, status is partial model,
Wherein state (state for being referred to as model) flow path switch of partial model is as shown in Figure 3.
Refering to Fig. 3, be in original state, i.e., offline (offine) state, partial model can be converted to shape in load
State (loading).State refers to that the partial model of model or model is loading in load.
Model or partial model in stress state can be converted to load failure (load_failed) state, can also
Successfully (loaded) state is loaded to be converted to.Load success status is referred to as stress state.Any calculating is saved
For point, the partial model in stress state refers to that the partial model has loaded the memory into the node, can participate in
Processing to service request.
Model or partial model in stress state can be converted to online success (online) state.Online success shape
State is referred to as online state.For any calculate node, the partial model in online state refers to this
The content that module has been in the node can participate in the processing to service request.
Controller (controller) in control node is for handling the order that administrator (admin) inputs to command table
And the heartbeat message that each calculate node is reported.Each calculate node sends heartbeat message to control node, to report the calculating section
The state of each partial model in point.The controller of control node can be according to heartbeat message more new state (status) table, so that shape
State table records the last state of each partial model in each calculate node.Controller can generate corresponding according to command table, state table
Feedback message feeds back to each calculate node, so that each calculate node executes corresponding operating according to feedback message.
Administrator can be to control node transmission pattern (partial model) operational order (such as online order, offline order)
Its process is as follows:
A. control node can be inserted by controller into command table after receiving the online order about new model of administrator
Enter the command record that a command type about new model is " TO_LOADED " (load).Then it can be incited somebody to action by heartbeat message
The order is sent to each calculate node.After each calculate node receives " TO_LOADED " order about new model, starts execution and add
The partial model of new model is carried, and periodically sends the state of the partial model of new model to control node.When state table shows institute
Have the partial model of new model in calculate node all in stress state after, control node to each calculate node transmission includes
The feedback message of " TO_ONLINE " order, to indicate the partial model of the online new model of each calculate node.When state table shows institute
When having in calculate node new model partial model be in online state, control node thinks the online success of new model, can will
The type of the order of new model in command table is changed to online (TO_ONLINE) by loading (TO_LOADED), and deletes former mould
The type of type is the order of online (TO_ONLIE).
After the completion of controller inquiry state table finds that the partial model of the new model in all calculate nodes is all online, then
Will in command table about new model " TO_LOADED " order be revised as " TO_ONLINE " order, with indicate new model it is online at
Function.
B. after control node receives the offline order of administrator, controller is by " the TO_ in command table about master mould
ONLINE " order is deleted, with offline master mould.It will no longer include master mould in the subsequent order to each calculate node of control node
Title (ID).For any calculate node, after the message that it is received from control node does not contain the title of master mould, meeting
It is automatic it is offline fall master mould therein partial model.
Next, calculate node is described in detail.
Calculate node mainly includes the partial model an of actuator (executor) and a group model (new, master mould).
The current state of each partial model of calculate node where actuator can collect it, periodically sends the heart to control node
It jumps, to report the state of each partial model in its place calculate node.Actuator is also from it from the received feedback of control node
The order (" TO_LOADED " or " TO_ONLINE ") that control node issues is obtained in message, and corresponding behaviour is executed according to order
Make.
Wherein, for TO_LOADED order, actuator can be attempted to load the corresponding partial model of the order.For any
Partial model, if it in load, state is in load (LOADING);If it is loaded successfully, state is to have loaded
(LOADED);If its load failure, state be load failure (LOAD_FAILED), and terminate subsequent process.
Wherein, for TO_ONLINE order, then actuator attempts the corresponding partial model of the online order.If executing life
The state that the order corresponding partial model is found when enabling is not to have loaded (LOADED) or online (ONLINE), then executes
Device can first go to load the corresponding partial model of the order, when the state of the partial model becomes LOADED, then reattempt online
The partial model.
It is readily appreciated that, service request can only be by a model treatment, in other words, can only be by belonging to the part of the same model
Model interoperability handles service request.For any calculate node, when the partial model and Xin Mo of its master mould
The partial model of type is respectively at stress state and online state, and when the node receives service request, then should
The actuator of node can indicate that the model name in the partial model of online state is arranged in the service request, and according to
Model name in the service request is set, partial model in all nodes is accessed.In other nodes, no matter the service is asked
The corresponding partial model of model name in asking is to be in stress state in online state, each may participate in this
The processing of service request.
For example, the calculate node of certain MPC system is calculate node 1 and calculate node 2.It is set in a certain period, if
The partial model of new model in devise a stratagem operator node 1 is in online state in the partial model of stress state, master mould,
The partial model of new module in calculate node 2 is in stress state in the partial model of online state, master mould.It can
To assume in the period, calculate node 1 receives service request, then the actuator of calculate node 1 can be by the mould of master mould
Type title (such as old) is arranged into the service request, and accesses the partial model of master mould in all calculate nodes, with processing
The service request.It assume that in the period, calculate node 2 receives service request, then the actuator of calculate node 2 can incite somebody to action
The model name (such as new) of new model is arranged into the service request, and accesses the part of new model in all calculate nodes
Model, to handle the service request.
Need to illustrate when, this specification embodiment with " old " is master mould title, " new " is new model title, " TO_
ONLINE " is for online order, " TO_LOADED " be loading command, to model name, online order, loading command progress
It illustrates, does not constitute to model name, online order, the limitation of loading command.Administrator can appointing using agreement
Ideographic characters, phrase, sentence, symbol indicate model name, online order, loading command.
Next, in one embodiment, to include the MPC system of a control node and two calculate nodes, to this
The model loading method for the model iteration scene that specification embodiment provides is illustrated.
In the present embodiment, two calculate nodes are respectively calculate node 1 and calculate node 2, and wherein calculate node 1 belongs to
Mechanism 1, calculate node 2 belong to mechanism 2.The model_id (i.e. model name) of master mould is old, and the model_id of new model is
new.The format that calculate node is sent to the heartbeat message of control node is [" model_id ": " state "].Control node is sent
Format to the feedback message of calculate node is [" operational order ": " model_id "].Unless otherwise specified, it hereinafter mentions
Specific instructions represented by the character of expression operation (online, load etc.) order, and indicate that state (has loaded, is online, having added
Carry medium) character represented by particular state can be with reference to described above.
Refering to Fig. 4, it may be set in for the first moment, the old partial model of each calculate node is deployed online and can mention
For online service.Order (commands) table in the control node at the first moment is as shown in table 3, state (status) table such as table
Shown in 4.
Table 3
Table 4
Refering to Fig. 5, calculate node 1 and calculate node 2 are respectively converged the state of respective partial model by heartbeat message
Control node is offered, heartbeat message particular content is [" old ": " ONLINE "], the i.e. current state of the partial model of old model
For ONLINE.In response to calculate node 1 and the respective heartbeat message of calculate node 2, control node is respectively to calculate node 1 and meter
Operator node 2 sends feedback message, wherein feedback message particular content is [{ " TO_ONLINE ": " old " }], that is, notifies each calculating
The online respective old partial model of node, since online old partial model, calculate node need not repeatedly for each calculate node
Execute online operation.
At the second moment after the first moment, administrator inputs instruction, so that the online model_id of control node
For the new model of new, then control node increases a command record newly into commands table, which is TO_LOADED.This
When, commands table is as shown in table 5.
Table 5
Refering to Fig. 5, controller issues feedback message to each calculate node, wherein feedback message content is [{ " TO_
ONLINE ": " old " }, { " TO_LOADED ": " new " }], that is, it indicates the online old partial model of each calculate node, loads simultaneously
New model partial model.After each calculate node receives the feedback message, load new model partial model operation is executed.Each meter
Operator node distinguishes regular control node and sends heartbeat message, to report respective state, wherein the content of heartbeat message be ["
Old ": " ONLINE " }, { " new ": " LOADING " }], i.e., old partial model is in online state, the localized mode of new model
Type is in stress state.
After control node receives the heartbeat message from calculate node, status table is updated.Updated status table is such as
Shown in table 6.
Table 6
At this point, the state of MPC system can be with as shown in fig. 7, wherein in Fig. 7, at the old partial model of each calculate node
In online state, new partial model is in stress state.
Third moment after the second moment, the state of MPC system are as shown in Figure 9.It is each to calculate section wherein in Fig. 9
The old partial model of point is in online state, and the new partial model of calculate node 1 is in stress state, calculate node 2
New partial model be in load in state.
I.e. at the third moment, calculate node 1 first completes the partial model load operation of new model, i.e. its new model
Partial model enters stress state.And the partial model load operation of new model, i.e. its new has not been completed in calculate node 2
The partial model of model is in state in load.
Refering to Fig. 8, calculate node 1 can by heartbeat message, to control node report its new partial model state and its
The state of old partial model;Wherein, heartbeat message content is [{ " old ": " ONLINE " }, { " new ": " LOADED " }], i.e.,
The current state of new partial model is to have loaded.In response to the heartbeat message, control node sends feedback report to calculate node 1
Text, the content for feeding back message is [{ " old ": " ONLINE " }, { " new ": " LOADED " }], to indicate that calculate node 1 maintains old
The online state of partial model and the stress state of new partial model.
Calculate node 2 can report state and the part its old of its new partial model to control node by heartbeat message
The state of model;Wherein, heartbeat message content is [{ " old ": " ONLINE " }, { " new ": " LOADING " }], i.e. new model
The current state of partial model is in load.In response to the heartbeat message, control node sends feedback message to calculate node 2,
The content for feeding back message is [{ " old ": " ONLINE " }, { " new ": " LOADED " }], to indicate that calculate node 2 maintains old innings
The online state of portion's model and new partial model is made to enter stress state.
After receiving the heartbeat message of calculate node, controller updates status table, first receives calculating in setting
The heartbeat message of node 1, then receive the heartbeat message of calculate node 2, then according to the heartbeat message of the calculate node 2 received
As shown in table 7.
Table 7
And commands table does not change.
The 4th moment after the third moment, the state of MPC system are as shown in figure 11.It is each to calculate wherein in Figure 11
The old partial model of node is in online state, new partial model are in stress state.
Refering to fig. 10, calculate node 1 and calculate node 2 report respective localized mode to control node by heartbeat message
The state of type, the content of heartbeat message are [{ " old ": " ONLINE " }, { " new ": " LOADED " }].
As shown in Figure 10, be when control node only receives the content from calculate node 1 [{ " old ": " ONLINE " }, "
New ": " LOADED " }] heartbeat message, do not receive also the content from calculate node 2 be [{ " old ": " ONLINE " }, "
New ": " LOADED " }] heartbeat message when, control node continues in response to the heartbeat message of calculate node 1 to calculate node 1
Sending content is [{ " old ": " ONLINE " }, { " new ": " LOADED " }].
It is [{ " old ": " ONLINE " }, { " new ": " when control node receives the content from calculate node 2
LOADED " }], control node updates status table according to heartbeat message, and updated status table is as shown in table 8.
Table 8
When the new partial model of calculate node each in status table is in online state, control node is being received
After each heartbeat message, in response to each heartbeat message, the anti-of online new partial model is used to indicate to the transmission of corresponding calculate node
Message is presented, content is [{ " TO_ONLINE ": " new " }, { " TO_LOADED ": " old " }].
The state at the 5th moment after the 4th moment, MPC system is as shown in figure 13.Wherein in Figure 11, section is calculated
The old partial model of point 1 is in online state, new partial model and is in stress state, the old localized mode of calculate node 2
Type is in stress state, new partial model and is in online state.
Refering to fig. 12, control node be in response to the content that calculate node 1 is sent [{ " old ": " ONLINE " }, "
New ": " LOADED " }] heartbeat message, to calculate node 1 send content be [{ " TO_ONLINE ": " new " }, { " TO_
LOADED ": " old " }] feedback message.Control node is [{ " old ": " in response to the content that calculate node 2 is sent
LOADED " }, { " new ": " ONLINE " }] heartbeat message, to calculate node 2 send content be [{ " TO_ONLINE ": "
New " }, { " TO_LOADED ": " old " }] feedback message.
Wherein, [{ " old ": " LOADED " }, { " new's ": " ONLINE " }] that control node is sent according to calculate node 1
It is as shown in table 9 to feed back the updated status table of message.
Table 9
The state at the 6th moment after the 5th moment, MPC system is as shown in figure 15.It is each to calculate wherein in Figure 15
The new partial model of node is in online state, old partial model are in stress state.
At this point, status table is as shown in table 10.
Table 10
At this point, reference table 11, control node can delete the online order of old partial model in commands table, and will
The command type of new partial model is changed to TO_ONLINE.
Table 11
Refering to fig. 14, after the 6th moment, control node sends content [{ " TO_ONLINE ": " to each calculate node
New " }] feedback message, wherein no longer include the order in relation to old partial model.When the feedback message that calculate node receives
In when not including the related command of old partial model, then calculate node can automatic offline old partial model.
The state at the 7th moment after the 6th moment, MPC system is as shown in figure 17.It is each to calculate wherein in Figure 17
The new partial model of node is in online state, old partial model are in stress state.
Refering to fig. 16, each calculate node sends the heartbeat message that content is [{ " new ": " ONLINE " }] to control node.
The information of old partial model is not included in heartbeat message, controller deletes the correlated condition of old partial model, to update
Status table, updated status are as shown in table 12.
Table 12
Commands table is as shown in table 13.
Table 13
So far, each calculate node is completed that new partial model is online, and old partial model is offline, entire MPC system portion
Administration when new model online service, complete model iteration.
In this embodiment, it when the partial model of new model in each calculate node is in stress state, just indicates
The partial model of each online new model of calculate node;After the partial model of new model in each calculate node completes online, under
The partial model of line master mould reduces model so that completion new model is online as early as possible in the case where not stopping master mould service
Iteration to MPC system can externally service time influence.
For synthesis, this specification embodiment provides a kind of model loading method based on multi-party computations, application
In control node, the control node is for controlling multiple calculate nodes, each calculate node difference in the multiple calculate node
Second partial model of first partial model and master mould with new model, the first partial model group of each calculate node
At complete new model, the local model group of the second of each calculate node is at complete master mould;Wherein, the control node
Maintenance has command table and state record table, and the command table is used for record cast operational order, and the state record table is for remembering
Record the model state in each calculate node.Refering to fig. 18, which comprises step 1800, when detecting the life
When enabling in table the online order of master mould and new model loading command, in response to arbitrary calculate node in the multiple calculate node
The first heartbeat message, to the calculate node send first feedback message;Wherein, the first heartbeat message indicates in the calculate node
Second partial model is in online state, the first feedback message instruction load first partial model, and maintains the second localized mode
Type is online;Step 1802, the third heartbeat message in response to arbitrary calculate node, are updated to third for the state record table
State, and send third to the calculate node and feed back message;Wherein, third heartbeat message indicates first partial in the calculate node
Model is in stress state, and first partial model, which is in, in the third state instruction each calculate node has loaded shape
State, third feeds back message and indicates online first partial model, and the second partial model is made to enter stress state;Step 1804,
In response to the 5th heartbeat message of arbitrary calculate node, the state record table is updated to the 5th state, and to the calculating
Node sends the 5th feedback message;Wherein, the 5th heartbeat message indicates that first partial model is in the calculate node
Online state, first partial model is in online state in each calculate node described in the 5th state instruction, and described
Five feedback messages indicate online first partial model, and offline second partial model.
In some embodiments, the method also includes: it is described to the calculate node send third feedback message before,
In response to the second heartbeat message of the calculate node, the state record table is updated to the second state, and to the calculate node
Send the second feedback message, wherein the second heartbeat message indicates that the first partial model of the calculate node is in stress state
Or the state in load;First partial at least one calculate node in the multiple calculate node of second state instruction
Model is not in stress state, the second feedback message instruction load first partial model, and maintains the second partial model
It is online.
In some embodiments, the method also includes, it is described to the calculate node send the 5th feedback message before,
In response to the 4th heartbeat message of the calculate node, the state record table is updated to the 4th state, and to the calculate node
Send the 4th feedback message, wherein the 4th heartbeat message indicates that first partial model is in online state in the calculate node
Or in stress state;First partial at least one calculate node in the multiple calculate node of 4th state instruction
Model is not in online state, and the 4th feedback message indicates online first partial model, and make the second partial model into
Enter stress state.
In some embodiments, the partial model in the partial model of online state and in stress state
Participate in processing service request.
In some embodiments, the 5th feedback message only includes the order of online new model, does not include master mould
Information.
In some embodiments, after sending the 5th feedback message to the calculate node, further includes: delete the order
The online order of master mould in table, and new model loading command in the command table is revised as the online order of new model.
In some embodiments, the method also includes, it is described to the calculate node send the 5th feedback message after,
Receive the 6th heartbeat message of each calculate node;
When the 6th heartbeat message of each calculate node does not include the state of the second partial model, by the shape
State record sheet is updated to the 6th state, wherein the state record table in the 6th state does not include the second partial model
State.
Embodiment of the method shown in Figure 18 specifically can refering to the introduction above to embodiment shown in Fig. 4-Figure 17,
This is repeated no more.
In this specification embodiment, when the partial model of new model in each calculate node is in stress state,
Just indicate the partial model of the online new model of each calculate node;When the partial model completion of new model in each calculate node is online
Afterwards, the partial model of the offline master mould of, so that completion new model is online as early as possible in the case where not stopping master mould service,
Reduce influence of the model iteration to MPC system serviceable time.
In addition, this specification embodiment additionally provides a kind of model loading method based on multi-party computations, it is applied to
First calculate node, first calculate node are any node in multiple calculate nodes of control node control;It is described more
Each calculate node is respectively provided with first partial model and the second partial model in a calculate node;Wherein, each calculate node
First partial model form complete new model, the local model group of the second of each calculate node is at complete master mould;
Refering to fig. 19, which comprises step 1900 sends the first heartbeat message to control node, the first heartbeat message instruction the
The second partial model is in online state in one calculate node;Step 1902, according to it is received from control node, in response to the
The instruction of first feedback message of one heartbeat message, loads first partial model, and maintain the second partial model online;Step
1904, when the first partial model of the first calculate node is in stress state, third heartbeat message is sent to control node,
Third heartbeat message indicates that first partial model is in stress state in the first calculate node;Step 1906, according to from control
The instruction of the received third feedback message of node, online first partial model, and the second partial model is made to enter stress state;
Wherein, third feedback message is control node in response to third heartbeat message, and the first game in judging each calculate node
Portion's model is in the message sent when stress state;Step 1908 is in the first partial model of the first calculate node
When online state, the 5th heartbeat message is sent to control node, the 5th heartbeat message indicates the first game of the first calculate node
Portion's model is in online state;Step 1910 indicates, offline second part according to from the received 5th feedback message of control node
Model, and maintain first partial model online;Wherein, the 5th feedback message is control node in response to the 5th heartbeat report
Text, and the message that when first partial model is in online state in judging each calculate node sends.
Embodiment of the method shown in Figure 18 specifically can be refering to above to embodiment shown in Fig. 4-Figure 17 and Figure 18 institute
The introduction for the embodiment of the method stated, details are not described herein.
In this specification embodiment, when the partial model of new model in each calculate node is in stress state,
Just indicate the partial model of the online new model of each calculate node;When the partial model completion of new model in each calculate node is online
Afterwards, the partial model of the offline master mould of, so that completion new model is online as early as possible in the case where not stopping master mould service,
Reduce model iteration to MPC system can externally service time influence.
This specification embodiment provides a kind of model eedle threader 20 based on multi-party computations, is set to control section
Point, the control node is for controlling multiple calculate nodes, and each calculate node is respectively provided with new mould in the multiple calculate node
The first partial model composition of the first partial model of type and the second partial model of master mould, each calculate node is complete
New model, the local model group of the second of each calculate node is at complete master mould;Wherein, the control node maintenance has life
Table and state record table are enabled, the command table is used for record cast operational order, and the state record table is described each for recording
Model state in a calculate node;Refering to Figure 20, described device 20 includes:
Transmission unit 2010 is configured to detect the online order of master mould and new model loading command in the command table
When, in response to the first heartbeat message of calculate node arbitrary in the multiple calculate node, first is sent to the calculate node
Feed back message;Wherein, the first heartbeat message indicates that the second partial model is in online state, the first feedback in the calculate node
Message instruction load first partial model, and maintain the second partial model online;
The transmission unit 2010 is additionally configured to, in response to the third heartbeat message of arbitrary calculate node, by the shape
State record sheet is updated to the third state, and sends third to the calculate node and feed back message;Wherein, third heartbeat message instruction should
First partial model is in stress state in calculate node, and the third state indicates first partial in each calculate node
Model is in stress state, and third feeds back message and indicates online first partial model, and enters the second partial model
Stress state;
The transmission unit 2010 is additionally configured to, in response to the 5th heartbeat message of arbitrary calculate node, by the shape
State record sheet is updated to the 5th state, and sends the 5th feedback message to the calculate node;Wherein, the 5th heartbeat message refers to
Show in the calculate node that first partial model is in online state, first in each calculate node described in the 5th state instruction
Partial model is in online state, and the 5th feedback message indicates online first partial model, and offline second part
Model.
In some embodiments, the transmission unit 2010 is additionally configured to, described anti-to calculate node transmission third
Before presenting message, in response to the second heartbeat message of the calculate node, the state record table is updated to the second state, and to
The calculate node sends the second feedback message, wherein the second heartbeat message indicates that the first partial model of the calculate node is in
Stress state or the state in load;At least one calculate node in the multiple calculate node of second state instruction
Middle first partial model is not in stress state, the second feedback message instruction load first partial model, and maintains the
Two partial models are online.
In some embodiments, the transmission unit 2010 is additionally configured to, and sends the 5th instead to the calculate node described
Before presenting message, in response to the 4th heartbeat message of the calculate node, the state record table is updated to the 4th state, and to
The calculate node sends the 4th feedback message, wherein the 4th heartbeat message indicates that first partial model is in the calculate node
Online state or in stress state;At least one calculate node in the multiple calculate node of 4th state instruction
Middle first partial model is not in online state, and the 4th feedback message indicates online first partial model, and makes second
Partial model enters stress state.
In some embodiments, the partial model in the model of online state and in stress state each may participate in
Handle service request.
In some embodiments, the 5th feedback message only includes the order of online new model, does not include master mould
Information.
In some embodiments, described device 20 further includes deleting unit 2020, is configured to send out to the first calculate node
After sending the 5th feedback message, the online order of master mould in the command table is deleted, and new model in the command table is loaded
Order is revised as the online order of new model.
In some embodiments, described device further includes receiving unit 2030, is configured to send out described to the calculate node
After sending the 5th feedback message, the 6th heartbeat message of each calculate node is received;
The transmission unit 2010 is additionally configured to, when the 6th heartbeat message of each calculate node does not include second
When the state of partial model, the state record table is updated to the 6th state, wherein the state note in the 6th state
Record table does not include the state of the second partial model.
Each functional unit of device 20 can realize that details are not described herein again with reference to embodiment of the method shown in Figure 18.
In this specification embodiment, when the partial model of new model in each calculate node is in stress state,
Just indicate the partial model of the online new model of each calculate node;When the partial model completion of new model in each calculate node is online
Afterwards, the partial model of the offline master mould of, so that completion new model is online as early as possible in the case where not stopping master mould service,
Reduce model iteration to MPC system can externally service time influence.
This specification embodiment provides a kind of model eedle threader 21 based on multi-party computations, is set to the first meter
Operator node, first calculate node are any node in multiple calculate nodes of control node control;The multiple calculating
Each calculate node is respectively provided with first partial model and the second partial model in node;Wherein, the first of each calculate node
Partial model forms complete new model, and the local model group of the second of each calculate node is at complete master mould;The dress
Setting 21 includes: transmission unit 2110, loading unit 2120, online unit 2130, offline unit 2140;
Single 2110 yuan of the transmission are configured to, and send the first heartbeat message to control node, the first heartbeat message instruction the
The second partial model is in online state in one calculate node;
The loading unit 2120 is configured to, according to it is received from control node, in response to the first heartbeat message first
The instruction of message is fed back, loads first partial model, and maintain the second partial model online;
The transmission unit 2110 is additionally configured to, and is in stress state in the first partial model of the first calculate node
When, third heartbeat message is sent to control node, third heartbeat message indicates that first partial model is in the first calculate node
Stress state;
The online unit 2130 is configured to, according to the instruction from control node received third feedback message, online the
One partial model, and the second model is made to enter stress state;Wherein, third feedback message is control node in response to the third heart
Jump message, and the message that when first partial model is in stress state in judging each calculate node sends;
The transmission unit 2110 is additionally configured to, and is in online state in the first partial model of the first calculate node
When, the 5th heartbeat message is sent to control node, the 5th heartbeat message indicates that the first partial model of the first calculate node is in
Online state;
The offline unit 2140 is configured to, and is indicated according to from the received 5th feedback message of control node, offline second
Partial model, and maintain first partial model online;Wherein, the 5th feedback message is control node in response to the 5th heartbeat
Message, and the message that when first partial model is in online state in judging each calculate node sends.
In this specification embodiment, when the partial model of new model in each calculate node is in stress state,
Just indicate the partial model of the online new model of each calculate node;When the partial model completion of new model in each calculate node is online
Afterwards, the partial model of the offline master mould of, so that completion new model is online as early as possible in the case where not stopping master mould service,
Reduce model iteration to MPC system can externally service time influence.
On the other hand, the embodiment of this specification provides a kind of computer readable storage medium, is stored thereon with calculating
Machine program enables computer execute method shown in Figure 18 or Figure 19 when the computer program executes in a computer.
On the other hand, the embodiment of this specification provides a kind of computing terminal, including memory and processor, described to deposit
It is stored with executable code in reservoir, when the processor executes the executable code, realizes side shown in Figure 18 or Figure 19
Method.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
Those of ordinary skill in the art should further appreciate that, describe in conjunction with the embodiments described herein
Each exemplary unit and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clear
Illustrate to Chu the interchangeability of hardware and software, generally describes each exemplary group according to function in the above description
At and step.These functions hold track actually with hardware or software mode, depending on technical solution specific application and set
Count constraint condition.Those of ordinary skill in the art can realize each specific application using distinct methods described
Function, but this realization is it is not considered that exceed scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can hold track with hardware, processor
Software module or the combination of the two implement.Software module can be placed in random access memory (RAM), memory, read-only storage
Device (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology neck
In any other form of storage medium well known in domain.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include
Within protection scope of the present invention.