WO2022247468A1 - Data processing method and apparatus, and electronic device and storage medium - Google Patents

Data processing method and apparatus, and electronic device and storage medium Download PDF

Info

Publication number
WO2022247468A1
WO2022247468A1 PCT/CN2022/085069 CN2022085069W WO2022247468A1 WO 2022247468 A1 WO2022247468 A1 WO 2022247468A1 CN 2022085069 W CN2022085069 W CN 2022085069W WO 2022247468 A1 WO2022247468 A1 WO 2022247468A1
Authority
WO
WIPO (PCT)
Prior art keywords
received signal
signal strength
electronic device
target
broadcast
Prior art date
Application number
PCT/CN2022/085069
Other languages
French (fr)
Chinese (zh)
Inventor
吕生义
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2022247468A1 publication Critical patent/WO2022247468A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • H04W48/10Access restriction or access information delivery, e.g. discovery data delivery using broadcasted information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • 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

Definitions

  • the present application relates to the technical field of communications, and more specifically, to a data processing method, device, electronic device, and storage medium.
  • the present application proposes a data processing method, device, electronic equipment and storage medium.
  • the embodiment of the present application provides a data processing method, which is applied to the first electronic device, and the method includes: determining N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, The N received signal strengths are in one-to-one correspondence with the N broadcast signals, and the N is a positive integer; determine a first received signal strength, and the first received signal strength is an average value of the N received signal strengths ; Determine the second received signal strength, the second received signal strength is the average value of M received signal strengths in the N received signal strengths, the M is a positive integer and M is less than N; according to the first The received signal strength and the second received signal strength determine a target signal strength; if the target signal strength is greater than a signal strength threshold, perform a specified operation.
  • the embodiment of the present application provides a data processing device, which is applied to the first electronic device, and the device includes: a first acquisition module, a second acquisition module, a third acquisition module, a fourth acquisition module, and an operation execution module, wherein the first acquisition module is configured to determine the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths are one-to-one with the N broadcast signals Correspondingly, the N is a positive integer; the second acquisition module is used to determine the first received signal strength, and the first received signal strength is the average value of the N received signal strengths; the third acquisition module uses For determining the second received signal strength, the second received signal strength is the average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is less than N; the fourth acquisition The module is used to determine a target signal strength according to the first received signal strength and the second received signal strength; the operation execution module is used to execute a specified operation if the target signal strength is greater than a signal strength
  • the embodiment of the present application provides an electronic device, including: one or more processors; memory; one or more application programs, wherein the one or more application programs are stored in the memory and Configured to be executed by the one or more processors, the one or more programs configured to execute the data processing method provided in the first aspect above.
  • the embodiment of the present application provides a computer-readable storage medium, where program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the data provided in the first aspect above. Approach.
  • Fig. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application.
  • Fig. 2 shows a schematic diagram of another application scenario provided by the embodiment of the present application.
  • Fig. 3 shows a schematic diagram of another application scenario provided by the embodiment of the present application.
  • Fig. 4 shows a schematic structural diagram of an earphone provided by an embodiment of the present application.
  • FIG. 5 shows a schematic diagram of a recording result of received signal strength provided by an embodiment of the present application.
  • Fig. 6 shows a flowchart of a data processing method according to an embodiment of the present application.
  • Fig. 7 shows a flowchart of a data processing method according to another embodiment of the present application.
  • FIG. 8 shows a schematic diagram of another recording result of received signal strength provided by an embodiment of the present application.
  • Fig. 9 shows a flowchart of a data processing method according to yet another embodiment of the present application.
  • Fig. 10 shows a flowchart of a data processing method according to yet another embodiment of the present application.
  • Fig. 11 shows a block diagram of a data processing device according to an embodiment of the present application.
  • Fig. 12 is a block diagram of an electronic device for executing the data processing method according to the embodiment of the present application according to the embodiment of the present application.
  • Fig. 13 is a storage unit used to store or carry program codes implementing the data processing method according to the embodiment of the present application according to the embodiment of the present application.
  • electronic devices can realize various functions such as taking pictures, surfing the Internet, and video chatting.
  • people will use electronic devices to complete corresponding operations with IoT devices to meet the functions that users want to achieve. For example, connect an electronic device to a wireless Bluetooth headset so that you can use the wireless Bluetooth headset to listen to music, make a phone call, etc.; another example is to use the electronic device to cast the screen to a smart TV, etc.
  • the electronic device In order to enable the user to connect the IoT device with the electronic device more quickly and efficiently, the electronic device usually performs a specified operation when it finds that the IoT device is nearby. For example, prompt information is displayed on the display screen to prompt the user to complete the corresponding operation. In this case, the user only needs to make the electronic device and the IoT device relatively close to view the prompt information, so that the user can complete the corresponding operation based on the prompt information. operation.
  • Bluetooth Low Energy Bluetooth Low Energy
  • BLE Bluetooth Low Energy
  • the electronic device can perform broadcast scanning. After scanning the broadcast signal sent by other devices, it can determine the received signal strength indication (Received Signal Strength Indication, RSSI) according to the broadcast signal, so as to determine the distance to other devices according to the RSSI.
  • RSSI Received Signal Strength Indication
  • d represents the distance between two devices
  • represents the absolute value of the RSSI corresponding to the broadcast signal of the IoT device received by the electronic device
  • A represents the RSSI corresponding to the broadcast signal received by the electronic device at the reference distance Absolute value
  • B is the path loss factor.
  • the distance between the electronic device and the IoT device is inversely proportional to the RSSI, and the larger the RSSI, the smaller the distance between the electronic device and the IoT device. Therefore, when the RSSI is greater than the preset threshold, the electronic device may determine that the distance to other devices is smaller than the preset value, and then perform a specified operation.
  • the first electronic device may be a user terminal 100 (for example, may be a smart phone), and the second electronic device may be a smart home device 200, which may include a smart TV, an air conditioner, a curtain
  • the control interface of the second electronic device is displayed on the first electronic device, and the user can control all devices through the control interface of the second electronic device displayed on the first electronic device.
  • the second electronic device performs a corresponding action.
  • the first electronic device may be a user terminal 100 (for example, a smart phone), and the second electronic device may be a wireless earphone system 300.
  • the first The electronic device displays pop-up information 110, in which the power of the wireless earphone system can be displayed.
  • the wireless earphone system 300 can include an earphone 320 and an earphone box 310, and the earphone box 310 can accommodate the earphone 320.
  • the housing inner wall of the earphone box 310 forms an accommodating cavity, and the earphone 320 can be accommodated in the accommodating cavity of the earphone box 310 .
  • the earphone box 310 can not only provide a cavity for accommodating the earphone 320, but also can communicate with the earphone 320, so as to obtain information such as the power and name of the earphone 320, or the network parameters of the earphone 320, so that the user terminal can pass through the earphone box 310.
  • the pairing with the earphone 320 is successful and the communication connection is realized.
  • the earphone box 310 is also used for charging the earphone 320 .
  • the power of the earphone 320 and the power of the earphone box 310 may be simultaneously displayed in the pop-up information.
  • the second electronic device when the second electronic device activates the wireless communication module, the second electronic device transmits a broadcast signal to the surroundings.
  • the second electronic device is a wireless earphone system
  • the cover of the earphone box 310 when the second electronic device is close to the first electronic device, the cover of the earphone box 310 is in a closed state, then at this time.
  • the earphone box 310 does not transmit broadcast signals to the surroundings. That is, as shown in FIG. State, as shown in FIG. 2 , the earphone box 310 transmits a broadcast signal, which can be received by the user terminal 100 , and when the received signal strength of the received broadcast signal is greater than the threshold, pop-up information 110 is displayed.
  • the wireless communication module may be a wireless fidelity (Wireless Fidelity, Wi-Fi) module, or a Bluetooth module.
  • the wireless communication module may be a Bluetooth module.
  • the first electronic The device and the second electronic device may be connected via Bluetooth, and the broadcast signal may be a Bluetooth broadcast signal, for example, a Bluetooth Low Energy (Bluetooh Low Energy, BLE) broadcast.
  • BLE Bluetooth Low Energy
  • the first electronic device can detect the broadcast signal of the second electronic device, and then can determine the signal strength of the broadcast signal received by the second electronic device, That is, the received signal strength.
  • the received signal strength of the first electronic device gradually increases.
  • the first electronic device displays pop-up information, and then the first electronic device and the second electronic device can establish a wireless connection (for example, a Bluetooth connection).
  • a connection button is displayed in the bullet box information displayed by the first electronic device, such as the connection control 111 shown in FIG. 2 , and the user clicks the connection control 111 to realize the connection between the first electronic device and the second electronic device.
  • the first electronic device is a user terminal
  • the second electronic device is an earphone
  • a wearing detection device is provided on the housing of the earphone.
  • a wearing detector 130 is provided on the housing of the earphone.
  • the device 130 is arranged on the designated surface of the earphone shell, and the designated surface is the surface where the earphone head contacts the concha cavity of the human ear when the earphone is worn.
  • a black round hole may be opened on the designated surface, and the circle What assemble in the hole is exactly a wearing detector 130, and this wearing detector 130 can be photosensitive sensor, and it comprises light-emitting unit and light-sensitive unit, and this light-emitting unit can be light-emitting diode (light-emitting diode, LED) lamp, LED lamp It emits infrared light, passes through the prism sheet on the round hole, and radiates to the outside of the earphone. If there is an opaque object in front of it, most of the light will be reflected back. The photosensitive unit judges whether there is an object blocking it according to the intensity of the reflected light. Whether it is in the wearing state.
  • this wearing detector 130 can be photosensitive sensor, and it comprises light-emitting unit and light-sensitive unit, and this light-emitting unit can be light-emitting diode (light-emitting diode, LED) lamp, LED lamp It emits infrared light, passes through the prism sheet on the round
  • the user wears the earphone, and the wearing detection device of the earphone can detect that the earphone is in the wearing state, and then initiates a connection request to the user terminal, and the user terminal completes the communication connection with the earphone.
  • the electronic device usually when the electronic device determines the received signal strength based on the received broadcast signal, and determines whether to perform a specified operation according to the received signal strength, it calculates the average signal strength according to the received signal strength corresponding to multiple broadcast information received continuously Finally, compare the average signal strength with the signal strength threshold, and trigger the execution of the specified operation when the average signal strength is greater than the signal strength threshold.
  • the electronic device usually uses the received signal strengths corresponding to 15 broadcast signals to calculate an average value of the received signal strengths, and when the average value is greater than a signal strength threshold, triggers the execution of a specified operation.
  • the inventor found that when an IoT device is discovered by an electronic device through short-distance wireless communication, it starts to record the received signal strength corresponding to the received broadcast signal. If the IoT device approaches the electronic device quickly, then Since the average signal strength needs to be calculated based on a large number of recently received broadcast signals, the execution of the specified operation will not be triggered when the electronic device is actually relatively close to the IoT device, making the timing of performing the specified operation inaccurate.
  • the electronic device uses the received signal strength corresponding to the 15 most recently received broadcast signals to calculate the average value of the received signal strength, the signal strength threshold is -65dB, and compares the average value with -65dB to determine whether to trigger a prompt.
  • the electronic device starts to record the received signal strength of the received broadcast signal. After staying for a period of time, if the Internet of Things device approaches the electronic device quickly, the change of the received signal strength value obtained is shown in Figure 5, where each row includes a permutation, and the received signal strength recorded in each permutation is equal to They are arranged in the order of the sending time of the corresponding broadcast signals from early to late.
  • the electronic device needs to receive the broadcast signal with a received signal strength of -22dB in arrangement 7 before it can calculate an average received signal strength greater than -65dB (that is, -61.86666667 in Figure 5), thereby triggering the specified operation implement.
  • -65dB that is, -61.86666667 in Figure 5
  • the electronic device needs to receive the broadcast signal with a received signal strength of -22dB in arrangement 7 before it can calculate an average received signal strength greater than -65dB (that is, -61.86666667 in Figure 5), thereby triggering the specified operation implement.
  • the distance between the IoT device and the electronic device has already met the conditions for triggering the specified operation.
  • the execution of the specified operation is not triggered, so that the execution of the specified operation is not timely enough.
  • the inventor proposes the data processing method, device, electronic device and storage medium provided by the embodiment of the present application, which can improve the accuracy of the target signal strength used to determine whether to perform a specified operation, so that the electronic device and the When the IoT devices are relatively close to each other, it can accurately control whether to perform the specified operation, prompt the accuracy of the target operation, and improve the user experience.
  • the specific data processing method is described in detail in the subsequent embodiments.
  • FIG. 6 shows a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • the data processing method is applied to a first electronic device
  • the first electronic device may be a data processing device 400 as shown in FIG. 11 and an electronic device 100 configured with the data processing device 400 (FIG. 12).
  • the following will take the first electronic device as an example to illustrate the specific process of this embodiment.
  • the first electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, etc., which will not be described here. limited.
  • the process shown in Figure 6 will be described in detail below, and the data processing method may specifically include the following steps:
  • Step S110 Determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer.
  • the second electronic device when the second electronic device starts the wireless communication module, it can transmit a broadcast signal to the surroundings, and the broadcast signal carries the network parameters of the second device, and the network parameters may include the network address of the second device, Other parameters used to establish network connections, etc.
  • the wireless communication module of the first electronic device when the wireless communication module of the first electronic device is started, it can scan the surrounding connectable wireless connection points.
  • the first electronic device can receive surrounding broadcast signals, and analyze the broadcast signals to obtain data carried in the broadcast signals.
  • the second electronic device may be an IOT device, such as a wireless bluetooth headset, a smart TV, an air conditioner, a curtain, and the like.
  • the first electronic device when receiving N broadcast signals sent by the second electronic device, may determine N received signal strengths corresponding to the N broadcast signals.
  • the N received signal strengths are in one-to-one correspondence with the N broadcast signals. That is to say, the first electronic device may determine the received signal strength corresponding to each broadcast signal in the N broadcast signals to obtain N received signal strengths.
  • N is the preset number of received signal strengths used to calculate the average received signal strength when determining whether to perform a specified operation, and its specific value may not be limited, for example, it may be 15, etc.
  • the wireless communication technology used may be Bluetooth (bluetooth, BT), such as Bluetooth Low Energy (Bluetooh Low Energy, BLE ), etc.; wireless communication technology can also be wireless local area network (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), Zigbee communication (Zigbee), near field communication technology (near field communication) , NFC) etc.
  • Bluetooth bluetooth
  • BLE Bluetooth Low Energy
  • wireless communication technology can also be wireless local area network (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), Zigbee communication (Zigbee), near field communication technology (near field communication) , NFC) etc.
  • WLAN wireless local area networks
  • WiFi wireless fidelity
  • Zigbee communication Zigbee communication
  • NFC near field communication technology
  • the first electronic device may calculate the received signal strength according to the received broadcast signal, that is, obtain the received signal strength corresponding to each broadcast signal.
  • received signal strength RxPower-SystemGain, wherein, RxPower is to perform analog/digital conversion on the received wireless signal, and then perform digital front end (digital front end, DFE) filtering and other processing, and then calculate and obtain The in-band received power of the signal; SystemGain indicates the system gain, which can be estimated according to the RF front-end.
  • the first electronic device may be provided with multiple antennas for wireless communication with the second electronic device.
  • the first electronic device can Each antenna corresponds to the received signal strength corresponding to the received broadcast signal, and processes the multiple received signal strengths corresponding to the broadcast signal (that is, the broadcast signal received by each antenna corresponds to a received signal strength), to obtain the The received signal strength corresponding to the broadcast signal.
  • multiple received signal strengths corresponding to the broadcast signal may be averaged to obtain the received signal strength corresponding to the broadcast signal.
  • the maximum value among multiple received signal strengths corresponding to the broadcast signal may be acquired to obtain the received signal strength corresponding to the broadcast signal.
  • the first electronic device may determine the N received signal strengths corresponding to the N broadcast signals each time it receives N broadcast signals, and then perform subsequent steps, that is, the process from step S120 to step S150, so that The latest signal strength used to determine whether to trigger the execution of the specified operation can be continuously calculated, so as to determine whether to execute the specified operation.
  • the first electronic device may also determine the received signal strength corresponding to the newly received broadcast signal each time it receives a new broadcast signal sent by the second electronic device, and record it; When the recorded received signal strengths reach N received signal strengths, the determination of N received signal strengths corresponding to N broadcast signals is completed, and then subsequent steps are performed, namely, the process from step S120 to step S150.
  • the first electronic device when it receives the broadcast signal sent by the second electronic device for the first time, it may determine that it matches the preset device identifier according to the device identifier carried in the broadcast signal; if the two match , it means that it is determined that the second electronic device is a pre-agreed Internet of Things device, therefore, the process from step S110 to step S150 may be executed to determine whether to perform a specified operation.
  • Step S120 Determine a first received signal strength, where the first received signal strength is an average value of the N received signal strengths.
  • the first electronic device may calculate an average value of the N received signal strengths to obtain the first received signal strength.
  • Step S130 Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
  • the first electronic device after determining the N received signal strengths corresponding to the above N broadcast signals, can also obtain M received signal strengths from the N received signal strengths, and calculate the M received signal strengths. The average value of the signal strength is obtained to obtain the second received signal strength. Therefore, two average received signal strengths for subsequent determination of the target signal strength can be determined to improve the accuracy of the target signal strength.
  • step S120 and step S130 can be executed simultaneously; step S130 can also be executed first, and then step S120 can be executed; step S120 can also be executed first, and then step S130 can be executed .
  • Step S140 Determine a target signal strength according to the first received signal strength and the second received signal strength.
  • the first electronic device after the first electronic device acquires the first received signal strength and the second received signal strength, it may determine the target signal strength according to the first received signal strength and the second received signal strength. Since two average received signal strengths (i.e., the first received signal strength and the second received signal strength) are obtained at the same time, the accuracy of the acquired target signal strength is higher according to the first received signal strength and the second received signal strength, Therefore, it can be more accurate when using the target signal strength to determine whether to perform a specified operation.
  • two average received signal strengths i.e., the first received signal strength and the second received signal strength
  • the first electronic device may obtain the maximum value of the first received signal strength and the second received signal strength as the target signal strength, so that when using the target signal strength to determine whether to perform a specified operation, it can Quickly respond to the relative proximity between electronic devices, and perform specified operations.
  • the first electronic device may also obtain the average value of the first received signal strength and the second received signal strength, and use the average value as the target signal strength;
  • the received signal strengths are assigned weights respectively, and then according to the first weight corresponding to the first received signal strength and the second weight corresponding to the second received signal strength, the first received signal strength and the second received signal strength are weighted and summed to obtain the target signal strength.
  • the specific manner of determining the target signal strength according to the first received signal strength and the second received signal strength may not be limited.
  • the sum of the first received signal strength and the second received signal strength may be obtained; then, the sum of the first received signal strength and the sum value may be obtained
  • the ratio of is used as the first ratio, and the ratio of the second received signal strength to the sum is used as the second ratio; if the first ratio is greater than the second ratio, the first ratio is increased to obtain the first weight, and obtain The difference between 1 and the first weight is used to obtain the second weight; if the second ratio is greater than the first ratio, the second ratio is increased to obtain the second weight, and the difference between 1 and the second weight is obtained to obtain the first weight Therefore, the obtained target signal strength can be made larger, so that the specified operation can be performed in response to the relative proximity between the electronic devices quickly.
  • Step S150 If the target signal strength is greater than the signal strength threshold, perform a specified operation.
  • the first device after the first device acquires the target signal strength, it can compare the target signal strength with the signal strength threshold to obtain the comparison result; according to the comparison result, determine whether the target signal strength is greater than the signal strength threshold; if If the target signal strength is greater than the signal strength threshold, it means that the distance between the first electronic device and the second electronic device is less than the preset distance (that is, the distance that triggers the execution of the specified operation), so the specified operation can be performed so that the user can quickly and efficiently Complete the corresponding operations between the first electronic device and the second electronic device; if the target signal strength is less than or equal to (that is, not greater than) the signal strength threshold, it means that the distance between the first electronic device and the second electronic device is greater than or equal to (ie not less than) the preset distance, therefore, the specified operation is not performed, and the first electronic device may repeat the above steps S110 to S150 to perform the specified operation when the target signal strength is greater than the signal strength threshold.
  • the signal strength threshold may be a pre-set critical value of the signal strength that triggers the execution of the specified operation.
  • the value of the signal strength threshold may be set according to the actual scene, and its specific value may not be limited.
  • the signal strength threshold may be -65dB.
  • the execution of the specified operation by the first electronic device may include: displaying pop-up information on the current display interface.
  • the pop-up information may include prompt information, for example, it may be the pop-up information shown in FIG. 2 .
  • the content included in the pop-up information may not be limited, and may be set according to the actual second electronic device and usage scenarios.
  • the execution of the specified operation by the first electronic device may include: switching the currently displayed interface to the specified interface.
  • the specified interface may be an interface that needs to be displayed to realize a required application scenario, and the specific specified interface may not be limited, for example, it may be the control interface shown in FIG. 1 .
  • the data processing method provided by the embodiment of the present application determines the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths correspond to the N broadcast signals one by one, and then determines The average value of the N received signal strengths is obtained to obtain the first received signal strength, and the average value of the M received signal strengths in the N received signal strengths is determined to obtain the second received signal strength. Since N is less than M, then according to The first received signal strength and the second received signal strength determine the target signal strength used to determine whether to perform the specified operation.
  • FIG. 7 shows a schematic flowchart of a data processing method provided by another embodiment of the present application.
  • the data processing method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 7 will be described in detail below, and the data processing method may specifically include the following steps:
  • Step S210 Determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer.
  • Step S220 Determine the first received signal strength, where the first received signal strength is the average value of the N received signal strengths.
  • step S210 and step S220 in the embodiment of the present application, reference may be made to the contents of the foregoing embodiments for step S210 and step S220, and details are not repeated here.
  • Step S230 Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
  • the M received signal strengths may be the received signal strength corresponding to the specified broadcast signal among the N received signal strengths , specifying that the broadcast signals are M broadcast signals most recently sent by the second electronic device among the N broadcast signals, and the strengths of the M received signals correspond to the M broadcast signals one-to-one. That is to say, the first electronic device may determine the nearest M broadcast signals among the above N broadcast signals, and obtain the received signal strength corresponding to each of the M broadcast signals, to obtain the above M received signal strengths.
  • N is 15, M is 5, and the N received signal strengths are arranged in the order of their corresponding broadcast signals as follows: -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, then the last 5 received signal strengths in the arrangement above the M received signal strengths, namely -85, -86 , -80, -86, -85. Since the obtained second received signal strength is calculated according to the received signal strength corresponding to the most recently sent M broadcast signals among the N broadcast signals, the obtained second received signal strength can better reflect the current real received signal strength .
  • Step S240 Obtain a difference between the second received signal strength and the first received signal strength.
  • the first electronic device may obtain the second received signal strength.
  • the difference between the signal strength and the first received signal strength is used to determine whether a rapid approach occurs between the second electronic device and the first electronic device.
  • the difference between the second received signal strength and the first received signal strength refers to a difference obtained by subtracting the first received signal strength from the second received signal strength.
  • Step S250 Determine whether the difference is greater than a first threshold.
  • the electronic device after the electronic device obtains the difference between the second received signal strength and the first received signal strength, it can compare the difference with the first threshold to obtain the comparison result; according to the comparison result , determine whether the difference between the second received signal strength and the first received signal strength is greater than the first threshold; if the difference is greater than the first threshold, that is, the difference between the second received signal strength and the first received signal strength is smaller If the value is large, it means that the second electronic device is approaching the first electronic device rapidly; if the difference is less than or equal to (that is, not greater than) the first threshold, that is, the difference between the second received signal strength and the first received signal strength If the difference is small, it means that the second electronic device does not approach the first electronic device rapidly.
  • the first threshold value is a positive number, and its specific value may not be limited, for example, it may be 3dB, 5dB, 7dB and so on.
  • the difference between the average received signal strength calculated by the M received signal strengths and the average received signal strength calculated by using the above N received signal strengths is also relatively large, so the difference between the above second received signal strength and the first received signal strength can be
  • the difference between the second electronic device and the first electronic device is compared with the first threshold, so as to determine whether a rapid approach occurs between the second electronic device and the first electronic device.
  • step S260 use the second received signal strength as the target signal strength.
  • step S270 use the first received signal strength as a target signal strength.
  • the first electronic device judges whether the above difference is greater than the first threshold, if the difference is greater than the first threshold, it means that the second electronic device is approaching the first electronic device rapidly. If the second received signal strength reflecting the current received signal strength is used as the target signal strength, it is possible to more accurately control whether to execute the specified operation. Moreover, since the calculated second received signal strength will be greater than the calculated first received signal strength in the case of fast approach, the execution of the specified operation can be triggered more quickly.
  • the first electronic device determines whether the above difference is greater than the first threshold, if the difference is less than or equal to (that is, not greater than) the first threshold, it means that there is no rapid approach between the second electronic device and the first electronic device , at this time, since more received signal strengths are used to calculate the first received signal strength, the calculated average received signal strength is not accurate enough to avoid the fluctuation of received signal strength, therefore, the first received signal strength is taken as the target signal strength , which can more accurately control whether to perform the specified operation.
  • Step S280 If the target signal strength is greater than the signal strength threshold, perform a specified operation.
  • the electronic device uses the received signal strength corresponding to the 15 most recently received broadcast signals to calculate the average value of the received signal strength, the signal strength threshold is -65dB, the first threshold is 4dB, and the average value and -65dB are calculated. Compare to determine whether to trigger the execution of the specified operation. In this case, when the IoT device is discovered by the electronic device, the electronic device starts to record the received signal strength of the received broadcast signal.
  • each row includes a permutation, and the received signal strength recorded in each permutation
  • the signal strengths are arranged in the order of the sending time of the corresponding broadcast signals from early to late.
  • the average received signal strength namely the first received signal strength
  • the average received signal strength corresponding to the 5 most recently received broadcast signals is also calculated in Fig. 8 received signal strengths (i.e. second received signal strengths), i.e.
  • the last 5 received signal strengths for each permutation form permutation 1', permutation 2', permutation 3', permutation 4' and permutation 5' in Figure 8, and
  • the average received signal strength is calculated respectively to obtain the second received signal strength. Therefore, after receiving the broadcast signal corresponding to the received signal strength of -50dB in arrangement 2, the calculated first received signal strength is -82.13333333dB, and the second received signal strength is -77.4dB.
  • the difference between the signal strength and the first received signal strength is greater than 4dB, so the second received signal strength is taken as the target signal strength; 2.
  • the received signal strength (-54.6dB) is greater than -65dB, so perform the specified operation.
  • the execution of the specified operation can only be triggered after the broadcast signal of -22dB.
  • the execution of the specified operation can be triggered when the broadcast signal corresponding to the received signal strength of -24dB is received, realizing the second electronic device When quickly approaching the first electronic device, a specified operation can be executed in time, thereby improving user experience.
  • the data processing method provided by the embodiment of the present application is different from the foregoing embodiments in that when determining the target signal strength according to the first received signal strength and the second received signal strength, by obtaining the second received signal strength and the first received signal strength When the difference is greater than the first threshold, the second received signal strength is used as the target signal strength, and when the difference is less than or equal to the first threshold, the first received signal strength is used as the target signal strength, which can realize More precise control over whether to perform specified actions. Moreover, when the above difference is greater than the first threshold, it means that the second electronic device is approaching the first electronic device rapidly, and the calculated second received signal strength will be greater than the calculated first received signal strength, so it can be more Quickly trigger the execution of the specified action.
  • FIG. 9 shows a schematic flowchart of a data processing method provided in another embodiment of the present application.
  • the data processing method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 9 will be described in detail below, and the data processing method may specifically include the following steps:
  • Step S300 Each time a broadcast signal newly sent by the second electronic device is received, determine N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths are consistent with the The N broadcast signals are in one-to-one correspondence, and the N is a positive integer.
  • the first electronic device may record the received signal strength corresponding to the broadcast signal sent by the second electronic device each time, and the number of records is N, that is, only the most recent N N received signal strengths corresponding to the broadcast signal.
  • N the number of records
  • the first electronic device may read the recorded N received signal strengths to perform subsequent steps. Therefore, the latest signal strength used to determine whether to trigger the execution of the specified operation can be continuously calculated, and then it can be determined whether to execute the specified operation.
  • the first electronic device subsequently determines the target signal strength, and the target signal strength is greater than the signal strength threshold, and executes the specified operation, then even if a newly sent broadcast signal is received, the following process may not be executed, In order to avoid affecting user experience due to repeated execution of specified operations.
  • the N received signal strengths corresponding to the most recent N broadcast signals recorded by the electronic device include the received signal strengths corresponding to the broadcast signals sent by the second electronic device received in the previous N-1 times, that is, the recorded There are the first N-1 received signal strengths, and the first N-1 received signal strengths are in one-to-one correspondence with the latest N-1 broadcast signals sent by the second electronic device.
  • the electronic device may obtain the first N-1 received signal strengths currently recorded and the received signal strengths corresponding to the newly sent broadcast signals, to obtain N received signal strengths.
  • the N received signal strengths corresponding to the N broadcast signals form a target queue in the order of the sending time of the broadcast signals from early to late, and the first electronic device manages the target queue, The first received signal strength and the second received signal strength are continuously calculated, so that after the target signal strength is determined, it is determined whether to trigger the execution of the specified operation.
  • the first electronic device each time the first electronic device receives a broadcast signal newly sent by the second electronic device, it obtains the received signal strength at the head of the queue in the target queue as the target received signal strength; deletes the target received signal in the target queue Strength, and add the received signal strength corresponding to the newly sent broadcast signal to the tail of the target queue, thus, the first electronic device can only store N received signal strengths, and it is the N most recently sent by the second electronic device The received signal strength corresponding to the broadcast signal.
  • the received signal strength in the currently stored target queue is: -80, -86, -85, -86, -80, -86, -85, -86, -85, - 86, -80, -86, -85, -86, -80, -86, -85; after receiving the broadcast signal corresponding to -50dB, the received signal strength in the target queue is updated to: -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -50.
  • subsequent determination of the first received signal strength and the second received signal strength may be performed directly according to the received signal strength in the target queue.
  • Step S310 Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
  • Step S320 Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
  • the second received signal strength is the average value of M received signal strengths among the N received signal strengths
  • the M is a positive integer and M is smaller than N
  • the M received signal strengths are the N
  • the specified broadcast signal is the M broadcast signal most recently sent by the second electronic device among the N broadcast signals
  • the M received signal strength is related to the specified broadcast signal.
  • the M broadcast signals are in one-to-one correspondence.
  • Step S330 Obtain a difference between the second received signal strength and the first received signal strength.
  • Step S340 Determine whether the difference is greater than a first threshold.
  • step S350 if the difference is less than or equal to the first threshold, use the first received signal strength as a target signal strength.
  • step S360 determine whether the differences between the second received signal strength and the first received signal strength determined for the previous P times are all greater than the first threshold.
  • the P is a positive integer.
  • the target signal strength is determined, and the target signal strength Compared with the signal strength threshold to determine whether to perform the specified operation. Therefore, in the case that the second received signal strength and the second received signal strength have been calculated for P times before, the difference between the second received signal strength determined for the previous P times and the first received signal strength determined last time can be judged. Whether all the differences are greater than the first threshold. If the difference calculated multiple times is greater than the first threshold, it means that the difference between the second received signal strength and the first received signal strength is large, and it is not accidental. Therefore, the difference between the second electronic device and the first electronic device can be accurately determined.
  • the difference determined at any one of the differences calculated multiple times is not greater than the first threshold, it means that the difference between the second received signal strength and the first received signal strength is relatively large, which may be accidental, so the second received signal strength can be accurately determined. No rapid approach occurs between the electronic device and the first electronic device.
  • the specific value of P may not be limited, for example, it may be 2 times, it may be 3 times, etc.
  • step S370 use the second received signal strength determined this time as the target signal strength.
  • the second received signal determined this time can be strength as the target signal strength.
  • step S380 set the current determined The first received signal strength of is used as the target signal strength.
  • any one of the difference values calculated multiple times determines that the difference value is not greater than the first threshold value, it can be accurately determined that there is no rapid approach between the second electronic device and the first electronic device. , so the first received signal strength can be used as the target signal strength.
  • Step S390 If the target signal strength is greater than the signal strength threshold, perform a specified operation.
  • the target signal strength is less than or equal to (that is, not greater than) the signal strength threshold, it means that the distance between the first electronic device and the second electronic device is greater than or equal to (that is, not less than) the preset distance, therefore, the specified operation is not performed, At this time, it may return to step S310, and execute the above process, so as to execute a specified operation when the target signal strength is greater than the signal strength threshold.
  • the data processing method provided by the embodiment of the present application is different from the previous embodiment in that when it is determined that the difference between the second received signal strength and the first received signal strength is greater than the first threshold, the second The second received signal strength is used as the target signal strength only when the difference between the received signal strength and the first received signal strength is greater than the first threshold, which avoids the inaccuracy of the determined target signal strength caused by accidental factors.
  • FIG. 10 shows a schematic flowchart of a data processing method provided in another embodiment of the present application.
  • the data processing method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 10 will be described in detail below, and the data processing method may specifically include the following steps:
  • Step S410 Determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer.
  • Step S420 Determine a first received signal strength, where the first received signal strength is an average value of the N received signal strengths.
  • Step S430 judging whether the time period after the second electronic device is discovered based on the wireless communication reaches a preset time period.
  • step S440 to step S460 are executed.
  • Step S440 Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
  • the M received signal strengths are received signal strengths corresponding to designated broadcast signals among the N received signal strengths
  • the designated broadcast signals are the M broadcasts most recently sent by the second electronic device among the N broadcast signals signals
  • the M received signal strengths are in one-to-one correspondence with the M broadcast signals.
  • Step S450 Determine a target signal strength according to the first received signal strength and the second received signal strength.
  • Step S460 If the target signal strength is greater than the signal strength threshold, perform a specified operation.
  • step S470 is executed.
  • Step S470 If the first received signal strength is greater than the signal strength threshold, perform a specified operation.
  • the user may not quickly bring the two closer together at first. Therefore, in order to save the amount of calculation, if the time after the discovery of the second electronic device based on wireless communication has not reached the preset time, when obtaining the received signal strength for determining whether to perform a specified operation, it may be based on only N received signals Strength, to obtain the first received signal strength, and compare the first received signal strength with the signal strength threshold, so as to determine whether to execute the specified operation according to the comparison result.
  • the specific value of the preset duration may not be limited, for example, it may be 2 seconds, 5 seconds, 10 seconds and so on.
  • the preset duration may be determined according to the duration between the moment when the second electronic device is discovered through historically recorded wireless communication and the moment when the first electronic device and the second electronic device are relatively fast approached.
  • the first received signal strength and the second received signal strength can be acquired at the same time, and after determining the target signal strength , determine whether to trigger the execution of the specified operation according to the target signal strength.
  • the user since the user generally makes the distance between the second electronic device and the first electronic device reach before triggering execution of a specified operation, the user may not quickly bring the two closer together at first. However, before the second electronic device approaches the first electronic device quickly, that is, when the time period after the second electronic device is discovered based on wireless communication does not reach the preset time period, in order to save the amount of calculation, only the first electronic device can be determined. The signal strength is received, and the first received signal strength is compared with a signal strength threshold, so as to determine whether to perform a specified operation according to the comparison result.
  • the second electronic device if it is determined for T consecutive times that the first received signal strength is less than or equal to the signal strength threshold, and the specified operation is not performed, It can be determined whether the difference between the first received signal strengths acquired twice in the previous T times of acquisition is greater than the second threshold; if the first received signal strengths acquired in the previous T times are adjacent If the difference between the first received signal strength obtained twice is greater than the second threshold, it means that the difference between the average received signal strength obtained twice in the previous T times is relatively large, Therefore, it can be indicated that the second electronic device and the first electronic device may start to approach quickly.
  • the specific value of T may not be limited, for example, it may be 2 times, it may be 4 times, it may be 6 times, etc.
  • the data processing method provided by the embodiment of the present application is different from the previous embodiment in that, when the first electronic device discovers the second electronic device based on wireless communication, the time period after the first electronic device has not reached the preset time period, only according to the first received signal Intensity, to determine whether to perform a specified operation; when the first electronic device discovers the second electronic device based on wireless communication, the time period after the second electronic device reaches the preset time length, acquires the above first received signal strength and the second received signal strength at the same time, and determines After the target signal strength, the target signal strength is used to determine whether to perform the specified operation. Therefore, while effectively reducing the processing load of the first electronic device, the accuracy of execution of the specified operation can be ensured.
  • FIG. 11 shows a structural block diagram of a data processing apparatus 600 provided by an embodiment of the present application.
  • the data processing apparatus 600 employs the above-mentioned electronic equipment, and the data processing apparatus 600 includes: a first acquisition module 610 , a second acquisition module 620 , a third acquisition module 630 , a fourth acquisition module 640 and an operation execution module 650 .
  • the first acquisition module 610 is configured to determine the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths correspond to the N broadcast signals one by one , the N is a positive integer; the second acquisition module 620 is used to determine the first received signal strength, the first received signal strength is the average value of the N received signal strengths; the third acquisition module 630 For determining the second received signal strength, the second received signal strength is the average value of M received signal strengths in the N received signal strengths, the M is a positive integer and M is less than N; the fourth The acquiring module 640 is configured to determine a target signal strength according to the first received signal strength and the second received signal strength; the information display module 640 is configured to perform a specified operation if the target signal strength is greater than a signal strength threshold.
  • the fourth obtaining module 640 may be configured to: obtain a difference between the second received signal strength and the first received signal strength; if the difference is greater than a first threshold, the The second received signal strength is used as the target signal strength.
  • the fourth obtaining module 640 may also be configured to: if the difference is less than or equal to the first threshold, use the first received signal strength as the target signal strength.
  • the M received signal strengths are received signal strengths corresponding to specified broadcast signals among the N received signal strengths
  • the specified broadcast signal is the second electronic device among the N broadcast signals
  • the received signal strengths of the M are in one-to-one correspondence with the M broadcast signals.
  • the operation execution module 640 may be used to:
  • the third acquiring module 630 may be configured to: perform the determining of the second received signal strength when the time period after the second electronic device is discovered based on wireless communication reaches a preset time period.
  • the operation execution module 650 may also be configured to: if the first received signal strength is greater than the signal strength threshold, if the first received signal strength is greater than the signal strength threshold when the time after the second electronic device is discovered based on wireless communication has not reached a preset time, perform a specified operation .
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
  • the N received signal strengths are in one-to-one correspondence with the N broadcast signals, Then determine the average value of the N received signal strengths to obtain the first received signal strength, and determine the average value of the M received signal strengths in the N received signal strengths to obtain the second received signal strength. Since N is less than M, Then determine the target signal strength for determining whether to perform the specified operation according to the first received signal strength and the second received signal strength.
  • the electronic device 700 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, a smart watch, and a smart bracelet.
  • the electronic device 700 in this application may include one or more of the following components: a processor 710, a memory 720, and one or more application programs, wherein one or more application programs may be stored in the memory 720 and configured to be used by One or more processors 710 are executed, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • Processor 710 may include one or more processing cores.
  • the processor 710 uses various interfaces and lines to connect various parts in the entire electronic device 700, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 720, and calling data stored in the memory 720.
  • the processor 710 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 710 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the displayed content
  • the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 710, but may be realized by a communication chip alone.
  • the memory 720 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). Memory 720 may be used to store instructions, programs, codes, sets of codes, or sets of instructions.
  • the memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like.
  • the storage data area can also store data created by the electronic device 700 during use (such as phonebook, audio and video data, chat record data) and the like.
  • FIG. 13 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • Program codes are stored in the computer-readable medium 800, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
  • the computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium).
  • the computer-readable storage medium 800 has a storage space for program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • Program code 810 may, for example, be compressed in a suitable form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephone Function (AREA)
  • Circuits Of Receivers In General (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed in the present application are a data processing method and apparatus, and an electronic device and a storage medium. The data processing method is applied to a first electronic device, and the data processing method comprises: determining N received signal strengths corresponding to N detected broadcast signals that are sent by a second electronic device, wherein the N received signal strengths correspond to the N broadcast signals on a one-to-one basis, N being a positive integer; determining a first received signal strength, wherein the first received signal strength is the average value of the N received signal strengths; determining a second received signal strength, wherein the second received signal strength is the average value of M of the N received signal strengths, M being a positive integer, and M being less than N; determining a target signal strength according to the first received signal strength and the second received signal strength; and if the target signal strength is greater than a signal strength threshold value, executing a specified operation. By means of the method, in response to a first electronic device being relatively close to a second electronic device, the first electronic device can accurately execute a specified operation.

Description

数据处理方法、装置、电子设备及存储介质Data processing method, device, electronic device and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年5月26日提交的申请号为202110579090.4的中国申请的优先权,其在此出于所有目的通过引用将其全部内容并入本文。This application claims priority to Chinese application No. 202110579090.4, filed May 26, 2021, which is hereby incorporated by reference in its entirety for all purposes.
技术领域technical field
本申请涉及通信技术领域,更具体地,涉及一种数据处理方法、装置、电子设备及存储介质。The present application relates to the technical field of communications, and more specifically, to a data processing method, device, electronic device, and storage medium.
背景技术Background technique
随着科技水平和生活水平的快速进步,电子设备(如智能手机、平板电脑等)已经逐渐成为人们生活工作中的一种不可或缺的工具。为了使用户能够更加便携和高效地完成电子设备与物联网(Internet Of Things,IOT)设备(如无线蓝牙耳机等)之间的操作,通常会在电子设备发现与物联网设备靠近时,执行目标操作。但相关技术中,电子设备与物联网设备之间相对靠近时,电子设备执行目标操作的时机不够准确,造成用户体验较低。With the rapid advancement of technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have gradually become an indispensable tool in people's life and work. In order to enable users to complete operations between electronic devices and Internet of Things (IOT) devices (such as wireless Bluetooth headsets, etc.) in a more portable and efficient manner, the target is usually executed when the electronic device is found to be close to the Internet of Things device. operate. However, in related technologies, when the electronic device is relatively close to the Internet of Things device, the timing for the electronic device to perform the target operation is not accurate enough, resulting in poor user experience.
发明内容Contents of the invention
鉴于上述问题,本申请提出了一种数据处理方法、装置、电子设备及存储介质。In view of the above problems, the present application proposes a data processing method, device, electronic equipment and storage medium.
第一方面,本申请实施例提供了一种数据处理方法,应用于第一电子设备,所述方法包括:确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数;确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值;确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N;根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度;若所述目标信号强度大于信号强度阈值,执行指定操作。In the first aspect, the embodiment of the present application provides a data processing method, which is applied to the first electronic device, and the method includes: determining N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, The N received signal strengths are in one-to-one correspondence with the N broadcast signals, and the N is a positive integer; determine a first received signal strength, and the first received signal strength is an average value of the N received signal strengths ; Determine the second received signal strength, the second received signal strength is the average value of M received signal strengths in the N received signal strengths, the M is a positive integer and M is less than N; according to the first The received signal strength and the second received signal strength determine a target signal strength; if the target signal strength is greater than a signal strength threshold, perform a specified operation.
第二方面,本申请实施例提供了一种数据处理装置,应用于第一电子设备,所述装置包括:第一获取模块、第二获取模块、第三获取模块、第四获取模块以及操作执行模块,其中,所述第一获取模块用于确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数;所述第二获取模块用于确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值;所述第三获取模块用于确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N;所述第四获取模块用于根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度;所述操作执行模块用于若所述目标信号强度大于信号强度阈值,执行指定操作。In the second aspect, the embodiment of the present application provides a data processing device, which is applied to the first electronic device, and the device includes: a first acquisition module, a second acquisition module, a third acquisition module, a fourth acquisition module, and an operation execution module, wherein the first acquisition module is configured to determine the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths are one-to-one with the N broadcast signals Correspondingly, the N is a positive integer; the second acquisition module is used to determine the first received signal strength, and the first received signal strength is the average value of the N received signal strengths; the third acquisition module uses For determining the second received signal strength, the second received signal strength is the average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is less than N; the fourth acquisition The module is used to determine a target signal strength according to the first received signal strength and the second received signal strength; the operation execution module is used to execute a specified operation if the target signal strength is greater than a signal strength threshold.
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述第一方面提供的数据处理方法。In a third aspect, the embodiment of the present application provides an electronic device, including: one or more processors; memory; one or more application programs, wherein the one or more application programs are stored in the memory and Configured to be executed by the one or more processors, the one or more programs configured to execute the data processing method provided in the first aspect above.
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的数据处理方法。In the fourth aspect, the embodiment of the present application provides a computer-readable storage medium, where program code is stored in the computer-readable storage medium, and the program code can be invoked by a processor to execute the data provided in the first aspect above. Approach.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1示出了本申请实施例提供的一种应用场景的示意图。Fig. 1 shows a schematic diagram of an application scenario provided by an embodiment of the present application.
图2示出了本申请实施例提供的另一种应用场景的示意图。Fig. 2 shows a schematic diagram of another application scenario provided by the embodiment of the present application.
图3示出了本申请实施例提供的又一种应用场景的示意图。Fig. 3 shows a schematic diagram of another application scenario provided by the embodiment of the present application.
图4示出了本申请实施例提供的耳机的一种结构示意图。Fig. 4 shows a schematic structural diagram of an earphone provided by an embodiment of the present application.
图5示出了本申请实施例提供的接收信号强度的一种记录结果的示意图。FIG. 5 shows a schematic diagram of a recording result of received signal strength provided by an embodiment of the present application.
图6示出了根据本申请一个实施例的数据处理方法流程图。Fig. 6 shows a flowchart of a data processing method according to an embodiment of the present application.
图7示出了根据本申请另一个实施例的数据处理方法流程图。Fig. 7 shows a flowchart of a data processing method according to another embodiment of the present application.
图8示出了本申请实施例提供的接收信号强度的另一种记录结果的示意图。FIG. 8 shows a schematic diagram of another recording result of received signal strength provided by an embodiment of the present application.
图9示出了根据本申请又一个实施例的数据处理方法流程图。Fig. 9 shows a flowchart of a data processing method according to yet another embodiment of the present application.
图10示出了根据本申请再一个实施例的数据处理方法流程图。Fig. 10 shows a flowchart of a data processing method according to yet another embodiment of the present application.
图11示出了根据本申请一个实施例的数据处理装置的一种框图。Fig. 11 shows a block diagram of a data processing device according to an embodiment of the present application.
图12是本申请实施例的用于执行根据本申请实施例的数据处理方法的电子设备的框图。Fig. 12 is a block diagram of an electronic device for executing the data processing method according to the embodiment of the present application according to the embodiment of the present application.
图13是本申请实施例的用于保存或者携带实现根据本申请实施例的数据处理方法的程序代码的存储单元。Fig. 13 is a storage unit used to store or carry program codes implementing the data processing method according to the embodiment of the present application according to the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
随着电子设备的发展,电子设备可以实现的功能越来越多,例如,电子设备可以实现拍照、上网、视频聊天等各种功能。在一些情况下,人们会使用电子设备完成与物联网设备之间的相应操作,以满足用户想要实现的功能。例如,将电子设备与无线蓝牙耳机连接,以便使用无线蓝牙耳机听音乐、打电话等;又例如,使用电子设备投屏至智能电视等。With the development of electronic devices, more and more functions can be realized by electronic devices. For example, electronic devices can realize various functions such as taking pictures, surfing the Internet, and video chatting. In some cases, people will use electronic devices to complete corresponding operations with IoT devices to meet the functions that users want to achieve. For example, connect an electronic device to a wireless Bluetooth headset so that you can use the wireless Bluetooth headset to listen to music, make a phone call, etc.; another example is to use the electronic device to cast the screen to a smart TV, etc.
为了使用户能够更加快捷高效地将物联网设备与电子设备进行连接,通常会在电子设备发现物联网设备在附近时,会执行指定操作。例如,于显示屏中显示提示信息,以提示用户完成相应的操作,这样的话,用户只需要使电子设备与物联网设备之间相对靠近,即可查看到提示信息,从而能够基于提示信息完成相应的操作。In order to enable the user to connect the IoT device with the electronic device more quickly and efficiently, the electronic device usually performs a specified operation when it finds that the IoT device is nearby. For example, prompt information is displayed on the display screen to prompt the user to complete the corresponding operation. In this case, the user only needs to make the electronic device and the IoT device relatively close to view the prompt information, so that the user can complete the corresponding operation based on the prompt information. operation.
其中,电子设备与物联网设备之间相对靠近的过程中,其他可以发送广播信号,例如,低功耗蓝牙(Bluetooth Low Energy,BLE)广播。电子设备可以进行广播扫描,在扫描到其他设备发送的广播信号后,可以根据广播信号确定接收信号强度指示(Received Signal Strength Indication,RSSI),从而根据RSSI确定与其他设备之间的距离。根据RSSI的测距公式如下:Wherein, when the electronic device is relatively close to the IoT device, other broadcast signals may be sent, for example, Bluetooth Low Energy (Bluetooth Low Energy, BLE) broadcast. The electronic device can perform broadcast scanning. After scanning the broadcast signal sent by other devices, it can determine the received signal strength indication (Received Signal Strength Indication, RSSI) according to the broadcast signal, so as to determine the distance to other devices according to the RSSI. The ranging formula according to RSSI is as follows:
Figure PCTCN2022085069-appb-000001
其中,d表示两个设备之间的距离,|RSSI|表示电子设备接收到的物联网设备的广播信号对应的RSSI的绝对值,A表示参考距离下电子设备接收到的广播信号对应的RSSI的绝对值,B为路径损耗因子。
Figure PCTCN2022085069-appb-000001
Among them, d represents the distance between two devices, |RSSI| represents the absolute value of the RSSI corresponding to the broadcast signal of the IoT device received by the electronic device, and A represents the RSSI corresponding to the broadcast signal received by the electronic device at the reference distance Absolute value, B is the path loss factor.
可见,电子设备与物联网设备之间的距离与RSSI成反比,RSSI越大,表示电子设备与物联网设备之间的距离越小。因此,在RSSI大于预设阈值时,电子设备可以确定与其他设备之间的距离小于预设值,进而执行指定操作。It can be seen that the distance between the electronic device and the IoT device is inversely proportional to the RSSI, and the larger the RSSI, the smaller the distance between the electronic device and the IoT device. Therefore, when the RSSI is greater than the preset threshold, the electronic device may determine that the distance to other devices is smaller than the preset value, and then perform a specified operation.
例如,如图1所示,第一电子设备可以是用户终端100(例如,可以是智能手机),第二电子设备可以是智能家居设备200,该智能家居设备200可以包括智能电视、空调、窗帘等智能设备,在第一电子设备靠近第二电子设备的时候,在第一电子设备上显示第二电子设备的控制界面,用户可以通过第一电子设备显示的第二电子设备的控制界面控制所述第二电子设备执行对应的动作。For example, as shown in FIG. 1, the first electronic device may be a user terminal 100 (for example, may be a smart phone), and the second electronic device may be a smart home device 200, which may include a smart TV, an air conditioner, a curtain Such as smart devices, when the first electronic device is close to the second electronic device, the control interface of the second electronic device is displayed on the first electronic device, and the user can control all devices through the control interface of the second electronic device displayed on the first electronic device. The second electronic device performs a corresponding action.
如图2所示,第一电子设备可以是用户终端100(例如,可以是智能手机),第二电子设备可以是无线耳机系统300,在第二电子设备靠近第一电子设备的时候,第一电子设备显示弹框信息110,在该弹框信息110内可以显示无线耳机系统的电量,具体地,该无线耳机系统300可以包括耳机320和耳机盒310,耳机盒310可以容纳耳机320,具体地,耳机盒310的壳体内壁形成容纳腔,耳机320可以容纳在该耳机盒310的容纳腔内。另外,耳机盒310不仅可以提供用于容纳耳机320的容纳腔,还可以与耳机320通信,从而能获取耳机320的电量、名称或者耳机320的网络参数等信息,以便用户终端能通过耳机盒310与耳机320配对成功并实现通信连接。作为一种实施方式,该耳机盒310还用于为耳机320充电。具体地,可以在该弹框信息内同时显示耳机320的电量和耳机盒310的电量。As shown in FIG. 2, the first electronic device may be a user terminal 100 (for example, a smart phone), and the second electronic device may be a wireless earphone system 300. When the second electronic device is close to the first electronic device, the first The electronic device displays pop-up information 110, in which the power of the wireless earphone system can be displayed. Specifically, the wireless earphone system 300 can include an earphone 320 and an earphone box 310, and the earphone box 310 can accommodate the earphone 320. Specifically , the housing inner wall of the earphone box 310 forms an accommodating cavity, and the earphone 320 can be accommodated in the accommodating cavity of the earphone box 310 . In addition, the earphone box 310 can not only provide a cavity for accommodating the earphone 320, but also can communicate with the earphone 320, so as to obtain information such as the power and name of the earphone 320, or the network parameters of the earphone 320, so that the user terminal can pass through the earphone box 310. The pairing with the earphone 320 is successful and the communication connection is realized. As an implementation manner, the earphone box 310 is also used for charging the earphone 320 . Specifically, the power of the earphone 320 and the power of the earphone box 310 may be simultaneously displayed in the pop-up information.
具体地,假设两个设备分别为第一电子设备和第二电子设备,在第二电子设备启动无线通信模块的时候,第二电子设备向周围发射广播信号。如图3所示,假设第二电子设备是无线耳机系统,在第二电子设备靠近第一电子设备的时候,耳机盒310的盒盖处于闭合状态,则此时。耳机盒310并不会向周围发射广播信号,即图3所示,用户终端100并未接收到耳机盒310发射的广 播信号,也未显示弹框信息110,当用户终端100的盒盖处于打开状态,如图2所示,耳机盒310发射广播信号,能够被用户终端100接收到该广播信号,并且在接收的广播信号的接收信号强度大于阈值的时候,显示弹框信息110。Specifically, assuming that the two devices are a first electronic device and a second electronic device, when the second electronic device activates the wireless communication module, the second electronic device transmits a broadcast signal to the surroundings. As shown in FIG. 3 , assuming that the second electronic device is a wireless earphone system, when the second electronic device is close to the first electronic device, the cover of the earphone box 310 is in a closed state, then at this time. The earphone box 310 does not transmit broadcast signals to the surroundings. That is, as shown in FIG. State, as shown in FIG. 2 , the earphone box 310 transmits a broadcast signal, which can be received by the user terminal 100 , and when the received signal strength of the received broadcast signal is greater than the threshold, pop-up information 110 is displayed.
在一些实施例中,该无线通信模块可以是无线保真(wireless fidelity,Wi-Fi)模块,也可以是蓝牙模块,于本申请实施例中,该无线通信模块可以是蓝牙模块,第一电子设备和第二电子设备之间可以通过蓝牙连接,则该广播信号可以是蓝牙广播信号,例如,低功耗蓝牙(Bluetooh Low Energy,BLE)广播。随着第二电子设备与第一电子设备之间的距离的靠近,第一电子设备能够检测到第二电子设备的广播信号,进而能够确定该第二电子设备接收到的广播信号的信号强度,即接收信号强度,随着第一电子设备和第二电子设备之间的距离的靠近,第一电子设备的接收信号强度逐渐增大,当检测到的接收信号强度大于指定阈值时,第一电子设备显示弹框信息,然后,第一电子设备和第二电子设备可以建立无线连接(例如,蓝牙连接)。In some embodiments, the wireless communication module may be a wireless fidelity (Wireless Fidelity, Wi-Fi) module, or a Bluetooth module. In this embodiment of the application, the wireless communication module may be a Bluetooth module. The first electronic The device and the second electronic device may be connected via Bluetooth, and the broadcast signal may be a Bluetooth broadcast signal, for example, a Bluetooth Low Energy (Bluetooh Low Energy, BLE) broadcast. As the distance between the second electronic device and the first electronic device approaches, the first electronic device can detect the broadcast signal of the second electronic device, and then can determine the signal strength of the broadcast signal received by the second electronic device, That is, the received signal strength. As the distance between the first electronic device and the second electronic device approaches, the received signal strength of the first electronic device gradually increases. When the detected received signal strength is greater than a specified threshold, the first electronic device The device displays pop-up information, and then the first electronic device and the second electronic device can establish a wireless connection (for example, a Bluetooth connection).
例如,第一电子设备显示的弹框信息内显示有连接按钮,如图2所示的连接控件111,用户点击该连接控件111,能够实现第一电子设备和第二电子设备之间的连接。再例如,第一电子设备是用户终端,第二电子设备为耳机,耳机的壳体上设置有佩戴检测装置,如图4所示,耳机的壳体上设置有佩戴检测器130,该佩戴检测器130设置在耳机壳体的指定表面,该指定表面为该耳机被佩戴时,耳机头与人耳耳甲腔接触的表面,具体地,可以是在该指定表面开设一个黑色圆孔,这个圆孔内装配的便是一个佩戴检测器130,该佩戴检测器130可以是光感传感器,其包括发光单元和感光单元,该发光单元可以是发光二极管(light-emitting diode,LED)灯,LED灯发出红外光线,透过圆孔上的棱镜片,辐射向耳机外,如果前方有不透明物体阻挡的话,大部分光线会反射回来,感光单元根据反射回来的光线强度来判断是否有物体阻挡,来推断是否处于佩戴状态。则在用户终端显示弹框信息之后,所用户佩戴该耳机,则耳机的佩戴检测装置能够检测到该耳机处于佩戴状态,则发起连接请求至用户终端,用户终端完成与耳机之间的通信连接。For example, a connection button is displayed in the bullet box information displayed by the first electronic device, such as the connection control 111 shown in FIG. 2 , and the user clicks the connection control 111 to realize the connection between the first electronic device and the second electronic device. For another example, the first electronic device is a user terminal, the second electronic device is an earphone, and a wearing detection device is provided on the housing of the earphone. As shown in FIG. 4 , a wearing detector 130 is provided on the housing of the earphone. The device 130 is arranged on the designated surface of the earphone shell, and the designated surface is the surface where the earphone head contacts the concha cavity of the human ear when the earphone is worn. Specifically, a black round hole may be opened on the designated surface, and the circle What assemble in the hole is exactly a wearing detector 130, and this wearing detector 130 can be photosensitive sensor, and it comprises light-emitting unit and light-sensitive unit, and this light-emitting unit can be light-emitting diode (light-emitting diode, LED) lamp, LED lamp It emits infrared light, passes through the prism sheet on the round hole, and radiates to the outside of the earphone. If there is an opaque object in front of it, most of the light will be reflected back. The photosensitive unit judges whether there is an object blocking it according to the intensity of the reflected light. Whether it is in the wearing state. Then after the user terminal displays the pop-up information, the user wears the earphone, and the wearing detection device of the earphone can detect that the earphone is in the wearing state, and then initiates a connection request to the user terminal, and the user terminal completes the communication connection with the earphone.
相关技术中,通常电子设备在基于接收的广播信号,确定接收信号强度,并根据接收信号强度确定是否执行指定操作时,是根据连续接收的多个广播信息对应的接收信号强度,计算平均信号强度后,将平均信号强度与信号强度阈值比较,在平均信号强度大于信号强度阈值时,触发指定操作的执行。例如,电子设备通常会使用15个广播信号对应的接收信号强度,求取接收信号强度的平均值,并在平均值大于信号强度阈值时,触发指定操作的执行。In the related art, usually when the electronic device determines the received signal strength based on the received broadcast signal, and determines whether to perform a specified operation according to the received signal strength, it calculates the average signal strength according to the received signal strength corresponding to multiple broadcast information received continuously Finally, compare the average signal strength with the signal strength threshold, and trigger the execution of the specified operation when the average signal strength is greater than the signal strength threshold. For example, the electronic device usually uses the received signal strengths corresponding to 15 broadcast signals to calculate an average value of the received signal strengths, and when the average value is greater than a signal strength threshold, triggers the execution of a specified operation.
发明人经过长时间的研究并发现,当物联网设备被电子设备通过短距离无线通信发现后,开始记录接收到的广播信号对应的接收信号强度,若该物联网设备相对电子设备快速靠近,则由于需要根据最近接收的较多数量的广播信号计算平均信号强度,因此会导致电子设备与该物联网设备实际相距较近时,仍未触发指定操作的执行,使得执行指定操作的时机不够准确。After a long period of research, the inventor found that when an IoT device is discovered by an electronic device through short-distance wireless communication, it starts to record the received signal strength corresponding to the received broadcast signal. If the IoT device approaches the electronic device quickly, then Since the average signal strength needs to be calculated based on a large number of recently received broadcast signals, the execution of the specified operation will not be triggered when the electronic device is actually relatively close to the IoT device, making the timing of performing the specified operation inaccurate.
例如,电子设备使用最近接收的15个广播信号对应的接收信号强度,求取接收信号强度的平均值,信号强度阈值为-65dB,并以平均值与-65dB进行比较,确定是否触发提示。该情况下,当物联网设备被电子设备发现,电子设备开始记录接收到的广播信号的接收信号强度。停留一段时间后,若物联网设备向电子设备快速靠近,那么得到的接收信号强度值的变化情况如图5所示,其中,每行都包括一个排列,每个排列中记录的接收信号强度均按照其对应的广播信号的发送时间从早到晚的顺序进行排列。可以看出,电子设备需要在接收到排列7中的接收信号强度为-22dB的广播信号后,才能计算得到大于-65dB的平均接收信号强度(即图5中-61.86666667),从而触发指定操作的执行。但是实际上,该物联网设备在被快速移动后,可能在接收到接收信号强度为-24dB的广播信号时,物联网设备与电子设备的距离就已经满足触发执行指定操作的条件,这样的话,就导致了电子设备与该物联网设备实际相距较近时,仍未触发指定操作的执行,使得指定操作的执行不够及时。For example, the electronic device uses the received signal strength corresponding to the 15 most recently received broadcast signals to calculate the average value of the received signal strength, the signal strength threshold is -65dB, and compares the average value with -65dB to determine whether to trigger a prompt. In this case, when the IoT device is discovered by the electronic device, the electronic device starts to record the received signal strength of the received broadcast signal. After staying for a period of time, if the Internet of Things device approaches the electronic device quickly, the change of the received signal strength value obtained is shown in Figure 5, where each row includes a permutation, and the received signal strength recorded in each permutation is equal to They are arranged in the order of the sending time of the corresponding broadcast signals from early to late. It can be seen that the electronic device needs to receive the broadcast signal with a received signal strength of -22dB in arrangement 7 before it can calculate an average received signal strength greater than -65dB (that is, -61.86666667 in Figure 5), thereby triggering the specified operation implement. But in fact, after the IoT device is moved quickly, when it receives a broadcast signal with a received signal strength of -24dB, the distance between the IoT device and the electronic device has already met the conditions for triggering the specified operation. In this case, As a result, when the actual distance between the electronic device and the Internet of Things device is relatively close, the execution of the specified operation is not triggered, so that the execution of the specified operation is not timely enough.
针对上述问题,发明人提出了本申请实施例提供的数据处理方法、装置、电子设备以及存储介质,可以实现能够提升用于确定是否执行指定操作的目标信号强度的准确性,从而在电子设备与物联网设备之间相对靠近时,能够准确控制是否执行指定操作,提示执行目标操作的准确性,进而提升用户体验。其中,具体的数据处理方法在后续的实施例中进行详细的说明。In view of the above problems, the inventor proposes the data processing method, device, electronic device and storage medium provided by the embodiment of the present application, which can improve the accuracy of the target signal strength used to determine whether to perform a specified operation, so that the electronic device and the When the IoT devices are relatively close to each other, it can accurately control whether to perform the specified operation, prompt the accuracy of the target operation, and improve the user experience. Wherein, the specific data processing method is described in detail in the subsequent embodiments.
请参阅图6,图6示出了本申请一个实施例提供的数据处理方法的流程示意图。在具体的实施例中,所述数据处理方法应用于第一电子设备,第一电子设备可以为如图11所示的数据处理装置400以及配置有所述数据处理装置400的电子设备100(图12)。下面将以第一电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的第一电子设备可以为智能手机、平板电脑、智能手表等,在此不做限定。下面将针对图6所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Please refer to FIG. 6 , which shows a schematic flowchart of a data processing method provided by an embodiment of the present application. In a specific embodiment, the data processing method is applied to a first electronic device, and the first electronic device may be a data processing device 400 as shown in FIG. 11 and an electronic device 100 configured with the data processing device 400 (FIG. 12). The following will take the first electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understandable that the first electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, etc., which will not be described here. limited. The process shown in Figure 6 will be described in detail below, and the data processing method may specifically include the following steps:
步骤S110:确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数。Step S110: Determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer.
在本申请实施例中,第二电子设备在启动无线通信模块时,能够向周围发射广播信号,该广播信号内携带有第二设备的网络参数,该网络参数可以包括第二设备的网络地址、其他的用于建立网络连接的参数等。第一电子设备的无线通信模块在启动的时候,能够扫描周围的可连接的无线连接点。可选地,第一电子设备能够接收到周围的广播信号,解析该广播信号能够得到该广播信号内携带的数据。其中,第二电子设备可以为IOT设备,例如无线蓝牙耳机、智能电视、空调、窗帘等设备。In the embodiment of the present application, when the second electronic device starts the wireless communication module, it can transmit a broadcast signal to the surroundings, and the broadcast signal carries the network parameters of the second device, and the network parameters may include the network address of the second device, Other parameters used to establish network connections, etc. When the wireless communication module of the first electronic device is started, it can scan the surrounding connectable wireless connection points. Optionally, the first electronic device can receive surrounding broadcast signals, and analyze the broadcast signals to obtain data carried in the broadcast signals. Wherein, the second electronic device may be an IOT device, such as a wireless bluetooth headset, a smart TV, an air conditioner, a curtain, and the like.
在本申请实施例中,第一电子设备可以在接收到第二电子设备发送的N个广播信号时,确定N个广播信号对应的N个接收信号强度。其中,N个接收信号强度与N个广播信号一一对应。也就是说,第一电子设备可以确定这N个广播信号中每个广播信号对应的接收信号强度,得到N个接收信号强度。N为预先设置的确定是否执行指定操作时,计算平均接收信号强度所采用的接收信号强度的数量,其具体数值可以不做限定,例如,可以为15等In this embodiment of the present application, when receiving N broadcast signals sent by the second electronic device, the first electronic device may determine N received signal strengths corresponding to the N broadcast signals. Wherein, the N received signal strengths are in one-to-one correspondence with the N broadcast signals. That is to say, the first electronic device may determine the received signal strength corresponding to each broadcast signal in the N broadcast signals to obtain N received signal strengths. N is the preset number of received signal strengths used to calculate the average received signal strength when determining whether to perform a specified operation, and its specific value may not be limited, for example, it may be 15, etc.
在一些实施方式中,第一电子设备通过无线通信模块接收第二电子设备发送的广播信号时,使用的无线通信技术可以为蓝牙(bluetooth,BT),如低功耗蓝牙(Bluetooh Low Energy,BLE)等;无线通信技术也可以为无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、紫蜂通信(Zigbee)、近距离无线技术(near field communication,NFC)等。本申请实施例中对于具体的无线通信技术可以不做限定。In some embodiments, when the first electronic device receives the broadcast signal sent by the second electronic device through the wireless communication module, the wireless communication technology used may be Bluetooth (bluetooth, BT), such as Bluetooth Low Energy (Bluetooh Low Energy, BLE ), etc.; wireless communication technology can also be wireless local area network (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), Zigbee communication (Zigbee), near field communication technology (near field communication) , NFC) etc. In this embodiment of the present application, no limitation may be imposed on a specific wireless communication technology.
在一些实施方式中,第一电子设备可以根据接收到的广播信号计算接收信号强度,即得到每个广播信号对应的接收信号强度。在一种计算方式中,接收信号强度=RxPower-SystemGain,其中,RxPower为对接收到的无线信号进行模/数转换,再进行数字前端(digital front end,DFE)的滤波等处理后,计算获得的信号带内接收功率;SystemGain表示系统增益,可以根据射频前端预估得到。In some implementation manners, the first electronic device may calculate the received signal strength according to the received broadcast signal, that is, obtain the received signal strength corresponding to each broadcast signal. In one calculation method, received signal strength = RxPower-SystemGain, wherein, RxPower is to perform analog/digital conversion on the received wireless signal, and then perform digital front end (digital front end, DFE) filtering and other processing, and then calculate and obtain The in-band received power of the signal; SystemGain indicates the system gain, which can be estimated according to the RF front-end.
可选地,可能第一电子设备中设置有多根用于与第二电子设备进行无线通信的天线,那么该情况下,第二电子设备在每次发送广播信号时,第一电子设备能够根据每根天线对应接收到的广播信号所对应的接收信号强度,对该个广播信号对应的多个接收信号强度(即每根天线接收到的广播信号对应一个接收信号强度)进行处理,得到该个广播信号对应的接收信号强度。例如,可以对该个广播信号对应的多个接收信号强度求平均值,得到该个广播信号对应的接收信号强度。又例如,可以获取该个广播信号对应的多个接收信号强度中的最大值,得到该个广播信号对应的接收信号强度。Optionally, the first electronic device may be provided with multiple antennas for wireless communication with the second electronic device. In this case, each time the second electronic device sends a broadcast signal, the first electronic device can Each antenna corresponds to the received signal strength corresponding to the received broadcast signal, and processes the multiple received signal strengths corresponding to the broadcast signal (that is, the broadcast signal received by each antenna corresponds to a received signal strength), to obtain the The received signal strength corresponding to the broadcast signal. For example, multiple received signal strengths corresponding to the broadcast signal may be averaged to obtain the received signal strength corresponding to the broadcast signal. For another example, the maximum value among multiple received signal strengths corresponding to the broadcast signal may be acquired to obtain the received signal strength corresponding to the broadcast signal.
在一些实施方式中,第一电子设备可以在每接收到N个广播信号时,确定这N个广播信号对应的N个接收信号强度,然后执行后续步骤,即步骤S120至步骤S150的流程,从而可以不断的计算最新的用于确定是否触发执行指定操作的信号强度,并以此确定是否执行指定操作。In some implementations, the first electronic device may determine the N received signal strengths corresponding to the N broadcast signals each time it receives N broadcast signals, and then perform subsequent steps, that is, the process from step S120 to step S150, so that The latest signal strength used to determine whether to trigger the execution of the specified operation can be continuously calculated, so as to determine whether to execute the specified operation.
在另一些实施方式中,第一电子设备也可以每次接收到第二电子设备发送的新的广播信号时,对新接收到的广播信号确定其对应的接收信号强度,并将其进行记录;在记录的接收信号强度达到N个接收信号强度时,完成了确定N个广播信号对应的N个接收信号强度,然后执行后续步骤,即步骤S120至步骤S150的流程。In some other implementation manners, the first electronic device may also determine the received signal strength corresponding to the newly received broadcast signal each time it receives a new broadcast signal sent by the second electronic device, and record it; When the recorded received signal strengths reach N received signal strengths, the determination of N received signal strengths corresponding to N broadcast signals is completed, and then subsequent steps are performed, namely, the process from step S120 to step S150.
在一种可能的实施方式中,第一电子设备在首次接收到第二电子设备发送的广播信号时,可以根据广播信号中携带的设备标识,确定与预设的设备标识匹配;若两者匹配,则表示则确定该第二电子设备是预先约定的物联网设备,因此,可以执行步骤S110至步骤S150的流程,以确定是否执行指定操作。In a possible implementation manner, when the first electronic device receives the broadcast signal sent by the second electronic device for the first time, it may determine that it matches the preset device identifier according to the device identifier carried in the broadcast signal; if the two match , it means that it is determined that the second electronic device is a pre-agreed Internet of Things device, therefore, the process from step S110 to step S150 may be executed to determine whether to perform a specified operation.
步骤S120:确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值。Step S120: Determine a first received signal strength, where the first received signal strength is an average value of the N received signal strengths.
在本申请实施例中,第一电子设备在确定出以上N个广播信号对应的N个接收信号强度后,可以计算N个接收信号强度的平均值,得到第一接收信号强度。In the embodiment of the present application, after determining the N received signal strengths corresponding to the above N broadcast signals, the first electronic device may calculate an average value of the N received signal strengths to obtain the first received signal strength.
步骤S130:确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N。Step S130: Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
在本申请实施例中,第一电子设备在确定出以上N个广播信号对应的N个接收信号强度后,还可以从N个接收信号强度中获取M个接收信号强度,并计算这M个接收信号强度的平均值,得到第二接收信号强度。因此可以确定得到两个用于后续确定目标信号强度的平均接收信号强度,以提升目标信号强度的准确性。In the embodiment of the present application, after determining the N received signal strengths corresponding to the above N broadcast signals, the first electronic device can also obtain M received signal strengths from the N received signal strengths, and calculate the M received signal strengths. The average value of the signal strength is obtained to obtain the second received signal strength. Therefore, two average received signal strengths for subsequent determination of the target signal strength can be determined to improve the accuracy of the target signal strength.
需要说明的是,步骤S120与步骤S130的执行顺序可以不做限定,可以同时执行步骤S120以及步骤S130;也可以先执行步骤S130,再执行步骤S120;还可以先执行步骤S120,再执行步骤 S130。It should be noted that the order of execution of step S120 and step S130 is not limited, and step S120 and step S130 can be executed simultaneously; step S130 can also be executed first, and then step S120 can be executed; step S120 can also be executed first, and then step S130 can be executed .
步骤S140:根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度。Step S140: Determine a target signal strength according to the first received signal strength and the second received signal strength.
在本申请实施例中,第一电子设备在获取到第一接收信号强度以及第二接收信号强度之后,则可以根据第一接收信号强度以及第二接收信号强度,确定目标信号强度。由于同时得到两个平均接收信号强度(即第一接收信号强度以及第二接收信号强度),因此根据第一接收信号强度以及第二接收信号强度,所获取的目标信号强度的准确性更高,因此在利用目标信号强度确定是否执行指定操作时,能够更为准确。In the embodiment of the present application, after the first electronic device acquires the first received signal strength and the second received signal strength, it may determine the target signal strength according to the first received signal strength and the second received signal strength. Since two average received signal strengths (i.e., the first received signal strength and the second received signal strength) are obtained at the same time, the accuracy of the acquired target signal strength is higher according to the first received signal strength and the second received signal strength, Therefore, it can be more accurate when using the target signal strength to determine whether to perform a specified operation.
在一些实施方式中,第一电子设备可以获取第一接收信号强度以及第二接收信号强度中的最大值,以此作为目标信号强度,从而在利用该目标信号强度确定是否执行指定操作时,能够快速的响应于电子设备之间相对靠近,执行指定操作。In some implementations, the first electronic device may obtain the maximum value of the first received signal strength and the second received signal strength as the target signal strength, so that when using the target signal strength to determine whether to perform a specified operation, it can Quickly respond to the relative proximity between electronic devices, and perform specified operations.
在另一些实施方式中,第一电子设备也可以获取第一接收信号强度与第二接收信号强度的平均值,并将该平均值作为目标信号强度;也可以对第一接收信号强度以及第二接收信号强度分别分配权重,然后根据第一接收强度对应的第一权重以及第二接收信号强度对应的第二权重,对第一接收强度以及第二接收信号强度进行加权求和,从而得到目标信号强度。当然,具体根据第一接收信号强度以及第二接收信号强度确定目标信号强度的具体方式可以不做限定。可选地,在第一接收信号强度以及第二接收信号强度分别分配权重时,可以获取第一接收信号强度与第二接收信号强度的和值;然后,获取第一接收信号强度与该和值的比值,作为第一比例,以及第二接收信号强度与该和值的比值,作为第二比例;若第一比例大于第二比例,则增大该第一比例,得到第一权重,并且获取1与第一权重的差值,得到第二权重;若第二比例大于第一比例,则增大该第二比例,得到第二权重,并且获取1与第二权重的差值,得到第一权重,由此,可以使获得的目标信号强度更大,从而能够快速的响应于电子设备之间相对靠近,执行指定操作。In some other implementation manners, the first electronic device may also obtain the average value of the first received signal strength and the second received signal strength, and use the average value as the target signal strength; The received signal strengths are assigned weights respectively, and then according to the first weight corresponding to the first received signal strength and the second weight corresponding to the second received signal strength, the first received signal strength and the second received signal strength are weighted and summed to obtain the target signal strength. Certainly, the specific manner of determining the target signal strength according to the first received signal strength and the second received signal strength may not be limited. Optionally, when weights are assigned to the first received signal strength and the second received signal strength, the sum of the first received signal strength and the second received signal strength may be obtained; then, the sum of the first received signal strength and the sum value may be obtained The ratio of is used as the first ratio, and the ratio of the second received signal strength to the sum is used as the second ratio; if the first ratio is greater than the second ratio, the first ratio is increased to obtain the first weight, and obtain The difference between 1 and the first weight is used to obtain the second weight; if the second ratio is greater than the first ratio, the second ratio is increased to obtain the second weight, and the difference between 1 and the second weight is obtained to obtain the first weight Therefore, the obtained target signal strength can be made larger, so that the specified operation can be performed in response to the relative proximity between the electronic devices quickly.
步骤S150:若所述目标信号强度大于信号强度阈值,执行指定操作。Step S150: If the target signal strength is greater than the signal strength threshold, perform a specified operation.
在本申请实施例中,第一设备在获取到目标信号强度后,则可以将目标信号强度与信号强度阈值进行比较,得到比较结果;根据比较结果,判断目标信号强度是否大于信号强度阈值;若目标信号强度大于信号强度阈值,则表示第一电子设备与第二电子设备之间的距离小于预设距离(即触发指定操作的执行的距离),因此可以执行指定操作,以便用户能够快捷高效地完成第一电子设备与第二电子设备之间的相应操作;若目标信号强度小于或等于(即不大于)信号强度阈值,则表示第一电子设备与第二电子设备之间的距离大于或等于(即不小于)预设距离,因此,不执行指定操作,后续第一电子设备可以重复以上步骤S110至步骤S150的流程,以在目标信号强度大于信号强度阈值时,执行指定操作。其中,信号强度阈值可以为预先设置的触发指定操作的执行的信号强度的临界值,该信号强度阈值的数值可以根据实际的场景设置,其具体数值可以不做限定,例如,信号强度阈值可以为-65dB。In the embodiment of the present application, after the first device acquires the target signal strength, it can compare the target signal strength with the signal strength threshold to obtain the comparison result; according to the comparison result, determine whether the target signal strength is greater than the signal strength threshold; if If the target signal strength is greater than the signal strength threshold, it means that the distance between the first electronic device and the second electronic device is less than the preset distance (that is, the distance that triggers the execution of the specified operation), so the specified operation can be performed so that the user can quickly and efficiently Complete the corresponding operations between the first electronic device and the second electronic device; if the target signal strength is less than or equal to (that is, not greater than) the signal strength threshold, it means that the distance between the first electronic device and the second electronic device is greater than or equal to (ie not less than) the preset distance, therefore, the specified operation is not performed, and the first electronic device may repeat the above steps S110 to S150 to perform the specified operation when the target signal strength is greater than the signal strength threshold. Wherein, the signal strength threshold may be a pre-set critical value of the signal strength that triggers the execution of the specified operation. The value of the signal strength threshold may be set according to the actual scene, and its specific value may not be limited. For example, the signal strength threshold may be -65dB.
在一些实施方式中,第一电子设备执行指定操作,可以包括:于当前显示界面显示弹框信息。弹框信息可以包括提示信息等,例如,可以为图2中所示的弹框信息。当然,弹框信息所包括内容可以不做限定,可以根据实际的第二电子设备以及使用场景所设置。In some implementation manners, the execution of the specified operation by the first electronic device may include: displaying pop-up information on the current display interface. The pop-up information may include prompt information, for example, it may be the pop-up information shown in FIG. 2 . Certainly, the content included in the pop-up information may not be limited, and may be set according to the actual second electronic device and usage scenarios.
在另一些实施方式中,第一电子设备执行指定操作,可以包括:将当前显示界面切换为指定界面。指定界面可以为实现所需的应用场景需要显示的界面,具体的指定界面可以不做限定,例如,可以为图1中显示的控制界面等。In some other implementation manners, the execution of the specified operation by the first electronic device may include: switching the currently displayed interface to the specified interface. The specified interface may be an interface that needs to be displayed to realize a required application scenario, and the specific specified interface may not be limited, for example, it may be the control interface shown in FIG. 1 .
本申请实施例提供的数据处理方法,确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,该N个接收信号强度与该N个广播信号一一对应,然后确定该N个接收信号强度的平均值,得到第一接收信号强度,以及确定该N个接收信号强度中的M个接收信号强度的平均值,得到第二接收信号强度,由于N小于M,再根据第一接收信号强度以及第二接收信号强度确定出用于确定是否执行指定操作的目标信号强度,由于同时根据数量不同的接收信号强度确定了两个平均接收信号强度,因此最终根据这两个平均接收信号强度确定出的目标信号强度的准确性较高,从而在电子设备之间相对靠近时,能够准确控制是否执行指定操作,提示执行目标操作的准确性,进而提升用户体验。The data processing method provided by the embodiment of the present application determines the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths correspond to the N broadcast signals one by one, and then determines The average value of the N received signal strengths is obtained to obtain the first received signal strength, and the average value of the M received signal strengths in the N received signal strengths is determined to obtain the second received signal strength. Since N is less than M, then according to The first received signal strength and the second received signal strength determine the target signal strength used to determine whether to perform the specified operation. Since two average received signal strengths are determined according to different numbers of received signal strengths at the same time, finally according to the two average The accuracy of the target signal strength determined by the received signal strength is high, so that when the electronic devices are relatively close to each other, it can accurately control whether to execute the specified operation, prompt the accuracy of the execution of the target operation, and improve the user experience.
请参阅图7,图7示出了本申请另一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述第一电子设备,下面将针对图7所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Please refer to FIG. 7 , which shows a schematic flowchart of a data processing method provided by another embodiment of the present application. The data processing method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 7 will be described in detail below, and the data processing method may specifically include the following steps:
步骤S210:确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数。Step S210: Determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer.
步骤S220:确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均 值。Step S220: Determine the first received signal strength, where the first received signal strength is the average value of the N received signal strengths.
在本申请实施例中,步骤S210以及步骤S220可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, reference may be made to the contents of the foregoing embodiments for step S210 and step S220, and details are not repeated here.
步骤S230:确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N。Step S230: Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
在一些实施方式中,第一电子设备在确定N个接收信号强度中的M个接收信号强度的平均值时,M个接收信号强度可以为N个接收信号强度中指定广播信号对应的接收信号强度,指定广播信号为N个广播信号中第二电子设备最近发送的M个广播信号,并且M个接收信号强度与M个广播信号一一对应。也就是说,第一电子设备可以确定以上N个广播信号中最近的M个广播信号,并且获取这M个广播信号中每个广播信号对应的接收信号强度,得到以上M个接收信号强度。In some implementations, when the first electronic device determines the average value of the M received signal strengths among the N received signal strengths, the M received signal strengths may be the received signal strength corresponding to the specified broadcast signal among the N received signal strengths , specifying that the broadcast signals are M broadcast signals most recently sent by the second electronic device among the N broadcast signals, and the strengths of the M received signals correspond to the M broadcast signals one-to-one. That is to say, the first electronic device may determine the nearest M broadcast signals among the above N broadcast signals, and obtain the received signal strength corresponding to each of the M broadcast signals, to obtain the above M received signal strengths.
示例性地,N为15,M为5,N个接收信号强度按照其对应的广播信号从先到后的顺序排列为:-80、-86、-85、-86、-80、-86、-85、-86、-80、-86、-85、-86、-80、-86、-85,则M个接收信号强度以上排列中的最后5个接收信号强度,即-85、-86、-80、-86、-85。由于所得到的第二接收信号强度,是根据N个广播信号中最近发送的M个广播信号对应的接收信号强度计算得到的,因此得到的第二接收信号强度更能反映当前的真实接收信号强度。Exemplarily, N is 15, M is 5, and the N received signal strengths are arranged in the order of their corresponding broadcast signals as follows: -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, then the last 5 received signal strengths in the arrangement above the M received signal strengths, namely -85, -86 , -80, -86, -85. Since the obtained second received signal strength is calculated according to the received signal strength corresponding to the most recently sent M broadcast signals among the N broadcast signals, the obtained second received signal strength can better reflect the current real received signal strength .
步骤S240:获取所述第二接收信号强度与所述第一接收信号强度之间的差值。Step S240: Obtain a difference between the second received signal strength and the first received signal strength.
在本申请实施例中,第一电子设备在获取到第一接收信号强度以及第二接收信号强度之后,根据第一接收信号强度以及第二接收信号强度确定目标信号强度时,可以获取第二接收信号强度与第一接收信号强度之间的差值,以确定第二电子设备与第一电子设备之间是否发生快速的靠近。其中,第二接收信号强度与第一接收信号强度之间的差值,指的是将第二接收信号强度减去第一接收信号强度所得到的差值。In the embodiment of the present application, after the first electronic device obtains the first received signal strength and the second received signal strength, when determining the target signal strength according to the first received signal strength and the second received signal strength, the first electronic device may obtain the second received signal strength. The difference between the signal strength and the first received signal strength is used to determine whether a rapid approach occurs between the second electronic device and the first electronic device. Wherein, the difference between the second received signal strength and the first received signal strength refers to a difference obtained by subtracting the first received signal strength from the second received signal strength.
步骤S250:判断所述差值是否大于第一阈值。Step S250: Determine whether the difference is greater than a first threshold.
在本申请实施例中,电子设备在获取到第二接收信号强度与第一接收信号强度之间的差值之后,则可以将该差值与第一阈值进行比较,得到比较结果;根据比较结果,确定第二接收信号强度与第一接收信号强度之间的差值是否大于第一阈值;若该差值大于第一阈值,即第二接收信号强度与第一接收信号强度之间的差异较大,则表示第二电子设备与第一电子设备之间发生快速的靠近;若该差值小于或等于(即不大于)第一阈值,即第二接收信号强度与第一接收信号强度之间的差异较小,则表示第二电子设备与第一电子设备之间未发生快速的靠近。其中,第一阈值为正数,其具体数值可以不做限定,例如可以为3dB,5dB,7dB等。In the embodiment of the present application, after the electronic device obtains the difference between the second received signal strength and the first received signal strength, it can compare the difference with the first threshold to obtain the comparison result; according to the comparison result , determine whether the difference between the second received signal strength and the first received signal strength is greater than the first threshold; if the difference is greater than the first threshold, that is, the difference between the second received signal strength and the first received signal strength is smaller If the value is large, it means that the second electronic device is approaching the first electronic device rapidly; if the difference is less than or equal to (that is, not greater than) the first threshold, that is, the difference between the second received signal strength and the first received signal strength If the difference is small, it means that the second electronic device does not approach the first electronic device rapidly. Wherein, the first threshold value is a positive number, and its specific value may not be limited, for example, it may be 3dB, 5dB, 7dB and so on.
可以理解地,若第二电子设备与第一电子设备之间发生了快速的靠近,则第二电子设备发送的广播信号的接收信号强度会在短时间内发生较大的变化,因此,利用以上M个接收信号强度计算的平均接收信号强度,与利用以上N个接收信号强度计算的平均接收信号强度之间的差异也较大,故可以根据以上第二接收信号强度与第一接收信号强度之间的差值,与第一阈值进行比较,从而确定第二电子设备与第一电子设备之间是否发生了快速的靠近。It can be understood that if the second electronic device approaches the first electronic device rapidly, the received signal strength of the broadcast signal sent by the second electronic device will change greatly in a short period of time. Therefore, using the above The difference between the average received signal strength calculated by the M received signal strengths and the average received signal strength calculated by using the above N received signal strengths is also relatively large, so the difference between the above second received signal strength and the first received signal strength can be The difference between the second electronic device and the first electronic device is compared with the first threshold, so as to determine whether a rapid approach occurs between the second electronic device and the first electronic device.
若所述差值大于第一阈值,则执行步骤S260:将所述第二接收信号强度作为目标信号强度。If the difference is greater than the first threshold, perform step S260: use the second received signal strength as the target signal strength.
若所述差值小于或等于所述第一阈值,则执行步骤S270:将所述第一接收信号强度作为目标信号强度。If the difference is less than or equal to the first threshold, perform step S270: use the first received signal strength as a target signal strength.
第一电子设备在判断出以上差值是否大于第一阈值后,若该差值大于第一阈值,表示第二电子设备与第一电子设备之间发生了快速的靠近,此时,以更能反映当前的接收信号强度的第二接收信号强度作为目标信号强度,则能够更为准确地控制是否进行指定操作的执行。并且,由于快速靠近的情况下,计算的第二接收信号强度会大于计算的第一接收信号强度,因此能够更快速地触发指定操作的执行。After the first electronic device judges whether the above difference is greater than the first threshold, if the difference is greater than the first threshold, it means that the second electronic device is approaching the first electronic device rapidly. If the second received signal strength reflecting the current received signal strength is used as the target signal strength, it is possible to more accurately control whether to execute the specified operation. Moreover, since the calculated second received signal strength will be greater than the calculated first received signal strength in the case of fast approach, the execution of the specified operation can be triggered more quickly.
第一电子设备在判断出以上差值是否大于第一阈值后,若该差值小于或等于(即不大于)第一阈值,表示第二电子设备与第一电子设备之间未发生快速的靠近,此时,由于计算第一接收信号强度所使用的接收信号强度更多,避免了接收信号强度的波动而导致计算的平均接收信号强度不够准确,因此,将第一接收信号强度作为目标信号强度,能更为准确地控制是否执行指定操作。After the first electronic device determines whether the above difference is greater than the first threshold, if the difference is less than or equal to (that is, not greater than) the first threshold, it means that there is no rapid approach between the second electronic device and the first electronic device , at this time, since more received signal strengths are used to calculate the first received signal strength, the calculated average received signal strength is not accurate enough to avoid the fluctuation of received signal strength, therefore, the first received signal strength is taken as the target signal strength , which can more accurately control whether to perform the specified operation.
步骤S280:若所述目标信号强度大于信号强度阈值,执行指定操作。Step S280: If the target signal strength is greater than the signal strength threshold, perform a specified operation.
在本申请实施例中,步骤S280可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, reference may be made to the content of the foregoing embodiments for step S280, and details are not repeated here.
示例性地,电子设备使用最近接收的15个广播信号对应的接收信号强度,求取接收信号强度的平均值,信号强度阈值为-65dB,第一阈值为4dB,并以平均值与-65dB进行比较,确定是否触发执行指定操作。该情况下,当物联网设备被电子设备发现,电子设备开始记录接收到的广播信号的接收信号强度。停留一段时间后,若物联网设备向电子设备快速靠近,那么得到的接收信号强度值的变化情况如图5及图8所示,其中,每行都包括一个排列,每个排列中记录的接收信号 强度均按照其对应的广播信号的发送时间从早到晚的顺序进行排列。相比图5中只计算15个广播信号对应的接收信号强度的平均接收信号强度(即第一接收信号强度),图8中还计算了最近接收的5个广播信号对应的接收信号强度的平均接收信号强度(即第二接收信号强度),即针对每个排列的最后5个接收信号强度形成图8中的排列1’、排列2’、排列3’、排列4’和排列5’,并分别计算平均接收信号强度,得到第二接收信号强度。由此,在接收到排列2中的-50dB的接收信号强度对应的广播信号后,计算出的第一接收信号强度为-82.13333333dB,第二接收信号强度为-77.4dB,此时第二接收信号强度与第一接收信号强度的差值,已大于4dB,因此将第二接收信号强度作为目标信号强度;在接收到排列4中接收信号强度为-24dB的广播信号时,此时计算的第二接收信号强度(-54.6dB)已经大于-65dB,因此执行指定操作。Exemplarily, the electronic device uses the received signal strength corresponding to the 15 most recently received broadcast signals to calculate the average value of the received signal strength, the signal strength threshold is -65dB, the first threshold is 4dB, and the average value and -65dB are calculated. Compare to determine whether to trigger the execution of the specified operation. In this case, when the IoT device is discovered by the electronic device, the electronic device starts to record the received signal strength of the received broadcast signal. After staying for a period of time, if the Internet of Things device approaches the electronic device quickly, the changes of the received signal strength values obtained are shown in Figure 5 and Figure 8, where each row includes a permutation, and the received signal strength recorded in each permutation The signal strengths are arranged in the order of the sending time of the corresponding broadcast signals from early to late. Compared with the average received signal strength (namely the first received signal strength) of the received signal strength corresponding to only 15 broadcast signals in Fig. 5, the average received signal strength corresponding to the 5 most recently received broadcast signals is also calculated in Fig. 8 received signal strengths (i.e. second received signal strengths), i.e. the last 5 received signal strengths for each permutation form permutation 1', permutation 2', permutation 3', permutation 4' and permutation 5' in Figure 8, and The average received signal strength is calculated respectively to obtain the second received signal strength. Therefore, after receiving the broadcast signal corresponding to the received signal strength of -50dB in arrangement 2, the calculated first received signal strength is -82.13333333dB, and the second received signal strength is -77.4dB. The difference between the signal strength and the first received signal strength is greater than 4dB, so the second received signal strength is taken as the target signal strength; 2. The received signal strength (-54.6dB) is greater than -65dB, so perform the specified operation.
由此可见,相比图5所示的只计算15个广播信号对应的接收信号强度的平均接收信号强度(即第一接收信号强度)的方式中,需要在接收到排列7中的接收信号强度为-22dB的广播信号后才能触发指定操作的执行,采用本申请实施例提供的方式,可以在接收到-24dB的接收信号强度对应的广播信号时就能触发执行指定操作,实现第二电子设备快速靠近第一电子设备时,能够及时的执行指定操作,提升用户体验。It can be seen that, compared to the method shown in FIG. 5 which only calculates the average received signal strength (that is, the first received signal strength) corresponding to the received signal strength of 15 broadcast signals, it is necessary to receive the received signal strength in arrangement 7 The execution of the specified operation can only be triggered after the broadcast signal of -22dB. Using the method provided in the embodiment of the present application, the execution of the specified operation can be triggered when the broadcast signal corresponding to the received signal strength of -24dB is received, realizing the second electronic device When quickly approaching the first electronic device, a specified operation can be executed in time, thereby improving user experience.
本申请实施例提供的数据处理方法,与前述实施例不同的是,在根据第一接收信号强度以及第二接收信号强度确定目标信号强度时,通过获取第二接收信号强度与第一接收信号强度的差值,在该差值大于第一阈值时,将第二接收信号强度作为目标信号强度,在该差值小于或等于第一阈值时,将第一接收信号强度作为目标信号强度,可以实现更为准确地控制是否执行指定操作。并且,在以上差值大于第一阈值时,表示第二电子设备与第一电子设备之间快速靠近的情况下,计算的第二接收信号强度会大于计算的第一接收信号强度,因此能够更快速地触发指定操作的执行。The data processing method provided by the embodiment of the present application is different from the foregoing embodiments in that when determining the target signal strength according to the first received signal strength and the second received signal strength, by obtaining the second received signal strength and the first received signal strength When the difference is greater than the first threshold, the second received signal strength is used as the target signal strength, and when the difference is less than or equal to the first threshold, the first received signal strength is used as the target signal strength, which can realize More precise control over whether to perform specified actions. Moreover, when the above difference is greater than the first threshold, it means that the second electronic device is approaching the first electronic device rapidly, and the calculated second received signal strength will be greater than the calculated first received signal strength, so it can be more Quickly trigger the execution of the specified action.
请参阅图9,图9示出了本申请又一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述第一电子设备,下面将针对图9所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Referring to FIG. 9 , FIG. 9 shows a schematic flowchart of a data processing method provided in another embodiment of the present application. The data processing method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 9 will be described in detail below, and the data processing method may specifically include the following steps:
步骤S300:在每次接收到第二电子设备新发送的广播信号时,确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数。Step S300: Each time a broadcast signal newly sent by the second electronic device is received, determine N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths are consistent with the The N broadcast signals are in one-to-one correspondence, and the N is a positive integer.
在本申请实施例中,第一电子设备可以记录有第二电子设备每次发送的广播信号对应的接收信号强度,并且记录的数量为N个,也就是说,只记录有最近发生的N个广播信号对应的N个接收信号强度。第一电子设备可以在每次接收到第二电子设备新发送的广播信号时,则读取记录的N个接收信号强度,以执行后续步骤。从而可以不断的计算最新的用于确定是否触发指定操作的执行的信号强度,并以此确定是否执行指定操作。当然,在第一电子设备后续确定出目标信号强度后,并且目标信号强度大于信号强度阈值,执行了指定操作的情况下,则后续即使接收到新发送的广播信号,也可以不执行以下流程,以避免重复执行指定操作而影响用户体验。In this embodiment of the application, the first electronic device may record the received signal strength corresponding to the broadcast signal sent by the second electronic device each time, and the number of records is N, that is, only the most recent N N received signal strengths corresponding to the broadcast signal. Each time the first electronic device receives a broadcast signal newly sent by the second electronic device, it may read the recorded N received signal strengths to perform subsequent steps. Therefore, the latest signal strength used to determine whether to trigger the execution of the specified operation can be continuously calculated, and then it can be determined whether to execute the specified operation. Of course, after the first electronic device subsequently determines the target signal strength, and the target signal strength is greater than the signal strength threshold, and executes the specified operation, then even if a newly sent broadcast signal is received, the following process may not be executed, In order to avoid affecting user experience due to repeated execution of specified operations.
在一些实施方式中,电子设备记录的最近发生的N个广播信号对应的N个接收信号强度中包括前N-1次接收到的第二电子设备发送的广播信号对应的接收信号强度,即记录有前N-1个接收信号强度,且该前N-1个接收信号强度与第二电子设备最近发送的N-1个广播信号一一对应。电子设备可以获取当前记录的前N-1个接收信号强度以及新发送的广播信号对应的接收信号强度,得到N个接收信号强度。In some implementations, the N received signal strengths corresponding to the most recent N broadcast signals recorded by the electronic device include the received signal strengths corresponding to the broadcast signals sent by the second electronic device received in the previous N-1 times, that is, the recorded There are the first N-1 received signal strengths, and the first N-1 received signal strengths are in one-to-one correspondence with the latest N-1 broadcast signals sent by the second electronic device. The electronic device may obtain the first N-1 received signal strengths currently recorded and the received signal strengths corresponding to the newly sent broadcast signals, to obtain N received signal strengths.
在一种可能的实施方式中,N个广播信号所对应的N个接收信号强度按广播信号的发送时间的从早到晚的顺序形成目标队列,第一电子设备通过对该目标队列进行管理,以不断地计算第一接收信号强度以及第二接收信号强度,从而确定出目标信号强度后,确定是否触发指定操作的执行。其中,第一电子设备在每次接收到第二电子设备新发送的广播信号时,获取目标队列中排列于队首的接收信号强度,作为目标接收信号强度;于目标队列中删除该目标接收信号强度,并将新发送的广播信号对应的接收信号强度添加至目标队列的队尾,由此,可以实现第一电子设备只存储N个接收信号强度,并且是第二电子设备最近发送的N个广播信号对应的接收信号强度。In a possible implementation manner, the N received signal strengths corresponding to the N broadcast signals form a target queue in the order of the sending time of the broadcast signals from early to late, and the first electronic device manages the target queue, The first received signal strength and the second received signal strength are continuously calculated, so that after the target signal strength is determined, it is determined whether to trigger the execution of the specified operation. Wherein, each time the first electronic device receives a broadcast signal newly sent by the second electronic device, it obtains the received signal strength at the head of the queue in the target queue as the target received signal strength; deletes the target received signal in the target queue Strength, and add the received signal strength corresponding to the newly sent broadcast signal to the tail of the target queue, thus, the first electronic device can only store N received signal strengths, and it is the N most recently sent by the second electronic device The received signal strength corresponding to the broadcast signal.
示例性地,当前存储的目标队列中的接收信号强度按照广播信号的发送时间从早到晚的顺序为:-80、-86、-85、-86、-80、-86、-85、-86、-80、-86、-85、-86、-80、-86、-85;在新接收到-50dB对应的广播信号后,则该目标队列中的接收信号强度更新为:-86、-85、-86、-80、-86、-85、-86、-80、-86、-85、-86、-80、-86、-85、-50。Exemplarily, the received signal strength in the currently stored target queue is: -80, -86, -85, -86, -80, -86, -85, -86, -85, - 86, -80, -86, -85, -86, -80, -86, -85; after receiving the broadcast signal corresponding to -50dB, the received signal strength in the target queue is updated to: -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -86, -80, -86, -85, -50.
该实施方式中,后续在确定第一接收信号强度以及第二接收信号强度时,可以直接根据目标队列中的接收信号强度进行确定。In this implementation manner, subsequent determination of the first received signal strength and the second received signal strength may be performed directly according to the received signal strength in the target queue.
步骤S310:确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M 个接收信号强度的平均值,所述M为正整数且M小于N。Step S310: Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
步骤S320:确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N。Step S320: Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
其中,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N,所述M个接收信号强度为所述N个接收信号强度中指定广播信号对应的接收信号强度,所述指定广播信号为所述N个广播信号中所述第二电子设备最近发送的M个广播信号,所述M个接收信号强度与所述M个广播信号一一对应。Wherein, the second received signal strength is the average value of M received signal strengths among the N received signal strengths, the M is a positive integer and M is smaller than N, and the M received signal strengths are the N The received signal strength corresponding to the specified broadcast signal among the received signal strengths, the specified broadcast signal is the M broadcast signal most recently sent by the second electronic device among the N broadcast signals, and the M received signal strength is related to the specified broadcast signal. The M broadcast signals are in one-to-one correspondence.
步骤S330:获取所述第二接收信号强度与所述第一接收信号强度之间的差值。Step S330: Obtain a difference between the second received signal strength and the first received signal strength.
步骤S340:判断所述差值是否大于第一阈值。Step S340: Determine whether the difference is greater than a first threshold.
若所述差值小于或等于所述第一阈值,执行步骤S350:若所述差值小于或等于所述第一阈值,将所述第一接收信号强度作为目标信号强度。If the difference is less than or equal to the first threshold, perform step S350: if the difference is less than or equal to the first threshold, use the first received signal strength as a target signal strength.
在本申请实施例中,步骤S330至步骤S350可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, reference may be made to the contents of the foregoing embodiments for steps S330 to S350, and details are not repeated here.
若所述差值大于第一阈值,执行步骤S360:判断前P次确定的第二接收信号强度与第一接收信号强度之间的差值是否均大于第一阈值。其中,所述P为正整数。If the difference is greater than the first threshold, perform step S360: determine whether the differences between the second received signal strength and the first received signal strength determined for the previous P times are all greater than the first threshold. Wherein, the P is a positive integer.
在本申请实施例中,由于在每次接收到第二电子设备新发送的广播信号时,均会计算第一接收信号强度以及第二接收信号强度,确定出目标信号强度,并将目标信号强度与信号强度阈值比较,以此确定是否执行指定操作。因此,在此前已进行P次的计算第二接收信号强度与第二接收信号强度的情况下,可以判断前P次确定的第二接收信号强度与上一次确定的第一接收信号强度之间的差值是否均大于第一阈值。若多次计算的差值都大于第一阈值,表示第二接收信号强度与第一接收信号强度之间差异较大,并不是偶然的,因此可以准确确定出第二电子设备与第一电子设备之间快速靠近的情况。若多次计算的差值中任意一次确定的差值不大于第一阈值,表示第二接收信号强度与第一接收信号强度之间差异较大,可能是偶然的,因此可以准确确定出第二电子设备与第一电子设备之间未发生快速靠近的情况。其中,P的具体数值可以不做限定,例如,可以为2次,可以为3次等。In the embodiment of the present application, since the first received signal strength and the second received signal strength are calculated every time a broadcast signal newly sent by the second electronic device is received, the target signal strength is determined, and the target signal strength Compared with the signal strength threshold to determine whether to perform the specified operation. Therefore, in the case that the second received signal strength and the second received signal strength have been calculated for P times before, the difference between the second received signal strength determined for the previous P times and the first received signal strength determined last time can be judged. Whether all the differences are greater than the first threshold. If the difference calculated multiple times is greater than the first threshold, it means that the difference between the second received signal strength and the first received signal strength is large, and it is not accidental. Therefore, the difference between the second electronic device and the first electronic device can be accurately determined. situations of rapid approach. If the difference determined at any one of the differences calculated multiple times is not greater than the first threshold, it means that the difference between the second received signal strength and the first received signal strength is relatively large, which may be accidental, so the second received signal strength can be accurately determined. No rapid approach occurs between the electronic device and the first electronic device. Wherein, the specific value of P may not be limited, for example, it may be 2 times, it may be 3 times, etc.
若所述前P次确定的差值均大于所述第一阈值,执行步骤S370:将本次确定的第二接收信号强度作为目标信号强度。If the difference values determined for the previous P times are all greater than the first threshold, perform step S370: use the second received signal strength determined this time as the target signal strength.
在本申请实施例中,若多次计算的差值都大于第一阈值,此时已准确确定出第二电子设备与一电子设备之间快速靠近,因此可以将本次确定的第二接收信号强度作为目标信号强度。In this embodiment of the present application, if the difference calculated multiple times is greater than the first threshold, it has been accurately determined that the second electronic device is approaching the first electronic device rapidly, so the second received signal determined this time can be strength as the target signal strength.
若所述前P次确定的第二接收信号强度与第一接收信号强度之间的差值中,存在任意一次确定的差值小于或等于所述第一阈值,执行步骤S380:将本次确定的第一接收信号强度作为目标信号强度。If any of the differences between the second received signal strength and the first received signal strength determined for the previous P times is less than or equal to the first threshold, perform step S380: set the current determined The first received signal strength of is used as the target signal strength.
在本申请实施例中,若多次计算的差值中任意一次确定的差值不大于第一阈值,此时能够准确确定出第二电子设备与第一电子设备之间未发生快速靠近的情况,因此可以将第一接收信号强度作为目标信号强度。In the embodiment of the present application, if any one of the difference values calculated multiple times determines that the difference value is not greater than the first threshold value, it can be accurately determined that there is no rapid approach between the second electronic device and the first electronic device. , so the first received signal strength can be used as the target signal strength.
步骤S390:若所述目标信号强度大于信号强度阈值,执行指定操作。Step S390: If the target signal strength is greater than the signal strength threshold, perform a specified operation.
在本申请实施例中,步骤S390可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, reference may be made to the contents of the foregoing embodiments for step S390, and details are not repeated here.
若目标信号强度小于或等于(即不大于)信号强度阈值,则表示第一电子设备与第二电子设备之间的距离大于或等于(即不小于)预设距离,因此,不执行指定操作,此时可以返回至步骤S310,执行以上流程,以在目标信号强度大于信号强度阈值时,执行指定操作。If the target signal strength is less than or equal to (that is, not greater than) the signal strength threshold, it means that the distance between the first electronic device and the second electronic device is greater than or equal to (that is, not less than) the preset distance, therefore, the specified operation is not performed, At this time, it may return to step S310, and execute the above process, so as to execute a specified operation when the target signal strength is greater than the signal strength threshold.
本申请实施例提供的数据处理方法,与前一个实施例不同的是,在确定出第二接收信号强度与第一接收信号强度的差值大于第一阈值时,需要连续多次计算的第二接收信号强度与第一接收信号强度的差值均大于第一阈值,才将第二接收信号强度作为目标信号强度,避免了偶然因素导致确定的目标信号强度不准确。The data processing method provided by the embodiment of the present application is different from the previous embodiment in that when it is determined that the difference between the second received signal strength and the first received signal strength is greater than the first threshold, the second The second received signal strength is used as the target signal strength only when the difference between the received signal strength and the first received signal strength is greater than the first threshold, which avoids the inaccuracy of the determined target signal strength caused by accidental factors.
请参阅图10,图10示出了本申请再一个实施例提供的数据处理方法的流程示意图。该数据处理方法应用于上述第一电子设备,下面将针对图10所示的流程进行详细的阐述,所述数据处理方法具体可以包括以下步骤:Referring to FIG. 10 , FIG. 10 shows a schematic flowchart of a data processing method provided in another embodiment of the present application. The data processing method is applied to the above-mentioned first electronic device, and the flow shown in FIG. 10 will be described in detail below, and the data processing method may specifically include the following steps:
步骤S410:确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数。Step S410: Determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer.
步骤S420:确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值。Step S420: Determine a first received signal strength, where the first received signal strength is an average value of the N received signal strengths.
步骤S430:判断基于无线通信发现所述第二电子设备后的时长是否达到预设时长。Step S430: judging whether the time period after the second electronic device is discovered based on the wireless communication reaches a preset time period.
在基于无线通信发现所述第二电子设备后的时长达到预设时长的情况下,执行步骤S440~步骤 S460。When the time after the second electronic device is discovered based on the wireless communication reaches a preset time, step S440 to step S460 are executed.
步骤S440:确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N。Step S440: Determine a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is smaller than N.
其中,M个接收信号强度为所述N个接收信号强度中指定广播信号对应的接收信号强度,所述指定广播信号为所述N个广播信号中所述第二电子设备最近发送的M个广播信号,所述M个接收信号强度与所述M个广播信号一一对应。Wherein, the M received signal strengths are received signal strengths corresponding to designated broadcast signals among the N received signal strengths, and the designated broadcast signals are the M broadcasts most recently sent by the second electronic device among the N broadcast signals signals, and the M received signal strengths are in one-to-one correspondence with the M broadcast signals.
步骤S450:根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度。Step S450: Determine a target signal strength according to the first received signal strength and the second received signal strength.
步骤S460:若所述目标信号强度大于信号强度阈值,执行指定操作。Step S460: If the target signal strength is greater than the signal strength threshold, perform a specified operation.
在基于无线通信发现所述第二电子设备后的时长未达到预设时长的情况下,执行步骤S470。If the time after the second electronic device is discovered based on wireless communication does not reach the preset time, step S470 is executed.
步骤S470:若所述第一接收信号强度大于所述信号强度阈值,执行指定操作。Step S470: If the first received signal strength is greater than the signal strength threshold, perform a specified operation.
若所述第一接收信号强度未大于所述信号强度阈值,不执行指定操作。If the first received signal strength is not greater than the signal strength threshold, no specified operation is performed.
在本申请实施例中,通常用户使第二电子设备与第一电子设备之间的距离达到触发执行指定操作之前,可能刚开始用户并不会快速的使两者靠近。因此,为了节省计算量,在基于无线通信发现第二电子设备后的时长未达到预设时长的情况下,在获取用于确定是否执行指定操作的接收信号强度时,可以仅根据N个接收信号强度,获取第一接收信号强度,并将第一接收信号强度与信号强度阈值进行比较,以根据比较结果确定是否执行指定操作。In the embodiment of the present application, usually before the user makes the distance between the second electronic device and the first electronic device reach the trigger to perform a specified operation, the user may not quickly bring the two closer together at first. Therefore, in order to save the amount of calculation, if the time after the discovery of the second electronic device based on wireless communication has not reached the preset time, when obtaining the received signal strength for determining whether to perform a specified operation, it may be based on only N received signals Strength, to obtain the first received signal strength, and compare the first received signal strength with the signal strength threshold, so as to determine whether to execute the specified operation according to the comparison result.
其中,预设时长的具体数值可以不做限定,例如可以为2秒,5秒,10秒等。可选地,预设时长可以根据历史记录的无线通信发现第二电子设备的时刻,到确定出第一电子设备与第二电子设备之间相对快速靠近的时刻之间的时长确定。Wherein, the specific value of the preset duration may not be limited, for example, it may be 2 seconds, 5 seconds, 10 seconds and so on. Optionally, the preset duration may be determined according to the duration between the moment when the second electronic device is discovered through historically recorded wireless communication and the moment when the first electronic device and the second electronic device are relatively fast approached.
在本申请实施例中,在基于无线通信发送发现第二电子设备后的时长达到预设时长的情况下,则可以同时获取第一接收信号强度以及第二接收信号强度,并确定目标信号强度后,根据目标信号强度确定是否触发执行指定操作。In the embodiment of the present application, when the time period after the discovery of the second electronic device based on the wireless communication transmission reaches the preset time period, the first received signal strength and the second received signal strength can be acquired at the same time, and after determining the target signal strength , determine whether to trigger the execution of the specified operation according to the target signal strength.
在一些实施方式中,由于通常用户使第二电子设备与第一电子设备之间的距离达到触发执行指定操作之前,可能刚开始用户并不会快速的使两者靠近。而在第二电子设备与第一电子设备之间未快速靠近之前,即在基于无线通信发现第二电子设备后的时长未达到预设时长的情况下,为了节省计算量,可以仅确定第一接收信号强度,并将第一接收信号强度与信号强度阈值进行比较,以根据比较结果确定是否执行指定操作。另外,在基于无线通信发现第二电子设备后的时长未达到预设时长的情况下,如果连续T次确定出第一接收信号强度小于或等于该信号强度阈值,未执行指定操作的情况下,可以确定前T次获取的第一接收信号强度中相邻两次获取的第一接收信号强度之间的差值是否均大于第二阈值;若前T次获取的第一接收信号强度中相邻两次获取的第一接收信号强度之间的差值均大于第二阈值,则表示前T次执行上述的过程中,相邻两次获取的平均接收信号强度之间的差值均较大,因此可以表示第二电子设备与第一电子设备之间可能开始快速靠近,此时则可以执行确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,然后确定第一接收信号强度以及第二接收信号强度,并根据第一接收信号强度以及第二接收信号强度确定目标信号强度后,根据目标信号强度确定是否执行指定操作。其中,T的具体数值可以不做限定,例如,可以为2次,可以为4次,可以为6次等。In some implementations, since the user generally makes the distance between the second electronic device and the first electronic device reach before triggering execution of a specified operation, the user may not quickly bring the two closer together at first. However, before the second electronic device approaches the first electronic device quickly, that is, when the time period after the second electronic device is discovered based on wireless communication does not reach the preset time period, in order to save the amount of calculation, only the first electronic device can be determined. The signal strength is received, and the first received signal strength is compared with a signal strength threshold, so as to determine whether to perform a specified operation according to the comparison result. In addition, if the time after the discovery of the second electronic device based on wireless communication has not reached the preset time length, if it is determined for T consecutive times that the first received signal strength is less than or equal to the signal strength threshold, and the specified operation is not performed, It can be determined whether the difference between the first received signal strengths acquired twice in the previous T times of acquisition is greater than the second threshold; if the first received signal strengths acquired in the previous T times are adjacent If the difference between the first received signal strength obtained twice is greater than the second threshold, it means that the difference between the average received signal strength obtained twice in the previous T times is relatively large, Therefore, it can be indicated that the second electronic device and the first electronic device may start to approach quickly. At this time, it is possible to determine the N received signal strengths corresponding to the N broadcast signals sent by the second electronic device, and then determine the first receiving signal strength and the second receiving signal strength, and after determining the target signal strength according to the first receiving signal strength and the second receiving signal strength, determining whether to execute a specified operation according to the target signal strength. Wherein, the specific value of T may not be limited, for example, it may be 2 times, it may be 4 times, it may be 6 times, etc.
本申请实施例提供的数据处理方法,与前一个实施例不同的是,在第一电子设备基于无线通信发现第二电子设备后的时长未达到预设时长的情况下,只根据第一接收信号强度,确定是否执行指定操作;在第一电子设备基于无线通信发现第二电子设备后的时长达到预设时长的情况下,才同时获取以上第一接收信号强度以及第二接收信号强度,并确定目标信号强度后,以目标信号强度确定是否执行指定操作。从而可以在有效降低第一电子设备的处理量的同时,保证指定操作的执行的准确性。The data processing method provided by the embodiment of the present application is different from the previous embodiment in that, when the first electronic device discovers the second electronic device based on wireless communication, the time period after the first electronic device has not reached the preset time period, only according to the first received signal Intensity, to determine whether to perform a specified operation; when the first electronic device discovers the second electronic device based on wireless communication, the time period after the second electronic device reaches the preset time length, acquires the above first received signal strength and the second received signal strength at the same time, and determines After the target signal strength, the target signal strength is used to determine whether to perform the specified operation. Therefore, while effectively reducing the processing load of the first electronic device, the accuracy of execution of the specified operation can be ensured.
请参阅图11,其示出了本申请实施例提供的一种数据处理装置600的结构框图。该数据处理装置600应用上述的电子设备,该数据处理装置600包括:第一获取模块610、第二获取模块620、第三获取模块630、第四获取模块640以及操作执行模块650。其中,所述第一获取模块610用于确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数;所述第二获取模块620用于确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值;所述第三获取模块630用于确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N;所述第四获取模块640用于根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度;所述信息显示模块640用于若所述目标信号强度大于信号强度阈值,执行指定操作。Please refer to FIG. 11 , which shows a structural block diagram of a data processing apparatus 600 provided by an embodiment of the present application. The data processing apparatus 600 employs the above-mentioned electronic equipment, and the data processing apparatus 600 includes: a first acquisition module 610 , a second acquisition module 620 , a third acquisition module 630 , a fourth acquisition module 640 and an operation execution module 650 . Wherein, the first acquisition module 610 is configured to determine the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, and the N received signal strengths correspond to the N broadcast signals one by one , the N is a positive integer; the second acquisition module 620 is used to determine the first received signal strength, the first received signal strength is the average value of the N received signal strengths; the third acquisition module 630 For determining the second received signal strength, the second received signal strength is the average value of M received signal strengths in the N received signal strengths, the M is a positive integer and M is less than N; the fourth The acquiring module 640 is configured to determine a target signal strength according to the first received signal strength and the second received signal strength; the information display module 640 is configured to perform a specified operation if the target signal strength is greater than a signal strength threshold.
在一些实施方式中,第四获取模块640可以用于:获取所述第二接收信号强度与所述第一接收信号强度之间的差值;若所述差值大于第一阈值,将所述第二接收信号强度作为目标信号强度。In some implementations, the fourth obtaining module 640 may be configured to: obtain a difference between the second received signal strength and the first received signal strength; if the difference is greater than a first threshold, the The second received signal strength is used as the target signal strength.
在一种可能的实施方式中,第四获取模块640还可以用于:若所述差值小于或等于所述第一阈值,将所述第一接收信号强度作为目标信号强度。In a possible implementation manner, the fourth obtaining module 640 may also be configured to: if the difference is less than or equal to the first threshold, use the first received signal strength as the target signal strength.
在一些实施方式中,所述M个接收信号强度为所述N个接收信号强度中指定广播信号对应的接收信号强度,所述指定广播信号为所述N个广播信号中所述第二电子设备最近发送的M个广播信号,所述M个接收信号强度与所述M个广播信号一一对应。In some embodiments, the M received signal strengths are received signal strengths corresponding to specified broadcast signals among the N received signal strengths, and the specified broadcast signal is the second electronic device among the N broadcast signals For the M broadcast signals sent most recently, the received signal strengths of the M are in one-to-one correspondence with the M broadcast signals.
在一些实施方式中,操作执行模块640可以用于:In some implementations, the operation execution module 640 may be used to:
于当前显示界面显示弹框信息;或者Display pop-up information on the current display interface; or
将所述当前显示界面切换为指定界面。Switch the current display interface to a specified interface.
在一些实施方式中,第三获取模块630可以用于:在基于无线通信发现所述第二电子设备后的时长达到预设时长的情况下,执行所述确定第二接收信号强度。In some implementations, the third acquiring module 630 may be configured to: perform the determining of the second received signal strength when the time period after the second electronic device is discovered based on wireless communication reaches a preset time period.
操作执行模块650还可以用于:在基于无线通信发现所述第二电子设备后的时长未达到预设时长的情况下,若所述第一接收信号强度大于所述信号强度阈值,执行指定操作。The operation execution module 650 may also be configured to: if the first received signal strength is greater than the signal strength threshold, if the first received signal strength is greater than the signal strength threshold when the time after the second electronic device is discovered based on wireless communication has not reached a preset time, perform a specified operation .
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the devices and modules described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
综上所述,本申请提供的方案,通过确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,该N个接收信号强度与该N个广播信号一一对应,然后确定该N个接收信号强度的平均值,得到第一接收信号强度,以及确定该N个接收信号强度中的M个接收信号强度的平均值,得到第二接收信号强度,由于N小于M,再根据第一接收信号强度以及第二接收信号强度确定出用于确定是否执行指定操作的目标信号强度,由于同时根据数量不同的接收信号强度确定了两个平均接收信号强度,因此最终根据这两个平均接收信号强度确定出的目标信号强度的准确性较高,从而在电子设备之间相对靠近时,能够准确控制是否执行指定操作,提示执行目标操作的准确性,进而提升用户体验。To sum up, in the solution provided by this application, by determining the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, the N received signal strengths are in one-to-one correspondence with the N broadcast signals, Then determine the average value of the N received signal strengths to obtain the first received signal strength, and determine the average value of the M received signal strengths in the N received signal strengths to obtain the second received signal strength. Since N is less than M, Then determine the target signal strength for determining whether to perform the specified operation according to the first received signal strength and the second received signal strength. Since two average received signal strengths are determined according to different numbers of received signal strengths at the same time, finally according to these two The accuracy of the target signal strength determined by the average received signal strength is high, so that when the electronic devices are relatively close to each other, it can accurately control whether to execute the specified operation, prompt the accuracy of the execution of the target operation, and improve the user experience.
请参考图12,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备700可以是智能手机、平板电脑、智能手表、智能手环等能够运行应用程序的电子设备。本申请中的电子设备700可以包括一个或多个如下部件:处理器710、存储器720、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器720中并被配置为由一个或多个处理器710执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 12 , which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 700 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, a smart watch, and a smart bracelet. The electronic device 700 in this application may include one or more of the following components: a processor 710, a memory 720, and one or more application programs, wherein one or more application programs may be stored in the memory 720 and configured to be used by One or more processors 710 are executed, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
处理器710可以包括一个或者多个处理核。处理器710利用各种接口和线路连接整个电子设备700内的各个部分,通过运行或执行存储在存储器720内的指令、程序、代码集或指令集,以及调用存储在存储器720内的数据,执行电子设备700的各种功能和处理数据。可选地,处理器710可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器710可集成中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器710中,单独通过一块通信芯片进行实现。 Processor 710 may include one or more processing cores. The processor 710 uses various interfaces and lines to connect various parts in the entire electronic device 700, and executes by running or executing instructions, programs, code sets or instruction sets stored in the memory 720, and calling data stored in the memory 720. Various functions of the electronic device 700 and processing data. Optionally, the processor 710 may adopt at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware. The processor 710 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the displayed content; the modem is used to handle wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 710, but may be realized by a communication chip alone.
存储器720可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器720可用于存储指令、程序、代码、代码集或指令集。存储器720可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备700在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 720 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). Memory 720 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system and instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, and the like. The storage data area can also store data created by the electronic device 700 during use (such as phonebook, audio and video data, chat record data) and the like.
请参考图13,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 13 , which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. Program codes are stored in the computer-readable medium 800, and the program codes can be invoked by a processor to execute the methods described in the foregoing method embodiments.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The computer-readable storage medium 800 has a storage space for program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. Program code 810 may, for example, be compressed in a suitable form.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still Modifications are made to the technical solutions described in the foregoing embodiments, or equivalent replacements are made to some of the technical features; and these modifications or replacements do not drive the essence of the corresponding technical solutions away from the spirit and scope of the technical solutions of the various embodiments of the present application.

