A terminal near field communication matching method and device, intelligent device and storage medium

By adjusting the detection period based on signal strength and performing matching within the target detection period, the problem of inaccurate matching when the signals between the terminal and the terminal to be matched are unstable is solved, thus improving the accuracy and efficiency of near-field communication.

CN117195924BActive Publication Date: 2026-06-16HUIZHOU TCL MOBILE COMM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUIZHOU TCL MOBILE COMM CO LTD
Filing Date
2022-06-02
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

In existing technologies, poor signal strength during near-field communication matching leads to inaccurate matching between the terminal and the terminal to be matched, especially when the distance is neither too far nor too close, and a fixed detection time cannot effectively match the terminals.

Method used

The detection period is dynamically adjusted based on the near-field communication signal strength of the terminal to be matched, and matching is performed within the target detection period. If the matching fails, an abnormal prompt message is output.

Benefits of technology

It improves the accuracy and efficiency of near-field communication matching at the terminal, ensuring that the detection cycle is extended when the signal is unstable and shortened when the signal is stable, thereby reducing matching anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195924B_ABST
    Figure CN117195924B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a terminal near field communication matching method and device, an intelligent device and a storage medium. Embodiments of the present application can acquire a signal strength of near field communication between to-be-matched terminals to be matched with a terminal for near field communication. If the signal strength meets a first preset condition, i.e., the signal strength is less than a preset strength, a target detection period of the to-be-matched terminals is determined according to the signal strength. Near field communication matching is performed on the to-be-matched terminals in the target detection period. If the to-be-matched terminals are not matched in the target detection period, a to-be-matched terminal matching abnormality prompt information is output. The embodiments of the present application solve the problem of inaccurate terminal near field communication matching in the prior art by using a fixed detection time length, and improve the accuracy of terminal near field communication matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, specifically to a terminal near-field communication matching method, apparatus, smart device, and storage medium. Background Technology

[0002] Near Field Communication (NFC) is a short-range, high-frequency radio technology that can operate over short distances. NFC technology combines inductive card readers, inductive cards, and peer-to-peer functionality on a single chip, enabling detection and data exchange with compatible devices over short distances. This technology is currently widely used; for example, mobile phones use NFC for airport check-in, building access keys, public transport cards, credit cards, and payment cards. However, because NFC cards may be at an inconvenient distance from the terminal, resulting in poor signal strength, current NFC matching technologies typically use a fixed detection duration, leading to inaccurate matching between the NFC card and the terminal within that fixed detection time. Summary of the Invention

[0003] This application provides a terminal near-field communication matching method, apparatus, smart device, and storage medium, which can improve the accuracy of terminal near-field communication matching.

[0004] To address the aforementioned technical problems, this application provides the following technical solutions:

[0005] This application provides a terminal near-field communication matching method, including:

[0006] Acquire the signal strength of the near-field communication between the terminal to be matched and the terminal to be matched in near-field communication;

[0007] If the signal strength meets the first preset condition, then the target detection period with the terminal to be matched is determined according to the signal strength, wherein the first preset condition is that the signal strength is less than a preset strength;

[0008] Near-field communication matching is performed on the terminal to be matched during the target detection period;

[0009] If no matching terminal is found within the target detection period, an error message indicating a matching failure is output.

[0010] In one embodiment, before determining the target detection period with the terminal to be matched based on the signal strength, the process includes:

[0011] Obtain the reference detection period corresponding to all signal strength ranges that satisfy the first preset condition;

[0012] The target detection period is calculated based on the reference detection period corresponding to all signal strength ranges.

[0013] In one embodiment, obtaining the reference detection period corresponding to all signal strength intervals that satisfy the first preset condition includes:

[0014] If the signal strength meets the first preset condition, obtain the first timestamp corresponding to the terminal entering the interval where the signal strength is located;

[0015] When the protocol type of the terminal to be matched matches the protocol type of the terminal, a second timestamp is obtained;

[0016] Based on the first timestamp and the second timestamp, determine the detection period corresponding to the interval where the signal strength is located;

[0017] If the detection period is determined as a reference detection period according to the second preset condition, then the reference detection periods corresponding to all signal strength intervals that satisfy the first preset condition are obtained.

[0018] In one embodiment, determining the detection period as a reference detection period based on a second preset condition includes:

