CN109195149B - NAN scanning adjustment method and related equipment - Google Patents

NAN scanning adjustment method and related equipment Download PDF

Info

Publication number
CN109195149B
CN109195149B CN201810947442.5A CN201810947442A CN109195149B CN 109195149 B CN109195149 B CN 109195149B CN 201810947442 A CN201810947442 A CN 201810947442A CN 109195149 B CN109195149 B CN 109195149B
Authority
CN
China
Prior art keywords
nan
scanning
strategy
nan device
scan
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810947442.5A
Other languages
Chinese (zh)
Other versions
CN109195149A (en
Inventor
胡亚东
柯世兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810947442.5A priority Critical patent/CN109195149B/en
Publication of CN109195149A publication Critical patent/CN109195149A/en
Application granted granted Critical
Publication of CN109195149B publication Critical patent/CN109195149B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application discloses a NAN scanning adjustment method and related equipment, which are applied to NAN equipment, wherein the method comprises the following steps: detecting the power of the NAN device; determining a first scanning strategy under the condition that the current electric quantity of the NAN equipment is detected to be less than or equal to a first threshold value; adjusting from a current second scanning strategy to the first scanning strategy, wherein a time interval of NAN scanning of the first scanning strategy is larger than that of NAN scanning of the second scanning strategy. By adopting the embodiment of the application, the power consumption can be reduced.

Description

NAN scanning adjustment method and related equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a NAN scan adjustment method and related devices.
Background
With the rapid development of communication technology, a Neighbor Awareness Networking (NAN) mechanism based on Wi-Fi technology, which is proposed by the Wi-Fi alliance (WFA), is gradually becoming a hot spot of people's attention. In the NAN mechanism, a NAN network formed by a plurality of NAN-enabled devices (NAN devices for short) is called a cluster (cluster). Each NAN device in a cluster may perform service discovery in a Discovery Window (DW) of the cluster to discover other NAN devices with which data transmission can be performed.
Disclosure of Invention
The embodiment of the application provides a NAN scanning adjusting method and related equipment, which are used for reducing power consumption.
In a first aspect, an embodiment of the present application provides a NAN scan adjusting method, including:
detecting the power of the NAN device;
determining a first scanning strategy under the condition that the current electric quantity of the NAN equipment is detected to be less than or equal to a first threshold value;
adjusting from a current second scanning strategy to the first scanning strategy, a time interval of NAN scanning of the first scanning strategy is larger than that of NAN scanning of the second scanning strategy, and DW of NAN of the first scanning strategy is larger than that of NAN of the second scanning strategy.
In a second aspect, an embodiment of the present application provides a scan adjusting apparatus, which is applied to a NAN device, and includes:
a detection unit for detecting the electric quantity of the NAN device;
a determining unit, configured to determine a first scanning policy when detecting that a current power amount of the NAN device is less than or equal to a first threshold;
a scan control unit, configured to adjust from a current second scan strategy to the first scan strategy, where a time interval of NAN scanning of the first scan strategy is greater than a time interval of NAN scanning of the second scan strategy, and a discovery window DW of a NAN of the first scan strategy is greater than a DW of a NAN of the second scan strategy.
In a third aspect, an embodiment of the present application provides a NAN device comprising a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for performing the steps of the method according to the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform some or all of the steps described in the method according to the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps described in the method according to the first aspect of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, when the current power of the NAN device is low, the scanning policy of the NAN device is adjusted, the adjusted scanning policy has a longer time interval than the NAN scanning of the scanning policy before adjustment, and the DW of the NAN of the adjusted scanning policy is greater than the DW of the scanning policy before adjustment, so that the scanning frequency is reduced, and further, the power consumption is reduced.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a cluster of DWs provided in an embodiment of the present application;
fig. 2A is a schematic diagram of a program running space of a smart phone according to an embodiment of the present application;
fig. 2B is a system architecture diagram of an android system provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating a NAN scan adjusting method according to an embodiment of the present disclosure;
fig. 4 is a flowchart illustrating another NAN scan adjusting method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a NAN device provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a NAN scanning adjusting apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Before introducing the information pushing method, system, and device provided by the embodiment of the present application, a NAN mechanism is briefly introduced first.
In the standard established by the Wi-Fi alliance, channel 6 can be used as the discovery channel in the NAN mechanism, and on the channel 6, the duration of DWs is fixed for each cluster, and the time interval between any two DWs adjacent to the cluster is also fixed.
For example, as shown in fig. 1, fig. 1 is a schematic diagram of a DW of a cluster, and according to a standard established by the Wi-Fi alliance, in the DW, NAN devices in the cluster may send a sync beacon (sync beacon) message in the DW, so that the NAN devices in the cluster maintain synchronization, or may send a Service Discovery Frame (SDF) message for service discovery, and in a time other than the DW, the NAN devices in the cluster may send a discovery beacon (discovery beacon) message to announce the existence of the cluster.
Each NAN device in the cluster may perform service discovery in the DW to discover other NAN devices with which data transmission can be performed. After service discovery, at least two NAN devices which need to perform data transmission with each other can establish a corresponding network with a central node on the appointed time frequency resources according to the appointed network connection mode in the DW according to the appointed time frequency resources and the network connection mode agreed in the DW.
The network established according to the convention may be a basic network of Wi-Fi technology, including an infrastructure basic service set (infrastructure BSS) network, or a peer to peer (P2P) network.
When the at least two NAN devices agree to establish an infrastructure BSS network, if a certain NAN device of the at least two NAN devices is an Access Point (AP), the AP may be used as a central node, and the other NAN devices are all connected to the AP; if the at least two NAN devices are not APs, the user may know that one NAN device is a central node, and the other NAN devices are connected to the NAN device.
When the at least two NAN devices agree to establish the P2P network, the at least two NAN devices may perform a Group Owner (GO) negotiation, determine that a certain NAN device serves as the GO, and use the GO as a central node, where other NAN devices are all connected to the GO.
As shown in fig. 2A, currently, an electronic device such as a smart phone is generally provided with a program running space, where the program running space includes a user space and an operating system space, where the user space runs one or more application programs, and the one or more application programs are third-party application programs installed in the electronic device.
The electronic device can specifically run an Android system, a mobile operating system iOS developed by apple Inc., and the like, and the electronic device is not limited herein. As shown in fig. 2B, for example, the electronic device runs an Android system, the corresponding user space includes an Application layer (Applications) in the Android system, and the operating system space may include an Application Framework layer (Application Framework) in the Android system, a system Runtime library layer (including system Runtime Libraries and Android Runtime runtimes), and a Linux Kernel layer (Linux Kernel). The application layer comprises various application programs which are directly interacted with the user or service programs which are written by Java language and run in the background. For example, programs that implement common basic functions on smartphones, such as Short Messaging Service (SMS) SMS, phone dialing, picture viewer, calendar, games, maps, World Wide Web (Web) browser, and other applications developed by developers. The application framework layer provides a series of class libraries required by Android application development, can be used for reusing components, and can also realize personalized extension through inheritance. And the system operation library layer is a support of an application program framework and provides services for each component in the Android system. The system operation library layer is composed of a system class library and Android operation. The Android runtime comprises two parts, namely a core library and a Dalvik virtual machine. The Linux kernel layer is used for realizing core functions such as hardware device driving, process and memory management, a network protocol stack, power management, wireless communication and the like.
The following describes embodiments of the present application in detail.
Referring to fig. 3, fig. 3 is a schematic flowchart of a NAN scan adjusting method applied to NAN devices, in an embodiment of the present application, where the NAN scan adjusting method includes:
step 301: a NAN device detects a power of the NAN device.
Step 302: the NAN device determines a first scanning strategy when detecting that the current electric quantity of the NAN device is smaller than or equal to a first threshold value.
Step 303: the NAN equipment is adjusted to the first scanning strategy from a current second scanning strategy, the time interval of NAN scanning of the first scanning strategy is larger than that of NAN scanning of the second scanning strategy, and DW of NAN of the first scanning strategy is larger than that of NAN of the second scanning strategy.
The NAN device may include an electronic device, which may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem with wireless communication functions, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and so on.
The first threshold may be user-defined, or may be self-defined by a NAN device, and is not limited herein.
The NAN device periodically detects the power of the NAN device, and the period may be user-defined or user-defined, which is not limited herein.
Wherein, in case that it is detected that the NAN function is started, the electronic device performs step 301. The NAN function may be started in at least one of the following manners: the method comprises the steps of detecting a click operation aiming at a NAN starting mark, detecting a setting touch operation aiming at a designated position of a display screen of NAN equipment, setting a currently displayed interface of the NAN equipment to be a setting interface or a main interface, detecting a setting gesture and setting the currently displayed interface of the NAN equipment to be the setting interface or the main interface, and detecting a setting click signal and setting the currently displayed interface of the NAN equipment to be the setting interface or the main interface.
The setting touch operation may be user-defined or self-defined by NAN device, and is not limited herein. The setting touch operation includes, for example, a single-click operation, a multi-click operation, a slide operation (e.g., a leftward slide operation, a rightward slide operation, an upward slide operation, a downward slide operation, etc.), a single-click operation followed by a slide operation, a multi-click operation followed by a slide operation, a slide operation followed by a single-click operation, a multi-click operation followed by a slide operation, and the like.
The setting gesture may be user-defined or self-defined by a NAN device, and is not limited herein. Examples of the setting gesture include a ring finger gesture, an OK gesture followed by a ring finger gesture, a ring finger gesture followed by an OK gesture, and the like.
The set tapping signal may be user-defined or self-defined by NAN device, and is not limited herein. The tapping signal includes: at least one of a number of taps, a frequency of taps, and a tapping motion. The knocking action can be one knocking action or a plurality of knocking actions. When the tapping action is a plurality of tapping actions, at least two tapping actions among the plurality of tapping actions are different from each other. The set tapping signal is input by the user according to the set tapping action and the set tapping times in advance. Wherein the set tapping action is a simple tapping action, such as tapping lightly with a finger; or the set tapping action is a more complex tapping action, such as tapping a few times with a first finger and tapping a few times with a second finger.
It can be seen that, in the embodiment of the present application, when the current power of the NAN device is low, the scanning policy of the NAN device is adjusted, the adjusted scanning policy has a longer time interval than the NAN scanning of the scanning policy before adjustment, and the DW of the NAN of the adjusted scanning policy is greater than the DW of the scanning policy before adjustment, so that the scanning frequency is reduced, and further, the power consumption is reduced.
In an implementation of the present application, before the NAN device determines the first scanning policy, the method further includes:
a NAN device determining that the NAN device is connected with a specific NAN device; the NAN device stops NAN scanning for a first duration.
The specific NAN device may be user-defined or self-defined, and is not limited herein.
Wherein the first duration refers to a period of time after the current system time. The first duration may be user-defined or may be self-defined by a NAN device, and is not limited herein.
It can be seen that, in the embodiment of the present application, when the NAN device has been connected to the characteristic NAN device, the NAN device directly stops the NAN scanning for a period of time, so that power consumption required by the NAN scanning can be saved, and further, the power consumption is reduced.
In an embodiment of the present application, after determining that the NAN device is connected to a specific NAN device, the method further includes:
the NAN device determines that the NAN device keeps connected with the specific NAN device within a second time length, wherein the second time length is greater than or equal to the first time length.
Wherein the second duration refers to a period of time after the current system time.
Further, before the NAN device determines that the NAN device remains connected to the particular NAN device for a second duration, the method further comprises:
popping up a prompt box on a display screen by the NAN equipment, wherein the prompt box is used for prompting a user to input the time length of the NAN equipment which is expected to be connected with the specific NAN equipment; and the NAN equipment receives a second time length input by the user aiming at the prompt box.
Or before the NAN device determines that the NAN device remains connected to the specific NAN device within the second duration, the method further includes:
the NAN equipment acquires a historical connection record of the NAN equipment and the specific NAN equipment, wherein the historical connection record comprises the connection times and the connection duration of each time;
the NAN device determines an average duration of connection of the NAN device with the specific NAN device, and takes the average duration as the second duration.
Or the second duration is set in advance, may be user-defined, or may be self-defined by a NAN device, which is not limited herein.
It can be seen that, in the embodiment of the present application, when the NAN device is already connected to the specific NAN device and the NAN device is connected to the specific NAN device for a period of time, the NAN device directly stops the NAN scanning for a period of time, so that power consumption required by the NAN scanning can be saved, and further, the power consumption is reduced.
In an implementation manner of the present application, before the NAN device determines the first scanning policy, the method further includes:
the NAN equipment determines that an application running in a foreground of the NAN equipment is a first target application; within the third duration, the NAN device stops the NAN scan.
In a NAN network where NAN devices are located, the NAN devices are not central nodes.
The third time period may be equal to the second time period, or may not be equal to the second time period, which is not limited herein.
When the foreground runs the first target application, such as a camera application, a notepad application, a reading application, etc., the NAN device does not need to use the NAN function.
It can be seen that, in the embodiment of the present application, when the first target application is run in the foreground of the NAN device, the NAN device directly stops the NAN scanning for a period of time, so that power consumption required by the NAN scanning can be saved, and further, the power consumption is reduced.
In an implementation manner of the present application, after the NAN device stops the NAN scan, the method further includes:
in a first time length or a third time length, if it is detected that an application running in the foreground of the NAN device is a second target application, the NAN device determines a third scanning strategy, and performs NAN scanning by using the third scanning strategy, wherein a NAN scanning time interval of the third scanning strategy is greater than a NAN scanning time interval of the second scanning strategy, and DW of a NAN of the third scanning strategy is greater than DW of the second scanning strategy.
In a NAN network where NAN devices are located, the NAN devices are not central nodes.
The NAN device needs to use the NAN function when the foreground runs the second target application, and the first target application is, for example, a shopping application, a payment application, an audio playing application, a video playing application, an instant messaging application, or the like.
The third scanning strategy may be the same as the first scanning strategy or different from the first scanning strategy. When the three scanning strategies are different from the first scanning strategy, the time interval of NAN scanning of the third scanning strategy is smaller than that of NAN scanning of the first scanning strategy, and the DW of the NAN of the third scanning strategy is smaller than that of the NAN of the first scanning strategy.
When the third scanning strategy is different from the first scanning strategy, the specific implementation manner of the NAN device determining the third scanning strategy is as follows: and the NAN equipment determines a third scanning strategy corresponding to the second target application according to the mapping relation between the application and the scanning strategy.
It can be seen that, in this application embodiment, when the second target application is run in the NAN device foreground, it needs the NAN function to indicate the NAN device, and the NAN scan needs to be recovered this moment to guarantee the normal use of the NAN function, and then the intelligence of the device is improved.
In an implementation manner of the present application, after the NAN device adjusts from the current second scanning policy to the first scanning policy, the method further includes:
when the current power of the NAN device is greater than or equal to a second threshold value, or the NAN device is in a charging state and the current power of the NAN device is greater than or equal to the second threshold value, the NAN device is adjusted from the current first scanning policy to the second scanning policy.
The second threshold may be user-defined, or may be self-defined by a NAN device, which is not limited herein. The second threshold is greater than the first threshold.
It can be seen that, in this application embodiment, when the current electric quantity of NAN equipment is sufficient, NAN equipment resumes the NAN scanning strategy to guarantee that the NAN function normally operates, promote the intelligence of equipment.
In an implementation manner of the present application, the specific implementation manner of determining the first scanning policy by the NAN device includes: the NAN device determines a first scanning strategy according to first information, wherein the first information comprises at least one of the following: a current power of the NAN device, a number of currently scanned NAN devices, and a duration of time that the NAN device uses a NAN function.
The duration that the NAN device uses the NAN function refers to a duration that the NAN device expects to use the NAN function. The duration may be preset by the user or the NAN device, or may be preset by the user or the NAN device
Further, the specific implementation manner of determining, by the NAN device according to the first information, the first scanning policy includes: and the NAN equipment determines a first scanning strategy corresponding to the first information according to the mapping relation between the information and the scanning strategy.
For example, the first information includes current electric quantity of the NAN device, and the NAN device determines a first scanning policy corresponding to the current electric quantity of the NAN device according to a mapping relationship between the electric quantity and the scanning policy; for another example, the first information includes the number of currently scanned NAN devices, the NAN devices determine a first scanning policy corresponding to the number of currently scanned NAN devices according to a mapping relationship between the number of NAN devices and the scanning policy, and the like.
It can be seen that, in the embodiment of the present application, the NAN device comprehensively determines the scanning policy, so that the adjusted NAN scanning policy better conforms to the current situation of the NAN device, and the device intelligence is improved.
Referring to fig. 4, please refer to fig. 4 in accordance with the embodiment shown in fig. 3, where fig. 4 is a flowchart illustrating a NAN scan adjusting method according to an embodiment of the present disclosure. As shown in the figure, the NAN scanning adjusting method includes:
step 401: a NAN device detects a power of the NAN device.
In the case that it is detected that the current power of the NAN device is less than or equal to a first threshold, step 402 is performed.
And in the case that the current electric quantity of the NAN device is detected to be larger than the first threshold value, performing no operation.
Step 402: a NAN device determines whether the NAN device is connected with a particular NAN device.
If the NAN device is connected to a specific NAN device, step 403 is performed.
If the NAN device is not connected to a specific NAN device, step 405 is performed.
Step 403: a NAN device determines that the NAN device remains connected to the particular NAN device for a second duration.
Step 404: the NAN device stops NAN scanning within a first time duration, and the second time duration is greater than or equal to the first time duration. Step 408 is performed after step 404 is performed.
Step 405: the NAN device determines a first scanning strategy according to first information, wherein the first information comprises at least one of the following: a current power of the NAN device, a number of currently scanned NAN devices, and a duration of time that the NAN device uses a NAN function.
Step 406: the NAN equipment is adjusted to the first scanning strategy from a current second scanning strategy, the time interval of NAN scanning of the first scanning strategy is larger than that of NAN scanning of the second scanning strategy, and DW of NAN of the first scanning strategy is larger than that of NAN of the second scanning strategy.
Step 407: when the current power of the NAN device is greater than or equal to a second threshold value, or the NAN device is in a charging state and the current power of the NAN device is greater than or equal to the second threshold value, the NAN device is adjusted from the current first scanning policy to the second scanning policy.
Step 408: in a first duration, if it is detected that an application running in a foreground of the NAN device is a second target application, the NAN device determines a third scanning strategy, and performs NAN scanning by using the third scanning strategy, wherein a NAN scanning time interval of the third scanning strategy is greater than a NAN scanning time interval of the second scanning strategy, and DW of the third scanning strategy is greater than DW of the NAN of the second scanning strategy.
It should be noted that, for the specific implementation process of the present embodiment, reference may be made to the specific implementation process described in the above method embodiment, and a description thereof is omitted here.
Consistent with the embodiments shown in fig. 3 and 4, please refer to fig. 5, where fig. 5 is a schematic structural diagram of a NAN device provided in an embodiment of the present application, and as shown in the figure, the NAN device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for:
detecting the power of the NAN device;
determining a first scanning strategy under the condition that the current electric quantity of the NAN equipment is detected to be less than or equal to a first threshold value;
adjusting from a current second scanning strategy to the first scanning strategy, a time interval of NAN scanning of the first scanning strategy is larger than that of NAN scanning of the second scanning strategy, and DW of NAN of the first scanning strategy is larger than that of NAN of the second scanning strategy.
In an implementation of the application, before determining the first scanning strategy, the program comprises instructions for further performing the steps of:
determining that the NAN device is connected with a particular NAN device;
for a first duration, NAN scanning is stopped.
In an implementation of the present application, after determining that the NAN device is connected to a particular NAN device, the program further includes instructions for performing the following steps:
determining that the NAN device remains connected to the particular NAN device for a second duration, the second duration being greater than or equal to the first duration.
In an implementation of the application, before determining the first scanning strategy, the program comprises instructions for further performing the steps of:
determining that an application running in a foreground of the NAN device is a first target application;
for a third duration, NAN scanning is stopped.
In an implementation of the present application, after stopping the NAN scan, the program further includes instructions for performing the following steps:
and in a first time length or a third time length, if the fact that the application running in the foreground of the NAN equipment is a second target application is detected, determining a third scanning strategy, and using the third scanning strategy to scan the NAN, wherein the NAN scanning time interval of the third scanning strategy is larger than the NAN scanning time interval of the second scanning strategy, and the DW of the NAN of the third scanning strategy is larger than the DW of the NAN of the second scanning strategy.
In an implementation manner of the present application, after adjusting from the current second scanning strategy to the first scanning strategy, the program includes instructions for further performing the following steps:
adjusting from the current first scanning strategy to the second scanning strategy when the current power of the NAN device is greater than or equal to a second threshold value, or the NAN device is in a charging state and the current power of the NAN device is greater than or equal to the second threshold value.
In an implementation of the present application, in determining the first scanning strategy, the program includes instructions specifically configured to perform the following steps:
determining a first scanning strategy according to first information, wherein the first information comprises at least one of the following: a current power of the NAN device, a number of currently scanned NAN devices, and a duration of time that the NAN device uses a NAN function.
It should be noted that, for the specific implementation process of the present embodiment, reference may be made to the specific implementation process described in the above method embodiment, and a description thereof is omitted here.
The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
The following is an embodiment of the apparatus of the present application, which is used to execute the method implemented by the embodiment of the method of the present application. Referring to fig. 6, fig. 6 is a NAN scan adjusting apparatus according to an embodiment of the present disclosure, which includes a detecting unit 601, a determining unit 602, and a scan controlling unit 603:
a detecting unit 601, configured to detect an electric quantity of the NAN device;
a determining unit 602, configured to determine a first scanning policy when detecting that a current power of the NAN device is less than or equal to a first threshold;
a scan control unit 603, configured to adjust from a current second scan strategy to the first scan strategy, where a time interval of NAN scanning of the first scan strategy is greater than a time interval of NAN scanning of the second scan strategy, and a discovery window DW of a NAN of the first scan strategy is greater than a DW of a NAN of the second scan strategy.
In an implementation of the present application, before the determining unit 602 determines the first scanning strategy,
a determining unit 602, further configured to determine that the NAN device is connected to a specific NAN device;
the scan control unit 603 is further configured to stop NAN scanning for the first duration.
In an implementation manner of the present application, after the determining unit 602 determines that the NAN device is connected to the specific NAN device, the determining unit 602 is further configured to determine that the NAN device remains connected to the specific NAN device for a second duration, where the second duration is greater than or equal to the first duration.
In an implementation manner of the present application, before the determining unit 602 determines the first scanning policy, the determining unit 602 is further configured to determine that an application running in the NAN device foreground is a first target application; the scan control unit 603 is further configured to stop NAN scanning for a third duration.
In an implementation manner of the present application, after the NAN scanning is stopped, the determining unit 602 is further configured to determine, within a first time period or within a third time period, a third scanning policy if it is detected that an application running in the NAN device foreground is a second target application; the scan control unit 603 is further configured to perform NAN scanning using the third scanning strategy, where a time interval of NAN scanning of the third scanning strategy is greater than a time interval of NAN scanning of the second scanning strategy, and DW of a NAN of the third scanning strategy is greater than DW of a NAN of the second scanning strategy.
In an implementation manner of the present application, after the scan control unit 603 adjusts from the current second scan strategy to the first scan strategy, the scan control unit 603 is further configured to adjust from the current first scan strategy to the second scan strategy if the current power of the NAN device is greater than or equal to a second threshold, or the NAN device is in a charging state and the current power of the NAN device is greater than or equal to the second threshold.
In an implementation manner of the present application, in determining the first scanning strategy, the determining unit 602 is specifically configured to: determining a first scanning strategy according to first information, wherein the first information comprises at least one of the following: a current power of the NAN device, a number of currently scanned NAN devices, and a duration of time that the NAN device uses a NAN function.
It should be noted that the detection unit 601, the determination unit 602, and the scan control unit 603 may be implemented by a processing unit.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to perform part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes a NAN device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising a NAN device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A Neighbor Awareness Network (NAN) scanning adjustment method is applied to NAN equipment and comprises the following steps:
detecting the power of the NAN device;
determining a first scanning strategy under the condition that the current electric quantity of the NAN equipment is detected to be less than or equal to a first threshold value;
adjusting from a current second scanning strategy to the first scanning strategy, a time interval of NAN scanning of the first scanning strategy is larger than that of NAN scanning of the second scanning strategy, and a discovery window DW of a NAN of the first scanning strategy is larger than that of a NAN of the second scanning strategy.
2. The method of claim 1, wherein prior to determining the first scanning strategy, the method further comprises:
determining that the NAN device is connected with a particular NAN device;
for a first duration, NAN scanning is stopped.
3. The method of claim 2, wherein after determining that the NAN device is connected to a distinct NAN device, the method further comprises:
determining that the NAN device remains connected to the particular NAN device for a second duration, the second duration being greater than or equal to the first duration.
4. The method of claim 1, wherein prior to determining the first scanning strategy, the method further comprises:
determining that an application running in a foreground of the NAN device is a first target application;
for a third duration, NAN scanning is stopped.
5. The method of any of claims 2-4, wherein after the ceasing NAN scanning, the method further comprises:
and in a first time length or a third time length, if the fact that the application running in the foreground of the NAN equipment is a second target application is detected, determining a third scanning strategy, and using the third scanning strategy to scan the NAN, wherein the NAN scanning time interval of the third scanning strategy is larger than the NAN scanning time interval of the second scanning strategy, and the DW of the NAN of the third scanning strategy is larger than the DW of the NAN of the second scanning strategy.
6. A neighbor aware network, NAN, scan adjustment method comprising all the features of the method of any one of claims 1 to 5, and further comprising, after the adjustment from the current second scanning policy to the first scanning policy:
adjusting from the current first scanning strategy to the second scanning strategy when the current power of the NAN device is greater than or equal to a second threshold value, or the NAN device is in a charging state and the current power of the NAN device is greater than or equal to the second threshold value.
7. A neighbor aware network, NAN, scan adjustment method comprising all the features of the method of any one of claims 1 to 5, and wherein said determining a first scanning policy comprises:
determining a first scanning strategy according to first information, wherein the first information comprises at least one of the following: a current power of the NAN device, a number of currently scanned NAN devices, and a duration of time that the NAN device uses a NAN function.
8. A Neighbor Awareness Network (NAN) scanning adjusting device is applied to NAN equipment and comprises the following steps:
a detection unit for detecting the electric quantity of the NAN device;
a determining unit, configured to determine a first scanning policy when detecting that a current power amount of the NAN device is less than or equal to a first threshold;
a scan control unit, configured to adjust from a current second scan strategy to the first scan strategy, where a time interval of NAN scanning of the first scan strategy is greater than a time interval of NAN scanning of the second scan strategy, and a discovery window DW of a NAN of the first scan strategy is greater than a DW of a NAN of the second scan strategy.
9. A neighbor aware network, NAN, device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-7.
CN201810947442.5A 2018-08-20 2018-08-20 NAN scanning adjustment method and related equipment Active CN109195149B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810947442.5A CN109195149B (en) 2018-08-20 2018-08-20 NAN scanning adjustment method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810947442.5A CN109195149B (en) 2018-08-20 2018-08-20 NAN scanning adjustment method and related equipment

Publications (2)

Publication Number Publication Date
CN109195149A CN109195149A (en) 2019-01-11
CN109195149B true CN109195149B (en) 2021-03-09

Family

ID=64918911

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810947442.5A Active CN109195149B (en) 2018-08-20 2018-08-20 NAN scanning adjustment method and related equipment

Country Status (1)

Country Link
CN (1) CN109195149B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109618393B (en) * 2019-02-01 2021-03-02 Oppo广东移动通信有限公司 Communication control method, communication control device, mobile terminal and storage medium
CN110418396A (en) * 2019-07-12 2019-11-05 宇龙计算机通信科技(深圳)有限公司 Control method, device, terminal and the storage medium of WIFI network
CN112449412B (en) * 2019-08-28 2024-01-05 阿里巴巴集团控股有限公司 Equipment awakening method and related equipment for executing same

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104716993A (en) * 2013-12-16 2015-06-17 诺基亚公司 Method, apparatus, and computer program product for service discovery in short-range communication environment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ZA200900132B (en) * 2006-08-04 2010-03-31 Microsoft Corp Synchronization between wireless devices while saving power
WO2014126606A1 (en) * 2013-02-12 2014-08-21 Qi Emily H Methods, wireless communication stations, and system for synchronizing devices and neighbor area networking (nan) configuration
US20140328168A1 (en) * 2013-05-06 2014-11-06 Minyoung Park Apparatus, system and method of adjusting transmission intervals for discovery frames
US9998535B2 (en) * 2014-05-02 2018-06-12 Apple Inc. Method and apparatus for coordinating multiple peer-to-peer networks
KR102251353B1 (en) * 2014-11-25 2021-05-12 삼성전자주식회사 Method for organizing proximity network and an electronic device thereof
US10165622B2 (en) * 2015-06-10 2018-12-25 Samsung Electronics Co., Ltd. Method and system for synchronizing communication between nodes in a Bluetooth network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104716993A (en) * 2013-12-16 2015-06-17 诺基亚公司 Method, apparatus, and computer program product for service discovery in short-range communication environment

Also Published As

Publication number Publication date
CN109195149A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN108733334B (en) Image quality parameter adjusting method, device, terminal and storage medium
US11166330B2 (en) Data-stream allocation method for link aggregation and related devices
US10051648B2 (en) Selective prioritization of voice over data
CN109195149B (en) NAN scanning adjustment method and related equipment
CN107748685B (en) Application program starting control method and device, terminal equipment and storage medium
WO2019024649A1 (en) Application program launching method, device, storage medium and terminal
KR20160135779A (en) Hybrid telecommunications network connection indicator
KR20120076859A (en) Method and apparatus for synchronizing keep alive packet in a portable terminal
CN110870292B (en) Selectively communicating one or more services in a multi-Subscriber Identity Module (SIM) multi-standby electronic device
KR20180008503A (en) Renewing registrations for client applications installed on different proximate client devices
EP3397010B1 (en) Method, apparatus, and product for transmitting activation-related system information
CN112738745A (en) Method for controlling network connection and related product
KR20230147716A (en) NETWORK ACCESS METHOD, NETWORK ACCESS APPARATUS, AND STORAGE MEDIUM
CN103814591A (en) Communication method, access network equipment and UE (user equipment) of different-format networks
CN109376062B (en) Network state prompting method and related device
WO2019047708A1 (en) Resource configuration method and related product
US9730127B2 (en) Handover method and apparatus of electronic device in wireless communication system
CN115134901A (en) Communication processing method and device, terminal and readable storage medium
EP3486823B1 (en) System notification service control method, apparatus, terminal device, and storage medium
CN104052801B (en) A kind of information processing method and electronic equipment
CN109275125B (en) Resource sharing method, device, equipment and storage medium
US11800188B2 (en) System and method of contextual standby of set top box
CN113286349B (en) Personal hot spot connection method, device, terminal and storage medium
CN108990039B (en) Data transmission method and related device
EP4021117A1 (en) Transmission bandwidth determination method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant