Event notification sending method, device and medium based on network configuration protocol

By judging the subscription relationship in the network device and creating processing threads, the problem of the inability to add or modify subscribed events in the prior art without interrupting the connection is solved, and continuous fault monitoring and data acquisition on the network management side are realized.

CN115174352BActive Publication Date: 2024-12-13CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210805491.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2024-12-13
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

In the prior art, the network management end cannot add or modify the subscribed events without interrupting the connection after subscribing to the event, resulting in network management difficulties and data loss.

Method used

By determining whether a subscription relationship has been established when receiving the event subscription request, filtering out unsubscribed events, creating processing threads for them, and sending event notifications to the network management side, adding or modifying alarm events without interrupting the connection .

Benefits of technology

The alarm processing process is optimized, ensuring that the network management end fails to monitor network equipment faults and the data acquisition process is not lost, and the separate and flexible management of each alarm event is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115174352B_ABST
    Figure CN115174352B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of network technology, and provides an event notification sending method based on a network configuration protocol, an event notification sending device based on a network configuration protocol, a computer storage medium, and an electronic device, wherein the event notification sending method based on a network configuration protocol includes: upon receiving an event subscription request from a network management terminal, determining whether an event subscription relationship has been established with the network management terminal; carrying event information corresponding to at least one event in the event subscription request; in response to the event subscription relationship having been established with the network management terminal, filtering out unsubscribed events from at least one event; creating a corresponding processing thread for the unsubscribed event, and sending event notifications related to the unsubscribed event to the network management terminal based on the processing thread. The present disclosure can realize the addition or cancellation of subscribed events without interrupting the connection between the network management terminal and the network device, and realize flexible and dynamic management of alarm events.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the NETCONF protocol, in order to promptly obtain information about events that occur in the network (such as configuration changes, faults, status changes, threshold crossings, and abnormal intrusions), the network management end needs to provide event notifications. To this end, the network management end needs to subscribe to event notifications from network devices.

[0003] In the related art, once a network management end sends a subscription request for a certain event to a network device, it is no longer possible to subscribe to other events and needs to disconnect the connection and resend the subscription request to complete the subscription.

[0004] In view of this, there is an urgent need in the art to develop a new event notification sending method and device based on a network configuration protocol.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure. Summary of the invention

[0006] The purpose of the present disclosure is to provide an event notification sending method based on a network configuration protocol, an event notification sending device based on a network configuration protocol, a computer storage medium and an electronic device, thereby at least to a certain extent overcoming the technical problem of being unable to add or modify subscribed events without interrupting the connection due to the limitations of related technologies.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to the first aspect of the present disclosure, there is provided a method for sending event notifications based on a network configuration protocol, comprising: upon receiving an event subscription request from a network management end, determining whether an event subscription relationship has been established with the network management end; the event subscription request carries event information corresponding to at least one event; in response to the event subscription relationship having been established with the network management end, filtering out unsubscribed events from the at least one event; creating a corresponding processing thread for the unsubscribed event, and sending event notifications related to the unsubscribed event to the network management end based on the processing thread.

[0009] In an exemplary embodiment of the present disclosure, the determination of whether an event subscription relationship has been established with the network management end includes: reading a pre-stored subscribed event list, the subscribed event list being used to store target event information of subscribed events; determining whether the subscribed event list is empty; if the subscribed event list is not empty, determining that the event subscription relationship has been established with the network management end; if the subscribed event list is empty, determining that the event subscription relationship has not been established with the network management end.

[0010] In an exemplary embodiment of the present disclosure, in response to establishing an event subscription relationship with the network management end, filtering out unsubscribed events from the at least one event includes: in response to establishing an event subscription relationship with the network management end, obtaining target event information of the subscribed event from the subscribed event list; determining whether the event information corresponding to the at least one event contains the target event information; if the event information corresponding to the at least one event contains the target event information, determining other events in the at least one event except the subscribed event as the unsubscribed events; if the event information corresponding to the at least one event does not contain the target event information, determining the at least one event as the unsubscribed event.