[0019] Obtain the reference detection cycle prior to the aforementioned detection cycle;

[0020] Determine whether the detection period and the reference detection period meet the second preset condition;

[0021] If the detection period and the reference detection period meet the second preset condition, then the detection period is determined to be the reference detection period.

[0022] In one embodiment, determining whether the detection period and the reference detection period satisfy a second preset condition includes:

[0023] Obtain the signal strength corresponding to the detection period and the reference signal strength corresponding to the reference detection period;

[0024] Calculate the first variance between the reference signal strengths and the second variance between the signal strength corresponding to the detection period and the reference signal strength;

[0025] Based on the first variance and the second variance, determine whether the signal strength corresponding to the detection period and the reference signal strength meet the second preset condition.

[0026] In one embodiment, the second preset condition is that the difference between the first variance and the second variance is less than a preset value. The step of determining whether the signal strength corresponding to the detection period and the reference signal strength satisfy the second preset condition based on the first variance and the second variance includes:

[0027] If the difference between the first variance and the second variance is less than or equal to a preset value, then the detection period is determined to be a reference detection period.

[0028] In one embodiment, calculating the target detection period based on the reference detection period corresponding to all signal strength intervals includes:

[0029] The target detection period is obtained by calculating the average value of the reference detection periods corresponding to all signal strength intervals.

[0030] According to one aspect of this application, a terminal near-field communication matching device is also provided, comprising:

[0031] The acquisition module is used to acquire the signal strength of the near-field communication between the terminal to be matched and the terminal to be matched in near-field communication.

[0032] The determining module is configured to determine the target detection period of the terminal to be matched based on the signal strength if the signal strength meets a first preset condition, wherein the first preset condition is that the signal strength is less than a preset strength;

[0033] The matching module is used to perform near-field communication matching on the terminal to be matched within the target detection period;

[0034] The output module is used to output a matching error message for the terminal to be matched if no matching terminal is found within the target detection period.

[0035] According to one aspect of this application, a smart device is also provided, including a processor and a memory, wherein the memory stores a computer program, and the processor executes any of the terminal near-field communication matching methods provided in the embodiments of this application when it invokes the computer program in the memory.

[0036] According to one aspect of this application, a storage medium is also provided for storing a computer program, which is loaded by a processor to execute any of the terminal near-field communication matching methods provided in the embodiments of this application.

[0037] This application embodiment can obtain the signal strength of a terminal to be matched with the terminal; if the signal strength meets a first preset condition, the target detection period of the terminal to be matched is determined based on the signal strength, wherein the first preset condition is that the signal strength is less than a preset strength; if the terminal to be matched is not matched within the target detection period, a matching error message is output. Thus, when the signal strength of near-field communication between the terminal and the terminal to be matched is less than the preset strength, it indicates that the terminal and the terminal to be matched are at a moderate distance. At this time, near-field communication matching can be performed on the terminal to be matched within the target detection period, thereby improving the accuracy of near-field communication. Even if matching cannot be performed within the target detection period, a matching error message can be output to prompt the user to target a terminal closer to the terminal to be matched, thus improving the accuracy of near-field communication matching. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating the terminal near-field communication matching method provided in an embodiment of this application;

[0040] Figure 2 This is another flowchart illustrating the terminal near-field communication matching method provided in this application embodiment;

[0041] Figure 3 This is another flowchart illustrating the terminal near-field communication matching method provided in this application embodiment;

[0042] Figure 4 This is a schematic diagram of the terminal near-field communication matching device provided in the embodiments of this application;

[0043] Figure 5 This is a schematic diagram of the structure of the smart device provided in the embodiments of this application. Detailed Implementation

[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] This application provides a terminal near-field communication matching method, apparatus, smart device, and storage medium (i.e., computer-readable storage medium). The terminal near-field communication matching method can be applied to a terminal near-field communication matching apparatus, which can be integrated into a smart device. This smart device can communicate with a server or terminal, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, but is not limited to these. The server and terminal can be directly or indirectly connected via wired or wireless communication, which is not limited herein. The terminal can be a mobile phone, computer, home appliance, or wearable device, etc.

[0046] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0047] In this embodiment, the description will be from the perspective of a smart device. Please refer to [link / reference]. Figure 1 , Figure 1 This is a flowchart illustrating a terminal near-field communication matching method according to an embodiment of this application. The terminal near-field communication matching method may include:

