Management system and method for point-to-point protocol connection, and electronic equipment

By integrating the PPP protocol into ConnectivityService in the Android system, the problem of isolated PPP links is solved, and unified management of PPP and Ethernet network instances is achieved, improving the integrity and scalability of the Android network architecture.

CN121396994APending Publication Date: 2026-01-23SHANGHAI SUMI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511788885.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively integrate Point-to-Point Protocol (PPP) links in the Android system, resulting in isolated links that disrupt the integrity of the network architecture and prevent seamless, low-cost intelligent upgrades of traditional devices.

Method used

The PPP protocol is integrated into the ConnectivityService of the Android system. Through modules such as EthernetTracker and EthernetNetworkFactory, the management of Ethernet network instances is realized, which incorporates them into a unified network connection framework and avoids the duplication of building an independent network management stack.

Benefits of technology

It achieves seamless integration of the PPP protocol with the Android network framework, reduces system complexity, ensures the consistency and scalability of network policies, and supports unified management of multiple network transmission types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121396994A_ABST
    Figure CN121396994A_ABST
Patent Text Reader

Abstract

The invention discloses a point-to-point protocol connection management system and method and electronic equipment, and the system comprises a network monitoring module which is configured to monitor a creation event of a point-to-point protocol network interface; the instance creation module is configured to generate an Ethernet type network instance corresponding to the point-to-point protocol network interface according to the creation event; a network connection management module configured to receive a registration of an Ethernet type network instance; the network monitoring module is further configured to obtain configuration parameters of the point-to-point protocol network interface; the instance creation module is further configured to update the Ethernet type network instance according to the configuration parameters; and the network connection management module is further configured to maintain the network capability of the point-to-point protocol network interface based on the updated Ethernet type network instance. According to the method and the device, the PPP protocol can multiplex state monitoring and network instance creation which are designed for the Ethernet, so that the PPP protocol is matched with an existing framework of an Android network framework.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of point-to-point protocol, and in particular to a point-to-point protocol connection management system and method and an electronic device. BACKGROUND

[0002] Point-to-point protocol (PPP) is a classic data link layer protocol and plays an important role in wide area network connection. It has been used in industrial control, financial terminals and other embedded / Linux devices for a long time, and constitutes the core communication foundation. Such devices are usually resource-limited and single-function, so PPP is often fixed in the system as the main or only communication method. The protocol is mainly used to establish and manage point-to-point network connections through serial connections (such as telephone lines, serial cables, USB serial ports, etc.), and provides support for various network layer protocols including IP.

[0003] If these devices are to be upgraded to more powerful Android smart terminals, the existing technical solutions implement the PPP protocol on Android by following the implementation of Linux. However, the PPP link is not integrated into the upper-layer network management module of Android. This results in the PPP connection being outside the system unified network management framework, forming an unmanaged isolated link and disrupting the integrity of the network architecture.

[0004] Therefore, the core technical problem currently faced is how to enable the physical network based on the PPP protocol to be recognized and managed by the system and integrated into its existing network connection framework without changing the original network architecture of the Android system and introducing a large number of customized modifications, so as to realize seamless and low-cost intelligent upgrading of traditional devices. SUMMARY

[0005] In view of this, the present application discloses a point-to-point protocol connection management system and method and an electronic device.

[0006] In a first aspect, the present application provides a point-to-point protocol connection management system, comprising:

[0007] A network monitoring module configured to monitor a creation event of a point-to-point protocol network interface when a point-to-point protocol daemon runs to generate the point-to-point protocol network interface;

[0008] An instance creation module configured to generate an Ethernet type network instance corresponding to the point-to-point protocol network interface according to the creation event;

[0009] A network connection management module configured to receive registration of the Ethernet type network instance to make an Ethernet transmission network capability corresponding to the point-to-point protocol network interface online;

[0010] The network monitoring module is further configured to acquire configuration parameters of the point-to-point protocol network interface after confirming that the point-to-point protocol connection is successfully established;

[0011] The instance creation module is further configured to update the Ethernet type network instance according to the configuration parameters;

[0012] The network connection management module is further configured to maintain the network capability of the point-to-point protocol network interface based on the updated Ethernet type network instance.

[0013] Optionally, the management system further comprises:

[0014] The daemon module is configured to receive dynamic configuration parameters issued by a server and store the dynamic configuration parameters into a configuration file;

[0015] The network monitoring module is configured to read the dynamic configuration parameters from the configuration file when detecting that the link state of the point-to-point protocol network interface becomes a connection state;