[0011] In an exemplary embodiment of the present disclosure, after creating a corresponding processing thread for the unsubscribed event, the method further includes: adding the unsubscribed event and an identifier of the processing thread corresponding to the unsubscribed event to a subscribed event list.

[0012] In an exemplary embodiment of the present disclosure, after the unsubscribed event and the identifier of the processing thread corresponding to the unsubscribed event are added to the subscribed event list, the event notification related to the unsubscribed event is sent to the network management end based on the processing thread, including: obtaining the identifier of the processing thread corresponding to the unsubscribed event from the subscribed event list; and sending the event notification related to the unsubscribed event to the network management end based on the processing thread corresponding to the identifier.

[0013] In an exemplary embodiment of the present disclosure, the method also includes: when receiving an event unsubscription request from a network management end, determining at least one subscribed event carried in the event unsubscription request; terminating the processing thread corresponding to the at least one subscribed event to cancel the network management end's subscription to the subscribed event.

[0014] In an exemplary embodiment of the present disclosure, the method also includes: in response to not establishing an event subscription relationship with the network management end, creating at least one corresponding processing thread for the at least one event; and sending an event notification related to the at least one event to the network management end based on the at least one processing thread.

[0015] According to the second aspect of the present disclosure, there is provided an event notification sending device based on a network configuration protocol, comprising: a judgment module, for judging whether an event subscription relationship has been established with a network management terminal upon receiving an event subscription request from the network management terminal; the event subscription request carries event information corresponding to at least one event; an event screening module, for filtering out unsubscribed events from the at least one event in response to the event subscription relationship having been established with the network management terminal; an event notification module, for creating a corresponding processing thread for the unsubscribed event, and sending event notifications related to the unsubscribed event to the network management terminal based on the processing thread.

[0016] According to a third aspect of the present disclosure, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the event notification sending method based on the network configuration protocol described in the first aspect is implemented.

[0017] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the event notification sending method based on the network configuration protocol described in the first aspect above by executing the executable instructions.

[0018] It can be seen from the above technical solutions that the event notification sending method based on the network configuration protocol, the event notification sending device based on the network configuration protocol, the computer storage medium and the electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:

[0019] In the technical solutions provided by some embodiments of the present disclosure, the present disclosure determines whether an event subscription relationship has been established with the network management terminal when receiving an event subscription request from the network management terminal (the event subscription request carries event information corresponding to at least one event), and in response to the event subscription relationship having been established with the network management terminal, screens out unsubscribed events from the at least one event, creates a corresponding processing thread for the unsubscribed event, and sends an event notification related to the unsubscribed event to the network management terminal based on the processing thread. On the one hand, the present disclosure can directly add or modify alarm events without disconnecting and reconnecting when the network device has established an event subscription relationship with the network management terminal, solves the problem that the alarm event must be disconnected and reconnected in the related art to add or modify the alarm event, optimizes the alarm processing process, and ensures that the network management terminal does not interrupt the fault monitoring process of the network device and the data acquisition process is not lost. On the other hand, the present disclosure can create an independent processing thread for each alarm event to achieve separate and flexible management of each alarm event. It should be understood that the above general description and the detailed description below are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0021] Figure 1 A schematic diagram of a process of subscribing to a NETCONF event in a related art is shown;

[0022] Figure 2 A schematic diagram showing a process of unsubscribing from an alarm event after subscribing to the alarm event in the related art;

[0023] Figure 3 A schematic diagram showing a flow chart of a method for sending event notification based on a network configuration protocol in an embodiment of the present disclosure;

[0024] Figure 4 A flow chart showing how to send an event notification to a network management terminal when a network device has not established an event subscription relationship with a network management terminal in an embodiment of the present disclosure;

[0025] Figure 5 A schematic diagram showing a flow chart of how to cancel a subscription of a subscribed event by a network management terminal in an embodiment of the present disclosure;

