CN116414530A - Method and device for executing alarm operation, storage medium and electronic device - Google Patents

Method and device for executing alarm operation, storage medium and electronic device Download PDF

Info

Publication number
CN116414530A
CN116414530A CN202111663257.1A CN202111663257A CN116414530A CN 116414530 A CN116414530 A CN 116414530A CN 202111663257 A CN202111663257 A CN 202111663257A CN 116414530 A CN116414530 A CN 116414530A
Authority
CN
China
Prior art keywords
configuration information
alarm
field
matched
matching result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111663257.1A
Other languages
Chinese (zh)
Inventor
程鑫祥
戚晨希
陈俊蓉
刘与涵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Centec Communications Co Ltd
Original Assignee
Suzhou Centec Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Centec Communications Co Ltd filed Critical Suzhou Centec Communications Co Ltd
Priority to CN202111663257.1A priority Critical patent/CN116414530A/en
Publication of CN116414530A publication Critical patent/CN116414530A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • G06F9/4825Interrupt from clock, e.g. time of day
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/18Status alarms
    • G08B21/24Reminder alarms, e.g. anti-loss alarms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention discloses an execution method and device of alarm operation, a storage medium and an electronic device, wherein the method comprises the following steps: when a communication link is established between a first device and a second device, detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not through a target detection thread on the first device at intervals of a preset period; when the FlexE overhead frame sent by the second device is detected at a first time through the target detection thread, second configuration information of the second device is obtained in the FlexE overhead frame; matching the second configuration information with the first configuration information of the first equipment to obtain a matching result; and under the condition that the matching result indicates that the first configuration information is not matched with the second configuration information, indicating the first equipment to execute a first alarm operation, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.

Description

Method and device for executing alarm operation, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for executing an alarm operation, a storage medium, and an electronic device.
Background
Flexible Ethernet (FlexE) is an interface technology for implementing service isolation bearer and network fragmentation by a bearer network, which can adapt to different infrastructure conditions and support more flexible multi-rate bearer. In the transmission process of the FlexE message, whether the configuration of the user at the two ends of the device is matched or not needs to be identified, and a report alarm is timely generated and reported to the user, so that the communication quality of the link is ensured. This places high demands on the accuracy, timeliness and effectiveness of FlexE alarms.
The traditional design scheme is that whether the configuration of the user at the two-end equipment is matched or not is identified through a hardware chip, when mismatch occurs, an interrupt register reports an interrupt to a CPU, and the CPU triggers an alarm after analysis, specifically: when the configuration of the equipment at the two ends is not matched, the data of the FlexE overhead block transmitted by the opposite end cannot be correctly corresponding to the configuration at the local end, and then the chip triggers the hardware interrupt and reports the hardware interrupt to the CPU, the CPU analyzes the interrupt type, distinguishes between the two states of alarm triggering and alarm eliminating, and reports the interrupt to the system.
However, this method puts a high requirement on the reliability of the interruption, and when an interruption false alarm occurs, an alarm may be triggered, which affects normal communication. For example: in the process of establishing connection and disconnecting connection of a link, the state of the link is unstable, at the moment, the CPU may receive invalid interrupts, and the interrupts cannot be used as the basis for occurrence of mismatching, consume the processing capacity of the CPU, influence the overall performance, and increase the risk of reducing the FlexE communication efficiency due to misinformation of the interrupts.
Aiming at the related technology, the processor detects whether the configuration of the user at the two ends of the equipment is matched by receiving the interrupt generated by the chip, so that the detection accuracy is low, and the problem of false alarm is easy to generate, and no effective solution is proposed at present.
Accordingly, there is a need for improvements in the related art to overcome the drawbacks of the related art.
Disclosure of Invention
The embodiment of the invention provides a method and a device for executing alarm operation, a storage medium and an electronic device, which at least solve the problems that the detection accuracy is low and false alarm is easy to generate because a processor detects whether the configuration of equipment at two ends of a user is matched through receiving interruption generated by a chip.
According to an aspect of an embodiment of the present invention, there is provided a method for performing an alarm operation, including: when a communication link is established between a first device and a second device, detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not through a target detection thread on the first device at intervals of a preset period; when the FlexE overhead frame sent by the second device is detected at a first time through the target detection thread, second configuration information of the second device is obtained in the FlexE overhead frame; matching the second configuration information with the first configuration information of the first equipment to obtain a matching result; and under the condition that the matching result indicates that the first configuration information is not matched with the second configuration information, indicating the first equipment to execute a first alarm operation, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.
According to another aspect of the embodiment of the present invention, there is also provided an apparatus for performing an alarm operation, including: the detection module is used for detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not at intervals of a preset period through a target detection thread on the first device when a communication link is established between the first device and the second device; the acquisition module is used for acquiring second configuration information of the second device in the FlexE overhead frame when the FlexE overhead frame sent by the second device is detected at the first moment through the target detection thread; the matching module is used for matching the second configuration information with the first configuration information of the first equipment to obtain a matching result; and the alarm module is used for indicating the first equipment to execute a first alarm operation under the condition that the matching result indicates that the first configuration information is not matched with the second configuration information, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.
According to still another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the execution method of the above-described alarm operation when run.
According to still another aspect of the embodiment of the present invention, there is also provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the execution method of the alarm operation by the computer program.
According to the invention, when a communication link is established between the first equipment and the second equipment, a FlexE overhead frame sent by the second equipment is acquired on a target detection thread of the first equipment, second configuration information of the second equipment is acquired from the FlexE overhead frame through the target detection thread, the second configuration information is matched with first configuration information of the first equipment through the target detection thread, and the first equipment is instructed to execute a first alarm operation under the condition that a matching result indicates that the first configuration information is not matched with the second configuration information. By adopting the technical scheme, the problems that the detection accuracy is low and false alarms are easy to generate due to the fact that the processor detects whether the configuration of the equipment at the two ends of a user is matched through the interrupt generated by the receiving chip are solved. And whether the configuration of the two-end equipment is matched is detected by the target detection thread, so that the detection accuracy is higher, and the problem of easy generation of false alarm is avoided.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a hardware block diagram of a computer terminal of a method of performing an alarm operation according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method of performing an alarm operation according to an embodiment of the present invention;
figure 3 is a FlexE overhead frame schematic according to an embodiment of the present invention;
FIG. 4 is a block diagram of the structure of an alarm system for FlexE in accordance with an embodiment of the present invention;
FIG. 5 is a flow chart of the transmission of configuration information according to an embodiment of the present invention;
FIG. 6 is a flow chart of detection of configuration information according to an embodiment of the present invention;
fig. 7 is a block diagram of a structure of an execution apparatus of an alarm operation according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method embodiments provided in the embodiments of the present application may be executed in a computer terminal or similar computing device. Taking the operation on the computer terminal as an example, fig. 1 is a block diagram of the hardware structure of the computer terminal of the method for executing the alarm operation according to the embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor (Microprocessor Unit, abbreviated MPU) or programmable logic device (Programmable logic device, abbreviated PLD)) and a memory 104 for storing data, and in an exemplary embodiment, the computer terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, a computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than the equivalent functions shown in FIG. 1 or more than the functions shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for performing an alarm operation in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In order to solve the above-mentioned problems, in this embodiment, there is provided a method for executing an alarm operation, and fig. 2 is a flowchart of a method for executing an alarm operation according to an embodiment of the present invention, the flowchart including the steps of:
step S202, when a communication link is established between a first device and a second device, detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not through a target detection thread on the first device at intervals of a preset period;
for a better understanding, fig. 3 is a schematic diagram of FlexE overhead frames according to an embodiment of the present invention, as in fig. 3, one overhead frame is formed on each FlexE instance by expanding consecutive 8 FlexE overhead blocks, each overhead block being separated by 20 x 1023 FlexE data blocks. Such 8 overhead block groups are called FlexE overhead frames.
It should be noted that the target detection thread is turned on by target software installed on the first device.
Step S204, when the FlexE overhead frame sent by the second device is detected at a first time by the target detection thread, second configuration information of the second device is obtained in the FlexE overhead frame;
it should be noted that, by reading and analyzing the FlexE overhead frame by the target detection thread, the second configuration information of the second device may be obtained, where the second configuration information includes a value of each field in the target field set, and the target field set includes, but is not limited to: group Number, instance Number, flexible ethernet bitmap Flexe Map, client slot Client capacitance in fig. 3.
Step S206, the second configuration information is matched with the first configuration information of the first equipment, and a matching result is obtained;
specifically, the values of the fields of the first configuration information, such as the Group Number, the Instance Number, the Flexe Map, the Client Calendar, and the like, are matched with the values of the fields of the second configuration information, such as the Group Number, the Instance Number, the Flexe Map, the Client Calendar, and the like, so as to obtain a matching result.
It should be noted that, the matching result may indicate overall matching/non-matching, or may specifically indicate which fields match and which fields do not match. For example, when the Group numbers do not match, a Group Number mismatch (Group Number Mismatch, abbreviated GNM) is indicated; when the Flexe maps do not match, flexe bitmap mismatch is indicated (FlexE Map Mismatch, abbreviated as FMM); when the Instance numbers do not match, an Instance Number mismatch is indicated (Instance Number Mismatch, abbreviated as INM); when the Client Calendar does not match, it indicates that the Client slot configuration does not match (Client Calendar Mismatch, abbreviated CCM).
Step S208, when the matching result indicates that the first configuration information is not matched with the second configuration information, the first device is instructed to execute a first alarm operation, where the first alarm operation is used to prompt that the first configuration information is not matched with the second configuration information.
It should be noted that, the target detection thread may instruct the first device to execute the first alarm operation by reporting "alarm trigger" to the alarm system.
Through the steps, when a communication link is established between the first device and the second device, a FlexE overhead frame sent by the second device is acquired on a target detection thread of the first device, second configuration information of the second device is acquired from the FlexE overhead frame through the target detection thread, the second configuration information is matched with first configuration information of the first device through the target detection thread, and the first device is instructed to execute a first alarm operation under the condition that a matching result indicates that the first configuration information is not matched with the second configuration information. By adopting the technical scheme, the problems that the detection accuracy is low and false alarms are easy to generate due to the fact that the processor detects whether the configuration of the equipment at the two ends of a user is matched through the interrupt generated by the receiving chip are solved. And whether the configuration of the two-end equipment is matched is detected by the target detection thread, so that the detection accuracy is higher, and the problem of easy generation of false alarm is avoided.
In an exemplary embodiment, the step S208 is implemented by: determining whether a second alarm operation is performed by the first device at a second moment when the matching result indicates that the first configuration information is not matched with the second configuration information, wherein the second moment is positioned before the first moment, and the second alarm operation is used for prompting that the configuration information of the first device is not matched with the configuration information of the second device; and under the condition that the first device does not execute the second alarming operation at the second moment, the first device is instructed to execute the first alarming operation. And when the matching result shows that the first configuration information is not matched with the second configuration information, the first device executes the second alarm operation at the second moment, and the second alarm operation triggers the first device to be in an alarm state, the state of the first device is kept in the alarm state.
The target detection thread is to acquire the FlexE overhead frame sent by the second device in a polling manner and detect the FlexE overhead frame, and determine whether the first configuration information of the first device is matched with the second configuration information of the second device, for example, detect the FlexE overhead frame every 3 seconds. Further, if the target detection thread in the first device detects that the second configuration information of the second device is not matched with the first configuration information of the first device where the target detection thread is located at the first moment, a detection result of the first configuration information detected at the last round (at the second moment) and the second configuration information needs to be determined, if the last round of detection is matched, the target detection thread can report an alarm trigger to an alarm system, the first device is appointed to execute a first alarm operation, and if the last round of detection is not matched, the state of the first device is kept in an alarm state continuously, and repeated alarm triggering is not needed.
In an exemplary embodiment, if the matching result indicates that the first configuration information matches the second configuration information, determining whether the first device performs a second alarm operation at a second time, where the second time is before the first time, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and switching the state of the first equipment from the alarm state to the normal state under the condition that the matching result indicates that the first configuration information is matched with the second configuration information, the first equipment executes the second alarm operation at the second moment and the second alarm operation triggers the first equipment to be in the alarm state.
Similarly, if the target detection thread detects that the first configuration information of the first device and the second configuration information of the second device are matched at the first moment, the detection result of the first configuration information and the second configuration information detected at the last round (at the second moment) needs to be judged, if the detection result of the last round is matched, any operation is not needed to be executed, if the detection result of the last round is not matched, an alarm elimination can be reported to an alarm system, and the alarm system can further switch the state of the first device from an alarm state to a normal state.
In an exemplary embodiment, the obtaining the second configuration information of the second device in the FlexE overhead frame may be implemented by: determining, by a target program, a plurality of target FlexE overhead blocks in the FlexE overhead frame using a FlexE protocol; and analyzing the plurality of target FlexE overhead blocks to obtain the second configuration information of the second device, wherein the second configuration information comprises values of fields in a target field set extracted from the plurality of target FlexE overhead blocks.
The second device converts the second configuration information according to the FlexE protocol to generate a code block containing the second configuration information, and then stores the code block in a FlexE overhead frame, and then sends the FlexE overhead frame to the first device through a communication link with the first device. After receiving the FlexE overhead frame, the first device needs to parse the FlexE overhead frame by using the FlexE protocol through the target procedure to obtain a target number of FlexE overhead blocks (corresponding to the multiple target FlexE overhead blocks), so as to parse the target number of FlexE overhead blocks, and extract the second configuration information from the target number of FlexE overhead blocks. The set of target fields includes, but is not limited to: group Number, instance Number, flexe Map, client capacitance. In an exemplary embodiment, the plurality of target FlexE overhead blocks are the first overhead block, the second overhead block, and the third overhead block of fig. 3. Or may be all of the overhead blocks in fig. 3.
In an exemplary embodiment, the above step S206 may also be implemented by: acquiring the first configuration information from the first device, wherein the first configuration information comprises values of fields in the target field set recorded on the first device; comparing the value of each field in the target field set in the first configuration information with the value of each field in the target field set in the second configuration information; generating the matching result when the value of each field in the target field set in the first configuration information is the same as the value of each field in the target field set in the second configuration information, wherein the matching result indicates that the first configuration information is matched with the second configuration information; and generating the matching result when a first field subset with different values exists in the target field set in the first configuration information and the target field set in the second configuration information, wherein the matching result indicates that the first configuration information is not matched with the second configuration information and indicates that the first field subset has different values in the first equipment and the second equipment.
That is, the values of the respective fields in the set of target fields in the second configuration information of the second device need to be compared with the values of the respective fields in the set of target fields in the first configuration information of the first device, thereby determining the matching result. Specifically, if the second configuration information is equal to the values of the fields in the target field set in the second configuration information, it indicates that the first configuration information is matched with the second configuration information, if at least one target field in the first configuration information is unequal to the second configuration information, it indicates that the first configuration information is not matched with the second configuration information, and in the generated matching result, it needs to be specifically described which field is not matched, for example, GNM is displayed when the Group Number is not matched; when the Flexe maps are not matched, displaying the FMM; when the Instance numbers do not match, INM will be displayed; CCM is displayed when the Client calclendar does not match.
In an exemplary embodiment, the step S208 further includes determining, when the matching result indicates that the first configuration information does not match the second configuration information and indicates that the values of the first field subsets in the first device and the second device are different, whether the first device performs a second alarm operation at a second time, where the second time is before the first time, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and under the condition that the first equipment does not execute the second alarm operation at the second moment, the alarm module corresponding to the first field subset on the first equipment is switched from a normal state to an alarm state, wherein the alarm module corresponding to the first field subset is in the alarm state and is used for indicating that the values of the first field subset in the first equipment and the second equipment are different.
That is, if the target detection thread detects that the first configuration information and the second configuration information are not matched at the first time, and specifically indicates that specific fields in the first configuration information and the second configuration information are not matched, for example, the INM or the like, a detection result of the last detection (at the second time) needs to be determined, if the last detection detects that the first configuration information and the second configuration information are matched, the target detection thread needs to report the alarm triggering information of the first field subset which is not matched and detected at the present time to the alarm system, and then the alarm system switches the alarm module corresponding to the first field subset from the normal state to the alarm state.
In an exemplary embodiment, the step S208 further includes determining, if the matching result indicates that the first configuration information does not match the second configuration information, and the first device performs the second alarm operation at the second time, where the second alarm operation is used to set a state of an alarm module corresponding to a second field subset on the first device to the alarm state, a containment relationship between the first field subset and the second field subset; when a first part field and a second part field are included in the first field subset, an alarm module corresponding to the first part field on the first device is switched from a normal state to an alarm state, and the state of the alarm module corresponding to the second part field on the first device is kept in the alarm state, wherein the first part field is a field which is not included in the second field subset in the first field subset, and the second part field is a field which is included in the second field subset in the first field subset.
That is, if the target detection thread detects that the first configuration information does not match with the first field subset in the second configuration information at the first time, it needs to determine a detection result of the previous detection (the second time), if the previous detection detects that the first configuration information does not match with the second field subset in the second configuration information, it needs to determine an inclusion relationship between the first field subset and the second field subset, further, a state of an alarm module corresponding to a same field in the first field subset in the second field subset is maintained in an alarm state, a normal state of an alarm module corresponding to a field not in the second field subset in the first field subset is switched to an alarm state, and an alarm template corresponding to a field not in the first field subset in the second field subset is switched from the alarm state to the normal state.
In an exemplary embodiment, if the matching result indicates that the first configuration information matches the second configuration information, determining whether the first device performs a second alarm operation at a second time, where the second time is before the first time, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and when the matching result shows that the first configuration information is matched with the second configuration information, the first device executes the second alarm operation at the second moment, and the second alarm operation is used for indicating that the values of a second field subset in the first device and the second device are different, switching the state of an alarm module corresponding to the second field subset on the first device from an alarm state to a normal state.
That is, if the target detection thread detects that the first configuration information is matched with the second configuration information at the first time, a detection result of the last detection (at the second time) needs to be determined, and if the last detection detects that the first configuration information is not matched with the second field subset in the second configuration information, alarm elimination needs to be reported to the alarm system, so that the alarm system switches the alarm module corresponding to the field in the second field subset from the alarm state to the normal state.
It will be apparent that the embodiments described above are merely some, but not all, embodiments of the invention. In order to better understand the execution method of the alarm operation, the following description will explain the above process with reference to the embodiments, but is not used to limit the technical solution of the embodiments of the present invention, specifically:
in an alternative embodiment, after the device a (corresponding to the second device in the above embodiment) and the device b (corresponding to the second device in the above embodiment) establish a link connection, the device b reads the frame header of the overhead frame sent by the received device a by polling, acquires the information of Group Number, instance Number, flexe Map, client capability, and the like, and then compares the information with the configuration of the local device respectively, and triggers a corresponding type of alarm, including FMM, GIDM, INM, CCM, and the like, when the configuration of both ends changes from matching to unmatched, "alarm trigger" needs to be reported; when the two-end configuration is changed from unmatched to matched, the alarm elimination needs to be reported.
It should be noted that fig. 4 is a structural block diagram of an alarm system of FlexE according to an embodiment of the present invention, specifically including:
1. transmitting overhead frame module
In the real communication scenario, the devices at both ends are both the sender and the receiver. For better description, the whole process is described taking device a as the sender and device b as the receiver as an example. The two device ports are connected in a FlexE mode, a user completes relevant configuration on the device A, and then software converts information such as user configuration Group Number, client Number, flexe Map and the like according to the specification of a FlexE protocol, generates code blocks containing the information, stores the code blocks in the overhead frame head, and sends the code blocks to the device B after the link is established to be connected. Fig. 5 is a flowchart of sending configuration information according to an embodiment of the present invention, and the specific procedure is as follows:
s1: configuration information at the device a;
s2: processing the software;
specifically, software on the device a converts information such as a user configuration Group Number, a Client Number, a FlexE Map and the like according to the specification of the FlexE protocol, generates a code block containing the information, and stores the code block in the header of an overhead frame;
s3: establishing connection by a link;
S4: and sending the overhead frame code block.
2. Reading overhead frame module
After the link is established and connected, the FlexE embodiment receives the overhead frame, and software on the second device reads out the information such as the Group Number, the Client Number, the Flexe Map and the like from the overhead frame according to the specification of the FlexE protocol, and the information is used as the basis for the next detection.
3. Alarm detection and reporting module
After the link is established, the software on the second device will start a detection thread, and every 1 second, read the information of the overhead frame received by the local terminal instance, and compare with the user configuration of the local terminal instance, and determine whether a mismatch occurs.
It should be noted that, whether or not the alarm state is matched, the alarm state is required to be compared with the alarm state obtained by the previous round of detection. If the data are not matched and no alarm occurs in the previous round, reporting alarm trigger and updating the polling result; if the data are not matched and the previous round of alarm occurs, but the received overhead frames are different, reporting alarm triggering, and updating the polling result; if the data match and an over-alarm occurs in the previous round, an alarm elimination needs to be reported. In the rest of the cases, no action is required. Specifically, fig. 6 is a flowchart of detection of configuration information according to an embodiment of the present invention, and specific steps are as follows:
Step S1: starting;
step S2: collecting configuration information obtained from overhead frames and configuration information of a local terminal;
step S3: judging the consistency of the configuration information obtained from the overhead frame and the configuration information of the local terminal, if the configuration information is consistent with the configuration information of the local terminal, executing the step S4, and if the configuration information is inconsistent with the configuration information of the local terminal, executing the step S8;
step S4: judging whether the same alarm has occurred in the previous detection, if so, executing the step S5, and if not, executing the step S7;
step S5: the previous round of alarm occurs, and the local soft table state is updated;
it should be noted that, the local soft table is used for recording the result obtained after the previous round of detection;
step S6: reporting alarm elimination;
step S7: the previous round does not have an alarm, and the alarm is not needed;
step S8: judging whether the same alarm has occurred in the previous detection, if so, executing the step S11 if not, and if not, executing the step S9;
step S9: the alarm does not occur in the previous round, and the local soft table state is updated;
step S10: reporting an alarm trigger;
step S11: the previous round has an over-alarming, and whether the re-alarming is needed is judged;
step S12: judging whether the overhead frame information is updated or not, if so, executing the step S13, and if not, executing the step S14;
Step S13: reporting alarm triggering;
step S14: no alarm is required;
step S15: and (5) ending.
4. System user processing module
After receiving the alarm, the system user processing module analyzes the alarm information content and performs corresponding processing aiming at different scenes.
In the prior art, the method of acquiring the alarm information through hardware interruption puts a high requirement on the reliability of the interruption. The method and the device can effectively improve the accuracy of alarming without interruption.
The polling mechanism is adopted, the polling check can be continuously checked during the link connection establishment period, the alarm timeliness can be improved, the polling mechanism can acquire the user configuration of the local terminal and the received overhead frame information according to the preset time interval, an interrupt signal is not needed, the occupation of response invalid interrupt to system resources is avoided, and the load of a CPU (central processing unit) is reduced.
Furthermore, in addition to determining whether an alarm is required, the method and the device can determine whether the alarm is required, and because the configuration information of the home terminal is acquired and the configuration information of the opposite terminal is also read, the specific configuration information of the home terminal, the opposite terminal Group Number, the Client Number, the Flexe Map and the like acquired by polling is processed according to a preset flow, the detection results of the previous round and the current round are taken as judgment basis, and an alarm triggering signal and an alarm eliminating signal are automatically sent out, and further fed back to a system user for further processing, so that the effectiveness of the alarm information can be improved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the various embodiments of the present invention.
The embodiment also provides an execution device of the alarm operation, which is used for implementing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
Fig. 7 is a block diagram of a construction of an apparatus for performing an alarm operation according to an embodiment of the present invention, the apparatus including:
a detection module 72, configured to detect, by a target detection thread on a first device, whether a flexible ethernet FlexE overhead frame sent by a second device is acquired at intervals of a preset period when a communication link is established between the first device and the second device;
an obtaining module 74, configured to obtain, when a FlexE overhead frame sent by the second device is detected at a first time by the target detection thread, second configuration information of the second device in the FlexE overhead frame;
a matching module 76, configured to match the second configuration information with the first configuration information of the first device, so as to obtain a matching result;
and an alarm module 78, configured to instruct the first device to perform a first alarm operation when the matching result indicates that the first configuration information does not match the second configuration information, where the first alarm operation is used to prompt that the first configuration information does not match the second configuration information.
Through the module, when a communication link is established between the first device and the second device, a FlexE overhead frame sent by the second device is acquired on a target detection thread of the first device, second configuration information of the second device is acquired from the FlexE overhead frame through the target detection thread, the second configuration information is matched with first configuration information of the first device through the target detection thread, and the first device is instructed to execute a first alarm operation under the condition that a matching result indicates that the first configuration information is not matched with the second configuration information. By adopting the technical scheme, the problems that the detection accuracy is low and false alarms are easy to generate due to the fact that the processor detects whether the configuration of the equipment at the two ends of a user is matched through the interrupt generated by the receiving chip are solved. And whether the configuration of the two-end equipment is matched is detected by the target detection thread, so that the detection accuracy is higher, and the problem of easy generation of false alarm is avoided.
In an exemplary embodiment, the alarm module 78 is further configured to determine, if the matching result indicates that the first configuration information does not match the second configuration information, whether the first device performs a second alarm operation at a second time, where the second time is before the first time, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and under the condition that the first device does not execute the second alarming operation at the second moment, the first device is instructed to execute the first alarming operation.
In an exemplary embodiment, the alarm module 78 is further configured to maintain the state of the first device in the alarm state when the matching result indicates that the first configuration information does not match the second configuration information, and the first device performs the second alarm operation at the second moment, and the second alarm operation triggers the first device to be in the alarm state.
In an exemplary embodiment, the alarm module 78 is further configured to determine whether the first device performs a second alarm operation at a second time, where the second time is before the first time, if the matching result indicates that the first configuration information matches the second configuration information, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and switching the state of the first equipment from the alarm state to the normal state under the condition that the matching result indicates that the first configuration information is matched with the second configuration information, the first equipment executes the second alarm operation at the second moment and the second alarm operation triggers the first equipment to be in the alarm state.
In an exemplary embodiment, the obtaining module 74 is further configured to determine, by the target program, a plurality of target FlexE overhead blocks in the FlexE overhead frame using a FlexE protocol; and analyzing the plurality of target FlexE overhead blocks to obtain the second configuration information of the second device, wherein the second configuration information comprises values of fields in a target field set extracted from the plurality of target FlexE overhead blocks.
In an exemplary embodiment, the matching module 76 is further configured to obtain the first configuration information in the first device, where the first configuration information includes a value of each field in the target field set recorded on the first device; comparing the value of each field in the target field set in the first configuration information with the value of each field in the target field set in the second configuration information; generating the matching result when the value of each field in the target field set in the first configuration information is the same as the value of each field in the target field set in the second configuration information, wherein the matching result indicates that the first configuration information is matched with the second configuration information; and generating the matching result when a first field subset with different values exists in the target field set in the first configuration information and the target field set in the second configuration information, wherein the matching result indicates that the first configuration information is not matched with the second configuration information and indicates that the first field subset has different values in the first equipment and the second equipment.
In an exemplary embodiment, the alarm module 78 is further configured to determine, when the matching result indicates that the first configuration information does not match the second configuration information and indicates that the values of the first field subsets in the first device and the second device are different, whether the first device performs a second alarm operation at a second time, where the second time is before the first time, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and under the condition that the first equipment does not execute the second alarm operation at the second moment, the alarm module corresponding to the first field subset on the first equipment is switched from a normal state to an alarm state, wherein the alarm module corresponding to the first field subset is in the alarm state and is used for indicating that the values of the first field subset in the first equipment and the second equipment are different.
In an exemplary embodiment, the alarm module 78 is further configured to determine, when the matching result indicates that the first configuration information does not match the second configuration information, and the first device performs the second alarm operation at the second time, where the second alarm operation is used to set a state of an alarm module corresponding to a second field subset on the first device to the alarm state, an inclusion relationship between the first field subset and the second field subset; when a first part field and a second part field are included in the first field subset, an alarm module corresponding to the first part field on the first device is switched from a normal state to an alarm state, and the state of the alarm module corresponding to the second part field on the first device is kept in the alarm state, wherein the first part field is a field which is not included in the second field subset in the first field subset, and the second part field is a field which is included in the second field subset in the first field subset.
In an exemplary embodiment, the alarm module 78 is further configured to determine whether the first device performs a second alarm operation at a second time, where the second time is before the first time, if the matching result indicates that the first configuration information matches the second configuration information, and the second alarm operation is used to prompt that the configuration information of the first device does not match the configuration information of the second device; and when the matching result shows that the first configuration information is matched with the second configuration information, the first device executes the second alarm operation at the second moment, and the second alarm operation is used for indicating that the values of a second field subset in the first device and the second device are different, switching the state of an alarm module corresponding to the second field subset on the first device from an alarm state to a normal state.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, when a communication link is established between a first device and a second device, detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not through a target detection thread on the first device at intervals of a preset period;
s2, when the FlexE overhead frame sent by the second device is detected at a first moment through the target detection thread, second configuration information of the second device is obtained in the FlexE overhead frame;
s3, matching the second configuration information with the first configuration information of the first equipment to obtain a matching result;
and S4, under the condition that the matching result shows that the first configuration information is not matched with the second configuration information, the first equipment is instructed to execute a first alarm operation, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, when a communication link is established between a first device and a second device, detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not through a target detection thread on the first device at intervals of a preset period;
s2, when the FlexE overhead frame sent by the second device is detected at a first moment through the target detection thread, second configuration information of the second device is obtained in the FlexE overhead frame;
s3, matching the second configuration information with the first configuration information of the first equipment to obtain a matching result;
and S4, under the condition that the matching result shows that the first configuration information is not matched with the second configuration information, the first equipment is instructed to execute a first alarm operation, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method of performing an alarm operation, comprising:
when a communication link is established between a first device and a second device, detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not through a target detection thread on the first device at intervals of a preset period;
when the FlexE overhead frame sent by the second device is detected at a first time through the target detection thread, second configuration information of the second device is obtained in the FlexE overhead frame;
matching the second configuration information with the first configuration information of the first equipment to obtain a matching result;
and under the condition that the matching result indicates that the first configuration information is not matched with the second configuration information, indicating the first equipment to execute a first alarm operation, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.
2. The method of claim 1, wherein the instructing the first device to perform a first alert operation if the matching result indicates that the first configuration information does not match the second configuration information comprises:
determining whether a second alarm operation is performed by the first device at a second moment when the matching result indicates that the first configuration information is not matched with the second configuration information, wherein the second moment is positioned before the first moment, and the second alarm operation is used for prompting that the configuration information of the first device is not matched with the configuration information of the second device;
and under the condition that the first device does not execute the second alarming operation at the second moment, the first device is instructed to execute the first alarming operation.
3. The method according to claim 2, wherein the method further comprises:
and when the matching result shows that the first configuration information is not matched with the second configuration information, the first device executes the second alarm operation at the second moment, and the second alarm operation triggers the first device to be in an alarm state, the state of the first device is kept in the alarm state.
4. The method according to claim 1, wherein the method further comprises:
determining whether a second alarm operation is performed by the first device at a second moment when the matching result indicates that the first configuration information is matched with the second configuration information, wherein the second moment is positioned before the first moment, and the second alarm operation is used for prompting that the configuration information of the first device is not matched with the configuration information of the second device;
and switching the state of the first equipment from the alarm state to the normal state under the condition that the matching result indicates that the first configuration information is matched with the second configuration information, the first equipment executes the second alarm operation at the second moment and the second alarm operation triggers the first equipment to be in the alarm state.
5. The method according to claim 1, wherein said obtaining second configuration information of the second device in the FlexE overhead frame comprises:
determining, by a target program, a plurality of target FlexE overhead blocks in the FlexE overhead frame using a FlexE protocol;
and analyzing the plurality of target FlexE overhead blocks to obtain the second configuration information of the second device, wherein the second configuration information comprises values of fields in a target field set extracted from the plurality of target FlexE overhead blocks.
6. The method of claim 5, wherein the matching the second configuration information with the first configuration information of the first device to obtain a matching result comprises:
acquiring the first configuration information from the first device, wherein the first configuration information comprises values of fields in the target field set recorded on the first device;
comparing the value of each field in the target field set in the first configuration information with the value of each field in the target field set in the second configuration information;
generating the matching result when the value of each field in the target field set in the first configuration information is the same as the value of each field in the target field set in the second configuration information, wherein the matching result indicates that the first configuration information is matched with the second configuration information;
and generating the matching result when a first field subset with different values exists in the target field set in the first configuration information and the target field set in the second configuration information, wherein the matching result indicates that the first configuration information is not matched with the second configuration information and indicates that the first field subset has different values in the first equipment and the second equipment.
7. The method of claim 6, wherein the instructing the first device to perform a first alert operation if the match result indicates that the first configuration information does not match the second configuration information comprises:
determining whether a second alarm operation is executed by the first device at a second moment when the matching result indicates that the first configuration information is not matched with the second configuration information and indicates that the values of the first field subsets in the first device and the second device are different, wherein the second moment is positioned before the first moment, and the second alarm operation is used for prompting that the configuration information of the first device is not matched with the configuration information of the second device;
and under the condition that the first equipment does not execute the second alarm operation at the second moment, the alarm module corresponding to the first field subset on the first equipment is switched from a normal state to an alarm state, wherein the alarm module corresponding to the first field subset is in the alarm state and is used for indicating that the values of the first field subset in the first equipment and the second equipment are different.
8. The method of claim 7, wherein the instructing the first device to perform a first alert operation if the match result indicates that the first configuration information does not match the second configuration information comprises:
judging the inclusion relation of the first field subset and the second field subset under the condition that the matching result indicates that the first configuration information is not matched with the second configuration information, the first device executes the second alarm operation at the second moment, and the second alarm operation is used for setting the state of an alarm module corresponding to the second field subset on the first device to be the alarm state;
when a first part field and a second part field are included in the first field subset, an alarm module corresponding to the first part field on the first device is switched from a normal state to an alarm state, and the state of the alarm module corresponding to the second part field on the first device is kept in the alarm state, wherein the first part field is a field which is not included in the second field subset in the first field subset, and the second part field is a field which is included in the second field subset in the first field subset.
9. The method of claim 6, wherein the method further comprises:
determining whether a second alarm operation is performed by the first device at a second moment when the matching result indicates that the first configuration information is matched with the second configuration information, wherein the second moment is positioned before the first moment, and the second alarm operation is used for prompting that the configuration information of the first device is not matched with the configuration information of the second device;
and when the matching result shows that the first configuration information is matched with the second configuration information, the first device executes the second alarm operation at the second moment, and the second alarm operation is used for indicating that the values of a second field subset in the first device and the second device are different, switching the state of an alarm module corresponding to the second field subset on the first device from an alarm state to a normal state.
10. An execution apparatus of an alarm operation, characterized by comprising:
the detection module is used for detecting whether a flexible Ethernet FlexE overhead frame sent by the second device is acquired or not at intervals of a preset period through a target detection thread on the first device when a communication link is established between the first device and the second device;
The acquisition module is used for acquiring second configuration information of the second device in the FlexE overhead frame when the FlexE overhead frame sent by the second device is detected at the first moment through the target detection thread;
the matching module is used for matching the second configuration information with the first configuration information of the first equipment to obtain a matching result;
and the alarm module is used for indicating the first equipment to execute a first alarm operation under the condition that the matching result indicates that the first configuration information is not matched with the second configuration information, wherein the first alarm operation is used for prompting that the first configuration information is not matched with the second configuration information.
11. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when run performs the method of any of the preceding claims 1 to 9.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 9 by means of the computer program.
CN202111663257.1A 2021-12-30 2021-12-30 Method and device for executing alarm operation, storage medium and electronic device Pending CN116414530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111663257.1A CN116414530A (en) 2021-12-30 2021-12-30 Method and device for executing alarm operation, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111663257.1A CN116414530A (en) 2021-12-30 2021-12-30 Method and device for executing alarm operation, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN116414530A true CN116414530A (en) 2023-07-11

