Near field communication method and device, storage medium and electronic equipment

By employing two short-range communication connection methods in near-field communication devices, and by detecting signal strength and adjusting power in real time, the problem of low response speed is solved, thereby improving the success rate of near-field communication connections and user experience.

CN121665208APending Publication Date: 2026-03-13ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

When users use near-field communication (NFC) devices, the response speed is slow, resulting in a low success rate of NFC connection and affecting the user experience.

Method used

Two short-range communication connection methods are adopted. By detecting the signal strength in real time and adjusting the power of the request signal according to the dynamic strength threshold, the success rate of the second short-range communication connection is improved.

Benefits of technology

It improves the response speed and success rate of near-field communication connections, enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121665208A_ABST
    Figure CN121665208A_ABST
Patent Text Reader

Abstract

The invention discloses a near field communication method and device, a storage medium and electronic equipment, and the application has two short-distance communication connections, namely a first short-distance communication connection and a second short-distance communication connection, and the second short-distance communication connection is used for executing a target service. Therefore, the response speed can be improved by improving the power of the request signal for establishing the second short-distance communication connection, so that the success rate of the second short-distance communication connection is improved, the target service is executed, and the user experience is improved. As the signal strength can represent the distance between the two devices, whether the power of the request signal for establishing the second short-distance communication connection is increased or not can be judged according to the dynamic strength threshold and the signal strength obtained based on the first short-distance communication connection, and the necessity of increasing the power of sending the request signal is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a near-field communication method, apparatus, storage medium, and electronic device. Background Technology

[0002] Near Field Communication (NFC) is a relatively mature communication method that provides convenience for users. For example, users can use NFC for quick payments and to control vehicle switches.

[0003] However, when users use near-field communication devices to establish near-field communication connections, the low response speed of the user terminal results in a low success rate for completing the connection, which affects the user experience.

[0004] Based on this, this specification provides a near-field communication method. Summary of the Invention

[0005] This application specification provides a near-field communication method, apparatus, storage medium, and electronic device to at least partially solve the aforementioned problems existing in the prior art.

[0006] The technical solution adopted in this application specification is as follows: This application provides a near-field communication method, applied to a first short-range communication device, the method comprising: Receive a first short-range communication connection request sent by a second short-range communication device, and establish a first short-range communication connection with the second short-range communication device; The current signal strength of the communication signal transmitted by the second short-range communication device based on the first short-range communication connection is detected in real time, and the current signal strength represents the distance between the second short-range communication device and the first short-range communication device; When the current signal strength is not less than a predetermined dynamic strength threshold, the first power for sending a short-range communication second connection request to the second short-range communication device is increased to a second power. The first short-range communication connection is different from the second short-range communication connection, which is used to perform the target service.

[0007] This application specification provides a near-field communication method, the method being applied to a second short-range communication device, the method comprising: Send a short-range communication first connection request to the first short-range communication device and establish a first short-range communication connection with the first short-range communication device; Based on the first short-range communication connection, a communication signal is sent to the first short-range communication device in real time, so that the first short-range communication device can detect the current signal strength of the communication signal in real time. When the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication device is increased to the second power.

[0008] This application specification provides a near-field communication device, which is applied to a first short-range communication device, and the device includes: The first connection request receiving module is used to receive a short-range communication first connection request sent by the second short-range communication device and establish a first short-range communication connection with the second short-range communication device; The real-time detection module is used to detect in real time the current signal strength of the communication signal sent by the second short-range communication device based on the first short-range communication connection, wherein the current signal strength represents the distance between the second short-range communication device and the first short-range communication device; The power adjustment module is used to increase the first power of sending a short-range communication second connection request to the second short-range communication device to a second power when the current signal strength is not less than a predetermined dynamic strength threshold. The first short-range communication connection is different from the second short-range communication connection, which is used to perform the target service.

[0009] This application specification provides a near-field communication device, which is applied to a second short-range communication device, and the device includes: The first connection request sending module is used to send a short-range communication first connection request to the first short-range communication device and establish a first short-range communication connection with the first short-range communication device; The communication signal transmission module is used to transmit communication signals to the first short-range communication device in real time based on the first short-range communication connection, so that the first short-range communication device can detect the current signal strength of the communication signal in real time, and when the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication device is increased to the second power.

