Network task execution method and device, electronic equipment and storage medium
By realizing dynamic transfer of network tasks in dual WiFi modules, the problem of waste of network resources in the existing technology is solved, the execution efficiency of network tasks is improved, and high-quality wireless needs are met.
Patent Information
- Application Number
- CN202411571405.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
In the case where STA, WiFi-Direct and Soft AP coexist, the throughput of each module is limited by chip capabilities, and cannot meet high-quality wireless needs, resulting in wasted network resources.
Through a network task execution method, task transfer between two WiFi modules is used to ensure that the second module performs the second network task when the Soft AP function is not performed, avoiding idle state, and thus achieving efficient utilization of resources.
It effectively avoids the waste of network module resources, improves the execution efficiency of network tasks, and meets high-quality wireless needs.
Smart Images

Figure CN119545383A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a network task execution method, device, electronic device and storage medium. Background Art
[0002] In order to meet the high-quality wireless requirements, today's mobile terminals are equipped with dual WiFi modules. The common dual WiFi module requirements require the coexistence of STA (station), WiFi-Direct, and Soft AP (access point). However, when a single WiFi module STA, WiFi-Direct, and Soft AP coexist, the throughput of each module is limited by the chip capabilities and cannot meet the functional requirements. Summary of the invention
[0003] The present application relates to a network task execution method, which can effectively avoid the waste of resources of the network module.
[0004] In a first aspect, the present application provides a network task execution method, which is applied to a network module, wherein the network module includes a first module and a second module;
[0005] The first module is used to execute a first network task, and the second module is used to execute a second network task. The method includes:
[0006] If a first target instruction for executing a third network task is obtained, stopping the second module from executing the second network task;
[0007] Controlling the second module to execute the third network task;
[0008] Control the first module to execute the first network task and the second network task.
[0009] In some embodiments of the present application, the step of obtaining a first target instruction for executing a third network task includes:
[0010] Get system instructions;
[0011] analyzing the system instructions;
[0012] If the system instruction carries a target identifier, it is determined to obtain the first target instruction.
[0013] In some embodiments of the present application, the controlling the second module to perform the third network task includes:
[0014] Calling the target interface corresponding to the third network task;
[0015] According to the target interface, the second module is controlled to execute the third network task.
[0016] In some embodiments of the present application, after controlling the first module to execute the first network task and the second network task, the method further includes:
[0017] If a second target instruction to stop executing the third network task is obtained, the second module is stopped from executing the third network task and the first module is stopped from executing the second network task;
[0018] Control the second module to execute the second network task.
[0019] In a second aspect, the present application further provides a network task execution device, which is applied to a network module, wherein the network module includes a first module and a second module;
[0020] The first module is used to execute a first network task, and the second module is used to execute a second network task. The device includes:
[0021] a control module, configured to stop the second module from executing the second network task if a first target instruction for executing the third network task is obtained;
[0022] The control module is also used to control the second module to execute the third network task;
[0023] The control module is also used to control the first module to execute the first network task and the second network task.
[0024] In some embodiments of the present application, the control module obtains the first target instruction for executing the third network task, including:
[0025] Get system instructions;
[0026] analyzing the system instructions;
[0027] If the system instruction carries a target identifier, it is determined to obtain the first target instruction.
[0028] In some embodiments of the present application, the control module controls the second module to execute the third network task, including:
[0029] Calling the target interface corresponding to the third network task;
[0030] According to the target interface, the second module is controlled to execute the third network task.
[0031] In some embodiments of the present application, the control module is further used for:
[0032] If a second target instruction to stop executing the third network task is obtained, the second module is stopped from executing the third network task and the first module is stopped from executing the second network task;
[0033] Control the second module to execute the second network task.
[0034] In a third aspect, the present application also provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the network task execution methods.
[0035] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the network task execution methods.
[0036] Under normal circumstances, the first module executes the first network task and the second network task, while the second module is in an idle state. At this time, the network resources of the second module are wasted. The network task execution method provided in the present application can first set the first module to only execute the first network task, and the second module to execute the second network task. If the third network task needs to be executed, the second network task executed by the second module is transferred to the first network module for execution, and the second module executes the third network task. It can be seen that during this period, the second network module will not be in an idle state, avoiding the waste of network resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 is a schematic diagram of a scenario of a network task execution system provided in an embodiment of the present application;
[0039] Figure 2 This is a flowchart of an embodiment of a method for executing a network task in an embodiment of the present application;
[0040] Figure 3 It is a functional module diagram of a network task execution device in an embodiment of the present application;
[0041] Figure 4 It is a schematic diagram of the structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0043] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0044] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. At the same time, it is to be understood that in the specific implementation of this application, when user information, user data and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data shall comply with relevant laws, regulations and standards of relevant countries and regions.
[0045] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.
[0046] The present application provides a network task execution method, apparatus, device and storage medium, which are described in detail below.
[0047] See also Figure 1 , Figure 1 The schematic diagram of the network task execution system provided in the embodiment of the present application is a scene diagram. The network task execution system may include an electronic device 100. The electronic device 100 can be connected to the network to realize data transmission. Figure 1 The electronic device 100 in the embodiment can execute the network task execution method in the present application when executing a network data transmission task.
[0048] In the embodiment of the present application, the electronic device 100 may include any device equipped with a network module, including but not limited to a desktop computer, a portable computer, a PDA (Personal Digital Assistant), a tablet computer, a wireless electronic device, an embedded device, etc.
[0049] In an embodiment of the present application, when the electronic device 100 performs a network task, it can communicate with the corresponding server through any communication method, including but not limited to mobile communications based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communications based on the TCP / IP Protocol Suite (TCP / IP), User Datagram Protocol (UDP), etc.
[0050] It should be noted that Figure 1 The scenario diagram of the network task execution system shown is only an example. The network task execution system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the network task execution system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present application is also applicable to similar technical problems.
[0051] like Figure 2 As shown, Figure 2 The flowchart of an embodiment of the network task execution method in the embodiment of the present application is shown in FIG. 2 . The method is applied to a network module, and the network module includes a first module and a second module. The first module is used to execute a first network task, and the second module is used to execute a second network task. The network task execution method may include the following steps 201 to 204:
[0052] 201. If a first target instruction for executing a third network task is obtained, stop the second module from executing the second network task.
[0053] In the embodiment of the present application, the network module may be a wifi module, and the first module and the second module are two sub-modules built into the wifi module, which are used to respectively perform different network tasks. Among them, the first network task may include a STA function, and the second network task may include a WiFi-Direct function. In the initial state, the wifi module operates in this way.
[0054] In addition, in the embodiment of the present application, the third network task includes a Soft AP function, which is enabled according to network requirements. In the prior art, the second module is in an idle state, and if the system needs to execute the Soft AP function, the second module is called to execute the Soft AP function. Therefore, the second module only executes the Soft AP function in the prior art.
[0055] In the embodiment of the present application, when the system does not need to execute the Soft AP function, the second module can be used to execute the second network task, while the first module executes the first network task. Afterwards, if the system needs to execute the Soft AP function, the second module can be stopped from executing the second network task. In the embodiment of the present application, obtaining the corresponding first target instruction can be directly determined automatically according to the program, and the embodiment of the present application does not limit it.
[0056] 202. Control the second module to execute the third network task.
[0057] After the second module completely stops executing the second network task, the second module can be controlled to execute the third network task again. In the embodiment of the present application, the method of controlling the second module to execute the third network task can be automatically executed through related functions and programs, which is not limited in the embodiment of the present application.
[0058] 203. Control the first module to execute the first network task and the second network task.
[0059] Therefore, after the second module executes the third network task, in the embodiment of the present application, the second network task also needs to be executed by the first module, so that the first module executes the first network task and the second network task at the same time.
[0060] The network task execution method provided by the present application can first set the first module to only execute the first network task, and the second module to execute the second network task. If the third network task needs to be executed, the second network task executed by the second module is transferred to the first network module for execution, and the second module executes the third network task at the same time. It can be seen that during this period, the second network module will not be idle, avoiding the waste of network resources.
[0061] In order to better implement the embodiment of the present application, in one embodiment of the present application, if a first target instruction for executing a third network task is obtained, it includes:
[0062] Acquire a system instruction; analyze the system instruction; if the system instruction carries a target identifier, determine to acquire a first target instruction.
[0063] The above embodiment provides a method of determining that the system obtains the first target instruction through program automation. In the embodiment of the present application, if the system needs to start the third network task, the system can send an instruction including a target identifier. Among them, the target identifier can be a specific identification code. When the electronic device issues the first target instruction to the wifi module, the wifi module can perform code recognition to determine the specific identification code, thereby ensuring that the first target instruction is received. Then in the subsequent process, the task switching work is performed.
[0064] In order to better implement the embodiment of the present application, in one embodiment of the present application, controlling the second module to perform the third network task includes:
[0065] Calling a target interface corresponding to the third network task; and controlling the second module to execute the third network task according to the target interface.
[0066] In the embodiment of the present application, since the third network task can be a Soft AP function, in the embodiment of the present application, the target interface can be a virtual interface function corresponding to the Soft AP function. When the Soft AP function is to be executed, the second module stops executing the second network task, calls the corresponding virtual interface function, and executes the third network task.
[0067] Of course, it should be noted that if the third network task is not a Soft AP function but other network tasks, it is sufficient to call its corresponding interface function for execution, and the embodiment of the present application does not limit it.
[0068] In order to better implement the embodiment of the present application, in one embodiment of the present application, after controlling the first module to execute the first network task and the second network task, the method further includes:
[0069] If the second target instruction for stopping the execution of the third network task is obtained, the second module is stopped from executing the third network task and the first module is stopped from executing the second network task; and the second module is controlled to execute the second network task.
[0070] When the system no longer needs to execute the third network task, the system performs reverse operation, adjusting the state of the first module executing the first network task and the second network task to the first module only executing the first network task. At the same time, the third network task executed by the second module is stopped, and the second network task stopped by the first module is taken over, further avoiding the problem of idle and wasted network resources of the second module.
[0071] In order to better implement the network task execution method in the embodiment of the present application, in addition to the network task execution method, the embodiment of the present application also provides a network task execution device, such as Figure 3 As shown, the device is applied to a network module, the network module includes a first module and a second module; the first module is used to perform a first network task, and the second module is used to perform a second network task. The device 300 includes:
[0072] The control module 301 is configured to stop the second module from executing the second network task if a first target instruction for executing the third network task is obtained;
[0073] The control module 301 is also used to control the second module to perform the third network task;
[0074] The control module 301 is further used to control the first module to execute the first network task and the second network task.
[0075] In the network task execution device provided by the present application, the control module 301 can first set the first module to only execute the first network task, and the second module to execute the second network task. If the third network task needs to be executed, the second network task executed by the second module is transferred to the first network module for execution, and the second module executes the third network task at the same time. It can be seen that during this period, the second network module will not be idle, avoiding the waste of network resources.
[0076] In some embodiments of the present application, the control module 301 obtains a first target instruction for executing a third network task, including:
[0077] Get system instructions;
[0078] Analyze system instructions;
[0079] If the system instruction carries a target identifier, it is determined to obtain the first target instruction.
[0080] In some embodiments of the present application, the control module 301 controls the second module to perform the third network task, including:
[0081] Calling the target interface corresponding to the third network task;
[0082] According to the target interface, the second module is controlled to execute the third network task.
[0083] In some embodiments of the present application, the control module 301 is further used to:
[0084] If a second target instruction for stopping the execution of the third network task is obtained, the second module is stopped from executing the third network task and the first module is stopped from executing the second network task;
[0085] Control the second module to execute the second network task.
[0086] The present application also provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the network task execution methods in the present application. The electronic device integrates any one of the network task execution methods provided in the present application. Figure 4 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0087] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0088] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0089] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0090] The electronic device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0091] The electronic device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0092] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, such as:
[0093] If the first target instruction for executing the third network task is obtained, the second module is stopped from executing the second network task;
[0094] Controlling the second module to execute the third network task;
[0095] The first module is controlled to execute the first network task and the second network task.
[0096] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0097] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any network task execution method provided in the embodiment of the present application. For example, the computer program can be loaded by the processor to execute the following steps:
[0098] If the first target instruction for executing the third network task is obtained, the second module is stopped from executing the second network task;
[0099] Controlling the second module to execute the third network task;
[0100] The first module is controlled to execute the first network task and the second network task.
[0101] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0102] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0103] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0104] The above is a detailed introduction to a network task execution method and device provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A network task execution method, characterized in that: Applied to a network module, the network module comprises a first module and a second module; The first module is used to execute a first network task, and the second module is used to execute a second network task. The method includes: If a first target instruction for executing a third network task is obtained, stopping the second module from executing the second network task; Controlling the second module to execute the third network task; Control the first module to execute the first network task and the second network task.
2. The network task execution method according to claim 1, characterized in that: The obtaining of the first target instruction for executing the third network task includes: Get system instructions; analyzing the system instructions; If the system instruction carries a target identifier, it is determined to obtain the first target instruction.
3. The network task execution method according to claim 1, characterized in that: The controlling the second module to execute the third network task includes: Calling the target interface corresponding to the third network task; According to the target interface, the second module is controlled to execute the third network task.
4. The network task execution method according to claim 1, characterized in that: After controlling the first module to execute the first network task and the second network task, the method further includes: If a second target instruction to stop executing the third network task is obtained, the second module is stopped from executing the third network task and the first module is stopped from executing the second network task; Control the second module to execute the second network task.
5. A network task execution device, characterized in that: Applied to a network module, the network module comprises a first module and a second module; The first module is used to execute a first network task, and the second module is used to execute a second network task. The device includes: a control module, configured to stop the second module from executing the second network task if a first target instruction for executing the third network task is obtained; The control module is also used to control the second module to execute the third network task; The control module is also used to control the first module to execute the first network task and the second network task.
6. The network task execution device according to claim 5, characterized in that: The control module obtains a first target instruction for executing a third network task, including: Get system instructions; analyzing the system instructions; If the system instruction carries a target identifier, it is determined to obtain the first target instruction.
7. The network task execution device according to claim 5, characterized in that: The control module controls the second module to execute the third network task, including: Calling the target interface corresponding to the third network task; According to the target interface, the second module is controlled to execute the third network task.
8. The network task execution device according to claim 5, characterized in that: The control module is also used for: If a second target instruction to stop executing the third network task is obtained, the second module is stopped from executing the third network task and the first module is stopped from executing the second network task; Control the second module to execute the second network task.
9. An electronic device, characterized in that: The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the network task execution method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the network task execution method according to any one of claims 1 to 4.
Citation Information
Cited By
Task control method and device, electronic equipment and computer readable storage medium
CN120812756A