[0048] S101. Obtain the signal strength of the near-field communication between the terminal to be matched and the terminal to be matched.

[0049] Near Field Communication (NFC) is a short-range, high-frequency radio technology that can operate over short distances. The signal can be transmitted by the terminal to be paired. Both the terminal and the terminal to be paired contain chips employing NFC technology. The terminal to be paired can transmit NFC signals to perform protocol type matching with the terminal to be paired as the terminal approaches or moves away from the terminal to be paired, and then transmit data via the NFC connection. The entity executing the terminal NFC matching method can be a smart device, which can be the terminal itself or a third-party smart device independent of the terminal and the terminal to be paired.

[0050] In this embodiment, the execution entity is the terminal itself. This terminal can be a mobile terminal such as a smartphone, a wearable device, or a tablet computer, all of which are smart devices supporting the Near Field Communication (NFC) protocol. The terminal to be paired can be a tag, sticker, business card, or other medium with an NFC chip. Typically, NFC tags do not require external power; when an NFC-enabled peripheral reads or writes data to the NFC chip, it sends a magnetic field, which automatically powers the NFC tag. The terminal to be paired can also be a mobile terminal such as a smartphone, a wearable device, or a tablet computer, all of which are smart devices supporting the NFC protocol.

[0051] For example, when the terminal approaches or moves away from the terminal to be matched, the terminal obtains the near-field communication signal strength between the terminal to be matched and the terminal to be matched.

[0052] S102. If the signal strength meets the first preset condition, the target detection period with the terminal to be matched is determined according to the signal strength, wherein the first preset condition is that the signal strength is less than the preset strength.

[0053] The target detection period can be calculated based on the reference detection period corresponding to the signal strength of the terminal. The reference detection period can be the detection period experienced from the time the terminal enters the signal strength to the time the terminal matches the terminal to be matched.

[0054] It should be noted that the preset signal strength can be determined based on the actual near-field communication between the terminal and the terminal to be matched. When the signal strength is less than the preset strength, the terminal and the terminal to be matched are at a distance that is neither too close nor too far, and the signal is not stable enough. That is to say, if the terminal and the terminal to be matched are further apart, there will be no signal, and if they are closer, the signal strength will be more stable. However, at a distance that is neither too close nor too far, the near-field communication signal strength between the terminal and the terminal to be matched is unstable. If the fixed detection time in the prior art is used to match the terminal to be matched, there may be matching anomalies. Therefore, in this embodiment, different signal strengths correspond to different target detection cycles. When the signal strength is unstable, the detection cycle can be extended to improve the detection accuracy, while when the signal strength is stable, the detection cycle can be reduced to improve the detection efficiency.

[0055] For example, when the strength of the near-field communication signal between the terminal and the terminal to be matched is less than a preset strength, i.e. the signal is unstable, the target detection period between the terminal and the terminal to be matched under the signal strength is determined based on the signal strength.

[0056] S103. Perform near-field communication matching on the terminal to be matched within the target detection period.

[0057] The near-field communication (NFC) matching between the terminal to be matched can be based on the protocol types of the matching terminal and the terminal to be matched. For example, the NFC protocol types can be ISO14443 Type A, ISO14443 Type B, and Felica, etc. If the NFC protocol type of the terminal matches the NFC protocol type of the terminal to be matched, then the NFC matching between the terminal and the terminal to be matched can be considered successful.

[0058] For example, after determining the target detection period corresponding to the signal strength, the terminal can match the near-field communication protocol type of the terminal to be matched within the target detection period. If the terminal's near-field communication protocol type matches the near-field communication protocol type of the terminal to be matched within the target detection period, then the near-field communication match between the terminal and the terminal to be matched is successful. In this way, the terminal matches terminals to be matched according to the target detection period corresponding to the signal strength, thereby improving the accuracy of the terminal's near-field communication matching. If the terminal's near-field communication protocol type does not match the near-field communication protocol type of the terminal to be matched within the target detection period, then the near-field communication match between the terminal and the terminal to be matched fails, meaning the terminal has not been matched with the terminal to be matched.

[0059] S104. If no matching terminal is found within the target detection period, output a matching error message for the terminal to be matched.

[0060] The prompt message can be displayed on the terminal screen as a pop-up, such as a text pop-up message like "NFC signal is unstable and cannot be matched," or it can be a voice prompt from the terminal indicating an abnormal near-field communication match.

[0061] For example, if the terminal does not find a matching terminal within the target detection period, the terminal can display a pop-up message indicating a near-field communication matching error or output a voice message indicating a near-field communication matching error.

[0062] Optionally, if the terminal matches a target terminal within the target detection period, it can perform near-field communication with the target terminal and transmit or control data with it. For example, after successfully matching with the target terminal, the terminal can obtain data from the target terminal, perform payment operations, or control the gate to open, etc.

[0063] In the technical solution provided in this embodiment, the terminal can obtain the signal strength of the terminal to be matched with the terminal; if the signal strength meets a first preset condition, the target detection period of the terminal to be matched is determined according to the signal strength, wherein the first preset condition is that the signal strength is less than a preset strength; if no terminal to be matched is found within the target detection period, a matching error message is output. Thus, when the signal strength of the near-field communication between the terminal and the terminal to be matched is less than the preset strength, it indicates that the terminal and the terminal to be matched are at a moderate distance. At this time, near-field communication matching can be performed on the terminal to be matched within the target detection period corresponding to this signal strength, thereby improving the accuracy of the terminal's near-field communication. Even if a match cannot be found within the target detection period, a matching error message can be output to prompt the user to target the terminal closer to the terminal to be matched, thereby improving the accuracy of the terminal's near-field communication matching.

[0064] Please see Figure 2 , Figure 2 This is a flowchart illustrating a terminal near-field communication matching method according to an embodiment of this application. Based on the above embodiment, in this embodiment, before determining the target detection period with the terminal to be matched based on the signal strength, the following may be included:

[0065] S201. Obtain the reference detection period corresponding to all signal strength ranges that meet the first preset condition.

[0066] The first preset condition can be that the signal strength is less than a preset strength. The signal strength that meets the first preset condition can be divided into multiple signal strength intervals. The reference detection period corresponding to the signal strength interval can be the detection period from when the terminal enters the signal strength interval to when the terminal matches the terminal to be matched. The reference detection period corresponding to different signal strength intervals can be different.

[0067] It should be noted that in this embodiment, when the signal strength is less than the preset condition, the signal strength can be divided into multiple signal strength intervals, thereby obtaining multiple reference detection periods. Based on these reference detection periods, the target detection period corresponding to the signal strength that meets the first preset condition can be determined more reasonably, thereby improving the accuracy of near-field communication matching of the terminal.

[0068] S202. Calculate the target detection period based on the reference detection period corresponding to all signal strength intervals.

[0069] Optionally, in one embodiment, calculating the target detection period based on the reference detection period corresponding to all signal strength intervals may include: calculating the average value of the reference detection periods corresponding to all signal strength intervals to obtain the target detection period.

[0070] Optionally, in one embodiment, calculating the target detection period based on the reference detection periods corresponding to all signal strength intervals may include: sorting the reference detection periods corresponding to all signal strength intervals and taking the median of the reference detection periods corresponding to all sorted signal strength intervals to obtain the target detection period.

[0071] In the technical solution provided in this embodiment, the terminal can obtain reference detection periods corresponding to all signal strength intervals that satisfy the first preset condition before determining the target detection period for the terminal to be matched based on the signal strength; and calculate the target detection period based on the reference detection periods corresponding to all signal strength intervals. This method of calculating the target detection period for signal strengths that satisfy the first preset condition based on the reference detection periods of multiple signal strength intervals makes the target detection period more reasonable, makes it easier to detect the terminal to be matched within the target detection period, and avoids excessive time consumption, thereby improving the efficiency of near-field communication matching.

[0072] Please see Figure 3 , Figure 3 This is a flowchart illustrating a terminal near-field communication matching method according to an embodiment of this application. Based on the above embodiment, in this embodiment, matching a terminal to be matched with a terminal may include matching the protocol type of the terminal to be matched with the protocol type of the terminal. Obtaining the reference detection period corresponding to all signal strength intervals that satisfy the first preset condition may include:

[0073] S301. If the signal strength meets the first preset condition, then obtain the first timestamp corresponding to the signal strength interval entered by the terminal.