[0016] The instance creation module is configured to configure the Ethernet type network instance as a static mode and update the Ethernet type network instance in the static mode by using the dynamic configuration parameters.

[0017] Optionally, the management system further comprises:

[0018] The daemon module is configured to receive input static configuration parameters and store the static configuration parameters into a configuration file;

[0019] The network monitoring module is configured to read the static configuration parameters from the configuration file when detecting that the link state of the point-to-point protocol network interface becomes a connection state;

[0020] The instance creation module is configured to update the Ethernet type network instance by using the static configuration parameters.

[0021] Optionally, the management system further comprises:

[0022] The network configuration management module is configured to generate a request for starting a point-to-point protocol in response to a user interface configuration operation or a serial port power-on event; the request comprises a serial port device identifier and an IP configuration type;

[0023] The daemon module is configured to start the point-to-point protocol daemon according to the request to start a process of establishing a point-to-point protocol connection on a serial port link.

[0024] Optionally, the management system further comprises:

[0025] The daemon module is configured to maintain the state of the point-to-point protocol network interface in association with the point-to-point protocol daemon after the point-to-point protocol network interface is completed.

[0026] Optionally, the management system further comprises:

[0027] The daemon module is configured to, when the point-to-point protocol network interface is reserved in a dynamic mode, re-execute the updating of the Ethernet-type network instance based on the changed dynamic configuration parameters in response to the change of the dynamic configuration parameters issued by the server.

[0028] In a second aspect, the present application also provides a point-to-point protocol connection management method applied to an Android device, comprising:

[0029] When the point-to-point protocol daemon runs to generate a point-to-point protocol network interface, a creation event of the point-to-point protocol network interface is detected, and an Ethernet-type network instance corresponding to the point-to-point protocol network interface is generated according to the creation event;

[0030] The Ethernet-type network instance is registered to a network connection management module of the system, so that the Ethernet transmission network capability corresponding to the point-to-point protocol network interface is online;

[0031] After confirming that the point-to-point protocol connection is successfully established, configuration parameters of the point-to-point protocol network interface are acquired, and the Ethernet-type network instance is updated according to the configuration parameters;

[0032] The network capability of the point-to-point protocol network interface is maintained based on the updated Ethernet-type network instance.

[0033] Optionally, the acquiring of the configuration parameters of the point-to-point protocol network interface comprises:

[0034] The dynamic configuration parameters issued by the server are received, and the dynamic configuration parameters are stored to a configuration file;

[0035] When the link state of the point-to-point protocol network interface is detected to be changed to a connection state, the dynamic configuration parameters are read from the configuration file;

[0036] The Ethernet-type network instance is configured in a static mode, and the Ethernet-type network instance in the static mode is updated by using the dynamic configuration parameters.

[0037] Optionally, before the point-to-point protocol daemon runs to generate the point-to-point protocol network interface, the method further comprises:

[0038] In response to a user interface configuration operation or a serial port power-on event, a request for starting a point-to-point protocol is generated; the request includes a serial port device identifier and an IP configuration type;

[0039] A point-to-point protocol daemon process is started according to the request to start a process of establishing a point-to-point protocol connection on a serial port link.

[0040] In a third aspect, the application further provides an electronic device including a processor configured to execute the point-to-point protocol connection management method described above.

[0041] In summary, the application enables the PPP protocol to reuse the existing state monitoring and network instance creation designed for Ethernet, integrates the point-to-point protocol into the network connection management module of the Android system, and realizes unified management of all network transmission types including Ethernet, wireless local area network, cellular mobile network, Bluetooth network, and point-to-point protocol; thereby matching the existing architecture of the Android network framework. At the same time, the application avoids adding an independent network management stack to support the PPP protocol, greatly reduces the system complexity, and ensures the consistent application of network policies among various transmission types. BRIEF DESCRIPTION OF DRAWINGS

[0042] The following briefly describes the drawings used in the description of the embodiments of the application:

[0043] Figure 1 is a block diagram example of a point-to-point protocol connection management system provided by an embodiment of the application.

[0044] Figure 2 is another block diagram example of a point-to-point protocol connection management system provided by an embodiment of the application.

[0045] Figure 3 is still another block diagram example of a point-to-point protocol connection management system provided by an embodiment of the application.

[0046] Figure 4 is a flowchart example of a point-to-point protocol connection management method provided by an embodiment of the application.