[0026] Figure 6 The overall flow chart of the event notification sending method based on the network configuration protocol in the embodiment of the present disclosure is shown;

[0027] Figure 7 A schematic diagram showing a process of canceling a subscription to a subscribed event in an embodiment of the present disclosure;

[0028] Figure 8 A schematic diagram showing the structure of an event notification sending device based on a network configuration protocol in an exemplary embodiment of the present disclosure is shown;

[0029] Fig. 9 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0030] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0031] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0032] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0033] refer to Figure 1 , Figure 1 A schematic diagram of a process of subscribing to a NETCONF event in a related art is shown, including the following steps S101-S108:

[0034] In step S101, the network management terminal sends a subscription request for event A to the network device;

[0035] In step S102, the network device pushes the event notification corresponding to event A to the network management terminal;

[0036] In step S103, the network management terminal sends a subscription request for event B to the network device;

[0037] In step S104, the network device returns a "cannot subscribe" message to the network management terminal;

[0038] In step S105, the network management terminal sends a <close-session>Instruction to disconnect the connection between the network management terminal and the network device;

[0039] In step S106, the network management terminal sends a connection request to the network device to re-establish the connection;

[0040] In step S107, the network management terminal sends a subscription request for event B to the network device;

[0041] In step S108, the network device pushes the event notification corresponding to event B to the network management terminal.

[0042] From the above process, it can be seen that the relevant technology has the following defects:

[0043] First, it is not possible to subscribe to multiple alarm events at the same time;

[0044] Second, after sending an alarm subscription request, it is not possible to send another alarm subscription request (or modify the subscribed event to another event) while maintaining the connection. Only after disconnecting and reconnecting can other event subscription requests be sent. Disconnecting the connection between the management server and the network device will cause the network management end to be unable to configure the network device, modify the data, and cannot receive the alarm information sent by the network device, resulting in network management difficulties.

[0045] refer to Figure 2 , Figure 2 A flow chart of unsubscribing from an alarm event after subscribing to the alarm event in the related art is shown, including the following steps S201-S202:

[0046] In step S201, the network management terminal sends <close-session>Instruction to disconnect the connection between the network management terminal and the network device;

[0047] In step S202, the "alarm-notification" of the network device no longer reports the event notification.

[0048] It can be seen from the above steps that, since it is impossible to subscribe to multiple alarm events at the same time in the related art, the only way to unsubscribe from the above subscribed alarm events is to disconnect.

[0049] In the embodiments of the present disclosure, firstly, a method for sending event notifications based on a network configuration protocol is provided, which at least to some extent overcomes the defect in the related art that it is impossible to add or modify subscribed events without interrupting the connection.

[0050] Figure 3 A flow chart of a method for sending event notifications based on a network configuration protocol in an embodiment of the present disclosure is shown. The execution subject of the method for sending event notifications based on a network configuration protocol may be a network device that sends event notifications.

[0051] refer to Figure 3 According to an embodiment of the present disclosure, a method for sending an event notification based on a network configuration protocol includes the following steps:

[0052] Step S310, upon receiving an event subscription request from the network management terminal, determining whether an event subscription relationship has been established with the network management terminal; the event subscription request carries event information corresponding to at least one event;

[0053] Step S320, in response to establishing an event subscription relationship with the network management terminal, filtering out unsubscribed events from at least one event;

[0054] Step S330: Create a corresponding processing thread for the unsubscribed event, and send an event notification related to the unsubscribed event to the network management terminal based on the processing thread.

[0055] exist Figure 3 In the technical solution provided by the illustrated embodiment, on the one hand, the present disclosure determines whether an event subscription relationship has been established with the network management terminal when receiving an event subscription request from the network management terminal (the event subscription request carries event information corresponding to at least one event), and in response to the event subscription relationship having been established with the network management terminal, screens out unsubscribed events from the at least one event, creates a corresponding processing thread for the unsubscribed event, and sends an event notification related to the unsubscribed event to the network management terminal based on the processing thread. On the one hand, the present disclosure can directly add or modify alarm events without disconnecting and reconnecting when the network device has established an event subscription relationship with the network management terminal, solves the problem that the alarm event must be disconnected and reconnected in the related art to add or modify the alarm event, optimizes the alarm processing process, and ensures that the network management terminal does not interrupt the fault monitoring process of the network device and the data acquisition process is not lost. On the other hand, the present disclosure can create an independent processing thread for each alarm event, and realizes the separate and flexible management of each alarm event.

[0056] The following Figure 3 The specific implementation process of each step is described in detail:

[0057] First, the terms used in this disclosure are explained:

[0058] The Network Configuration Protocol (NETCONF) provides a mechanism for managing network devices. Users can use this mechanism to add, modify, and delete the configuration of network devices and obtain the configuration and status information of network devices. Through the NETCONF protocol, network devices can provide standardized application programming interfaces (APIs), and applications can directly use these APIs to send and obtain configurations to network devices.

[0059] The NETCONF protocol defines messages in XML (eXtensible Markup Language) format and uses the RPC (Remote Procedure Call) mechanism to modify configuration information, which can facilitate the management of configuration information and meet the interoperability between devices from different manufacturers. Specifically, its advantages are as follows:

[0060] First, it can reduce network failures caused by manual configuration errors;

[0061] Second, it can improve the efficiency of upgrading system software using configuration tools;

[0062] Third, it has good scalability. Devices from different manufacturers can define their own protocol operations to achieve unique management functions.

[0063] Fourth, NETCONF provides security mechanisms such as authentication and authorization to ensure the security of message transmission.

[0064] The network management end in the present disclosure may be a network management client, a controller, etc., and may be set according to actual conditions, and the present disclosure does not make any special limitation on this.

[0065] The main functions of the network management terminal are: using the NETCONF protocol to manage network devices; sending requests to network devices to query or modify one or more specific parameter values; receiving alarms and events actively sent by network devices to learn the current status of the managed network devices.

[0066] The network device in the present disclosure may be an OLT device (Optical Line Termination), also called an optical terminal, which is a local-end device of an operator's passive optical network and has the following two main functions: first, converting the passive optical network signal of the user terminal into the electrical signal of the device used by the operator; second, coordinating the multiplexing between optical network units.

[0067] In general, the network management end in the present disclosure can send an event subscription request to the network device. When a network device fails or other events occur, the network device can use the Notification mechanism to actively notify the network management end of the network device's alarms and events, and report the current status changes of the network device to the network management end, so that the network management end can manage the network device.

[0068] In step S310, when an event subscription request is received from the network management terminal, it is determined whether an event subscription relationship has been established with the network management terminal; the event subscription request carries event information corresponding to at least one event.

[0069] In this step, the network device may receive an event subscription request from the network management end, and the event subscription request may carry event information corresponding to at least one event, and the event information may be an event name, an event identifier, etc., which may be set according to actual conditions, and the present disclosure does not specifically limit this. Thus, when at least one of the above events occurs in the network device, the network device may report the above at least one event to the network management end in a timely manner so that the network management end can manage the network device.

[0070] The type of the at least one event mentioned above may be an alarm event, such as: equipment failure alarm event, equipment memory excessive occupation alarm event, equipment power failure alarm event, equipment abnormal termination alarm event, etc., which can be set according to actual conditions, and the present disclosure does not make any special limitation on this.

[0071] After receiving the above event subscription request, the network device can determine whether it has established an event subscription relationship with the network management end, that is, whether the network management end has sent an event subscription request to the network device before receiving the event subscription request.

[0072] Specifically, after receiving the above event subscription request, the network device can search for a pre-stored subscribed event list, which is used to store the target event information of the subscribed event (which can be an event identifier or an event name, which can be set according to actual conditions, and the present disclosure does not specifically limit this). Thus, if the above subscribed event list is not empty, that is, there are subscribed events in the above subscribed event list, it can be determined that the network device has established an event subscription relationship with the network management terminal. If the above subscribed event list is empty, that is, there are no subscribed events in the above subscribed event list, it can be determined that the network device has not established an event subscription relationship with the above network management terminal.