[0010] This application specification provides a near-field communication system, the system comprising a first short-range communication module and a second short-range communication module, wherein: The second short-range communication module is used to send a short-range communication first connection request to the first short-range communication module; The first short-range communication module is used to receive a first short-range communication connection request sent by the second short-range communication module and establish a first short-range communication connection with the second short-range communication module; The second short-range communication module is also used to send communication signals to the first short-range communication module in real time based on the first short-range communication connection; The first short-range communication module is further configured to detect in real time the current signal strength of the communication signal sent by the second short-range communication module based on the first short-range communication connection. The current signal strength represents the distance between the second short-range communication module and the first short-range communication module. When the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication module is increased to the second power.

[0011] This application specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described near-field communication method.

[0012] This application specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described near-field communication method.

[0013] This application discloses a computer program product, which includes a computer program that, when executed by a processor, implements the aforementioned near-field communication method.

[0014] The above-described technical solution adopted in this application specification can achieve the following beneficial effects: In the near-field communication method provided in this application, there are two short-range communication connections: a first short-range communication connection and a second short-range communication connection. The second short-range communication connection is used to execute a target service. Therefore, by increasing the power of the request signal used to establish the second short-range communication connection, the response speed can be increased, thereby improving the success rate of the second short-range communication connection, thus enabling the execution of the target service and improving the user experience. Since signal strength can characterize the distance between two devices, based on the dynamic strength threshold and the signal strength obtained from the first short-range communication connection, it can be determined whether to increase the power of the request signal used to establish the second short-range communication connection, ensuring the necessity of increasing the power of the transmitted request signal. Attached Figure Description

[0015] The accompanying drawings, which are included to provide a further understanding of this application specification and form part of this specification, illustrate exemplary embodiments and their descriptions, serving to explain this application specification and do not constitute an undue limitation thereof. In the drawings: Figure 1 A flowchart illustrating a near-field communication method provided in this application specification; Figure 2 A Bluetooth connection diagram provided in this application specification; Figure 3 This application specification provides a schematic diagram of a near-field communication interaction; Figure 4 This application specification provides a schematic diagram of signal detection; Figure 5 A flowchart illustrating another near-field communication method provided in this application specification; Figure 6 A schematic diagram of a near-field communication device provided in this application specification; Figure 7 The corresponding specification provided in this application is Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments described in this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative effort are within the scope of protection of this application.

[0017] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0018] When users establish short-range communication connections with other short-range devices through their terminals, the slow response of these devices often prevents the terminal from establishing a timely connection and thus hinders the execution of subsequent services, such as vehicle control, payment, and subway travel, resulting in a poor user experience.

[0019] To address the aforementioned issues, this application provides a near-field communication method. This method includes two short-range communication connections: a first short-range communication connection and a second short-range communication connection. The second short-range communication connection is used to execute a target service. By increasing the power of the request signal used to establish the second short-range communication connection, the response speed can be improved, thereby increasing the success rate of the second short-range communication connection to execute the target service and improve user experience. Since signal strength characterizes the distance between two devices, based on a dynamic strength threshold and the signal strength obtained from the first short-range communication connection, it can be determined whether to increase the power of the request signal used to establish the second short-range communication connection, ensuring the necessity of increasing the power of the sent request signal.

[0020] The execution entity of this application may include a first short-range communication device and a second short-range communication device. These two devices can interact with each other to complete a business transaction, which may include payment, data transmission, vehicle unlocking, etc., and this application does not limit the scope of such transactions. The first and second short-range communication devices can be any electronic device with near-field communication (NFC) functionality. Specifically, the second short-range communication device includes a terminal, and the first short-range communication device includes a contactless acceptance device (CAD). The terminal may be a smartphone, tablet, or other device with NFC functionality, and the CAD may include a Near Field Communication (NFC) chip, a Radio Frequency Identification (RFID) chip, etc. When the business is a payment transaction, the CAD is a device capable of handling contactless transactions. When the business is a vehicle unlocking transaction, the CAD is a device capable of handling contactless vehicle switch signals.

[0021] For ease of explanation, this application specification uses the second short-range communication device as the terminal and the first short-range communication device as the non-receiving device. The technical solutions provided by the various embodiments of this application specification are described in detail below with reference to the accompanying drawings.

