Communication method and apparatus
The NETCONF server subscribes to run configuration database change events and handles configuration conflicts, which solves the problem of failed submission of candidate configuration databases and realizes efficient and secure network configuration management.
Patent Information
- Application Number
- CN202210510890.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-11
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2042-05-11
AI Technical Summary
In NETCONF configuration management mode, when the candidate configuration database submits a configuration request to the running configuration database, configuration conflicts or configuration errors may occur, affecting the efficiency of user business deployment.
NETCONF server subscribes to the change event of the configuration database, receives reporting notifications, querys established sessions, determines whether there is a configuration conflict event, and sends event reporting messages to relevant clients, including event attribute information for processing.
Timely perceive configuration conflicts or errors, improve the success rate of submission of candidate configuration databases, and ensure efficient and secure network configuration management.
Smart Images

Figure CN115037623B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and in particular, to a communication method and apparatus. Background Art
[0002] As network application scenarios become increasingly complex, network devices support more and more functions. The traditional method for managing network devices is the Network Configuration Protocol (NETCONF) configuration management method. It directly submits the received configuration requests to the running configuration database. When configuration conflicts or errors occur, the impact on the entire network service is relatively large, and the pressure on network operation and maintenance to repair errors is also increasing.
[0003] Based on this, more and more device manufacturers support the NETCONF candidate configuration database function and solve the above problems through the candidate configuration database. For example, based on the running configuration database at a specific moment, a snapshot of the candidate configuration database is generated. Subsequently, when editing the candidate configuration database, if no configuration conflicts or errors occur, the configuration requests in the candidate database are submitted to the running database.
[0004] In the above process, since the NETCONF configuration management method supports multi-user parallel operations, when the first user operates on the candidate configuration database, the second user may be operating on the running configuration database. At this time, when the candidate configuration database submits a configuration request to the running configuration database, configuration conflicts or errors may occur, resulting in submission failure and affecting the efficiency of user service deployment. Summary of the Invention
[0005] In view of this, this application provides a communication method and apparatus to solve the problem that when the candidate configuration database submits a configuration request to the running configuration database, it can only perceive configuration conflicts or errors, resulting in submission failure and affecting the efficiency of user service deployment.
[0006] In a first aspect, this application provides a communication method. The method is applied to a NETCONF server, and the method includes:
[0007] Subscribe to running configuration database change events from the running configuration database, so that after the running configuration database determines that a running configuration database change event has occurred, it reports to the NETCONF server;
[0008] Receive the reported notification sent by the running configuration database;
[0009] According to the reported notice, query whether there is a NETCONF session that subscribes to the first event information in the sessions established between the local and the NETCONF client;
[0010] If there is, when it is determined that the running configuration database synchronizes and updates to the candidate configuration database, determine whether there is a first event that matches the first event information;
[0011] If there is, send an event reporting message to the first NETCONF client that establishes the NETCONF session with the NETCONF server. The event reporting message includes event attribute information, so that the first NETCONF client processes the first event according to the event attribute information;
[0012] Among them, the first event is specifically the candidate configuration database configuration conflict event.
[0013] In a second aspect, the present application provides a communication device. The device is applied to the NETCONF server. The device includes:
[0014] A subscription unit, configured to subscribe to a running configuration database change event from the running configuration database, so that after the running configuration database determines that a running configuration database change event occurs, report it to the NETCONF server;
[0015] A receiving unit, configured to receive the reported notice sent by the running configuration database;
[0016] A query unit, configured to query whether there is a NETCONF session that subscribes to the first event information in the sessions established between the local and the NETCONF client according to the reported notice;
[0017] A judgment unit, configured to, if there is, determine whether there is a first event that matches the first event information when it is determined that the running configuration database synchronizes and updates to the candidate configuration database;
[0018] A sending unit, configured to, if there is, send an event reporting message to the first NETCONF client that establishes the NETCONF session with the NETCONF server. The event reporting message includes event attribute information, so that the first NETCONF client processes the first event according to the event attribute information;
[0019] Among them, the first event is specifically the candidate configuration database configuration conflict event.
[0020] In a third aspect, the present application provides a network device, including a processor and a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to execute the method provided in the first aspect of the present application.
[0021] Therefore, by applying the communication method and device provided in the present application, the NETCONF server subscribes to the running configuration database change event from the running configuration database, so that after the running configuration database determines that the running configuration database change event occurs, it reports to the NETCONF server; the NETCONF server receives the reported notification sent by the running configuration database; according to the reported notification, the NETCONF server queries whether there is a NETCONF session that subscribes to the first event information among the sessions already established between the local and the NETCONF client; if so, when it is determined that the running configuration database synchronizes and updates to the candidate configuration database, the NETCONF server determines whether there is a first event that matches the first event information; if so, the NETCONF server sends an event reporting message to the first NETCONF client that establishes a NETCONF session with the NETCONF server, and the event reporting message includes event attribute information, so that the first NETCONF client processes the first event according to the event attribute information; where the first event is specifically a candidate configuration database configuration conflict event.
[0022] In this way, by subscribing to different events, the configuration conflicts or configuration errors between the two configuration databases can be sensed in a timely manner, so that the candidate configuration database can be aware of the configuration conflicts or configuration errors before submission, and prompt the user to repair the conflicts or errors in real time, improving the submission success rate of the candidate configuration database and ensuring more efficient and secure network configuration management. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flowchart of the communication method provided in the embodiment of the present application;
[0024] Figure 2 It is a signaling diagram applicable to the communication method provided in the example of the present application;
[0025] Figure 3 It is a structural diagram of the communication device provided in the embodiment of the present application;
[0026] Figure 4 It is a hardware structural diagram of the network device provided in the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "the", and "said" used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
[0029] It should be understood that although the terms first, second, third, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0030] The communication method provided by the embodiments of the present application will be described in detail below. Refer to Figure 1 , Figure 1 which is a flowchart of the communication method provided by the embodiments of the present application. This method is applied to the NETCONF server. The communication method provided by the embodiments of the present application may include the following steps.
[0031] Step 110: Subscribe to the running configuration database change event from the running configuration database so that after the running configuration database determines that a running configuration database change event has occurred, it reports to the NETCONF server.
[0032] Specifically, before this step, it also includes the process of the NETCONF server establishing a session with the NETCONF client and receiving the subscription request message sent by the NETCONF client.
[0033] The following takes the first NETCONF client as an example for illustration.
[0034] The first NETCONF client establishes a NETCONF session with the NETCONF server. After the NETCONF session is successfully established, the first NETCONF client generates and sends a subscription request message to the NETCONF server through the NETCONF session. The subscription request message includes first event information.
[0035] It should be noted that the event subscribed by the first NETCONF client is referred to as the first event here.
[0036] Through the NETCONF session, after the NETCONF server receives the subscription request message, it obtains the first event information from it. According to the first event information, the NETCONF server generates a running configuration database change event associated with the first event information.
[0037] Among them,
[0038] The first event is specifically the candidate configuration database configuration conflict event subscribed by the first NETCONF client; the first event information specifically refers to the attribute information representing the candidate configuration database configuration conflict event, and this attribute information can specifically be the identifier of the candidate configuration database configuration conflict event.
[0039] For example, the following subscription request message is given.
[0040]
[0041] In the above subscription request message, " <candidateconflictevent>Characterized as a candidate configuration database configuration conflict event.
[0042] After the NETCONF server determines that the first NETCONF client subscribes to the candidate configuration database configuration conflict event, based on the subscribed candidate configuration database configuration conflict event, the NETCONF server determines that in order to report the candidate configuration database configuration conflict event, it is necessary to promptly know the configuration change situation in the running configuration database.
[0043] The NETCONF server generates and subscribes to the running configuration database change event from the running configuration database.
[0044] After the running configuration database receives the subscription to the running configuration database change event, the running configuration database determines that the candidate configuration database of the NETCONF session subscribes to the configuration change event of the running configuration database.
[0045] It should be noted that the subscription to the running configuration database change event also includes the session information of the NETCONF session. For example, the session information includes information such as the session identifier of the NETCONF session and the identifier of the first NETCONF client.
[0046] The running configuration database accepts the subscription of the candidate configuration database of the NETCONF session and sends a subscription success notification to the NETCONF server, informing the NETCONF server that the subscription to the running configuration database change event is successful.
[0047] After receiving the subscription success notification, the NETCONF server sends a first subscription response message to the first NETCONF client, informing the first NETCONF client that it has accepted the subscription to the candidate configuration database configuration conflict event.
[0048] In the embodiment of the present application, the above-mentioned subscription to the running configuration database change event from the running configuration database is an internal processing action of the NETCONF server, which is used to inform the running configuration database of the currently subscribed content. The subscription to the running configuration database change event can be specifically carried by a message format or by a data structure, which is not limited here.
[0049] The above-mentioned sending of the subscription success notification to the NETCONF server is an internal processing action of the running configuration database, which is used to inform the NETCONF server that the subscription has been accepted. The subscription success notification can be specifically a message format or a data structure, which is not limited here.
[0050] Optionally, after the first NETCONF client receives the subscription response message, it may send a configuration request message to the NETCONF server. The configuration request message includes configuration content. The NETCONF server stores the configuration content in the candidate configuration database. The NETCONF server sends a configuration response message to the first NETCONF client. The configuration response message includes a configuration result.
[0051] For example, the following is the configuration request message sent by the NETCONF client.
[0052]
[0053] In the above configuration request message, " <ifindex>gigabitethernet 1 / 0 / 1< / ifindex> ” represents creating a sub-interface gigabitethernet 1 / 0 / 1 in the candidate configuration database.
[0054] According to the configuration request message, the NETCONF server creates a sub-interface gigabitethernet 1 / 0 / 1 in the candidate configuration database.
[0055] Step 120: Receive the reporting notification sent by the running configuration database.
[0056] Specifically, according to the description in step 110, after the running configuration database accepts the subscription of the running configuration database change event by the NETCONF server, when it determines that the running configuration database change event has occurred, the running configuration database reports to the NETCONF server.
[0057] The NETCONF server receives the reporting notification sent by the running configuration database.
[0058] In the embodiments of the present application, the above sending the reporting notification to the NETCONF server is an internal processing action of the running configuration database, which is used to inform the NETCONF server that the subscribed running configuration database change event has occurred. The reporting notification may specifically be a message format or a data structure, which is not limited herein.
[0059] Optionally, in the embodiments of the present application, the second NETCONF client also sends a configuration request message to the running configuration database. The configuration request message may be the same as the foregoing configuration request message. The running configuration database stores the configuration content locally.
[0060] For example, the second NETCONF client also creates a sub-interface gigabitethernet 1 / 0 / 1 in the running configuration database.
[0061] Since the running configuration database has accepted the candidate configuration database reservation for the NETCONF session and subscribed to the configuration change events of the running configuration database, at this time, the running configuration database generates a reporting notification, which is used to inform the NETCONF server that its local configuration has changed.
[0062] Step 130: According to the reporting notification, query whether there is a NETCONF session that subscribes to the first event information among the sessions established between the local and the NETCONF client.
[0063] Specifically, according to the description of step 120, after receiving the reporting notification, the NETCONF server determines that the configuration in the running configuration database has changed. The NETCONF server queries whether there is a NETCONF session that subscribes to the first event information among the sessions established between the local and the NETCONF client.
[0064] If there is, the NETCONF server executes step 140; otherwise, exit this process.
[0065] Step 140: If there is, when it is determined that the running configuration database synchronizes and updates to the candidate configuration database, determine whether there is a first event that matches the first event information.
[0066] Specifically, according to the description of step 130, if there is a NETCONF session that subscribes to the first event information in the established session, the NETCONF server first determines whether the running configuration database synchronizes and updates to the candidate configuration database.
[0067] If it is determined that the running configuration database synchronizes and updates to the candidate configuration database, the NETCONF server continues to determine whether there is a first event that matches the first event information currently. That is, the NETCONF server checks whether a candidate configuration database configuration conflict event has occurred.
[0068] If there is, the NETCONF server executes step 150; otherwise, synchronize the configuration in the running configuration database to the candidate configuration database in real time.
[0069] As in the foregoing example, different NETCONF clients have respectively created a sub-interface gigabitethernet 1 / 0 / 1 in the candidate configuration database and the running configuration database, and the sub-interfaces created in the two configuration databases are the same. At this time, the NETCONF server determines that a candidate configuration database configuration conflict event has occurred.
[0070] In the embodiments of the present application, a candidate configuration database configuration conflict event may occur in the following scenarios:
[0071]
[0072]
[0073] It can be understood that the above scenarios illustrate the occurrence of candidate configuration database configuration conflict events in the form of examples. In actual applications, other scenarios may also occur, which are not listed one by one in the embodiments of the present application.
[0074] Step 150: If it exists, send an event reporting message to the first NETCONF client that has established the NETCONF session with the NETCONF server. The event reporting message includes event attribute information, so that the first NETCONF client can perform corresponding processing on the first event according to the event attribute information.
[0075] Specifically, according to the description of step 140, after the NETCONF server determines that a candidate configuration database configuration conflict event has occurred, the NETCONF server obtains event attribute information. The event attribute information includes the location where the event occurred, the basic reason for the event occurrence, and the specific reason for the event occurrence.
[0076] The NETCONF server generates an event reporting message, which includes event attribute information. The NETCONF server sends the event reporting message to the first NETCONF client.
[0077] After receiving the event reporting message, the first NETCONF client determines that a candidate configuration database configuration conflict event has occurred currently. The first NETCONF client obtains event attribute information from the event reporting message. According to the event attribute information, the first NETCONF client determines information such as the location, basic reason, and specific reason for the occurrence of the candidate configuration database configuration conflict event.
[0078] According to the above information obtained, the first NETCONF client performs corresponding repair work. The first NETCONF client can send a notification message to the NETCONF server to inform the NETCONF server how to repair the candidate configuration database and the running configuration database.
[0079] For example, for the sub-interface created first in the candidate configuration database and the sub-interface created later in the running configuration database, the sub-interfaces created in both the candidate configuration database and the running configuration database can be deleted and restored to the state before configuration.
[0080] For example, the following event reporting message is given.
[0081]
[0082] In the above event reporting message, "<! -- Conflict location -->, <! -- Basic conflict reason -->, <! -- Specific conflict reason -->" can be filled in according to the actual situation.
[0083] Among them, the basic conflict reason can specifically include object error, object conflict, etc. The scenarios where the specific conflict reason causes the basic conflict reason can be specifically object already exists, object does not exist, etc.
[0084] According to the foregoing example, the event reporting message can be specifically as follows:
[0085]
[0086] Therefore, by applying the communication method provided in this application, the NETCONF server subscribes to the running configuration database change event from the running configuration database, so that after the running configuration database determines that the running configuration database change event occurs, it reports to the NETCONF server; the NETCONF server receives the reporting notification sent by the running configuration database; according to the reporting notification, the NETCONF server queries whether there is a NETCONF session subscribing to the first event information in the sessions already established between the local and the NETCONF client; if it exists, when determining that the running configuration database synchronizes and updates to the candidate configuration database, the NETCONF server determines whether there is a first event matching the first event information occurring; if it exists, the NETCONF server sends an event reporting message to the first NETCONF client that has established a NETCONF session with the NETCONF server, and the event reporting message includes event attribute information, so that the first NETCONF client performs corresponding processing on the first event according to the event attribute information; among them, the first event is specifically a candidate configuration database configuration conflict event.
[0087] In this way, by subscribing to different events, the configuration conflicts or configuration errors of the two configuration databases can be sensed in a timely manner, so that the candidate configuration database can be aware of the configuration conflicts or configuration errors before submission, and prompt the user to repair the conflicts or errors in real time, improving the submission success rate of the candidate configuration database and ensuring more efficient and secure network configuration management.
[0088] Next, a detailed description of the communication method provided in the embodiments of this application will be given. Refer to Figure 2 , Figure 2 is the signaling diagram applicable to the communication method provided in the embodiments of this application.
[0089] In Figure 2 In this case, the NETCONF client 1 establishes a NETCONF session with the NETCONF server. After the NETCONF session is successfully established, the NETCONF client 1 generates and sends a subscription request message to the NETCONF server through the NETCONF session. The subscription request message includes an identifier for subscribing to candidate configuration database configuration conflict events.
[0090] After receiving the subscription request message, the NETCONF server determines that the NETCONF client 1 subscribes to candidate configuration database configuration conflict events. The NETCONF server generates a subscription for running configuration database change events.
[0091] The NETCONF server subscribes to running configuration database change events from the running configuration database.
[0092] After receiving the subscription for running configuration database change events, the running configuration database determines the candidate configuration database subscription for the NETCONF session to subscribe to running configuration database configuration change events, and after a configuration change event occurs in the running configuration database, it needs to report to the NETCONF server.
[0093] The running configuration database accepts the subscription from the NETCONF server and sends a subscription success notification to the NETCONF server, informing the NETCONF server that the subscription to configuration change events in the running configuration database is successful. After receiving the subscription success notification, the NETCONF server sends a subscription response message to the NETCONF client 1, informing the NETCONF client 1 that the subscription to candidate configuration database configuration conflict events is successful.
[0094] After receiving the subscription response message, the NETCONF client 1 can send a configuration request message to the NETCONF server. The configuration request message includes configuration content. The NETCONF server stores the configuration content in the candidate configuration database. The NETCONF server sends a configuration response message to the NETCONF client 1. The configuration response message includes a configuration result.
[0095] At this time, the NETCONF client 2 sends a configuration request message to the running configuration database. The configuration request message can be the same as the previous configuration request message. The running configuration database stores the configuration content locally.
[0096] Since the running configuration database has accepted the subscription to running configuration database change events from the candidate configuration database of the NETCONF session. The running configuration database generates a reporting notification, which is used to inform the NETCONF server that its local configuration has changed.
[0097] After the NETCONF server receives the reported notification, it determines that the configuration in the running configuration database has changed. The NETCONF server queries the established sessions with the NETCONF client to check if there is any session that subscribes to the candidate configuration database configuration conflict event.
[0098] If, among the established sessions, there is a session that subscribes to the candidate configuration database configuration conflict event information (e.g., the aforementioned NETCONF session), the NETCONF server determines whether the running configuration database synchronizes updates to the candidate configuration database.
[0099] If it is determined that the running configuration database synchronizes updates to the candidate configuration database, the NETCONF server continues to determine whether there is currently a candidate configuration database configuration conflict event occurring.
[0100] If there is such an event, the NETCONF server obtains the event attribute information. The event attribute information includes the location where the event occurred, the basic reason for the event occurrence, and the specific reason for the event occurrence.
[0101] The NETCONF server generates an event reporting message, which includes the event attribute information. The NETCONF server sends the event reporting message to the NETCONF client 1.
[0102] After the NETCONF client 1 receives the event reporting message, it determines that a candidate configuration database configuration conflict event has occurred. The NETCONF client 1 obtains the event attribute information from the event reporting message. Based on the event attribute information, the NETCONF client 1 determines information such as the location, basic reason, and specific reason for the occurrence of the candidate configuration database configuration conflict event.
[0103] Based on the above - obtained information, the NETCONF client 1 performs corresponding repair work according to the specific reason for the event. The NETCONF client 1 can send a notification message to the NETCONF server to inform the NETCONF server how to repair the candidate configuration database and the running configuration database.
[0104] Based on the same inventive concept, the embodiments of this application also provide a communication device corresponding to the communication method. See Figure 3 , Figure 3 For the communication device provided by the embodiments of this application, the device is applied to the NETCONF server, and the device includes:
[0105] A subscription unit 310, configured to subscribe to the running configuration database change event from the running configuration database, so that after the running configuration database determines that a running configuration database change event occurs, it reports to the NETCONF server;
[0106] A receiving unit 320, configured to receive the reporting notification sent by the operation configuration database;
[0107] A query unit 330, configured to query, according to the reporting notification, whether there is a NETCONF session subscribing to the first event information in the sessions established between the local device and the NETCONF client;
[0108] A judging unit 340, configured to, if there is such a session, when determining that the operation configuration database synchronizes updates to the candidate configuration database, judge whether there is a first event matching the first event information occurring;
[0109] A sending unit 350, configured to, if there is such an event, send an event reporting message to a first NETCONF client that has established the NETCONF session with the NETCONF server, where the event reporting message includes event attribute information, so that the first NETCONF client processes the first event according to the event attribute information;
[0110] Wherein, the first event is specifically a candidate configuration database configuration conflict event.
[0111] Optionally, the receiving unit 320 is further configured to receive, through the NETCONF session, a subscription request message sent by the first NETCONF client, where the subscription request message includes the first event information;
[0112] The device further includes: a generating unit (not shown in the figure), configured to generate an operation configuration database change event having an association relationship with the first event information according to the first event information.
[0113] Optionally, the receiving unit 320 is further configured to receive a configuration request message sent by the first NETCONF client, where the configuration request message includes configuration content;
[0114] The device further includes: a storage unit (not shown in the figure), configured to store the configuration content into the candidate configuration database;
[0115] The sending unit 350 is further configured to send a configuration response message to the first NETCONF client, where the configuration response message includes a configuration result.
[0116] Optionally, the device further includes: an obtaining unit (not shown in the figure), configured to obtain the event attribute information, where the event attribute information includes an event occurrence location, a basic reason for the event occurrence, and a specific reason for the event occurrence.
[0117] Optionally, the reporting notification is sent after the running configuration database receives a configuration request message sent by a second NETCONF client and stores the configuration content included in the configuration request in the running configuration database.
[0118] Therefore, by applying the communication device provided in this application, the NETCONF server subscribes to the running configuration database change event from the running configuration database, so that after the running configuration database determines that the running configuration database change event occurs, it reports to the NETCONF server; the NETCONF server receives the reporting notification sent by the running configuration database; according to the reporting notification, the NETCONF server queries whether there is a NETCONF session that subscribes to the first event information in the sessions established between the local and the NETCONF client; if so, when it is determined that the running configuration database synchronizes and updates to the candidate configuration database, the NETCONF server determines whether there is a first event that matches the first event information; if so, the NETCONF server sends an event reporting message including event attribute information to the first NETCONF client that establishes a NETCONF session with the NETCONF server, so that the first NETCONF client processes the first event according to the event attribute information; wherein, the first event is specifically a candidate configuration database configuration conflict event.
[0119] In this way, by subscribing to the configuration change event that occurs in the running configuration database and the candidate configuration database configuration conflict event, the configuration conflict or configuration error of the two configuration databases can be sensed in time, so that the candidate configuration database can be aware of the configuration conflict or configuration error before submission, and prompt the user to repair the conflict or error in real time, improving the submission success rate of the candidate configuration database and ensuring more efficient and secure network configuration management.
[0120] Based on the same inventive concept, an embodiment of this application also provides a network device, as Figure 4 shown, including a processor 410, a transceiver 420, and a machine-readable storage medium 430. The machine-readable storage medium 430 stores machine-executable instructions that can be executed by the processor 410. The processor 410 is prompted by the machine-executable instructions to execute the communication method provided in the embodiment of this application. The foregoing Figure 3 shown communication device can be implemented by using the hardware structure of the network device as Figure 4 shown.
[0121] The above computer-readable storage medium 430 may include a random access memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory. Optionally, the computer-readable storage medium 430 may also be at least one storage device located far from the aforementioned processor 410.
[0122] The above processor 410 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it may also be a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0123] In the embodiment of the present application, the processor 410 reads the machine-executable instructions stored in the machine-readable storage medium 430, and is prompted by the machine-executable instructions to enable the processor 410 itself and to call the transceiver 420 to execute the communication method described in the foregoing embodiment of the present application.
[0124] In addition, the embodiment of the present application provides a machine-readable storage medium 430. The machine-readable storage medium 430 stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 410, the machine-executable instructions prompt the processor 410 itself and to call the transceiver 420 to execute the communication method described in the foregoing embodiment of the present application.
[0125] For the specific implementation process of the functions and roles of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method, which will not be elaborated here.
[0126] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application. A person of ordinary skill in the art can understand and implement it without creative work.
[0127] For the communication device and machine-readable storage medium embodiments, since the method content involved is basically similar to the foregoing method embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions in the method embodiments.
[0128] The foregoing is only a preferred embodiment of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of protection of the present application.< / candidateconflictevent>
Claims
1. A communication method, characterized in that, The method is applied to a NETCONF server, and the method includes: Subscribing to a running configuration database change event from the running configuration database, so that after the running configuration database determines that a running configuration database change event has occurred, it reports to the NETCONF server; Receiving the reporting notification sent by the running configuration database; According to the reporting notification, querying whether there is a NETCONF session that subscribes to the first event information in the sessions established locally with the NETCONF client; If there is, when it is determined that the running configuration database synchronizes and updates to the candidate configuration database, determining whether there is a first event that matches the first event information; If there is, sending an event reporting message to the first NETCONF client that has established the NETCONF session with the NETCONF server, where the event reporting message includes event attribute information, so that the first NETCONF client processes the first event according to the event attribute information; Wherein, the first event is specifically a candidate configuration database configuration conflict event.
2. The method according to claim 1, wherein Before subscribing to the running configuration database change event from the running configuration database, the method further includes: Receiving, through the NETCONF session, a subscription request message sent by the first NETCONF client, where the subscription request message includes the first event information; Generating a running configuration database change event that has an associated relationship with the first event information according to the first event information.
3. The method according to claim 1, wherein Before receiving the reporting notification sent by the running configuration database, the method further includes: Receiving a configuration request message sent by the first NETCONF client, where the configuration request message includes configuration content; Storing the configuration content in the candidate configuration database; Sending a configuration response message to the first NETCONF client, where the configuration response message includes a configuration result.
4. The method according to claim 1, characterized in that, Before sending the event reporting message to the first NETCONF client that has established the NETCONF session with the NETCONF server, the method further includes: Obtaining the event attribute information, where the event attribute information includes the event occurrence location, the basic reason for the event occurrence, and the specific reason for the event occurrence.
5. The method according to claim 1, wherein The reporting notification is sent after the running configuration database receives a configuration request message sent by a second NETCONF client and stores the configuration content included in the configuration request in the running configuration database.
6. A communication device, characterized in that, The apparatus is applied to a NETCONF server, and the apparatus includes: A subscription unit, configured to subscribe to a running configuration database change event from the running configuration database, so that after the running configuration database determines that a running configuration database change event has occurred, it reports to the NETCONF server; A receiving unit, configured to receive the reporting notification sent by the running configuration database; A query unit, configured to query whether there is a NETCONF session that subscribes to the first event information in the sessions established locally with the NETCONF client according to the reporting notification; A determination unit, configured to, if any exists, when determining that the operation configuration database synchronizes and updates to the candidate configuration database, determine whether a first event matching the first event information occurs; A sending unit, configured to, if any exists, send an event reporting message to a first NETCONF client that has established the NETCONF session with the NETCONF server, where the event reporting message includes event attribute information, so that the first NETCONF client processes the first event according to the event attribute information; Wherein, the first event is specifically a candidate configuration database configuration conflict event.
7. The device according to claim 6, characterized in that, The receiving unit is further configured to receive, through the NETCONF session, a subscription request message sent by the first NETCONF client, where the subscription request message includes the first event information; The apparatus further includes: a generating unit, configured to generate an operation configuration database change event that has an association relationship with the first event information according to the first event information.
8. The device according to claim 6, characterized in that The receiving unit is further configured to receive a configuration request message sent by the first NETCONF client, where the configuration request message includes configuration content; The apparatus further includes: a storage unit, configured to store the configuration content in the candidate configuration database; The sending unit is further configured to send a configuration response message to the first NETCONF client, where the configuration response message includes a configuration result.
9. The device according to claim 6, characterized in that The apparatus further includes: An obtaining unit, configured to obtain the event attribute information, where the event attribute information includes the event occurrence location, the basic reason for the event occurrence, and the specific reason for the event occurrence.
10. The device according to claim 6, characterized in that, The reporting notice is sent after the operation configuration database receives a configuration request message sent by a second NETCONF client and stores the configuration content included in the configuration request in the operation configuration database.
Citation Information
Patent Citations
Configuration change method and related device
CN110391949A
Configuration change method and related device
CN112532415A