A short-range wireless communication method, device, wearable device and medium
By acquiring and storing data acquisition results in real time and adjusting the RF transmission power value according to the cached data volume, the problem of increasing power consumption in the prior art when wireless communications ensure transmission stability is solved, and the reliability of wireless transmission and low power consumption are achieved.
Patent Information
- Application Number
- CN202211493566.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-11-25
AI Technical Summary
While ensuring transmission stability, existing wireless communication technologies are difficult to achieve low power consumption, resulting in increased power consumption.
By acquiring the data acquisition results in real time and storing them in a cache, the RF transmission power value is determined based on the cached data volume, and the data acquisition results are sent short distance according to the power value.
It realizes the reliability of wireless transmission and balance of low power consumption, effectively adjusts the power consumption problem, and avoids resource waste caused by resource occupation.
Smart Images

Figure CN115734326B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a short-range wireless communication method, apparatus, wearable device and medium. Background Art
[0002] With the large-scale popularization and application of the Internet of Things, wireless communications are being increasingly widely used in all aspects of life. Low power consumption has become an important factor. Many application scenarios need to reduce power consumption as much as possible while meeting the communication rate and communication quality.
[0003] In the process of realizing the present invention, the inventors found that the prior art has the following defects: At present, the more popular wireless communication technologies include Bluetooth, mobile hotspot, and Zifeng. The main features of these standards are short distance, low power consumption, low cost, and suitable for personal operation. However, in actual use, the transmission of wireless signals is affected by various environmental factors, and it is difficult to achieve a balance between the stability and power consumption of transmission. Increasing the transmission power will improve the reliability of transmission, but the power consumption will increase. Reducing the transmission power will reduce the reliability, resulting in multiple packet transmissions, which will still increase power consumption. Therefore, while ensuring the stability of wireless transmission, it is very necessary to further reduce power consumption. Summary of the invention
[0004] The present invention provides a short-range wireless communication method, apparatus, wearable device and medium to achieve a balance between reliability of wireless transmission and low power consumption, thereby effectively adjusting the power consumption problem.
[0005] According to one aspect of the present invention, a short-range wireless communication method is provided, comprising:
[0006] Acquire data collection results in real time, and store the data collection results in a cache;
[0007] Determine the current radio frequency transmission power value according to the real-time cache data volume in the cache, wherein the larger the cache data volume, the higher the radio frequency transmission power value;
[0008] According to the current radio frequency transmission power value, the data collection result is obtained from the high-speed buffer in real time and sent to a target receiving device over a short distance.
[0009] According to another aspect of the present invention, a short-range wireless communication device is provided, comprising:
[0010] A data collection result acquisition module, used to acquire data collection results in real time and store the data collection results in a cache;
[0011] A current radio frequency transmission power value determination module, used to determine the current radio frequency transmission power value according to the real-time cache data volume in the cache, wherein the larger the cache data volume, the higher the radio frequency transmission power value;
[0012] The data acquisition result short-distance sending module is used to obtain the data acquisition result from the high-speed buffer in real time according to the current radio frequency transmission power value and send it to the target receiving device over a short distance.
[0013] According to another aspect of the present invention, there is provided a wearable device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the short-range wireless communication method described in any embodiment of the present invention when executing the computer program.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the short-range wireless communication method described in any embodiment of the present invention when executed.
[0015] The technical solution of the embodiment of the present invention obtains data acquisition results in real time and stores the data acquisition results in a cache; determines the current RF transmission power value according to the real-time cached data volume in the cache; obtains the data acquisition results from the cache in real time and transmits them to the target receiving device over a short distance according to the current RF transmission power value. The problem of the difficulty in achieving a balance between low power consumption and reliability of wireless communication is solved, and the corresponding transmission power adjustment can be made according to the data volume of the data acquisition results, so that the data acquisition results can be sent more reasonably according to the corresponding transmission power, achieving a balance between the reliability of wireless transmission and low power consumption, and effectively adjusting the power consumption problem.
[0016] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 is a flowchart of a short-range wireless communication method provided according to Embodiment 1 of the present invention;
[0019] Figure 2 is a flowchart of another short-range wireless communication method provided according to Embodiment 2 of the present invention;
[0020] Figure 3 is a schematic diagram of the structure of a short-range wireless communication device provided according to Embodiment 3 of the present invention;
[0021] Figure 4 4 is a schematic diagram of the structure of a wearable device provided according to Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "target", "current", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] Embodiment 1
[0025] Figure 1 A flowchart of a short-range wireless communication method is provided for Embodiment 1 of the present invention. This embodiment is applicable to the scenario where data collection results are sent according to a certain transmission power while ensuring a balance between the reliability of wireless transmission and low power consumption. The method can be executed by a short-range wireless communication device, which can be implemented in the form of hardware and / or software.
[0026] Correspondingly, such as Figure 1 As shown, the method includes:
[0027] S110, acquiring data collection results in real time, and storing the data collection results in a cache.
[0028] The data collection result may be a result of data collection obtained by a data collection device performing a data collection operation on data within a period of time. The cache may be a cache capable of storing data collection results.
[0029] Generally speaking, a cache may refer to a cache with a faster access speed than a general random access memory. In this embodiment, the cache may be used to synchronize data acquisition time and wireless transmission speed, and the wireless transmission power may be adjusted by obtaining the amount of data in the cache.
[0030] Optionally, data collection results are acquired in real time and stored in a cache, including: whenever a data collection condition is met, a set number of data collection operations are performed, and each collected data collection result is stored in the cache.
[0031] The data collection condition can be used in a data collection device to detect the data collection condition, and when the data collection condition is met, a data collection operation is performed. The set number of times can be a preset number of collection times performed by the data collection device.
[0032] In this embodiment, each time the data collection condition is met, the data collection device needs to collect data multiple times until the number of data collection times reaches the set number. Further, each time data collection is performed, it is necessary to determine whether the current number of data collection times reaches the set number of data collection devices, and perform corresponding processing operations according to the determination result.
[0033] Optionally, whenever the data collection conditions are met, a set number of data collection operations are performed, and the data collection results collected each time are stored in the cache respectively, including: periodically obtaining a data collection flag; when the data collection flag is obtained, performing a data collection operation, and after the collection is completed, storing the collected data collection results in the cache; updating the current number of data collection times through a counter; judging whether the current number of data collection times reaches the set number, and if so, determining that the set number of data collection operations are completed; if not, returning to perform a data collection operation, and after the collection is completed, storing the collected data collection results in the cache, until the current number of data collection times reaches the set number.
[0034] The data collection mark may be a mark that triggers the data collection device to collect data.
[0035] Specifically, the data acquisition device periodically detects the data acquisition mark. Assuming that the data acquisition mark is detected at the current moment, the data acquisition device performs data acquisition operations. If the data acquisition mark is not detected at the current moment, the data acquisition device waits for the arrival of the next cycle moment and then performs data acquisition mark detection and acquisition operations.
[0036] The current data collection times may be the times of executing data collection in the current cycle counted by a timer.
[0037] For example, assume that the preset number of times of the data acquisition device is 10 times, and the initial value of the counter is 0. When the data acquisition device obtains the data acquisition flag, it needs to perform a data acquisition operation, and after the acquisition is completed, the collected data acquisition results are stored in the cache. Further, the data acquisition device needs to update the current data acquisition times through the counter, that is, the current data acquisition times is 1.
[0038] Next, it is necessary to determine whether the current data collection times (value is 1) has reached the set times 10. Since the current data collection times has not reached the set times, the data collection operation will continue until the current data collection times reaches the set times. That is, when the current data collection times is 10, it is determined that the set times of data collection operations have been completed.
[0039] The advantage of this setting is that the current data collection times are updated through the timer, and the current data collection times are compared with the preset times to determine whether to continue the data collection operation. This allows data collection to be performed more reasonably and accurately. In addition, the data collection flag is obtained periodically, and whether to start data collection is determined based on whether the data collection flag is obtained. This can improve the reliability of data collection.
[0040] Optionally, after the collection is completed, the collected data collection results are stored in the cache, and it also includes: determining whether the current cached data volume in the cache exceeds a preset overflow data volume threshold, and if so, clearing the cache.
[0041] The current cache data volume may describe the amount of cached data in the cache. The larger the current cache data volume, the higher the wireless transmission rate needs to be to reduce the data pressure of the cache. Conversely, the wireless transmission rate needs to be reduced. The overflow data volume threshold may indicate that the amount of buffered data in the current cache is too much, resulting in an overflow of the cache data volume.
[0042] In this embodiment, it is assumed that the preset overflow data volume threshold is T. After the data acquisition device completes data acquisition, the acquired data acquisition results are stored in the cache memory, and then the current cache data volume is determined to be M.
[0043] Furthermore, the data acquisition device needs to determine whether the current cached data volume M in the cache exceeds the preset overflow data volume threshold T. Assuming M≤T, it can be determined that the current cached data volume does not exceed the preset overflow data volume threshold, so the data acquisition operation will continue. Assuming M>T, it can be determined that the current cached data volume has exceeded the preset overflow data volume threshold, and the data acquisition device clears the cache.
[0044] The advantage of this setting is that by judging the relationship between the current cache data volume of the cache and the preset overflow data volume threshold, the decision on whether to perform data collection and clear the cache can be made in one step, thereby more accurately determining the wireless transmission power and improving the reliability of wireless data transmission.
[0045] S120: Determine a current radio frequency transmission power value according to the real-time cache data amount in the cache.
[0046] The larger the cache data volume, the higher the RF transmission power value.
[0047] The cached data volume may be the size of the data volume cached in the cache memory. The current radio frequency transmission power value may be the size of the radio frequency transmission power used when the data acquisition device transmits data.
[0048] Specifically, the larger the amount of cached data in the cache, the greater the data pressure of the cache, and the higher the data transmission speed needs to be. The smaller the amount of cached data in the cache, the smaller the data pressure of the cache, and the lower the data transmission speed needs to be.
[0049] In this embodiment, the current RF transmission power value is determined by the amount of cached data, which can avoid power consumption waste caused by sending too little data and overflow of data in the cache due to too much data but not sending it in time, causing data failure problems.
[0050] S130: According to the current radio frequency transmission power value, the data collection result is obtained from the high-speed buffer in real time and sent to a target receiving device over a short distance.
[0051] In this embodiment, the current radio frequency transmission power value is determined according to the amount of buffered data, and the data collection result is sent over a short distance according to the determined current radio frequency transmission power value to the target receiving device.
[0052] The technical solution of the embodiment of the present invention obtains data acquisition results in real time and stores the data acquisition results in a cache; determines the current RF transmission power value according to the real-time cached data volume in the cache; obtains the data acquisition results from the cache in real time and transmits them to the target receiving device over a short distance according to the current RF transmission power value. It is possible to adjust the corresponding transmission power according to the data volume of the data acquisition results, so that the data acquisition results can be sent more reasonably according to the corresponding transmission power, achieving a balance between the reliability of wireless transmission and low power consumption, and effectively adjusting the power consumption problem.
[0053] Embodiment 2
[0054] Figure 2 A flowchart of another short-range wireless communication method provided in Embodiment 2 of the present invention. This embodiment is refined based on the above embodiments. In this embodiment, the current RF transmission power value is determined based on the real-time cache data amount in the cache memory and further refined.
[0055] Correspondingly, such as Figure 2 As shown, the method includes:
[0056] S210, acquiring data collection results in real time, and storing the data collection results in a cache.
[0057] S220. Whenever a transmit power adjustment condition is met, obtain a current cache data amount in the cache.
[0058] Among them, the transmission power adjustment condition can be used for the power adjustment device to determine whether the transmission power adjustment condition is met. If it is met, the power adjustment device needs to adjust the transmission power. If it is not met, there is no need to perform the transmission power adjustment operation.
[0059] S230: Compare the current cache data volume with at least one preset data volume threshold to obtain a comparison result.
[0060] The data volume threshold may be a threshold describing the size of the data volume in the high-speed buffer, and the data volume threshold may include a first data volume threshold, a second data volume threshold, and a third data volume threshold. The comparison result may be a result obtained by comparing the current cache data volume with the data volume threshold.
[0061] Optionally, the current cached data volume is compared with at least one preset data volume threshold to obtain a comparison result, including: the preset data volume threshold includes: a first data volume threshold, a second data volume threshold and a third data volume threshold; if it is determined that the current cached data volume is less than the first data volume threshold, a first comparison result is obtained; if it is determined that the current cached data volume is greater than or equal to the first data volume threshold and less than the second data volume threshold, a second comparison result is obtained; if it is determined that the current cached data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold, a third comparison result is obtained.
[0062] Among them, the first data volume threshold may be the smallest data volume threshold among the first data volume threshold, the second data volume threshold and the third data volume threshold, reflecting that the current data volume pressure of the cache is not too large. The first comparison result may be the result obtained by comparing the current cache data volume with the first data volume threshold. The second data volume threshold may be the middle data volume threshold among the first data volume threshold, the second data volume threshold and the third data volume threshold. The second comparison result may be the result obtained by comparing the current cache data volume with the first data volume threshold and the second data volume threshold. The third data volume threshold may be the largest data volume threshold among the first data volume threshold, the second data volume threshold and the third data volume threshold, reflecting that the current data volume pressure of the cache is relatively large. The third comparison result may be the result obtained by comparing the current cache data volume with the second data volume threshold and the third data volume threshold.
[0063] Exemplarily, assuming that the first data volume threshold is Th 1 , the second data volume threshold is Th 2 and the third data volume threshold is Th 3 , and the current cached data volume is A.
[0064] The current cached data volume A needs to be compared with the data volume threshold. Specifically, assuming A < Th 1 , it can be determined that the current cache data volume A is less than the first data volume threshold Th 1 , then we get the first comparison result Z 1 .
[0065] Furthermore, assuming that Th 1 ≤A<Th 2 , it can be determined that the current cache data volume A is greater than or equal to the first data volume threshold Th 1 , and is less than the second data volume threshold Th 2 , then the second comparison result Z is obtained 2 .
[0066] Accordingly, assuming that Th 2 ≤A<Th3 , it can be determined that the current cache data volume A is greater than or equal to the second data volume threshold Th 2 , and is less than the third data volume threshold Th 3 , then the third comparison result Z is obtained 3 .
[0067] S240: If a target transmit power adjustment level matching the current cache data amount is successfully acquired according to the comparison result, a current radio frequency transmit power value corresponding to the target transmit power adjustment level is acquired.
[0068] The target transmit power adjustment level may be a level describing the transmit power. Specifically, each comparison result may correspond to a transmit power adjustment level.
[0069] In this embodiment, it is assumed that the first comparison result corresponds to a first level of transmission power adjustment; the second comparison result corresponds to a second level of transmission power adjustment; and the third comparison result corresponds to a third level of transmission power adjustment.
[0070] Exemplarily, assume that the current RF transmit power value corresponding to the first level of transmit power adjustment is 0.036W; the current RF transmit power value corresponding to the second level of transmit power adjustment is 0.36W; and the current RF transmit power value corresponding to the third level of transmit power adjustment is 1W.
[0071] Further, assuming that the first comparison result Z is currently obtained 1 According to the first comparison result, the first level of transmission power adjustment matching the current cache data volume is successfully obtained, and then it can be determined that the current RF transmission power value is 0.036W.
[0072] Optionally, if it is determined that the current cached data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold, after obtaining the third comparison result, it also includes: if it is determined according to the third comparison result that the current cached data volume in the cache exceeds the preset overflow data volume threshold, the most recently used RF transmission power value is used as the current RF transmission power value.
[0073] Continuing from the previous example, the preset overflow data volume threshold is T. Assume that Th 3 ≤A, requires the third comparison result Z 3 To determine whether the current cached data volume A in the cache exceeds the preset overflow data volume threshold T. If so, it is necessary to disconnect the transmission power device from the data acquisition device, and the data acquisition device clears the high-speed buffer and uses the most recently used RF transmission power value as the current RF transmission power value.
[0074] In addition, assuming that the current cache data volume A in the cache does not exceed the preset overflow data volume threshold T, according to the third comparison result Z 3 To determine the current RF transmit power value.
[0075] The advantage of this setting is that when it is detected that the current cached data volume in the cache exceeds the preset overflow data volume threshold, it is necessary to disconnect the connection with the data acquisition device in time, and the data acquisition device can clear the high-speed buffer in time, which can improve the reliability of RF power transmission and avoid waste of resources.
[0076] S250: According to the current radio frequency transmission power value, the data collection result is obtained from the high-speed buffer in real time and sent to a target receiving device over a short distance.
[0077] The technical solution of the embodiment of the present invention is to obtain the data collection results in real time and store the data collection results in a cache; whenever the transmission power adjustment condition is met, the current cache data volume in the cache is obtained; the current cache data volume is compared with at least one preset data volume threshold to obtain a comparison result; if the target transmission power adjustment level matching the current cache data volume is successfully obtained according to the comparison result, the current RF transmission power value corresponding to the target transmission power adjustment level is obtained; according to the current RF transmission power value, the data collection results are obtained from the cache in real time and sent to the target receiving device over a short distance. It is realized that the corresponding transmission power adjustment can be performed according to the data volume of the data collection results, so that the data collection results can be sent more reasonably according to the corresponding transmission power, and the reliability of wireless transmission and low power consumption are balanced, the power consumption problem is effectively adjusted, and the phenomenon of resource waste caused by resource occupation can also be avoided.
[0078] Embodiment 3
[0079] Figure 3 This is a schematic diagram of the structure of a short-distance wireless communication device provided in Embodiment 3 of the present invention. The short-distance wireless communication device provided in this embodiment can be implemented by software and / or hardware, and can be configured in a terminal device to implement a short-distance wireless communication method in an embodiment of the present invention, especially a wearable terminal device. Figure 3 As shown, the device includes: a data collection result acquisition module 310, a current radio frequency transmission power value determination module 320 and a data collection result short-distance transmission module 330.
[0080] The data collection result acquisition module 310 is used to acquire the data collection result in real time and store the data collection result in a cache;
[0081] The current radio frequency transmission power value determination module 320 is used to determine the current radio frequency transmission power value according to the real-time cache data amount in the cache, wherein the larger the cache data amount, the higher the radio frequency transmission power value;
[0082] The data collection result short-distance transmission module 330 is used to obtain the data collection result from the high-speed buffer in real time according to the current radio frequency transmission power value and transmit it to the target receiving device over a short distance.
[0083] The technical solution of the embodiment of the present invention obtains data acquisition results in real time and stores the data acquisition results in a cache; determines the current RF transmission power value according to the real-time cached data volume in the cache; obtains the data acquisition results from the cache in real time and transmits them to the target receiving device over a short distance according to the current RF transmission power value. The problem of the difficulty in achieving a balance between low power consumption and reliability of wireless communication is solved, and the corresponding transmission power adjustment can be made according to the data volume of the data acquisition results, so that the data acquisition results can be sent more reasonably according to the corresponding transmission power, achieving a balance between the reliability of wireless transmission and low power consumption, and effectively adjusting the power consumption problem.
[0084] Optionally, the data collection result acquisition module 310 may specifically include: a data collection unit, configured to perform a set number of data collection operations whenever a data collection condition is met, and store each collected data collection result in the cache.
[0085] Optionally, the current RF transmit power value determination module 320 may specifically include: a current cache data amount acquisition unit, used to obtain the current cache data amount in the cache whenever the transmit power adjustment condition is met; a comparison result determination unit, used to compare the current cache data amount with at least one preset data amount threshold to obtain a comparison result; and a current RF transmit power value acquisition unit, used to obtain the current RF transmit power value corresponding to the target transmit power adjustment level if the target transmit power adjustment level matching the current cache data amount is successfully acquired according to the comparison result.
[0086] Optionally, the data acquisition unit can be specifically used to: periodically obtain a data acquisition flag; when the data acquisition flag is obtained, perform a data acquisition operation, and after the acquisition is completed, store the collected data acquisition results in the cache; update the current data acquisition times through a counter; determine whether the current data acquisition times reaches the set times, and if so, determine that the data acquisition operations for the set times are completed; if not, return to perform a data acquisition operation, and after the acquisition is completed, store the collected data acquisition results in the cache, until the current data acquisition times reaches the set times.
[0087] Optionally, the data collection unit can also be specifically used to: after the collection is completed, store the collected data collection results in the cache, and determine whether the current cached data volume in the cache exceeds a preset overflow data volume threshold. If so, clear the cache.
[0088] Optionally, the comparison result determination unit may specifically include: the preset data volume threshold includes: a first data volume threshold, a second data volume threshold and a third data volume threshold; a first comparison result determination subunit, used to obtain a first comparison result if it is determined that the current cached data volume is less than the first data volume threshold; a second comparison result determination subunit, used to obtain a second comparison result if it is determined that the current cached data volume is greater than or equal to the first data volume threshold and less than the second data volume threshold; a third comparison result determination subunit, used to obtain a third comparison result if it is determined that the current cached data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold.
[0089] Optionally, it also includes a current RF transmission power value determination subunit, which can be specifically used to: if it is determined that the current cached data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold, then after obtaining a third comparison result, if it is determined according to the third comparison result that the current cached data volume in the cache exceeds a preset overflow data volume threshold, then the most recently used RF transmission power value is used as the current RF transmission power value.
[0090] The short-range wireless communication device provided in the embodiment of the present invention can execute the short-range wireless communication method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0091] Embodiment 4
[0092] Figure 4A schematic diagram of the structure of a wearable device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices, and the electronic device is especially a wearable device. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0093] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0094] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0095] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a short-range wireless communication method.
[0096] In some embodiments, the short-range wireless communication method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the short-range wireless communication method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the short-range wireless communication method in any other appropriate manner (e.g., by means of firmware).
[0097] The method includes: acquiring data acquisition results in real time and storing the data acquisition results in a high-speed cache; determining a current radio frequency transmission power value according to the real-time cached data volume in the high-speed cache; and acquiring the data acquisition results in real time from the high-speed buffer and sending them to a target receiving device over a short distance according to the current radio frequency transmission power value.
[0098] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0099] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0100] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0101] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0102] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0103] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0104] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0105] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
[0106] Embodiment 5
[0107] Embodiment 5 of the present invention also provides a computer-readable storage medium, wherein the computer-readable instructions are used to execute a short-range wireless communication method when executed by a computer processor, the method comprising: acquiring data acquisition results in real time, and storing the data acquisition results in a cache; determining a current RF transmission power value based on the real-time amount of cached data in the cache; and acquiring the data acquisition results from the cache in real time according to the current RF transmission power value and sending them to a target receiving device over a short distance.
[0108] Of course, the computer-readable storage medium provided in the embodiment of the present invention has computer-executable instructions that are not limited to the method operations described above, and can also execute related operations in the short-range wireless communication method provided in any embodiment of the present invention.
[0109] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0110] It is worth noting that in the above-mentioned embodiment of the short-range wireless communication device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0111] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A short-range wireless communication method, characterized in that: include: Acquire data collection results in real time, and store the data collection results in a cache; Determine the current radio frequency transmission power value according to the real-time cache data volume in the cache, wherein the larger the cache data volume, the higher the radio frequency transmission power value; According to the current radio frequency transmission power value, the data collection result is obtained from the cache in real time and sent to a target receiving device over a short distance; Wherein, determining the current radio frequency transmission power value according to the real-time cache data amount in the cache memory includes: Whenever a transmit power adjustment condition is met, obtaining a current amount of cached data in the cache; Comparing the current cache data volume with at least one preset data volume threshold to obtain a comparison result; If the target transmit power adjustment level matching the current cached data amount is successfully acquired according to the comparison result, acquiring the current radio frequency transmit power value corresponding to the target transmit power adjustment level; Among them, the high-speed cache realizes the synchronization of data collection time and wireless transmission speed; wherein, determining whether the current cached data volume in the cache exceeds a preset overflow data volume threshold, and if so, clearing the cache; The current cache data volume is compared with at least one preset data volume threshold to obtain a comparison result, including: The at least one preset data volume threshold includes: a first data volume threshold, a second data volume threshold and a third data volume threshold; If it is determined that the current cache data amount is less than the first data amount threshold, a first comparison result is obtained; If it is determined that the current cache data amount is greater than or equal to the first data amount threshold and less than the second data amount threshold, a second comparison result is obtained; If it is determined that the current cache data amount is greater than or equal to the second data amount threshold and less than the third data amount threshold, a third comparison result is obtained; The first comparison result corresponds to a first level of transmission power adjustment; the second comparison result corresponds to a second level of transmission power adjustment; and the third comparison result corresponds to a third level of transmission power adjustment; If it is determined that the current cache data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold, after obtaining the third comparison result, the method further includes: If it is determined according to the third comparison result that the current cached data amount in the cache exceeds the preset overflow data amount threshold, the most recently used radio frequency transmission power value is used as the current radio frequency transmission power value.
2. The method according to claim 1, characterized in that Acquiring data collection results in real time and storing the data collection results in a cache memory includes: Whenever the data collection condition is met, a set number of data collection operations are performed, and the data collection results collected each time are stored in the cache memory.
3. The method according to claim 2, characterized in that Whenever the data collection condition is met, a set number of data collection operations are performed, and the data collection results collected each time are stored in the cache respectively, including: Periodically obtain data collection flags; When the data collection flag is obtained, a data collection operation is performed, and after the collection is completed, the collected data collection results are stored in the cache; Update the current data collection times through the counter; Determine whether the current data collection times reaches the set times, and if so, determine that the data collection operations for the set times are completed; If not, the process returns to execute a data collection operation, and after the collection is completed, the collected data collection results are stored in the cache until the current data collection times reaches the set times.
4. A short-range wireless communication device, characterized in that: include: A data collection result acquisition module, used to acquire data collection results in real time and store the data collection results in a cache; A current radio frequency transmission power value determination module, used to determine the current radio frequency transmission power value according to the real-time cache data volume in the cache, wherein the larger the cache data volume, the higher the radio frequency transmission power value; A data collection result short-distance transmission module is used to obtain the data collection result from the cache in real time according to the current radio frequency transmission power value and send it to a target receiving device over a short distance; Wherein, the current radio frequency transmission power value determination module includes: a current cache data amount acquisition unit, configured to acquire the current cache data amount in the cache memory whenever a transmit power adjustment condition is met; A comparison result determination unit, configured to compare the current cache data volume with at least one preset data volume threshold to obtain a comparison result; a current radio frequency transmit power value acquiring unit, configured to acquire a current radio frequency transmit power value corresponding to the target transmit power adjustment level if the target transmit power adjustment level matching the current cached data amount is successfully acquired according to the comparison result; Among them, the high-speed cache realizes the synchronization of data collection time and wireless transmission speed; wherein, determining whether the current cached data volume in the cache exceeds a preset overflow data volume threshold, and if so, clearing the cache; Wherein, the at least one preset data volume threshold includes: a first data volume threshold, a second data volume threshold and a third data volume threshold; a first comparison result determination subunit is used to obtain a first comparison result if it is determined that the current cache data volume is less than the first data volume threshold; a second comparison result determination subunit is used to obtain a second comparison result if it is determined that the current cache data volume is greater than or equal to the first data volume threshold and less than the second data volume threshold; a third comparison result determination subunit is used to obtain a third comparison result if it is determined that the current cache data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold; The first comparison result corresponds to a first level of transmission power adjustment; the second comparison result corresponds to a second level of transmission power adjustment; and the third comparison result corresponds to a third level of transmission power adjustment; It also includes a current RF transmission power value determination subunit, which is used to: if it is determined that the current cached data volume is greater than or equal to the second data volume threshold and less than the third data volume threshold, then after obtaining the third comparison result, if it is determined according to the third comparison result that the current cached data volume in the cache exceeds the preset overflow data volume threshold, then the most recently used RF transmission power value is used as the current RF transmission power value.
5. A wearable device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the short-distance wireless communication method according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the short-range wireless communication method according to any one of claims 1 to 3 when executed.
Citation Information
Patent Citations
WIFI equipment, transmitting power adjusting method thereof and computer readable storage medium
CN113194527A