[0022] The technical solutions provided by the various embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0023] Figure 1 This is a flowchart illustrating a near-field communication method provided in this application specification, applied to a first short-range communication device, specifically including steps S101 to S103.

[0024] In this application specification, a user can interact with a first short-range communication device through a terminal, i.e., a second short-range communication device, to perform business operations. This terminal can establish both a first short-range communication connection and a second short-range communication connection with the first short-range communication device. Specifically, the first short-range communication connection is a Bluetooth connection, and the second short-range communication connection is a near-field communication (NFC) connection. That is, the second short-range communication device and the first short-range communication device have both Bluetooth and NFC connectivity.

[0025] Therefore, before establishing the first short-range communication connection, in order to reduce the energy consumption of the first short-range communication device and the second short-range communication device, the first short-range communication device can first receive the first short-range communication pairing request sent by the second short-range communication device; and pair with the second short-range communication device based on the first short-range communication pairing request.

[0026] In other words, the second short-range communication device can be paired with the first short-range communication device via Bluetooth so that when establishing the first short-range communication connection later, the short-range communication connection can be established directly based on the pairing relationship without consuming additional energy, ensuring that the applications related to the first short-range communication connection of the second short-range communication device continue to run, that is, without the need for application keep-alive.

[0027] Specifically, in response to the user's digital key binding operation, the digital key module of the second short-range communication device completes the digital key binding with the digital key module of the first short-range communication device. Since the digital key has the ability to establish a first short-range communication connection, Bluetooth pairing can be performed after the user completes the digital key binding.

[0028] Taking the vehicle switch control business as an example, Figure 2 This application specification provides a Bluetooth connection diagram, such as... Figure 2 As shown.

[0029] The second short-range communication device is a mobile phone, and the first short-range communication device is a vehicle. The mobile phone sends a first short-range communication pairing request to the vehicle's digital key module. The vehicle's digital key module receives the first short-range communication pairing request sent by the mobile phone and then completes Bluetooth pairing with the mobile phone.

[0030] Therefore, when the distance between the second short-range communication device and the first short-range communication device is less than the preset distance, the second short-range communication device can establish a first short-range communication connection with the first short-range communication device by sending a first short-range communication connection request to the first short-range communication device.

[0031] S101: Receive a first short-range communication connection request sent by the second short-range communication device, and establish a first short-range communication connection with the second short-range communication device.

[0032] Figure 3 This application specification provides a schematic diagram of a near-field communication interaction, such as... Figure 3 As shown.

[0033] The second short-range communication device can send a first short-range communication connection request to the first short-range communication device, and the first short-range communication device can then establish a first short-range communication connection with the second short-range communication device, which is also a Bluetooth connection.

[0034] S102: Real-time detection of the current signal strength of the communication signal sent by the second short-range communication device based on the first short-range communication connection, wherein the current signal strength represents the distance between the second short-range communication device and the first short-range communication device.

[0035] In this application specification, Figure 4 A schematic diagram of signal detection provided in this application specification, such as Figure 4 As shown.

[0036] After Bluetooth connection is established, the second short-range communication device sends communication signals to the first short-range communication device in real time. Then, the digital key module of the first short-range communication device detects the current signal strength of the communication signal sent by the second short-range communication device based on the first short-range communication connection in real time, so as to determine the distance between the second short-range communication device and the first short-range communication device in real time based on the strength of the Bluetooth signal, that is, the strength of the current communication signal.

[0037] Since short-range communication can only be achieved within a certain distance, a weak signal indicates that the two devices are far apart, which may lead to unstable data transmission channels. Conversely, a strong signal indicates that the two devices are close together, allowing for normal short-range communication. It can be understood that signal strength represents the distance between the second and first short-range communication devices; a strong signal indicates a close distance, and a weak signal indicates a long distance.

[0038] S103: When the current signal strength is not less than the predetermined dynamic strength threshold, the first power of sending the short-range communication second connection request to the second short-range communication device is increased to the second power. The first short-range communication connection is different from the second short-range communication connection. The second short-range communication connection is used to perform the target service.

[0039] In this application specification, the dynamic strength threshold is determined based on the signal strength at several historical times when establishing a second short-range communication connection. Therefore, when the current signal strength is not less than the dynamic strength threshold, it indicates that the user may want to establish a second short-range communication connection with the first short-range communication device through the second short-range communication device for target services such as unlocking / unlocking the vehicle and making payments. In this case, the first short-range communication device will increase the first power of sending the short-range communication second connection request to the second short-range communication device to the second power.

[0040] Figure 5 A flowchart illustrating another near-field communication method provided in this application specification is shown below. Figure 5 As shown.

[0041] Specifically, the digital key module in the first short-range communication device sends a power boost request to the NFC active module. The NFC active module then increases the power of its first short-range communication connection request to the second short-range communication device to a second power, thereby increasing the probability of successfully establishing a second short-range communication connection between the second and first short-range communication devices. The NFC active module is the near-field communication chip.

[0042] based on Figure 1 The near-field communication method described in this application includes two short-range communication connections: a first short-range communication connection and a second short-range communication connection. The second short-range communication connection is used to execute the target service. Therefore, by increasing the power of the request signal used to establish the second short-range communication connection, the response speed can be improved, thereby increasing the success rate of the second short-range communication connection to execute the target service and improve the user experience. Since signal strength can characterize the distance between two devices, based on the dynamic strength threshold and the signal strength obtained from the first short-range communication connection, it can be determined whether to increase the power of the request signal used to establish the second short-range communication connection. This ensures the necessity of increasing the power of the request signal and avoids hardware installation limitations that could negatively impact the user's near-field communication experience.

[0043] In some embodiments, before performing S103, the first short-range communication device may acquire a number of historical signal strengths within a preset sliding time window; determine the target signal strength based on the number of historical signal strengths; and determine a dynamic strength threshold based on the target signal strength and a preset first strength deviation.

[0044] The preset sliding time window can be set as needed, such as setting the target time as the end time and the duration to 3 days. The start time is determined by the duration and end time, and several historical signal strengths are obtained within the sliding time window at the start and end times. The target time can also be set as needed, for example, it can be set to the time when the first short-range communication connection request sent by the second short-range communication device is received.

[0045] For example, if the target time is 00:00 on October 4, 2025, and the duration is 3 days, then the starting time is 00:00 on October 1, 2025. Therefore, the preset sliding time window can be from 00:00 on October 1, 2025 to 00:00 on October 4, 2025.

[0046] Specifically, for each historical signal strength, the historical signal strength is the communication signal strength when the first short-range communication device and the second short-range communication device establish a second short-range communication connection, which is also the Bluetooth signal strength.

[0047] Alternatively, several historical signal strengths within a preset sliding window can be obtained. The preset sliding window represents the communication signal strengths of the first short-range communication device and the second short-range communication device when establishing a second short-range communication connection, most recently relative to the target time. For example, three instances of the first short-range communication device and the second short-range communication device establishing a second short-range communication connection can be obtained before the target time.

[0048] It is understandable that the preset sliding time window is limited by duration, and the preset sliding number window is limited by the number of times the first short-range communication device establishes a second short-range communication connection with the second short-range communication device.

[0049] Of course, all historical signal strengths can also be obtained, that is, the communication signal strengths of all first short-range communication devices and second short-range communication devices when establishing a second short-range communication connection before the target time can be obtained. This application specification does not limit this.

[0050] When determining the target signal strength based on several historical signal strengths, the first short-range communication device can determine the average of several historical signal strengths as the target signal strength, or obtain the historical time of each detected historical signal strength, determine the corresponding weight according to each historical time, and determine the target signal strength according to each historical signal strength and the corresponding weight.

[0051] Since there may be different external error conditions at the time when the first short-range communication device and the second short-range communication device establish the second short-range communication connection, in order to reduce the impact of external errors on the accuracy of the determined target signal strength, each historical signal strength can be assigned a weight according to the historical time to obtain a strength threshold that better characterizes the Bluetooth signal state of the two devices when establishing the second short-range communication connection, thereby improving the accuracy of the judgment when executing S103.

[0052] After determining the target signal strength, a dynamic strength threshold can be determined based on a preset first strength deviation. Specifically, the dynamic strength threshold is obtained by subtracting the target signal strength from the preset first strength deviation. For example, if the target signal strength is 80 and the preset first strength deviation is 10, then the dynamic strength threshold is 70.

[0053] This is because when determining that a user needs to establish a second short-range communication connection between the first and second short-range communication devices, the distance between the two devices is greater than the distance between the two devices when establishing the second short-range communication connection. Therefore, the Bluetooth signal strength during the determination operation is lower than the Bluetooth signal strength when the two devices establish the second short-range communication connection. However, the dynamic strength threshold required for the determination is determined based on the Bluetooth signal strength when the two devices establish the second short-range communication connection. Therefore, directly determining the target signal strength as the dynamic strength threshold results in the dynamic strength threshold being higher than the actual signal strength during the determination. In other words, the target signal strength determined based on the signal strength when the first and second short-range communication devices establish the second short-range communication connection is too high. Therefore, it is necessary to reduce the target signal strength by presetting a first strength deviation to obtain a more accurate dynamic strength threshold.

[0054] In some embodiments, after executing S103, when a preset condition is met, the second power is reduced to the first power, wherein the preset condition includes any one of the following: establishing a second short-range communication connection with the second short-range communication device; the duration of the second power is greater than a preset time; and the latest signal strength detected in real time is less than the difference between the dynamic strength threshold and the preset second strength deviation.

[0055] When the first short-range communication device establishes a second short-range communication connection with the second short-range communication device, the first short-range communication device does not need to maintain a high signal transmission power. Therefore, in order to reduce energy consumption, the second power can be reduced to the first power.

[0056] If the first short-range communication device and the second short-range communication device do not establish a second short-range communication connection, and the duration of the second power is longer than the preset time, it indicates that the user may not need to perform the target service for a period of time after the first power is converted to the second power, and the second power can be reduced to the first power.

[0057] Since the first short-range communication device continuously monitors the signal strength of the communication signal transmitted by the second short-range communication device based on the first short-range communication connection, if the latest detected signal strength is less than the difference between the dynamic strength threshold and the preset second strength deviation before the second short-range communication connection is established, it indicates that the user may not need to perform the target service, and the second power can be reduced to the first power. The preset second strength deviation can be set as needed, and this application specification does not limit it.

[0058] Of course, if the latest detected signal strength is less than the dynamic strength threshold, the second power can be reduced to the first power. Setting a preset second strength deviation is to avoid the problem of misjudgment caused by signal strength fluctuations due to external factors, which may result in a lower latest signal strength, but the user may still need to perform the target service.

[0059] In other words, this application specification states that an increase in signal strength from weak to strong triggers a power boost in the NFC active module, while a power boost is only triggered once if the signal strength remains consistently strong. Similarly, a power recovery in the NFC active module is triggered only when the signal strength decreases from strong to weak, while a power recovery is only triggered once if the signal strength remains consistently weak.

[0060] It is understandable that dynamic power adjustment refers to increasing the first power to a second power when sending a second short-range communication connection request to the second short-range communication device. Conversely, when preset conditions are met, the second power will also be reduced back to the first power when sending the second short-range communication connection request to the second short-range communication device.

[0061] Furthermore, this application specification also considers the influence of external conditions on signal strength. Therefore, based on the signal strength of the first short-range communication connection, a dynamic strength threshold is updated and determined to ensure the necessity of increasing the power of the transmission request signal under different circumstances.

[0062] Specifically, when establishing a second short-range communication connection with the second short-range communication device, the dynamic strength threshold is updated based on the real-time signal strength detected when establishing the second short-range communication connection with the second short-range communication device.

[0063] For example, when determining the dynamic intensity threshold, three historical signal intensities were collected, which were 70, 75, and 74 respectively. Therefore, the dynamic intensity threshold is 73. When a second short-range communication connection is established with the second short-range communication device, the real-time signal intensity detected at the time of establishing the second short-range communication connection is 72. Therefore, the updated dynamic intensity threshold is 72.75.

[0064] The above describes one or more embodiments of the near-field communication method provided in this application specification. Based on the same idea, this application specification also provides corresponding near-field communication devices, such as... Figure 6 As shown, the device is applied to a first short-range communication device, and the device includes: The first connection request receiving module 600 is used to receive a short-range communication first connection request sent by the second short-range communication device and establish a first short-range communication connection with the second short-range communication device. The real-time detection module 602 is used to detect in real time the current signal strength of the communication signal sent by the second short-range communication device based on the first short-range communication connection, wherein the current signal strength represents the distance between the second short-range communication device and the first short-range communication device; The power adjustment module 604 is used to increase the first power of sending a short-range communication second connection request to the second short-range communication device to a second power when the current signal strength is not less than a predetermined dynamic strength threshold. The first short-range communication connection is different from the second short-range communication connection, and the second short-range communication connection is used to perform the target service.

[0065] Optionally, the first short-range communication connection is a Bluetooth connection, and the second short-range communication connection is a near-field communication connection.

[0066] Optionally, the device further includes: The pairing module is used to receive a first short-range communication pairing request sent by the second short-range communication device before establishing a first short-range communication connection with the second short-range communication device; Based on the first short-range communication pairing request, pair with the second short-range communication device.

[0067] Optionally, the device further includes: The dynamic intensity threshold determination module is used to obtain the intensity of several historical signals within a preset sliding time window; The target signal strength is determined based on several historical signal strengths. The dynamic intensity threshold is determined based on the target signal intensity and the preset first intensity deviation.

[0068] Optionally, the dynamic intensity threshold determination module is specifically used to determine the average of several historical signal intensities as the target signal intensity, or The historical time of each historical signal strength is obtained, a corresponding weight is determined based on each historical time, and the target signal strength is determined based on each historical signal strength and its corresponding weight.

[0069] Optionally, the power adjustment module 604 is specifically used to reduce the second power to the first power when a preset condition is met, wherein the preset condition includes any one of the following: Establish a second short-range communication connection with the second short-range communication device; The duration of the second power is longer than the preset time; The latest signal strength detected in real time is less than the difference between the dynamic strength threshold and the preset second strength deviation.

[0070] Optionally, the device further includes: The dynamic intensity threshold update module is used to update the dynamic intensity threshold based on the real-time signal intensity detected when establishing a second short-range communication connection with the second short-range communication device.

[0071] This application also provides another near-field communication device, which is applied to a second short-range communication device, the device comprising: The first connection request sending module is used to send a short-range communication first connection request to the first short-range communication device and establish a first short-range communication connection with the first short-range communication device; The communication signal transmission module is used to transmit communication signals to the first short-range communication device in real time based on the first short-range communication connection, so that the first short-range communication device can detect the current signal strength of the communication signal in real time, and when the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication device is increased to the second power.

[0072] This application also provides a near-field communication system, the system comprising a first short-range communication module and a second short-range communication module, wherein: The second short-range communication module is used to send a short-range communication first connection request to the first short-range communication module; The first short-range communication module is used to receive a first short-range communication connection request sent by the second short-range communication module and establish a first short-range communication connection with the second short-range communication module; The second short-range communication module is also used to send communication signals to the first short-range communication module in real time based on the first short-range communication connection; The first short-range communication module is further configured to detect in real time the current signal strength of the communication signal sent by the second short-range communication module based on the first short-range communication connection. The current signal strength represents the distance between the second short-range communication module and the first short-range communication module. When the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication module is increased to the second power.

[0073] This application specification also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described near-field communication method.

[0074] This application specification also provides Figure 7 The diagram shows the structure of an electronic device, which could be smart glasses. Figure 7 As shown, at the hardware level, this electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above. Figure 1 The near-field communication method described above. Of course, in addition to software implementation, this application specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0075] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement to the methodology cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logic function is determined by the user programming the device. Designers program a digital system onto a PLD themselves, eliminating the need for chip manufacturers to design and fabricate dedicated integrated circuit chips. Furthermore, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented using "logic compiler" software, similar to the software compiler used in program development. The source code before compilation must be written in a specific programming language called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Among languages, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and then programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0076] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0077] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0078] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application specification, the functions of each unit can be implemented in one or more software and / or hardware.

[0079] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0084] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0085] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0086] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0087] Those skilled in the art will understand that the embodiments of this application specification can be provided as methods, systems, or computer program products. Therefore, this application specification can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application specification can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0089] The various embodiments in this application specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0090] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims.

Claims