Claims (20)

  1. 一种数据处理方法,其特征在于,应用于第一电子设备,所述方法包括:A data processing method, characterized in that it is applied to a first electronic device, the method comprising:
    确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数;Determine N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, where the N received signal strengths are in one-to-one correspondence with the N broadcast signals, and N is a positive integer;
    确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值;determining a first received signal strength, where the first received signal strength is an average of the N received signal strengths;
    确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N;determining a second received signal strength, where the second received signal strength is an average value of M received signal strengths among the N received signal strengths, where M is a positive integer and M is less than N;
    根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度;determining a target signal strength according to the first received signal strength and the second received signal strength;
    若所述目标信号强度大于信号强度阈值,执行指定操作。If the target signal strength is greater than the signal strength threshold, perform a specified operation.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度,包括:The method according to claim 1, wherein the determining the target signal strength according to the first received signal strength and the second received signal strength comprises:
    获取所述第二接收信号强度与所述第一接收信号强度之间的差值;obtaining a difference between the second received signal strength and the first received signal strength;
    若所述差值大于第一阈值,将所述第二接收信号强度作为目标信号强度。If the difference is greater than the first threshold, the second received signal strength is used as the target signal strength.
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度,还包括:The method according to claim 2, wherein the determining the target signal strength according to the first received signal strength and the second received signal strength further comprises:
    若所述差值小于或等于所述第一阈值,将所述第一接收信号强度作为目标信号强度。If the difference is less than or equal to the first threshold, use the first received signal strength as a target signal strength.
  4. 根据权利要求2或3所述的方法,其特征在于,所述确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,包括:The method according to claim 2 or 3, wherein the determination of the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device includes:
    在每次接收到所述第二电子设备新发送的广播信号时,确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度;Each time a broadcast signal newly sent by the second electronic device is received, determine N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device;
    所述若所述差值大于第一阈值,将所述第二接收信号强度作为目标信号强度,包括:If the difference is greater than the first threshold, using the second received signal strength as the target signal strength includes:
    判断前P次确定的所述第二接收信号强度与所述第一接收信号强度之间的差值是否均大于第一阈值,其中,所述P为正整数;Judging whether the difference between the second received signal strength determined for the previous P times and the first received signal strength is greater than a first threshold, where P is a positive integer;
    若所述前P次确定的差值均大于所述第一阈值,则将本次确定的所述第二接收信号强度作为目标信号强度。If the differences determined for the previous P times are all greater than the first threshold, the second received signal strength determined this time is used as the target signal strength.
  5. 根据权利要求4所述的方法,其特征在于,所述在每次接收到所述第二电子设备新发送的广播信号时,确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,包括:The method according to claim 4, characterized in that, each time a broadcast signal newly sent by the second electronic device is received, determining the N number corresponding to the detected N broadcast signals sent by the second electronic device received signal strength, including:
    在每次接收到所述第二电子设备新发送的广播信号时,获取当前记录的前N-1个接收信号强度以及所述新发送的广播信号对应的接收信号强度,得到N个接收信号强度,其中,所述前N-1个接收信号强度为所述第二电子设备最近发送的N-1个广播信号对应的接收信号强度,所述N-1个接收信号强度与所述N-1个广播信号一一对应。Each time a broadcast signal newly sent by the second electronic device is received, the first N-1 received signal strengths currently recorded and the received signal strengths corresponding to the newly sent broadcast signal are obtained to obtain N received signal strengths , wherein, the first N-1 received signal strengths are the received signal strengths corresponding to the N-1 broadcast signals recently sent by the second electronic device, and the N-1 received signal strengths are the same as the N-1 received signal strengths Each broadcast signal corresponds one by one.
  6. 根据权利要求1所述的方法,其特征在于,所述根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度,包括:The method according to claim 1, wherein the determining the target signal strength according to the first received signal strength and the second received signal strength comprises:
    获取所述第一接收信号强度以及所述第二接收信号强度中的最大值,作为目标信号强度。Obtain the maximum value of the first received signal strength and the second received signal strength as the target signal strength.
  7. 根据权利要求1所述的方法,其特征在于,所述根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度,包括:The method according to claim 1, wherein the determining the target signal strength according to the first received signal strength and the second received signal strength comprises:
    获取所述第一接收信号强度以及所述第二接收信号强度的平均值,作为目标信号强度。Obtain an average value of the first received signal strength and the second received signal strength as a target signal strength.
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度,包括:The method according to claim 1, wherein the determining the target signal strength according to the first received signal strength and the second received signal strength comprises:
    根据所述第一接收信号强度对应的第一权重以及所述第二接收信号强度对应的第二权重,对所述第一接收信号强度以及所述第二接收信号强度进行加权求和,得到目标信号强度。According to the first weight corresponding to the first received signal strength and the second weight corresponding to the second received signal strength, perform weighted summation on the first received signal strength and the second received signal strength to obtain a target signal strength.
  9. 根据权利要求1-8任一项所述的方法,其特征在于,所述M个接收信号强度为所述N个接收信号强度中指定广播信号对应的接收信号强度,所述指定广播信号为所述N个广播信号中所述第二电子设备最近发送的M个广播信号,所述M个接收信号强度与所述M个广播信号一一对应。The method according to any one of claims 1-8, wherein the M received signal strengths are received signal strengths corresponding to designated broadcast signals among the N received signal strengths, and the designated broadcast signal is the Among the N broadcast signals, M broadcast signals recently sent by the second electronic device, the received signal strengths of the M are in one-to-one correspondence with the M broadcast signals.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述执行指定操作,包括:The method according to any one of claims 1-9, wherein the performing a specified operation comprises:
    于当前显示界面显示弹框信息;或者Display pop-up information on the current display interface; or
    将所述当前显示界面切换为指定界面。Switch the current display interface to a specified interface.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述确定第二接收信号强度,包括:The method according to any one of claims 1-10, wherein said determining the second received signal strength comprises:
    在基于无线通信发现所述第二电子设备后的时长达到预设时长的情况下,执行所述确定第二 接收信号强度。In a case where the time period after the second electronic device is discovered based on wireless communication reaches a preset time period, the determining of the second received signal strength is performed.
  12. 根据权利要求11所述的方法,其特征在于,在所述确定第一接收信号强度之后,所述方法还包括:The method according to claim 11, wherein after said determining the first received signal strength, said method further comprises:
    在基于无线通信发现所述第二电子设备后的时长未达到预设时长的情况下,若所述第一接收信号强度大于所述信号强度阈值,执行指定操作。If the time after the second electronic device is discovered based on wireless communication does not reach a preset time, if the first received signal strength is greater than the signal strength threshold, perform a specified operation.
  13. 根据权利要求12所述的方法,其特征在于,所述方法还包括:The method according to claim 12, characterized in that the method further comprises:
    在基于无线通信发现所述第二电子设备后的时长未达到预设时长的情况下,若连续T次确定的所述第一接收信号强度均小于或等于所述强度阈值,则确定所述前T次获取的所述第一接收信号强度中相邻两次获取的所述第一接收信号强度之间的差值是否均大于第二阈值;If the time after the second electronic device is discovered based on wireless communication does not reach the preset time, if the strength of the first received signal determined for T consecutive times is less than or equal to the strength threshold, then determine the previous Whether the difference between the first received signal strengths acquired twice in the first received signal strength obtained by T times is greater than a second threshold;
    若均大于第二阈值,则执行所述确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度的步骤,至所述若所述目标信号强度大于信号强度阈值,执行指定操作的步骤。If they are all greater than the second threshold, then execute the step of determining the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, to the above step if the target signal strength is greater than the signal strength threshold, execute Specifies the steps for the operation.
  14. 根据权利要求1-13任一项所述的方法,其特征在于,所述第一电子设备包括多根天线,所述确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,包括:The method according to any one of claims 1-13, wherein the first electronic device includes a plurality of antennas, and the determination of the N broadcast signals corresponding to the detected second electronic device sends N broadcast signals Signal strength, including:
    在每次接收到所述第二电子设备的目标广播信号时,确定所述多个天线中每根天线接收到的所述目标广播信号的接收信号强度,得到所述目标广播信号的多个接收信号强度,所述目标广播信号为所述N个广播信号中的任一广播信号;Each time the target broadcast signal of the second electronic device is received, the received signal strength of the target broadcast signal received by each of the plurality of antennas is determined to obtain multiple receptions of the target broadcast signal Signal strength, the target broadcast signal is any broadcast signal in the N broadcast signals;
    基于所述目标广播信号的多个接收信号强度,确定所述目标广播信号所对应的接收信号强度。Based on multiple received signal strengths of the target broadcast signal, the received signal strength corresponding to the target broadcast signal is determined.
  15. 根据权利要求14所述的方法,其特征在于,所述基于所述目标广播信号的多个接收信号强度,确定所述目标广播信号所对应的接收信号强度,包括:The method according to claim 14, wherein the determining the received signal strength corresponding to the target broadcast signal based on multiple received signal strengths of the target broadcast signal comprises:
    获取所述目标广播信号的多个接收信号强度的平均值,作为所述目标广播信号所对应的接收信号强度。Acquiring an average value of multiple received signal strengths of the target broadcast signal as the received signal strength corresponding to the target broadcast signal.
  16. 根据权利要求14所述的方法,其特征在于,所述基于所述目标广播信号的多个接收信号强度,确定所述目标广播信号所对应的接收信号强度,包括:The method according to claim 14, wherein the determining the received signal strength corresponding to the target broadcast signal based on multiple received signal strengths of the target broadcast signal comprises:
    所述基于所述目标广播信号的多个接收信号强度,确定所述目标广播信号所对应的接收信号强度,包括:The determining the received signal strength corresponding to the target broadcast signal based on multiple received signal strengths of the target broadcast signal includes:
    获取所述目标广播信号的多个接收信号强度中的最大值,作为所述目标广播信号所对应的接收信号强度。Acquiring a maximum value among multiple received signal strengths of the target broadcast signal as the received signal strength corresponding to the target broadcast signal.
  17. 根据权利要求1-16任一项所述的方法,其特征在于,在所述确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度之前,所述方法还包括:The method according to any one of claims 1-16, wherein before determining the N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device, the method further comprises:
    在首次接收到所述第二电子设备发送的广播信号时,确定所述广播信号中携带的设备标识与预设的设备标识是否匹配;When receiving the broadcast signal sent by the second electronic device for the first time, determine whether the device identifier carried in the broadcast signal matches a preset device identifier;
    若所述广播信号中携带的设备标识与预设的设备标识匹配,则执行所述确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度的步骤。If the device identifier carried in the broadcast signal matches the preset device identifier, the step of determining N received signal strengths corresponding to the N broadcast signals sent by the detected second electronic device is performed.
  18. 一种数据处理装置,其特征在于,应用于第一电子设备,所述装置包括:第一获取模块、第二获取模块、第三获取模块、第四获取模块以及操作执行模块,其中,A data processing device, characterized in that it is applied to a first electronic device, and the device includes: a first acquisition module, a second acquisition module, a third acquisition module, a fourth acquisition module, and an operation execution module, wherein,
    所述第一获取模块用于确定检测到的第二电子设备发送的N个广播信号对应的N个接收信号强度,所述N个接收信号强度与所述N个广播信号一一对应,所述N为正整数;The first acquiring module is configured to determine N received signal strengths corresponding to the detected N broadcast signals sent by the second electronic device, the N received signal strengths correspond to the N broadcast signals one by one, the N is a positive integer;
    所述第二获取模块用于确定第一接收信号强度,所述第一接收信号强度为所述N个接收信号强度的平均值;The second acquisition module is used to determine a first received signal strength, where the first received signal strength is an average value of the N received signal strengths;
    所述第三获取模块用于确定第二接收信号强度,所述第二接收信号强度为所述N个接收信号强度中的M个接收信号强度的平均值,所述M为正整数且M小于N;The third acquisition module is used to determine the second received signal strength, the second received signal strength is the average value of M received signal strengths in the N received signal strengths, and the M is a positive integer and M is less than N;
    所述第四获取模块用于根据所述第一接收信号强度以及所述第二接收信号强度,确定目标信号强度;The fourth acquiring module is configured to determine a target signal strength according to the first received signal strength and the second received signal strength;
    所述操作执行模块用于若所述目标信号强度大于信号强度阈值,执行指定操作。The operation executing module is configured to execute a specified operation if the target signal strength is greater than a signal strength threshold.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;one or more processors;
    存储器;memory;
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-17任一项所述的方法。one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs are configured to perform as The method according to any one of claims 1-17.
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。A computer-readable storage medium, characterized in that program codes are stored in the computer-readable storage medium, and the program codes can be invoked by a processor to execute the method according to any one of claims 1-17 .
PCT/CN2022/085069 2021-05-26 2022-04-02 Data processing method and apparatus, and electronic device and storage medium WO2022247468A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110579090.4 2021-05-26
CN202110579090.4A CN113316222B (en) 2021-05-26 2021-05-26 Data processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2022247468A1 true WO2022247468A1 (en) 2022-12-01