Family

ID=87051712

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111663257.1A Pending CN116414530A (en) 2021-12-30 2021-12-30 Method and device for executing alarm operation, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN116414530A (en)

Similar Documents

Publication Publication Date Title
CN111884875A (en) Offline device determination method and device
CN114675983A (en) Business data processing method and device, storage medium and electronic equipment
CN110224872B (en) Communication method, device and storage medium
CN106921992B (en) Method for determining wireless network connection state, client and server
CN116414530A (en) Method and device for executing alarm operation, storage medium and electronic device
CN112616127A (en) Method for realizing gateway data processing and related components thereof
CN114785874B (en) Method for providing high-availability transmission channel based on multi-network protocol
CN114125023B (en) Method and device for determining data connection, storage medium and electronic device
CN108900488B (en) Decentralization abnormal terminal discovery method and device in scene of Internet of things
CN111050356A (en) Data transmission processing method and device, storage medium and electronic device
CN112437146B (en) Equipment state synchronization method, device and system
CN114301812A (en) Method, device, equipment and storage medium for monitoring message processing result
WO2014040470A1 (en) Alarm message processing method and device
CN112769889B (en) Service data pushing method and device, storage medium and electronic device
CN112423278B (en) ZigBee router equipment self-recovery networking method and terminal equipment
CN111372210A (en) Remote transmission method, terminal device, mobile terminal, and computer storage medium
CN110674016A (en) Method for processing log and positioning error information in mobile terminal, mobile terminal and monitoring device thereof and storage medium
CN115883466B (en) Switch control method and device, storage medium and electronic device
JP7359311B2 (en) Server device, visualization system, monitoring method, and program
CN110659174A (en) Monitoring alarm method, device and system
CN114245052B (en) Video data storage method and device, storage medium and electronic device
CN110753057B (en) Communication method, device and equipment of fault indicator
CN113395726B (en) Backup link detection method and device
CN115348338B (en) Inter-system message exception handling method and device and related equipment
CN112688826B (en) Link diagnosis method, terminal device, link diagnosis system, and storage medium

Legal Events

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