[0047] Figure 5 is a part of the flowchart example of step S300 provided by an embodiment of the application.

[0048] Figure 6 is another part of the flowchart example of step S300 provided by an embodiment of the application.

[0049] Figure 7 is a part of the flowchart example before step S100 provided by an embodiment of the application. DETAILED DESCRIPTION

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the specific embodiments of the present application will be described below with reference to the drawings. The drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without creative labor, and other embodiments can be obtained without departing from the concept of the present application, and the adjustments and improvements made within the scope of the present application.

[0051] In order to make the drawing simple, only the parts related to the corresponding embodiments are shown in the drawings, which do not represent the actual structure of the product. In addition, in order to make the drawing simple and easy to understand, in some drawings, only some parts with the same structure or function are shown, and there may be more or less parts with the same structure or function.

[0052] In the present application, unless otherwise explicitly specified and limited, ordinal numbers such as "first", "second", etc. are only used to distinguish the description of the associated objects, and cannot be understood as indicating or implying the relative importance or order between the associated objects; in addition, it also does not represent the number of the associated objects. "Multiple" includes two or more, and other quantifiers are similar. " / " is used to describe the relationship between the associated objects, which represents the "or" relationship between the associated objects. "And / or" is used to describe the relationship between the associated objects, which includes any combination relationship between the associated objects, for example, "a and / or b" includes: "a alone", "b alone", or "a and b". "One or more" or "at least one" of a plurality of objects means any object or any combination of a plurality of objects, for example, "one or more of a1, a2, a3" or "at least one of a1, a2, a3" includes: "a1 alone", "a2 alone", "a3 alone", "a1 and a2", "a1 and a3", "a2 and a3", or "a1, a2 and a3".

[0053] As a widely used intelligent terminal operating system, the network connection management framework of the Android system only defines the following four standard network transmission types: Ethernet (TRANSPORT_ETHERNET), wireless local area network (TRANSPORT_WIFI), cellular mobile network (TRANSPORT_CELLULAR) and Bluetooth network (TRANSPORT_BLUETOOTH). This framework aims to provide a unified network management experience for most consumer electronics devices, but at the same time, it also means that other physical network types other than the above four standard network transmission types cannot be supported and managed by the Android system.

[0054] Point-to-Point Protocol (PPP) is a classic data link layer protocol that plays an important role in wide area network connections. It has been used for a long time in industrial control, financial terminals and other embedded / Linux devices, forming the core communication foundation. Such devices are usually resource-constrained and single-function, so PPP is often fixed in the system as the main or only communication method. This protocol is mainly used to establish and manage point-to-point network connections through serial connections (such as telephone lines, serial cables, USB serial ports, etc.), and provides support for various network layer protocols including IP.

[0055] Early Android systems are based on the Linux kernel, and their underlying layers are theoretically capable of supporting PPP protocols. Some old devices can even implement dial-up communication by porting Linux's PPP implementation (such as the pppd daemon). However, with the rapid iteration of mobile communication technology and the evolution of Android's own network architecture, the system has fully transitioned to establishing efficient IP data channels directly through the Radio Interface Layer (RIL). For the sake of ensuring architectural consistency, improving security, and controlling maintenance costs, modern mainstream Android devices no longer provide native support for PPP protocols.

[0056] However, in specific industrial, embedded, or traditional device intelligent upgrade scenarios, there are a large number of existing devices and communication infrastructure that heavily rely on serial or dedicated line communication systems based on PPP protocols. In standard Linux environments, PPP protocols usually rely on configuration files at the file system level for network management. For example, network interface configuration is implemented through the / etc / network / interfaces file, and DNS server information is stored in the / etc / resolv.conf file. The system sets and updates network parameters by reading and modifying these files. However, in Android systems, Android has designed higher-level network service abstractions (such as Netd and ConnectivityService), which prohibit ordinary processes or services from directly modifying underlying network configuration files, resulting in the failure of PPP configuration schemes under standard Linux in the Android environment.

[0057] To upgrade these devices to more powerful Android smart terminals, existing technical solutions implement PPP protocols on Android using the Linux implementation method; without integrating PPP links into the upper-layer network management module on Android. This results in PPP connections being outside the system's unified network management framework, forming an unmanaged isolated link that disrupts the overall integrity of the network architecture.

[0058] Therefore, the core technical problem currently faced is: how to make the physical network based on the PPP protocol be recognized and managed by the system and be integrated into the existing network connection framework without changing the original network architecture of the Android system and without introducing a large number of customized modifications, so as to realize seamless and low-cost intelligent upgrading of traditional devices.