Family

ID=77375220

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/085069 WO2022247468A1 (en) 2021-05-26 2022-04-02 Data processing method and apparatus, and electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN113316222B (en)
WO (1) WO2022247468A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114040323B (en) * 2021-10-29 2023-12-19 青岛海尔科技有限公司 Control method and device of equipment, storage medium and electronic device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090156126A1 (en) * 2006-04-03 2009-06-18 Resonance Holdings Limited Methods for determining proximity between radio frequency devices and controlling switches
CN104320751A (en) * 2014-10-14 2015-01-28 浙江大学 Article searching method based on Bluetooth signal strength
CN107197445A (en) * 2017-05-16 2017-09-22 北京千丁互联科技有限公司 Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method
CN110602671A (en) * 2018-10-17 2019-12-20 深圳市文鼎创数据科技有限公司 Bluetooth search result display method and device, terminal equipment and storage medium
CN111356120A (en) * 2020-04-20 2020-06-30 遂宁摩天时代科技有限公司 Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function
CN111988738A (en) * 2020-07-31 2020-11-24 北京骑胜科技有限公司 Vehicle control method, device, vehicle and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107221052B (en) * 2017-05-16 2019-07-09 北京千丁互联科技有限公司 Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method
US10187919B2 (en) * 2017-05-22 2019-01-22 Apple Inc. Proximity pairing based on signal strength
CN112333332B (en) * 2020-10-27 2021-05-28 维沃移动通信有限公司 Prompt message display method and device and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090156126A1 (en) * 2006-04-03 2009-06-18 Resonance Holdings Limited Methods for determining proximity between radio frequency devices and controlling switches
CN104320751A (en) * 2014-10-14 2015-01-28 浙江大学 Article searching method based on Bluetooth signal strength
CN107197445A (en) * 2017-05-16 2017-09-22 北京千丁互联科技有限公司 Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method
CN110602671A (en) * 2018-10-17 2019-12-20 深圳市文鼎创数据科技有限公司 Bluetooth search result display method and device, terminal equipment and storage medium
CN111356120A (en) * 2020-04-20 2020-06-30 遂宁摩天时代科技有限公司 Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function
CN111988738A (en) * 2020-07-31 2020-11-24 北京骑胜科技有限公司 Vehicle control method, device, vehicle and storage medium