[0074] The first preset condition can be that the signal strength is less than a preset strength. It is understood that as the terminal approaches or moves away from the terminal to be paired, the near-field communication signal strength between the two terminals will gradually increase or decrease. When the signal strength increases or decreases to the point that the first preset condition is met, it indicates that the terminal has entered the range of that signal strength.

[0075] For example, when the signal strength is less than a preset strength, the signal is divided into multiple strength intervals. For example, it can be divided into three strength intervals: a first strength interval, a second strength interval, and a third strength interval. The signal strength of the first strength interval is greater than that of the second strength interval, and the signal strength of the second strength interval is greater than that of the third strength interval.

[0076] When a terminal enters the range of signal strength, it begins polling to match the type of near-field communication protocol of the terminal to be matched. The time elapsed from when the terminal enters the range of signal strength until the protocol type of the terminal and the terminal to be matched is successfully matched is the detection cycle between the terminal and the terminal to be matched under that signal strength.

[0077] Therefore, in order to obtain the detection period corresponding to the signal strength range, a first timestamp corresponding to the terminal entering the signal strength range can be obtained when the signal strength meets the first preset condition. This timestamp can be generated by the terminal and obtained by the terminal when it is detected that the near-field communication signal strength of the terminal to be matched meets the first preset condition, or it can be generated by the terminal and sent to a third-party smart device when it is detected that the near-field communication signal strength of the terminal to be matched meets the first preset condition.

[0078] S302. When the protocol type of the terminal to be matched matches the protocol type of the terminal, obtain the second timestamp.

[0079] The terminal and the terminal to be matched can include various communication protocol types, such as near-field communication (NFC). NFC can also include various protocol types, such as ISO14443 Type A, ISO14443 Type B, and Felica. The second timestamp is after the first timestamp.

[0080] For example, determine whether the protocol type of the terminal to be matched matches the protocol type of the terminal. If the near-field communication protocol type of the terminal to be matched matches the protocol type of the terminal, then obtain the second timestamp.

[0081] S303. Determine the detection period corresponding to the interval where the signal strength is located based on the first timestamp and the second timestamp.

[0082] Optionally, in one embodiment, the duration obtained by subtracting the time corresponding to the first time stamp from the time corresponding to the second timestamp is the detection period corresponding to the interval where the signal strength is located.

[0083] For example, if the first timestamp is 10:23:31.40 and the second timestamp is 10:23:33.44, subtracting the first timestamp from the second timestamp gives 2.04 seconds. Therefore, the detection period corresponding to the interval where the signal strength is located is 2.04 seconds.

[0084] S304. If the detection period is determined as the reference detection period according to the second preset condition, then obtain the reference detection period corresponding to all signal strength intervals that satisfy the first preset condition.

[0085] It should be noted that after the signal strength meets the first preset condition, the detection period corresponding to the signal strength can be calculated. However, there may be a sudden and significant increase or decrease in signal strength afterward. Even if the detection period corresponding to the signal strength after the significant increase or decrease in signal strength is still calculated, this detection period cannot be used as a reference detection period to calculate the target detection period corresponding to the signal strength that meets the first preset condition. Therefore, in this embodiment, the detection period in this case needs to be filtered out and not used as a reference detection period.

[0086] If the signal strength corresponding to the detection period meets the second preset condition, it means that the signal strength is relatively close to the reference signal strength of other intensity ranges that meet the first preset condition. Therefore, the detection period is relatively close to the reference detection period corresponding to the reference signal strength. If the signal strength corresponding to the detection period does not meet the second preset condition, it means that the signal strength is relatively close to the reference signal strength of other intensity ranges that meet the first preset condition. There may be a sudden increase or decrease in signal strength, which can filter out abnormal detection periods that occur when the signal strength suddenly increases or decreases significantly.

[0087] Optionally, in one embodiment, determining the detection period as a reference detection period based on a second preset condition may include:

[0088] S1. Obtain the reference detection cycle before the detection cycle.

[0089] The reference detection period preceding this detection period refers to the detection period that meets the second preset condition. The reference signal strength corresponding to this reference detection period meets the first preset condition, that is, the reference signal strength is less than the first preset strength.