1. A near-field communication method, the method being applied to a first short-range communication device, the method comprising: Receive a first short-range communication connection request sent by a second short-range communication device, and establish a first short-range communication connection with the second short-range communication device; The current signal strength of the communication signal transmitted by the second short-range communication device based on the first short-range communication connection is detected in real time, and the current signal strength represents the distance between the second short-range communication device and the first short-range communication device; When the current signal strength is not less than a predetermined dynamic strength threshold, the first power for sending a short-range communication second connection request to the second short-range communication device is increased to a second power. The first short-range communication connection is different from the second short-range communication connection, which is used to perform the target service.

2. The method as described in claim 1, wherein the first short-range communication connection is a Bluetooth connection, and the second short-range communication connection is a near-field communication connection.

3. The method of claim 1, wherein before establishing a first short-range communication connection with the second short-range communication device, the method further comprises: Receive a first short-range communication pairing request sent by the second short-range communication device; Based on the first short-range communication pairing request, pair with the second short-range communication device.

4. The method as described in claim 1, wherein determining the dynamic intensity threshold specifically includes: Obtain several historical signal strengths within a preset sliding time window; The target signal strength is determined based on several historical signal strengths. The dynamic intensity threshold is determined based on the target signal intensity and the preset first intensity deviation.

5. The method as described in claim 4, wherein determining the target signal strength based on a plurality of historical signal strengths specifically includes: The average of several historical signal strengths is determined as the target signal strength, or The historical time of each historical signal strength is obtained, a corresponding weight is determined based on each historical time, and the target signal strength is determined based on each historical signal strength and its corresponding weight.

6. The method of claim 1, further comprising: When a preset condition is met, the second power is reduced to the first power, wherein the preset condition includes any one of the following: Establish a second short-range communication connection with the second short-range communication device; The duration of the second power is longer than the preset time; The latest signal strength detected in real time is less than the difference between the dynamic strength threshold and the preset second strength deviation.

7. The method of claim 1, further comprising: When a second short-range communication connection is established with the second short-range communication device, the dynamic strength threshold is updated based on the real-time signal strength detected when the second short-range communication connection is established with the second short-range communication device.

8. A near-field communication method, the method being applied to a second short-range communication device, the method comprising: Send a short-range communication first connection request to the first short-range communication device and establish a first short-range communication connection with the first short-range communication device; Based on the first short-range communication connection, a communication signal is sent to the first short-range communication device in real time, so that the first short-range communication device can detect the current signal strength of the communication signal in real time. When the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication device is increased to the second power.

9. A near-field communication system, the system comprising a first short-range communication module and a second short-range communication module, wherein: The second short-range communication module is used to send a short-range communication first connection request to the first short-range communication module; The first short-range communication module is used to receive a first short-range communication connection request sent by the second short-range communication module and establish a first short-range communication connection with the second short-range communication module; The second short-range communication module is also used to send communication signals to the first short-range communication module in real time based on the first short-range communication connection; The first short-range communication module is further configured to detect in real time the current signal strength of the communication signal sent by the second short-range communication module based on the first short-range communication connection. The current signal strength represents the distance between the second short-range communication module and the first short-range communication module. When the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication module is increased to the second power.

10. A near-field communication device, the device being applied to a first short-range communication device, the device comprising: The first connection request receiving module is used to receive a short-range communication first connection request sent by the second short-range communication device and establish a first short-range communication connection with the second short-range communication device; The real-time detection module is used to detect in real time the current signal strength of the communication signal sent by the second short-range communication device based on the first short-range communication connection, wherein the current signal strength represents the distance between the second short-range communication device and the first short-range communication device; The power adjustment module is used to increase the first power of sending a short-range communication second connection request to the second short-range communication device to a second power when the current signal strength is not less than a predetermined dynamic strength threshold. The first short-range communication connection is different from the second short-range communication connection, which is used to perform the target service.

11. A near-field communication device, the device being applied to a second short-range communication device, the device comprising: The first connection request sending module is used to send a short-range communication first connection request to the first short-range communication device and establish a first short-range communication connection with the first short-range communication device; The communication signal transmission module is used to transmit communication signals to the first short-range communication device in real time based on the first short-range communication connection, so that the first short-range communication device can detect the current signal strength of the communication signal in real time, and when the current signal strength is less than a predetermined dynamic strength threshold, the first power of sending the second short-range communication connection request to the second short-range communication device is increased to the second power.

12. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 8.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any one of claims 1 to 8.

14. A computer program product comprising a computer program that, when executed by a processor, implements the method described in any one of claims 1-8.