Method and system for pooling remote access connection of network element equipment of core network
By adopting the connection pooling method and SSH general connection driver class in the core network element equipment, the resource control problem during frequent network communication is solved, rapid integration and data interaction are achieved, system performance is improved and programming model is simplified.
Patent Information
- Application Number
- CN202411074456.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-07
AI Technical Summary
The prior art cannot effectively control the connected resources when frequently establishing network communications, resulting in poor system performance and waste of resources.
Using the remote access connection pooling method of core network element equipment, we can encapsulate the key information of network element equipment, create and configure the connection pool, design the network communication model, use SSH general connection and driver classes to achieve personalized service customization, and use the connection pool The manager unifies and manages the connection pool to achieve rapid integration and docking of network element devices.
It realizes fast and accurate network element equipment integration and data interaction, improves system performance, simplifies the programming model, and has the advantages of low cost, fast implementation, convenience and flexibility.
Smart Images

Figure CN119071939A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a method and system for remote access connection pooling of core network element equipment, and relates to the technical field of network connection. Background Art
[0002] With the development of mobile communication technology, the interaction of core network element devices has become more and more frequent. Connection pool technology is an important tool for improving system performance, enhancing system stability and optimizing resources, especially suitable for work scenarios that require frequent network communication. However, the existing docking method requires frequent establishment of network communication and cannot effectively control connection resources. Summary of the invention
[0003] In view of the problems of the prior art, the present invention provides a method and system for remote access connection pooling of core network element devices, which realizes rapid integration and docking of multiple network element devices and is suitable for various application scenarios in the operator field that need to communicate with core network elements.
[0004] The specific scheme proposed by the present invention is:
[0005] The present invention provides a method for core network element equipment remote access connection pooling, comprising:
[0006] Step 1: Encapsulate the key information of the network element device docking process, create and configure the connection pool of each network element device, and initialize the connection pool uniformly through the connection pool manager.
[0007] Step 2: Design the network communication model of the connection pool: Use device-related classes to inherit the SSH general connection and SSH general driver related classes in the SSH communication client, and override the client method to customize personalized services.
[0008] Step 3: Obtain the network element name and issuing instructions of the network element device according to the request parameters, obtain the connection pool of the corresponding network element device through the connection pool manager to connect, call the instruction issuing method corresponding to the connection pool according to the connection, complete the network element device interaction, and return the response result.
[0009] Furthermore, in step 1 of the method for remote access connection pooling of core network network element devices, key information of the network element device docking process is encapsulated, including: using a database to solidify key information configuration, the key information includes network element name, device IP, port, login user name, login password, maximum number of connections, device manufacturer, driver name, login command, logout command and end command.
[0010] Furthermore, in step 1 of the method for remote access connection pooling of core network network element devices, a connection pool for each network element device is created, including: using the Apache commons-pool2 toolkit to build a connection pool for the network element device, and inheriting BasePooledObjectFactory <connection>Class, implements the connection pool connection creation create(), connection wrapping wrap(), connection destruction destoryObject() and connection availability verification validateObject() methods.
[0011] Further, in the step 1 of the method for remote access connection pooling of core network network element devices, the connection pool of the network element device is configured, including: inheriting GenericObjectPoolConfig <connection>Class, set the maximum number of connections, the minimum number of idle connections, the maximum waiting time, whether to block after the pool objects are exhausted, verification when taking objects, recycling verification, verification when creating, idle verification and last-in-first-out configuration.
[0012] Furthermore, in step 2 of the method for remote access connection pooling of core network network element devices, device-related classes are used to inherit SSH general connection-related classes of SSH communication clients, including: using the device connection class to define connection, disconnection, whether to connect and instruction issuing methods according to the network connection client class AbsClient, inheriting the network connection client class AbsClient, realizing general SSH protocol docking, using Apache sshd-core to implement docking details, realizing the Connection interface through the device connection class, and being uniformly hosted by the connection pool object, defining closing the connection, whether the connection is alive, whether the connection is closed, and instruction issuing methods.
[0013] Furthermore, in step 2 of the method for remote access connection pooling of core network network element devices, device-related classes are used to inherit the SSH general driver-related classes of the SSH communication client, including: using the device driver class to inherit the connection driver class SshDriver, inheriting the Driver interface, implementing the Driver interface through the device driver class to construct a connection object, defining a method for obtaining the driver, and generating an SshConnection connection.
[0014] The present invention also provides a core network element device remote access connection pooling system, including a connection pool management module, a model management module and an interaction module.
[0015] The connection pool management module encapsulates the key information of the network element device docking process, creates and configures the connection pool of each network element device, and initializes the connection pool uniformly through the connection pool manager.
[0016] The model management module designs the network communication model of the connection pool: using device-related classes to inherit the SSH general connection and SSH general driver related classes in the SSH communication client, overwriting the client method to achieve personalized business customization,
[0017] The interaction module obtains the network element name and the issuing instruction of the network element device according to the request parameters, obtains the connection pool of the corresponding network element device through the connection pool manager to connect, calls the instruction issuing method corresponding to the connection pool according to the connection, completes the network element device interaction, and returns the response result.
[0018] The present invention also provides an electronic device for remote access connection pooling of a core network element device, 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 network element devices.
[0021] The benefits of the present invention are:
[0022] The present invention fundamentally solves the problem of frequent establishment of device network communications and inability to effectively control connection resources, can quickly and accurately realize network element device integration and data interaction, improves system performance and simplifies the programming model, and has the advantages of low cost, fast implementation, convenience and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 It is a schematic flow chart of the method of the present invention.
[0025] Figure 2 This is a schematic diagram showing the SSH universal connection related classes involved in the present invention.
[0026] Figure 3 This is a schematic diagram showing the SSH universal driver related classes involved in the present invention.
[0027] Figure 4 It is a schematic diagram of the principle of pooling technology.
[0028] Figure 5 This is a code example diagram showing abnormal interaction between network element devices. DETAILED DESCRIPTION
[0029] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0030] Example 1
[0031] The present invention provides a method for core network element equipment remote access connection pooling, comprising:
[0032] Step 1: Encapsulate the key information of the network element device connection process, create and configure the connection pool of each network element device, and initialize the connection pool uniformly through the connection pool manager.
[0033] In step 1, key information of the network element device docking process is encapsulated, and also includes: using a database to solidify key information configuration, the key information includes network element name, device IP, port, login user name, login password, maximum number of connections, device manufacturer, driver name, login command, logout command and end command.
[0034] The creation of a connection pool for each network element device also includes: using the Apache commons-pool2 toolkit to build a connection pool for the network element device, by inheriting BasePooledObjectFactory <connection>Class, implements the connection pool connection creation create(), connection wrapping wrap(), connection destruction destoryObject() and connection availability verification validateObject() methods.
[0035] The principle of commons-pool2 pooling technology can be found in Figure 4 , create create() in the connection factory ConnectionFactory, refer to the code:
[0036]
[0037] Connection wrapper wrap(), please refer to the code:
[0038]
[0039] Destroy the connection destoryObject(), please refer to the code:
[0040]
[0041] Verify the connection availability validateObject(), refer to the code:
[0042]
[0043] Configuring the connection pool of the network element device in step 1 may further include: inheriting GenericObjectPoolConfig <connection>Class, set the maximum number of connections, the minimum number of idle connections, the maximum waiting time, whether to block after the pool objects are exhausted, verification when taking objects, recycling verification, verification when creating, idle verification and last-in-first-out configuration.
[0044] Connection pool ConnectionPool: inherits GenericObjectPool <connection>Class that implements the connection acquisition borrowObject(), recycling returnObject(), and release clear() methods.
[0045] Connection Pool Manager 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 closing, and pooled resource destruction.
[0046] Step 2: Design a network communication model for the connection pool: Use device-related classes to inherit the related classes of SSH general connection and SSH general driver in the SSH communication client, and override client methods to customize personalized services.
[0047] When designing the SSH universal connection, in step 2, the device-related class is used to inherit the SSH universal connection-related class of the SSH communication client, including: using the device connection class to define connection, disconnection, whether to connect and issuing instructions according to the network connection client class AbsClient, inheriting the network connection client class AbsClient, realizing universal SSH protocol docking, using Apache sshd-core to implement docking details, and implementing the Connection interface through the device connection class. It is uniformly hosted by the connection pool object, and defines closing the connection, whether the connection is alive, whether the connection is closed, and the instruction issuing method.
[0048] And SshConnection: is the actual SSH protocol general device connection implementation class, which inherits the SSH client class and implements the Connection interface.
[0049] When designing the SSH universal driver, in step 2, the device-related class is used to inherit the SSH universal driver-related class of the SSH communication client, including: using the device driver class to inherit the connection driver class SshDriver, inheriting the Driver interface, implementing the Driver interface through the device driver class to construct a connection object, defining a method for obtaining the driver, and generating an SshConnection connection.
[0050] Step 3: Obtain the network element name and issuing instructions of the network element device according to the request parameters, obtain the connection pool of the corresponding network element device through the connection pool manager to connect, call the instruction issuing method corresponding to the connection pool according to the connection, complete the network element device interaction, and return the response result.
[0051] Example 2
[0052] The present invention also provides a core network element device remote access connection pooling system, including a connection pool management module, a model management module and an interaction module.
[0053] The connection pool management module encapsulates the key information of the network element device docking process, creates and configures the connection pool of each network element device, and initializes the connection pool uniformly through the connection pool manager.
[0054] The model management module designs the network communication model of the connection pool: using device-related classes to inherit the SSH general connection and SSH general driver related classes in the SSH communication client, overwriting the client method to achieve personalized business customization,
[0055] The interaction module obtains the network element name and the issuing instruction of the network element device according to the request parameters, obtains the connection pool of the corresponding network element device through the connection pool manager to connect, calls the instruction issuing method corresponding to the connection pool according to the connection, completes the network element device interaction, and returns the response result.
[0056] As the information interaction, execution process and other contents between the modules in the above-mentioned system are based on the same concept as the embodiment of the method of the present invention, the specific contents can be found in the description of the embodiment of the method 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 device network communications and inability to effectively control connection resources. It can quickly and accurately realize network element device integration and data interaction, improve system performance and simplify the programming model, and has the advantages of low cost, fast implementation, convenience and flexibility.
[0058] Example 3
[0059] The present invention also provides an electronic device for remote access connection pooling of a core network element device, 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 network element devices.
[0062] The information interaction, execution of readable program process, etc. of the processor in the above-mentioned electronic device are based on the same concept as the embodiment of the method of the present invention. The specific contents can be found in the description of the embodiment of the method of the present invention and will not be repeated here.
[0063] Similarly, the electronic device of the present invention fundamentally solves the problem of frequent establishment of device network communications and inability to effectively control connection resources, can quickly and accurately realize network element device integration and data interaction, improves system performance and simplifies the programming model, and has the advantages of low cost, fast implementation, convenience and flexibility.
[0064] It should be noted that not all steps and modules in the above-mentioned processes and system structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0065] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.< / connection> < / connection> < / connection> < / connection> < / connection>
Claims
1. A method for remote access connection pooling of core network element equipment, characterized in that include: Step 1: Encapsulate the key information of the network element device docking process, create and configure the connection pool of each network element device, and initialize the connection pool uniformly through the connection pool manager. Step 2: Design the network communication model of the connection pool: Use device-related classes to inherit the SSH general connection and SSH general driver related classes in the SSH communication client, and override the client method to customize personalized services. Step 3: Obtain the network element name and issuing instructions of the network element device according to the request parameters, obtain the connection pool of the corresponding network element device through the connection pool manager to connect, call the instruction issuing method corresponding to the connection pool according to the connection, complete the network element device interaction, and return the response result.
2. A method for remote access connection pooling of core network element devices according to claim 1, characterized in that In step 1, key information of the network element device docking process is encapsulated, including: using a database to solidify key information configuration, the key information includes network element name, device IP, port, login user name, login password, maximum number of connections, device manufacturer, driver name, login command, logout command and end command.
3. A method for remote access connection pooling of core network element devices according to claim 1, characterized in that In step 1, a connection pool is created for each network element device, including: using the Apache commons-pool2 toolkit to build a connection pool for the network element device, inheriting BasePooledObjectFactory <connection> Class, implements the connection pool connection creation create(), connection wrapping wrap(), connection destruction destoryObject() and connection availability verification validateObject() methods.< / connection> 4. A method for remote access connection pooling of core network element devices according to claim 1, characterized in that the connection pool of the network element device is configured in step 1, comprising: Inheriting GenericObjectPoolConfig <connection> Class, set the maximum number of connections, the minimum number of idle connections, the maximum waiting time, whether to block after the pool objects are exhausted, verification when taking objects, recycling verification, verification when creating, idle verification and last-in-first-out configuration.< / connection> 5. A method for core network element device remote access connection pooling according to claim 1, characterized in that In step 2, the device-related classes are used to inherit the SSH general connection-related classes of the SSH communication client, including: using the device connection class to define connection, disconnection, whether to connect and issuing instructions according to the network connection client class AbsClient, inheriting the network connection client class AbsClient, realizing the general SSH protocol docking, using Apache sshd-core to implement the docking details, and implementing the Connection interface through the device connection class. It is uniformly managed by the connection pool object, and defines closing the connection, whether the connection is alive, whether the connection is closed, and the instruction issuing method.
6. A method for remote access connection pooling of core network element devices according to claim 1, characterized in that In step 2, the SSH general driver related class of the SSH communication client is inherited by the device related class, including: inheriting the connection driver class SshDriver by 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 for obtaining the driver, and generating an SshConnection connection.
7. A system for remote access connection pooling of core network element devices, characterized in that Including connection pool management module, model management module and interaction module, The connection pool management module encapsulates the key information of the network element device docking process, creates and configures the connection pool of each network element device, and initializes the connection pool uniformly through the connection pool manager. The model management module designs the network communication model of the connection pool: using device-related classes to inherit the SSH general connection and SSH general driver related classes in the SSH communication client, overwriting the client method to achieve personalized business customization, The interaction module obtains the network element name and the issuing instruction of the network element device according to the request parameters, obtains the connection pool of the corresponding network element device through the connection pool manager to connect, calls the instruction issuing method corresponding to the connection pool according to the connection, completes the network element device interaction, and returns the response result.
8. A core network element device remotely accesses a connection pooled electronic device, 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 used to call the machine-readable program to execute a method for remote access connection pooling of a core network network element device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Network communication method and system based on network connection pooling
CN105933464A
Service request method and device based on connection pool, server and storage medium
CN110971703A
Cluster shell method and device, electronic equipment and computer readable storage medium
CN112600842A
Network element connection management method, network element connection management system and related equipment
CN117177263A
Multivariate database connection pool management method based on distributed scene
CN118012907A
