Remote communication method and equipment for Bluetooth frequency point dynamic replacement electricity meter and using and collecting terminal
Through the dynamic replacement method of Bluetooth frequency points, the interference problem caused by the static unchanged mid-frequency points of Bluetooth verification is solved, and the communication frequency point stability and verification accuracy are improved in the dynamic environment.
Patent Information
- Application Number
- CN202410975806.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-19
- Publication Date
- 2024-11-26
AI Technical Summary
In the existing Bluetooth verification scheme, the frequency points of the communication channel remain static and cannot adapt to the dynamically changing test environment, resulting in duplication and interference of frequency distribution, affecting the accuracy of the verification.
Using the method of dynamic replacement of Bluetooth frequency points, by sending multiple test packets to detect connections, initializing Bluetooth modules, dividing active and inactive queues, switching nodes and frequency points according to whether the communication is successful or not, dynamically update frequency points information, and reduce interference .
Ensure the stability of communication frequency points in a dynamic environment, reduce interference between terminals, and improve verification accuracy.
Smart Images

Figure CN119030962A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal transmission systems, and in particular to a method and equipment for remote communication between an electric meter and a user terminal with dynamically changing Bluetooth frequency points. Background Art
[0002] With the development of wireless communication technology, the use of wireless communication output in the information transmission between smart meters and user terminals has gradually become a new trend. In the calibration process of smart meters and user terminals, Bluetooth wireless communication has begun to replace the traditional wired method. The current Bluetooth calibration process is: the station outputs a standard voltage / current source to the terminal, the metering module in the terminal converts the standard source into a pulse signal, the Bluetooth module converts the pulse signal into a pulse message, and sends it to the pulse converter at the station end through the Bluetooth wireless channel. The pulse converter converts the obtained pulse message into a pulse signal and sends it to the station. The station analyzes the obtained pulse signal to determine whether the metering function of the terminal is normal and reliable.
[0003] However, the loss of pulse messages will affect the calibration accuracy, and interference is the main factor causing pulse loss. Therefore, the interference problem of Bluetooth wireless channels is a key issue that needs to be solved.
[0004] At present, the solutions to the channel interference in the transmission process in Bluetooth testing solutions are divided into multi-channel multi-frequency transmission and repeated transmission. The main disadvantages of the existing Bluetooth testing anti-interference technology of multi-channel multi-frequency are:
[0005] (1) The communication channel frequency remains static during the communication process: the channel frequency will not change after being set before the test, but the test environment is changing: for example, when multiple terminals on a calibration platform are being tested, another calibration platform is powered on to perform calibration on other multiple terminals simultaneously; for example, after a round of testing, some terminals remain on the platform to continue testing, while other terminals are replaced with new terminals for testing, etc.
[0006] No matter how reasonable the frequency allocation is in the early stage, communication failure may occur due to reasons such as repeated frequency allocation as the terminals and stations change dynamically.
[0007] (2) During the communication process, there is a main frequency point for normal communication, and a backup frequency point is switched to a different frequency point according to a certain algorithm each time communication is carried out to detect the frequency point with better signal quality, update and maintain a backup frequency point list, and when the communication of the main frequency point fails, it is immediately switched to the frequency point with the best quality in the backup frequency point list;
[0008] If there are multiple terminals in the entire environment, this method will have some disadvantages:
[0009] On the one hand: the detected frequency is only used as a backup frequency and is unlikely to be used. The impact is that in addition to normal communication, the entire environment is more filled with detection signals, and even the detection signals of some terminals will interfere with the normal communication of surrounding terminals. On the second aspect: there is a time difference between the detection and use of the frequency with good communication quality detected by the detection signal, that is, the frequency with good communication quality is detected at the current time, and then added to the backup frequency list. When the communication of the main frequency is abnormal and the backup frequency is enabled, it is uncertain whether the backup frequency is still the frequency with the best communication quality, or even whether the backup frequency is being occupied by other terminals.
[0010] In short: the negative impact of increased detection capabilities outweighs its positive effects. Summary of the invention
[0011] The present invention provides an electric meter with dynamically changing Bluetooth frequency points and a remote communication method and device using a terminal, which can at least solve one of the technical problems in the background technology.
[0012] To achieve the above object, the present invention adopts the following technical solutions:
[0013] The electric meter with dynamic Bluetooth frequency point replacement and the remote communication method of the user terminal include the following steps:
[0014] S1, sending multiple Bluetooth test data packets to detect Bluetooth connection simultaneously;
[0015] S2. The Bluetooth connection is successful, and the internal software of the Bluetooth module starts to be initialized;
[0016] S3. Determine whether there is a node in the active queue based on the information in the active queue after initialization, and if there is a node, perform active queue processing;
[0017] S4. After the active queue is processed, determine whether there is any remaining pulse transmission window;
[0018] S5. If there is a pulse transmission window remaining, determine whether there is a node in the inactive queue;
[0019] S6. After the communication is completed, a synchronization operation is performed to transmit the updated frequency point information to the remote device.
[0020] Furthermore, the Bluetooth module initialization method in step S2 of the present invention is specifically as follows:
[0021] S21, dividing the two queues set inside the Bluetooth module into an active queue and an inactive queue, the elements of each queue are called nodes, and each node includes four parts: physical channel sequence number 1 to 5, frequency point information, total number of communications, and number of communication failures;
[0022] S22: When the pulse event arrives, the Bluetooth module starts to be triggered to transmit data.
[0023] Furthermore, the method for determining information in the active queue in S3 of the present invention comprises the following specific steps:
[0024] S31, MCU reads the active queue data in the Bluetooth module;
[0025] S32, if data reading fails, there is no node in the active queue, communication fails, and the process returns to step S22 to wait for the pulse event to arrive, indicating that the communication fails and pulse loss occurs;
[0026] S33. If the data is read successfully, there is a node in the active queue, and the node with the smallest "total number of communications" is selected from the active queue; the frequency point and physical channel in the node are used to send the Bluetooth data packet;
[0027] S34, after each Bluetooth data packet is sent, determine whether the ACK response is correct within 2ms, if the response is successful, then increase the total number of communications in the node by 1; then execute step S4;
[0028] S35, if the response fails, add the node with communication failure to the inactive queue; increase the "total number of communications" and "number of communication failures" of the node by 1; then execute step S2;
[0029] Among them, the node scene will be switched according to the success or failure of each communication.
[0030] Furthermore, the node scene switching during communication of the present invention is as follows:
[0031] Switching scene 1: Active queue -> Active queue:
[0032] If a node in the active queue has normal communication, it will continue to stay in the active queue;
[0033] Switching scenario 2: Active queue -> Inactive queue:
[0034] If a node in the active queue fails to communicate, it will be added to the inactive queue;
[0035] Switching scenario 3: Inactive queue -> Active queue:
[0036] A node in the inactive queue rejoins the active queue during redundant communication if the communication is normal;
[0037] Switching scenario 4: Inactive queue -> Inactive queue:
[0038] If a node in the inactive queue has communication anomalies during redundant communication but the number of communication failures is less than the set threshold, it will continue to stay in the inactive queue;
[0039] Switching scenario 5: Inactive queue -> Update frequency -> Inactive queue:
[0040] When a node in the inactive queue is in redundant communication, if the communication is abnormal and the "number of communication failures" is greater than or equal to the set threshold, a new frequency point is selected to replace the frequency point of the node in the inactive queue.
[0041] Furthermore, the method for determining whether there is a node in the inactive queue in step S5 of the present invention is as follows;
[0042] S51, if there is no node, there is no need to perform redundant communication, and exit directly;
[0043] S52, if there is a node, execute S53;
[0044] S53, selecting nodes in the inactive queue from small to large according to the “total number of communications”, and then performing redundant communication.
[0045] Furthermore, the method for processing redundant communication in step S53 of the present invention is specifically as follows: within the remaining time of the "pulse transmission window", all nodes in the inactive queue are arranged in ascending order according to the "total number of communications", and then communicate in sequence;
[0046] If the node in the inactive queue transmits successfully, the node is moved to the active queue, the "total number of communications" in the node is increased by 1, and the "number of communication failures" in the node is cleared;
[0047] If the transmission of a node in the inactive queue fails, but the "number of communication failures" of the node is less than the set threshold, the node will continue to stay in the inactive queue, and the "total number of communications" and "number of communication failures" of the node will be increased by 1;
[0048] If the transmission of a node in the inactive queue fails, but the "number of communication failures" in the node is greater than or equal to the set threshold, the new "frequency information" is obtained through the frequency selection algorithm, the "frequency information" of the node is updated, and the "total number of communications" and "number of communication failures" in the node are cleared.
[0049] Furthermore, the frequency point selection algorithm in the redundant communication processing method of the present invention has the following specific steps:
[0050] S1. Use the “frequency information” and “number of communication failures” of each node in the active queue and the inactive queue as raw materials;
[0051] S2. Based on the “number of communication failures”, the corresponding “frequency information” is weighted differently, and the weighted sum average value corresponding to the “frequency information” in all current nodes is calculated, and finally the frequency area with the most serious interference is calculated;
[0052] S3. The new frequency point selected should be far away from the frequency point area that is calculated to be severely interfered.
[0053] Furthermore, the method for calculating the most severely interfered frequency region of the present invention is as follows:
[0054] The calculation formula for the frequency area most affected by interference is as follows:
[0055]
[0056] Where x is the calculated weighted average, i is the node number, Wi is the weight corresponding to the "number of communication failures", the larger the value of "number of communication failures", the greater the weight, and Xi is the "frequency information"
[0057] The new frequency point is the one that is half the full frequency band away from the weighted average value above, and then aligned with a step size of 1MHz;
[0058] α=(EH) / 2;
[0059] if (x≤α)…X=x+α;
[0060] if (x>α)…X=x-α;
[0061] X = X & Δ;
[0062] Where X is the frequency point finally obtained; x is the frequency point area with the most serious interference; α is the frequency point in the middle of the complete frequency band H~E; Δ is the step size of 1MHz.
[0063] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.
[0064] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0065] It can be seen from the above technical scheme that the method and equipment for remote communication of electric meters and user terminals with dynamic replacement of Bluetooth frequency points of the present invention are mainly aimed at the aging problem of communication frequency points of electric meters and user terminals. The specific method is to send multiple Bluetooth test data packets and detect Bluetooth connection at the same time; when Bluetooth connection is successful, start to initialize the internal software part of the Bluetooth module; judge whether there are nodes in the active queue according to the information in the active queue after initialization; judge whether there are any remaining pulse transmission windows; judge whether there are nodes in the inactive queue; perform synchronization operations and transmit the updated frequency point information to the remote device. Compared with the existing technology, the stability of communication frequencies in different environments is guaranteed, and the mutual interference between terminals is reduced. In the case of dynamic allocation of new frequencies, the stability of communication frequencies in the entire test environment is guaranteed as much as possible, and the related interference between terminals is minimized. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is a block diagram of the Bluetooth testing device of the present invention;
[0067] Figure 2 This is a schematic diagram of the Bluetooth test pulse communication timing of the present invention;
[0068] Figure 3 This is the frequency aging scenario of the present invention;
[0069] Figure 4 This is a frequency point aging and updating flow chart of the present invention;
[0070] Figure 5 This is a new schematic diagram of frequency selection according to the present invention. DETAILED DESCRIPTION
[0071] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions 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.
[0072] like Figure 1 The Bluetooth calibration device of the present embodiment shown specifically includes a terminal and a platform, wherein the terminal includes an MCU and a Bluetooth module, and the platform includes a pulse converter and a platform detection unit; the terminal and the platform transmit data through a Bluetooth wireless channel; the platform outputs a standard voltage / current source to the terminal, and the MCU in the terminal converts the standard source into a pulse signal, and converts the pulse signal into a pulse message through the Bluetooth module and sends it to the platform.
[0073] like Figure 2The schematic diagram of the Bluetooth verification pulse communication timing is shown. The entire pulse communication includes the pulse transmission window, synchronization window, communication window, and idle window. The pulse transmission window is for the Bluetooth module and the pulse converter to communicate through 5 physical channels, and the timeout time for each communication is 2ms. When a channel communication is successful, the remaining time of the pulse transmission window will be used for redundant communication.
[0074] Synchronization window: This solution adds a new 4ms synchronization window, which is used by the software to perform frequency aging and updating, and by the Bluetooth module to synchronize the frequency information and the next channel communication sequence to the pulse converter;
[0075] Communication window: normal communication window;
[0076] Idle window: The time remaining until the next pulse event arrives.
[0077] The following is a detailed description of the method for dynamically selecting the Bluetooth calibration frequency point of the smart meter and the user terminal. Specifically, the following steps are performed by a computer device;
[0078] S1, sending multiple Bluetooth test data packets to detect Bluetooth connection simultaneously;
[0079] S2. The Bluetooth connection is successful, and the internal software of the Bluetooth module starts to be initialized;
[0080] The specific steps of initializing the Bluetooth module in the above step S2 are:
[0081] S21, dividing the two queues set inside the Bluetooth module into an active queue and an inactive queue, the elements of each queue are called nodes, and each node includes four parts: physical channel sequence number (1-5), frequency information, total number of communications, and number of communication failures;
[0082] S22, when the pulse event arrives, the Bluetooth module starts to be triggered to transmit data;
[0083] Among them, the "physical channel sequence number" of each node is 1 to 5 corresponding to the actual physical channel, and the "frequency information" of each node is either randomly assigned or sent by the master station; the "total number of communications" and "number of communication failures" of each node are both 0; each node is in the active queue;
[0084] S3. Determine whether there is a node in the active queue based on the information in the active queue after initialization, and if there is a node, perform active queue processing;
[0085] The specific method for determining nodes in the active queue is as follows:
[0086] S31, MCU reads the active queue data in the Bluetooth module;
[0087] S32, if data reading fails, there is no node in the active queue, communication fails, and the process returns to step S22 to wait for the pulse event to arrive, indicating that the communication fails and pulse loss occurs;
[0088] S33. If the data is read successfully, there is a node in the active queue, and the node with the smallest "total number of communications" is selected from the active queue; the frequency point and physical channel in the node are used to send the Bluetooth data packet;
[0089] S34, after each Bluetooth data packet is sent, determine whether the ACK response is correct within 2ms, if the response is successful, then increase the total number of communications in the node by 1; then execute step S4;
[0090] S35, if the response fails, add the node with communication failure to the inactive queue; increase the "total number of communications" and "number of communication failures" of the node by 1; then execute step S2;
[0091] like Figure 3 As shown in the figure, depending on the success or failure of each communication, the node will switch between the active queue and the inactive queue. There are 5 switching scenarios, as follows:
[0092] Switching scenario 1: Active queue -> Active queue
[0093] If a node in the active queue has normal communication, it will continue to stay in the active queue;
[0094] Switching scenario 2: Active queue -> Inactive queue
[0095] If a node in the active queue fails to communicate, it will be added to the inactive queue;
[0096] Switching scenario 3: Inactive queue -> Active queue
[0097] A node in the inactive queue rejoins the active queue during redundant communication if the communication is normal;
[0098] Switching scenario 4: Inactive queue -> Inactive queue
[0099] If a node in the inactive queue has communication anomalies during redundant communication but the number of communication failures is less than the set threshold, it will continue to stay in the inactive queue;
[0100] Switching scenario 5: Inactive queue -> Update frequency -> Inactive queue
[0101] When a node in the inactive queue is in redundant communication, if the communication is abnormal and the "number of communication failures" is greater than or equal to the set threshold, a new frequency point is selected to replace the frequency point of the node in the inactive queue.
[0102] S4. After the active queue is processed, determine whether there is any remaining pulse transmission window;
[0103] S41. If there is no remaining time, there is no time to perform redundant communication, and exit directly;
[0104] S42, if there is any surplus, execute S5;
[0105] S5. If there is a pulse transmission window remaining, determine whether there is a node in the inactive queue;
[0106] S51, if there is no node, there is no need to perform redundant communication, and exit directly;
[0107] S52, if there is a node, execute S53;
[0108] S53, selecting nodes in the inactive queue from small to large according to the “total number of communications”, and then performing redundant communication;
[0109] like Figure 4 As shown, the specific processing method of redundant communication in step S53 is:
[0110] During the remaining time of the "pulse transmission window", all nodes in the inactive queue are arranged in ascending order according to the "total number of communications", and then communicate in turn.
[0111] If the node in the inactive queue transmits successfully, the node is moved to the active queue, the "total number of communications" in the node is increased by 1, and the "number of communication failures" in the node is cleared;
[0112] If the transmission of a node in the inactive queue fails, but the "number of communication failures" of the node is less than the set threshold, the node will continue to stay in the inactive queue, and the "total number of communications" and "number of communication failures" of the node will be increased by 1;
[0113] If the transmission of a node in the inactive queue fails, but the "number of communication failures" of the node is greater than or equal to the set threshold, the new "frequency information" is obtained through the frequency selection algorithm, the "frequency information" of the node is updated, and the "total number of communications" and "number of communication failures" of the node are cleared;
[0114] S531, after each Bluetooth data packet is sent, determine whether the ACK response is correct within 2ms;
[0115] S532, if the ACK response is successful, the node is moved from the inactive queue to the active queue; the total number of communications in the node is increased by 1, the number of failures is cleared, and redundant communication is completed;
[0116] S533, if the ACK response fails, the "number of communication failures" in the node is increased by 1; then it is determined whether the number of failures is less than the threshold;
[0117] S534, if the number of failures is less than the threshold, the node is left in the inactive queue; the total number of communications in the node is increased by 1; and the redundant communication is completed;
[0118] S535, if the number of failures is greater than the threshold, reselect a new frequency point and set it to the previous node; leave the node in the inactive queue, clear the total number of communications and failures in the node; and the redundant communication is completed;
[0119] The new frequency selection method in step S535 is as follows: Figure 5 As shown, the details are as follows:
[0120] S1. Use the “frequency information” and “number of communication failures” of each node in the active queue and the inactive queue as raw materials;
[0121] S2. Based on the “number of communication failures”, the corresponding “frequency information” is weighted differently, and the weighted sum average value corresponding to the “frequency information” in all current nodes is calculated, and finally the frequency area with the most serious interference is calculated;
[0122] S3. The new frequency point selected should be far away from the frequency point area that is calculated to be severely interfered.
[0123] The calculation formula for the frequency area most affected by interference is as follows:
[0124]
[0125] Where x is the calculated weighted average, i is the node number, Wi is the weight corresponding to the "number of communication failures", the larger the value of "number of communication failures", the greater the weight, and Xi is the "frequency information"
[0126] The new frequency point is the one that is half the full frequency band away from the weighted average value above, and then aligned with a step size of 1MHz;
[0127] α=(EH) / 2;
[0128] if (x≤α)…X=x+α;
[0129] if (x>α) ... X = x-α;
[0130] X = X & Δ;
[0131] Where X is the frequency point finally obtained; x is the frequency point area with the most serious interference; α is the frequency point in the middle of the complete frequency band H~E; Δ is the step size of 1MHz.
[0132] S6. After the communication is completed, a synchronization operation is performed to transmit the updated frequency point information to the remote device.
[0133] It can be seen from the above technical scheme that the method for remote communication of electric meters and user terminals with dynamic replacement of Bluetooth frequency points of the present invention is mainly aimed at the aging problem of communication frequency points of electric meters and user terminals. The specific method is to send multiple Bluetooth test data packets and detect Bluetooth connection at the same time; when Bluetooth connection is successful, start to initialize the internal software part of the Bluetooth module; judge whether there are nodes in the active queue according to the information in the active queue after initialization; judge whether there are any remaining pulse transmission windows; judge whether there are nodes in the inactive queue; perform synchronization operations and transmit the updated frequency point information to the remote device. Compared with the existing technology, the stability of communication frequencies in different environments is guaranteed, and the mutual interference between terminals is reduced. In the case of dynamically allocating new frequencies, the stability of communication frequencies in the entire test environment is guaranteed as much as possible, and the related interference between terminals is minimized.
[0134] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.
[0135] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0136] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the mobile source emission prediction methods based on time series feature migration in the above-mentioned embodiments.
[0137] It is understandable that the system, device and storage medium provided in the embodiments of the present invention correspond to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above methods.
[0138] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0139] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0140] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0141] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A remote communication method for an electric meter and a user terminal with dynamically changing Bluetooth frequency points. It is characterized in that The following steps are involved: S1, sending multiple Bluetooth test data packets to detect Bluetooth connection simultaneously; S2. The Bluetooth connection is successful, and the internal software of the Bluetooth module starts to be initialized; S3. Determine whether there is a node in the active queue based on the information in the active queue after initialization, and if there is a node, perform active queue processing; S4. After the active queue is processed, determine whether there is any remaining pulse transmission window; S5. If there is a pulse transmission window remaining, determine whether there is a node in the inactive queue; S6. After the communication is completed, a synchronization operation is performed to transmit the updated frequency point information to the remote device.
2. The electric meter with dynamic Bluetooth frequency change and the remote communication method using the terminal according to claim 1, It is characterized in that The Bluetooth module initialization method in step S2 is specifically as follows: S21, dividing the two queues set inside the Bluetooth module into an active queue and an inactive queue, the elements of each queue are called nodes, and each node includes four parts: physical channel sequence number 1 to 5, frequency point information, total number of communications, and number of communication failures; S22: When the pulse event arrives, the Bluetooth module starts to be triggered to transmit data.
3. The electric meter with dynamic Bluetooth frequency change and the remote communication method using the terminal according to claim 1, It is characterized in that The method for determining information in the active queue in S3 has the following specific steps: S31, MCU reads the active queue data in the Bluetooth module; S32, if data reading fails, there is no node in the active queue, communication fails, and the process returns to step S22 to wait for the pulse event to arrive, indicating that the communication fails and pulse loss occurs; S33. If the data is read successfully, there is a node in the active queue, and the node with the smallest "total number of communications" is selected from the active queue; the frequency point and physical channel in the node are used to send the Bluetooth data packet; S34, after each Bluetooth data packet is sent, determine whether the ACK response is correct within 2ms, if the response is successful, then increase the total number of communications in the node by 1; Then execute step S4; S35, if the response fails, add the node with communication failure to the inactive queue; increase the "total number of communications" and "number of communication failures" of the node by 1; then execute step S2; Among them, the node scene will be switched according to the success or failure of each communication.
4. The electric meter with dynamic Bluetooth frequency change and the remote communication method and device for user terminals according to claim 3, Features: The node scene switches during communication, the specific situation is as follows: Switching scenario 1: Active queue -> Active queue: If a node in the active queue has normal communication, it will continue to stay in the active queue; Switching scenario 2: Active queue -> Inactive queue: If a node in the active queue fails to communicate, it will be added to the inactive queue; Switching scenario 3: Inactive queue -> Active queue: A node in the inactive queue rejoins the active queue during redundant communication if the communication is normal; Switching scenario 4: Inactive queue -> Inactive queue: If a node in the inactive queue has communication anomalies during redundant communication but the number of communication failures is less than the set threshold, it will continue to stay in the inactive queue. Switching scenario 5: Inactive queue -> Update frequency -> Inactive queue: When a node in the inactive queue is in redundant communication, if the communication is abnormal and the "number of communication failures" is greater than or equal to the set threshold, a new frequency point is selected to replace the frequency point of the node in the inactive queue.
5. The electric meter with dynamic Bluetooth frequency change and the remote communication method using the terminal according to claim 1, It is characterized in that The method for determining whether there is a node in the inactive queue in step S5 is as follows; S51, if there is no node, there is no need to perform redundant communication, and exit directly; S52, if there is a node, execute S53; S53, select the nodes in the inactive queue from small to large according to the "total number of communications", and then perform redundant communication.
6. The electric meter with dynamic Bluetooth frequency change and the remote communication method for user terminals according to claim 5, Features: The redundant communication processing method is specifically described as follows: During the remaining time of the "pulse transmission window", all nodes in the inactive queue are arranged in ascending order according to the "total number of communications", and then communicate in sequence; If the node in the inactive queue transmits successfully, the node is moved to the active queue, the "total number of communications" in the node is increased by 1, and the "number of communication failures" in the node is cleared; If the transmission of a node in the inactive queue fails, but the "number of communication failures" of the node is less than the set threshold, the node will continue to stay in the inactive queue, and the "total number of communications" and "number of communication failures" of the node will be increased by 1; If the transmission of a node in the inactive queue fails, but the "number of communication failures" in the node is greater than or equal to the set threshold, the new "frequency information" is obtained through the frequency selection algorithm, the "frequency information" of the node is updated, and the "total number of communications" and "number of communication failures" in the node are cleared.
7. The electric meter with dynamic Bluetooth frequency change and the remote communication method using the terminal according to claim 6, Features ,The specific steps of the new frequency point selection algorithm are as follows: S1. Use the "frequency information" and "number of communication failures" of each node in the active queue and the inactive queue as raw materials; S2. Based on the "number of communication failures", the corresponding "frequency information" is weighted differently, and the weighted sum average value corresponding to the "frequency information" in all current nodes is calculated, and finally the frequency area with the most serious interference is calculated; S3. The new frequency point selected should be far away from the frequency point area that is calculated to be severely interfered.
8. The electric meter with dynamic Bluetooth frequency change and the remote communication method using the terminal according to claim 7, Features ,The method for calculating the frequency point area most seriously interfered is as follows: The calculation formula for the frequency area most affected by interference is as follows: Where x is the calculated weighted average, i is the node number, Wi is the weight corresponding to the "number of communication failures", the larger the value of "number of communication failures", the greater the weight, Xi is the "frequency information" The new frequency point is the one that is half the full frequency band away from the weighted average value above, and then aligned with a step size of 1MHz; α=(EH) / 2; if (x≤α)...X=x+α; if (x>α) ... X = x-α; X = X & Δ; Where X is the frequency point finally obtained; x is the frequency point area with the most serious interference; α is the frequency point in the middle of the complete frequency band H~E; Δ is the step size of 1MHz.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 8.
