Method for transmitting control signal, computer device, storage medium and program product
The optical signal transmission system transmits low-speed signals in server scenarios, which solves the high cost problem caused by adding cables or devices when transmitting low-speed signals, and realizes low-speed signal transmission without adding hardware, reducing costs and saving resource.
Patent Information
- Application Number
- CN202411028956.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-30
AI Technical Summary
In server scenarios, additional cables or devices are required to transmit low-speed signals, resulting in higher server costs.
Through the optical signal transmission system, the optical signal status information is periodically read from the optical transceiver, and the status information is formed according to the preset monitoring rules, and whether the control signal configuration rules are complied with. If so, the target control signal is transmitted through the optical signal. The frequency is lower than the preset frequency threshold, realizing the transmission of the target control signal.
Without adding new cables and components, the transmission of control signals is completed through high-speed signals, reducing costs and saving resources.
Smart Images

Figure CN118570994B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and in particular to a method for transmitting a control signal, a computer device, a storage medium and a program product. Background Art
[0002] In the field of server technology, with the rapid growth of data volume, the promotion of digital transformation, the development of ultra-large-scale data centers, the increasing demand for edge computing, the widespread application of artificial intelligence chips and other developments, the server industry is also constantly innovating and developing to meet the growing demand for data processing. As the traditional copper wire transmission method has the increasingly obvious defects of low speed, short transmission distance, and long delay, more and more server scenarios are beginning to use optical fiber transmission instead of copper wire transmission.
[0003] Generally speaking, optical fiber mainly transmits high-speed data signals. However, in server scenarios, in addition to transmitting high-speed data signals, low-speed signals (for example, reset signals) also need to be transmitted. In related technologies, additional copper cables are generally added to transmit low-speed signals. Alternatively, several low-speed signals are integrated into a high-speed differential signal through external logic devices, and then transmitted through a separate optical fiber link.
[0004] This will increase the cost of the server. Summary of the invention
[0005] In view of this, the present invention provides a method, apparatus, computer device, storage medium and program product for transmitting a control signal to solve the problem of high server cost caused by adding additional cables or devices when transmitting low-speed signals.
[0006] In a first aspect, the present invention provides a method for transmitting a control signal, the method being applied to an optical signal transmission system, the optical signal transmission system comprising a control end and a controlled end, the control end comprising at least one control device, a first baseboard management controller and at least one optical transceiver, the controlled end comprising at least one controlled device, a second baseboard management controller and at least one optical transceiver, the method being performed by the second baseboard management controller, the method comprising:
[0007] Periodically reading optical signal status information from a second optical transceiver, wherein the second optical transceiver is an optical transceiver corresponding to a target controlled device, the target controlled device is any one of the at least one controlled device, and the optical signal status information read in each cycle is used to indicate whether the second optical transceiver receives an optical signal from the first optical transceiver in the cycle, the first optical transceiver is an optical transceiver corresponding to a target control device, and the target control device is any one of the at least one control device;
[0008] According to a preset monitoring rule, selecting optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the second optical transceiver;
[0009] Determining whether the status information of the second optical transceiver complies with a preset control signal configuration rule;
[0010] When it is determined that the state information of the second optical transceiver complies with the control signal configuration rule, determining the target controlled device according to the state information of the second optical transceiver;
[0011] A target control signal is transmitted to the target controlled device, wherein a frequency of the target control signal is lower than a preset frequency threshold.
[0012] The method for transmitting a control signal provided by the present invention has the following advantages:
[0013] Although optical fiber itself can transmit low-speed signals, if low-speed signals (for example, target control signals) are directly transmitted through optical fiber, optical fiber resources will be wasted. Therefore, this solution indicates the target control signal through an optical signal of a certain form (i.e., the configuration rule corresponding to the target controlled device) to complete the transmission of the target control signal. Without adding new cables and components, the target control signal is transmitted between the control end and the controlled end in the form of a high-speed signal (optical signal), which can reduce costs and save resources.
[0014] In an optional implementation, when it is determined that the state information of the second optical transceiver complies with the control signal configuration rule, determining the target controlled device according to the state information of the second optical transceiver includes:
[0015] Parsing the status information of the second optical transceiver to obtain a first code, a second code, and a third code;
[0016] Determining a target data transmission rate according to the first encoding or the third encoding;
[0017] The target controlled device is determined according to the target data transmission rate and the second encoding.
[0018] Specifically, the encoding of the target controlled device at different data transmission rates is different. Through such a design, the data transmission rate can be adjusted according to the actual load conditions of the system, and the corresponding encoding at the corresponding data transmission rate can be used to complete the transmission of the target control signal.
[0019] In an optional implementation manner, determining the target controlled device according to the target data transmission rate and the second encoding includes:
[0020] According to the target data transmission rate, acquiring a corresponding relationship between a controlled device and a code corresponding to the target data transmission rate;
[0021] The target controlled device corresponding to the second code is determined according to the second code and the corresponding relationship between the controlled device and the code.
[0022] Specifically, the encoding of the target controlled device at different data transmission rates is different. Through such a design, the data transmission rate can be adjusted according to the actual load conditions of the system, and the corresponding encoding at the corresponding data transmission rate can be used to complete the transmission of the target control signal.
[0023] In an optional implementation manner, after transmitting the target control signal to the target controlled device, the method further includes:
[0024] Get the target configuration rules;
[0025] According to the target configuration rule, the second optical transceiver is controlled to transmit an optical signal to the first optical transceiver to inform the first baseboard management controller that the second baseboard management controller has transmitted the target control signal to the target controlled device.
[0026] Specifically, after completing the transmission of the target control signal, the second baseboard management controller notifies the first baseboard manager of the completion of the transmission of the target control signal by sending an optical signal according to the target configuration rule, so that the system can resume the normal data transmission process as soon as possible.
[0027] In an optional implementation, the selecting, according to a preset monitoring rule, optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the second optical transceiver includes:
[0028] From the optical signal status information periodically read, optical signal status information corresponding to a first preset number of consecutive cycles is selected starting from each cycle to form the status information of the second optical transceiver, wherein the optical signal status information includes the value of the target bit in the target register in the second optical transceiver.
[0029] Specifically, the state information of the second optical transceiver can be determined more accurately through the optical signal state information of a plurality of consecutive cycles.
[0030] In an optional implementation, the selecting, according to a preset monitoring rule, optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the second optical transceiver includes:
[0031] From the optical signal status information periodically read, optical signal status information corresponding to a second preset number of consecutive cycles are selected starting from each cycle to form a fourth code, wherein the optical signal status information includes a value of a target bit in a target register in the second optical transceiver;
[0032] Determining whether the fourth code is a code of a start signal;
[0033] When it is determined that the fourth code is the code of the start signal, according to the first cycle after the second consecutive preset number of cycles as the starting cycle, the optical signal state information corresponding to the third consecutive preset number of cycles is selected to form a fifth code;
[0034] Determining whether the fifth code includes a code of an end signal;
[0035] When it is determined that the fifth code includes the code of the end signal, the state information of the second optical transceiver is constructed according to the fourth code and the fifth code.
[0036] Specifically, by encoding the start signal and the end signal, the range of the signal can be clearly defined, data confusion and misreading can be avoided, and the accuracy and reliability of communication can be improved. In addition, only when the fourth encoding is the encoding of the start signal, further selection of optical signal state information is performed, which can save resources.
[0037] In an optional implementation, when it is determined that the state information of the second optical transceiver does not comply with the control signal configuration rule, the method further includes:
[0038] determining whether the state information of the second optical transceiver is abnormal state information;
[0039] When it is determined that the state information of the second optical transceiver is the abnormal state information, it is determined that the second optical transceiver fails.
[0040] Specifically, this solution can detect faults in a timely manner, prompting technicians to perform necessary maintenance or repairs, and ensure service continuity and data integrity.
[0041] In an optional embodiment, the target configuration rule includes operation instruction information corresponding to at least one cycle, wherein the operation instruction information includes a first numerical value or a second numerical value, the first numerical value is used to indicate that the second optical transceiver sends an optical signal to the first optical transceiver in the cycle, and the second numerical value is used to indicate that the second optical transceiver does not send an optical signal to the first optical transceiver in the cycle.
[0042] Specifically, the operation instruction information (first value or second value) corresponding to each cycle in the target configuration rule provides precise control over the sending behavior of the optical transceiver, ensuring that the optical signal can be transmitted to the first baseboard management controller in a form corresponding to the response signal.
[0043] In a second aspect, the present invention provides a method for transmitting a control signal, the method being applied to an optical signal transmission system, the optical signal transmission system comprising a control end and a controlled end, the control end comprising at least one control device, a first baseboard management controller and at least one optical transceiver, the controlled end comprising at least one controlled device, a second baseboard management controller and at least one optical transceiver, the method being executed by the first baseboard management controller, the method comprising:
[0044] Receiving a reset notification message sent by a target control device, wherein the target control device is any one of the at least one control device, and the reset notification message includes identification information of a target controlled device to be reset;
[0045] Determining a configuration rule corresponding to the target controlled device according to identification information of the target controlled device to be reset;
[0046] According to the configuration rule corresponding to the target controlled device, the first optical transceiver corresponding to the target controlled device is controlled to transmit an optical signal to the second optical transceiver corresponding to the target controlled device, so as to instruct the second baseboard management controller to transmit a target control signal to the target controlled device, wherein the frequency of the target control signal is lower than a preset frequency threshold.
[0047] The method for transmitting a control signal provided by the present invention has the following advantages:
[0048] Although optical fiber itself can transmit low-speed signals, if low-speed signals (for example, target control signals) are directly transmitted through optical fiber, optical fiber resources will be wasted. Therefore, this solution indicates the target control signal through an optical signal of a certain form (i.e., the configuration rule corresponding to the target controlled device) to complete the transmission of the target control signal. Without adding new cables and components, the target control signal is transmitted between the control end and the controlled end in the form of a high-speed signal (optical signal), which can reduce costs and save resources.
[0049] In an optional implementation manner, determining, according to the identification information of the target controlled device to be reset, a configuration rule corresponding to the target controlled device includes:
[0050] Determining a target data transmission rate corresponding to the target controlled device according to the identification information of the target controlled device;
[0051] According to the target data transmission rate, acquiring a target coding rule corresponding to the target data transmission rate, wherein the target coding rule includes a first coding rule for a start signal, a second coding rule for an end signal, and coding rules corresponding to at least one of the controlled devices;
[0052] According to the flag information of the target controlled device, selecting a third coding rule corresponding to the target controlled device from the coding rules corresponding to at least one of the controlled devices;
[0053] According to the first coding rule, the second coding rule and the third coding rule, a configuration rule corresponding to the target controlled device is constructed.
[0054] Specifically, by determining the most appropriate data transmission rate according to the identification information of the target controlled device, the system can adaptively adjust the communication speed to ensure efficient and stable data transmission. In addition, obtaining the encoding rules that match the data transmission rate, including the encoding of the start signal and the end signal, and the encoding rules of the specific controlled device, can improve the reliability and efficiency of data transmission.
[0055] In an optional implementation, after controlling the first optical transceiver corresponding to the target controlled device to transmit an optical signal to the second optical transceiver corresponding to the target controlled device according to the configuration rule corresponding to the target controlled device, the method further includes:
[0056] Periodically reading optical signal status information from the first optical transceiver, wherein the optical signal status information read in any period is used to indicate whether the first optical transceiver receives an optical signal from the second optical transceiver in the period;
[0057] According to a preset monitoring rule, selecting optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the first optical transceiver;
[0058] Determining whether the state information of the first optical transceiver complies with a preset response signal configuration rule;
[0059] When it is determined that the status information of the first optical transceiver complies with the response signal configuration rule, it is determined that a response signal corresponding to the target control signal is received, wherein the response signal is used to indicate that the second baseboard management controller has transmitted the target control signal to the target controlled device.
[0060] Specifically, after completing the transmission of the target control signal, the second baseboard management controller notifies the first baseboard manager of the completion of the transmission of the target control signal by sending an optical signal according to the target configuration rule, so that the system can resume the normal data transmission process as soon as possible.
[0061] In an optional embodiment, the configuration rules corresponding to the target controlled device include operation instruction information corresponding to at least one cycle, wherein the operation instruction information includes a first numerical value or a second numerical value, the first numerical value is used to indicate that the first optical transceiver sends an optical signal to the second optical transceiver in the cycle, and the second numerical value is used to indicate that the second optical transceiver does not send an optical signal to the second optical transceiver in the cycle.
[0062] Specifically, the operation instruction information (first value or second value) corresponding to each cycle in the configuration rule corresponding to the target controlled device provides precise control over the sending behavior of the optical transceiver, ensuring that the optical signal can be transmitted to the first baseboard management controller in a form corresponding to the target control signal.
[0063] In a third aspect, the present invention provides a device for transmitting a control signal, the device being applied to an optical signal transmission system, the optical signal transmission system comprising a control end and a controlled end, the control end comprising at least one control device, a first baseboard management controller and at least one optical transceiver, the controlled end comprising at least one controlled device, a second baseboard management controller and at least one optical transceiver, the device comprising:
[0064] a reading module, configured to periodically read optical signal status information from a second optical transceiver, wherein the second optical transceiver is an optical transceiver corresponding to a target controlled device, the target controlled device is any one of the at least one controlled device, and the optical signal status information read in each cycle is used to indicate whether the second optical transceiver receives an optical signal from the first optical transceiver in the cycle, the first optical transceiver is an optical transceiver corresponding to a target control device, and the target control device is any one of the at least one control device;
[0065] A constituting module, configured to select optical signal status information corresponding to at least one period from the optical signal status information periodically read according to a preset monitoring rule, to constitute the status information of the second optical transceiver;
[0066] A first determination module, configured to determine whether the state information of the second optical transceiver complies with a preset control signal configuration rule; when it is determined that the state information of the second optical transceiver complies with the control signal configuration rule, determining the target controlled device according to the state information of the second optical transceiver;
[0067] The first transmission module is used to transmit a target control signal to the target controlled device, wherein the frequency of the target control signal is lower than a preset frequency threshold.
[0068] In a fourth aspect, the present invention provides a device for transmitting a control signal, the device being applied to an optical signal transmission system, the optical signal transmission system comprising a control end and a controlled end, the control end comprising at least one control device, a first baseboard management controller and at least one optical transceiver, the controlled end comprising at least one controlled device, a second baseboard management controller and at least one optical transceiver, the device comprising:
[0069] A receiving module, configured to receive a reset notification message sent by a target control device, wherein the target control device is any one of the at least one control device, and the reset notification message includes identification information of a target controlled device to be reset;
[0070] A second determining module, configured to determine a configuration rule corresponding to the target controlled device to be reset according to the identification information of the target controlled device;
[0071] A second transmission module is used to control the first optical transceiver corresponding to the target control device to transmit an optical signal to the second optical transceiver corresponding to the target controlled device according to a configuration rule corresponding to the target controlled device, so as to instruct the second baseboard management controller to transmit a target control signal to the target controlled device, wherein the frequency of the target control signal is lower than a preset frequency threshold.
[0072] In a fifth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for transmitting a control signal of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0073] In a sixth aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method for transmitting a control signal in the above-mentioned second aspect or any corresponding embodiment thereof by executing the computer instructions.
[0074] In a seventh aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for transmitting a control signal of the first aspect or any corresponding embodiment thereof.
[0075] In an eighth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for transmitting a control signal of the second aspect or any corresponding embodiment thereof.
[0076] In a ninth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for transmitting a control signal according to the first aspect or any corresponding embodiment thereof.
[0077] In a tenth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the method for transmitting a control signal according to the second aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0079] Figure 1 is a schematic diagram of the architecture of an optical signal transmission system according to an embodiment of the present invention;
[0080] Figure 2 is a flow chart of a method for transmitting a control signal according to an embodiment of the present invention;
[0081] Figure 3 is a structural block diagram of an apparatus for transmitting a control signal according to an embodiment of the present invention;
[0082] Figure 4 is a structural block diagram of an apparatus for transmitting a control signal according to an embodiment of the present invention;
[0083] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0085] An embodiment of the present invention provides an optical signal transmission system, which may include a control end (Host) and a controlled end (Device). Both the control end and the controlled end may be servers. The control end may include at least one control device, a first baseboard management controller (Baseboard Management Controller, BMC) and at least one optical transceiver (also known as an optical module, Optic Module). The controlled end may include at least one controlled device, a second baseboard management controller and at least one optical transceiver. The optical transceiver may include a microcontroller unit (Microcontroller Unit, MCU), a laser driver, a laser array, a transimpedance amplifier and a light detection array. Each optical transceiver in the control end may be connected to a control device, or one optical transceiver may be connected to multiple control devices. Each optical transceiver in the controlled end may be connected to a control device, or one optical transceiver may be connected to multiple control devices.
[0086] For example, in Figure 1 In the example, the Host device sends high-speed data information to the Host optical module in the form of electrical signals through N TX (transmit) links, and receives high-speed data information from the Host optical module in the form of electrical signals through N RX (receive) links. In addition, the Host device can also be connected to the BMC (for example, connected to the BMC through I2C) to transmit low-speed signals (low-speed signals can be signals with a frequency less than a preset frequency threshold, and the preset frequency threshold can be different in different system architectures), where the low-speed signal can be a reset signal (Reset), a response signal (Ack) corresponding to the reset signal, etc., and the reset signal can be used to reset the Device device. In addition to transmitting high-speed data information between the Host device, the Host optical module can also be connected to the BMC through I2C for function configuration and status monitoring of the optical module. Inside the optical module, the high-speed data electrical signal input by the Host device is converted into an optical signal after passing through the laser driver and laser driver array at the transmitting end, and the optical signal from the optical fiber is converted into a high-speed electrical signal after passing through the optical detection array and transimpedance amplifier at the receiving end. The Device-side optical module and the Host-side optical module are connected through an optical fiber line for transmitting optical signals.
[0087] The Device device sends high-speed data information to the Device optical module in the form of electrical signals through N TX links, and receives high-speed data information from the Device optical module in the form of electrical signals through N RX links. In addition, the Device device can also be connected to the BMC (for example, connected to the BMC through I2C) to transmit low-speed control electrical signals. In addition to transmitting high-speed data information between the Device device, the Device optical module can also be connected to the BMC through I2C for functional configuration and status monitoring of the optical module. Inside the optical module, the high-speed data electrical signal input by the Device device is converted into an optical signal after passing through the laser driver and laser driver array at the transmitting end, and the optical signal from the optical fiber is converted into a high-speed electrical signal after passing through the optical detection array and transimpedance amplifier at the receiving end.
[0088] In the related art, the above Figure 1 In the above, the host device and the device device directly transmit the reset signal through the copper cable. Figure 1 The host device also needs to include an external logic device, the host device is connected to the external logic device through an optical fiber, and the device device is also connected to the external logic device through an optical fiber. The host device transmits a reset signal to the external logic device, and the external logic device processes the reset signal and then sends it to the device device. Both methods increase the cost of the server.
[0089] An embodiment of the present invention provides a method for transmitting a control signal. On the architecture of an existing optical signal transmission system, no additional components or cables are added. An optical signal conforming to a certain form is directly emitted through an optical fiber to achieve the purpose of transmitting a target control signal.
[0090] According to an embodiment of the present invention, a method embodiment for transmitting a control signal is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0091] In this embodiment, a method for transmitting a control signal is provided, which can be used in the above-mentioned optical signal transmission system. The transmission of the control signal from the target control device to the target controlled device is completed through communication interaction between various components in the optical signal transmission system. The target control device can be any one of at least one control device, and the target controlled device can be any one of at least one controlled device.
[0092] Figure 2 is a flow chart of a method for transmitting a control signal according to an embodiment of the present invention. Figure 2As shown, the process includes the following steps:
[0093] Step S201: A first baseboard management controller receives a reset notification message sent by a target control device.
[0094] The target control device may be any one of the at least one control device. The reset notification message may include identification information of at least one controlled device to be reset.
[0095] Specifically, when a reset operation needs to be performed on one or some controlled devices, the target control device can add the identification information of the controlled device to the reset notification message and send it to the first baseboard management controller. The operation of sending the reset notification message can be achieved by changing the state of the level corresponding to the control signal, for example, switching the high level to a low level. In this way, the first baseboard management controller can perform subsequent operations after receiving the reset notification message.
[0096] Step S202: the first baseboard management controller determines a configuration rule corresponding to the target controlled device according to identification information of the target controlled device to be reset.
[0097] Among them, the identification information of the target controlled device may be the identification information of any controlled device to be reset included in the reset notification message. The configuration rule corresponding to the target controlled device may include operation instruction information corresponding to multiple cycles respectively. The operation instruction information may include a first numerical value or a second numerical value, the first numerical value is used to indicate that the first optical transceiver sends an optical signal to the second optical transceiver, and the second numerical value is used to indicate that the second optical transceiver does not send an optical signal to the second optical transceiver. For example, the first numerical value may be "1" and the second numerical value may be "0".
[0098] Specifically, different configuration rules may be set for different controlled devices. Therefore, for each controlled device to be reset, a corresponding configuration rule may be determined in the following manners. The target controlled device is taken as an example for explanation.
[0099] Method 1: The first baseboard management controller can directly determine the configuration rule corresponding to the identification information of the target controlled device (that is, the configuration rule corresponding to the target controlled device) based on the identification information of the target controlled device to be reset and the correspondence between the identification information of the controlled device and the configuration rule.
[0100] Method 2: First, the first baseboard management controller can determine the target data transmission rate corresponding to the target controlled device according to the identification information of the target controlled device (for example, according to the identification information of the target controlled device, the resource allocation of the target controlled device is obtained, and further, according to the resource allocation, the target data transmission rate is determined). Then, according to the target data transmission rate, the target coding rule corresponding to the target data transmission rate can be obtained. Among them, the target coding rule may include a first coding rule for the start signal, a second coding rule for the end signal, and coding rules corresponding to at least one controlled device. Furthermore, according to the flag information of the target controlled device, a third coding rule corresponding to the target controlled device can be selected from the coding rules corresponding to at least one controlled device. Finally, according to the first coding rule, the second coding rule and the third coding rule, a configuration rule corresponding to the target controlled device can be constructed.
[0101] The target data transmission rate can be 100k, 400k, 1M, etc.
[0102] Since the priority and efficiency of processing data of different controlled devices may be different, in order to ensure resource balance, different controlled devices can use different data transmission rates to complete related data transmission operations according to actual conditions. Accordingly, the memory of the first baseboard management controller itself can store the corresponding relationship between the identification information of the controlled device and the data transmission rate, the corresponding relationship between the data transmission rate and the encoding rule, and various encoding rules. In this way, after obtaining the identification information of the target controlled device, the target data transmission rate corresponding to the identification information of the target controlled device can be determined according to the identification information of the target controlled device, the identification information of the controlled device and the corresponding relationship between the data transmission rate. Further, according to the corresponding relationship between the target data transmission rate, the data transmission rate and the encoding rule, the target encoding rule corresponding to the target data transmission rate is determined. Finally, the configuration rule corresponding to the target controlled device can be obtained by selecting the required first encoding rule, the second encoding rule and the third encoding rule from the target encoding rule.
[0103] Method three, first, the first baseboard management controller can determine the target data transmission rate corresponding to the target controlled device and the coding rule corresponding to the target controlled device according to the identification information of the target controlled device. Then, the target coding rule corresponding to the target data transmission rate can be obtained according to the target data transmission rate. Among them, the target coding rule may include a first coding rule for the start signal and a second coding rule for the end signal. Finally, the configuration rule corresponding to the target controlled device can be constructed according to the first coding rule, the second coding rule, and the coding rule corresponding to the target controlled device.
[0104] Step S203 : the first baseboard management controller controls the first optical transceiver corresponding to the target controlled device to transmit an optical signal to the second optical transceiver corresponding to the target controlled device according to the configuration rule corresponding to the target controlled device.
[0105] Specifically, in each cycle, the first baseboard management controller can determine the operation instruction information corresponding to the cycle in the configuration rule corresponding to the target controlled device, and fill the value included in the operation instruction information into the target bit of the first register of the first optical transceiver (the first register can be in the MCU of the first optical transceiver). In this way, the MCU of the first optical transceiver can adjust the output state of the laser driver according to the value of the target bit in the first register, that is, when the value of the target bit of the first register is the first value, the output state of the laser driver is set to on, so that the laser driver can control the laser array to output the optical signal to the second optical transceiver through the optical fiber, or, when the value of the target bit of the first register is the second value, the output state of the laser driver is set to off, so that the laser driver can control the laser array to stop outputting the optical signal to the second optical transceiver.
[0106] Step S204: the second baseboard management controller periodically reads optical signal status information from the second optical transceiver.
[0107] The optical signal status information read in each cycle can be used to indicate whether the second optical transceiver receives an optical signal from the first optical transceiver in the cycle. The optical signal status information can include the first value or the second value.
[0108] Specifically, in each cycle, if the optical detection array of the second optical transceiver receives an optical signal, the optical detection array can convert the optical signal into a current signal and transmit it to the transimpedance amplifier, and the transimpedance amplifier can convert the current signal into a voltage signal. In this way, the MCU of the second optical transceiver can detect the corresponding voltage signal and determine whether the optical signal is received in this cycle. When the optical signal is received, the MCU can set the value of the target bit in its own target register to the first value. Alternatively, in each cycle, if the optical detection array of the second optical transceiver does not receive the optical signal, the MCU of the second optical transceiver cannot detect the corresponding voltage signal and determines that the optical signal is not received in this cycle. At this time, the MCU can set the value of the target bit in its own target register to the second value.
[0109] The second baseboard management controller can read a value corresponding to the cycle from the target bit of the target register in each cycle as the optical signal state information of the cycle.
[0110] Step S205 : The second baseboard management controller selects optical signal status information corresponding to at least one period from the optical signal status information periodically read according to a preset monitoring rule to form status information of the second optical transceiver.
[0111] Specifically, different monitoring rules may be set in the second baseboard management controller. Accordingly, under different monitoring rules, the optical signal status information of corresponding periods is selected to form the status information of the second optical transceiver.
[0112] In a first approach, the second baseboard management controller may select optical signal status information corresponding to a first preset number of consecutive periods starting from each period from the optical signal status information periodically read to form the status information of the second optical transceiver.
[0113] The first preset number may be greater than or equal to 10. The optical signal status information corresponding to the first preset number of periods constitutes the status information of the second optical transceiver, including the code of the start signal corresponding to the target control signal, the code of the target controlled device and the code of the end signal.
[0114] For example, the first preset number is 10, and the status information of the second optical transceiver can be "0101010101", the first three digits "010" represent the encoding of the start signal, the middle four digits "1010" represent the encoding of the target controlled device, and the last three digits "101" represent the encoding of the end signal.
[0115] Method 2: First, the second baseboard management controller can select the optical signal status information corresponding to the second preset number of consecutive cycles from the optical signal status information periodically read, starting from each cycle, to form a fourth code. Then, determine whether the fourth code is the code corresponding to the start signal. When the fourth code is determined to be the code of the start signal, based on the first cycle after the second preset number of consecutive cycles as the starting cycle, continuously select the optical signal status information corresponding to the third preset number of cycles to form a fifth code. Finally, determine whether the fifth code includes the code of the end signal. When it is determined that the fifth code includes the code of the end signal, the status information of the second optical transceiver is constructed based on the fourth code and the fifth code.
[0116] The optical signal state information includes a value of a target bit in a target register in the second optical transceiver. The second preset number may be greater than or equal to 3. The second preset number may be the same as the first preset number. The third preset number may be greater than or equal to 7.
[0117] Since there can be multiple codes for the start signal and the end signal, that is, the start signal can correspond to different codes at different data transmission rates, and the end signal can also correspond to different codes. Therefore, the second baseboard management controller can determine whether the fourth code is any one of the different codes corresponding to the start signal. If so, the fourth code can be determined as the code of the start signal. If the fourth code is different from any one of the different codes corresponding to the start signal, it can be determined that the fourth code is not the code of the start signal, and the fourth code is directly determined as the status information of the second optical transceiver.
[0118] When it is determined that the fourth code is the code of the start signal, the optical signal state information corresponding to the third preset number of cycles can be further selected to form a fifth code, and the sixth code corresponding to the preset number of bits in the fifth code can be determined according to the preset number of bits. Further, it can be determined whether the sixth code is one of the different codes corresponding to the end signal. If so, it can be determined that the fifth code includes the code of the end signal.
[0119] For example, the second preset number is 3, the third preset number is 7, when the fourth code is "010", it can be determined that the fourth code is the code of the start signal, and when the fourth code is "000" or "111", it can be determined that the fourth code is not the code of the start signal.
[0120] Method three, for each period of optical signal status information read, determine whether the optical signal status information read in the period includes the first value or the second value. If it is the second value, take the period as the starting period, select the optical signal status information corresponding to the fourth preset number of consecutive periods to form the status information of the second optical transceiver. If it is the first value, the optical signal status information of the period can be determined as the status information of the second optical transceiver. The fourth preset number can be greater than or equal to 10.
[0121] Since the value of the target bit of the target register in the second optical transceiver is the first value in each cycle under the normal state of high-speed data transmission, if the value of the target bit read in a certain cycle is the second value, it means that there are two situations: first, the first optical transceiver or the second optical transceiver fails, and second, a low-speed signal (for example, a target control signal) needs to be transmitted at present. In the second case, the value of the target bit will change in accordance with a certain rule in multiple cycles, and in the first case, the value of the target bit will remain the first value in multiple cycles. Therefore, the values of the target bits corresponding to the fourth preset number of consecutive cycles starting from the current cycle can be read first, so that the second baseboard management controller can accurately determine whether the status information of the second optical transceiver meets the preset control signal configuration rules.
[0122] In this way, through the above rules, the starting point of the abnormal situation (the second value is detected) can be accurately determined. Furthermore, by taking this period as the starting period and selecting the optical signal status information corresponding to the fourth consecutive preset number of periods, it is possible to accurately determine the type of the abnormal situation in the subsequent process.
[0123] Step S206: The second baseboard management controller determines whether the status information of the second optical transceiver complies with a preset control signal configuration rule.
[0124] The state information of the second optical transceiver includes a value of a target bit corresponding to at least one cycle.
[0125] Specifically, the second baseboard management controller may first determine whether the number of bits of data included in the status information of the second optical transceiver is equal to a preset threshold value, which may be 10.
[0126] If the number of bits of data included in the status information of the second optical transceiver is not equal to the preset threshold, the abnormal status information can be obtained, and it can be determined whether the status information of the second optical transceiver conforms to the abnormal status information, that is, it is determined whether the value of each bit in the status information of the second optical transceiver is equal to the second value. If so, it can be determined that the status information of the second optical transceiver conforms to the abnormal status information, and it is determined that the first optical transceiver or the second optical transceiver fails, that is, the first optical transceiver cannot normally send an optical signal to the second optical transceiver, or the second optical transceiver cannot normally receive or process an optical signal. If not, it can be determined whether the value of each bit in the status information of the second optical transceiver is equal to the first value. If so, it belongs to the situation of normal optical signal transmission (that is, non-fault situation, non-sending target control signal situation).
[0127] If the number of bits of data included in the status information of the second optical transceiver is equal to the preset threshold, whether the control signal configuration rule is met may be verified in the following three ways.
[0128] Mode 1, corresponding to Mode 1 in step S202, the control signal configuration rule may include multiple codes. The second baseboard management controller may generate a target code according to the state information of the second optical transceiver, and determine whether the target code is any code included in the control signal configuration rule. If yes, it can be considered that the state information of the second optical transceiver complies with the control signal configuration rule. If not, it can be considered that the state information of the second optical transceiver does not comply with the control signal configuration rule.
[0129] Mode 2, corresponding to Mode 2 in step S202, the control signal configuration rule may include coding rules corresponding to different data transmission rates. The coding rules corresponding to each data transmission rate include coding rules for the start signal, coding rules for each controlled device included in the controlled end, and coding rules for the end signal.
[0130] The second baseboard management controller can make the following three judgments: first, whether the encoding of the start signal included in the status information of the second optical transceiver is any encoding of the start signal; second, whether the status information of the second optical transceiver is any encoding of the controlled device; third, whether the encoding of the end signal included in the status information of the second optical transceiver is any encoding of the end signal. If the judgment results of the three parts are all yes, it can be determined that the status information of the second optical transceiver complies with the control signal configuration rules. If the judgment result of any part is no, it can be determined that the status information of the second optical transceiver does not comply with the control signal configuration rules. At this time, it can continue to judge whether the status information of the second optical transceiver complies with the abnormal status information.
[0131] Mode 3, corresponding to Mode 3 in step S202, the control signal configuration rule may include a coding rule corresponding to each controlled device and coding rules corresponding to different data transmission rates. The coding rules corresponding to each data transmission rate include a coding rule for a start signal and a coding rule for an end signal. The corresponding judgment steps are similar to those in Mode 2 and will not be repeated here.
[0132] Step S207: When the second baseboard management controller determines that the state information of the second optical transceiver complies with the control signal configuration rule, a target controlled component is determined according to the state information of the second optical transceiver.
[0133] Specifically, first, the second baseboard management controller may parse the status information of the second optical transceiver to obtain a first code, a second code, and a third code.
[0134] The second baseboard management controller splits the state information of the second optical transceiver according to a preset splitting rule, and the preset splitting rule may include a first splitting bit and a second splitting bit. The second baseboard management controller may split the state information of the second optical transceiver into a first code, a second code, and a third code according to the first splitting bit and the second splitting bit. The first code may be a code of a start signal, the second code may be a code of a controlled device, and the third code may be a code of an end signal.
[0135] Corresponding to the method 1 and the method 3 in step S202 (or corresponding to the method 1 and the method 3 in step S206), the second baseboard management controller can directly determine the target controlled device corresponding to the second code according to the correspondence between the second code, the controlled device and the code.
[0136] Corresponding to the second method in step S202 (or corresponding to the second method in step S206), the second baseboard management controller may determine the target controlled device according to the following steps:
[0137] Step 1: determine a target data transmission rate according to the first encoding and / or the third encoding.
[0138] The second baseboard management controller may pre-store a correspondence between the code and the data transmission rate. Accordingly, the target data transmission rate corresponding to the first code may be determined according to the first code and the correspondence between the code and the data transmission rate. Alternatively, the target data transmission rate corresponding to the second code may be determined according to the third code and the correspondence between the code and the data transmission rate. Alternatively, the first code and the third code may be spliced to obtain the spliced code, and further, the target data transmission rate corresponding to the spliced code may be determined according to the spliced code and the correspondence between the code and the data transmission rate.
[0139] Step 2: Determine the target controlled device according to the target data transmission rate and the second encoding.
[0140] Step 1: According to the target data transmission rate, a corresponding relationship between the controlled device and the code corresponding to the target data transmission rate is obtained.
[0141] Step 2: Determine the target controlled device corresponding to the second code according to the second code and the corresponding relationship between the controlled device and the code.
[0142] Step S208: the second baseboard management controller transmits a target control signal to the target controlled device.
[0143] The target control signal may be the above-mentioned low-speed signal, for example, a reset signal.
[0144] Step S209: the second baseboard management controller obtains a target configuration rule, and controls the second optical transceiver to transmit an optical signal to the first optical transceiver according to the target configuration rule.
[0145] The target configuration rule may include operation instruction information corresponding to multiple periods. The target configuration rule may be pre-configured (for example, when there is only one control device at the control end) or generated in real time. For the latter, the target configuration rule may be generated in a similar manner to step S202 (replacing the target controlled device with the target control device).
[0146] The specific processing of step S209 is similar to that of step S203 and will not be repeated here.
[0147] Step S210: The first baseboard management controller periodically reads optical signal status information from the first optical transceiver.
[0148] The specific processing of step S210 is similar to that of step S204 and will not be repeated here.
[0149] Step S211 : the first baseboard management controller selects optical signal status information corresponding to at least one period from the optical signal status information periodically read according to a preset monitoring rule to form status information of the first optical transceiver.
[0150] The specific processing of step S211 is similar to that of step S205 and will not be repeated here.
[0151] Step S212: the first baseboard management controller determines whether the state information of the first optical transceiver complies with a preset response signal configuration rule.
[0152] The state information of the second optical transceiver may include a value of a target bit corresponding to at least one period.
[0153] The specific processing of step S212 is similar to that of step S206 and will not be repeated here.
[0154] Step S213: When it is determined that the state information of the first optical transceiver meets the response signal configuration rule, it is determined that a response signal corresponding to the target control signal is received.
[0155] The response signal is used to indicate that the second baseboard management controller has transmitted the target control signal to the target controlled device. The response signal configuration rule may include at least one period of optical signal state information corresponding to each period.
[0156] Step S214 : the first baseboard management controller cancels the operation of controlling the first optical transceiver to send an optical signal according to the configuration rule corresponding to the target controlled device.
[0157] Specifically, when the first baseboard management controller determines that the status information of the first optical transceiver complies with the response signal configuration rule, it determines that a response signal corresponding to the target control signal is received, and it can be determined that the second baseboard management controller has transmitted the target control signal to the target controlled device, and no longer controls the operation of the first optical transceiver to send optical signals according to the configuration rule corresponding to the target controlled device, that is, restores the normal operation of sending optical signals.
[0158] In the method for transmitting the target control signal provided in this embodiment, although the optical fiber itself can transmit low-speed signals, if the low-speed signals are directly transmitted through the optical fiber, the optical fiber resources will be wasted. Therefore, this solution indicates the target control signal through an optical signal of a certain form (i.e., a configuration rule corresponding to the target controlled device) to complete the transmission of the target control signal. Without adding new cables and components, the target control signal is transmitted between the control end and the controlled end in the form of a high-speed signal (optical signal), which can reduce costs and save resources.
[0159] In the present embodiment, a device for transmitting a control signal is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0160] This embodiment provides a device for transmitting a control signal, such as Figure 3 As shown, including:
[0161] The reading module 301 is used to periodically read the optical signal state information from the second optical transceiver, wherein the second optical transceiver is an optical transceiver corresponding to the target controlled device, the target controlled device is any one of the at least one controlled device, and the optical signal state information read in each period is used to indicate whether the second optical transceiver receives an optical signal from the first optical transceiver in the period, the first optical transceiver is an optical transceiver corresponding to the target control device, and the target control device is any one of the at least one control device;
[0162] A forming module 302 is used to select optical signal status information corresponding to at least one period from the optical signal status information periodically read according to a preset monitoring rule to form the status information of the second optical transceiver;
[0163] The first determination module 303 is used to determine whether the state information of the second optical transceiver meets the preset control signal configuration rule; when it is determined that the state information of the second optical transceiver meets the control signal configuration rule, determine the target controlled device according to the state information of the second optical transceiver;
[0164] The first transmission module 304 is used to transmit a target control signal to a target controlled device, wherein the frequency of the target control signal is lower than a preset frequency threshold.
[0165] In some optional implementations, the first determining module 303 is specifically configured to:
[0166] Parsing the status information of the second optical transceiver to obtain a first code, a second code, and a third code;
[0167] determining a target data transmission rate according to the first encoding or the third encoding;
[0168] The target controlled device is determined according to the target data transmission rate and the second encoding.
[0169] In some optional implementations, the first determining module 303 is specifically configured to:
[0170] According to the target data transmission rate, obtaining a corresponding relationship between the controlled device and the code corresponding to the target data transmission rate;
[0171] According to the second code and the corresponding relationship between the controlled device and the code, a target controlled device corresponding to the second code is determined.
[0172] In some optional implementations, the first transmission module 304 is further configured to:
[0173] After transmitting the target control signal to the target controlled device, obtaining the target configuration rule;
[0174] According to the target configuration rule, the second optical transceiver is controlled to transmit an optical signal to the first optical transceiver to inform the first baseboard management controller that the second baseboard management controller has transmitted the target control signal to the target controlled device.
[0175] In some optional implementations, the module 302 is specifically configured to:
[0176] From the optical signal status information periodically read, optical signal status information corresponding to a first preset number of consecutive cycles is selected starting from each cycle to form the status information of the second optical transceiver, wherein the optical signal status information includes the value of the target bit in the target register in the second optical transceiver.
[0177] In some optional implementations, the module 302 is specifically configured to:
[0178] From the optical signal status information periodically read, optical signal status information corresponding to a second preset number of consecutive cycles are selected starting from each cycle to form a fourth code, wherein the optical signal status information includes a value of a target bit in a target register in the second optical transceiver;
[0179] determining whether the fourth code is a code of a start signal;
[0180] When the fourth code is determined to be the code of the start signal, according to the first cycle after the second preset number of consecutive cycles as the starting cycle, the optical signal state information corresponding to the third preset number of consecutive cycles is selected to form the fifth code;
[0181] Determining whether the fifth code includes a code of an end signal;
[0182] When it is determined that the fifth code includes the code of the end signal, the state information of the second optical transceiver is constructed based on the fourth code and the fifth code.
[0183] In some optional implementations, the first determining module 303 is further configured to:
[0184] When it is determined that the state information of the second optical transceiver does not comply with the control signal configuration rule, determining whether the state information of the second optical transceiver is abnormal state information;
[0185] When it is determined that the state information of the second optical transceiver is abnormal state information, it is determined that the second optical transceiver fails.
[0186] In some optional embodiments, the target configuration rule includes operation instruction information corresponding to at least one period, wherein the operation instruction information includes a first numerical value or a second numerical value, the first numerical value is used to indicate that the second optical transceiver sends an optical signal to the first optical transceiver during the period, and the second numerical value is used to indicate that the second optical transceiver does not send an optical signal to the first optical transceiver during the period.
[0187] This embodiment provides a device for transmitting a control signal, such as Figure 4 As shown, including:
[0188] The receiving module 401 is used to receive a reset notification message sent by a target control device, wherein the target control device is any one of the at least one control device, and the reset notification message includes identification information of the target controlled device to be reset;
[0189] A second determining module 402 is used to determine a configuration rule corresponding to the target controlled device according to the identification information of the target controlled device to be reset;
[0190] The second transmission module 403 is used to control the first optical transceiver corresponding to the target control device to transmit an optical signal to the second optical transceiver corresponding to the target controlled device according to the configuration rule corresponding to the target controlled device, so as to instruct the second baseboard management controller to transmit the target control signal to the target controlled device, wherein the frequency of the target control signal is lower than a preset frequency threshold.
[0191] In some optional implementations, the second determining module 402 is specifically configured to:
[0192] Determining a target data transmission rate corresponding to the target controlled device according to the identification information of the target controlled device;
[0193] According to the target data transmission rate, a target coding rule corresponding to the target data transmission rate is obtained, wherein the target coding rule includes a first coding rule for a start signal, a second coding rule for an end signal, and coding rules corresponding to at least one controlled device;
[0194] According to the identification information of the target controlled device, selecting a third coding rule corresponding to the target controlled device from the coding rules respectively corresponding to at least one controlled device;
[0195] According to the first coding rule, the second coding rule and the third coding rule, a configuration rule corresponding to the target controlled device is constructed.
[0196] In some optional implementations, the second determining module 402 is further configured to:
[0197] Periodically reading optical signal status information from the first optical transceiver, wherein the optical signal status information read in any period is used to indicate whether the first optical transceiver receives an optical signal from the second optical transceiver in the period;
[0198] According to a preset monitoring rule, selecting optical signal state information corresponding to at least one period from the optical signal state information periodically read, to form the state information of the first optical transceiver;
[0199] Determining whether the state information of the first optical transceiver complies with a preset response signal configuration rule;
[0200] When it is determined that the state information of the first optical transceiver meets the response signal configuration rule, it is determined that a response signal corresponding to the target control signal is received, wherein the response signal is used to indicate that the second baseboard management controller has transmitted the target control signal to the target controlled device.
[0201] In some optional embodiments, the configuration rules corresponding to the target controlled device include operation instruction information corresponding to at least one cycle, wherein the operation instruction information includes a first numerical value or a second numerical value, the first numerical value is used to indicate that the first optical transceiver sends an optical signal to the second optical transceiver in the cycle, and the second numerical value is used to indicate that the second optical transceiver does not send an optical signal to the second optical transceiver in the cycle.
[0202] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0203] The device for transmitting control signals in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0204] The embodiment of the present invention also provides a computer device having the above Figure 3 The device for transmitting control signals shown in the figure, or having the above Figure 4 The device for transmitting control signals is shown.
[0205] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0206] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0207] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0208] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0209] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0210] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0211] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0212] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0213] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for transmitting a control signal, characterized in that: The method is applied to an optical signal transmission system, the optical signal transmission system comprising a control end and a controlled end, the control end comprising at least one control device, a first baseboard management controller and at least one optical transceiver, the controlled end comprising at least one controlled device, a second baseboard management controller and at least one optical transceiver, the method comprising: The first baseboard management controller receives a reset notification message sent by a target control device, wherein the target control device is any one of the at least one control device, and the reset notification message includes identification information of a target controlled device to be reset, and the target controlled device is any one of the at least one controlled device; Determining a configuration rule corresponding to the target controlled device according to the identification information of the target controlled device to be reset; According to the configuration rule corresponding to the target controlled device, controlling the first optical transceiver corresponding to the target controlled device to transmit an optical signal to the second optical transceiver corresponding to the target controlled device; The second baseboard management controller periodically reads optical signal status information from the second optical transceiver, wherein the optical signal status information read in each period is used to indicate whether the second optical transceiver receives an optical signal from the first optical transceiver in the period; According to a preset monitoring rule, selecting optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the second optical transceiver; Determining whether the status information of the second optical transceiver complies with a preset control signal configuration rule; When it is determined that the state information of the second optical transceiver complies with the control signal configuration rule, determining the target controlled device according to the state information of the second optical transceiver; A target control signal is transmitted to the target controlled device, wherein a frequency of the target control signal is lower than a preset frequency threshold.
2. The method according to claim 1, characterized in that When it is determined that the state information of the second optical transceiver meets the control signal configuration rule, determining the target controlled device according to the state information of the second optical transceiver includes: Parsing the status information of the second optical transceiver to obtain a first code, a second code, and a third code; Determining a target data transmission rate according to the first encoding or the third encoding; The target controlled device is determined according to the target data transmission rate and the second encoding.
3. The method according to claim 2, characterized in that The step of determining the target controlled device according to the target data transmission rate and the second encoding comprises: According to the target data transmission rate, acquiring a corresponding relationship between a controlled device and a code corresponding to the target data transmission rate; The target controlled device corresponding to the second code is determined according to the second code and the corresponding relationship between the controlled device and the code.
4. The method according to any one of claims 1 to 3, characterized in that: After transmitting the target control signal to the target controlled device, the method further includes: Get the target configuration rules; According to the target configuration rule, the second optical transceiver is controlled to transmit an optical signal to the first optical transceiver to inform the first baseboard management controller that the second baseboard management controller has transmitted the target control signal to the target controlled device.
5. The method according to any one of claims 1 to 3, characterized in that: The step of selecting, according to a preset monitoring rule, optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the second optical transceiver comprises: From the optical signal status information periodically read, optical signal status information corresponding to a first preset number of consecutive cycles is selected starting from each cycle to form the status information of the second optical transceiver, wherein the optical signal status information includes the value of the target bit in the target register in the second optical transceiver.
6. The method according to any one of claims 1 to 3, characterized in that: The step of selecting, according to a preset monitoring rule, optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the second optical transceiver comprises: From the optical signal status information periodically read, optical signal status information corresponding to a second preset number of consecutive cycles are selected starting from each cycle to form a fourth code, wherein the optical signal status information includes a value of a target bit in a target register in the second optical transceiver; Determining whether the fourth code is a code of a start signal; When it is determined that the fourth code is the code of the start signal, according to the first cycle after the second consecutive preset number of cycles as the starting cycle, the optical signal state information corresponding to the third consecutive preset number of cycles is selected to form a fifth code; Determining whether the fifth code includes a code of an end signal; When it is determined that the fifth code includes the code of the end signal, the state information of the second optical transceiver is constructed according to the fourth code and the fifth code.
7. The method according to any one of claims 1 to 3, characterized in that: When it is determined that the state information of the second optical transceiver does not comply with the control signal configuration rule, the method further includes: determining whether the state information of the second optical transceiver is abnormal state information; When it is determined that the state information of the second optical transceiver is the abnormal state information, it is determined that the second optical transceiver fails.
8. The method according to claim 4, characterized in that The target configuration rule includes operation instruction information corresponding to at least one period, wherein the operation instruction information in the target configuration rule includes a first value or a second value, the first value included in the operation instruction information in the target configuration rule is used to instruct the second optical transceiver to send an optical signal to the first optical transceiver in the period, and the second value included in the operation instruction information in the target configuration rule is used to instruct the second optical transceiver not to send an optical signal to the first optical transceiver in the period.
9. The method according to claim 1, characterized in that: The determining, according to the identification information of the target controlled device to be reset, a configuration rule corresponding to the target controlled device includes: Determining a target data transmission rate corresponding to the target controlled device according to the identification information of the target controlled device; According to the target data transmission rate, obtaining a target coding rule corresponding to the target data transmission rate, wherein the target coding rule includes a first coding rule for a start signal, a second coding rule for an end signal, and coding rules corresponding to at least one of the controlled devices; According to the flag information of the target controlled device, selecting a third coding rule corresponding to the target controlled device from the coding rules corresponding to at least one of the controlled devices; According to the first coding rule, the second coding rule and the third coding rule, a configuration rule corresponding to the target controlled device is constructed.
10. The method according to claim 1 or 9, characterized in that: After controlling the first optical transceiver corresponding to the target controlled device to transmit an optical signal to the second optical transceiver corresponding to the target controlled device according to the configuration rule corresponding to the target controlled device, the method further includes: Periodically reading optical signal status information from the first optical transceiver, wherein the optical signal status information read in any period is used to indicate whether the first optical transceiver receives an optical signal from the second optical transceiver in the period; According to a preset monitoring rule, selecting optical signal status information corresponding to at least one period from the optical signal status information periodically read to form the status information of the first optical transceiver; Determining whether the state information of the first optical transceiver complies with a preset response signal configuration rule; When it is determined that the status information of the first optical transceiver complies with the response signal configuration rule, it is determined that a response signal corresponding to the target control signal is received, wherein the response signal is used to indicate that the second baseboard management controller has transmitted the target control signal to the target controlled device.
11. The method according to claim 1 or 9, characterized in that: The configuration rule corresponding to the target controlled device includes operation instruction information corresponding to at least one cycle, wherein the operation instruction information in the configuration rule corresponding to the target controlled device includes a first numerical value or a second numerical value, and the first numerical value included in the operation instruction information in the configuration rule corresponding to the target controlled device is used to instruct the first optical transceiver to send an optical signal to the second optical transceiver in the cycle, and the second numerical value included in the operation instruction information in the configuration rule corresponding to the target controlled device is used to instruct the second optical transceiver not to send an optical signal to the second optical transceiver in the cycle.
12. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for transmitting a control signal according to any one of claims 1 to 11 by executing the computer instructions.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for transmitting a control signal according to any one of claims 1 to 11.
14. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the method for transmitting a control signal according to any one of claims 1 to 11.
