Event processing method, slave and communication equipment
Through the real-time monitoring of slaves and the abnormal event processing method, the problems of information leakage and resource waste when the FPGA slave is abnormal are solved, timely and complete information collection and abnormality management are achieved, and the reliability and efficiency of communication equipment are improved.
Patent Information
- Application Number
- CN202510769867.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-09-23
AI Technical Summary
In existing communication equipment, when the FPGA slave is abnormal, the host CPU query or timed polling method has problems such as information omission, unreliable and untimely information collection, and waste of resources and bandwidth.
The slave monitors the nodes in real time. When an abnormality occurs, it collects information about the abnormal node and its related nodes, generates an abnormal event and sends it to the host. It uses event caching and weight calculation to optimize data transmission, and the host handles the abnormal event through interruption.
It achieves timely and complete collection of abnormal information, avoids information omission and resource waste, improves the time consistency and collection efficiency of information, and reduces the risk of abnormal spread.
Smart Images

Figure CN120692185A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to an event processing method, a slave machine and a communication device. Background Art
[0002] Field-programmable gate arrays (FPGAs) are a further development of devices such as programmable array logic (PAL), general array logic (GAL), and erasable programmable logic devices (EPLDs). They are programmable logic chips that can perform general functions, meaning they can be programmed to implement specific logic processing functions. FPGAs are widely used in many fields, such as communications, electronics, video signal processing, and aerospace. The central processing unit (CPU), as the computing and control core of a computer system, is the final execution unit for information processing and program execution. In existing communication equipment, the FPGA is connected to the CPU, transmitting configuration information from the CPU to the FPGA and status information from the FPGA to the CPU. The FPGA acts as a slave device, and the CPU acts as a master device.
[0003] In the existing technology, the host CPU generally has two ways to collect data from the slave FPGA: one is that after an abnormality occurs in the slave FPGA, the host CPU initiates a query manually or through the network management system; the other is that the host CPU periodically polls. These two methods have the following problems: 1. When an exception occurs in the slave FPGA, the host CPU initiates a query diagnosis, and the slave FPGA responds to the request to collect information and report it. The entire process has three actions, involving asynchronous interaction between the two devices. The time of the exception and information collection is different, the frequency is not synchronized, and there is a possibility of missed information collection.
[0004] 2. When an exception occurs in the slave FPGA, it is necessary to collect information from multiple nodes on the same data link at the same time. However, the host CPU collects information from different nodes on the entire data link serially and not at the same time, resulting in unreliable collected information.
[0005] 3. The host CPU undertakes multiple complex tasks, and the period allocated to periodically polling the slave FPGA is usually in milliseconds or even seconds. During the query period, the abnormal level of the slave FPGA may further spread.
[0006] 4. The host CPU collects slave FPGA data through periodic polling. Since the slave FPGA is normal most of the time, most of the data collected by the host CPU through periodic polling is not abnormal data that requires attention. This wastes the host CPU's data processing resources and bandwidth. Summary of the Invention
[0007] The embodiments of the present invention provide an event processing method, a slave device, and a communication device to solve the technical problems in the related art of collecting information about abnormalities occurring in the slave device through host query or timed polling, which may include information omission, unreliable and untimely collection of information, and waste of host resources and bandwidth.
[0008] In a first aspect, an event processing method is provided, which is applied to a slave device and includes the following steps: Monitor all nodes in real time; If any node is confirmed to be abnormal, information is collected simultaneously on the abnormal node and the related nodes in its link, and an abnormal event is generated and sent to the host; The abnormal event includes the abnormal node position code, abnormal type code, abnormal occurrence timestamp, detection value, configuration value and status value of the abnormal node and related nodes of the link where it is located, information collection timestamp, event type word, event sequence number and event sending timestamp.
[0009] In some embodiments, if any node is confirmed to be abnormal, the step of simultaneously collecting information about the abnormal node and related nodes in its link, generating an abnormal event and sending it to the host includes: If any node is confirmed to be abnormal, an abnormal trigger signal is generated to select nodes that are ahead of the abnormal node and those that are behind the abnormal node and interact with the abnormal node on the link where the abnormal node is located as related nodes of the link where the abnormal node is located.
[0010] In some embodiments, after the step of monitoring all nodes in real time, the method further includes: If all nodes are confirmed to be normal, a normal event is generated at a preset interval and sent to the host; wherein, the normal event includes an event type word, an event sequence number and an event sending timestamp.
[0011] In some embodiments, the step of generating an abnormal event or a normal event and sending it to the host includes: The generated abnormal events or normal events are first buffered in the event buffer area of the slave and then sent to the event buffer area of the master.
[0012] In some embodiments, the step of first buffering the generated abnormal event or normal event in the event buffer area of the slave and then sending it to the event buffer area of the master includes: Calculate the weight of abnormal events and count the number of events in the slave's event buffer; If the weight value is higher than the preset weight threshold or the event quantity value is higher than the preset quantity threshold, an event interrupt notification is sent to the host, so that the host immediately reads the event buffer area of the host and processes it.
[0013] In some embodiments, after the step of sending an event interrupt notification to the host if the weight value is higher than a preset weight threshold or the quantity value is higher than a preset quantity threshold so that the host reads the event buffer of the host and processes the event, the following steps are included: If a read instruction is received from the master to the master's event buffer, the slave's event buffer cache is cleared; If the master does not receive a read instruction from the master's event buffer area within a preset time, a slave-to-master communication link abnormality event is generated.
[0014] In some embodiments, the method further comprises the following steps: Respond to the host's query command to query one or more specified nodes; Collect information from one or more specified nodes simultaneously, generate query events and send them to the host; The query event includes a designated node position code, a detection value, a configuration value and a status value of the designated node, an information collection timestamp, an event type word, an event sequence number and an event sending timestamp.
[0015] In some embodiments, after the step of responding to the host's query instruction and querying the designated node, the method further includes: Send a query completion interrupt notification to the host so that the host can read the event buffer of the host and process it.
[0016] In a second aspect, a slave device is provided, the slave device comprising: Node monitoring unit, used to monitor all nodes in real time; The collection and transmission unit is used to collect information about the abnormal node and the related nodes of its link at the same time if any node is confirmed to be abnormal, and generate an abnormal event and send it to the host; The abnormal event includes the abnormal node position code, abnormal type code, abnormal occurrence timestamp, configuration value and status value of the abnormal node and related nodes of the link where it is located, information collection timestamp, event type word, event sequence number and event sending timestamp.
[0017] In a third aspect, a communication device is provided, comprising the aforementioned slave and a host connected to the slave.
[0018] The embodiments of the present invention provide an event processing method, a slave device, and a communication device, the beneficial effects of which include at least: 1. In the embodiment of the present invention, the slave performs homologous data collection at the source of the exception (with zero latency), eliminating the problem of information omission or asynchrony. The exception triggers the collection, and the collected information is time-consistent with the exception, thus solving the problem of information omission caused by the different time and frequency of the exception and information collection.
[0019] 2. In the embodiment of the present invention, the slave machine collects relevant information of all attributable (related) nodes on the data link in parallel and at one time. The collected information is more complete, accurate and reliable, and the collection time of different nodes is consistent.
[0020] 3. In the embodiment of the present invention, the slave machine (FPGA) has a nanosecond processing capability, which means that the slave machine can complete abnormality detection, aggregation of relevant information of all attributable nodes, and reporting of abnormal events in microseconds, thus preventing the spread of slave abnormalities and causing higher-level abnormal faults.
[0021] 4. In the embodiment of the present invention, data collection is triggered by abnormal conditions to achieve preliminary screening and cleaning of data. Most of the collected data are abnormal data that need attention, which solves the problem in the prior art that the host collects a large amount of invalid data through periodic polling and wastes host and bandwidth resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A first flow chart of an event processing method provided by an embodiment of the present invention; Figure 2 A schematic structural diagram of a data link of a slave device provided by an embodiment of the present invention; Figure 3A A first structural diagram of a node abnormality in a data link of a slave provided by an embodiment of the present invention; Figure 3B A second structural diagram of a node abnormality in a data link of a slave provided by an embodiment of the present invention; Figure 4 A second flow chart of an event processing method provided by an embodiment of the present invention; Figure 5 A third flow chart of an event processing method provided by an embodiment of the present invention; Figure 6 A fourth flow chart of an event processing method provided by an embodiment of the present invention; Figure 7 A schematic structural diagram of a slave device provided by an embodiment of the present invention; Figure 8 A schematic structural diagram of a communication device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0025] The embodiment of the present invention provides an event processing method, which can solve the technical problems of the existing technology of collecting information about abnormalities of slaves through host query or timed polling, such as information omission, unreliable and untimely collection of information, and waste of host resources and bandwidth.
[0026] See also Figure 1 As shown, an embodiment of the present invention provides an event processing method, which is applied to a slave and includes the following steps: Step S10: monitor all nodes in real time.
[0027] Specifically, the slave (FPGA) monitors each node on multiple data links within the slave in real time. There are multiple data links within the slave, and each data link passes through multiple nodes, such as Figure 2 As shown, there are two data links in the slave machine. Each data link is processed by multiple nodes. Each link is numbered: DP1 and DP2. The nodes on the link are numbered in the order of data flow: node 1, node 2, ...
[0028] In step S20, if any node is confirmed to be abnormal, information is collected from the abnormal node and the related nodes in its link. An abnormal event is generated and sent to the host. The abnormal event includes the abnormal node location code, abnormality type code, abnormality occurrence timestamp, detection values, configuration values, and status values of the abnormal node and the related nodes in its link, information collection timestamp, event type code, event sequence number, and event sending timestamp.
[0029] Specifically, if any node is confirmed to be abnormal, the step of simultaneously collecting information from the abnormal node and related nodes in its link, generating an abnormal event and sending it to the host includes: If any node is confirmed to be abnormal, an abnormal trigger signal is generated to select nodes that are ahead of the abnormal node and those that are behind the abnormal node and interact with the abnormal node on the link where the abnormal node is located as related nodes of the link where the abnormal node is located.
[0030] See also Figure 3AAs shown in the figure, assume that node 2 of data link DP1 detects an anomaly (a rising arrow is added), generating an anomaly trigger signal. Nodes 1 and 2 of data link DP1 are selected, with node 1 located earlier than node 2. The node positions are coded as {DP1, node 1} and {DP1, node 2}. Information from nodes 1 and 2 of data link DP1 is collected simultaneously.
[0031] See also Figure 3B As shown in the figure, assume that node 3 of data link DP1 detects an anomaly and generates an anomaly trigger signal. Nodes 1, 2, 3, and 4 of data link DP1 are selected. Nodes 1 and 2 of data link DP1 are located before node 3 of data link DP1, and node 4 of data link DP1 is located after node 3 of data link DP1. The node positions are encoded as {DP1, node 1}, {DP1, node 2}, {DP1, node 3}, and {DP1, node 4}. Information from nodes 1, 2, 3, and 4 of data link DP1 is collected simultaneously, and the number of collections can be one or more.
[0032] Each node may have multiple detection values, configuration values, and status values, which can be encoded as follows: detection value 0, detection value 1, detection value 2, ...; configuration value 0, configuration value 1, configuration value 2, ...; status value 0, status value 1, status value 2, .... Taking data link DP1 as an example, the following definitions can be made: For node 1: Detection value chk: missing frame header / 0, missing frame tail / 1, frame interruption / 2, too small frame spacing / 3, etc.; Configuration values cfg: reset / 0, maximum frame length threshold / 1, minimum frame length threshold / 2, minimum frame spacing threshold / 3, ...; State value stt: maximum frame length / 0, minimum frame length / 1, minimum frame spacing / 2, frame rate per unit time / 3, data rate per unit time / 4, ...
[0033] For node 2: Detection value chk: cache full / 0, cache empty / 1, ...; Configuration values cfg: reset / 0, cache almost full threshold / 1, cache almost empty threshold / 2, ...; Status value stt: cache empty / 0, cache full / 1, cache write address / 2, cache read address / 3, cache current remaining data / 4, ...
[0034] The detection value is used to indicate whether a node in the data link is abnormal. For example, for node 1, a chk0 value of 0 indicates that the frame header is present, while a chk0 value of 1 indicates that the frame header is missing. A chk3 value of 0 indicates that the interframe spacing is normal, while a chk3 value of 1 indicates that the interframe spacing is too small. The same applies.
[0035] Assume that an exception occurs in node 2 of data link DP1, for example, the cache is full and writes / 0. The information contained in the generated exception event is as follows: 1) The abnormal node position code and abnormal type code can be recorded as {DP1, node2, chk0}, and the abnormality occurrence timestamp / T1.
[0036] 2) Generate an abnormal trigger signal to select node 1 and node 2 of data link DP1, collect all detection values, configuration values and status values of node 1 and node 2 of data link DP1 once or multiple times, and record the collection timestamp (if collected twice, the collection timestamps are T2_1 and T2_2).
[0037] {DP1, node1, chk0, chk1, ..., cfg0, cfg1, ..., stt0, stt1, ...}, {DP1, node2, chk0, chk1, ..., cfg0, cfg1, ..., stt0, stt1, ...}, T2_1 first acquisition; {DP1, node1, chk0, chk1, ..., cfg0, cfg1, ..., stt0, stt1, ...}, {DP1, node2, chk0, chk1, ..., cfg0, cfg1, ..., stt0, stt1, ...}, T2_2 second acquisition.
[0038] The value of chk0 is 1, indicating a cache full exception has occurred on node 2 of data link DP1. In practical applications, only the exception type code can be sent to the host, and the detection values of the abnormal node and its associated nodes can be omitted to conserve data transmission resources.
[0039] 3) Event type word of abnormal event / Tp0 (abnormal event), event sequence number / S0, event sending timestamp / T3.
[0040] The present invention provides an event processing method that first monitors all nodes in real time. If any node is confirmed to be abnormal, information is collected from the abnormal node and the related nodes in its link, and an abnormal event is generated and sent to the host. The beneficial effects of the present invention include at least the following: 1. In the embodiment of the present invention, the slave performs homologous data collection at the source of the exception (with zero latency), eliminating the problem of information omission or asynchrony. The exception triggers the collection, and the collected information is time-consistent with the exception, thus solving the problem of information omission caused by the different time and frequency of the exception and information collection.
[0041] 2. In the embodiment of the present invention, the slave machine collects relevant information of all attributable (related) nodes on the data link in parallel and at one time. The collected information is more complete, accurate and reliable, and the collection time of different nodes is consistent.
[0042] 3. In the embodiment of the present invention, the slave (FPGA) has nanosecond processing capability, meaning it can detect anomalies, aggregate relevant information from all attributable nodes, and report abnormal events in microseconds. This allows the host to handle these anomalies in a timely manner, preventing slave anomalies from spreading and triggering higher-level abnormal faults.
[0043] 4. In the embodiment of the present invention, data collection is triggered by abnormal conditions to achieve preliminary screening and cleaning of data. Most of the collected data are abnormal data that need attention, which solves the problem in the prior art that the host collects a large amount of invalid data through periodic polling and wastes host and bandwidth resources.
[0044] In addition, the abnormal events in the embodiment of the present invention include the timestamp of the abnormal occurrence and the timestamp of the collected information, adding time dimension information. The abnormal state and the sequence of equipment failure can be known, and then the causal relationship can be inferred to solve the problem of not being able to know the causal relationship between the equipment failure and the slave abnormality.
[0045] As an optional implementation, in one embodiment of the invention, see Figure 4 As shown, after the step of monitoring all nodes in real time, the following steps are further included: Step 30: If all nodes are confirmed to be normal, a normal event is generated at a preset interval and sent to the host; wherein the normal event includes an event type word, an event sequence number and an event sending timestamp.
[0046] For example, a normal event contains the following information: event type word / Tp1 (normal event), event sequence number / S1, and event transmission timestamp / T4. Furthermore, if all nodes are normal, normal events can be generated and sent to the host at preset intervals, rather than every time they are generated. This saves cache space and master-slave transmission bandwidth.
[0047] As an optional implementation manner, in one embodiment of the invention, the step of generating an abnormal event or a normal event and sending it to the host includes: The generated abnormal events or normal events are first buffered in the event buffer area of the slave and then sent to the event buffer area of the master.
[0048] The event processing method of the present invention utilizes a multi-level cache. The event cache of relevant events on the slave is transferred to the event cache area of the master, or even to external memory, thereby overcoming the cache resource limitations of the slave FPGA. Furthermore, the distributed deployment approach allows the slave to collect current exception information and cache it in its event cache area even if the master crashes or the master-slave link fails. Any information not yet processed by the master is not lost and can be retrieved and processed after communication between the master and slave is restored.
[0049] In practical applications, the slave's event buffer is primarily used to prevent the master from receiving data from the slave while retaining useful information. Alternatively, it can be used to retransmit abnormal event content stored in the slave's event buffer several times if the master fails to respond after a timeout. Therefore, the slave's event buffer primarily caches abnormal events. For normal events, only the first / oldest and last / latest event timestamps of consecutive normal events are valuable (indicating that the slave's self-test has been normal during this period). The slave's event buffer typically only caches a few valuable normal events, discarding the remaining normal events.
[0050] As an optional implementation manner, in one embodiment of the invention, the step of first buffering the generated abnormal event or normal event in the event buffer area of the slave and then sending it to the event buffer area of the master includes: Calculate the weight of abnormal events and count the number of events in the slave's event buffer; If the weight value is higher than the preset weight threshold or the event quantity value is higher than the preset quantity threshold, an event interrupt notification is sent to the host, so that the host reads the event buffer area of the host and processes it.
[0051] The slave calculates the weight of the abnormal event and the number of events in its event buffer. Based on the calculated result, it sends an event interrupt notification to the master, allowing the master to immediately read its event buffer and process the abnormal event. This means that urgent events are notified to the master via an interrupt for immediate processing, preventing the slave abnormality from spreading and triggering higher-level abnormalities. Furthermore, when the number of events exceeds a preset threshold, the slave's event buffer is considered full. In addition to sending an event interrupt notification to the master, the slave also discards events in its event buffer, taking into account the continuous generation of events. This can involve discarding either the latest event or the oldest event. For example, if a slave abnormality occurs, sends an event, and the master receives and processes it, the abnormality may continue to spread, leading to multiple subsequent abnormalities. However, the initial abnormality is the source. In this case, a strategy might be to discard the latest event (i.e., the later event). Alternatively, if the slave is expected to record events generated by the most recently collected data, it might discard the oldest event (i.e., the first event).
[0052] In addition, the host reads and processes the type word and serial number of the event: if the serial number of the event is the same as the last time it was processed, that is, the serial number has not been updated, the host-slave communication link is diagnosed; if there is an update, the read message is sent back and the process continues; if the type word of the event shows no abnormality, the no-abnormal timestamp is updated; if the type word of the event shows an abnormality, the content of the abnormal event is processed and the event log of the slave is transferred.
[0053] As an optional implementation, in one embodiment of the invention, see Figure 5 As shown, after the step of sending an event interrupt notification to the host if the weight value is higher than the preset weight threshold or the quantity value is higher than the preset quantity threshold so that the host reads the event buffer of the host and processes it, the method includes: Step 40: If a read instruction is received from the host to the host's event buffer, the slave's event buffer is cleared. Specifically, considering that the host and slave are asynchronous, new events may be generated when the host sends back but have not yet been sent to the host event buffer. The slave can clear the read events.
[0054] Step 50: If the master-to-master event buffer has not received a read instruction within a preset time period, a slave-to-host communication link abnormality event is generated.
[0055] An abnormality in the slave-host communication link is also considered an abnormal event. This abnormality is stored in the slave's event buffer after it is generated and remains there until communication between the master and slave is restored. As previously mentioned, the distributed deployment of the event buffer allows the slave to collect current abnormality information even when the master crashes or the master-slave link fails, facilitating subsequent processing by the master.
[0056] In addition, the host will also periodically poll the event buffer of the host and process it. After the host periodically polls, the slave will also execute the above step 40 or step 50.
[0057] See also Figure 6 As shown, the event processing method further includes the following steps: Step S60, responding to the host's query instruction to query one or more specified nodes; Step S70: collect information from one or more designated nodes simultaneously, generate a query event and send it to the host; The query event includes the specified node location code, the specified node's detection value, configuration value, and status value, information collection timestamp, event type word, event sequence number, and event transmission timestamp. For example, event type word / Tp2 (query event), event sequence number / S2, and event transmission timestamp / T5. In addition, the detection value of the specified node is used to reflect the normality or abnormality of the specified node. Compared with the aforementioned slave machine's real-time monitoring, when the slave machine responds to the host's query command to query one or more specified nodes, regardless of whether the detection value of the specified node indicates that the node is normal or abnormal, the detection value must be uploaded to the host.
[0058] As mentioned above, the embodiment of the present invention replaces the previous host query or timed polling, and is compatible with the previous query method. The embodiment of the present invention adopts a query instruction to read out a large amount of relevant data. Among them, the specified nodes can be all the nodes of one or several links, or one or several nodes on a certain link. The type of information to be collected can also be specified (such as the frame count of the entire link). When there are multiple nodes, the slave collects the information of all nodes at the same time according to the query instruction, adds the information collection time, event type word, event sequence number, event sending time, etc. to form a query event and send it to the host. Compared with the previous host serial collection of a small amount of information from different nodes, the efficiency is greatly improved.
[0059] As an optional implementation manner, in one embodiment of the invention, after the step of responding to the host's query instruction to query the designated node, the following steps are included: Send a query completion interrupt notification to the host so that the host can read the host's event buffer and process it. The host receives the interrupt to read the host's event buffer and parse out the relevant data.
[0060] Furthermore, when the master issues a query command, it can read and process the master's event buffer instead of immediately reading and processing it. Instead, it can read and process the master's event buffer after a fixed delay greater than the time required for the slave to complete the query command. The query time (i.e., the slave processing time) is deterministic and predictable for the master. This processing method saves interrupts and conserves interrupt resources.
[0061] See also Figure 7 As shown, an embodiment of the present invention further provides a slave device, which includes: a node monitoring unit and a collection and transmission unit.
[0062] The node monitoring unit is used to monitor all nodes in real time.
[0063] The collection and sending unit is used to collect information about the abnormal node and the related nodes of the link where it is located at the same time if any node is confirmed to be abnormal, generate an abnormal event and send it to the host; wherein, the abnormal event includes the abnormal node position code, abnormal type code, abnormal occurrence timestamp, detection value, configuration value and status value of the abnormal node and the related nodes of the link where it is located, information collection timestamp, event type word, event sequence number and event sending timestamp.
[0064] See also Figure 8 As shown, an embodiment of the present invention further provides a communication device, comprising the aforementioned slave and a host connected to the slave.
[0065] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0066] It should be noted that, in the present invention, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0067] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features of the present invention.
Claims
1. An event processing method, the method being executed by a slave, characterized in that: The method comprises the following steps: Monitor all nodes in real time; If any node is confirmed to be abnormal, information is collected simultaneously on the abnormal node and the related nodes in its link, and an abnormal event is generated and sent to the host; The abnormal event includes the abnormal node position code, abnormal type code, abnormal occurrence timestamp, detection value, configuration value and status value of the abnormal node and related nodes of the link where it is located, information collection timestamp, event type word, event sequence number and event sending timestamp.
2. The event processing method according to claim 1, characterized in that: If any node is confirmed to be abnormal, the step of simultaneously collecting information about the abnormal node and related nodes in its link, generating an abnormal event and sending it to the host includes: If any node is confirmed to be abnormal, an abnormal trigger signal is generated to select nodes that are ahead of the abnormal node and those that are behind the abnormal node and interact with the abnormal node on the link where the abnormal node is located as related nodes of the link where the abnormal node is located.
3. The event processing method according to claim 1, characterized in that: After the step of monitoring all nodes in real time, the method further includes: If all nodes are confirmed to be normal, a normal event is generated at a preset interval and sent to the host; wherein, the normal event includes an event type word, an event sequence number and an event sending timestamp.
4. The event processing method according to claim 3, characterized in that: The step of generating an abnormal event or a normal event and sending it to the host comprises: The generated abnormal events or normal events are first buffered in the event buffer area of the slave and then sent to the event buffer area of the master.
5. The event processing method according to claim 4, characterized in that: The step of first buffering the generated abnormal event or normal event in the event buffer area of the slave and then sending it to the event buffer area of the master includes: Calculate the weight of abnormal events and count the number of events in the slave's event buffer; If the weight value is higher than the preset weight threshold or the event quantity value is higher than the preset quantity threshold, an event interrupt notification is sent to the host, so that the host immediately reads the event buffer area of the host and processes it.
6. The event processing method according to claim 5, characterized in that: If the weight value is higher than the preset weight threshold or the quantity value is higher than the preset quantity threshold, an event interrupt notification is sent to the host so that the host reads the event cache of the host district And after the processing steps, including: If a read instruction is received from the master to the master's event buffer, the slave's event buffer cache is cleared; If the master does not receive a read instruction from the master's event buffer area within a preset time, a slave-to-master communication link abnormality event is generated.
7. The event processing method according to claim 1, characterized in that: The method further comprises the following steps: Respond to the host's query command to query one or more specified nodes; Collect information from one or more specified nodes simultaneously, generate query events and send them to the host; The query event includes a designated node position code, a detection value, a configuration value and a status value of the designated node, an information collection timestamp, an event type word, an event sequence number and an event sending timestamp.
8. The event processing method according to claim 7, characterized in that: After the step of responding to the host's query instruction and querying the designated node, the method further includes: Send a query completion interrupt notification to the host so that the host can read the event buffer of the host and process it.
9. A slave device, characterized in that: The slave includes: Node monitoring unit, used to monitor all nodes in real time; The collection and transmission unit is used to collect information about the abnormal node and the related nodes of its link at the same time if any node is confirmed to be abnormal, and generate an abnormal event and send it to the host; The abnormal event includes the abnormal node position code, abnormal type code, abnormal occurrence timestamp, configuration value and status value of the abnormal node and related nodes of the link where it is located, information collection timestamp, event type word, event sequence number and event sending timestamp.
10. A communication device, characterized in that: The invention comprises the slave device according to claim 9 and a host device connected to the slave device.