Connection method, device and equipment of wireless network and storage medium
By establishing an information table in the terminal operating system to determine whether an application has permission to connect to the target device, the problem of data leakage during Bluetooth connection is solved, and a secure network connection is achieved.
Patent Information
- Application Number
- CN202210261181.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2042-03-16
AI Technical Summary
During Bluetooth connection, existing technologies are prone to the leakage of personal information data.
By establishing an information table in the terminal operating system to record the network connection information between the target device and the application, it can determine whether the application has permission to establish a network connection with the target device and only connect when the application has the necessary permissions, thus preventing unnecessary or malicious connection requests.
It effectively prevents data leakage during wireless network connection and protects user data security.
Smart Images

Figure CN116801245B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of wireless network technology, and in particular to a wireless network connection method, apparatus, device, and storage medium. Background Technology
[0002] With the development of wireless network technology, especially short-range wireless network technology, such as Bluetooth, Bluetooth technology has entered our daily lives due to its convenience, speed, and low cost. Bluetooth is ubiquitous in offices, schools, and homes. Bluetooth is one of the most widely used wireless communication protocols, primarily designed for short-range communication. Its advantages include low power consumption and relatively fast transmission speed. It is a standard feature in almost every mobile phone and is often used to connect headphones, wearable peripherals, and other devices to mobile phones. However, in this process, when one application on a mobile phone needs to connect to a Bluetooth peripheral, after the application initiates a connection and pairing with the peripheral, other applications on the phone can also directly connect to the Bluetooth peripheral and exchange data. This process can easily lead to the leakage of personal information.
[0003] Therefore, how to prevent data leakage during wireless network connection is an urgent problem to be solved. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this disclosure provides a wireless network connection method, apparatus, device, and storage medium.
[0005] According to a first aspect of the present disclosure, a wireless network connection method is provided, applied to a terminal, the connection method comprising:
[0006] Receive a connection request to establish a network connection with the target device, the connection request being sent by the first application through a preset application programming interface;
[0007] Determine whether the first application has permission to establish a network connection with the target device;
[0008] If so, establish a network connection between the first application and the target device.
[0009] In an exemplary embodiment, determining whether the first application has permission to establish a network connection with the target device includes:
[0010] Determine whether the connection request is the first connection request from the terminal to establish a network connection with the target device;
[0011] If so, determine that the first application has permission to establish a network connection with the target device.
[0012] In an exemplary embodiment, determining whether the connection request is the first connection request by the terminal to establish a network connection with the target device includes:
[0013] Query the information table, which includes network connection information of the target device and the terminal's applications;
[0014] If the network connection information of the target device and the terminal application in the information table is empty, then the connection request is determined to be the first connection request for the terminal to establish a network connection with the target device.
[0015] In one exemplary embodiment, the connection method further includes:
[0016] After the first application establishes a network connection with the target device, the information table is updated.
[0017] In an exemplary embodiment, determining whether the first application has permission to establish a network connection with the target device includes:
[0018] If the connection request is not the first time the terminal has established a network connection with the target device, determine whether the information table includes the network connection information between the first application and the target device;
[0019] If included, it is determined that the first application has the authority to establish a network connection with the target device.
[0020] In an exemplary embodiment, the connection request is a connection request from the terminal to establish a network connection with the target device that is not the first time, including:
[0021] Query the aforementioned information table;
[0022] If the information table includes network connection information of the target device and the terminal's applications, then the connection request is determined to be a connection request from the terminal to establish a network connection with the target device that is not the first time.
[0023] In one exemplary embodiment, the connection method further includes:
[0024] Set the first application in the information table that establishes a network connection with the target device as the administrator of the information table.
[0025] According to a second aspect of the present disclosure, a wireless network connection method is provided, applied to a terminal, the connection method comprising:
[0026] Send a connection request to establish a network connection with the target device through a preset application programming interface;
[0027] Receive a first response message, which includes either a response message indicating that a network connection has been established with the target device or a response message indicating that a network connection has been refused to be established with the target device.
[0028] In an exemplary embodiment, when the first response message includes response information refusing to establish a network connection with the target device, the connection method further includes:
[0029] Query the information table to determine the administrator of the information table;
[0030] Send an access request to the administrator of the information table;
[0031] Receive a second response message authorizing the establishment of a network connection with the target device;
[0032] The system sends a connection request to the target device again through a preset application programming interface to establish a network connection with the target device.
[0033] In one exemplary embodiment, the connection method further includes:
[0034] Receive permission request, the permission request being a permission request sent by the second application to establish a network connection with the target device;
[0035] Whether to allow the second application to establish a network connection with the target device is determined according to preset rules.
[0036] In one exemplary embodiment, the connection method further includes:
[0037] If the second application is allowed to establish a network connection with the target device, the information table is updated.
[0038] According to a third aspect of the present disclosure, a wireless network connection device is provided, the connection device comprising:
[0039] First receiving module: configured to receive connection requests to establish a network connection with the target device, the connection requests being sent by the first application through a preset application programming interface;
[0040] First determining module: configured to determine whether the first application has permission to establish a network connection with the target device;
[0041] Connection module: configured to establish a network connection between the first application and the target device, if applicable.
[0042] According to a fourth aspect of the present disclosure, a wireless network connection device is provided, applied to a terminal, the device comprising:
[0043] Sending module: Configured to send a connection request to establish a network connection with the target device through a preset application programming interface;
[0044] The second receiving module is configured to receive a first response message, which includes response information indicating that a network connection has been established with the target device or response information indicating that a network connection has been refused to be established with the target device.
[0045] According to a fifth aspect of the present disclosure, a terminal device is provided, comprising:
[0046] processor;
[0047] Memory used to store processor-executable instructions;
[0048] The processor is configured to perform any wireless network connection method provided in the first aspect of the embodiments of this disclosure.
[0049] According to a sixth aspect of the present disclosure, a terminal device is provided, comprising:
[0050] processor;
[0051] Memory used to store processor-executable instructions;
[0052] The processor is configured to perform any wireless network connection method provided in the second aspect of the embodiments of this disclosure.
[0053] According to a seventh aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal is able to perform any wireless network connection method provided in the first aspect of the present disclosure.
[0054] According to an eighth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to perform any wireless network connection method provided in the second aspect of the present disclosure.
[0055] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects: The terminal's operating system establishes an information table of network connection information between the terminal's application and the target device. By querying the information table, it is determined whether the terminal's application has permission to establish a network connection with the target device. When it has permission to establish a network connection with the target device, the network connection between the terminal's application and the target device is established. This can avoid unnecessary connection requests or malicious connection requests from the terminal's application, prevent data leakage during the wireless network connection process, and effectively protect user data security.
[0056] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0057] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0058] Figure 1 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment;
[0059] Figure 2 This is a flowchart illustrating a method for determining whether a first application has permission to establish a network connection with a target device, according to an exemplary embodiment.
[0060] Figure 3 This is a flowchart illustrating a method for determining whether a connection request is a connection request for the first time a terminal establishes a network connection with a target device, according to an exemplary embodiment.
[0061] Figure 4 This is a flowchart illustrating a method for determining whether a first application has permission to establish a network connection with a target device, according to an exemplary embodiment.
[0062] Figure 5 This is a flowchart illustrating a method for establishing a network connection between a terminal and a target device for a non-first-time connection request, according to an exemplary embodiment.
[0063] Figure 6 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment;
[0064] Figure 7 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment;
[0065] Figure 8 This is a wireless network connection method illustrated according to an exemplary embodiment;
[0066] Figure 9 This is a schematic diagram illustrating a wireless network connection method using Bluetooth as an example, according to an exemplary embodiment.
[0067] Figure 10 This is a schematic diagram illustrating a wireless network connection method using Bluetooth as an example, according to an exemplary embodiment.
[0068] Figure 11 This is a wireless network connection device illustrated according to an exemplary embodiment;
[0069] Figure 12 This is a wireless network connection device illustrated according to an exemplary embodiment;
[0070] Figure 13 This is a block diagram illustrating a wireless network connection device according to an exemplary embodiment. Detailed Implementation
[0071] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0072] In the exemplary embodiments of this disclosure, a wireless network connection method is provided, applied to a terminal. The terminal includes electronic devices with Bluetooth connectivity, such as smartphones, tablets, and computers. The terminal includes an operating system, such as Android or HarmonyOS. Bluetooth technology is an open global standard for wireless data and voice communication. It is based on low-cost short-range wireless connectivity and is a special short-range wireless network connection technology. The embodiments in this disclosure use Bluetooth connection as an example. Figure 1 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment, such as... Figure 1 As shown, the wireless network connection method includes the following steps:
[0073] Step S101: Receive a connection request to establish a network connection with the target device. The connection request is sent by the first application through a preset application programming interface.
[0074] Step S102: Determine whether the first application has permission to establish a network connection with the target device;
[0075] Step S103: If so, establish a network connection between the first application and the target device.
[0076] In an exemplary embodiment of this disclosure, a first application sends a connection request to establish a wireless network connection with a target device through a preset application programming interface (API). A terminal, such as its operating system, receives the connection request and determines whether the first application has permission to establish a network connection with the target device. If it does, the terminal establishes the network connection between the first application and the target device. Alternatively, the first application may send a connection request to the terminal's operating system through the preset API to establish a wireless network connection, such as a Bluetooth connection, with the target device. The terminal's operating system determines whether the first application has permission to establish a network connection with the target device; if it does, it establishes a Bluetooth network connection between the first application and the target device.
[0077] By setting up a wireless network connection method through a pre-defined application programming interface, a new wireless network connection method can be implemented while maintaining compatibility with existing methods. In this method, when a terminal application connects to the device, the system determines whether the application has connection permissions to prevent data leakage and protect user data security.
[0078] In step S101, a connection request to establish a network connection with the target device is received. The connection request is sent by the first application through a preset application programming interface.
[0079] The first application in the terminal can choose to use the network connection method disclosed herein through a preset application programming interface, or it can choose not to use the preset application programming interface and use the existing wireless network connection method.
[0080] Step S102: Determine whether the first application has permission to establish a network connection with the target device.
[0081] After receiving a connection request from the first application to establish a network connection with the target device, the terminal's operating system determines whether the first application has permission to establish a network connection with the target device, so as to ensure that the network connection between the terminal and the target device is in a secure connection state.
[0082] Step S103: If so, establish a network connection between the first application and the target device.
[0083] If the first application has permission to establish a network connection with the target device, the terminal's operating system sends a connection request to the target device and receives a response from the target device to complete the network connection between the first application and the target device. The response may contain information related to establishing the network connection with the target device, such as the target device's ID, name, and physical address. If the first application does not have permission to establish a network connection with the target device, the terminal refuses to establish a network connection between the first application and the target device.
[0084] In the exemplary embodiments of this disclosure, an independent wireless network connection method is set up through a preset application programming interface. This method is compatible with the original wireless network connection method while implementing a new wireless network connection method. In this method, when the terminal receives a connection request from the first application to connect to the target device, and it is determined that the first application has connection permissions, a network connection is established between the first application and the target device. This can prevent application data leakage and effectively protect user data security.
[0085] In an exemplary embodiment of this disclosure, a method is provided for determining whether a first application has permission to establish a network connection with a target device. Figure 2 This is a flowchart illustrating a method for determining whether a first application has permission to establish a network connection with a target device, according to an exemplary embodiment:
[0086] Step S1021: Determine whether the connection request is a connection request for the terminal to establish a network connection with the target device for the first time;
[0087] Step S1022: If yes, determine that the first application has permission to establish a network connection with the target device.
[0088] When a connection request is received from the first application to establish a wireless network connection with the target device, the terminal's operating system determines whether the connection request is the terminal's first attempt to establish a network connection with the target device. If the connection request is the terminal's first attempt to establish a network connection with the target device, it means that no other application on the terminal has established a network connection with the target device. In this case, the network connection between the first application and the target device can be considered secure, not an unnecessary or malicious connection request. Therefore, it can be determined that the first application has the authority to establish a network connection with the target device. If the connection request is not the terminal's first attempt to establish a network connection with the target device, it means that other applications on the terminal are currently establishing a network connection with the target device, or other applications have previously established a network connection with the target device. In this case, the first application is not the first application on the terminal to establish a network connection with the target device. To avoid potential network security issues after the first application establishes a network connection with the target device, it is necessary to reconfirm whether the application has the authority to establish a network connection with the target device.
[0089] In the exemplary embodiments of this disclosure, by determining whether the connection request is the first connection request for the terminal to establish a network connection with the target device for the first time, it is possible to determine whether the first application can establish a network connection with the target device, that is, whether it has the authority to establish a network connection with the target device, thereby avoiding the problem of user data leakage.
[0090] In an exemplary embodiment of this disclosure, a method is provided for determining whether a connection request is a connection request for the first time a terminal establishes a network connection with a target device. Figure 3 This is a flowchart illustrating a method for determining whether a connection request is a connection request for the first time between a terminal and a target device, according to an exemplary embodiment:
[0091] Step S10211: Query the information table, which includes network connection information of the target device and the terminal application;
[0092] Step S10212: If the network connection information of the target device and the terminal application in the information table is empty, then determine that the connection request is the first connection request for the terminal to establish a network connection with the target device.
[0093] In step S10211, an information table is queried, which includes network connection information of the target device and the terminal application.
[0094] When a connection request is received from the first application to establish a wireless network connection with the target device, it is determined whether the connection request is the first time the terminal has established a network connection with the target device. This determination can be made using any deterministic method. For example, an information table can be set up in the terminal's operating system. This information table stores network connection information between the target device and the terminal's applications. When the terminal has not established a network connection with the target device, the network connection information between the target device and the terminal's applications in the information table is empty. By querying the information table, it is determined whether the connection request is the first time the terminal has established a network connection with the target device. To facilitate querying the information table, it can be stored in key-value pair format. The key is a unique identifier and can be the target device's MAC address (Media Access Control Address, physical address) or IP address (Internet Protocol Address, network protocol address), etc. In this embodiment, the MAC address is used as the key. The value is the corresponding value of the key, and there can be multiple values. Information that uniquely identifies the application, such as the application's identifier, packet name, or signature, can be used as the value. In this embodiment, the application's identifier is used as the value. The network connection information between the target device and the terminal application is the mapping between the target device's MAC address and the terminal application's identifier. When querying the information table, the query is performed using the target device's MAC address to find the corresponding value.
[0095] In step S10212, if the network connection information of the target device and the terminal application in the information table is empty, then the connection request is determined to be the first connection request between the target device and the terminal to establish a network connection.
[0096] If the network connection information between the target device and the terminal application in the information table is empty, that is, the MAC address of the target device cannot be found, or the value corresponding to the MAC address of the target device is empty, it indicates that the terminal application has not connected with the target device. This means that the connection request is the first connection request for the terminal to establish a network connection with the target device. Alternatively, it means that the network connection information between the target device and the terminal application in the information table has been deleted, which also means that the connection request is the first connection request for the terminal to establish a network connection with the target device.
[0097] In the exemplary embodiments of this disclosure, the terminal establishes an information table including network connection information of the target device and the terminal's applications. By querying whether the network connection information of the target device and the terminal's applications in the information table is empty, if it is empty, it can be determined that the terminal's applications have not established a network connection with the target device, that is, the connection request is determined to be the first connection request between the target device and the terminal to establish a network connection. Using an information table allows for convenient and quick querying of connection requests that indicate the target device is establishing a network connection with the terminal for the first time. At the same time, the information table can store a large amount of data and is also easy to edit and modify.
[0098] In an exemplary embodiment of this disclosure, the provided wireless network connection method further includes: after the first application establishes a network connection with the target device, the terminal's operating system updates the information table.
[0099] Upon receiving a connection request from the first application to establish a network connection with the target device, if it is determined that the first application has the authority to establish a network connection with the target device, the terminal establishes a network connection between the first application and the target device. After establishing the network connection with the target device, the terminal's operating system updates the information in the information table, updating the correspondence between the target device information and the first application information to the information table, that is, the MAC address of the target device corresponds to the identifier code of the first application.
[0100] When a terminal establishes a network connection with a target device for the first time, the terminal's operating system updates the information table. Specifically, the operating system updates the information table with the network connection information of the application that first established a network connection with the target device, and sets the application that first established a network connection with the target device as the administrator.
[0101] In an exemplary embodiment of this disclosure, a method is provided for determining whether a first application has permission to establish a network connection with a target device. Figure 4 This is a flowchart illustrating a method for determining whether a first application has permission to establish a network connection with a target device, according to an exemplary embodiment. Figure 4 As shown, it includes the following steps:
[0102] Step S1121: If the connection request is a connection request that the terminal has not established a network connection with the target device for the first time, determine whether the information table includes the network connection information between the first application and the target device;
[0103] Step S1122: If included, then determine that the first application has permission to establish a network connection with the target device.
[0104] When the terminal's operating system determines whether the first application has permission to establish a network connection with the target device, it queries an information table. If the network connection information between the target device and the terminal's application in the information table is not empty (for example, the target device's MAC address can be found), and the information table includes the target device's MAC address, it indicates that the connection request is not the first time the terminal has established a network connection with the target device. At this point, it determines whether the information table includes the network connection information between the first application and the target device, i.e., whether the value corresponding to the target device's MAC address includes the first application's identifier. If the value corresponding to the target device's information in the information table includes the first application's identifier, it indicates that the first application has previously established a network connection with the target device, and therefore, it is determined that the first application has permission to establish a network connection with the target device.
[0105] When the terminal and the target device are not establishing a network connection for the first time, the system determines whether the first application has the authority to establish a network connection with the target device by checking whether the application corresponding to the target device in the information table is the first application. Based on the fact that the first application has established a network connection with the target device before, the system can determine whether the first application has the authority to establish a network connection with the target device again.
[0106] In an exemplary embodiment of this disclosure, a method is provided for a connection request that is not the first time a terminal has established a network connection with a target device. Figure 5 This is a flowchart illustrating a method for establishing a network connection between a terminal and a target device for a non-first-time connection request, according to an exemplary embodiment. Figure 5 As shown, it includes the following steps:
[0107] Step S11211: Query the information table;
[0108] Step S11212: If the information table includes network connection information of the target device and the terminal's application, then determine that the connection request is a connection request that is not the first time the terminal has established a network connection with the target device.
[0109] When the terminal's operating system receives a connection request from a first application to establish a wireless network connection with the target device, it determines whether the connection request is not the terminal's first attempt to establish a network connection with the target device. This is done by querying an information table to determine if the connection request is not the terminal's first attempt at establishing a network connection with the target device. Specifically, it involves querying the target device's MAC address to see if it includes the corresponding application's identifier. If the information table includes network connection information between the target device and the terminal's application (i.e., the target device's MAC address can be found, and the corresponding application's identifier is included), it indicates that the terminal's application has previously established a network connection with the target device, thus confirming that the connection request is not the terminal's first attempt to establish a network connection with the target device.
[0110] By identifying the network connection information of the target device and the terminal's application in the information table, it is possible to determine whether the connection request is a non-first-time connection request between the terminal and the target device. This allows for convenient and quick identification of the connection request as a non-first-time connection request between the terminal and the target device based on the information table.
[0111] In an exemplary embodiment of this disclosure, the wireless network connection method further includes setting the first application recorded in the information table that establishes a network connection with the target device as the manager of the information table.
[0112] When a terminal establishes a connection with a target device for the first time, the terminal's operating system updates the network connection information of the application that first established the network connection to the target device into an information table, and sets the application that first established the network connection to the target device as the administrator. The administrator of the information table has the authority to modify the information table. As more applications with the authority to establish network connections to the target device are updated into the table, they are listed sequentially after the application that first established the network connection to the target device, i.e., the application that first established the network connection to the target device is listed first. In subsequent operations, if the application that first established the network connection to the target device no longer has the authority to establish a network connection to the target device, its network connection information is deleted from the information table. Then, the terminal's operating system sets the first application that first established the network connection to the target device in the information table as the administrator, for example, the second application that secondly established the network connection to the target device is set as the administrator, thus enabling application-based management of network connections to the target device.
[0113] In an exemplary embodiment of this disclosure, a wireless network connection method is provided, applied to a terminal, the terminal including applications in an electronic device with Bluetooth connectivity. Figure 6 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment:
[0114] Step S201: Send a connection request to establish a network connection with the target device through a preset application programming interface;
[0115] Step S202: Receive a first response message, which includes response information indicating that a network connection has been established with the target device or response information indicating that a network connection with the target device has been refused.
[0116] Applications on the terminal can call a preset application programming interface (API) to select the network connection method disclosed herein, or they can use the existing wireless network connection method without using the preset API. When an application on the terminal sends a connection request to establish a network connection with a target device through the preset API, the terminal's operating system scans the target device, processes the connection request information, determines whether the application on the terminal has permission to establish a network connection with the target device, and sends a first response message to the application on the terminal.
[0117] The terminal application receives a first response message, which includes either a response indicating that a network connection has been established with the target device or a response indicating that the network connection has been refused. When the terminal application has permission to establish a network connection with the target device, the terminal's operating system establishes the network connection, and the first response message received by the terminal application is one indicating that a network connection has been established. When the terminal application does not have permission to establish a network connection with the target device, the terminal's operating system refuses to establish the network connection, and the first response message received by the terminal application is one indicating that the network connection has been refused.
[0118] By sending connection request information through a pre-defined application programming interface, a new wireless network connection method can be implemented while maintaining compatibility with existing wireless network connection methods. The first response information determines whether a network connection can be established with the target device, thus avoiding data leakage issues and effectively protecting user data security.
[0119] In an exemplary embodiment of this disclosure, a wireless network connection method is provided when the first response message includes response information refusing to establish a network connection with the target device. Figure 7 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment:
[0120] Step S301: Query the information table to determine the administrator of the information table;
[0121] Step S302: Send an access request to the administrator of the information table;
[0122] Step S303: Receive a second response message allowing the establishment of a network connection with the target device;
[0123] Step S304: Send a connection request to establish a network connection with the target device again through the preset application programming interface to establish a network connection with the target device.
[0124] When the first response message includes a response indicating a refusal to establish a network connection with the target device, it means that the terminal application does not have permission to establish a network connection with the target device. This means the application's identifier corresponding to the target device's MAC address is not present in the information table. In this case, the terminal application queries the information table to determine its administrator. The administrator of the information table has the authority to modify the information table, and can add or delete the application's identifier corresponding to the target device's MAC address.
[0125] After the administrator of the information table is determined, the terminal application sends a permission request to the administrator. The administrator determines whether to allow the network connection with the target device and sends a second response message to the terminal application. When the administrator allows the terminal application to establish a network connection with the target device, the administrator writes the terminal application's identifier into the application information corresponding to the MAC address of the target device in the information table. The terminal application receives the second response message from the administrator allowing the network connection with the target device. At this time, when the terminal application can send a connection request to establish a network connection with the target device again through the preset application programming interface, the terminal's operating system establishes a network connection between the terminal application and the target device. When the administrator does not allow the network connection with the target device, the terminal application receives the second response message from the administrator disallowing the network connection with the target device, and the terminal application cannot establish a network connection with the target device.
[0126] In the exemplary embodiments of this disclosure, the terminal application queries the information table to determine the administrator of the information table, and sends permission request information to the administrator. Only when the administrator of the information table allows the terminal application to establish a network connection with the target device can the terminal application establish a network connection with the target device, which can effectively avoid unnecessary or malicious connections from other applications on the terminal.
[0127] In the exemplary embodiments of this disclosure, Figure 8 This is a flowchart illustrating a wireless network connection method according to an exemplary embodiment:
[0128] Step S401: Receive permission request, which is a permission request sent by the second application to establish a network connection with the target device;
[0129] Step S402: Determine whether to allow the second application to establish a network connection with the target device according to preset rules.
[0130] After the terminal application establishes a network connection with the target device, the terminal application's identifier will appear in the corresponding position of the target device information in the information table. When the terminal application is the administrator of the information table, it will receive a permission request from a second application to establish a network connection with the target device. At this time, the terminal application will determine whether to allow the second application to establish a network connection with the target device according to preset rules. The preset rules can be set as needed, for example, whether the second application and the terminal application acting as the information table administrator belong to the same type of application, or they can be set by the user according to their personal needs.
[0131] In the exemplary embodiments of this disclosure, setting the management permissions of the information table on the application side allows the terminal application to manage the network connection with the target device without requiring management by the terminal's operating system. This reduces the involvement of the terminal's operating system, simplifies the processing flow, and increases the application's autonomy over the network connection with the target device.
[0132] In an exemplary embodiment of this disclosure, the wireless network connection method further includes: updating the information table if the second application is allowed to establish a network connection with the target device.
[0133] After receiving a permission request from a second application, if the administrator of the information table allows the second application to establish a network connection with the target device, they update the information in the information table, writing the second application's information into the application information corresponding to the target device's information. Specifically, the second application's identifier is written in the location corresponding to the target device's MAC address. Timely updates to the information table ensure that the terminal's applications are authorized to establish a network connection with the target device.
[0134] In the exemplary embodiments of this disclosure, the terminal's operating system establishes an information table of network connection information between the terminal's application and the target device. By querying the information table, it determines whether the terminal's application has permission to establish a network connection with the target device. When it has permission to establish a network connection with the target device, the network connection between the terminal's application and the target device is established. This can avoid unnecessary or malicious connection requests from the terminal's application, prevent data leakage during the wireless network connection process, and effectively protect user data security.
[0135] This disclosure provides a specific embodiment where App A represents terminal application A, App B represents terminal application B, the operating system is the terminal's operating system, and the wireless network connection method is exemplified by the Bluetooth connection method.
[0136] Figure 9 This is a schematic diagram illustrating a wireless network connection method using Bluetooth as an example, according to an exemplary embodiment. Figure 9As shown, the Bluetooth connection methods include:
[0137] App A sends a connection request to establish a Bluetooth connection with the target device through a preset application programming interface;
[0138] The operating system receives a connection request to establish a Bluetooth connection with the target device;
[0139] The operating system queries the information table, which includes Bluetooth connection information between the target device and the terminal application;
[0140] If the Bluetooth connection information of the target device and the terminal application in the information table is empty, then the connection request is determined to be the first Bluetooth connection request between the terminal and the target device.
[0141] Ensure that App A has permission to establish a Bluetooth connection with the target device;
[0142] Establish a Bluetooth connection between App A and the target device, update the information table, and set App A as the administrator of the information table;
[0143] App A receives the first response message, which is a response message indicating that a Bluetooth connection has been established with the target device.
[0144] App B sends a connection request to establish a Bluetooth connection with the target device through a preset application programming interface;
[0145] The operating system receives a connection request to establish a Bluetooth connection with the target device;
[0146] If the operating system queries the information table and the information table does not contain Bluetooth connection information between the target device and App B, then it is determined that App B does not have permission to establish a Bluetooth connection with the target device.
[0147] Send a connection refused response message to AppB.
[0148] In this embodiment, App B is not allowed to connect to the target device.
[0149] Figure 10 This is a schematic diagram illustrating a wireless network connection method using Bluetooth as an example, according to an exemplary embodiment. Figure 10 As shown, the Bluetooth connection methods include:
[0150] App A sends a connection request to establish a Bluetooth connection with the target device through a preset application programming interface;
[0151] The operating system receives a connection request to establish a Bluetooth connection with the target device;
[0152] The operating system queries the information table, which includes Bluetooth connection information between the target device and the terminal application;
[0153] If the Bluetooth connection information of the target device and the terminal application in the information table is empty, then the connection request is determined to be the first Bluetooth connection request between the terminal and the target device.
[0154] Ensure that App A has permission to establish a Bluetooth connection with the target device;
[0155] Establish a Bluetooth connection between App A and the target device, update the information table, and set App A as the administrator of the information table;
[0156] App A receives the first response message, which is a response message indicating that a Bluetooth connection has been established with the target device.
[0157] App B sends a connection request to establish a Bluetooth connection with the target device through a preset application programming interface;
[0158] The operating system receives a connection request to establish a Bluetooth connection with the target device;
[0159] If the operating system queries the information table and finds that the Bluetooth connection information between the target device and App B is not included in the information table, it will determine that App B does not have permission to establish a Bluetooth connection with the target device and will send a connection refusal response message.
[0160] App B receives a response message, which is a response message indicating a refusal to establish a Bluetooth connection with the target device.
[0161] App B queries the information table and determines that App A is the administrator of the information table;
[0162] App B sends a permission request to App A;
[0163] App A receives a permission request, determines that App B is allowed to establish a network connection with the target device, and updates App B's information in the information table;
[0164] App B receives a second response message allowing the establishment of a network connection with the target device;
[0165] App B sends a connection request to establish a network connection with the target device again through the preset application programming interface;
[0166] The operating system receives a connection request to establish a Bluetooth connection with the target device;
[0167] The operating system queries the information table, which includes Bluetooth connection information between the target device and App B;
[0168] Ensure that App B has permission to establish a Bluetooth connection with the target device;
[0169] Establish a Bluetooth connection between App B and the target device;
[0170] App B receives a response message indicating that a Bluetooth connection has been established with the target device.
[0171] In this embodiment, App B completes the connection with the target device.
[0172] In the exemplary embodiments of this disclosure, Figure 11 This is a wireless network connection device illustrated according to an exemplary embodiment, such as... Figure 11 As shown, the device includes:
[0173] First receiving module 901: configured to receive a connection request to establish a network connection with a target device, the connection request being sent by a first application through a preset application programming interface;
[0174] First determining module 902: configured to determine whether the first application has permission to establish a network connection with the target device;
[0175] Connection module 903: configured to establish a network connection between the first application and the target device if applicable.
[0176] In the exemplary embodiments of this disclosure, Figure 12 This is a wireless network connection device illustrated according to an exemplary embodiment, such as... Figure 12 As shown, the device includes:
[0177] Sending module 801: is configured to send a connection request to establish a network connection with the target device through a preset application programming interface;
[0178] The second receiving module 802 is configured to receive a first response message, the first response message including response information indicating that a network connection has been established with the target device or response information indicating that a network connection has been refused to be established with the target device.
[0179] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0180] Figure 13 This is a block diagram illustrating a wireless network connection device 700 according to an exemplary embodiment. (Refer to...) Figure 13The device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.
[0181] Processing component 702 typically controls the overall operation of device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.
[0182] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 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 storage, flash memory, magnetic disk, or optical disk.
[0183] Power supply assembly 706 provides power to various components of device 700. Power supply assembly 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 700.
[0184] Multimedia component 708 includes a screen that provides an output interface between the device 700 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 touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0185] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
[0186] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0187] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of device 700. For example, sensor assembly 714 may detect the on / off state of device 700, the relative positioning of components such as the display and keypad of device 700, changes in the position of device 700 or a component of device 700, the presence or absence of user contact with device 700, the orientation or acceleration / deceleration of device 700, and temperature changes of device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.
[0188] Communication component 716 is configured to facilitate wired or wireless communication between device 700 and other devices. Device 700 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0189] In an exemplary embodiment, the apparatus 700 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 methods described above.
[0190] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory including instructions that can be executed by the processor 720 of the device 700 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0191] A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a terminal's processor, enables the terminal to perform any wireless network connection method provided in the exemplary embodiments of this disclosure.
[0192] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0193] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A wireless network connection method, applied to a terminal, characterized in that, The connection method includes: Receive a connection request to establish a network connection with the target device, the connection request being sent by the first application through a preset application programming interface; Based on the information table, it is determined whether the first application has permission to establish a network connection with the target device. The information table includes network connection information between the target device and the terminal's applications. The first application recorded in the information table to establish a network connection with the target device is the administrator of the information table. The administrator has the permission to modify the information table. The administrator is used to receive permission request sent by the first application when the first application is denied the right to establish a network connection with the target device. If so, establish a network connection between the first application and the target device.
2. The wireless network connection method according to claim 1, characterized in that, Determining whether the first application has permission to establish a network connection with the target device includes: Determine whether the connection request is the first connection request from the terminal to establish a network connection with the target device; If so, determine that the first application has permission to establish a network connection with the target device.
3. The wireless network connection method according to claim 2, characterized in that, Determining whether the connection request is the first connection request for the terminal to establish a network connection with the target device includes: Query the aforementioned information table; If the network connection information of the target device and the terminal application in the information table is empty, then the connection request is determined to be the first connection request for the terminal to establish a network connection with the target device.
4. The wireless network connection method according to claim 3, characterized in that, The connection method further includes: After the first application establishes a network connection with the target device, the information table is updated.
5. The wireless network connection method according to claim 3, characterized in that, Determining whether the first application has permission to establish a network connection with the target device includes: If the connection request is not the first time the terminal has established a network connection with the target device, determine whether the information table includes the network connection information between the first application and the target device; If included, it is determined that the first application has the authority to establish a network connection with the target device.
6. The wireless network connection method according to claim 3, characterized in that, The connection request is a connection request from the terminal to establish a network connection with the target device that is not the first time, including: Query the aforementioned information table; If the information table includes network connection information of the target device and the terminal's applications, then the connection request is determined to be a connection request from the terminal to establish a network connection with the target device that is not the first time.
7. The wireless network connection method according to claim 3, characterized in that, The connection method further includes: Set the first application in the information table that establishes a network connection with the target device as the administrator of the information table.
8. A wireless network connection method, applied to a terminal, characterized in that, The connection method includes: Send a connection request to establish a network connection with the target device through a preset application programming interface; A first response message is received. The first response message includes response information indicating that a network connection has been established with the target device or response information indicating that a network connection with the target device has been refused. The first response message is determined based on an information table, which includes network connection information between the target device and the terminal's applications. The first application recorded in the information table that has established a network connection with the target device is the administrator of the information table. The administrator has the authority to modify the information table. The administrator is used to receive a permission request sent by the first application when the first application is refused a network connection with the target device.
9. The wireless network connection method according to claim 8, characterized in that, When the first response message includes response information refusing to establish a network connection with the target device, the connection method further includes: Query the information table to determine the administrator of the information table; Send an access request to the administrator of the information table; Receive a second response message authorizing the establishment of a network connection with the target device; The system sends a connection request to the target device again through a preset application programming interface to establish a network connection with the target device.
10. The wireless network connection method according to claim 8, characterized in that, The connection method further includes: Receive permission request, the permission request being a permission request sent by the second application to establish a network connection with the target device; Whether to allow the second application to establish a network connection with the target device is determined according to preset rules.
11. The wireless network connection method according to claim 10, characterized in that, The connection method further includes: If the second application is allowed to establish a network connection with the target device, the information table is updated.
12. A wireless network connection device, applied to a terminal, characterized in that, The connecting device includes: First receiving module: configured to receive connection requests to establish a network connection with the target device, the connection requests being sent by the first application through a preset application programming interface; The first determining module is configured to determine, based on an information table, whether the first application has permission to establish a network connection with the target device. The information table includes network connection information between the target device and the terminal's applications. The first application recorded in the information table to establish a network connection with the target device is the administrator of the information table. The administrator has the permission to modify the information table. The administrator is used to receive permission request requests sent by the first application when the first application is denied the right to establish a network connection with the target device. Connection module: configured to establish a network connection between the first application and the target device, if applicable.
13. A wireless network connection device, applied to a terminal, characterized in that, The device includes: Sending module: Configured to send a connection request to establish a network connection with the target device through a preset application programming interface; The second receiving module is configured to receive a first response message, which includes either a response indicating that a network connection has been established with the target device or a response indicating that a network connection with the target device has been refused. The first response message is determined based on an information table, which includes network connection information between the target device and the terminal's applications. The first application recorded in the information table that has established a network connection with the target device is the administrator of the information table, and the administrator has the authority to modify the information table. The administrator is used to receive a permission request sent by the first application when the first application is refused a network connection with the target device.
14. A terminal device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the wireless network connection method as described in any one of claims 1-7.
15. A terminal device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the wireless network connection method as described in any one of claims 8-11.
16. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the wireless network connection method as described in any one of claims 1-7.
17. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of a mobile terminal, enable the mobile terminal to perform the wireless network connection method as described in any one of claims 8-11.
Citation Information
Patent Citations
Application interaction method and device
CN109218374A
Security architecture
CN1354947A
