Method for controlling transit of yarn spindle, electronic device and storage medium
A method for controlling transit of a yarn spindle, and apparatuses are provided, relating to the field of computer and automatic control. The method includes: taking each second controller as a target controller, and receiving target business data sent by the target controller; sending the target business data to the manufacturing execution system, where the manufacturing execution system is configured to obtain a target transit indication based on the target business data, and send the target transit indication to the first controller; receiving the target transit indication sent by the manufacturing execution system; and sending the target transit indication to the target controller in a case of a communication link from the first controller to the target controller is in a normal state; where the target controller is configured to carry on the transit control operation for the yarn spindle product transiting the target workstation.
1 . A method for controlling transit of yarn spindles, applied to a first controller comprised in a system for controlling the transit of the yarn spindles, the system for controlling the transit of the yarn spindles further comprises a manufacturing execution system in communication with the first controller and a plurality of second controllers; and
the method comprises:
determining each of the plurality of second controllers as a target controller, wherein the target controller is configured to carry on a transit control operation for a yarn spindle of the yarn spindles transiting a target workstation corresponding to the target controller based on a target transit indication;
receiving target business data sent by the target controller;
sending the target business data to the manufacturing execution system; wherein the manufacturing execution system is configured to obtain the target transit indication based on the target business data, and send the target transit indication to the first controller;
receiving the target transit indication sent by the manufacturing execution system;
determining that a communication link from the first controller to the target controller is in a normal state, by: updating, generating, and executing in a case where the first controller receives a heartbeat response data packet feedback from the target controller through the communication link from the first controller to the target controller,
wherein the updating is of a history heartbeat count value to obtain a current heartbeat count value;
wherein the generating is of a heartbeat data packet including the current heartbeat count value;
wherein the executing is of a heartbeat data sending instruction, wherein the communication link from the first controller to the target controller comprises a plurality of candidate links, and the heartbeat data sending instruction is used to instruct the first controller to respectively send the heartbeat data packet to the target controller through the plurality of candidate links; and
sending the target transit indication to the target controller by selecting through a target link:
wherein the selecting is of a candidate link with a best communication state, from at least one candidate link of the plurality of candidate links, as the target link.
2 . The method of claim 1 , wherein the selecting of the candidate link with the best communication state from the at least one candidate link of the plurality of candidate links, as the target link, comprises:
determining a plurality of evaluation indicators;
obtaining a plurality of target weights corresponding one-to-one with the plurality of evaluation indicators; and
selecting the candidate link with the best communication state from the at least one candidate link of the plurality of candidate links as the target link, based on the plurality of evaluation indicators and the plurality of target weights.
3 . The method of claim 2 , wherein the obtaining of the plurality of target weights corresponding one-to-one with the plurality of evaluation indicators comprises:
obtaining a plurality of reference weights corresponding one-to-one with the plurality of evaluation indicators; and
adjusting the plurality of reference weights respectively based on the target business data, to obtain the plurality of target weights corresponding one-to-one with the plurality of evaluation indicators.
4 . An electronic device, comprised in a system for controlling transit of yarn spindles, the system for controlling the transit of the yarn spindles further comprises a manufacturing execution system in communication with the electronic device and a plurality of controllers;
wherein the electronic device comprises:
at least one processor; and
a memory connected in communication with the at least one processor,
wherein the memory stores an instruction executable by the at least one processor, and the instruction, when executed by the at least one processor, enables the at least one processor to execute:
determining each of the plurality of controllers as a target controller, wherein the target controller is configured to carry on a transit control operation for a yarn spindle of the yarn spindles transiting a target workstation corresponding to the target controller based on a target transit indication;
receiving target business data sent by the target controller;
sending the target business data to the manufacturing execution system; wherein the manufacturing execution system is configured to obtain the target transit indication based on the target business data, and send the target transit indication to the electronic device;
receiving the target transit indication sent by the manufacturing execution system;
determining that a communication link from the electronic device to the target controller is in a normal state, by: updating, generating, and executing in a case where the first controller receives a heartbeat response data packet feedback from the target controller through the communication link from the first controller to the target controller,
wherein the updating is of a history heartbeat count value to obtain a current heartbeat count value;
wherein the generating is of a heartbeat data packet including the current heartbeat count value;
wherein the executing is of a heartbeat data sending instruction, wherein the communication link from the electronic device to the target controller comprises a plurality of candidate links, and the heartbeat data sending instruction is used to instruct the electronic device to respectively send the heartbeat data packet to the target controller through the plurality of candidate links; and
sending the target transit indication to the target controller by selecting through a target link:
wherein the selecting is of a candidate link with a best communication state, from at least one candidate link of the plurality of candidate links, as the target link.
5 . The electronic device of claim 3 , wherein the instruction, when executed by the at least one processor, enables the at least one processor to execute the selecting of the candidate link with the best communication state from the at least one candidate link of the plurality of candidate links, as the target link, by:
determining a plurality of evaluation indicators;
obtaining a plurality of target weights corresponding one-to-one with the plurality of evaluation indicators; and
selecting the candidate link with the best communication state from the at least one candidate link of the plurality of candidate links as the target link based on the plurality of evaluation indicators and the plurality of target weights.
6 . The electronic device of claim 5 , wherein the obtaining of the plurality of target weights corresponding one-to-one with the plurality of evaluation indicators comprises:
obtaining a plurality of reference weights corresponding one-to-one with the plurality of evaluation indicators; and
adjusting the plurality of reference weights respectively based on the target business data, to obtain the plurality of target weights corresponding one-to-one with the plurality of evaluation indicators.
7 . A non-transitory computer-readable storage medium storing a computer instruction thereon, applied to a first controller comprised in a system for controlling transit of yarn spindles, the system for controlling the transit of the yarn spindles further comprises a manufacturing execution system in communication with the first controller and a plurality of second controllers;
wherein the computer instruction is used to cause a computer to execute:
determining each of the plurality of second controllers as a target controller, wherein the target controller is configured to carry on a transit control operation for a yarn spindle of the yarn spindles transiting a target workstation corresponding to the target controller based on a target transit indication;
receiving target business data sent by the target controller;
sending the target business data to the manufacturing execution system; wherein the manufacturing execution system is configured to obtain the target transit indication based on the target business data, and send the target transit indication to the first controller;
receiving the target transit indication sent by the manufacturing execution system;
determining that a communication link from the first controller to the target controller is in a normal state, by: updating, generating, and executing in a case where the first controller receives a heartbeat response data packet feedback from the target controller through the communication link from the first controller to the target controller,
wherein the updating is of a history heartbeat count value to obtain a current heartbeat count value;
wherein the generating is of a heartbeat data packet including the current heartbeat count value;
wherein the executing is of a heartbeat data sending instruction, wherein the communication link from the first controller to the target controller comprises a plurality of candidate links, and the heartbeat data sending instruction is used to instruct the first controller to respectively send the heartbeat data packet to the target controller through the plurality of candidate links; and
determining that the communication link from the first controller to the target controller is in the normal state, in a case where the first controller receives a heartbeat response data packet feedback from the target controller through the communication link from the first controller to the target controller; and
sending the target transit indication to the target controller by selecting through a target link:
wherein the selecting is of a candidate link with a best communication state, from at least one candidate link of the plurality of candidate links, as the target link.
8 . The non-transitory computer-readable storage medium of claim 7 , wherein the computer instruction is used to cause the computer to execute the selecting of the candidate link with the best communication state from the at least one candidate link of the plurality of candidate links, as the target link, by:
determining a plurality of evaluation indicators;
obtaining a plurality of target weights corresponding one-to-one with the plurality of evaluation indicators; and
selecting the candidate link with the best communication state from the at least one candidate link of the plurality of candidate links as the target link, based on the plurality of evaluation indicators and the plurality of target weights.
9 . The non-transitory computer-readable storage medium of claim 8 , wherein the obtaining of the plurality of target weights corresponding one-to-one with the plurality of evaluation indicators comprises:
obtaining a plurality of reference weights corresponding one-to-one with the plurality of evaluation indicators; and
adjusting the plurality of reference weights respectively based on the target business data, to obtain the plurality of target weights corresponding one-to-one with the plurality of evaluation indicators.