[0073] After determining that the network device has established an event subscription relationship with the network management terminal, the following steps S320 to S330 may be performed:

[0074] In step S320, in response to the event subscription relationship having been established with the network management terminal, unsubscribed events are screened out from at least one event.

[0075] In this step, in response to the network device having established an event subscription relationship with the network management end, a session has been established between the network management end and the network device, and the subscribed event can be obtained from the subscribed event list. Furthermore, at least one event included in the event subscription request, other events except the subscribed event can be determined as filtered out unsubscribed events.

[0076] Specifically, the network device can first obtain the target event information of the subscribed event from the subscribed event list, and then determine whether the event information corresponding to at least one event contains the target event information. If the event information corresponding to at least one event contains the target event information, then other events in at least one event except the subscribed event can be determined as unsubscribed events. If the event information corresponding to at least one event does not contain the target event information, then at least one event can be determined as an unsubscribed event.

[0077] Exemplarily, taking the above-mentioned event information as an event identifier as an example, assuming that the event information of the above-mentioned at least one event is "event identifier A+event identifier B+event identifier C", and the event identifier of the above-mentioned subscribed event is "event identifier C", it can be determined that the above-mentioned event information contains the above-mentioned target event information, and thus, it can be determined that the above-mentioned at least one event contains the above-mentioned subscribed event, and thus, the event corresponding to "event identifier A+event identifier B" can be determined as the above-mentioned unsubscribed event.

[0078] Assuming that the event information of at least one of the above events is "event identifier A+event identifier B+event identifier C", and the event identifier of the subscribed event obtained by the network device is "event identifier D", it can be determined that the above event information does not contain the above target event information. Therefore, it can be determined that the above subscribed event does not exist in the above at least one event. Therefore, the event corresponding to "event identifier A+event identifier B+event identifier C" can be determined as the above unsubscribed event.

[0079] After filtering out the unsubscribed events, a separate processing thread can be created for each unsubscribed event based on the above session. When the unsubscribed event is one event, then the processing thread corresponding to the unsubscribed event is also one processing thread. When the unsubscribed event is multiple events, then the processing threads corresponding to the unsubscribed event are also multiple processing threads.

[0080] Thus, the identification mapping relationship of the processing thread corresponding to each unsubscribed event can be stored in the above subscribed event list. Furthermore, when the network device needs to send a certain type of event notification, it can read the identification of the processing thread corresponding to the event from the above subscribed time list, quickly locate the thread based on the identification, and use the thread to send event notifications related to its subscribed events to the network device, thereby facilitating the subsequent management of various types of events.

[0081] Among them, a thread is the smallest unit that the operating system can schedule operations on. It is contained in a process and is the actual operating unit in the process. A thread refers to a single sequential control flow in a process. A process can have multiple threads running concurrently, and each thread executes different tasks in parallel, thereby increasing the execution speed of tasks.

