A service port lighting method
By parsing serial data to generate LED signals and using different frequency and color combinations of LEDs, the problem of LEDs not supporting multi-MAC split mode on the switch service ports is solved, and effective monitoring of the status of the split service ports is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, switch service ports do not support multi-MAC split mode LED illumination, and cannot effectively indicate the current service status of the split service ports.
A method and apparatus for lighting up a service port are provided. The method generates a lighting signal by parsing serial data and uses different flashing frequencies and color combinations of lights to reflect the splitting status of the service port and the traffic status of the data channel.
It enables the display of service status for split service ports, distinguishes the bandwidth usage status of each channel traffic under different split states, and ensures the timeliness and accuracy of service port status monitoring.
Smart Images

Figure CN115129557B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of servers, and in particular to a service port lighting method. BACKGROUND
[0002] With the rapid development of data center services, the demand for data center switches is also rapidly increasing. Most switch chip manufacturers produce chips that use a clock and data two-lighting scheme and support single-mac mode lighting for service ports, but do not support multi-mac split mode lighting. In actual applications, service ports can be split into several groups to perform different tasks. In order to fully reflect the status of the service port, a switch service port lighting method and system are needed to reflect the status of the service port through the corresponding lighting form even when the service port is split. SUMMARY
[0003] In order to solve the problem that the service port does not support multi-mac split mode lighting in the prior art, and therefore cannot indicate the current service status of the split service port, the embodiments of the present application provide a service port lighting method and device to overcome the obstacle that the service port does not support multi-mac split mode lighting in the prior art, so as to timely monitor the service status of the service port.
[0004] In order to solve one or more of the above technical problems, the technical solutions adopted by the present application are as follows:
[0005] In a first aspect, a service port lighting method is provided, applied to an analysis end, and the method comprises:
[0006] Each time a frame of serial data sent by an execution end is received, the serial data is stored in a first register; wherein the serial data comprises data streams corresponding to each service port;
[0007] The serial data is analyzed to obtain a lighting signal of a current service port to be lighted, and the lighting signal is sent to the execution end for the execution end to light the current service port to be lighted; wherein analyzing the serial data to obtain the lighting signal corresponding to the current service port to be lighted comprises:
[0008] The serial data is analyzed according to a serial data analysis rule to obtain a current data stream corresponding to the current service port to be lighted; and the current data stream is stored in a corresponding register; wherein the current service port to be lighted comprises at least a first type of service port and a second type of service port, the current data stream comprises a first type of data stream corresponding to the first type of service port and a second type of data stream corresponding to the second type of service port, and the corresponding register comprises a second register and a third register, wherein the second register is used to store the first type of data stream, and the third register is used to store the second type of data stream;
[0009] According to the encoding rule corresponding to the current data stream, the current data stream stored in the corresponding register is parsed to obtain the current service state of the current to-be-lit service port; wherein the current service state includes: whether the current to-be-lit service port is split, whether the data channel contained in the current service port has data flow, and whether the data channel contained in the current service port is connected;
[0010] According to the lighting rule and the current service state, a lighting signal of the current to-be-lit service port is generated.
[0011] Further, the method further comprises:
[0012] The serial data is repeatedly parsed to obtain the lighting signal of the current to-be-lit service port until the lighting signal corresponding to each service port is obtained according to the data stream corresponding to each service port.
[0013] Further, the serial data parsing rule comprises:
[0014] The start bit of the serial data is identified, and the start bit indicates the beginning of a frame of serial data;
[0015] Starting from the next bit of the start bit, M1 groups of first type data streams, N groups of second type data streams and M2 groups of first type data streams are sequentially arranged;
[0016] Wherein, N = 2 b , a1, a2, b are natural numbers;
[0017] The next bit of the last bit of the last group of first type data streams is a stop bit, and the stop bit indicates the end of a frame of serial data.
[0018] Further, the encoding rule comprises: a first encoding rule and a second encoding rule;
[0019] Wherein, the first encoding rule corresponds to the first type data stream;
[0020] The second encoding rule corresponds to the second type data stream.
[0021] Further, the first encoding rule comprises:
[0022] The first type data stream comprises a first channel number of data units, wherein each data unit corresponds to a data channel of the first type service port;
[0023] Each data unit comprises: a first data bit, a second data bit, and a third data bit; wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data channel corresponding to the current data unit has data flow, and the third data bit is used to indicate whether the data channel corresponding to the current data unit is connected.
[0024] Further, the second encoding rule comprises:
[0025] The second type of data stream comprises a plurality of data units of a second channel, wherein each data unit corresponds to a data channel of the second type of service port;
[0026] Each data unit comprises a first data bit, a second data bit, and a third data bit; wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data channel corresponding to the current data unit has data traffic, and the third data bit is used to indicate whether the data channel corresponding to the current data unit is connected.
[0027] Further, the lighting rule comprises a first lighting rule and a second lighting rule;
[0028] The first lighting rule corresponds to the first type of data stream;
[0029] The second lighting rule corresponds to the second type of data stream.
[0030] Further, the first lighting rule comprises:
[0031] When the current service port to be lit is not connected, the first color light is turned off and the second color light is turned off;
[0032] When the current service port to be lit is not split and the data channel of the current service port is connected, the first color light is always on; if there is data traffic, the first color light flashes at a first frequency;
[0033] When the current service port to be lit is split into two groups and the data channel of the current service port is fully connected, the first color light is always on, and if there is data traffic, the first color light flashes at a second frequency; when the data channel of the current service port is not fully connected, the second color light is always on, and if there is data traffic, the second color light flashes at the second frequency;
[0034] When the current service port to be lit is split into four groups, the data channel of the current service port is full bandwidth and fully connected, the first color light is always on, and if there is data traffic, the first color light flashes at a third frequency; when the data channel of the current service port is full bandwidth and not fully connected, the second color light is always on, and if there is data traffic, the second color light flashes at the third frequency; when the data channel of the current service port is first bandwidth and fully connected, the first color light is always on, and if there is data traffic, the first color light flashes at a fourth frequency; when the data channel of the current service port is first bandwidth and not fully connected, the second color light is always on, and if there is data traffic, the second color light flashes at the fourth frequency;
[0035] When the current to-be-lit service port is split into 8 groups, the data channel of the current service port is full bandwidth and all connected, the first color lamp is always on, if there is data flow, the first color lamp flashes at the fifth frequency; the data channel of the current service port is full bandwidth and not all connected, the second color lamp is always on, if there is data flow, the second color lamp flashes at the fifth frequency; the data channel of the current service port is the first bandwidth and all connected, the first color lamp is always on, if there is data flow, the first color lamp flashes at the sixth frequency; the data channel of the current service port is the first bandwidth and not all connected, the second color lamp is always on, if there is data flow, the second color lamp flashes at the sixth frequency.
[0036] Further, the second lighting rule comprises:
[0037] When the current to-be-lit service port is not connected, the first color lamp is turned off and the second color lamp is turned off;
[0038] When the current to-be-lit service port is not split, the data channel of the current service port is connected, the first color lamp is always on; if there is data flow, the first color lamp flashes at the first frequency;
[0039] When the current to-be-lit service port is split into 2 groups, the data channel of the current service port is all connected, the first color lamp is always on, if there is data flow, the first color lamp flashes at the second frequency; the data channel of the current service port is not all connected, the second color lamp is always on, if there is data flow, the second color lamp flashes at the second frequency;
[0040] When the current to-be-lit service port is split into 4 groups, the data channel of the current service port is full bandwidth and all connected, the first color lamp is always on, if there is data flow, the first color lamp flashes at the third frequency; the data channel of the current service port is full bandwidth and not all connected, the second color lamp is always on, if there is data flow, the second color lamp flashes at the third frequency; the data channel of the current service port is the first bandwidth and all connected, the first color lamp is always on, if there is data flow, the first color lamp flashes at the fourth frequency; the data channel of the current service port is the first bandwidth and not all connected, the second color lamp is always on, if there is data flow, the second color lamp flashes at the fourth frequency.
[0041] In a second aspect, a service port lighting method is provided, applied to an execution end, the method comprising:
[0042] Sending a frame of serial data to the analysis end every interval of a preset time, so that the analysis end stores and analyzes the serial data to generate a lighting signal corresponding to each service port;
[0043] Receiving the lighting signal corresponding to each service port;
[0044] Lighting each service port according to the lighting signal.
[0045] In a third aspect, a service port lighting device is provided, which is applied to an analysis end, and the device comprises: a receiving and storing module, and a serial analysis module.
[0046] The receiving and storing module is configured to store serial data in a first register after receiving the serial data sent by the execution end each time; wherein the serial data comprises data streams corresponding to each service port.
[0047] The serial analysis module is configured to analyze the serial data, obtain a lighting signal of a current service port to be lighted, and send the lighting signal to the execution end, so that the execution end lights the current service port to be lighted.
[0048] The serial analysis module comprises: a data stream obtaining submodule, an encoding analysis submodule, and a state analysis submodule.
[0049] The data stream obtaining submodule is configured to analyze the serial data according to a serial data analysis rule, and obtain a current data stream corresponding to the current service port to be lighted; and store the current data stream in a corresponding register; wherein the current service port to be lighted comprises at least a first type of service port and a second type of service port, the current data stream comprises a first type of data stream corresponding to the first type of service port and a second type of data stream corresponding to the second type of service port, and the corresponding register comprises a second register and a third register, wherein the second register is configured to store the first type of data stream, and the third register is configured to store the second type of data stream.
[0050] The encoding analysis submodule is configured to analyze the current data stream stored in the corresponding register according to an encoding rule corresponding to the current data stream, and obtain a current service state of the current service port to be lighted; wherein the current service state comprises whether the current service port to be lighted is split, whether a data channel contained in the current service port has data flow, and whether the data channel contained in the current service port is connected.
[0051] The state analysis submodule is configured to generate the lighting signal of the current service port to be lighted according to a lighting rule and the current service state.
[0052] In a fourth aspect, a service port lighting device is provided, which is applied to an execution end, and the device comprises: a data sending module, a signal receiving module, and a lighting module.
[0053] The data sending module is configured to send a frame of serial data to the analysis end at a preset interval, so that the analysis end stores and analyzes the serial data, and generates a lighting signal corresponding to each service port.
[0054] The signal receiving module is configured to receive the lighting signal corresponding to each service port.
[0055] The lighting module is configured to light each service port according to the lighting signal.
[0056] The technical scheme provided by the embodiment of the present application has the beneficial effects of:
[0057] 1. By implementing the technical scheme described in the first aspect, the display of the service port state after splitting is realized.
[0058] 2. By implementing different flashing frequencies, the bandwidth occupation state of each channel flow in different splitting states of the service port is distinguished. BRIEF DESCRIPTION OF DRAWINGS
[0059] In order to more clearly illustrate the technical scheme in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0060] Figure 1 is a service port lighting method schematic diagram applied to the analysis end provided by the embodiment of the present application;
[0061] Figure 2 is a serial data structure schematic diagram provided by the embodiment of the present application;
[0062] Figure 3 is another serial data structure schematic diagram provided by the embodiment of the present application;
[0063] Figure 4 is a 400G service port data flow structure schematic diagram provided by the embodiment of the present application;
[0064] Figure 5 is a 200G service port data flow structure schematic diagram provided by the embodiment of the present application;
[0065] Figure 6 is a service port lighting method schematic diagram applied to the execution end provided by the embodiment of the present application;
[0066] Figure 7 is a service port lighting device schematic diagram applied to the analysis end provided by the embodiment of the present application;
[0067] Figure 8 is a service port lighting device schematic diagram applied to the execution end provided by the embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the objects, technical solutions and advantages of the present application clearer, the following will be combined with the drawings of the embodiments of the present application to make a clear and complete description of the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0069] Unless otherwise defined, technical terms or scientific terms used in the present disclosure shall have the ordinary meaning as understood by a person skilled in the art to which the present disclosure belongs. The terms "first", "second", and similar terms used in the present disclosure do not denote any order, quantity, or importance, but are used to distinguish different components. Similarly, the terms "one", "a", or "the" and similar terms do not denote a quantity restriction, but mean that there is at least one. The numbers in the drawings of the specification only represent the distinction of the respective functional components or modules, and do not represent the logical relationship between the components or modules. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like only represent relative positional relationships, which can change accordingly when the absolute positions of the described objects change.
[0070] In the following, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. It should be noted that in the drawings, the same reference signs are assigned to components having substantially the same or similar structure and function, and repeated descriptions thereof will be omitted.
[0071] In the prior art, the service port does not support the multi-mac splitting mode lighting, and therefore cannot indicate the current service state problem of the split service port. Embodiments of the present application disclose a service port lighting method and device to overcome the obstacle that the service port does not support the multi-mac splitting mode lighting in the prior art, so as to timely monitor the service state of the service port.
[0072] In one embodiment, as shown in FIG. 1, a service port lighting method applied to an analysis end, the method comprising: Figure 1
[0073] Step S1-1: store the serial data in a first register upon receiving a frame of serial data sent by an execution end; wherein the serial data comprises data streams corresponding to respective service ports;
[0074] Step S1-2: parsing the serial data to obtain the lighting signal of the current to-be-lighted service port, and sending the lighting signal to the execution end to light the current to-be-lighted service port; wherein, the parsing of the serial data to obtain the lighting signal corresponding to the current to-be-lighted service port specifically comprises:
[0075] Step S1-21: parsing the serial data according to the serial data parsing rule to obtain the current data stream corresponding to the current to-be-lighted service port; and storing the current data stream in the corresponding register; wherein, the current to-be-lighted service port at least includes the first type service port and the second type service port, the current data stream includes the first type data stream corresponding to the first type service port and the second type data stream corresponding to the second type service port, and the corresponding register includes the second register and the third register, wherein, the second register is used to store the first type data stream, and the third register is used to store the second type data stream;
[0076] Step S1-22: parsing the current data stream stored in the corresponding register according to the encoding rule corresponding to the current data stream to obtain the current service state of the current to-be-lighted service port; wherein, the current service state includes whether the current to-be-lighted service port is split, whether the data channel contained in the current service port has data flow, and whether the data channel contained in the current service port is connected;
[0077] Step S1-23: generating the lighting signal of the current to-be-lighted service port according to the lighting rule and the current service state.
[0078] Generally, the CPLD (Complex Programmable Logic Device) is used as the parsing end to parse the serial data sent by the execution end; the execution end generally refers to the switch, and the switch panel is provided with the connection port and the indicator lamp corresponding to each connection port. The data structure of the above-mentioned one frame of serial data is as shown in Figure 2 , which includes the start bit, M+N serial data streams, and the stop bit, wherein M=M1+M2.
[0079] In another embodiment, the data structure of the serial data is as shown in Figure 3 , which includes the start bit, 32 serial data streams, and the stop bit. Among them, the serial data streams include 4 400G service port data streams, 24 200G service port data streams, and 4 400G service port data streams in turn.
[0080] For the 400G service port, as shown in Figure 4 , each data stream includes the state of 8 channels, wherein each channel uses 3 bits to represent the channel state, and therefore, each 400G service port has 24 bits of data.
[0081] For the 200G service port, as shown in Figure 5 each data stream includes the status of 4 channels, wherein each channel uses 3 bits to represent the channel status, and thus each 200G service port has 12 bits of data.
[0082] Therefore, in this embodiment, one frame of data includes at least 482 bits of data, including 1 bit of start bit, 480 bits of data stream data and 1 bit of stop bit.
[0083] Therefore, for the first register, it is required to be able to store 482 bits of data.
[0084] In the above embodiment, the first type of service port corresponds to a 400G service port, and the second type of service port corresponds to a 200G service port.
[0085] In one embodiment, the second register for storing the first type of data stream can store at least 24 bits of data at a time; and the third register for storing the second type of data stream can store at least 12 bits of data at a time.
[0086] The above method further includes:
[0087] Step S1-3: repeatedly parsing the serial data to obtain the lighting signal of the current service port to be lighted until the lighting signal corresponding to each service port is obtained according to the data stream corresponding to each service port.
[0088] The above serial data parsing rule includes:
[0089] The start bit of the serial data is identified, and the start bit indicates the beginning of one frame of serial data;
[0090] The next bit after the start bit is sequentially arranged with M1 groups of first type of data stream, N groups of second type of data stream and M2 groups of first type of data stream;
[0091] wherein, N = 2 b a1, a2, b are natural numbers;
[0092] The next bit after the last bit of the last group of first type of data stream is a stop bit, and the stop bit indicates the end of one frame of serial data.
[0093] The above encoding rule includes a first encoding rule and a second encoding rule;
[0094] The first encoding rule corresponds to the first type of data stream;
[0095] The second encoding rule corresponds to the second type of data stream.
[0096] Specifically, the first encoding rule includes:
[0097] The first type of data stream includes a first number of data units corresponding to a first number of data lanes of a first service port;
[0098] Each data unit includes a first data bit, a second data bit, and a third data bit, wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data lane corresponding to the current data unit has data traffic, and the third data bit is used to indicate whether the data lane corresponding to the current data unit is connected.
[0099] As described above, in another embodiment, the first type of data stream corresponds to a 400G service port, the first number is 8, the first data bit is a "RES" bit indicating whether the current service port to be lit is split, the second data bit is an "ACT" bit indicating whether the data lane included in the current service port has data traffic, and the third data bit is a "LINK" bit indicating whether the data lane corresponding to the current data unit is connected.
[0100] Specifically, the second encoding rule includes:
[0101] The second type of data stream includes a second number of data units corresponding to a second number of data lanes of a second service port;
[0102] Each data unit includes a first data bit, a second data bit, and a third data bit, wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data lane corresponding to the current data unit has data traffic, and the third data bit is used to indicate whether the data lane corresponding to the current data unit is connected.
[0103] In another embodiment, the first type of data stream corresponds to a 200G service port, the first number is 4, the first data bit is a "RES" bit indicating whether the current service port to be lit is split, the second data bit is an "ACT" bit indicating whether the data lane included in the current service port has data traffic, and the third data bit is a "LINK" bit indicating whether the data lane corresponding to the current data unit is connected.
[0104] The specific meaning of "yes" or "no" represented by "0" or "1" of each data bit can be defined by those skilled in the art, and the present application does not limit this.
[0105] The above lighting rule includes a first lighting rule and a second lighting rule;
[0106] The first lighting rule corresponds to the first type of data stream;
[0107] The second lighting rule corresponds to the second type of data stream.
[0108] Specifically, the first lighting rule includes:
[0109] When the current service port to be lighted is not connected, the first color light is off and the second color light is off;
[0110] When the current service port to be lighted is not split and the data channel of the current service port is connected, the first color light is always on; if there is data flow, the first color light flashes at a first frequency;
[0111] When the current service port to be lighted is split into two groups and the data channel of the current service port is fully connected, the first color light is always on; if there is data flow, the first color light flashes at a second frequency; when the data channel of the current service port is not fully connected, the second color light is always on; if there is data flow, the second color light flashes at the second frequency;
[0112] When the current service port to be lighted is split into four groups, the data channel of the current service port is full bandwidth and fully connected, the first color light is always on; if there is data flow, the first color light flashes at a third frequency; when the data channel of the current service port is full bandwidth and not fully connected, the second color light is always on; if there is data flow, the second color light flashes at the third frequency; when the data channel of the current service port is first bandwidth and fully connected, the first color light is always on; if there is data flow, the first color light flashes at a fourth frequency; when the data channel of the current service port is first bandwidth and not fully connected, the second color light is always on; if there is data flow, the second color light flashes at the fourth frequency;
[0113] When the current service port to be lighted is split into eight groups, the data channel of the current service port is full bandwidth and fully connected, the first color light is always on; if there is data flow, the first color light flashes at a fifth frequency; when the data channel of the current service port is full bandwidth and not fully connected, the second color light is always on; if there is data flow, the second color light flashes at the fifth frequency; when the data channel of the current service port is first bandwidth and fully connected, the first color light is always on; if there is data flow, the first color light flashes at a sixth frequency; when the data channel of the current service port is first bandwidth and not fully connected, the second color light is always on; if there is data flow, the second color light flashes at the sixth frequency.
[0114] The first to sixth frequencies can be the same or different to distinguish the service port state. The present application does not limit this.
[0115] The colors of the first and second color lights are required to be different to distinguish the different states of the service port. The specific colors are not limited in the present application. Generally, the first color light is green and the second color light is yellow.
[0116] In one embodiment, the first to sixth frequencies are consistent.
[0117] If the current to-be-lit service port is not connected (i.e., is idle), turn off the green and yellow lights;
[0118] If the current to-be-lit service port is not split, i.e., is in the 1x400G mode, the green light is always on; if there is data traffic, the green light flashes; and if it is idle, the green light is turned off.
[0119] If the current to-be-lit service port is split into two groups, i.e., is in the 2x200G mode, if both groups of 200G are connected, the green light is on; if there is data traffic, the green light flashes; and if it is idle, the green light is turned off.
[0120] If the current to-be-lit service port is split into four groups, i.e., is in the 4x100G mode or the 4x25G mode, if all links are connected, the green light is on; if there is data traffic, the green light flashes; and if it is idle, the green light is turned off.
[0121] If the current to-be-lit service port is split into eight groups, i.e., is in the 8x50G mode or the 8x25G mode, if all links are connected, the green light is on; if there is data traffic, the green light flashes; and if it is idle, the green light is turned off.
[0122] Specifically, the second lighting rule includes:
[0123] When the current to-be-lit service port is not connected, turn off the first color light and turn off the second color light.
[0124] When the current to-be-lit service port is not split and the data channels of the current service port are connected, the first color light is always on; if there is data traffic, the first color light flashes at a first frequency.
[0125] When the current to-be-lit service port is split into two groups and the data channels of the current service port are all connected, the first color light is always on; if there is data traffic, the first color light flashes at a second frequency; when the data channels of the current service port are not all connected, the second color light is always on; if there is data traffic, the second color light flashes at the second frequency.
[0126] When the current to-be-lit service port is split into four groups, when the data channels of the current service port are full bandwidth and all connected, the first color light is always on; if there is data traffic, the first color light flashes at a third frequency; when the data channels of the current service port are full bandwidth and not all connected, the second color light is always on; if there is data traffic, the second color light flashes at the third frequency; when the data channels of the current service port are first bandwidth and all connected, the first color light is always on; if there is data traffic, the first color light flashes at a fourth frequency; when the data channels of the current service port are first bandwidth and not all connected, the second color light is always on; if there is data traffic, the second color light flashes at the fourth frequency.
[0127] In one embodiment, the first to sixth frequencies are consistent.
[0128] If the current to-be-lit service port is not connected (i.e. idle), turn off the green and yellow lights;
[0129] If the current to-be-lit service port is not split, i.e. 1x400G mode, the green light is always on; if there is data flow, the green light flashes, and if idle, the green light is turned off;
[0130] If the current to-be-lit service port is split into two groups, i.e. 2x200G mode, if both groups of 200G are connected, the green light is on, and if there is flow, the green light flashes; if all are idle, the green light is turned off; if partially connected, the yellow light is on, and if there is flow, the yellow light flashes;
[0131] If the current to-be-lit service port is split into four groups, i.e. 4x100G mode or 4x25G mode, if all are connected, the green light is on, and if there is flow, the green light flashes; if all are idle, the green light is turned off; if partially connected, the yellow light is on, and if there is flow, the yellow light flashes.
[0132] In another embodiment, as shown in Figure 6 a service port lighting method is provided, applied to an execution end, the method comprising:
[0133] Step 2-1: send a frame of serial data to the analysis end every interval of a preset time, so that the analysis end stores and analyzes the serial data to generate a lighting signal corresponding to each service port;
[0134] Step 2-2: receive the lighting signal corresponding to each service port;
[0135] Step 2-3: light each service port according to the lighting signal.
[0136] The generation method of the lighting signal is recorded in the first aspect.
[0137] In another embodiment, as shown in Figure 7 a service port lighting device is provided, applied to an analysis end, the device comprising: a receiving and storing module, a serial analysis module;
[0138] The receiving and storing module is used to store the serial data in a first register every time a frame of serial data sent by the execution end is received; wherein the serial data includes data streams corresponding to each service port;
[0139] The serial analysis module is used to analyze the serial data, obtain the lighting signal of the current to-be-lit service port, and send the lighting signal to the execution end, so that the execution end lights the current to-be-lit service port;
[0140] The serial analysis module comprises a data stream acquisition submodule, an encoding analysis submodule, and a state analysis submodule.
[0141] The data stream acquisition submodule is configured to analyze serial data according to a serial data analysis rule, to obtain a current data stream corresponding to a current to-be-lit service port, and to store the current data stream in a corresponding register.
[0142] The encoding analysis submodule is configured to analyze the current data stream stored in the corresponding register according to an encoding rule corresponding to the current data stream, to obtain a current service state of the current to-be-lit service port.
[0143] The state analysis submodule is configured to generate a lighting signal of the current to-be-lit service port according to a lighting rule and the current service state.
[0144] In another embodiment, as shown in FIG. 1, a service port lighting device is applied to an execution end, and the device comprises a data sending module, a signal receiving module, and a lighting module. Figure 8
[0145] The data sending module is configured to send a frame of serial data to an analysis end every interval of a preset time, so that the analysis end stores and analyzes the serial data and generates a lighting signal corresponding to each service port.
[0146] The signal receiving module is configured to receive the lighting signal corresponding to each service port.
[0147] The lighting module is configured to light each service port according to the lighting signal.
[0148] All the optional technical solutions described above can be combined to form optional embodiments of the present application, and thus will not be described again.
[0149] Embodiment One
[0150] The following will be described in detail with reference to FIG. 2, which is a flowchart of a service port lighting method applied to an analysis end. Figures 1-5
[0151] In one embodiment, as shown in FIG. 2, a service port lighting method is applied to an analysis end, and the method comprises the following steps. Figure 1 In one embodiment, as shown in FIG. 2, a service port lighting method is applied to an analysis end, and the method comprises the following steps.
[0152] Step S1-1: store the serial data sent by the execution end in the first register upon receiving each frame of serial data; wherein the serial data comprises data streams corresponding to each service port;
[0153] Step S1-2: analyze the serial data to obtain the lighting signal of the current service port to be lighted, and send the lighting signal to the execution end for lighting the current service port to be lighted; wherein analyzing the serial data to obtain the lighting signal corresponding to the current service port to be lighted specifically comprises:
[0154] Step S1-21: analyze the serial data according to the serial data analysis rule to obtain the current data stream corresponding to the current service port to be lighted; and store the current data stream in the corresponding register; wherein the current service port to be lighted includes at least the first type service port and the second type service port, the current data stream includes the first type data stream corresponding to the first type service port and the second type data stream corresponding to the second type service port, and the corresponding register includes the second register and the third register, wherein the second register is used to store the first type data stream, and the third register is used to store the second type data stream;
[0155] Step S1-22: analyze the current data stream stored in the corresponding register according to the encoding rule corresponding to the current data stream to obtain the current service state of the current service port to be lighted; wherein the current service state includes whether the current service port to be lighted is split, whether the data channel contained in the current service port has data flow, and whether the data channel contained in the current service port is connected;
[0156] Step S1-23: generate the lighting signal of the current service port to be lighted according to the lighting rule and the current service state.
[0157] The CPLD is used as the analysis end to analyze the serial data sent by the execution end; the switch is used as the execution end, and the switch panel is provided with connection ports and indicator lights corresponding to each connection port. The data structure of a frame of serial data is shown in Figure 3
[0158] Among them, the serial data stream includes 4 400G service port data streams, 24 200G service port data streams and 4 400G service port data streams in turn.
[0159] For the 400G service port, as shown in Figure 4 Each data stream includes the state of 8 channels, and each channel uses 3 bits to represent the channel state, so each 400G service port has 24 bits of data.
[0160] For the 200G service port, as shown in Figure 5 As shown, each data stream includes the status of 4 channels, wherein each channel uses 3 bits to represent the channel status, and thus each 200G service port has a total of 12 bits of data.
[0161] Therefore, one frame of data includes at least 482 bits of data, wherein 1 bit is a start bit, 480 bits are data stream data, and 1 bit is a stop bit.
[0162] Therefore, for the first register, it is required to be able to store at least 482 bits of data.
[0163] In the above embodiment, the first type of service port corresponds to a 400G service port, and the second type of service port corresponds to a 200G service port.
[0164] In one embodiment, the second register for storing the first type of data stream is capable of storing at least 24 bits of data at a time; and the third register for storing the second type of data stream is capable of storing at least 12 bits of data at a time.
[0165] The above method further includes:
[0166] Step S1-3: Repeating the parsing of the serial data to obtain the lighting signal of the current service port to be lighted until the lighting signal corresponding to each service port is obtained according to the data stream corresponding to each service port.
[0167] The above serial data parsing rule includes:
[0168] The start bit of the serial data is identified, and the start bit indicates the beginning of one frame of serial data;
[0169] Starting from the next bit of the start bit, there are 4 groups of first type of data stream, 24 groups of second type of data stream, and 4 groups of first type of data stream arranged in sequence;
[0170] The next bit of the last bit of the last group of first type of data stream is a stop bit, and the stop bit indicates the end of one frame of serial data.
[0171] The above encoding rule includes a first encoding rule and a second encoding rule;
[0172] The first encoding rule corresponds to the first type of data stream;
[0173] The second encoding rule corresponds to the second type of data stream.
[0174] Specifically, the first encoding rule includes:
[0175] The first type of data stream includes 8 data units, wherein each data unit corresponds to one data channel of the first type of service port;
[0176] Each data unit comprises: a first data bit, a second data bit, and a third data bit; wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data channel corresponding to the current data unit has data traffic, and the third data bit is used to indicate whether the data channel corresponding to the current data unit is connected.
[0177] As described above, in another embodiment, the first type of data stream corresponds to a 400G service port, the first channel number is 8, the first data bit is a "RES" bit, indicating whether the current to-be-lit service port is split, the second data bit is an "ACT", indicating whether the data channel contained in the current service port has data traffic, and the third data bit is a "LINK", indicating whether the data channel corresponding to the current data unit is connected.
[0178] Specifically, the second encoding rule comprises:
[0179] The second type of data stream comprises four data units, wherein each data unit corresponds to a data channel of the second type of service port.
[0180] Each data unit comprises: a first data bit, a second data bit, and a third data bit; wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data channel corresponding to the current data unit has data traffic, and the third data bit is used to indicate whether the data channel corresponding to the current data unit is connected.
[0181] In another embodiment, the first type of data stream corresponds to a 200G service port, the first channel number is 4, the first data bit is a "RES" bit, indicating whether the current to-be-lit service port is split, the second data bit is an "ACT", indicating whether the data channel contained in the current service port has data traffic, and the third data bit is a "LINK", indicating whether the data channel corresponding to the current data unit is connected.
[0182] The specific meaning of "yes" or "no" represented by "0" or "1" of each data bit can be defined by those skilled in the art, and the present application does not limit this.
[0183] The above lighting rule comprises: a first lighting rule and a second lighting rule;
[0184] The first lighting rule corresponds to the first type of data stream.
[0185] The second lighting rule corresponds to the second type of data stream.
[0186] The first lighting rule comprises:
[0187] If the current to-be-lit service port is not connected (i.e. idle), turn off the green and yellow lights;
[0188] If the current to-be-lit service port is not split, i.e., 1x400G mode, the green light is always on; if there is data flow, the green light flashes at a fixed frequency; if idle, the green light is off;
[0189] If the current to-be-lit service port is split into two groups, i.e., 2x200G mode, if both groups of 200G are connected and bright green light, there is flow, the green light flashes at a fixed frequency; if all idle, the green light is off; if partially connected, bright yellow light, there is flow, the yellow light flashes at a fixed frequency;
[0190] If the current to-be-lit service port is split into four groups, i.e., 4x100G mode or 4x25G mode, if all connected, bright green light, there is flow, the green light flashes at a fixed frequency; if all idle, the green light is off; if partially connected, bright yellow light, there is flow, the yellow light flashes at a fixed frequency.
[0191] If the current to-be-lit service port is split into eight groups, i.e., 8x50G mode or 8x25G mode, if all connected, bright green light, there is flow, the green light flashes at a fixed frequency; if all idle, the green light is off; if partially connected, bright yellow light, there is flow, the yellow light flashes at a fixed frequency.
[0192] The first to sixth frequencies are consistent, which are fixed frequencies; the green light is the first color light, and the yellow light is the second color light.
[0193] The second lighting rule includes:
[0194] If the current to-be-lit service port is not connected (i.e., idle), the green light and the yellow light are off;
[0195] If the current to-be-lit service port is not split, i.e., 1x200G mode, the green light is always on; if there is data flow, the green light flashes at a fixed frequency; if idle, the green light is off;
[0196] If the current to-be-lit service port is split into two groups, i.e., 2x100G mode, if both groups of 200G are connected and bright green light, there is flow, the green light flashes at a fixed frequency; if all idle, the green light is off; if partially connected, bright yellow light, there is flow, the yellow light flashes at a fixed frequency.
[0197] If the current to-be-lit service port is split into four groups, i.e., 4x50G mode or 4x25G mode, if all connected, bright green light, there is flow, the green light flashes at a fixed frequency; if all idle, the green light is off; if partially connected, bright yellow light, there is flow, the yellow light flashes at a fixed frequency.
[0198] The first to fourth frequencies are consistent, which are fixed frequencies; the green light is the first color light, and the yellow light is the second color light.
[0199] Embodiment two
[0200] The following will be described in detail Figure 6 A service port lighting method is applied to an execution end, and the method comprises the following steps:
[0201] Step 2-1: A frame of serial data is sent to the analysis end every preset time interval, so that the analysis end stores and analyzes the serial data to generate a lighting signal corresponding to each service port;
[0202] Step 2-2: The lighting signal corresponding to each service port is received;
[0203] Step 2-3: Each service port is lighted according to the lighting signal.
[0204] The generation mode of the lighting signal is described in the first aspect and will not be repeated here.
[0205] Embodiment three
[0206] The following will be described in detail Figure 7 A service port lighting device is applied to an analysis end, and the device comprises a receiving and storing module and a serial analysis module.
[0207] The receiving and storing module is configured to store the serial data in a first register after receiving a frame of serial data sent by the execution end; wherein the serial data comprises data streams corresponding to each service port.
[0208] The serial analysis module is configured to analyze the serial data, obtain a lighting signal of a current service port to be lighted, and send the lighting signal to the execution end, so that the execution end lights the current service port to be lighted.
[0209] The serial analysis module comprises a data stream acquisition submodule, an encoding analysis submodule, and a state analysis submodule.
[0210] The data stream acquisition submodule is configured to analyze the serial data according to a serial data analysis rule to obtain a current data stream corresponding to the current service port to be lighted, and store the current data stream in a corresponding register; wherein the current service port to be lighted comprises at least a first type of service port and a second type of service port, the current data stream comprises a first type of data stream corresponding to the first type of service port and a second type of data stream corresponding to the second type of service port, and the corresponding register comprises a second register and a third register, wherein the second register is configured to store the first type of data stream, and the third register is configured to store the second type of data stream.
[0211] The encoding analysis submodule is configured to analyze the current data stream stored in the corresponding register according to an encoding rule corresponding to the current data stream to obtain a current service state of the current service port to be lighted; wherein the current service state comprises whether the current service port to be lighted is split, whether a data channel contained in the current service port has data flow, and whether the data channel contained in the current service port is connected.
[0212] The state analysis submodule is configured to generate a lighting signal of the current to-be-lighted service port according to the lighting rule and the current service state.
[0213] Embodiment Four
[0214] The following will be combined Figure 8 to specifically describe a service port lighting device applied to an execution end, the device comprising: a data sending module, a signal receiving module, and a lighting module.
[0215] The data sending module is configured to send a frame of serial data to the analysis end every interval of a preset time, so that the analysis end stores and analyzes the serial data to generate a lighting signal corresponding to each service port.
[0216] The signal receiving module is configured to receive the lighting signal corresponding to each service port.
[0217] The lighting module is configured to light each service port according to the lighting signal.
[0218] In particular, according to the embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program loaded on a computer readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from a memory, or installed from a ROM. When the computer program is executed by an external processor, the above-mentioned functions defined in the method of the embodiments of the present application are executed.
[0219] It should be noted that the computer readable medium in the embodiments of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the embodiments of the present application, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to a wire, an optical fiber, an RF (Radio Frequency) or the like, or any suitable combination of the above.
[0220] The computer readable medium described above can be contained in the server described above; or can exist separately and not be assembled into the server. The computer readable medium described above carries one or more programs, when the one or more programs are executed by the server, the server: in response to detecting that the peripheral mode of the terminal is not activated, acquires the frame rate of the application on the terminal; when the frame rate meets the off-screen condition, judges whether the user is acquiring the screen information of the terminal; in response to the judgment result that the user is not acquiring the screen information of the terminal, controls the screen to enter the immediate dim mode.
[0221] Computer program code for carrying out operations of embodiments of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0222] The various embodiments in the specification are described in progressive manner, and the same or similar parts among the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the system or system embodiments are described simply because they are basically similar to the method embodiments. The relevant parts can be referred to the description of the method embodiments. The system and system embodiments described above are merely illustrative, and the units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e. they can be located in one place or distributed in multiple network units. Some or all of the modules can be selected to achieve the purpose of the embodiments according to the actual needs. Those skilled in the art can understand and implement without creative labor.
[0223] The technical solutions provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by applying specific examples. The above description of the embodiments is only to help understand the method and core idea of the present application; meanwhile, those skilled in the art can make changes in the specific implementation manners and application scope according to the idea of the present application. In conclusion, the content of the specification should not be understood as a limitation of the present application.
[0224] The above only describes the preferred embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A service port lighting method, applied to an analysis end, characterized in that, The method comprises: Upon receiving a frame of serial data sent by the execution end, storing the serial data in a first register; wherein the serial data comprises data streams corresponding to each service port; Analyzing the serial data to obtain a lighting signal of a current service port to be lighted, and sending the lighting signal to the execution end for lighting the current service port to be lighted; wherein the analyzing the serial data to obtain the lighting signal corresponding to the current service port to be lighted comprises: According to a serial data analysis rule, analyzing the serial data to obtain a current data stream corresponding to the current service port to be lighted, and storing the current data stream in a corresponding register; wherein the current service port to be lighted comprises at least a first type of service port and a second type of service port, the current data stream comprises a first type of data stream corresponding to the first type of service port and a second type of data stream corresponding to the second type of service port, and the corresponding register comprises a second register and a third register, wherein the second register is used to store the first type of data stream, and the third register is used to store the second type of data stream; According to an encoding rule corresponding to the current data stream, analyzing the current data stream stored in the corresponding register to obtain a current service state of the current service port to be lighted; wherein the current service state comprises whether the current service port to be lighted is split, whether a data channel contained in the current service port has data flow, and whether the data channel contained in the current service port is connected; According to a lighting rule and the current service state, generating a lighting signal of the current service port to be lighted; Wherein, a frame of serial data comprises at least a start bit, a stop bit, and a plurality of data bits; The encoding rule comprises a first encoding rule and a second encoding rule; The first encoding rule corresponds to the first type of data stream; The second encoding rule corresponds to the second type of data stream; The lighting rule comprises a first lighting rule and a second lighting rule; The first lighting rule corresponds to the first type of data stream; The second lighting rule corresponds to the second type of data stream.
2. The method of claim 1, wherein, The method further comprises: Repeating the analysis of the serial data to obtain the lighting signal of the current service port to be lighted until the lighting signal corresponding to each service port is obtained according to the data stream corresponding to each service port.
3. The method of claim 1, wherein the service point light is lit if the service point is not in the list of service points. The serial data analysis rule comprises: Identifying the start bit of the serial data, wherein the start bit indicates the beginning of a frame of serial data; from the next bit of the start bit, in order, are M 1 group of first type data stream, N a group of second type data stream and M 2 groups of first type data stream; wherein , , , a 1, a 2, b is a natural number; The next bit after the last bit of the last group of first type of data stream is a stop bit, wherein the stop bit indicates the end of a frame of serial data.
4. The method of claim 1, wherein, The first encoding rule comprises: The first type of data stream comprises a first number of data units, wherein each data unit corresponds to a data channel of the first type of service port; Each data unit comprises a first data bit, a second data bit, and a third data bit, wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data channel corresponding to the current data unit has data flow, and the third data bit is used to indicate whether the data channel corresponding to the current data unit is connected.
5. The method of claim 1, wherein, The second encoding rule comprises: The second type of data stream includes a plurality of data units of a second channel, wherein each data unit corresponds to a data channel of the second type of service port; Each data unit includes: a first data bit, a second data bit, and a third data bit; wherein the first data bit is used to indicate whether the current service port is split, the second data bit is used to indicate whether the data channel corresponding to the current data unit has data traffic, and the third data bit is used to indicate whether the data channel corresponding to the current data unit is connected.
6. The method of claim 1, wherein, The first lighting rule includes: When the current to-be-lit service port is not connected, turn off the first color lamp and the second color lamp; When the current to-be-lit service port is not split and the data channel of the current service port is connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a first frequency; When the current to-be-lit service port is split into two groups and the data channel of the current service port is fully connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a second frequency; when the data channel of the current service port is not fully connected, the second color lamp is always on; if there is data traffic, the second color lamp flashes at the second frequency; When the current to-be-lit service port is split into four groups, the data channel of the current service port is full bandwidth and fully connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a third frequency; when the data channel of the current service port is full bandwidth and not fully connected, the second color lamp is always on; if there is data traffic, the second color lamp flashes at the third frequency; when the data channel of the current service port is first bandwidth and fully connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a fourth frequency; when the data channel of the current service port is first bandwidth and not fully connected, the second color lamp is always on; if there is data traffic, the second color lamp flashes at the fourth frequency; When the current to-be-lit service port is split into eight groups, the data channel of the current service port is full bandwidth and fully connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a fifth frequency; when the data channel of the current service port is full bandwidth and not fully connected, the second color lamp is always on; if there is data traffic, the second color lamp flashes at the fifth frequency; when the data channel of the current service port is first bandwidth and fully connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a sixth frequency; when the data channel of the current service port is first bandwidth and not fully connected, the second color lamp is always on; if there is data traffic, the second color lamp flashes at the sixth frequency.
7. The method of claim 1, wherein the service point light is lit based on a determination that the service point is not in use. The second lighting rule includes: When the current to-be-lit service port is not connected, turn off the first color lamp and the second color lamp; When the current to-be-lit service port is not split and the data channel of the current service port is connected, the first color lamp is always on; if there is data traffic, the first color lamp flashes at a first frequency; When the current to-be-lit service port is split into two groups and the data channels of the current service port are all connected, the first color lamp is always on, and if there is data flow, the first color lamp flashes at a second frequency; when the data channels of the current service port are not all connected, the second color lamp is always on, and if there is data flow, the second color lamp flashes at the second frequency. When the current to-be-lit service port is split into four groups, the data channels of the current service port are full bandwidth and all connected, the first color lamp is always on, and if there is data flow, the first color lamp flashes at a third frequency; when the data channels of the current service port are full bandwidth and not all connected, the second color lamp is always on, and if there is data flow, the second color lamp flashes at the third frequency; when the data channels of the current service port are first bandwidth and all connected, the first color lamp is always on, and if there is data flow, the first color lamp flashes at a fourth frequency; when the data channels of the current service port are first bandwidth and not all connected, the second color lamp is always on, and if there is data flow, the second color lamp flashes at the fourth frequency.
8. A service point-on method applied to an execution end, characterized in that, The method comprises: sending a frame of serial data to the analysis end every interval of a preset time, so that the analysis end generates a lighting signal corresponding to each service port according to the service port lighting method of any one of claims 1-7; receiving the lighting signal corresponding to each service port; lighting each service port according to the lighting signal.
Citation Information
Patent Citations
Indicator light control device and method
CN111479372A
Method and device for controlling switch indicating lamp, single-chip microcomputer and storage medium
CN113671883A