[0059] The following is a relevant introduction to the Android system framework, as shown in Figure 3

[0060] The Android system framework includes an application framework layer (Framework), a system service layer (System Services), a network service layer (Network Services), and a Linux kernel (Kernel). The core component of the application framework layer (Framework) is ConnectivityService, which serves as the hub of the Android network connection, and all network types (such as Wi-Fi, cellular, and Ethernet) in the system need to be registered with it and be uniformly scheduled by it. ConnectivityService is responsible for managing network interfaces, DNS configuration, and other core connection transactions, and is the decision center of network policies.

[0061] The core components of the system service layer (System Services) are XxxNetworkFactory (such as WifiNetworkFactory and EthernetNetworkFactory) and XxxTracker (such as EthernetTracker). XxxNetworkFactory serves as the unified interface for ConnectivityService to request network links, and each network type (such as WifiNetworkFactory and EthernetNetworkFactory) has a dedicated factory that is responsible for the creation, maintenance, and destruction of its network agent. EthernetTracker is a dedicated state tracker for Ethernet, which is responsible for listening to physical link events (such as interface UP / DOWN and network cable plugging) and managing IP configuration (DHCP / static) and interface names.

[0062] ​The core component of the network service layer (Network Services): NetworkManagementService, which does not directly perform network configuration operations, but acts as a proxy between the upper layer framework and the underlying network facilities. All network parameter configuration instructions, including but not limited to network interfaces, IP addresses, DNS, and routing, as well as the implementation of various network policies, are processed by the native netd process or ultimately passed to the operating system kernel.

[0063] The netd process, as the network daemon of the Android system, runs in the user space; it is used to receive and process UEvent event messages from the operating system kernel, which contain network interface status, bandwidth, and routing changes, and forwards them to the upper layer framework. The netd process provides a series of underlying network control function interfaces for implementing firewall rule setting, network address translation (NAT), bandwidth control, and network sharing functions; and is responsible for managing system-level domain name resolution (DNS) configuration information, maintaining DNS cache, and providing domain name resolution services for system components and applications.

[0064] The core component of the Linux kernel: network device drivers, TCP / IP protocol stack, Netlink Socket, which directly operate physical devices such as network cards, Wi-Fi chips, modems, Bluetooth controllers, etc. It implements core network protocol stacks such as TCP, UDP, IP, and Ethernet protocols.

[0065] To solve the above problems, the present application integrates PPP (Point-to-Point Protocol) into the ConnectivityService of the Android system, realizing unified management of all network transmission types. ConnectivityService is responsible for centralized scheduling of multiple network transmission types including ETHERNET, WIFI, CELLULAR, BLUETOOTH, and PPP, specifically undertaking core functions such as network state monitoring, network optimization evaluation, and automatic switching. Compared with the conventional solution based on Linux, where PPP usually exists as a dedicated communication method independent of the system network framework, by integrating it into the unified connection management layer, the present application avoids the repeated construction of the dedicated PPP stack, improves the compatibility and policy consistency of the system for heterogeneous network types, and strengthens the integrity and expansibility of the Android network architecture.

[0066] For the convenience of description, in the embodiments of the present application, the network monitoring module corresponds to EthernetTracker, the instance creation module corresponds to EthernetNetworkFactory, the network connection management module corresponds to ConnectivityService, the daemon module corresponds to the netd process, and the network configuration management module corresponds to NetworkManagementService. The following description is made in conjunction with the accompanying drawings.

[0067] Figure 1 is a block diagram of a management system of a point-to-point protocol connection provided by an embodiment of the present application. Please refer to Figure 1 The present application discloses a management system of a point-to-point protocol connection, comprising:

[0068] The network monitoring module 200 is configured to monitor a creation event of a point-to-point protocol network interface when a point-to-point protocol daemon runs to generate the point-to-point protocol network interface.

[0069] The instance creation module 400 is configured to generate an Ethernet type network instance corresponding to the point-to-point protocol network interface according to the creation event.

[0070] The network connection management module 500 is configured to receive registration of the Ethernet type network instance to make an Ethernet transmission network capability corresponding to the point-to-point protocol network interface online.

[0071] The network monitoring module 200 is further configured to obtain configuration parameters of the point-to-point protocol network interface after confirming that the point-to-point protocol connection is successfully established.

[0072] The instance creation module 400 is further configured to update the Ethernet type network instance according to the configuration parameters.

[0073] The network connection management module 500 is further configured to maintain the network capability of the point-to-point protocol network interface based on the updated Ethernet type network instance.

[0074] In this embodiment, the PPP protocol is used as a core protocol working at the data link layer, based on serial communication as a physical basis, with complete data encapsulation, link control and authentication capabilities, and can carry network layer protocols such as IP, and is a key component of the TCP / IP network system. Among the existing TRANSPORT_ETHERNET, TRANSPORT_WIFI, TRANSPORT_CELLULAR, TRANSPORT_BLUETOOTH four transmission types of the Android system, the present application selects to classify the PPP into the TRANSPORT_ETHERNET transmission type. This enables the PPP to reuse the management logic and interface designed for Ethernet, so as to realize the integration of the PPP protocol and the existing network framework of Android, thereby realizing the support for the newly added protocol with minimal changes.

[0075] The point-to-point protocol daemon (PPPd process) runs to generate a point-to-point protocol network interface, such as a "PPPx" network interface, where x is 0, 1, 2, etc. The EthernetTracker receives the creation event of the "PPPx" network interface, and includes the "PPPx" network interface in the processing range, rather than only processing traditional "ethx" type interfaces (Ethernet network interfaces). The EthernetNetworkFactory creates a NetworkInterface instance corresponding to the "PPPx" network interface, which is used to maintain network information, link state information, IPClient instances, and other information of the "PPPx" network interface. The ConnectivityService receives the network capability online notification of the TRANSPORT_ETHERNET type reported by the EthernetNetworkFactory, and the corresponding network interface is "PPPx". At this point, the ConnectivityService includes the "PPPx" network interface in its unified management category, maintains its network capability, and thus realizes complete support of the system for the PPP protocol.

[0076] By classifying the PPP network into the TRANSPORT_ETHERNET transmission type category and integrating it into the EthernetService, the PPPx network interface is successfully included in the Android Ethernet system. This method enables the PPP protocol to reuse the existing EthernetTracker state monitoring and EthernetNetworkFactory network instance creation mechanism designed for Ethernet, thereby matching the existing architecture of the Android network framework. At the same time, it avoids adding an additional independent network management stack to support the PPP protocol, greatly reducing the complexity of the system and ensuring the consistent application of network policies among various transmission types.

[0077] In an embodiment, referring to Figure 2 The management system of the point-to-point protocol connection disclosed in the application further includes:

[0078] The network configuration management module 300 is configured to generate a request for starting the point-to-point protocol in response to a user interface configuration operation or a serial port power-on event; the request includes a serial port device identifier and an IP configuration type.

[0079] The daemon module 100 is configured to start the point-to-point protocol daemon according to the request to start a process of establishing a point-to-point protocol connection on a serial port link.

[0080] In the embodiment, the user interface is provided with an "open PPP function" configuration switch; when it is detected that the "open PPP function" configuration switch is turned on, the EthernetTracker receives a corresponding function opening state event. Alternatively, the EthernetTracker receives a serial port power-on preparation event, triggers the EthernetTracker to send a "start PPP" message to the NetworkManagementService, and the message carries a serial port device identifier and an IP configuration type (dynamic mode or static mode). The NetworkManagementService calls a newly added API in the Netd service through an AIDL interface, and the newly added API includes a PPP opening API for establishing a link and a PPP closing API for disconnecting a link. The PPPd process is started based on the support of the PPP driver. The starting mode of the PPPd process supports both user operation of the configuration switch and serial port power-on triggering, and the system integration of the PPP function is improved.

[0081] In an embodiment, the management system of the point-to-point protocol connection disclosed in the application further includes:

[0082] The daemon module 100 is configured to receive a dynamic configuration parameter issued by a server and store the dynamic configuration parameter in a configuration file;

[0083] The network monitoring module 200 is configured to read the dynamic configuration parameter from the configuration file when it is detected that a link state of a point-to-point protocol network interface becomes a connection state;

[0084] The instance creation module 400 is configured to configure an Ethernet type network instance as a static mode and update the Ethernet type network instance in the static mode by using the dynamic configuration parameter.

