Communication function management method, electronic equipment and vehicle
By setting independent communication paths for the STA and P2P functions of the WIFI chip, the problem of resource waste under the Android system is solved, and the communication efficiency of terminal devices is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-07
AI Technical Summary
Under the Android system architecture, the STA and P2P functions of the WIFI chip share a communication path during operation, resulting in resource waste and reduced efficiency.
By setting an independent communication path for each communication function, sharing processes is avoided, ensuring that each communication function runs independently, and a management method of multiple non-overlapping communication paths is adopted.
It enables independent activation and operation of each communication function, avoiding resource waste and improving the communication efficiency of terminal devices.
Smart Images

Figure CN121815298A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a communication function management method, electronic equipment, and vehicle. Background Technology
[0002] WiFi chips have various communication functions, such as STA (Station), AP (Access Point), and P2P (Peer-to-Peer) functions. In terminal devices, due to the architecture of the Android system, the STA and P2P functions of a WiFi chip share a communication path during operation. When only the STA or P2P function is running, the other function is affected and passively activated, leading to increased communication resource usage on the terminal device and resulting in resource waste. Summary of the Invention
[0003] In view of this, the purpose of this application is to propose a communication function management method, electronic device and vehicle to solve the problem of resource waste caused by the associated startup of two communication functions during operation.
[0004] To achieve the above objectives, this application provides a communication function management method applied to a terminal device, the terminal device comprising an application layer and a chip physical layer, the method comprising: In response to the application layer receiving a communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, and the communication path matching the communication function among multiple communication paths is determined as the first target communication path; The application layer sends the communication function activation instruction to the chip physical layer through the first target communication path, so that the chip physical layer activates the communication function; The multiple communication paths do not intersect with each other.
[0005] Furthermore, the method also includes: In response to the chip physical layer receiving the communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, and the communication mode matching the communication function is determined as the target communication mode among multiple communication modes; The chip's physical layer runs the target communication mode to activate the communication function.
[0006] Furthermore, the method also includes: In response to the chip physical layer receiving communication data sent by an external device, the communication function corresponding to the communication data is determined, and the communication path matching the communication function is determined as the second target communication path among multiple communication paths; The chip's physical layer sends the communication data to the application layer through the second target communication path.
[0007] Furthermore, the communication path includes a verification module; the method further includes: In response to the chip physical layer receiving data to be verified sent by an external device, the communication function corresponding to the data to be verified is determined, and the communication path matching the communication function is determined as the second target communication path among multiple communication paths; The chip physical layer sends the data to be verified to the verification module through the second target communication path, so that the verification module of the second target communication path can verify the data to be verified and obtain the verification result. The verification module sends the verification result to the application layer and the chip physical layer or the chip physical layer.
[0008] Furthermore, the method also includes: In response to the application layer receiving the data to be verified sent by the user, the communication function corresponding to the data to be verified is determined, and the communication path matching the communication function is determined as the first target communication path among multiple communication paths; The application layer sends the data to be verified to the chip physical layer through the first target communication path, so that the chip physical layer sends the data to be verified to an external device.
[0009] Furthermore, in response to the chip physical layer receiving a communication function activation instruction, determining the communication function corresponding to the communication function activation instruction includes: In response to the chip physical layer receiving a communication function activation instruction, the communication path of the communication function activation instruction is determined; The chip's physical layer determines the communication function corresponding to the communication activation instruction based on the communication path.
[0010] Furthermore, the method also includes: In response to the application layer receiving communication data sent by the user, the communication function corresponding to the communication data is determined, and the communication path matching the communication function is determined as the first target communication path among multiple communication paths; The application layer sends the communication data to the chip physical layer through the first target communication path, so that the chip physical layer sends the communication data to an external device.
[0011] Furthermore, the communication function includes a first function, a second function, and a third function; the multiple communication paths include a first communication path, a second communication path, and a third communication path; The step of determining the communication path matching the communication function among multiple communication paths as the first target communication path includes: In response to determining that the communication function is a first function, the first target communication path is determined as a first communication path; In response to determining that the communication function is a second function, the first target communication path is determined to be the second communication path; In response to determining that the communication function is a third function, the first target communication path is determined to be a third communication path.
[0012] Based on the same inventive concept, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.
[0013] Based on the same inventive concept, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the method described above.
[0014] Based on the same inventive concept, this disclosure also provides a vehicle including an electronic device as described above.
[0015] As can be seen from the above description, the communication function management method, electronic device, and vehicle provided in this application are applied in the field of communication technology. The method, upon receiving a communication function activation command at the application layer, determines the communication function corresponding to the command. It then identifies a first target communication path from multiple communication paths that matches the chosen function. The communication function activation command is then sent to the chip physical layer via this first target communication path, enabling the chip physical layer to activate the communication function based on the command. These multiple communication paths are independent and do not intersect, thus preventing the passive operation of resources corresponding to other communication functions during the activation and operation of one function, thereby avoiding resource waste. This application sets corresponding communication paths for each communication function, allowing each function to be activated and operated based on its dedicated path. This enables independent operation of each communication function, achieving targeted resource utilization, avoiding resource waste, and improving the operational efficiency of communication functions, thereby enhancing the communication efficiency of the terminal device. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram illustrating the communication paths between various communication functions of a terminal device and the WIFI chip in current technology. Figure 2 This is a schematic diagram of the communication paths between the various communication functions of the terminal device and the WIFI chip in an embodiment of this application; Figure 3 This is a flowchart illustrating a communication function management method according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a communication function management device according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0019] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0020] Terminal devices (such as vehicle terminals and mobile terminals) communicate through communication chips, including Bluetooth chips and WIFI chips. Bluetooth chips have limited communication capabilities and single communication functions, while WIFI chips have stronger communication capabilities and multiple communication functions, such as STA function, AP function and P2P function.
[0021] STA function refers to the function of a WIFI chip as a client device in a WIFI network for network communication; AP function refers to the function of a WIFI chip as a wireless access point for other external devices to network communication; P2P function refers to the function of a WIFI chip to directly connect to the WIFI chips of other external devices for communication.
[0022] In the architecture of the Android system, the WIFI chip interacts with the user through the application layer. The application layer communicates with the WIFI chip through the framework layer and the hardware abstraction layer. In other words, the communication path between the application layer and the WIFI chip goes through the framework layer and the hardware abstraction layer.
[0023] In current technology, such as Figure 1 As shown, in terminal devices running the Android system, the STA and P2P functions share processes at the framework layer and hardware abstraction layer. For example, the wpa_supplicant process (belonging to the hardware abstraction layer, is a user-space WIFI client used to manage and configure WIFI connections) is started when the user only starts the P2P function. Since the wpa_supplicant process is associated with both the STA and P2P functions, the related logic of the STA function associated with the wpa_supplicant process is passively started, resulting in increased communication resources used by the terminal device and wasted resources.
[0024] Based on this, this application proposes a communication function management method, electronic device, and vehicle. By setting a communication process for each communication function at the framework layer and hardware abstraction layer, the communication functions do not share the same communication process, and the communication paths corresponding to each communication function do not overlap. This enables the independent operation of each communication function, decoupling the communication functions at the framework layer and hardware abstraction layer. It also prevents communication resources unrelated to the communication function from being activated, thus avoiding resource waste and improving the communication efficiency of the terminal device.
[0025] The embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0026] In some embodiments, a communication function management method is applied to a terminal device, the terminal device including an application layer and a chip physical layer, such as... Figure 2 and Figure 3 As shown, the method includes: Step S101: In response to the application layer receiving a communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, and the communication path matching the communication function among multiple communication paths is determined as the first target communication path; wherein, the multiple communication paths do not intersect each other.
[0027] Specifically, the terminal device includes an application layer, a framework layer, a hardware abstraction layer, and a chip physical layer. The chip physical layer corresponds to a physical communication chip such as a Wi-Fi chip or a Bluetooth chip. The application layer is used to receive communication function activation commands or communication data sent by the user. The framework layer and the hardware abstraction layer are the necessary nodes for communication between the application layer and the chip physical layer. The framework layer and the hardware abstraction layer each have processes corresponding to different communication functions. The processes corresponding to the same communication function on the framework layer and the hardware abstraction layer form the communication path.
[0028] The terminal device sends a communication function activation instruction through the application layer, and the application layer sends the communication function set instruction to the chip physical layer through the communication path, so that the chip physical layer can activate the communication function corresponding to the communication function activation instruction.
[0029] When the physical layer of the chip corresponds to a WIFI chip, since the WIFI chip has multiple communication functions, in order to avoid the communication path affecting other communication functions during the transmission of the communication function activation command, multiple communication paths are set so that each communication function matches a communication path. That is, activating a communication function or using a communication function to transmit data is achieved through the communication path that matches the communication function.
[0030] For example, the chip physical layer has three communication functions: STA, AP, and P2P. Each of the STA, AP, and P2P functions corresponds to a communication path. The application layer communicates with the chip physical layer sequentially through the framework layer and the hardware abstraction layer. Specifically, the communication path corresponding to the STA function is represented by the process WifiManagerService in the framework layer and ISTA.hal and wpa_supplicant in the hardware abstraction layer. The communication path corresponding to the AP function is represented by the process APManagerService in the framework layer and IHostapd.hal and hostapd in the hardware abstraction layer. The communication path corresponding to the P2P function is represented by the process P2pManagerService in the framework layer and IP2p.hal and P2pSupplicant in the hardware abstraction layer.
[0031] More specifically, when the application layer receives the communication function activation instruction, it determines the communication function corresponding to the communication function activation instruction, and determines a communication path that matches the communication function as the first target communication path. The first target communication path is used to transmit data from the application layer to the chip physical layer.
[0032] For example, when the communication function activation instruction received by the application layer is an AP function activation instruction, the corresponding communication function is the AP function, and the first target communication path is APManagerService, IHostapd.hal and hostapd.
[0033] In step S102, the application layer sends the communication function activation instruction to the chip physical layer through the first target communication path, so that the chip physical layer activates the communication function.
[0034] Specifically, after determining the first target communication path, the application layer sends the communication function activation instruction to the first target communication path, so that the first target communication path sends the communication function activation instruction to the chip physical layer.
[0035] After receiving the communication function activation instruction, the chip physical layer activates the communication function corresponding to the communication function activation instruction, thereby enabling the terminal device to implement the communication function through the chip physical layer.
[0036] For example, if the communication function activation instruction is a P2P function activation instruction, then after receiving the instruction, the chip physical layer (WIFI chip) will activate its P2P mode, and other devices in P2P mode can establish a P2P communication connection with the terminal device.
[0037] In this embodiment, when a communication function activation instruction is received at the application layer, the corresponding communication function is determined. Among multiple communication paths, the communication path matching this function is selected as the first target communication path. The communication function activation instruction is then sent to the chip physical layer via this first target communication path, enabling the chip physical layer to activate the communication function based on the instruction. These multiple communication paths are independent and do not intersect, thus preventing the passive operation of resources corresponding to other communication functions during the activation and operation of one communication function, thereby avoiding resource waste. This application sets corresponding communication paths for each communication function, allowing each function to be activated and operated based on its dedicated path. This enables independent operation of each communication function, achieving targeted resource utilization, avoiding resource waste, and improving the operational efficiency of communication functions, thereby enhancing the communication efficiency of the terminal device.
[0038] In some embodiments, the method further includes: Step S201: In response to the chip physical layer receiving the communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, and the communication mode that matches the communication function among multiple communication modes is determined as the target communication mode. Specifically, when the chip physical layer receives the communication function activation instruction, it determines the communication function corresponding to the communication function activation instruction, and then determines the communication mode to be activated, which is the target communication mode.
[0039] It should be noted that the types of communication function activation instructions that the chip physical layer can receive are matched one-to-one with the communication modes that the chip physical layer has. That is, the communication function activation instructions that the terminal device can send to the chip physical layer through the application layer are all determined based on the existing communication modes of the chip physical layer. When the chip physical layer is in a communication mode, it can realize its corresponding communication function, and thus the terminal device can realize the communication function. Therefore, as long as the chip physical layer receives the communication function activation instruction, it can definitely activate the communication function corresponding to the communication function activation instruction.
[0040] In step S202, the chip physical layer runs the target communication mode to activate the communication function.
[0041] Specifically, after the chip physical layer determines the target communication mode based on the communication function, it runs the target communication mode, so that the chip physical layer is in the target communication mode, and the communication function corresponding to the target communication mode is activated.
[0042] For example, if the communication function activation instruction received by the chip physical layer is an AP function activation instruction, then the communication function corresponding to the communication function activation instruction is determined to be the AP function, the target communication mode corresponding to the AP function is the AP communication mode, the chip physical layer runs the AP communication mode, the AP function of the chip physical layer is activated, and the chip physical layer sends out a hotspot signal for external devices to search and connect.
[0043] It should be noted that when the chip physical layer receives multiple communication function activation instructions one after another or simultaneously, and the communication functions corresponding to the multiple communication function activation instructions are different, the chip physical layer can run multiple communication modes corresponding to different communication functions (that is, the chip physical layer is in multiple communication modes at the same time). In other words, the chip physical layer can activate multiple communication functions at the same time, and thus the terminal device can activate multiple communication functions at the same time.
[0044] In this embodiment, when the chip physical layer receives the communication function activation instruction, it determines the communication function corresponding to the communication function activation instruction. Based on the communication function, it determines the communication mode that matches the communication function among multiple communication modes, namely the target communication mode. The chip physical layer operates the target communication mode, so that the chip physical layer is in the target communication mode, thereby having the communication function and realizing the activation of the communication function. Correspondingly, the terminal device where the chip physical layer is located has the communication function, realizing the activation of the communication function, and the terminal device can realize the communication function through the chip physical layer.
[0045] In some embodiments, the method further includes: Step S301: In response to the chip physical layer receiving communication data sent by an external device, the communication function corresponding to the communication data is determined, and the communication path matching the communication function is determined as the second target communication path among multiple communication paths; Specifically, after the communication function of the chip physical layer is activated and a communication connection is established with an external device, it can receive communication data sent by the external device. The chip physical layer can determine the communication function corresponding to the communication data by identifying the external device that sent the communication data, thereby determining which communication function the communication connection established between the external device and the chip physical layer corresponds to, and thus determining the communication function. Alternatively, the chip physical layer can determine the communication function corresponding to the communication data by judging the communication function tag of the communication data. The communication data has a communication function tag, and the chip physical layer can determine the communication function corresponding to the communication data based on the communication function tag, so as to determine the communication path that matches the communication function among multiple communication paths as the second target communication path.
[0046] It should be noted that the second target communication path is the path for transmitting data from the chip physical layer to the application layer. When the communication function corresponding to the communication data is the same as the communication function corresponding to the communication function activation instruction, the first target communication path through which the communication function activation instruction is transmitted is the same as the second target communication path through which the communication data is transmitted, the only difference being the direction of transmission.
[0047] For example, when the communication function activation instruction received by the application layer is an AP function activation instruction, the corresponding communication function is the AP function, and the first target communication path is APManagerService, IHostapd.hal and hostapd. When the communication data received by the chip physical layer corresponds to the AP function, the second target communication path is hostapd, IHostapd.hal and APManagerService.
[0048] In step S302, the chip physical layer sends the communication data to the application layer through the second target communication path.
[0049] Specifically, after determining the second target communication path, the chip physical layer sends the communication data to the application layer through the second target communication path, so that the application layer receives and displays the communication data.
[0050] In this embodiment, after receiving communication data sent by an external device, the chip physical layer determines the communication function of the communication data and then determines a second target communication path for transmitting the communication data. The communication data is then transmitted to the application layer via the second target communication path for user viewing, thus enabling communication between the terminal device and the external device. The determination of the second target communication path allows the chip physical layer to independently send the communication data to the application layer according to the communication function corresponding to the received communication data, avoiding the activation of other communication functions and the resulting resource consumption. This prevents excessive resource consumption of the terminal device and thus improves the transmission efficiency of the communication data, thereby enhancing the smoothness and efficiency of the chip physical layer sending communication data to the application layer.
[0051] In some embodiments, the communication path includes a verification module; the method further includes: Step S401: In response to the chip physical layer receiving data to be verified sent by an external device, the communication function corresponding to the data to be verified is determined, and the communication path matching the communication function is determined as the second target communication path among multiple communication paths. Specifically, when the communication functions (such as AP function and P2P function) of the chip physical layer (i.e. terminal device) are activated, the external device can search for the terminal device. In order to establish a communication connection with the terminal device, the external device sends the data to be verified to the chip physical layer so that the terminal device can verify the data to be verified. After the verification is successful, the chip physical layer establishes a communication connection with the external device under the communication function.
[0052] For example, when the chip physical layer is in AP communication mode, its AP function is activated, and external devices can search for its corresponding hotspot signal. Then, the external devices send the data to be verified for the hotspot signal to the chip physical layer. After receiving the data to be verified, the chip physical layer determines that the corresponding communication function is the AP function, and determines the communication path corresponding to the function as the second target communication path according to the AP function, so as to send the data to be verified through the second target communication path.
[0053] In step S402, the chip physical layer sends the data to be verified to the verification module through the second target communication path, so that the verification module of the second target communication path can verify the data to be verified and obtain the verification result. Specifically, each of the multiple communication paths connected to the chip physical layer includes a verification module. That is, each communication path corresponds to a verification module. When the chip physical layer sends the data to be verified through the second target communication path, the verification module located on the second target communication path verifies the data to be verified to determine whether the data to be verified can establish a communication connection with the chip physical layer (i.e., the terminal device) under this communication function.
[0054] The verification module stores verification control data. The verification module determines the verification result by comparing the data to be verified with the verification control data. If the data to be verified is the same as the verification control data, the verification result is determined to be verified as passed. If the data to be verified is different from the verification control data, the verification result is determined to be verified as failed.
[0055] It should be noted that when the verification control data is a sequence, the sequence of the data to be verified must be exactly the same as that of the verification control data in order to pass the verification.
[0056] For example, the verification reference data stored in the verification module is: qwer123, and the data to be verified is: 123qwer. Although the data in the data to be verified is the same as the verification reference data, the verification result is still that the verification failed because the order is different.
[0057] In step S403, the verification module sends the verification result to the application layer and the chip physical layer or the chip physical layer.
[0058] Specifically, after the verification is completed and the verification result is obtained, the verification module determines the sending target based on the verification result, that is, it determines whether to send the verification result to the chip physical layer or to the application layer and the chip physical layer.
[0059] It should be noted that when the verification result is successful, it is determined that the external device can establish a communication connection with the terminal device under this communication function. Both the external device and the user need to be aware of the verification result to ensure the privacy of the terminal device and to provide feedback on the verification result to the external device. When the verification result is unsuccessful, it is determined that the external device cannot establish a communication connection with the terminal device under this communication function, which will not cause data leakage of the terminal device. Therefore, the user does not need to be aware of the verification result. However, since the goal of the external device is to establish a communication connection with the terminal device, the verification result needs to be fed back to the external device through the chip physical layer so that the external device is aware of the verification result.
[0060] It should be noted that when the application layer receives a successful verification result, it provides feedback to the terminal device's interface to update the verification result, allowing the user to be aware of the result. When the chip physical layer receives a verification result (whether successful or unsuccessful), it sends the result to an external device so that the external device is aware of the result. If the verification result is successful, the verification module also sends a connection establishment command to the chip physical layer, enabling the chip physical layer to establish a communication connection with the external device under this communication function.
[0061] In this embodiment, when the chip physical layer receives data to be verified sent by an external device, it can determine a second target communication path matching the communication function corresponding to the data to be verified, so that the verification module on the second target communication path can verify the data to be verified. This realizes that one communication function corresponds to one verification module, so that one verification module only needs to execute one set of verification standards to complete the verification, without polling the received data to be verified. This can improve the verification efficiency of the verification module, and thus help improve the verification efficiency and communication efficiency of the terminal device.
[0062] In some embodiments, the method further includes: Step S501: In response to the application layer receiving the data to be verified sent by the user, the communication function corresponding to the data to be verified is determined, and the communication path matching the communication function is determined as the first target communication path among multiple communication paths. Specifically, when the application layer receives the data to be verified sent by the user, it determines the communication function of the data to be verified, determines the first target communication path based on the communication function, and sends the data to be verified to the chip physical layer through the first target communication path.
[0063] It should be noted that when the chip physical layer of the terminal device only has STA, AP and P2P functions, the user sends the data to be verified under the STA and P2P functions to send the data to be verified to the external device through the chip physical layer for verification by the external device. When the verification is successful, the chip physical layer establishes a communication connection with the external device.
[0064] In step S502, the application layer sends the data to be verified to the chip physical layer through the first target communication path, so that the chip physical layer sends the data to be verified to an external device.
[0065] Specifically, after determining the first target communication path, the application layer sends the data to be verified to the chip physical layer through the first target communication path, so that the chip physical layer sends the received data to be verified to an external device.
[0066] It should be noted that the data to be verified has a communication function tag and a target device tag. The chip physical layer can then determine the external device that matches the target device tag based on the target device tag, and send the data to be verified to the external device. When the external device receives the data to be verified, it can determine the communication function corresponding to the data to be verified based on the communication function tag.
[0067] In this embodiment, when the application layer receives the data to be verified sent by the user, it can determine a first target communication path for sending the data to be verified based on the communication function corresponding to the data. The data to be verified is then sent to the chip physical layer through the first target communication path. Subsequently, the chip physical layer can send the data to be verified to an external device for verification. By determining the first target communication path based on the communication function corresponding to the data, the data to be verified can be transmitted to the chip physical layer through its dedicated communication path, avoiding transmission through a communication path shared with other communication functions, which would cause other communication functions to operate passively and affect the transmission efficiency of the data to be verified. This is beneficial to improving the communication efficiency of the method.
[0068] In some embodiments, in step S201: in response to the chip physical layer receiving a communication function activation instruction, determining the communication function corresponding to the communication function activation instruction includes: Step S601: In response to the chip physical layer receiving a communication function activation instruction, the communication path of the communication function activation instruction is determined; Specifically, when the chip physical layer receives the communication function activation instruction, it determines the communication function corresponding to the instruction by determining the communication path of the instruction. The chip physical layer determines the communication path of the communication function activation instruction through the process that receives it.
[0069] For example, the application layer communicates with the chip physical layer sequentially through the framework layer and the hardware abstraction layer. The hardware abstraction layer includes wpa_supplicant, hostapd, and P2pSupplicant. wpa_supplicant, hostapd, and P2pSupplicant are all connected to the chip physical layer and are located on different communication paths. When the chip physical layer receives the communication function activation instruction through wpa_supplicant, it determines that the communication path containing wpa_supplicant is the communication path of the communication function activation instruction.
[0070] In step S602, the chip physical layer determines the communication function corresponding to the communication activation instruction based on the communication path.
[0071] Specifically, the chip physical layer determines the communication function corresponding to the communication activation instruction by determining the communication function corresponding to the communication path; that is, the communication function corresponding to the communication path is the communication function corresponding to the communication activation instruction.
[0072] For example, if the chip physical layer determines that it has received the communication function activation instruction through the first communication path, and the communication function corresponding to the first communication path is the AP function, then it determines that the communication function corresponding to the communication function activation instruction is the AP function.
[0073] In this embodiment, the chip physical layer determines the communication path for receiving the communication function activation command, and then determines the communication function corresponding to the communication function activation command based on the communication function corresponding to the communication path. This allows the chip physical layer to run the corresponding communication mode according to the communication function, thereby activating the communication function and enabling the terminal device to communicate. By binding the communication path to the communication function, the chip physical layer can easily determine the communication function corresponding to the communication function activation command. Furthermore, it avoids the situation where resources of other communication functions sharing the communication path are passively executed when one communication function is activated, leading to wasted resources, thus improving the communication efficiency of the terminal device.
[0074] In some embodiments, the method further includes: Step S701: In response to the application layer receiving communication data sent by the user, the communication function corresponding to the communication data is determined, and the communication path matching the communication function is determined as the first target communication path among multiple communication paths. Specifically, when the application layer receives the communication data sent by the user, it determines the communication function corresponding to the communication data, and selects the communication path corresponding to the communication function from multiple communication paths as the first target communication path. The first target communication path is used to receive the communication data from the application layer and transmit the communication data to the chip physical layer, so that the chip physical layer can send the communication data to an external device based on the communication function, thereby realizing communication between the terminal device and the external device.
[0075] It should be noted that when the application layer receives the communication data, it can determine the corresponding communication function based on the communication function tag of the communication data. Furthermore, the application layer can only receive the communication data corresponding to the communication function after receiving feedback that the communication connection based on the communication function has been successfully established.
[0076] For example, the STA, AP, and P2P functions of the chip physical layer are all activated, but the application layer only receives a notification of a successful establishment of a communication connection based on the P2P function. In this case, the application layer can only receive communication data with the P2P function tag and send the communication data to the chip physical layer.
[0077] In step S702, the application layer sends the communication data to the chip physical layer through the first target communication path, so that the chip physical layer sends the communication data to an external device.
[0078] Specifically, after the application layer sends the communication data to the first target communication path, the first target communication path processes the communication data accordingly and then sends it to the chip physical layer. The chip physical layer can then send the communication data to an external device that is connected to the chip physical layer through the communication function corresponding to the communication data.
[0079] For example, the chip physical layer is simultaneously in STA mode and P2P mode, that is, the STA function and P2P function of the chip physical layer are activated. The chip physical layer communicates with device A through the STA function and communicates with device B through the P2P function. When the communication function corresponding to the communication data received by the chip physical layer is the STA function, the chip physical layer uses its STA function to send the communication data to device A.
[0080] In this embodiment, the application layer can determine a first target communication path based on the communication function corresponding to the received communication data. The communication data is then sent to the chip physical layer via this first target communication path. The chip physical layer can then send the communication data to an external device with which it has established a communication connection based on the communication function, thus enabling communication between the terminal device and the external device. By matching the communication function with the communication path in a one-to-one correspondence, it facilitates the transmission of communication data based on the communication function by the communication path, and also facilitates the chip physical layer's confirmation of the communication function corresponding to the communication data. This allows the communication function of the terminal device to operate independently, avoiding resource waste and reduced communication efficiency caused by the operation of one communication function affecting the operation of other communication functions. This improves the practicality of the method and enhances the communication efficiency of the terminal device.
[0081] In some embodiments, the communication function includes a first function, a second function, and a third function; the multiple communication paths include the first communication path, the second communication path, and the third communication path. In step S101: determining the communication path matching the communication function among multiple communication paths as the first target communication path includes: Step S801: In response to determining that the communication function is a first function, the first target communication path is determined as the first communication path; Specifically, when the application layer determines that the communication function corresponding to the received communication function activation instruction is the first function, it determines that the first target communication path is the first communication path, which is a communication path dedicated to the first function located between the application layer and the chip physical layer.
[0082] When the chip physical layer sends communication data or data to be verified to the application layer, and it is determined that the communication function corresponding to the communication data or data to be verified is a first function, the determined second target communication path is the first communication path. The only difference between the first target communication path and the second target communication path is the transmission direction. The transmission direction of the first target communication path is from the application layer to the chip physical layer, and the transmission direction of the second target communication path is from the chip physical layer to the application layer.
[0083] Step S802: In response to determining that the communication function is a second function, the first target communication path is determined to be the second communication path; Specifically, when the application layer determines that the communication function corresponding to the received communication function activation instruction is the second function, it determines that the first target communication path is the second communication path, and the second communication path is a communication path dedicated to the second function located between the application layer and the chip physical layer.
[0084] When the chip physical layer sends communication data or data to be verified to the application layer, and it is determined that the communication function corresponding to the communication data or data to be verified is a second function, the determined second target communication path is the second communication path. The only difference between the first target communication path and the second target communication path is the transmission direction. The transmission direction of the first target communication path is from the application layer to the chip physical layer, and the transmission direction of the second target communication path is from the chip physical layer to the application layer.
[0085] Step S803: In response to determining that the communication function is a third function, the first target communication path is determined to be a third communication path.
[0086] Specifically, when the application layer determines that the communication function corresponding to the received communication function activation instruction is the third function, it determines that the first target communication path is the third communication path, which is a communication path dedicated to the third function located between the application layer and the chip physical layer.
[0087] When the chip physical layer sends communication data or data to be verified to the application layer, and it is determined that the communication function corresponding to the communication data or data to be verified is a third function, the determined second target communication path is the third communication path. The only difference between the first target communication path and the second target communication path is the transmission direction. The transmission direction of the first target communication path is from the application layer to the chip physical layer, and the transmission direction of the second target communication path is from the chip physical layer to the application layer.
[0088] For example, such as Figure 2 As shown, if the first function is a P2P function, then the first target communication path is P2pManagerService-IP2p.hal-P2pSupplicant. When the application layer receives the activation instruction of the first function, the first target communication path is determined to be P2pManagerService→IP2p.hal→P2pSupplicant. When the chip physical layer receives the communication data of the first function, the second target communication path is determined to be P2pSupplicant→IP2p.hal→P2pManagerService.
[0089] In this embodiment, the terminal device has communication functions including a first function, a second function, and a third function, and communication paths including a first communication path, a second communication path, and a third communication path. The first function matches the first communication path, the second function matches the second communication path, and the third function matches the third communication path. Therefore, when the application layer determines the first target communication path based on the communication function, it can determine it according to the above correspondence. When the chip physical layer determines the second target communication path based on the communication function, it can determine it according to the above correspondence. This enables a communication path to correspond to the data transmission of a communication function between the application layer and the chip physical layer, avoiding the problem that two or more communication functions share part of the communication path, which would prevent a communication function from operating independently. This is beneficial for improving the independent communication of each communication function and improving the communication efficiency of the terminal device.
[0090] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.
[0091] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0092] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a communication function management device.
[0093] refer to Figure 4 The communication function management device includes: The determination module 100 is configured to, in response to the application layer receiving a communication function activation instruction, determine the communication function corresponding to the communication function activation instruction, and determine the communication path matching the communication function among multiple communication paths as the first target communication path; The sending module 200 is configured such that the application layer sends the communication function activation instruction to the chip physical layer through the first target communication path, so that the chip physical layer activates the communication function; wherein the multiple communication paths do not intersect each other.
[0094] Furthermore, the determining module 100 is also configured to: in response to the chip physical layer receiving the communication function activation instruction, determine the communication function corresponding to the communication function activation instruction, and determine the communication mode matching the communication function as the target communication mode among multiple communication modes; the chip physical layer runs the target communication mode to activate the communication function.
[0095] Furthermore, the determining module 100 is also configured to: in response to the chip physical layer receiving communication data sent by an external device, determine the communication function corresponding to the communication data, and determine the communication path matching the communication function among multiple communication paths as the second target communication path; the chip physical layer sends the communication data to the application layer through the second target communication path.
[0096] Furthermore, the determining module 100 is also configured to: in response to the chip physical layer receiving data to be verified sent by an external device, determine the communication function corresponding to the data to be verified, and determine the communication path matching the communication function among multiple communication paths as the second target communication path; the chip physical layer sends the data to be verified to the verification module through the second target communication path, so that the verification module of the second target communication path verifies the data to be verified and obtains the verification result; the verification module sends the verification result to the application layer and the chip physical layer or the chip physical layer.
[0097] Furthermore, the determining module 100 is also configured to: in response to the application layer receiving the data to be verified sent by the user, determine the communication function corresponding to the data to be verified, and determine the communication path matching the communication function among multiple communication paths as the first target communication path; the application layer sends the data to be verified to the chip physical layer through the first target communication path, so that the chip physical layer sends the data to be verified to an external device.
[0098] Furthermore, the determining module 100 is also configured to: in response to the chip physical layer receiving a communication function activation instruction, determine the communication path of the communication function activation instruction; and the chip physical layer determines the communication function corresponding to the communication activation instruction based on the communication path.
[0099] Furthermore, the determining module 100 is also configured to: in response to the application layer receiving communication data sent by the user, determine the communication function corresponding to the communication data, and determine the communication path matching the communication function among multiple communication paths as the first target communication path; the application layer sends the communication data to the chip physical layer through the first target communication path, so that the chip physical layer sends the communication data to an external device.
[0100] Furthermore, the determining module 100 is also configured to: in response to determining that the communication function is a first function, determine the first target communication path as a first communication path; in response to determining that the communication function is a second function, determine the first target communication path as a second communication path; and in response to determining that the communication function is a third function, determine the first target communication path as a third communication path.
[0101] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.
[0102] The apparatus described above is used to implement the corresponding communication function management method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0103] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the communication function management method described in any of the above embodiments.
[0104] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0105] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0106] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0107] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0108] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0109] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0110] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0111] The electronic devices described above are used to implement the corresponding communication function management methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0112] Based on the same inventive concept, this application also provides a vehicle that includes an electronic device as described above, the beneficial effects of which are the same as those of the aforementioned electronic device, and will not be repeated here.
[0113] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the communication function management method as described in any of the above embodiments.
[0114] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0115] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the communication function management method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0116] Based on the same concept, corresponding to any of the above embodiments, this application also provides a computer program product, including computer program instructions, which, when run on a computer, cause the computer to perform the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0117] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.
[0118] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.
[0119] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0120] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0121] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application is limited to these examples; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0122] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0123] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0124] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the claims of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.
Claims
1. A communication function management method, characterized in that, Applied to a terminal device, the terminal device including an application layer and a chip physical layer, the method includes: In response to the application layer receiving a communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, and the communication path matching the communication function among multiple communication paths is determined as the first target communication path; The application layer sends the communication function activation instruction to the chip physical layer through the first target communication path, so that the chip physical layer activates the communication function; The multiple communication paths do not intersect with each other.
2. The method according to claim 1, characterized in that, The method further includes: In response to the chip physical layer receiving the communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, and the communication mode matching the communication function is determined as the target communication mode among multiple communication modes; The chip's physical layer runs the target communication mode to activate the communication function.
3. The method according to claim 2, characterized in that, The method further includes: In response to the chip physical layer receiving communication data sent by an external device, the communication function corresponding to the communication data is determined, and the communication path matching the communication function is determined as the second target communication path among multiple communication paths; The chip's physical layer sends the communication data to the application layer through the second target communication path.
4. The method according to claim 2, characterized in that, The communication path includes a verification module; the method further includes: In response to the chip physical layer receiving data to be verified sent by an external device, the communication function corresponding to the data to be verified is determined, and the communication path matching the communication function is determined as the second target communication path among multiple communication paths; The chip physical layer sends the data to be verified to the verification module through the second target communication path, so that the verification module of the second target communication path can verify the data to be verified and obtain the verification result. The verification module sends the verification result to the application layer and the chip physical layer or the chip physical layer.
5. The method according to claim 1, characterized in that, The method further includes: In response to the application layer receiving the data to be verified sent by the user, the communication function corresponding to the data to be verified is determined, and the communication path matching the communication function is determined as the first target communication path among multiple communication paths; The application layer sends the data to be verified to the chip physical layer through the first target communication path, so that the chip physical layer sends the data to be verified to an external device.
6. The method according to claim 2, characterized in that, In response to the chip physical layer receiving a communication function activation instruction, the communication function corresponding to the communication function activation instruction is determined, including: In response to the chip physical layer receiving a communication function activation instruction, the communication path of the communication function activation instruction is determined; The chip's physical layer determines the communication function corresponding to the communication activation instruction based on the communication path.
7. The method according to claim 1, characterized in that, The method further includes: In response to the application layer receiving communication data sent by the user, the communication function corresponding to the communication data is determined, and the communication path matching the communication function is determined as the first target communication path among multiple communication paths; The application layer sends the communication data to the chip physical layer through the first target communication path, so that the chip physical layer sends the communication data to an external device.
8. The method according to claim 1, characterized in that, The communication function includes a first function, a second function, and a third function; the multiple communication paths include a first communication path, a second communication path, and a third communication path; The step of determining the communication path matching the communication function among multiple communication paths as the first target communication path includes: In response to determining that the communication function is a first function, the first target communication path is determined as a first communication path; In response to determining that the communication function is a second function, the first target communication path is determined to be the second communication path; In response to determining that the communication function is a third function, the first target communication path is determined to be a third communication path.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 8.
10. A vehicle, characterized in that, Including an electronic device as described in claim 9.