CN112199319B - Method and equipment for double-control data interaction control - Google Patents

Method and equipment for double-control data interaction control Download PDF

Info

Publication number
CN112199319B
CN112199319B CN202011108600.1A CN202011108600A CN112199319B CN 112199319 B CN112199319 B CN 112199319B CN 202011108600 A CN202011108600 A CN 202011108600A CN 112199319 B CN112199319 B CN 112199319B
Authority
CN
China
Prior art keywords
controller
slave controller
slave
class data
control instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011108600.1A
Other languages
Chinese (zh)
Other versions
CN112199319A (en
Inventor
刘涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202011108600.1A priority Critical patent/CN112199319B/en
Publication of CN112199319A publication Critical patent/CN112199319A/en
Application granted granted Critical
Publication of CN112199319B publication Critical patent/CN112199319B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • 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/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3877Concurrent instruction execution, e.g. pipeline or look ahead using a slave processor, e.g. coprocessor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a device for double-control data interaction control, wherein the method comprises the following steps: the method comprises the steps that an external command is simultaneously sent to a master controller and a slave controller, and whether a control instruction executed by the slave controller exists in the external command received by the master controller is detected; in response to the fact that the external command received by the master controller contains the control instruction executed by the slave controller, the control instruction executed by the slave controller is sent to the slave controller to enable the slave controller to execute; detecting whether a control instruction executed by the main controller exists in an external command received by the slave controller; in response to the fact that the control instruction executed by the main controller exists in the external command received by the slave controller, the control instruction executed by the main controller is obtained and sent to the main controller so as to enable the main controller to execute the control instruction. The scheme of the invention can thoroughly solve the problem of long synchronization time period of the control command, has small difficulty and high stability of the realization method and improves the stability of the service product.

Description

Method and equipment for double-control data interaction control
Technical Field
The field relates to the field of computers, and more particularly to a method and apparatus for dual-control data interaction control.
Background
In a server product, two controllers are set in a management platform of the server product for the stability of the server product, and data real-time synchronization is required. However, during the data synchronization process, the data thereof needs to be classified. The command data needs to be synchronized in time, and the status data can be synchronized later than the command data. And the two controllers carry out command-class data synchronization and state-class data synchronization through the same link.
In the process of using the server, once resource sharing failure occurs, the server is unacceptable for the product of the server, because in the industry of the server, the server product has the requirements of not going down and not losing data, which also means that the server product has extremely high requirements on stability.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method and a device for dual-control data interaction control, which can thoroughly solve the problem of long synchronization time period of control commands, and can simultaneously backup acquired data to an opposite controller, so that the implementation difficulty is low, the stability of a service product is high, and the labor cost and the material cost of the product caused by the problems are reduced.
In view of the above, an aspect of the embodiments of the present invention provides a method for controlling dual-control data interaction, including the following steps:
the method comprises the steps that an external command is simultaneously sent to a master controller and a slave controller, and whether a control instruction executed by the slave controller exists in the external command received by the master controller is detected;
in response to the fact that the external command received by the master controller contains the control instruction executed by the slave controller, the control instruction executed by the slave controller is sent to the slave controller to enable the slave controller to execute;
detecting whether a control instruction executed by the main controller exists in an external command received by the slave controller;
in response to the fact that the control instruction executed by the main controller exists in the external command received by the slave controller, the control instruction executed by the main controller is obtained and sent to the main controller so as to enable the main controller to execute the control instruction.
According to an embodiment of the present invention, further comprising:
packing the state class data in the master controller and the state class data in the slave controller at intervals of threshold time;
sending the packed state class data of the master controller to the slave controllers;
in response to receiving the packaged status class data from the slave, the packaged status class data of the slave is returned to the master.
According to one embodiment of the present invention, transmitting the master controller's packetized status class data to the slave controller and/or returning the slave controller's packetized status class data to the master controller further comprises:
acquiring the size of the packed state class data and comparing the size with the threshold value;
and in response to the size of the packed state class data being larger than the threshold size, splitting the packed state class data into a plurality of data packets by taking the threshold size as a unit and separately sending the data packets.
According to an embodiment of the present invention, further comprising:
comparing the state class data of the master controller and the slave controller at intervals of a specific threshold value;
and responding to the inconsistency of the state class data of the master controller and the slave controller, and sending an alarm to a manager.
According to one embodiment of the present invention, transmitting a control instruction executed by the slave controller into the slave controller to cause the slave controller to execute includes:
the control instructions executed by the slave controller are transmitted to the slave controller via an IPMB (intelligent platform management bus) protocol.
In another aspect of the embodiments of the present invention, there is also provided a dual-control data interaction control device, including:
the first detection module is configured to send the external command to the master controller and the slave controller at the same time, and detect whether a control instruction executed by the slave controller exists in the external command received by the master controller;
the sending module is configured to respond to the control instruction executed by the slave controller in the external command received by the master controller, and send the control instruction executed by the slave controller to the slave controller so as to enable the slave controller to execute the control instruction;
the second detection module is configured to detect whether a control instruction executed by the main controller exists in the external command received from the controller;
and the acquisition module is configured to respond to the control instruction executed by the main controller in the external command received from the controller, acquire the control instruction executed by the main controller and send the acquired instruction to the main controller so as to enable the main controller to execute the control instruction.
According to an embodiment of the invention, the system further comprises a sorting module configured to:
packing the state class data in the master controller and the state class data in the slave controller at intervals of threshold time;
sending the packed state class data of the master controller to the slave controllers;
in response to receiving the packaged status class data from the slave, the packaged status class data of the slave is returned to the master.
According to an embodiment of the present invention, the apparatus further comprises a comparison module configured to:
acquiring the size of the packed state class data and comparing the size with the threshold value;
and in response to the size of the packed state class data being larger than the threshold size, splitting the packed state class data into a plurality of data packets by taking the threshold size as a unit and separately sending the data packets.
According to an embodiment of the present invention, the apparatus further comprises a comparison module configured to:
comparing the state class data of the master controller and the slave controller at intervals of a specific threshold value;
and responding to the inconsistency of the state class data of the master controller and the slave controller, and sending an alarm to a manager.
According to one embodiment of the present invention, transmitting a control instruction executed by the slave controller into the slave controller to cause the slave controller to execute includes:
the control instructions executed by the slave controller are transmitted to the slave controller via the IPMB protocol.
The invention has the following beneficial technical effects: according to the double-control data interaction control method provided by the embodiment of the invention, the external command is simultaneously sent to the master controller and the slave controller, and whether the control instruction executed by the slave controller exists in the external command received by the master controller is detected; in response to the fact that the external command received by the master controller contains the control instruction executed by the slave controller, the control instruction executed by the slave controller is sent to the slave controller to enable the slave controller to execute; detecting whether a control instruction executed by the main controller exists in an external command received by the slave controller; the technical scheme that the control instruction executed by the main controller exists in the external command received by the slave controller, the control instruction executed by the main controller is obtained, and the obtained instruction is sent to the main controller to be executed by the main controller is achieved, the problem that the control instruction synchronization time period is long can be thoroughly solved, the obtained data can be simultaneously backed up to the opposite end controller, the implementation method is small in difficulty and high in stability, the stability of service products is improved, and the labor cost and the material cost caused by the problem of the products are reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a method of bi-directional data interaction control in accordance with one embodiment of the present invention;
fig. 2 is a schematic diagram of a dual-control data interaction controlled device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
In view of the above-mentioned objectives, a first aspect of the embodiments of the present invention proposes an embodiment of a method for dual-control data interaction control. Fig. 1 shows a schematic flow diagram of the method.
As shown in fig. 1, the method may include the steps of:
s1, sending an external command to a master controller and a slave controller at the same time, detecting whether a control instruction executed by the slave controller exists in the external command received by the master controller, wherein the master controller and the slave controller can both receive the external control command, but the slave controller can only receive the control command sent by the master controller to execute, detecting whether the control instruction exists in the master controller every time of a threshold value, the control instruction is divided into the control instruction executed by the master controller and the control instruction executed by the slave controller, if the control instruction executed by the slave controller exists, the slave controller sent by the control instruction is executed, and if the control instruction executed by the master controller is executed, the control instruction is directly executed;
s2, responding to the control command executed by the slave controller in the external command received by the master controller, sending the control command executed by the slave controller to enable the slave controller to execute;
s3, detecting whether the external command received by the slave controller has the control command executed by the master controller, and detecting whether the external command received by the slave controller contains the control command executed by the master controller and the control command executed by the slave controller, if yes, returning the control command from the slave controller to the master controller, then judging whether the returned control command is the control command executed by the master controller or the control command executed by the slave controller, if yes, judging whether the control command has been executed, if not, executing, if yes, deleting, if yes, judging whether the control command has been sent to the slave controller by the slave controller, if not, deleting, sending the control command to the slave controller to execute, thus, the situation that the master controller or the slave controller does not receive an external control command can be avoided;
s4, in response to the presence of a control instruction executed by the main controller among the external commands received from the controller, acquires the control instruction executed by the main controller and sends the acquired instruction to the main controller to cause the main controller to execute.
By the technical scheme, the problem of long synchronization time period of control commands can be thoroughly solved, the acquired data can be simultaneously backed up to the opposite-end controller, the implementation method is low in difficulty and high in stability, the stability of service products is improved, and the labor cost and the material cost of the products caused by the problems are reduced.
In a preferred embodiment of the present invention, the method further comprises:
packing the state class data in the master controller and the state class data in the slave controller at intervals of threshold time;
sending the packed state class data of the master controller to the slave controllers;
in response to receiving the packaged status class data from the slave, the packaged status class data of the slave is returned to the master. In order to avoid network congestion caused by sending the state data, the sending threshold time needs to be set, the state data is sent once every threshold time, and the control instructions are sent in the rest time.
In a preferred embodiment of the present invention, the transmitting and/or returning the packed status class data of the master controller to and/or from the slave controller to the master controller further comprises:
acquiring the size of the packed state class data and comparing the size with the threshold value;
and in response to the size of the packed state class data being larger than the threshold size, splitting the packed state class data into a plurality of data packets by taking the threshold size as a unit and separately sending the data packets. If the data volume is too large, the sending time is too long, the maximum threshold size allowed to be sent needs to be set according to actual conditions, each packet of data is compared with the threshold size, if the data volume is smaller than the threshold size, the packet of data is sent normally, if the data volume is larger than the threshold size, the packet of data is split into a plurality of packets of threshold sizes, one packet of data is sent, and the rest of packets of data are added into a sending queue to wait for the next threshold time to be sent.
In a preferred embodiment of the present invention, the method further comprises:
comparing the state class data of the master controller and the slave controller at intervals of a specific threshold value;
and responding to the inconsistency of the state class data of the master controller and the slave controller, and sending an alarm to a manager.
In a preferred embodiment of the present invention, transmitting the control instruction executed by the slave controller to cause the slave controller to execute includes:
the control instructions executed by the slave controller are transmitted to the slave controller via the IPMB protocol. The IPMB protocol carries out data transmission, and the master controller is defined as a master device of the IPMB protocol, the slave controller is defined as a slave device, data of the slave device cannot be sent to the master device actively, and data of the master device can be sent to the slave device actively.
The command received by the master controller is actively sent to the slave controller through the IPMB protocol, and the slave controller receives the command of the master controller and executes the command.
By the technical scheme, the problem of long synchronization time period of control commands can be thoroughly solved, the acquired data can be simultaneously backed up to the opposite-end controller, the implementation method is low in difficulty and high in stability, the stability of service products is improved, and the labor cost and the material cost of the products caused by the problems are reduced.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the above-described functions defined in the method disclosed in the embodiments of the present invention.
In view of the above object, according to a second aspect of the embodiments of the present invention, there is provided a dual-control data interaction control device, as shown in fig. 2, a device 200 includes:
the first detection module is configured to send the external command to the master controller and the slave controller at the same time, and detect whether a control instruction executed by the slave controller exists in the external command received by the master controller;
the sending module is configured to respond to the control instruction executed by the slave controller in the external command received by the master controller, and send the control instruction executed by the slave controller to the slave controller so as to enable the slave controller to execute the control instruction;
the second detection module is configured to detect whether a control instruction executed by the main controller exists in the external command received from the controller;
and the acquisition module is configured to respond to the control instruction executed by the main controller in the external command received from the controller, acquire the control instruction executed by the main controller and send the acquired instruction to the main controller so as to enable the main controller to execute the control instruction.
In a preferred embodiment of the present invention, the apparatus further comprises a sorting module configured to:
packing the state class data in the master controller and the state class data in the slave controller at intervals of threshold time;
sending the packed state class data of the master controller to the slave controllers;
in response to receiving the packaged status class data from the slave, the packaged status class data of the slave is returned to the master.
In a preferred embodiment of the present invention, the apparatus further comprises a comparison module configured to:
acquiring the size of the packed state class data and comparing the size with the threshold value;
and in response to the size of the packed state class data being larger than the threshold size, splitting the packed state class data into a plurality of data packets by taking the threshold size as a unit and separately sending the data packets.
In a preferred embodiment of the present invention, the apparatus further comprises a comparison module configured to:
comparing the state class data of the master controller and the slave controller at intervals of a specific threshold value;
and responding to the inconsistency of the state class data of the master controller and the slave controller, and sending an alarm to a manager.
In a preferred embodiment of the present invention, transmitting the control instruction executed by the slave controller to cause the slave controller to execute includes:
the control instructions executed by the slave controller are transmitted to the slave controller via the IPMB protocol.
The embodiments described above, particularly any "preferred" embodiments, are possible examples of implementations and are presented merely to clearly understand the principles of the invention. Many variations and modifications may be made to the above-described embodiments without departing from the spirit and principles of the technology described herein. All such modifications are intended to be included within the scope of this disclosure and protected by the following claims.

Claims (10)

1. A method for double-control data interaction control is characterized by comprising the following steps:
the method comprises the steps that an external command is simultaneously sent to a master controller and a slave controller, and whether a control instruction executed by the slave controller exists in the external command received by the master controller is detected;
in response to the fact that the control instruction executed by the slave controller exists in the external command received by the master controller, the control instruction executed by the slave controller is sent to the slave controller to enable the slave controller to execute;
detecting whether a control instruction executed by the main controller exists in an external command received by the slave controller;
responding to the control instruction executed by the main controller in the external command received by the slave controller, acquiring the control instruction executed by the main controller and sending the acquired instruction to the main controller to enable the main controller to execute.
2. The method of claim 1, further comprising:
packing the state class data in the master controller and the state class data in the slave controller at intervals of threshold time;
transmitting the packed state class data of the master controller to the slave controller;
in response to receiving the packaged status class data from the slave controller, returning the packaged status class data of the slave controller to the master controller.
3. The method of claim 2, wherein sending and/or returning the packed status class data of the master controller to the slave controller further comprises:
acquiring the size of the packed state class data and comparing the size with the threshold value;
in response to the size of the packed state class data being larger than the threshold size, the packed state class data is split into a plurality of data packets and sent separately by taking the threshold size as a unit.
4. The method of claim 1, further comprising:
comparing the state class data of the master controller and the slave controller at intervals of a specific threshold value;
and responding to the inconsistency of the state class data of the master controller and the slave controller, and sending an alarm to a manager.
5. The method of claim 1, wherein sending control instructions executed by the slave controller into the slave controller to cause the slave controller to execute comprises:
and sending the control instruction executed by the slave controller to the slave controller via the IPMB protocol.
6. An apparatus for bi-directional data interaction control, the apparatus comprising:
the first detection module is configured to send an external command to a master controller and a slave controller at the same time, and detect whether a control instruction executed by the slave controller exists in the external command received by the master controller;
a sending module configured to send a control instruction executed by the slave controller to cause the slave controller to execute in response to the control instruction executed by the slave controller existing in the external command received by the master controller;
the second detection module is configured to detect whether a control instruction executed by the master controller exists in the external command received by the slave controller;
an obtaining module, configured to, in response to a control instruction executed by the master controller existing in an external command received by the slave controller, obtain the control instruction executed by the master controller and send the obtained instruction to the master controller to be executed by the master controller.
7. The apparatus of claim 6, further comprising a collation module configured to:
packing the state class data in the master controller and the state class data in the slave controller at intervals of threshold time;
sending the packed state class data of the master controller to the slave controllers;
in response to receiving the packaged status class data from the slave controller, returning the packaged status class data of the slave controller to the master controller.
8. The device of claim 7, further comprising a comparison module configured to:
acquiring the size of the packed state class data and comparing the size with the threshold value;
in response to the size of the packed state class data being larger than the threshold size, the packed state class data is split into a plurality of data packets and sent separately by taking the threshold size as a unit.
9. The apparatus of claim 6, further comprising a comparison module configured to:
comparing the state class data of the master controller and the slave controller at intervals of a specific threshold value;
and responding to the inconsistency of the state class data of the master controller and the slave controller, and sending an alarm to a manager.
10. The apparatus of claim 6, wherein sending control instructions executed by the slave controller into the slave controller to cause the slave controller to execute comprises:
and sending the control instruction executed by the slave controller to the slave controller via the IPMB protocol.
CN202011108600.1A 2020-10-16 2020-10-16 Method and equipment for double-control data interaction control Active CN112199319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011108600.1A CN112199319B (en) 2020-10-16 2020-10-16 Method and equipment for double-control data interaction control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011108600.1A CN112199319B (en) 2020-10-16 2020-10-16 Method and equipment for double-control data interaction control

Publications (2)

Publication Number Publication Date
CN112199319A CN112199319A (en) 2021-01-08
CN112199319B true CN112199319B (en) 2022-08-02

Family

ID=74009178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011108600.1A Active CN112199319B (en) 2020-10-16 2020-10-16 Method and equipment for double-control data interaction control

Country Status (1)

Country Link
CN (1) CN112199319B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220197A (en) * 2017-06-19 2017-09-29 郑州云海信息技术有限公司 A kind of dual control storage device master/standby control method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220197A (en) * 2017-06-19 2017-09-29 郑州云海信息技术有限公司 A kind of dual control storage device master/standby control method and device

Also Published As

Publication number Publication date
CN112199319A (en) 2021-01-08

Similar Documents

Publication Publication Date Title
US11354283B2 (en) Data migration method and apparatus
EP3142011B1 (en) Anomaly recovery method for virtual machine in distributed environment
CN105956138B (en) The control method and device of database connection
US11917027B2 (en) Method and system for providing time-critical services
CN108123851B (en) Survival detection method and device for master-slave node synchronous link in distributed system
CN109495383B (en) Data processing method, device, communication system and network equipment
US10735520B2 (en) Control device, control system, control method, and non-transitory computer-readable storage medium
US20180373563A1 (en) Method and system for processing communication channel
CN107171892B (en) Cross-platform data communication method and system based on QT
CN112769652B (en) Node service monitoring method, device, equipment and medium
WO2020119377A1 (en) Start method for application module, container, control device and readable storage medium
CN112328372A (en) Kubernetes node self-healing method and system
CN112199319B (en) Method and equipment for double-control data interaction control
CN111563009A (en) File synchronization method, system and storage medium based on dual-computer redundancy system
CN110162381B (en) Agent execution method in container
CN114356533B (en) Micro-service non-perception issuing system and method, electronic equipment and storage medium
CN116319758A (en) Data migration method, device, electronic equipment and readable storage medium
CN114884805B (en) Data transmission method, device, terminal and storage medium
CN107171915B (en) Communication protocol changing method and device
CN111934909A (en) Method and device for switching IP (Internet protocol) resources of host and standby machine, computer equipment and storage medium
US20150319246A1 (en) Data transmission device, data transmission method, and storage medium
CN114070799A (en) Processing method and processing device of priority pause frame and target network equipment
CN112272110B (en) Connection jitter processing method, system and device for storage cluster controller node
CN110908776A (en) Timed task execution method, related device and computer readable storage medium
CN112291288B (en) Container cluster expansion method and device, electronic equipment and readable storage medium

Legal Events

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