A method and system for pooling remote access connections for core network elements.
By using connection pooling technology, encapsulating key information and designing network communication models, the problem of frequent network communication establishment by core network element devices is solved, enabling rapid integration and efficient interaction, improving system performance and simplifying the programming model.
Patent Information
- Application Number
- CN202411074456.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The existing core network element equipment establishes network communications frequently and cannot effectively control connection resources, resulting in low system performance and wasted resources.
By employing connection pooling technology, connection pools are created by encapsulating key information. Personalized business customization is achieved using SSH generic connection and driver classes. A network communication model is designed, and the connection pool is managed uniformly through a connection pool manager, enabling rapid integration and interaction of network element devices.
It enables rapid integration and data interaction of network elements, improves system performance, simplifies the programming model, reduces costs, and enhances flexibility and efficiency.
Smart Images

Figure CN119071939B_ABST
Abstract
Description
Technical Field
[0001] This invention discloses a method and system for remote access connection pooling of core network element devices, relating to the field of network connectivity technology. Background Technology
[0002] With the development of mobile communication technology, the interaction of core network elements is becoming increasingly frequent. Connection pooling technology is an important tool for improving system performance, enhancing system stability, and optimizing resources, especially suitable for work scenarios requiring frequent network communication. However, existing connection methods require frequent establishment of network communication and cannot effectively control connection resources. Summary of the Invention
[0003] This invention addresses the problems of existing technologies by providing a method and system for remote access connection pooling of core network element devices. It enables rapid integration and docking of multiple network element devices and is applicable to various application scenarios in the operator field that require communication with core network elements.
[0004] The specific solution proposed in this invention is as follows:
[0005] This invention provides a method for pooling remote access connections for core network element devices, comprising:
[0006] Step 1: Encapsulate key information related to the network element device integration process, create and configure a connection pool for each network element device, and initialize the connection pool uniformly through the connection pool manager.
[0007] Step 2: Design the network communication model for the connection pool: Utilize device-related classes that inherit from the SSH communication client's general SSH connection and general SSH driver classes, and override client methods to implement customized business logic.
[0008] Step 3: Obtain the network element name and command to be issued based on the request parameters, obtain the connection pool of the corresponding network element through the connection pool manager, connect to it, call the command issuance method corresponding to the connection pool based on the connection, complete the interaction with the network element, and return the response result.
[0009] Furthermore, in step 1 of the method for remote access connection pooling of core network element devices, key information in the network element device docking process is encapsulated, including: using a database to configure and solidify key information, which includes network element name, device IP, port, login username, login password, maximum number of connections, device manufacturer, driver name, login command, logout command, and termination command.
[0010] Furthermore, in step 1 of the method for remote access connection pooling of core network element devices, creating a connection pool for each network element device includes: constructing the connection pool for the network element device using the Apache commons-pool2 toolkit, and inheriting from BasePooledObjectFactory. <connection>This class implements the connection pool's methods: create(), wrap(), destroyObject(), and validateObject().
[0011] Furthermore, in step 1 of the method for remote access connection pooling of core network element devices, configuring the connection pool of the network element device includes: inheriting GenericObjectPoolConfig. <connection>This class allows you to set the maximum number of connections, minimum number of idle connections, maximum waiting time, whether to block after the pool is exhausted, verification when retrieving objects, verification when recycling, verification when creating objects, verification when idle, and last-in-first-out configuration.
[0012] Furthermore, in step 2 of the method for remote access connection pooling of core network element devices, the device-related classes inherit the SSH general connection-related classes of the SSH communication client. This includes: using the device connection class to define connection, disconnection, connection status, and command issuance methods based on the network connection client class AbsClient; inheriting the network connection client class AbsClient to achieve general SSH protocol integration; using Apache sshd-core to implement integration details; and implementing the Connection interface through the device connection class, which is uniformly managed by the connection pool object, defining methods for closing the connection, checking if the connection is alive, checking if the connection is closed, and issuing commands.
[0013] Furthermore, in step 2 of the method for pooling remote access connections for core network element devices, the SSH communication client's general driver-related classes are inherited by the device-related classes, including: inheriting the connection driver class SshDriver from the device driver class, inheriting the Driver interface, constructing a connection object by implementing the Driver interface through the device driver class, defining a method to obtain the driver, and generating an SshConnection connection.
[0014] This invention also provides a system for remote access connection pooling of core network element devices, including a connection pool management module, a model management module, and an interaction module.
[0015] The connection pool management module encapsulates key information related to the network element device interconnection process, creates and configures the connection pool for each network element device, and initializes the connection pool uniformly through the connection pool manager.
[0016] The model management module designs a network communication model for the connection pool: it utilizes device-related classes that inherit from the SSH communication client's general SSH connection and general SSH driver classes, and overrides client methods to implement customized business logic.
[0017] The interaction module obtains the network element name and command to be issued based on the request parameters, obtains the connection pool of the corresponding network element through the connection pool manager, connects to it, calls the command issuance method corresponding to the connection pool based on the connection, completes the interaction with the network element, and returns the response result.
[0018] The present invention also provides an electronic device for remote access connection pooling of core network elements, comprising: at least one memory and at least one processor;
[0019] The at least one memory is used to store a machine-readable program;
[0020] The at least one processor is used to call the machine-readable program to execute the method for remote access connection pooling of core network element devices.
[0021] The advantages of this invention are:
[0022] This invention fundamentally solves the problem of frequent network communication establishment and ineffective control of connection resources. It can quickly and accurately realize the integration of network elements and data interaction, improve system performance and simplify the programming model, and has the advantages of low cost, fast implementation and convenience. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0025] Figure 2 This is a schematic diagram illustrating the SSH general connection-related classes involved in this invention.
[0026] Figure 3 This is a schematic diagram illustrating the SSH general driver-related classes involved in this invention.
[0027] Figure 4 This is a schematic diagram illustrating the principle of pooling technology.
[0028] Figure 5 This is a code example diagram of an abnormal interaction between network element devices. Detailed Implementation
[0029] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0030] Example 1
[0031] This invention provides a method for pooling remote access connections for core network element devices, comprising:
[0032] Step 1: Encapsulate key information for the network element device docking process, create and configure a connection pool for each network element device, and initialize the connection pool uniformly through the connection pool manager.
[0033] Step 1 encapsulates key information for the network element device docking process, including: using a database to configure and solidify key information, which includes network element name, device IP, port, login username, login password, maximum number of connections, device manufacturer, driver name, login command, logout command, and termination command.
[0034] Creating a connection pool for each network element device also includes: using the Apache commons-pool2 toolkit to build the connection pool for the network element device, by inheriting from BasePooledObjectFactory. <connection>This class implements the connection pool's methods: create(), wrap(), destroyObject(), and validateObject().
[0035] For the principles of commons-pool2 pooling technology, please refer to [link / reference]. Figure 4 The connection is created using the `create()` function in the ConnectionFactory. See the code for reference:
[0036]
[0037] For example, you can refer to the code using the wrap() function to connect the wrapper:
[0038]
[0039] For code examples of destroying connections using `destroyObject()`, please refer to the following code:
[0040]
[0041] To verify connection availability, use `validateObject()`. See the code example below.
[0042]
[0043] Step 1, configuring the connection pool for network element devices, may further include: inheriting from GenericObjectPoolConfig. <connection>This class allows you to set the maximum number of connections, minimum number of idle connections, maximum waiting time, whether to block after the pool is exhausted, verification when retrieving objects, verification when recycling, verification when creating objects, verification when idle, and last-in-first-out configuration.
[0044] ConnectionPool: Inherits from GenericObjectPool <connection>This class implements the `borrowObject()`, `returnObject()`, and `clear()` methods for retrieving connections.
[0045] ConnectionPoolEgr: Creates a connection pool for each network element device. ConcurrentHashMap holds and manages all device connection pools, and is responsible for connection pool initialization, connection acquisition, connection closure, and pooled resource destruction.
[0046] Step 2: Design the network communication model of the connection pool: Utilize device-related classes to inherit the relevant classes of SSH general connection and SSH general driver in the SSH communication client, and override client methods to implement personalized business customization.
[0047] In the design of the SSH general connection, step 2 utilizes device-related classes that inherit from the SSH communication client's general connection-related classes. This includes: using the device connection class to define connection, disconnection, connection status, and command issuance methods based on the network connection client class AbsClient; inheriting from the network connection client class AbsClient to achieve general SSH protocol integration; using Apache sshd-core to implement integration details; and implementing the Connection interface through the device connection class, which is uniformly managed by the connection pool object, defining methods for closing the connection, checking if the connection is alive, whether the connection is closed, and issuing commands.
[0048] SshConnection is a general device connection implementation class for the actual SSH protocol, which inherits from the SSH client class and implements the Connection interface.
[0049] When designing the SSH generic driver, step 2 involves using device-related classes to inherit the SSH communication client's generic driver-related classes. This includes: using the device driver class to inherit the connection driver class SshDriver, inheriting the Driver interface, constructing a connection object by implementing the Driver interface through the device driver class, defining methods to obtain the driver, and generating an SshConnection connection.
[0050] Step 3: Obtain the network element name and command to be issued based on the request parameters, obtain the connection pool of the corresponding network element through the connection pool manager, connect to it, call the command issuance method corresponding to the connection pool based on the connection, complete the interaction with the network element, and return the response result.
[0051] Example 2
[0052] This invention also provides a system for remote access connection pooling of core network element devices, including a connection pool management module, a model management module, and an interaction module.
[0053] The connection pool management module encapsulates key information related to the network element device interconnection process, creates and configures the connection pool for each network element device, and initializes the connection pool uniformly through the connection pool manager.
[0054] The model management module designs a network communication model for the connection pool: it utilizes device-related classes that inherit from the SSH communication client's general SSH connection and general SSH driver classes, and overrides client methods to implement customized business logic.
[0055] The interaction module obtains the network element name and command to be issued based on the request parameters, obtains the connection pool of the corresponding network element through the connection pool manager, connects to it, calls the command issuance method corresponding to the connection pool based on the connection, completes the interaction with the network element, and returns the response result.
[0056] The information interaction and execution process between the modules in the above system are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description in the method embodiment of the present invention, and will not be repeated here.
[0057] Similarly, the system of the present invention fundamentally solves the problem of frequent establishment of network communication between devices and the inability to effectively control connection resources. It can quickly and accurately realize the integration of network element devices and data interaction, improve system performance and simplify the programming model, and has the advantages of low cost, fast implementation and convenience.
[0058] Example 3
[0059] The present invention also provides an electronic device for remote access connection pooling of core network elements, comprising: at least one memory and at least one processor;
[0060] The at least one memory is used to store a machine-readable program;
[0061] The at least one processor is used to call the machine-readable program to execute the method for remote access connection pooling of core network element devices.
[0062] The information interaction and readable program execution processes of the processor in the aforementioned electronic device are based on the same concept as those in the embodiments of the present invention, and can be found in the descriptions in the embodiments of the present invention, so they will not be repeated here.
[0063] Similarly, the electronic device of the present invention fundamentally solves the problem of frequent establishment of network communication and ineffective control of connection resources. It can quickly and accurately realize the integration of network element devices and data interaction, improve system performance and simplify the programming model, and has the advantages of low cost, fast implementation and convenience.
[0064] It should be noted that not all steps and modules in the above processes and system structures are mandatory; some steps or modules can be omitted as needed. The execution order of the steps is not fixed and can be adjusted as required. The system structures described in the above embodiments can be physical or logical structures. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or they may be implemented by certain components in multiple independent devices.
[0065] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.< / connection> < / connection> < / connection> < / connection> < / connection>
Claims
1. A method for pooling remote access connections for core network element devices, characterized in that: include: Step 1: Encapsulate key information related to the network element device integration process, create and configure a connection pool for each network element device, and initialize the connection pool uniformly through the connection pool manager. Step 2: Design the network communication model for the connection pool: Utilize device-related classes that inherit from the SSH communication client's general SSH connection and general SSH driver classes, and override client methods to implement customized business logic. Step 3: Obtain the network element name and command to be issued based on the request parameters, obtain the connection pool of the corresponding network element through the connection pool manager, connect to it, call the command issuance method corresponding to the connection pool based on the connection, complete the interaction with the network element, and return the response result; in, In step 2, the device-related classes inherit the SSH general connection-related classes of the SSH communication client. This includes: using the device connection class to define connection, disconnection, connection status, and command issuance methods based on the network connection client class AbsClient; inheriting the network connection client class AbsClient to achieve general SSH protocol integration; using Apache sshd-core to implement integration details; and implementing the Connection interface through the device connection class, which is uniformly managed by the connection pool object, defining methods for closing the connection, checking if the connection is alive, whether the connection is closed, and issuing commands. Step 2 utilizes device-related classes to inherit the SSH general driver-related classes of the SSH communication client, including: inheriting the connection driver class SshDriver from the device driver class, inheriting the Driver interface, constructing a connection object by implementing the Driver interface through the device driver class, defining the method to obtain the driver, and generating an SshConnection connection.
2. The method for remote access connection pooling of core network element devices according to claim 1, characterized in that: Step 1 encapsulates key information for the network element device docking process, including: using a database to configure and solidify key information, which includes network element name, device IP, port, login username, login password, maximum number of connections, device manufacturer, driver name, login command, logout command, and termination command.
3. The method for pooling remote access connections for core network element devices according to claim 1, characterized in that: Step 1 involves creating a connection pool for each network element device, including: using the Apache commons-pool2 toolkit to build the connection pool for the network element device, by inheriting from BasePooledObjectFactory. <connection> This class implements the connection pool's methods: create(), wrap(), destroyObject(), and validateObject().< / connection> 4. The method for remote access connection pooling of core network element devices according to claim 1, characterized in that configuring the connection pool of the network element device in step 1 includes: Inheriting GenericObjectPoolConfig <connection> This class allows you to set the maximum number of connections, minimum number of idle connections, maximum waiting time, whether to block after the pool is exhausted, verification when retrieving objects, verification when recycling, verification when creating objects, verification when idle, and last-in-first-out configuration.< / connection> 5. A system for pooling remote access connections for core network elements, characterized in that: It includes a connection pool management module, a model management module, and an interaction module. The connection pool management module encapsulates key information related to the network element device interconnection process, creates and configures the connection pool for each network element device, and initializes the connection pool uniformly through the connection pool manager. The model management module designs a network communication model for the connection pool: it utilizes device-related classes that inherit from the SSH communication client's general SSH connection and general SSH driver classes, and overrides client methods to implement customized business logic. The interaction module obtains the network element name and the command to be issued from the network element device based on the request parameters, obtains the connection pool of the corresponding network element device through the connection pool manager, connects to it, calls the command issuance method corresponding to the connection pool based on the connection, completes the interaction with the network element device, and returns the response result. in, The device-related classes inherit from the SSH communication client's general connection-related classes, including: using the device connection class to define connection, disconnection, connection status, and command issuance methods based on the network connection client class AbsClient; inheriting from the network connection client class AbsClient to achieve general SSH protocol integration; using Apache sshd-core to implement integration details; and implementing the Connection interface through the device connection class, which is uniformly managed by the connection pool object, defining methods for closing the connection, checking if the connection is alive, whether the connection is closed, and issuing commands. The SSH communication client's generic driver-related classes are inherited by the device-related classes, including: inheriting the connection driver class SshDriver from the device driver class, inheriting the Driver interface, constructing a connection object through the device driver class implementing the Driver interface, defining methods to obtain the driver, and generating an SshConnection connection.
6. A core network element device with remote access connection pooling electronic equipment, characterized in that: include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to execute a method for remote access connection pooling of core network element devices according to any one of claims 1 to 4.
Citation Information
Patent Citations
Service request method and device based on connection pool, server and storage medium
CN110971703A
Multivariate database connection pool management method based on distributed scene
CN118012907A