[0090] For example, when it is determined that the detection period meets the second preset condition, the detection period is determined as the reference detection period and saved to the smart device. When the smart device calculates the new detection period corresponding to the signal strength that meets the first preset condition, it obtains the previously saved reference detection period so as to determine the new detection period based on the reference detection period.

[0091] S2. Determine whether the detection cycle and the reference detection cycle meet the second preset condition.

[0092] Optionally, determining whether the detection cycle and the reference detection cycle meet the second preset condition may include:

[0093] (1) Obtain the signal strength corresponding to the detection period and the reference signal strength corresponding to the reference detection period;

[0094] (2) Calculate the first variance between the reference signal strengths and the second variance between the signal strength corresponding to the detection period and the reference signal strength.

[0095] The reference signal strength can be multiple, and a first variance is calculated among these multiple reference signal strengths. This first variance is the average of the squared differences between each reference signal strength and the mean of all reference signal strengths. The second variance is the average of the signal strength and the squared differences between each reference signal strength and the mean of all reference signal strengths. The first variance measures the dispersion among the reference signal strengths, and the second variance measures the dispersion between the signal strength and the reference signal strengths.

[0096] (3) Based on the first variance and the second variance, determine whether the signal strength corresponding to the detection period and the reference signal strength meet the second preset condition.

[0097] The second preset condition is that the difference between the first variance and the second variance is less than a preset value. This preset value can be set according to actual conditions. Determining whether the signal strength corresponding to the detection period and the reference signal strength meet the second preset condition based on the first variance and the second variance can include: if the difference between the first variance and the second variance is less than or equal to the preset value, then the detection period is determined to be the reference detection period.

[0098] Understandably, since the reference signal strengths all satisfy the second preset condition (i.e., the dispersion between the reference signal strengths is small), if the difference between the first variance and the second variance is less than or equal to a preset value, it indicates that the dispersion between the signal strength and the reference signal strength corresponding to that detection period is small, and therefore, the signal strength and the reference signal strength satisfy the second preset condition. Optionally, if the difference between the first variance and the second variance is greater than a preset value, it indicates that the dispersion between the signal strength and the reference signal strength corresponding to that detection period is large, and therefore, the signal strength and the reference signal strength do not satisfy the second preset condition.

[0099] S3. If the detection cycle and the reference detection cycle meet the second preset condition, then the detection cycle is determined to be the reference detection cycle.

[0100] It is understandable that if the signal strength corresponding to the detection period and the reference signal strength meet the second preset condition, that is, the signal strength and the reference signal strength have a small dispersion, it means that the detection period and the reference detection period meet the second preset condition. Therefore, the detection period can be determined as the reference detection period and saved to the sequence of reference detection periods. Then, the target detection period corresponding to the signal strength that meets the first preset condition can be calculated based on the reference detection period.

[0101] Optionally, if the signal strength corresponding to the detection period does not meet the second preset condition with the reference signal strength, that is, the signal strength and the reference signal strength are significantly different, it means that the detection period and the reference detection period do not meet the second preset condition. Therefore, it can be determined that the detection period is not the reference detection period and the detection period needs to be discarded.

[0102] In the technical solution provided in this embodiment, the intelligent device can obtain a first timestamp corresponding to the signal strength interval when the signal strength meets a first preset condition; obtain a second timestamp when the protocol type of the terminal to be matched matches the protocol type of the terminal; determine the detection period corresponding to the signal strength interval based on the first and second timestamps; if the detection period is determined as a reference detection period based on the second preset condition, obtain the reference detection periods corresponding to all signal strength intervals that meet the first preset condition. By filtering the detection periods based on the second preset condition, sudden increases or decreases in signal strength can be filtered out, thus retaining the detection periods corresponding to signal strengths with smaller dispersion than the reference signal strengths that meet the first preset condition as reference detection periods, and calculating the target detection period corresponding to the signal strengths that meet the first preset condition based on the reference detection periods. Thus, when the signal strength of near-field communication between the terminal and the terminal to be matched is less than a preset strength, it indicates that the terminal and the terminal to be matched are at a moderate distance. At this time, near-field communication matching can be performed on the terminal to be matched within the target detection period corresponding to this signal strength, thereby improving the accuracy of near-field communication between the terminal.

[0103] To facilitate better implementation of the terminal near-field communication matching method provided in this application, this application also provides an apparatus based on the above-described terminal near-field communication matching method. The meanings of the terms used are the same as in the above-described terminal near-field communication matching method, and specific implementation details can be found in the descriptions within the method embodiments.