Also Published As

Publication number Publication date
CN113316222A (en) 2021-08-27
CN113316222B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
WO2021248371A1 (en) Access method, access apparatus, and storage medium
WO2020019351A1 (en) Configuration method and apparatus for transmission configuration indication
WO2021114276A1 (en) Beam measurement method and beam measurement device
WO2020207435A1 (en) Measurement method, measurement configuration method, terminal and network device
WO2018103441A1 (en) Network positioning method and terminal device
CN112839303B (en) Method and related device for device reconnection
EP4301049A1 (en) Network access method, network access apparatus, and storage medium
WO2022052024A1 (en) Parameter configuration method, apparatus, communication device, and storage medium
WO2022236639A1 (en) Resource configuration method and apparatus, communication device, and storage medium
JP2023527843A (en) Cell reselection method, cell reselection device and storage medium
CN109257732B (en) Equipment control method and device and electronic equipment
WO2021155511A1 (en) Communication method and apparatus
WO2022247468A1 (en) Data processing method and apparatus, and electronic device and storage medium
WO2022247424A1 (en) Data processing method and apparatus, and electronic device and computer-readable medium
WO2021120204A1 (en) Signal measurement method and apparatus, and communication device and storage medium
WO2022205472A1 (en) Uplink transmission time domain resource determining method and apparatus, ue, network device, and storage medium
WO2022217463A1 (en) Measurement configuration method and apparatus, measurement reporting method and apparatus, and storage medium
CN114513771A (en) IoT (Internet of things) equipment control method, device, control system and terminal equipment
CN111800836A (en) Communication method, communication device, electronic equipment and storage medium
CN107409337A (en) Switching threshold method to set up, device and equipment
CN114245427B (en) Network switching method and device and mobile terminal
WO2023245512A1 (en) Air interface processing method and apparatus, and storage medium
WO2023082102A1 (en) Wireless communication method and apparatus and storage medium
WO2023030071A1 (en) Broadcast message transmitting method and apparatus, and electronic device and storage medium
WO2023240622A1 (en) Information transmission method and apparatus, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22810201

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22810201

Country of ref document: EP

Kind code of ref document: A1