[0085] In this embodiment, when the "PPPx" network interface is set to "dynamic mode", the PPPd process successfully negotiates with the PPP server through the link control protocol and network control protocol, and after the formal establishment of the connection, the PPP server allocates a dynamic IP address and other dynamic configuration parameters to the Android device through the IPCP protocol, so that the Android device can perform IP layer communication. After receiving the dynamic IP address and other dynamic configuration parameters, the PPPd process saves them to the configuration file. At the same time, the link state of the "PPPx" network interface changes from the disconnected state to the connected state, and the "UP" prompt is given. The EthernetTracker receives the "UP" event, obtains the dynamic configuration parameters including the dynamic IP address from the saved configuration file, and sets the Ethernet type to the static mode and the static IP address and DNS parameters to the obtained dynamic configuration parameters. The EthernetNetworkFactory updates the Ethernet type network instance according to the static IP address and DNS parameters.

[0086] In the existing Android network architecture, the Ethernet service supports dynamic and static configuration modes. In the dynamic mode, the IP is obtained by initiating the DHCP process by the IpClient; in the static mode, the preset parameters are directly applied. However, the PPP protocol dynamically obtains the IP through the unique LCP / IPCP negotiation, and the mechanism is different from that of the DHCP. The two ways of dynamically obtaining the IP are independent of each other in the traditional implementation, which causes the PPP protocol to be unable to utilize the unified management of the Ethernet framework. In this embodiment, the static mode of the Ethernet is used to apply these network parameters. That is, the IP, DNS and other information dynamically obtained by the PPP are directly input as the parameters of the static mode, so as to bypass the DHCP process of the Ethernet, realize the rapid configuration of the network and the unified management of the framework.

[0087] In one embodiment, the management system of the point-to-point protocol connection disclosed in the present application further comprises:

[0088] The daemon process module 100 is configured to receive the input static configuration parameters and store the static configuration parameters to the configuration file;

[0089] The network monitoring module 200 is configured to read the static configuration parameters from the configuration file when detecting that the link state of the point-to-point protocol network interface changes to the connected state;

[0090] The instance creation module 400 is configured to update the Ethernet type network instance by using the static configuration parameters.

[0091] In this embodiment, when the "PPPx" network interface is configured as "static mode", its network parameters (such as static IP, gateway, and DNS parameters) are based on preset static values rather than dynamic allocation. System services (such as EthernetNetworkFactory) provide corresponding configuration interface APIs, enabling the upper management system to issue manually specified static configuration parameters (static IP address, gateway, DNS parameters, etc.) to the PPPd process and save them to the configuration file. The link state of the "PPPx" network interface changes from a disconnected state to a connected state and prompts "UP". The EthernetTracker receives the "UP" event, obtains the static configuration parameters, including the static IP address, from the saved configuration file. EthernetNetworkFactory updates the Ethernet-type network instance based on the static IP address and DNS parameters.

[0092] In an embodiment, the daemon module 100 is configured to maintain the state of the point-to-point protocol network interface in association with the point-to-point protocol daemon after the point-to-point protocol network interface is created.

[0093] In this embodiment, in Ethernet (such as ethx) management, the configuration (such as IP address setting) and state monitoring (such as link on-off) of the network interface are generally unified by the Netd process; the Netd process completes this by responding to kernel events and executing script commands. However, for the "PPPx" network interface, its link control, IP address allocation, connection state, and other information are maintained and managed throughout the PPP connection establishment process by the PPPd process through LCP (Link Control Protocol) and IPCP (Internet Protocol Control Protocol). Therefore, for the "PPPx" network interface, its configuration and state are maintained and managed by the PPPd process; repeated configuration and state maintenance of the "PPPx" network interface by the Netd process is no longer needed; thus, repeated maintenance by the Netd process based on kernel events can be avoided, and configuration conflicts or inconsistent states due to different information sources can also be avoided.

[0094] In an embodiment, the daemon module 100 is configured to, when the point-to-point protocol network interface is reserved as dynamic mode, re-execute the update of the Ethernet-type network instance based on the changed dynamic configuration parameters in response to the change in the dynamic configuration parameters issued by the server.

[0095] In this embodiment, when the PPP server end allocates a new IP address for the client while maintaining the session connection due to network reorganization, load balancing, or lease renewal, the client needs to be able to timely perceive the IP address change and update the local configuration to maintain network connectivity.

