Network connection method and device, electronic equipment and storage medium
By responding to the network request message of the target service type in the Android system and determining and matching the target APN tag, the problem of different service types sharing the same APN link in the prior art is solved, and more efficient network connections and better service quality are achieved.
Patent Information
- Application Number
- CN202311524627.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-15
- Publication Date
- 2025-05-16
AI Technical Summary
In the existing Android system, the network connection layer has restrictions on the support of mobile data networks, resulting in network requests of different service types sharing the same APN link, affecting network connection performance and service quality.
By responding to the network request message of the target service type, the target APN tag is determined, and the target APN link is matched and expanded according to the tag, so that network requests of different service types correspond to different APN links.
It avoids the mutual impact of network connection performance of different business types, ensures the quality of network services, and supports the creation of multiple dedicated Internet APN data links on demand.
Smart Images

Figure CN120017698A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of network technology, and in particular to a network connection method, device, electronic device and storage medium. Background Art
[0002] In the Android system, APN (Access Point Name) is used to configure and manage mobile network connections. APN is a network configuration file that defines the access point and related parameters of the mobile network, enabling the device to connect to the mobile network and access the Internet. Common APN types include: default APN, MMS (Multimedia Messaging Service) APN, and IMS (IP Multimedia Subsystem) APN. Among them, the default APN is used for ordinary mobile data connections and provides Internet access through the mobile network; MMS APN is used to send and receive MMS messages; IMS APN is used to support multimedia services such as voice, video, and instant messaging.
[0003] The current Android Framework network connection layer supports mobile data networks by abstracting the application's network request through the NetworkRequest class, and then connecting to the APN configured in the system for actual data connection. The NetworkRequest class is an important class used to describe network requests in Android. It provides many methods and properties for configuring and managing network requests. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a network connection method, device, electronic device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a network connection method is provided, including:
[0006] In response to obtaining a network request message of a target service type, determining a target access point name APN tag according to the target service type, wherein the target APN tag is used to indicate an APN corresponding to the network request message;
[0007] Determine the target APN link corresponding to the network request message according to the target APN tag; the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links;
[0008] A network connection is established through the target APN link.
[0009] Optionally, determining the target APN link corresponding to the network request message according to the target APN tag includes:
[0010] Add the target APN tag to the network request message to obtain a target request message;
[0011] The target APN link is determined according to the target request message.
[0012] Optionally, the target APN tag includes an APN index field, and adding the target APN tag to the network request message to obtain the target request message includes:
[0013] By pre-building a multi-APN controller component in the application framework layer, the target request message is obtained after adding the APN index field to the preset network request class describing the network request message. The multi-APN controller component is used to manage multiple Internet-type APN links.
[0014] Optionally, determining the target APN link according to the target request message includes:
[0015] Reading the target APN tag in the target request message;
[0016] Match the target APN corresponding to the target APN tag from a preset APN database;
[0017] The target APN link corresponding to the target request message is established according to the target APN.
[0018] Optionally, matching the target APN corresponding to the target APN tag from a preset APN database includes:
[0019] The target APN is matched in the preset APN database through a data profile manager DPM component according to the target APN tag.
[0020] Optionally, the DPM component is used to manage the mapping relationship between the APN tag and the APN; the method further includes:
[0021] If the mapping relationship does not include the target APN corresponding to the target APN tag, the target APN is added according to the target APN tag.
[0022] Optionally, the adding the target APN according to the target APN tag includes:
[0023] Obtain a target APN configuration file from a preset APN database according to the target APN tag;
[0024] The target APN is added according to the target APN configuration file.
[0025] Optionally, the method further comprises:
[0026] In response to obtaining a disconnection request for the target APN link, the target APN link is disconnected after the target request message is transmitted through the multi-APN controller component by calling a preset network deregistration interface.
[0027] According to a second aspect of an embodiment of the present disclosure, there is provided a network connection device, including:
[0028] A first determination module is configured to, in response to obtaining a network request message of a target service type, determine a target APN tag according to the target service type, wherein the target APN tag is used to indicate an APN corresponding to the network request message;
[0029] A second determination module is configured to determine a target APN link corresponding to the network request message according to the target APN tag; the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links;
[0030] The connection module is configured to perform a network connection through the target APN link.
[0031] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0032] processor;
[0033] a memory for storing processor-executable instructions;
[0034] Wherein, the processor is configured to execute the steps of the method described in the first aspect of the present disclosure.
[0035] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the network connection method provided in the first aspect of the present disclosure are implemented.
[0036] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: after obtaining the network request message of the target service type, the target APN tag corresponding to the target service type can be determined, and then the target APN link can be matched according to the target APN tag. Since the target APN link is an APN link extended according to the target service type, that is, the target APN link is a dedicated APN link corresponding to the network request message of the target service type, the network request message of the target service type may no longer occupy only one default APN link, thereby avoiding mutual influence of network connection performance of different services. Furthermore, when a network connection is performed based on the target APN link, the quality of network service can be guaranteed.
[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0039] Figure 1 It is a schematic diagram of a process of network connection based on an Android system software framework provided in the related art.
[0040] Figure 2 The figure is a flow chart of a network connection method according to an exemplary embodiment.
[0041] Figure 3 is based on Figure 2 The illustrated embodiment shows a flow chart of a network connection method.
[0042] Figure 4 It is a schematic diagram of an Android software framework that can support the expansion of multiple APN links according to an exemplary embodiment.
[0043] Figure 5 is based on Figure 2 The illustrated embodiment shows a flow chart of another network connection method.
[0044] Figure 6 The invention is a block diagram showing a network connection device according to an exemplary embodiment.
[0045] Figure 7 is based on Figure 6 The illustrated embodiment shows a block diagram of another network connection device.
[0046] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0047] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the location and with the authorization given by the owner of the corresponding device.
[0049] The present disclosure is mainly applied to scenarios where Android terminals perform network connection. In the Android network connection framework, different types of network requests correspond to different APN types. For example, MMS type requests will establish an MMS type APN data link, IMS type requests will establish an IMS type APN data link, and Internet type requests will establish an Internet type APN data link.
[0050] The Android system allows MMS and IMS APN data connections to exist at the same time to meet network requests from different applications. However, for Internet-type network requests, Android limits the existence of only one APN data link, and all Internet-type network requests of all applications need to share this unique Internet APN link. This restriction has the following problems:
[0051] 1. Network requests of different priorities are mixed on the same APN data link, which can easily cause low-priority services to affect the performance of high-priority services. In other words, if Internet-type network requests of all applications share a single Internet APN link, Internet services of different priorities cannot be isolated, and key services may be interfered with by other services.
[0052] 2. A single APN data link has a single point of failure problem. Once disconnected, it will affect all services passing through the link. In addition, a single Internet link can easily become a performance bottleneck and cannot meet the needs of high-traffic services.
[0053] 3. Some services require a dedicated mobile network APN link to ensure service quality, but sharing the same APN link cannot meet this requirement. That is, it does not support the creation of a dedicated Internet APN data link on demand to ensure service quality.
[0054] In addition, with the advent of 5G networks, network slicing technology allows the creation of multiple links on demand, but currently the Android native code level does not support directly requesting multiple data connections from the mobile network interface, nor does it have framework-level support for managing multiple APN links.
[0055] Figure 1 This is a schematic diagram of a process of network connection based on an Android system software framework provided in the related art. Figure 1 As shown, the behavior of the data link when switching between 3gnet and 3gwap APNs under the 5G standard is demonstrated, which is used to illustrate the current situation that the AOSP (Android Open Source Project) network framework layer only supports a single Internet type APN data link, where 3gnet and 3gwap are two different APNs.
[0056] When the user manually switches the APN in the settings interface (such as Figure 1 As shown in the figure, changing "user connection to the Internet" to "APN1") will trigger the DPM (Data Profile Manager) module in the application framework layer of the Android system software framework to switch the preferred data profile from 3gnet type to 3gwap type; the change of the preferred data profile will cause the DNC (Data Network Controller) in the application framework layer to re-evaluate the existing network connection ( Figure 1 In the example of IMS and 3gnet), IMS does not change, but the data connection of 3gnet is disconnected because the corresponding data profile is not preferred. After that, DNC tries to satisfy the unsatisfied network request (Network_Request), thereby establishing a data network based on the changed preferred profile, that is, based on APN 3gwap.
[0057] That is to say, Figure 1 As shown in the figure, the DNC and DPM modules of the Android system maintain a unique preferred data configuration file, and the data network establishment process can only establish a data link through the preferred APN configuration associated with the preferred configuration file. Therefore, the AOSP network framework layer can only establish a single data link based on the Internet type APN, and cannot establish multiple Internet APN type data links at the same time.
[0058] In general, this single-channel Internet-type APN data link in the related art limits the flexibility of the Android system in managing network connections and also limits the ability of applications to achieve differentiated network experiences.
[0059] In order to solve the above problems, the present invention provides a network connection method, device, electronic device and storage medium. The specific implementation of the present invention is described in detail below with reference to the accompanying drawings.
[0060] Figure 2 is a flow chart of a network connection method according to an exemplary embodiment. Figure 2 As shown, the method comprises the following steps:
[0061] In step S201, in response to obtaining a network request message of a target service type, a target access point name APN tag is determined according to the target service type, and the target APN tag is used to indicate the APN corresponding to the network request message.
[0062] Among them, the target service type refers to the Internet type and is the service type corresponding to the preset service scenario. For example, the preset service scenario may include a service scenario in which the terminal manufacturer performs a system upgrade on the terminal's related services or functions. Different from the Internet access request of ordinary users, the network request message of the target service type can usually be a network request message for system upgrades triggered by the manufacturer and sent from the cloud. The APN tag is used to identify the corresponding Internet type APN, for example, the APN can be 3gnet and 3gwap.
[0063] As mentioned above, different types of network requests are mixed on the same APN data link, which can easily cause the two to affect each other, thereby affecting service performance. For example, when a user accesses the Internet through a terminal, a network connection needs to be established based on the default APN link. Suppose the terminal manufacturer wants to upgrade a function of the terminal system, and the upgrade request also requires a network connection. In this scenario, the network request for the system upgrade needs to share the default APN link, which is bound to affect the user's normal Internet access service. In view of this, the present disclosure can expand another APN link for network connection for network request messages of this type of target service.
[0064] The target APN tag here is used to indicate the APN corresponding to the network request message. Network request messages of different service types may correspond to different APNs. The target APN tag may include an APN index field, for example. Therefore, in this step, the APN tag corresponding to the target service type may be obtained according to the correspondence between the pre-set service type and the APN tag.
[0065] In step S202, the target APN link corresponding to the network request message is determined according to the target APN tag; the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links.
[0066] In the present disclosure, the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links. In this way, multiple dedicated Internet APN data links can be created on demand according to the needs of different service types, thereby ensuring the network service type and service quality of different types of services.
[0067] In step S203, a network connection is established through the target APN link.
[0068] By adopting the above method, after obtaining the network request message of the target service type, the target APN tag corresponding to the target service type can be determined, and then the target APN link can be matched according to the target APN tag. Since the target APN link is an APN link extended according to the target service type, that is, the target APN link is a dedicated APN link corresponding to the network request message of the target service type, the network request message of the target service type can no longer occupy the only one default APN link, thereby avoiding the mutual influence of the network connection performance of different services. Furthermore, when the network connection is based on the target APN link, the quality of network service can be guaranteed.
[0069] Figure 3 is based on Figure 2 The embodiment shown is a flowchart of a network connection method, such as Figure 3 As shown, step S202 includes the following sub-steps:
[0070] In step S2021, the target APN tag is added to the network request message to obtain a target request message.
[0071] The target APN tag includes an APN index field.
[0072] In this step, the target request message can be obtained by adding the APN index field to the preset network request class that describes the network request message through a multi-APN controller component pre-built in the application framework layer. The multi-APN controller component is used to manage multiple Internet-type APN links.
[0073] The preset network request class here may include, for example, a NetworkRequest class, which is a class used to describe a network request in Android.
[0074] For example, Figure 4 is a schematic diagram of an Android software framework that can support the expansion of multiple APN links according to an exemplary embodiment. Figure 4 As shown, the software framework may include an application layer, in which UI display and control are performed. The software framework also includes an application framework layer (Application Framework Layer), which provides core components and services required to build applications. Figure 4 As shown, the application framework layer provides multiple APN controller components (Multiple Apn Controller), connection services, DNC (Data Network Controller, Data Network Controller), DPM (Data Profile Manager, Data Profile Manager) and APN setting components (ApnSetting), etc. Among them, the connection service is provided with a network agent component (Network Agent).
[0075] This disclosure is Figure 4 The application framework layer shown provides a multi-APN controller component, which is used to manage multiple Internet-type APN links. The multi-APN controller component holds instances of the connection manager (Connectivity Manager), Network, etc., which are used to call the system interface method to implement the corresponding function. Figure 4 The software framework shown provides framework-level support to manage multiple APN links.
[0076] like Figure 4 As shown, for the network connection request of the target service type (such as Figure 4 In the network request 1), the multi-APN controller component can add an APN index field (which can be recorded as apnIdx) in the preset network request class (such as NetworkRequest class) corresponding to the network connection request, and then encapsulate the preset network request class to obtain the target request message. Among them, the APN index field is used to specify the APN to be used for the network request of the current service type to request a specific APN data link, and the APN index field is determined according to the target service type.
[0077] In step S2022, the target APN link is determined according to the target request message.
[0078] In this step, the target APN tag in the target request message may be read; the target APN corresponding to the target APN tag may be matched from a preset APN database; and the target APN link corresponding to the target request message may be established according to the target APN.
[0079] For example, continue with Figure 4 Taking the Android software framework shown as an example, a network request can be initiated through the requestNetwork() interface of the connection manager ConnectivityManager, and the encapsulated NetworkRequest class can be passed into the interface. The NetworkRequest class contains the apnIdx of the APN expected by the current network request. After the target request message enters the DNC module, the DNC evaluates the target request message. During the evaluation of the request, the APN index field is checked to determine the APN corresponding to the target request message. At this point, the target APN tag in the target request message is read.
[0080] In the process of matching the target APN corresponding to the target APN tag from the preset APN database, the target APN can be matched in the preset APN database through a data profile manager DPM component according to the target APN tag.
[0081] For example, Figure 4 As shown, after reading the APN index field from the target request message, the DNC can search the preset APN database through the DPM based on the APN index field to match the target APN. The DPM maintains the mapping relationship between the APN tag and the APN, so that the DPM can search for the target APN corresponding to the target APN tag according to the APN index field of the current target APN tag through the mapping relationship, and then after matching the data configuration file of the target APN in the preset APN database, the target APN can be returned to the DNC, thereby matching the target APN corresponding to the target APN tag from the preset APN database. This is just an example, and the present disclosure is not limited to this.
[0082] In this way, after the target APN is determined, a target APN link corresponding to the target request message can be established according to the target APN. Figure 4 As shown, the DNC initiates a data call using the data profile of the matching target APN and establishes a network connection with the target APN specified by the APN index field.
[0083] After the data network connection is successfully established, Figure 4As shown in the figure, the driver layer of the software framework will return information such as IP address, gateway, DNS (Domain Name System). This information will be updated to the link properties (LinkProperties) in NetworkAgent through the NetworkAgent callback (NetworkAgent Callback). The connection service also holds a reference to NetworkAgent. When LinkProperties is updated, the connection service can obtain the latest IP address, DNS and other information. The connection service will notify the connection manager through the callback that the data connection is ready and contains the latest link property information.
[0084] The DPM component is used to manage the mapping relationship between the APN tag and the APN; in the present disclosure, if the mapping relationship does not include the target APN corresponding to the target APN tag, the target APN can be added according to the target APN tag. For example, a target APN configuration file can be obtained from a preset APN database according to the target APN tag; and the target APN can be added according to the target APN configuration file.
[0085] After adding the target APN corresponding to the target APN tag, you can add the target APN in the preset APN settings component (such as Figure 4 MI_APN2, MI_APN3, etc.).
[0086] Figure 5 is based on Figure 2 The embodiment shown is a flowchart of another network connection method, such as Figure 5 As shown, the method further comprises the following steps:
[0087] In step S204, in response to obtaining a disconnection request for the target APN link, the target APN link is disconnected after the multi-APN controller component calls a preset network deregistration interface to transmit the target request message.
[0088] For example, the preset network deregistration interface may include an unregisterNetworkCallback() interface on the connection manager. In this way, the multi-APN controller component may cancel the corresponding data network request by calling the unregisterNetworkCallback() interface of ConnectivityManager and passing in the corresponding NetworkRequest instance, thereby disconnecting the target APN link of the specified APN index field.
[0089] Figure 6is a block diagram of a network connection device according to an exemplary embodiment. Figure 6 As shown, the device comprises:
[0090] The first determination module 601 is configured to, in response to obtaining a network request message of a target service type, determine a target access point name APN tag according to the target service type, wherein the target APN tag is used to indicate an APN corresponding to the network request message;
[0091] The second determination module 602 is configured to determine the target APN link corresponding to the network request message according to the target APN tag; the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links;
[0092] The connection module 603 is configured to perform a network connection through the target APN link.
[0093] Optionally, the second determination module 602 is configured to add the target APN tag to the network request message to obtain a target request message; and determine the target APN link according to the target request message.
[0094] Optionally, the target APN tag includes an APN index field, and the second determination module 602 is configured to obtain the target request message after adding the APN index field to a preset network request class that describes the network request message through a multi-APN controller component pre-constructed in the application framework layer, and the multi-APN controller component is used to manage multiple Internet-type APN links.
[0095] Optionally, the second determination module 602 is configured to read the target APN tag in the target request message; match the target APN corresponding to the target APN tag from a preset APN database; and establish the target APN link corresponding to the target request message according to the target APN.
[0096] Optionally, the second determination module 602 is configured to match the target APN in the preset APN database through a data profile manager DPM component according to the target APN tag.
[0097] Optionally, the DPM component is used to manage the mapping relationship between APN tags and APNs; the second determination module 602 is further configured to add the target APN according to the target APN tag if the mapping relationship does not include the target APN corresponding to the target APN tag.
[0098] Optionally, the second determination module 602 is configured to obtain a target APN configuration file from a preset APN database according to the target APN tag; and add the target APN according to the target APN configuration file.
[0099] Optionally, Figure 7 is based on Figure 6 The block diagram of another network connection device shown in the embodiment shown in FIG. Figure 7 As shown, the device also includes:
[0100] The network disconnection module 604 is configured to disconnect the target APN link in response to obtaining a disconnection request for the target APN link, after the multi-APN controller component calls a preset network deregistration interface to transmit the target request message, and then disconnect the target APN link.
[0101] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0102] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, and the program instructions, when executed by a processor, implement the steps of the network connection method provided by the present disclosure.
[0103] Figure 8 8 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc., which deploy an Android system.
[0104] Reference Figure 8 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0105] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned network connection method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0106] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0107] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0108] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0109] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0110] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0111] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0112] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0113] In an exemplary embodiment, the device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned network connection method.
[0114] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to complete the above network connection method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0115] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above network connection method when executed by the programmable device.
[0116] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0117] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A network connection method, characterized in that: include: In response to obtaining a network request message of a target service type, determining a target access point name APN tag according to the target service type, where the target APN tag is used to indicate an APN corresponding to the network request message; Determine the target APN link corresponding to the network request message according to the target APN tag; the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links; A network connection is established through the target APN link.
2. The method according to claim 1, characterized in that The determining, according to the target APN tag, the target APN link corresponding to the network request message comprises: Add the target APN tag to the network request message to obtain a target request message; The target APN link is determined according to the target request message.
3. The method according to claim 2, characterized in that The target APN tag includes an APN index field, and adding the target APN tag to the network request message to obtain the target request message includes: By pre-building a multi-APN controller component in the application framework layer, the target request message is obtained after adding the APN index field to the preset network request class describing the network request message. The multi-APN controller component is used to manage multiple Internet-type APN links.
4. The method according to claim 2, characterized in that: The determining the target APN link according to the target request message comprises: Reading the target APN tag in the target request message; Match the target APN corresponding to the target APN tag from a preset APN database; The target APN link corresponding to the target request message is established according to the target APN.
5. The method according to claim 4, characterized in that The matching of the target APN corresponding to the target APN tag from the preset APN database includes: The target APN is matched in the preset APN database through a data profile manager DPM component according to the target APN tag.
6. The method according to claim 5, characterized in that The DPM component is used to manage the mapping relationship between the APN tag and the APN; the method also includes: If the mapping relationship does not include the target APN corresponding to the target APN tag, the target APN is added according to the target APN tag.
7. The method according to claim 6, characterized in that The adding the target APN according to the target APN tag includes: Obtain a target APN configuration file from a preset APN database according to the target APN tag; The target APN is added according to the target APN configuration file.
8. The method according to claim 3, characterized in that The method further comprises: In response to obtaining a disconnection request for the target APN link, the target APN link is disconnected after the target request message is transmitted through the multi-APN controller component by calling a preset network deregistration interface.
9. A network connection device, characterized in that: include: A first determination module is configured to, in response to obtaining a network request message of a target service type, determine a target APN tag according to the target service type, wherein the target APN tag is used to indicate an APN corresponding to the network request message; A second determination module is configured to determine a target APN link corresponding to the network request message according to the target APN tag; the target APN link is an APN link extended according to the target service type, and network request messages of different service types correspond to different APN links; The connection module is configured to perform a network connection through the target APN link.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: execute the steps of the network connection method described in any one of claims 1-8.
11. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method for accessing packet data network service, system, gateway and terminal
CN101686191A
Network access method and device
CN107333327A
Voice call method, device and system
CN110149721A
Communication method of vehicle-mounted terminal, vehicle-mounted terminal and storage medium
CN115643273A
Access point dual-online network establishment method and device, electronic equipment and medium
CN116506974A