[0104] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a terminal near-field communication matching device provided in an embodiment of this application. The terminal near-field communication matching device 400 may include an acquisition module 401, a determination module 402, a matching module 403, and an output module 404, etc.

[0105] Among them, the acquisition module 401 is used to acquire the signal strength of the near-field communication between the terminal to be matched and the terminal to be matched in near-field communication;

[0106] The determining module 402 is used to determine the target detection period with the terminal to be matched based on the signal strength if the signal strength meets the first preset condition, wherein the first preset condition is that the signal strength is less than the preset strength;

[0107] Matching module 403 is used to perform near-field communication matching of the terminal to be matched during the target detection period;

[0108] The output module 404 is used to output a matching error message for the terminal to be matched if no matching terminal is found within the target detection period.

[0109] Optionally, the terminal near-field communication matching device 400 may further include:

[0110] The first acquisition module is used to acquire the reference detection period corresponding to all signal strength intervals that satisfy the first preset condition;

[0111] The first calculation module is used to calculate the target detection period based on the reference detection period corresponding to all signal strength intervals.

[0112] The second acquisition module is used to acquire the first timestamp corresponding to the signal strength interval when the signal strength meets the first preset condition.

[0113] The third acquisition module is used to acquire the second timestamp when the protocol type of the terminal to be matched matches the protocol type of the terminal.

[0114] The determination module is used to determine the detection period corresponding to the interval where the signal strength is located based on the first timestamp and the second timestamp;

[0115] The fourth acquisition module is used to acquire the reference detection period corresponding to all signal intensity intervals that satisfy the first preset condition if the detection period is determined as the reference detection period according to the second preset condition.

[0116] The fifth acquisition module is used to acquire the reference detection cycle prior to the detection cycle;

[0117] The first judgment module is used to determine whether the detection cycle and the reference detection cycle meet the second preset condition.

[0118] The first determination module is used to determine the detection period as the reference detection period if the detection period and the reference detection period meet the second preset condition.

[0119] The sixth acquisition module is used to acquire the signal strength corresponding to the detection period and the reference signal strength corresponding to the reference detection period;

[0120] The second calculation module is used to calculate the first variance between the reference signal strengths and the second variance between the signal strength corresponding to the detection period and the reference signal strength.

[0121] The second judgment module is used to determine whether the signal strength and the reference signal strength corresponding to the detection period meet the second preset condition based on the first variance and the second variance.

[0122] The second determination module is used to determine the detection period as the reference detection period if the difference between the first variance and the second variance is less than or equal to a preset value.

[0123] The third calculation module is used to calculate the average value of the reference detection period corresponding to all signal strength intervals to obtain the target detection period.

[0124] This application also provides a smart device, which can be a terminal such as a mobile phone, etc. Figure 5 As shown, it illustrates a structural schematic diagram of the smart device involved in the embodiments of this application, specifically:

[0125] The intelligent device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will understand that... Figure 5 The smart device structure shown does not constitute a limitation on the smart device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0126] The processor 501 is the control center of the smart device. It connects various parts of the smart device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, thereby providing overall monitoring of the smart device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.

[0127] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the smart device, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0128] The intelligent device also includes a power supply 503 that supplies power to the various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0129] The smart device may also include an input unit 504, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0130] Although not shown, the smart device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the smart device loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502 to realize various functions, as follows:

[0131] Obtain the signal strength of the terminal to be matched with the terminal; if the signal strength meets the first preset condition, determine the target detection period of the terminal to be matched based on the signal strength, wherein the first preset condition is that the signal strength is less than the preset strength; if no terminal to be matched is found within the target detection period, output the terminal to be matched abnormal prompt information.

[0132] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed description of the terminal near-field communication matching method above, which will not be repeated here.

[0133] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a smart device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the smart device to perform the methods provided in the various optional implementations of the above embodiments.

[0134] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by computer instructions, or by controlling related hardware through computer instructions. These computer instructions can be stored in a storage medium and loaded and executed by a processor. The storage medium is a computer-readable storage medium. Therefore, embodiments of this application provide a storage medium storing a computer program, which may include computer instructions. This computer program can be loaded by a processor to execute any of the terminal near-field communication matching methods provided in the embodiments of this application.