[0096] EthernetTracker maintains the record of the "PPPx" interface in a dynamic mode. When the PPPd process detects that the PPP server reissues new dynamic configuration parameters (including IP address, DNS server, etc.) through the IPCP protocol, the EthernetTracker listens to the new dynamic configuration parameters and can timely perceive the change of the IP address. Once the EthernetTracker detects the change of the IP address, a reconfiguration process is triggered: the EthernetNetworkFactory updates the network information in the corresponding NetworkInterface instance; the ConnectivityService is notified to update the network capability information. The entire reconfiguration process is carried out on the premise of maintaining the existing PPP connection, without the need to reestablish the PPP link connection, realizing seamless IP address migration; improving the stability and adaptive ability of the PPP connection, and being particularly suitable for industrial Internet of Things and remote communication scenarios that need to maintain the connection for a long time.

[0097] In an embodiment, the electronic device disclosed in the present application comprises a processor, which is used for the management method of a point-to-point protocol connection, please refer to Figure 4 , which comprises the following steps:

[0098] S100, when a point-to-point protocol daemon runs to generate a point-to-point protocol network interface, a creation event of the point-to-point protocol network interface is detected, and an Ethernet type network instance corresponding to the point-to-point protocol network interface is generated according to the creation event;

[0099] S200, the Ethernet type network instance is registered to a network connection management module of the system, so that the Ethernet transmission network capability corresponding to the point-to-point protocol network interface is online;

[0100] S300, after confirming that the point-to-point protocol connection is successfully established, configuration parameters of the point-to-point protocol network interface are acquired; and the Ethernet type network instance is updated according to the configuration parameters;

[0101] S400, based on the updated Ethernet type network instance, the network capability of the point-to-point protocol network interface is maintained.

[0102] In an embodiment, please refer to Figure 5 , the step S300 of acquiring the configuration parameters of the point-to-point protocol network interface comprises:

[0103] S310, receiving dynamic configuration parameters issued by a server, and storing the dynamic configuration parameters to a configuration file;

[0104] S312, when detecting that the link state of the point-to-point protocol network interface becomes a connection state, reading the dynamic configuration parameters from the configuration file;

[0105] S313, configuring the Ethernet type network instance as static mode, and updating the Ethernet type network instance in static mode by using the dynamic configuration parameter.

[0106] In an embodiment, referring to Figure 6 , obtaining the configuration parameter of the point-to-point protocol network interface includes:

[0107] S320, receiving the input static configuration parameter, and storing the static configuration parameter to the configuration file;

[0108] S321, when detecting that the link state of the point-to-point protocol network interface becomes a connection state, reading the static configuration parameter from the configuration file; and updating the Ethernet type network instance by using the static configuration parameter.

[0109] In an embodiment, referring to Figure 7 , before generating the point-to-point protocol network interface in response to the running of the point-to-point protocol daemon, further comprising:

[0110] S001, in response to a user interface configuration operation or a serial port power-on event, generating a request for starting the point-to-point protocol; the request includes a serial port device identifier and an IP configuration type;

[0111] S002, starting the point-to-point protocol daemon according to the request, to start a process of establishing a point-to-point protocol connection on a serial link.

[0112] In an embodiment, after the point-to-point protocol network interface is completed, the state of the point-to-point protocol network interface is associated with the point-to-point protocol daemon for maintenance.

[0113] In an embodiment, after the Ethernet type network instance is completed, further comprising:

[0114] When the point-to-point protocol network interface is reserved as dynamic mode, in response to a change in the dynamic configuration parameter issued by the server, re-executing the update of the Ethernet type network instance based on the changed dynamic configuration parameter.

[0115] In this embodiment, the electronic device is an electronic device installed with an Android system, such as a computer, a smart cash register, a self-service cash register and vending device, a code scanning gun, a printer, and the like. The electronic device further includes a memory, and the memory stores instructions. The processor calls the instructions stored in the memory to implement any one of the above methods or to implement the functions of each unit. The processor is, for example, a general processor, such as a central processing unit (CPU). The memory is a memory in the electronic device or a memory outside the electronic device. Alternatively, the functions of part or all of the units can be implemented in the form of a hardware circuit, and the hardware circuit can be understood as one or more processors. For example, in some embodiments, the hardware circuit is an application specific integrated circuit (ASIC), and the functions of part or all of the units are implemented by designing the logical relationship of elements in the circuit. For another example, in another implementation, the hardware circuit is a programmable logic device (PLD), which can include a large number of logic gate circuits, and the logical relationship between the logic gate circuits is configured by a configuration file, so as to implement the functions of part or all of the units. The above can be implemented in the form of a processor calling a program, or in the form of a hardware circuit, or in the form of a processor calling a program, and the remaining part is implemented in the form of a hardware circuit. The related descriptions involved in the method steps can refer to the related descriptions of the above system implementation, which will not be described here.