[0082] Session (When accessing a web page on the server, a piece of memory will be opened in the server's memory, and this memory is called session): In computers, especially in network applications, it is called "session control". The Session object stores the properties and configuration information required for a specific user session. In this way, when the user jumps between web pages of the application, the variables stored in the Session object will not be lost, but will exist throughout the user session. When a user requests a web page from an application, if the user does not have a session yet, the web server will automatically create a Session object. When the session expires or is abandoned, the server will terminate the session.

[0083] Session is usually used to perform the following operations:

[0084] Stores information that needs to persist across a user session, such as login information or other information that a user needs while navigating a web application.

[0085] Stores objects that only need to maintain their state across page reloads or between a set of pages grouped by functionality.

[0086] The role of Session is to keep the user's state information on the Web server for access from any device at any time. Because the browser does not need to store any of this information, any browser can be used, even a browser device like a Pad or mobile phone.

[0087] It should be noted that after the above step S310, when it is determined that the network device has not established an event subscription relationship with the network management terminal, reference can be made to Figure 4 , Figure 4 A flow chart showing how to send an event notification to a network management terminal when a network device has not established an event subscription relationship with a network management terminal in an embodiment of the present disclosure includes steps S401-S402:

[0088] In step S401, in response to not establishing an event subscription relationship with the network management terminal, at least one corresponding processing thread is created for at least one event.

[0089] In this step, when it is determined that the network device has not established an event subscription relationship with the network management terminal, a session can be created for the network device and the network management terminal, and then, based on the session, at least one corresponding processing thread is created for the at least one event.

[0090] After creating at least one processing thread, the mapping relationship between each event and the identifier of its processing thread can be stored in the above-mentioned subscribed event list, and then, step S402 can be entered to send an event notification related to at least one event to the network management terminal based on at least one processing thread.

[0091] In this step, when the network device needs to send an event notification to the network management end, it can first read the identifier of the processing thread corresponding to the event from the above-mentioned subscribed event list, and then, based on the identifier, it can quickly locate the thread and use the thread to send event notifications related to its subscribed events to the network device.

[0092] refer to Figure 5 , Figure 5 A flow chart showing how to cancel a subscription of a subscribed event by a network management terminal in an embodiment of the present disclosure includes steps S501 and S502:

[0093] In step S501, when an event unsubscription request is received from a network management terminal, at least one subscribed event carried in the event unsubscription request is obtained.

[0094] In this step, when the network device receives an event unsubscription request from the network management end, given that the event unsubscription request carries event information of one or more subscribed events, the subscribed event corresponding to the event unsubscription request can be determined based on the event information of the one or more subscribed events.

[0095] After the subscribed events are determined, the process may proceed to step S502 to terminate at least one processing thread corresponding to the subscribed events, so as to cancel the subscription of the network management terminal to the subscribed events.

[0096] In this step, the identifier of at least one processing thread corresponding to the at least one subscribed event can be read from the subscribed event list, and then the corresponding processing thread corresponding to each identifier is terminated to cancel the subscription of the network management terminal to the at least one subscribed event.

[0097] refer to Figure 6 , Figure 6 The overall flow chart of the event notification sending method based on the network configuration protocol in the embodiment of the present disclosure is shown, including steps S601 to S608:

[0098] In step S601, the OLT device receives an event subscription request, which carries at least one event;

[0099] In step S602, it is determined whether there is a subscribed event in the network device;

[0100] If there are subscribed events in the network device, proceed to step S603 to filter out unsubscribed events from at least one event;

[0101] In step S604, based on the established session, an independent processing thread is created for each unsubscribed event;

[0102] If there is no subscribed event in the network device, proceed to step S605 to establish a session between the network device and the network management terminal;

[0103] In step S606, all events in the event subscription request are traversed;

[0104] In step S607, a separate processing thread is established for each event;

[0105] In step S608, event notifications are sent individually based on each processing thread.

[0106] refer to Figure 7 , Figure 7 A schematic diagram of a process of canceling a subscription to a subscribed event in an embodiment of the present disclosure is shown, including steps S701 to S704:

[0107] In step S701, the network device receives an event unsubscribe request sent by the network management terminal;

[0108] In step S702, it is determined whether the event unsubscription request is to cancel all subscribed events;

[0109] If yes, then proceed to step S703 to terminate all processing threads;

[0110] If not, the process proceeds to step S704 to terminate the processing thread corresponding to the subscribed event included in the event unsubscription request.

[0111] Based on the above technical scheme, on the one hand, compared with the method in the prior art that each session can only open one event processing thread, the present disclosure can achieve loose coupling between the alarm event thread and the session, and realize the management of alarm events through multiple independent threads; further, the present disclosure can realize adding or modifying alarm events without disconnecting, which solves the problem in the related technology that the alarm event must be disconnected and reconnected to add or modify the alarm event, and optimizes the alarm processing process; on the other hand, the present disclosure adds the function of canceling multiple alarm events on the basis of multi-threading, and realizes dynamic and flexible management of alarm events.

[0112] The present disclosure also provides an event notification sending device based on a network configuration protocol, Figure 8 FIG. 1 is a schematic diagram showing a structure of an event notification sending device based on a network configuration protocol in an exemplary embodiment of the present disclosure; Figure 8 As shown, the event notification sending device 800 based on the network configuration protocol may include a judgment module 810, an event screening module 820 and an event notification module 830. Among them:

[0113] The judgment module 810 is used to judge whether an event subscription relationship has been established with the network management terminal when receiving an event subscription request from the network management terminal; the event subscription request carries event information corresponding to at least one event;

[0114] An event screening module 820, configured to screen out unsubscribed events from the at least one event in response to establishing an event subscription relationship with the network management terminal;

[0115] The event notification module 830 is used to create a corresponding processing thread for the unsubscribed event, and send an event notification related to the unsubscribed event to the network management terminal based on the processing thread.

[0116] In an exemplary embodiment of the present disclosure, the determination module 810 is configured to:

[0117] Read a pre-stored subscribed event list, wherein the subscribed event list is used to store target event information of subscribed events; determine whether the subscribed event list is empty; if the subscribed event list is not empty, determine that the event subscription relationship has been established with the network management end; if the subscribed event list is empty, determine that the event subscription relationship has not been established with the network management end.

[0118] In an exemplary embodiment of the present disclosure, the event screening module 820 is configured to:

[0119] In response to establishing an event subscription relationship with the network management terminal, the target event information of the subscribed event is obtained from the subscribed event list; it is determined whether the event information corresponding to the at least one event contains the target event information; if the event information corresponding to the at least one event contains the target event information, the other events in the at least one event except the subscribed event are determined as the unsubscribed events; if the event information corresponding to the at least one event does not contain the target event information, the at least one event is determined as the unsubscribed event.

[0120] In an exemplary embodiment of the present disclosure, after creating a corresponding processing thread for the unsubscribed event, the event notification module 830 is configured to:

[0121] The unsubscribed event and the identifier of the processing thread corresponding to the unsubscribed event are added to the subscribed event list.

[0122] In an exemplary embodiment of the present disclosure, after adding the unsubscribed event and the identifier of the processing thread corresponding to the unsubscribed event to the subscribed event list, the event notification module 830 is configured to:

[0123] The identifier of the processing thread corresponding to the unsubscribed event is obtained from the subscribed event list; and based on the processing thread corresponding to the identifier, an event notification related to the unsubscribed event is sent to the network management terminal.

[0124] In an exemplary embodiment of the present disclosure, the event notification module 830 is configured to:

[0125] When receiving an event unsubscription request from a network management terminal, at least one subscribed event carried in the event unsubscription request is determined; a processing thread corresponding to the at least one subscribed event is terminated to cancel the subscription of the network management terminal to the subscribed event.

[0126] In an exemplary embodiment of the present disclosure, the event notification module 830 is configured to:

[0127] In response to not establishing an event subscription relationship with the network management terminal, creating at least one corresponding processing thread for the at least one event; and sending an event notification related to the at least one event to the network management terminal based on the at least one processing thread.

[0128] The specific details of each module in the above-mentioned event notification sending device based on the network configuration protocol have been described in detail in the corresponding event notification sending method based on the network configuration protocol, so they will not be repeated here.

[0129] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0130] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0131] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0132] The present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device.

