Method and apparatus for supporting management and control of different yang models
By adding ports and multi-threading mechanisms to NETCONF network devices, the problem of coexistence between the YANG models of the operation provider and the device provider is solved, achieving low-cost information isolation and efficient management, and meeting the expansion needs of the device provider's private YANG model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2026-03-20
AI Technical Summary
In network management, the YANG model between operation providers and equipment providers differs and has coexistence requirements, leading to overlapping control and high management costs.
By adding ports outside the protocol standard to the NETCONF network device, listening to the operator provider and the device provider respectively, a multi-threaded multi-user mechanism is established to support the coexistence of the YANG model of the operator provider and the device provider. SSH threads and proxy threads are used to establish management and control connections to achieve information isolation and management.
It enables the coexistence and management of YANG models for both operation providers and equipment providers at low cost, reduces the impact between control and management, meets the expansion needs of equipment providers' private YANG models, and achieves information isolation and efficient management.
Smart Images

Figure CN116827744B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and in particular to a management and control method and device supporting different YANG models. BACKGROUND
[0002] With the development of network management technology, the Network Configuration Protocol (NETCONF) gradually replaces the existing SNMP, CLI and other management methods with the advantages of secure, reliable, good scalability, simple and easy-to-understand YANG model and cloud network demand. The operation provider defines a standard southbound interface, which is implemented by each device manufacturer, and finally realizes the decoupling of management and control and devices to solve the pain point of high operation and maintenance cost of existing network devices.
[0003] However, in the current actual network deployment, there will still be a situation where the operation provider management and control and the device provider management and control are simultaneously managed. Reason one: the network deployment scene is complex, and it still takes some time for the operation provider to develop and debug all the managed devices, while the management and control of the current device provider is already deployed in the existing network. Therefore, there will be a situation where the device provider management and control is managed first, and the operation provider management and control is managed later, which will inevitably result in the coexistence of management and control overlap. Reason two: the private YANG defined by the device provider when developing the management device is in the front, and the standard YANG model formulated by the operation provider is in the back, so there will be a big difference in the YANG model. And the device provider sometimes needs to increase the function item according to the deployment demand of the existing network, which requires the private YANG model of the device provider to be updated and supported in time. This situation also requires the coexistence of management and control. Due to the private YANG of the manufacturer and the expansion demand, the ability to coexist the YANG of the operation provider and the private YANG of the device provider must be supported.
[0004] Therefore, how to solve the problem of coexistence of YANG models of the operation provider and the device provider is a technical problem to be solved. SUMMARY
[0005] Therefore, how to solve the problem of coexistence of YANG models of the operation provider and the device provider is a technical problem to be solved.
[0006] To solve the above technical problems, the technical scheme of the present application is as follows:
[0007] In one embodiment, a management and control method supporting different YANG models is provided, applied to a network device based on NETCONF, and the method comprises:
[0008] listening to the first port and the second port through an SSH thread; the first port is a port specified by a protocol standard for port management of an operation provider; the second port is a port other than the port specified by the protocol standard for private port management of a device provider;
[0009] If the first port is connected, a first SSH sub-thread corresponding to the first port is created by applying memory to store connection information; if the second port is connected, a second SSH sub-thread corresponding to the second port is created by applying memory to store connection information;
[0010] listening to the third port and the fourth port through a proxy thread; the third port is used to identify an operation provider connection; the fourth port is used to identify a device provider connection;
[0011] If the third port is connected, a first proxy sub-thread is established based on the first SSH sub-thread, and a connection between the first proxy sub-thread and a first processing thread is established for management and control; if the fourth port is connected, a second proxy sub-thread is established based on the second SSH sub-thread, and a connection between the second proxy sub-thread and a second processing thread is established for management and control;
[0012] The first processing thread corresponds to operation provider YANG model content processing, and the second processing thread corresponds to device provider YANG model content processing.
[0013] The SSH thread, the first processing thread, and the second processing thread are established when the network device is started.
[0014] The proxy thread is established when the first port and / or the second port are detected to be connected, or when the network device is started.
[0015] The first proxy sub-thread, the second proxy sub-thread, and the first processing thread and the second processing thread share a global structure data through a thread TSD.
[0016] In the access database interface information file, a device flag in the thread TSD private data is obtained to distinguish the managed devices.
[0017] After the connection between the first proxy sub-thread and the first processing thread, and / or the connection between the second proxy sub-thread and the second processing thread is established, the method further includes:
[0018] subscribing to an alarm and storing subscription alarm information;
[0019] When the alarm message is received, alarm processing is performed according to the configured alarm rule;
[0020] If it is determined that the alarm message is a subscribed alarm based on the subscribed alarm information, it is determined that the alarm message is an operation provider alarm; if yes, the operation provider management and control platform is reported; otherwise, the device provider private management and control platform is reported.
[0021] The connection between the first proxy sub-thread and the first processing thread is established, including:
[0022] The first processing thread listens to the fifth port and waits for the connection of the first proxy sub-thread;
[0023] The first sub-thread initiates a TCP connection request to the fifth port, and after three handshakes, the connection between the first proxy sub-thread and the first processing thread is established;
[0024] The connection between the second proxy sub-thread and the second processing thread is established, including:
[0025] The second processing thread listens to the sixth port and waits for the connection of the second proxy sub-thread;
[0026] The second sub-thread initiates a TCP connection request to the fifth port, and after three handshakes, the connection between the second proxy sub-thread and the second processing thread is established;
[0027] The fifth port is used to identify the port connected by the operation provider; and the sixth port is used to identify the port connected by the device provider.
[0028] The method further includes:
[0029] An operation request is received;
[0030] If it is determined that the operation request is received through the first port, the relevant processing of the security transmission layer is performed through the first SSH sub-thread; the relevant processing of the message layer is performed through the first proxy sub-thread; and the relevant processing of the operation layer and the content layer is performed through the first processing thread;
[0031] If it is determined that the operation request is received through the second port, the relevant processing of the security transmission layer is performed through the second SSH sub-thread; the relevant processing of the message layer is performed through the second proxy sub-thread; and the relevant processing of the operation layer and the content layer is performed through the second processing thread.
[0032] In another embodiment, a management and control device supporting different YANG models is provided, which is applied to a network device based on NETCONF, and the device includes:
[0033] The first monitoring unit is configured to monitor the first port and the second port through an SSH thread; the first port is a port specified by a protocol standard and used for port management of an operation provider; the second port is a port other than the port specified by the protocol standard and used for private port management of a device provider;
[0034] The first creating unit is configured to create a first SSH sub-thread corresponding to the first port by applying for memory to store connection information if the first port is connected, and create a second SSH sub-thread corresponding to the second port by applying for memory to store connection information if the second port is connected.
[0035] The second monitoring unit is configured to monitor the third port and the fourth port through a proxy thread; the third port is used for identifying an operation provider connection; and the fourth port is used for identifying a device provider connection.
[0036] The second creating unit is configured to establish a first proxy sub-thread based on the first SSH sub-thread and establish a connection between the first proxy sub-thread and a first processing thread for management and control if the third port is connected, and establish a second proxy sub-thread based on the second SSH sub-thread and establish a connection between the second proxy sub-thread and a second processing thread for management and control if the fourth port is connected; the first processing thread corresponds to operation provider YANG model content processing, and the second processing thread corresponds to device provider YANG model content processing.
[0037] In another embodiment, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method for supporting management and control of different YANG models when executing the program.
[0038] In another embodiment, a computer readable storage medium is provided, which stores a computer program, and the program is executed by a processor to implement the steps of the method for supporting management and control of different YANG models.
[0039] From the above technical solution, it can be seen that in the above embodiment, when establishing a NETCONF connection for management and control, a port other than the port specified by the protocol standard is added for different levels to monitor the operation provider and the device provider through the protocol standard specified port and the protocol standard specified port respectively, and a management and control connection is established, to support the establishment of a management and control connection of different YANG model capabilities, and to support the management and control of different YANG model capabilities. This method can solve the problem of coexistence of operation provider and device provider YANG models. BRIEF DESCRIPTION OF DRAWINGS
[0040] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram of a control process supporting different YANG models in an embodiment of this application;
[0042] Figure 2 This is a schematic diagram of another control process supporting different YANG models in an embodiment of this application;
[0043] Figure 3 This is a schematic diagram of the alarm processing flow in the embodiments of this application;
[0044] Figure 4 This is a schematic diagram of the operation request processing flow in the embodiments of this application;
[0045] Figure 5 This is a schematic diagram of the control device structure supporting different YANG models in the embodiments of this application;
[0046] Figure 6 This is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0049] The technical solutions of the present application are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described in some embodiments.
[0050] In the current actual network deployment, there may be a situation that the operation provider management and the device provider management are simultaneously managed. The private YANG defined by the device provider when developing and managing the device is prior to the standard YANG model formulated by the operation provider, so there is a relatively large difference between the YANG models; and the device provider sometimes needs to increase the function items according to the requirements of the current network deployment, which requires the private YANG model of the device provider to be updated and supported in time. In this case, the management coexistence requirement may exist. Due to the private YANG of the manufacturer and the expansion requirement, the ability of coexistence of the YANG of the operation provider and the private YANG of the device provider must be supported. The YANG model defines the hierarchical structure of data and can be used for the operation based on NETCONF.
[0051] Therefore, how the network device based on NETCONF supports the management and control of different YANG models is a technical problem to be solved urgently.
[0052] Based on the above problems, a method for supporting the management and control of different YANG models is provided in the embodiments of the present application, which changes the single-threaded multi-user mechanism of NETCONF supporting a single YANG model into a multi-threaded multi-user mechanism supporting the coexistence of the YANG model of the operation provider and the YANG model of the device provider, solves the problem of coexistence of the YANG models of the operation provider and the device provider, makes up for the current ability defect of the device being managed by different YANG models, and also meets the private YANG and expansion requirements of the device provider.
[0053] The network device for supporting the management and control of different YANG models in the embodiments of the present application automatically establishes and starts the following threads when the device starts:
[0054] The SSH thread, the first processing thread and the second processing thread.
[0055] The proxy thread is also used in the management and control connection establishment process, which can be established when the SSH thread detects the first port and / or the second port detects that it is connected, or when the network device starts.
[0056] The Secure Shell (SSH) is formulated by the network working group of IETF; the SSH is a secure protocol established on the basis of the application layer and the transport layer.
[0057] The process of supporting the management and control of different YANG models in the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0058] Reference Figure 1 , Figure 1 is a schematic diagram of a process for supporting different YANG models in the embodiments of the present application. The method is applied to a network device based on NETCONF, and the specific steps are as follows:
[0059] In step 101, the first port and the second port are listened to through the SSH thread. The first port is a port specified by the protocol standard and is used for port management of the operation provider. The second port is a port other than the port specified by the protocol standard and is used for private port management of the device provider.
[0060] The first port is, for example, the 830 port, and the second port can be the 50830 port. In specific use, it can not be limited to this, and can be configured according to the actual application scenario.
[0061] In step 102, if it is detected that the first port is connected, memory is applied to store the connection information to create a first SSH sub-thread corresponding to the first port. If it is detected that the second port is connected, memory is applied to store the connection information to create a second SSH sub-thread corresponding to the second port.
[0062] In step 103, the third port and the fourth port are listened to through the proxy thread. The third port is used to identify the connection of the operation provider, and the fourth port is used to identify the connection of the device provider.
[0063] The third port is the 5002 port, and the fourth port can be the 5003 port, but is not limited to this port.
[0064] In step 104, if it is detected that the third port is connected, a first proxy sub-thread is established based on the first SSH sub-thread, and a connection between the first proxy sub-thread and the first processing thread is established for management and control. If it is detected that the fourth port is connected, a second proxy sub-thread is established based on the second SSH sub-thread, and a connection between the second proxy sub-thread and the second processing thread is established for management and control. The first processing thread corresponds to the content processing of the YANG model of the operation provider, and the second processing thread corresponds to the content processing of the YANG model of the device provider.
[0065] In the embodiments of the present application, when establishing the NETCONF connection for management and control, the ports other than the protocol standard and the ports specified by the protocol standard are listened to respectively for the operation provider and the device provider, and the management and control connection is established, thereby supporting the establishment of the management and control connection of different YANG model capabilities, and supporting the management and control of different YANG model capabilities. The method can support the coexistence of the operation provider YANG model and the device provider YANG model to meet the demand of managing the device, and can isolate the management information of the operation provider and the device provider, thereby reducing the influence between them. Therefore, the method can realize the coexistence of the operation provider YANG model and the device provider YANG model to meet the demand of managing the device.
[0066] In another example, establishing the connection of the first proxy sub-thread and the first processing thread comprises:
[0067] The first processing thread listens to the fifth port and waits for the connection of the first proxy sub-thread;
[0068] The first sub-thread initiates a TCP connection request to the fifth port, and after three handshakes, the connection of the first proxy sub-thread and the first processing thread is established;
[0069] Establishing the connection of the second proxy sub-thread and the second processing thread comprises:
[0070] The second processing thread listens to the sixth port and waits for the connection of the second proxy sub-thread;
[0071] The second sub-thread initiates a TCP connection request to the sixth port, and after three handshakes, the connection of the second proxy sub-thread and the second processing thread is established;
[0072] The fifth port is used to identify the port of the operation provider connection; and the sixth port is used to identify the port of the device provider connection.
[0073] In another example,
[0074] The first proxy sub-thread, the second proxy sub-thread, and the first processing thread and the second processing thread share the privatization of the global structure data through the thread TSD.
[0075] In another example, in the access database interface information file, the managed device is distinguished by obtaining the device flag in the thread TSD private data.
[0076] Referring to Figure 2 , Figure 2 Another flowchart of a method for supporting different YANG models in the embodiments of the present application is provided. The method is applied to a network device based on NETCONF, and the specific steps are as follows:
[0077] In step 201, an SSH thread listens to a first port and a second port. The first port is a port specified by a protocol standard and is used for the port management of an operation provider. The second port is a port other than the port specified by the protocol standard and is used for the private port management of a device provider.
[0078] The first port is listened to by the SSH thread, which is used to realize the connection of the operation provider management and control;
[0079] The second port is listened to by the SSH thread, which is used to realize the connection of the device provider management and control;
[0080] The first port is the 830 port, and the second port can be the 50830 port, but is not limited thereto, and can be configured according to an actual application scenario.
[0081] In a specific implementation, the subsequent operations related to the establishment of the management and control connection can be added to the thread-specific function thread_add_read, and controlled by thread_fetch.
[0082] By adding the second port, different management and control connections are established with the first port, so that the resources of the 830 port are not occupied, and subsequent processing can distinguish between the operations of the operation provider and the device provider.
[0083] Step 202, if it is detected that the first port is connected, memory is applied to store connection information to create a first SSH sub-thread corresponding to the first port. Step 204 is executed.
[0084] Thus, the connection corresponding to the transport layer for the operation provider in the NETCONF protocol is completed.
[0085] Step 203, if it is detected that the second port is connected, memory is applied to store connection information to create a second SSH sub-thread corresponding to the second port.
[0086] Thus, the connection corresponding to the transport layer for the device provider in the NETCONF protocol is completed.
[0087] Step 204, the third port and the fourth port are listened to by a proxy thread; the third port is used to identify an operation provider connection; and the fourth port is used to identify a device provider connection.
[0088] The proxy thread listens to different ports to distinguish between the operation provider connection and the device provider connection, and multiple proxy sub-threads are created to support multiple user connections.
[0089] The third port is the 5002 port, and the fourth port can be the 5003 port, but is not limited thereto.
[0090] Step 205, if it is detected that the third port is connected, a first proxy sub-thread is established based on the first SSH sub-thread.
[0091] Thus, the connection corresponding to the message layer for the operation provider in the NETCONF protocol is completed.
[0092] Step 206, the fifth port is listened to by a first processing thread, and the first proxy sub-thread is connected; the first processing thread corresponds to operation provider YANG model content processing; and the fifth port is used to identify an operation provider connection port.
[0093] Step 207, a TCP connection request is initiated to the fifth port by the first sub-thread, and after three handshakes, the connection between the first proxy sub-thread and the first processing thread is established for management and control. End this process.
[0094] So far, the connection corresponding to the operation layer and the content layer of the operation provider in the NETCONF protocol is completed.
[0095] Step 208, if the fourth port is connected, the second proxy sub-thread is established based on the second SSH sub-thread.
[0096] So far, the connection corresponding to the transport layer of the device provider in the NETCONF protocol is completed.
[0097] Step 209, the sixth port is listened to by the second processing thread, waiting for the second proxy sub-thread to connect; wherein the second processing thread corresponds to the device provider YANG model content processing, and the sixth port is used to identify the port connected by the device provider.
[0098] Step 210, a TCP connection request is initiated to the sixth port by the second sub-thread, and after three handshakes, the connection between the second proxy sub-thread and the second processing thread is established for management and control.
[0099] So far, the connection corresponding to the operation layer and the content layer of the device provider in the NETCONF protocol is completed.
[0100] In the embodiment of the application, when establishing the NETCONF connection for management and control, the ports other than the protocol standard are added for different levels to listen to the operation provider and the device provider and establish the management and control connection respectively, and then the management and control connection of different YANG model capabilities can be supported, and the management and control of different YANG model capabilities can be supported. The method can support different YANG model capabilities under the premise of low cost, so that the operation provider and the device provider manage the information isolated from each other, and the influence between each other is reduced. Therefore, the method can realize the demand of coexistence management of the operation provider YANG model and the device provider YANG model for the device.
[0101] In another example,
[0102] The first proxy sub-thread, the second proxy sub-thread, and the first processing thread and the second processing thread share the private global structure data by using the thread TSD.
[0103] That is, the proxy sub-thread (the first proxy sub-thread and the second proxy sub-thread) and the processing thread (the first processing thread and the second processing thread) use the thread TSD technology to realize the privatization of the global structure data.
[0104] In another example, the managed device is distinguished by obtaining a device flag in thread TSD private data in the access database interface information file.
[0105] The degree of modification to the existing code is reduced by using the thread private TSD technology, and the global structure data privatization under multi-threading is realized.
[0106] The first processing thread and the second processing thread correspond to different YANG model content processing, and the managed device information is distinguished by obtaining a dci_ds_id flag in thread TSD private data in the dci-ums.c file.
[0107] In the embodiment of the application, after the establishment of the management and control connection, in order to better process the alarm message, subscribe to the alarm and store the subscription alarm information, and determine whether the alarm message is reported when the alarm occurs and where it is reported.
[0108] The process of processing the alarm message in the embodiment of the application will be described in detail below with reference to the accompanying drawings. Referring to Figure 3 , Figure 3 The flowchart for the alarm processing related process in the embodiment of the application is shown. The method is applied to a network device based on NETCONF, and the specific steps are as follows:
[0109] In step 301, when the alarm message is received, the alarm is processed according to the configured alarm rule.
[0110] In step 302, it is determined whether the alarm message is a subscribed alarm based on the subscription alarm information. If yes, step 303 is executed; otherwise, the process ends.
[0111] If it is determined based on the subscription alarm information that the alarm message is not a subscribed alarm, the reporting process is not performed.
[0112] In step 303, it is determined whether the alarm message is an operator provider alarm. If yes, step 304 is executed; otherwise, step 305 is executed.
[0113] In step 304, the operator provider management and control platform is reported. The process ends.
[0114] In step 305, the device provider private management and control platform is reported.
[0115] In the embodiment of the application, when implemented, the alarm subscription and reporting can be implemented by using the Notification thread created when the network device starts, which can effectively filter the alarm information and is more efficient.
[0116] After the management and control connection is established and / or the alarm information is subscribed, the processing process when an operation request sent by the operator provider and the device provider is received is as follows:
[0117] Referring to Figure 4 , Figure 4 is a schematic diagram of an operation request processing flow in an embodiment of the present application. The method is applied to a network device based on NETCONF, and the specific steps are as follows:
[0118] Step 401, receiving an operation request.
[0119] The operation request herein is an RPC operation request.
[0120] Step 402, if it is determined that the operation request is received through the first port, performing relevant processing of the secure transmission layer through the first SSH sub-thread.
[0121] Step 403, performing relevant processing of the message layer through the first proxy sub-thread.
[0122] Step 404, performing relevant processing of the operation layer and the content layer through the first processing thread. End the flow.
[0123] Step 405, if it is determined that the operation request is received through the second port, performing relevant processing of the secure transmission layer through the second SSH sub-thread.
[0124] Step 406, performing relevant processing of the message layer through the second proxy sub-thread.
[0125] Step 407, performing relevant processing of the operation layer and the content layer through the second processing thread.
[0126] After the relevant processing of the content layer is performed, an RPC response is given based on the processing result.
[0127] In an embodiment of the present application, different threads are used to establish control connections for the operation provider and the device provider respectively, that is, a device provider private thread is added on the basis of the original thread, so that the control information of the operation provider and the device provider is isolated from each other, the influence between them is reduced, and the demand for coexistence of the operation provider YANG model and the device provider YANG model for managing the device is met.
[0128] Based on the same inventive concept, an embodiment of the present application further provides a control device supporting different YANG models, which is applied to a network device based on NETCONF. Referring to Figure 5 , Figure 5 is a structural schematic diagram of the control device supporting different YANG models in an embodiment of the present application. The device comprises:
[0129] The first monitoring unit 501 is configured to monitor the first port and the second port through an SSH thread; the first port is a port specified by a protocol standard and used for port management of an operation provider; the second port is a port other than the port specified by the protocol standard and used for private port management of a device provider;
[0130] The first creating unit 502 is configured to create a first SSH sub-thread corresponding to the first port by applying for memory to store connection information if the first port is connected; and create a second SSH sub-thread corresponding to the second port by applying for memory to store connection information if the second port is connected.
[0131] The second monitoring unit 503 is configured to monitor the third port and the fourth port through a proxy thread; the third port is used to identify an operation provider connection; and the fourth port is used to identify a device provider connection.
[0132] The second creating unit 504 is configured to establish a first proxy sub-thread based on the first SSH sub-thread and establish a connection between the first proxy sub-thread and a first processing thread for management and control if the third port is connected; and establish a second proxy sub-thread based on the second SSH sub-thread and establish a connection between the second proxy sub-thread and a second processing thread for management and control if the fourth port is connected; wherein the first processing thread corresponds to operation provider YANG model content processing, and the second processing thread corresponds to device provider YANG model content processing.
[0133] In another example,
[0134] The SSH thread, the first processing thread and the second processing thread are established when the network device is started;
[0135] The proxy thread is established when the first port and / or the second port are detected to be connected, or when the network device is started.
[0136] In another example,
[0137] The first proxy sub-thread, the second proxy sub-thread, and the first processing thread and the second processing thread share a global structure data through a thread TSD.
[0138] In another example,
[0139] A device flag in thread TSD private data is obtained in an access database interface information file to distinguish the managed devices.
[0140] In another example, the apparatus further comprises: a subscription unit and
[0141] The subscription unit 505 is configured to perform the following: subscribing to an alarm and storing subscription alarm information after establishing the connection between the first proxy sub-thread and the first processing thread, and / or the connection between the second proxy sub-thread and the second processing thread;
[0142] The receiving unit 506 is configured to perform the following: receiving an alarm message;
[0143] The processing unit 507 is configured to perform the following: performing alarm processing according to a configured alarm rule;
[0144] The reporting unit 508 is configured to perform the following: if it is determined that the alarm message is a subscribed alarm based on the subscription alarm information, determining that the alarm message is an operator provider alarm; if so, reporting to an operator provider management platform; otherwise, reporting to a device provider private management platform.
[0145] In another example,
[0146] The second establishing unit 504 is configured to perform the following: when establishing the connection between the first proxy sub-thread and the first processing thread, listening to a fifth port through the first processing thread and waiting for the connection of the first proxy sub-thread; initiating a TCP connection request to the fifth port through the first sub-thread, performing a three-way handshake, and then establishing the connection between the first proxy sub-thread and the first processing thread; when establishing the connection between the second proxy sub-thread and the second processing thread, listening to a sixth port through the second processing thread and waiting for the connection of the second proxy sub-thread; initiating a TCP connection request to the fifth port through the second sub-thread, performing a three-way handshake, and then establishing the connection between the second proxy sub-thread and the second processing thread; wherein the fifth port is used to identify an operator provider connection port; and the sixth port is used to identify a device provider connection port.
[0147] In another example,
[0148] The receiving unit 506 is configured to perform the following: receiving an operation request;
[0149] The processing unit 507 is configured to perform the following: if it is determined that the operation request is received through a first port, performing related processing of a secure transmission layer through a first SSH sub-thread; performing related processing of a message layer through the first proxy sub-thread; and performing related processing of an operation layer and a content layer through a first processing thread; if it is determined that the operation request is received through a second port, performing related processing of a secure transmission layer through a second SSH sub-thread; performing related processing of a message layer through a second proxy sub-thread; and performing related processing of an operation layer and a content layer through a second processing thread.
[0150] The units of the above embodiments can be integrated or deployed separately, and can be combined into one unit or further split into multiple sub-units.
[0151] In another embodiment, an electronic device is also provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the management and control method supporting different YANG models when executing the program.
[0152] In another embodiment, a computer readable storage medium is also provided, which stores computer instructions, and the instructions are executable on a processor to implement the steps of the management and control method supporting different YANG models.
[0153] Figure 6 The electronic device provided by the embodiments of the present application is shown in the entity structure diagram of the electronic device. As shown in the figure, the electronic device can include a processor (Processor) 610, a communication interface (Communications Interface) 620, a memory (Memory) 630, and a communication bus (Communications Bus) 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can invoke the logical instructions in the memory 630 to execute the following method: Figure 6 The first port is a port specified by a protocol standard for port management of an operation provider, and the second port is a port other than the port specified by the protocol standard for private port management of a device provider.
[0154] If the first port is connected, a first SSH sub-thread corresponding to the first port is created by applying memory to store connection information; if the second port is connected, a second SSH sub-thread corresponding to the second port is created by applying memory to store connection information.
[0155] The third port is used to identify an operation provider connection, and the fourth port is used to identify a device provider connection.
[0156] If the third port is connected, a first proxy sub-thread is established based on the first SSH sub-thread, and a connection between the first proxy sub-thread and the first processing thread is established for management and control; if the fourth port is connected, a second proxy sub-thread is established based on the second SSH sub-thread, and a connection between the second proxy sub-thread and the second processing thread is established for management and control.
[0157]
[0158] Among them, the first processing thread corresponds to the operation provider YANG model content processing, and the second processing thread corresponds to the device provider YANG model content processing.
[0159] In addition, the logical instructions in the memory 630 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0160] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement without creative labor.
[0161] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0162] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A control method supporting different YANG models, applied to NETCONF-based network devices, characterized in that, The method includes: Listening on the first and second ports via SSH thread; the first port is the port specified by the protocol standard and is used for port management by the operator provider; the second port is a port other than the port specified by the protocol standard and is used for private port management by the device provider. If a connection is detected on the first port, memory is requested to store the connection information and the first SSH sub-thread corresponding to the first port is created; if a connection is detected on the second port, memory is requested to store the connection information and the second SSH sub-thread corresponding to the second port is created. The proxy thread listens on the third and fourth ports; the third port is used to identify the connection of the operator provider; the fourth port is used to identify the connection of the device provider. If a connection is detected on the third port, a first proxy sub-thread is established based on the first SSH sub-thread, and a connection is established between the first proxy sub-thread and the first processing thread for management; if a connection is detected on the fourth port, a second proxy sub-thread is established based on the second SSH sub-thread, and a connection is established between the second proxy sub-thread and the second processing thread for management. The first processing thread corresponds to the operation provider's YANG model content processing, and the second processing thread corresponds to the device provider's YANG model content processing.
2. The method according to claim 1, characterized in that, The SSH thread, the first processing thread, and the second processing thread are established when the network device starts up; The proxy thread is established when the SSH thread detects a connection on the first port and / or the second port, or when the network device starts up.
3. The method according to claim 1, characterized in that, The first proxy sub-thread, the second proxy sub-thread, the first processing thread, and the second processing thread achieve the privatization of global structure data through thread TSD sharing.
4. The method according to claim 1, characterized in that, The managed devices are identified by retrieving the device identifier from the thread's TSD private data in the database interface information file.
5. The method according to claim 1, characterized in that, After establishing the connection between the first proxy sub-thread and the first processing thread, and / or the connection between the second proxy sub-thread and the second processing thread, the method further includes: Subscribe to alarms and store the subscribed alarm information; Upon receiving an alarm message, the alarm is processed according to the configured alarm rules. If the alarm message is determined to be a subscribed alarm based on the subscribed alarm information, then the alarm message is determined to be an operator provider alarm; if so, it is reported to the operator provider management platform; otherwise, it is reported to the device provider private management platform.
6. The method according to claim 1, characterized in that, Establishing the connection between the first proxy sub-thread and the first processing thread includes: The first processing thread listens on the fifth port and waits for the first proxy sub-thread to connect. The first proxy sub-thread initiates a TCP connection request to the fifth port, and after a three-way handshake, establishes a connection between the first proxy sub-thread and the first processing thread. The establishment of the connection between the second proxy sub-thread and the second processing thread includes: The second processing thread listens on the sixth port and waits for the second proxy sub-thread to connect. The second proxy sub-thread initiates a TCP connection request to the sixth port, and after a three-way handshake, establishes a connection between the second proxy sub-thread and the second processing thread. The fifth port is used to identify the port connected to the operator provider; the sixth port is used to identify the port connected to the device provider.
7. The method according to any one of claims 1-6, characterized in that, The method further includes: Receive operation requests; If it is determined that the operation request was received through the first port, then the first SSH sub-thread performs the relevant processing of the secure transport layer; the first proxy sub-thread performs the relevant processing of the message layer; and the first processing thread performs the relevant processing of the operation layer and content layer. If it is determined that the operation request was received through the second port, then the second SSH sub-thread performs the relevant processing for the secure transport layer; the second proxy sub-thread performs the relevant processing for the message layer; and the second processing thread performs the relevant processing for the operation layer and content layer.
8. A control device supporting different YANG models, applied to NETCONF-based network devices, characterized in that, The device includes: The first listening unit is configured to listen on a first port and a second port via an SSH thread; the first port is a port specified by the protocol standard and is used for port management by the operator provider; the second port is a port other than the port specified by the protocol standard and is used for private port management by the device provider. The first creation unit is configured to, if a connection is detected on the first port, request memory to store the connection information and create the first SSH sub-thread corresponding to the first port; if a connection is detected on the second port, request memory to store the connection information and create the second SSH sub-thread corresponding to the second port. The second listening unit is configured to listen to the third and fourth ports via a proxy thread; the third port is used to identify the connection of the operator provider; the fourth port is used to identify the connection of the device provider. The second creation unit is configured to, if a connection is detected on the third port, establish a first proxy sub-thread based on the first SSH sub-thread and establish a connection between the first proxy sub-thread and the first processing thread for management; if a connection is detected on the fourth port, establish a second proxy sub-thread based on the second SSH sub-thread and establish a connection between the second proxy sub-thread and the second processing thread for management; wherein, the first processing thread corresponds to the operation provider YANG model content processing, and the second processing thread corresponds to the device provider YANG model content processing.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method described in any one of claims 1-7.
Citation Information
Patent Citations
Processing method and system capable of achieving one machine supporting high concurrency
CN103164256A
Network traffic control method, device, equipment, system and storage medium
CN109547257A