[0116] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments. In addition, the above embodiments can be freely combined as needed.

Claims

1. A system for managing point-to-point protocol connections, characterized by The network monitoring module is configured to monitor a creation event of a point-to-point protocol network interface when a point-to-point protocol daemon runs to generate the point-to-point protocol network interface; The instance creation module is configured to generate an Ethernet type network instance corresponding to the point-to-point protocol network interface according to the creation event; The network connection management module is configured to receive registration of the Ethernet type network instance to make an Ethernet transmission network capability corresponding to the point-to-point protocol network interface online; The network monitoring module is further configured to obtain configuration parameters of the point-to-point protocol network interface after confirming that the point-to-point protocol connection is successfully established; The instance creation module is further configured to update the Ethernet type network instance according to the configuration parameters; The network connection management module is further configured to maintain the network capability of the point-to-point protocol network interface based on the updated Ethernet type network instance. Further comprising:

2. The management system according to claim 1, characterized by The daemon module is configured to receive dynamic configuration parameters issued by a server and store the dynamic configuration parameters to a configuration file; The network monitoring module is configured to read the dynamic configuration parameters from the configuration file when detecting that a link state of the point-to-point protocol network interface changes to a connected state; The instance creation module is configured to configure the Ethernet type network instance as a static mode and update the Ethernet type network instance in the static mode by using the dynamic configuration parameters. Further comprising:

3. The management system of claim 1, wherein, The daemon module is configured to receive input static configuration parameters and store the static configuration parameters to a configuration file; The network monitoring module is configured to read the static configuration parameters from the configuration file when detecting that a link state of the point-to-point protocol network interface changes to a connected state; The instance creation module is configured to update the Ethernet type network instance by using the static configuration parameters. Further comprising:

4. The management system according to any one of claims 1 to 3, characterized by The network configuration management module is configured to generate a request for starting a point-to-point protocol in response to a user interface configuration operation or a serial port power-on event; The request includes a serial port device identifier and an IP configuration type; The daemon module is configured to start the point-to-point protocol daemon according to the request to start a process of establishing a point-to-point protocol connection on a serial port link. Further comprising:

5. The management system according to any one of claims 1 to 3, characterized by The daemon module is configured to maintain a state of the point-to-point protocol network interface in association with the point-to-point protocol daemon after the point-to-point protocol network interface is completed. Further comprising:

6. The management system according to any one of claims 1 to 3, characterized by The daemon module is configured to, when the point-to-point protocol network interface is reserved to be configured as a dynamic mode, re-execute updating of the Ethernet type network instance based on changed dynamic configuration parameters in response to the server issuing the changed dynamic configuration parameters. Further comprising:

7. A method for managing a point-to-point protocol connection, applied to an Android device, characterized in that, Detecting a creation event of a point-to-point protocol network interface when a point-to-point protocol daemon runs to generate the point-to-point protocol network interface, and generating an Ethernet type network instance corresponding to the point-to-point protocol network interface according to the creation event; ​ register the Ethernet type network instance to a network connection management module of the system, so that the Ethernet transmission network capability corresponding to the point-to-point protocol network interface is online; after confirming that the point-to-point protocol connection is successfully established, acquire configuration parameters of the point-to-point protocol network interface; and update the Ethernet type network instance according to the configuration parameters; maintain the network capability of the point-to-point protocol network interface based on the updated Ethernet type network instance.

8. The method of claim 7, wherein, The acquiring of the configuration parameters of the point-to-point protocol network interface comprises: receiving dynamic configuration parameters issued by a server, and storing the dynamic configuration parameters in a configuration file; when detecting that the link state of the point-to-point protocol network interface becomes a connection state, reading the dynamic configuration parameters from the configuration file; configuring the Ethernet type network instance as a static mode, and updating the Ethernet type network instance in the static mode by using the dynamic configuration parameters.

9. The method according to claim 7 or 8, characterized in that, Before the point-to-point protocol daemon is run to generate the point-to-point protocol network interface, the method further comprises: in response to a user interface configuration operation or a serial port power-on event, generating a request for starting the point-to-point protocol; the request comprises a serial port device identifier and an IP configuration type; starting the point-to-point protocol daemon according to the request, to start a process of establishing a point-to-point protocol connection on a serial port link.

10. An electronic device, comprising: The method comprises a processor configured to perform the management method of the point-to-point protocol connection according to any one of claims 7-9.