[0133] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0134] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0135] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.

[0136] In addition, an electronic device capable of implementing the above method is also provided in an embodiment of the present disclosure.

[0137] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0138] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9 The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0139] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one storage unit 920, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.

[0140] The storage unit stores a program code, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 910 can perform the following steps: Figure 3 As shown in: Step S310, upon receiving an event subscription request from a network management end, determining whether an event subscription relationship has been established with the network management end; the event subscription request carries event information corresponding to at least one event; the event subscription relationship is used to indicate that the network management end has sent at least one subscribed event to a network device; Step S320, in response to the event subscription relationship having been established with the network management end, filtering out unsubscribed events from the at least one event; Step S330, creating a corresponding processing thread for the unsubscribed event, and sending an event notification related to the unsubscribed event to the network management end based on the processing thread.

[0141] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .

[0142] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0143] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0144] The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0145] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A method for sending event notification based on a network configuration protocol, characterized in that: Applied to network equipment, including: Upon receiving an event subscription request from a network management terminal, determining whether an event subscription relationship has been established with the network management terminal; the event subscription request carries event information corresponding to at least one event; In response to establishing an event subscription relationship with the network management terminal, filtering out unsubscribed events from the at least one event; the type of the at least one event includes an alarm event; A corresponding processing thread is created for the unsubscribed event, and an event notification related to the unsubscribed event is sent to the network management terminal based on the processing thread, so that the network management terminal manages the network device based on the at least one event.