[0135] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0136] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0137] Since the computer instructions stored in the storage medium can execute any of the terminal near-field communication matching methods provided in the embodiments of this application, the beneficial effects that any of the terminal near-field communication matching methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0138] The present application provides a detailed description of a terminal near-field communication matching method, apparatus, smart device, and storage medium. Specific examples have been used to illustrate the principles and implementation methods of the present application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present application. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present application. Therefore, the content of this specification should not be construed as a limitation of the present application.

Claims

1. A terminal near-field communication matching method, characterized in that, The method includes: Acquire the signal strength of the near-field communication between the terminal to be matched and the terminal to be matched in near-field communication; If the signal strength meets the first preset condition, then the target detection period with the terminal to be matched is determined according to the signal strength, wherein the first preset condition is that the signal strength is less than a preset strength; Near-field communication matching is performed on the terminal to be matched during the target detection period; If no matching terminal is found within the target detection period, an error message indicating a matching failure is output.

2. The terminal near-field communication matching method according to claim 1, characterized in that, Before determining the target detection period for the terminal to be matched based on the signal strength, the process includes: Obtain the reference detection period corresponding to all signal strength ranges that satisfy the first preset condition; The target detection period is calculated based on the reference detection period corresponding to all signal strength ranges.

3. The terminal near-field communication matching method according to claim 2, characterized in that, The step of obtaining the reference detection period corresponding to all signal strength intervals that satisfy the first preset condition includes: If the signal strength meets the first preset condition, then obtain the first timestamp corresponding to the terminal entering the interval where the signal strength is located; When the protocol type of the terminal to be matched matches the protocol type of the terminal, a second timestamp is obtained; Based on the first timestamp and the second timestamp, determine the detection period corresponding to the interval where the signal strength is located; If the detection period is determined as a reference detection period according to the second preset condition, then the reference detection periods corresponding to all signal strength intervals that satisfy the first preset condition are obtained.

4. The terminal near-field communication matching method according to claim 3, characterized in that, The step of determining the detection period as a reference detection period based on the second preset condition includes: Obtain the reference detection cycle prior to the aforementioned detection cycle; Determine whether the detection period and the reference detection period meet the second preset condition; If the detection period and the reference detection period meet the second preset condition, then the detection period is determined to be the reference detection period.

5. The terminal near-field communication matching method according to claim 4, characterized in that, The step of determining whether the detection period and the reference detection period meet the second preset condition includes: Obtain the signal strength corresponding to the detection period and the reference signal strength corresponding to the reference detection period; Calculate the first variance between the reference signal strengths and the second variance between the signal strength corresponding to the detection period and the reference signal strength; Based on the first variance and the second variance, determine whether the signal strength corresponding to the detection period and the reference signal strength meet the second preset condition.

6. The terminal near-field communication matching method according to claim 5, characterized in that, The second preset condition is that the difference between the first variance and the second variance is less than a preset value. The step of determining whether the signal strength corresponding to the detection period and the reference signal strength satisfy the second preset condition based on the first variance and the second variance includes: If the difference between the first variance and the second variance is less than or equal to a preset value, then the detection period is determined to be a reference detection period.

7. The terminal near-field communication matching method according to claim 2, characterized in that, The calculation of the target detection period based on the reference detection period corresponding to all signal strength intervals includes: The target detection period is obtained by calculating the average value of the reference detection periods corresponding to all signal strength intervals.

8. A terminal near-field communication matching device, characterized in that, include: The acquisition module is used to acquire the signal strength of the near-field communication between the terminal to be matched and the terminal to be matched in near-field communication. The determining module is configured to determine the target detection period of the terminal to be matched based on the signal strength if the signal strength meets a first preset condition, wherein the first preset condition is that the signal strength is less than a preset strength; The matching module is used to perform near-field communication matching on the terminal to be matched within the target detection period; The output module is used to output a matching error message for the terminal to be matched if no matching terminal is found within the target detection period.

9. A smart device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the terminal near-field communication matching method as described in any one of claims 1 to 7 when it invokes the computer program in the memory.

10. A storage medium, characterized in that, The storage medium is used to store a computer program, which is loaded by a processor to execute the terminal near-field communication matching method according to any one of claims 1 to 7.