2. The method according to claim 1, characterized in that The determining whether an event subscription relationship has been established with the network management terminal includes: Reading a pre-stored subscribed event list, wherein the subscribed event list is used to store target event information of the subscribed events; Determine whether the subscribed event list is empty; If the subscribed event list is not empty, determining that the event subscription relationship has been established with the network management terminal; If the subscribed event list is empty, it is determined that the event subscription relationship has not been established with the network management terminal.

3. The method according to claim 2, characterized in that In response to establishing an event subscription relationship with the network management terminal, filtering out unsubscribed events from the at least one event includes: In response to establishing an event subscription relationship with the network management terminal, acquiring target event information of the subscribed event from the subscribed event list; Determining whether the event information corresponding to the at least one event includes the target event information; If the event information corresponding to the at least one event includes the target event information, determining other events in the at least one event except the subscribed event as the unsubscribed events; If the event information corresponding to the at least one event does not include the target event information, the at least one event is determined as the unsubscribed event.

4. The method according to claim 1, characterized in that: After creating a corresponding processing thread for the unsubscribed event, the method further includes: The unsubscribed event and the identifier of the processing thread corresponding to the unsubscribed event are added to the subscribed event list.

5. The method according to claim 4, characterized in that After adding the unsubscribed event and the identifier of the processing thread corresponding to the unsubscribed event to the subscribed event list, sending the event notification related to the unsubscribed event to the network management terminal based on the processing thread includes: Obtaining an identifier of a processing thread corresponding to the unsubscribed event from the subscribed event list; Based on the processing thread corresponding to the identifier, an event notification related to the unsubscribed event is sent to the network management terminal.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Upon receiving an event unsubscription request from a network management terminal, determining at least one subscribed event carried in the event unsubscription request; The processing thread corresponding to the at least one subscribed event is terminated to cancel the subscription of the network management terminal to the subscribed event.

7. The method according to claim 1, characterized in that The method further comprises: In response to not establishing an event subscription relationship with the network management terminal, creating at least one corresponding processing thread for the at least one event; An event notification related to the at least one event is sent to the network management terminal based on the at least one processing thread.

8. An event notification sending device based on a network configuration protocol, characterized in that: Applied to network equipment, including: A judgment module, used to judge whether an event subscription relationship has been established with the network management terminal when receiving an event subscription request from the network management terminal; the event subscription request carries event information corresponding to at least one event; An event screening module, configured to screen out unsubscribed events from the at least one event in response to establishing an event subscription relationship with the network management terminal; the type of the at least one event includes an alarm event; An event notification module is used to create a corresponding processing thread for the unsubscribed event, and send an event notification related to the unsubscribed event to the network management end based on the processing thread, so that the network management end manages the network device based on the at least one event.

9. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the event notification sending method based on the network configuration protocol described in any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the event notification sending method based on the network configuration protocol according to any one of claims 1 to 7 by executing the executable instructions.

Citation Information

Patent Citations

  • Cross-domain user data synchronization method based on subscription sending mode

    CN113709250A