Method for correcting message sending sequence value, method, device and equipment for transferring authority

By using the sequence value correction method in the Bluetooth mesh network, the problem of message sequence value synchronization without a central server is solved, ensuring stable network operation and reducing costs, achieving smooth message sending and network reliability.

CN117336685BActive Publication Date: 2024-09-13SHENZHEN FEASYCOM TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311132478.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2024-09-13
Estimated Expiration
2043-09-04

AI Technical Summary

Technical Problem

In the absence of a central server, the message sending sequence values ​​in the Bluetooth mesh network cannot be synchronized in time, resulting in the mobile phone being unable to continue to control the mesh network, affecting the stable operation of the network, and increasing R&D and equipment costs.

Method used

Through a message sending sequence value correction method, a preset algorithm is used to determine the sequence test value, a mesh message is sent to the node, and correction is performed based on the response message to ensure the rationality and synchronization of the sequence value and ensure that the node can successfully establish mesh communication.

Benefits of technology

It achieves the stable operation of the Bluetooth mesh network without a central server, reduces R&D and equipment costs, and ensures the smoothness of message sending and network reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117336685B
    Figure CN117336685B
Patent Text Reader

Abstract

The present invention relates to a method for correcting a message sending sequence value, a method for transferring authority, a device and equipment. The correction method is applied to a Bluetooth mesh network, and comprises the following steps: S2, determining a first sequence test value according to a first preset value algorithm, and sending a first mesh message to a first node based on the first sequence test value. S3, determining whether a response message sent by the first node is received. If so, the correction is completed and ends. If not, jump to step S2. Implementing the present invention to correct the message sending sequence value can make the Bluetooth mesh network run stably and reduce R&D costs and equipment costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Bluetooth mesh network, and in particular to a method for correcting a message sending sequence value, a method, a device and equipment for transferring authority. Background Art

[0002] Currently, Bluetooth mesh uses mesh network technology based on the flooding protocol. The mesh network consists of mobile phones and nodes, where mobile phones are smart devices that serve as the control end of the mesh network, and nodes are node devices in the network. Smart devices such as mobile phones cannot broadcast by themselves, and require Bluetooth connections to network node devices that can serve as proxy carriers, namely nodes, to broadcast information through proxy carriers to transmit data information. In other words, the Bluetooth mesh network is implemented in a broadcasting manner. The basic steps are:

[0003] a. Send control type data or read type data from the mobile phone to the proxy host node A;

[0004] b. Node A broadcasts the message;

[0005] c. When node B receives the message from node A, it will process or forward and rebroadcast the information;

[0006] d. Similarly, by using the infection method, all devices within the wireless range will receive this message, and the message will not be forwarded until it is processed by the corresponding node.

[0007] by Figure 1 Taking the figure as an example, A, B, C, D, and E in the figure are different network-access node devices in the mesh network, namely, node; the mobile phone end (0x0001, 0x0005, txt, 0) indicates that the source address of the mobile phone is 0x0001, the target address of the message is 0x0005, the content to be sent is txt, and the sequence value (ie, SEQ value / seq value) is 0, indicating that the message is to be sent to the network-access node device with the mesh address of 0x0005. According to the figure, the target device is the node device C.

[0008] Assume that the transmission order is E→D→C...; if device E receives the message first, E determines that it is not the target device of the message based on the target address in the message, and will continue to forward and rebroadcast the message. D receives the message, and D determines that it is not the target device of the message based on the target address in the message, and will continue to forward and rebroadcast the message. At this time, E will receive the same message broadcast by device D, which is obviously not what E needs, and when the transmission distance is certain, E may continue to receive the same message broadcast back by subsequent devices (this situation is called replay, which means repeated requests will affect normal communication). In order to prevent the unrestricted forwarding of messages, certain methods are adopted to prevent node devices from forwarding previously received messages. When a node receives a new message, it will first check whether the same message exists in the cache. If so, the new message will be ignored. Therefore, such situations need to be filtered.

[0009] Specifically, each message needs to carry a sequence value, and the rationality of the sequence value will also be checked at the receiving end. Each node (a mobile phone is also a node) will save two lists related to sequences, one of which records the sequence that needs to be used when sending messages, and the other records the sequence corresponding to the source mesh address of the message when receiving the message. This table is also called the RPL table. For example, the mesh address of the mobile phone node is 0x0001, and the sequence that needs to be used when sending messages is currently recorded as 0. When the mobile phone sends a message to any node, the sequence will increase by 1. As shown in the following table:

[0010] Source address Target address Message content Sequence 0x0001 0x0003 text 0 0x0001 0x0003 text 1 0x0001 0x0003 text 2 0x0001 0x0004 text 3

[0011] The node that needs to process the message (i.e. the target address of the message is the mesh address of the node) will compare the sequence in the message with the cached key-value pair (source address-sequence) when receiving the mesh message. For example, if the source address of the message is 0x0001, by searching the cached key-value pair (source address-sequence), if it is found that the recorded sequence is smaller than the sequence used by the new message, the next step will be processed, otherwise the new message will be ignored. As mentioned above, the target devices involved in the mesh message sent by 0x0001 are nodes with addresses 0x0003 and 0x0004, of which the cached key-value pair (source address-sequence) in the node with address 0x0003 is 0x0001-2; the cached key-value pair (source address-sequence) in the node with address 0x0004 is 0x0001-3. Next, if the mesh message (0x0001, 0x0003, text, 2) is forwarded to the node with address 0x0003 again, it will be ignored, including not being forwarded and rebroadcasted.

[0012] Based on the previous traditional technology implementation, the mesh network can run stably when the mobile phone is not replaced or the control of the mesh network does not need to be shared with another mobile phone. In the context of a central server, if the control of the mesh network in mobile phone 1 is to be shared with mobile phone 2, the information including mesh key, network adapter, node list, etc. needs to be sent to mobile phone 2 through the central server. Because mobile phone 1 and mobile phone 2 use the same network adapter, the mesh address of mobile phone 2 will also use mobile phone 1 as the mesh address of the node, that is, 0x0001. This is because mobile phone 2 needs the correct sequence to successfully send messages to the target node (otherwise the mesh message will be ignored by the target node). Therefore, when sharing the control of the mesh network, mobile phone 1 needs to send the sequence value that needs to be used when sending messages to mobile phone 2 through the central server. When mobile phone 2 sends mesh messages, the sequence value used by itself will continue to increase. Mobile phone 2 will upload the latest sequence value used to the central server. In this way, when mobile phone 1 needs to control the mesh network, mobile phone 2 pulls the corresponding latest sequence value from the central server, so that mobile phone 1 can also successfully send mesh messages to node devices in the mesh network.

[0013] However, the central server has problems such as R&D cost and equipment cost, and is limited by signal coverage. Therefore, if the central server is not used, although mobile phone 1 can share mesh network configuration information (including mesh key, network adapter, node list, etc.) with mobile phone 2 in a certain way, the seq value cannot be synchronized in time, which will result in mobile phone 1 being unable to continue to control the mesh network after mobile phone 2 has controlled the mesh network for a period of time, because mobile phone 1 uses a sequence value that cannot pass the test. Summary of the invention

[0014] The technical problem to be solved by the present invention is how to correct the message sending sequence value in a Bluetooth mesh network, and provides a message sending sequence value correction method, permission transfer method, device and equipment.

[0015] The technical solution adopted by the present invention to solve the technical problem is: a method for correcting a message sending sequence value, applied in a Bluetooth mesh network, the method comprising the following steps:

[0016] S2. Determine a first sequence test value according to a first preset value algorithm, and send a first mesh message to the first node based on the first sequence test value;

[0017] S3. Determine whether a response message sent by the first node is received;

[0018] If yes, the calibration is completed and the process ends;

[0019] If not, jump to step S2.

[0020] Further, in the method for correcting the message sending sequence value of the present invention, step S2 includes:

[0021] Determine the first sequence test value according to the acquired current sequence value and the first preset algorithm, and send the first mesh message to the first node based on the first sequence test value;

[0022] Wherein, the first sequence test value is greater than the current sequence value.

[0023] Further, in the method for correcting the message sending sequence value of the present invention, step S2 includes:

[0024] The current sequence value is shifted left bit by bit in binary to obtain a new sequence value, and the new sequence value is used as the first sequence test value.

[0025] Further, in the method for correcting the message sending sequence value of the present invention, before step S2, the method further includes:

[0026] S1. Save the current index value in the Bluetooth mesh network.

[0027] Furthermore, in the method for correcting the message sending sequence value of the present invention, before step S1, the method further includes:

[0028] S0, update index value;

[0029] After step S3, the method further comprises:

[0030] S4. Perform filtering configuration to successfully establish mesh communication.

[0031] Furthermore, in the method for correcting the message sending sequence value of the present invention, the method further includes:

[0032] S10. Obtaining, from the subscribed group address, a second mesh message sent by other nodes to the group address;

[0033] S20. Parse the second mesh message to obtain the source address of the other node;

[0034] S30, determining a second sequence of test values ​​according to a second preset value algorithm;

[0035] S40, for each of the source addresses, sending a third mesh message to a corresponding node based on the second sequence test value;

[0036] S50: When a response message sent by the other node is received, the correction is completed and the process ends.

[0037] In addition, the present invention also provides a method for transferring control authority of a Bluetooth mesh network, comprising the following steps:

[0038] S100, the first control terminal sends mesh network configuration information to the second control terminal through a preset sharing method;

[0039] S200: The second control end uses the correction method as described above to correct its message sending sequence value so as to successfully establish mesh communication with the node.

[0040] Further, in the method for transferring control authority of a Bluetooth mesh network according to the present invention, after step S200, the method further includes:

[0041] S300: The first control end uses the correction method as described above to correct its message sending sequence value to obtain control authority.

[0042] In addition, the present invention also provides a correction device for message sending sequence value, which is applied in a Bluetooth mesh network, comprising:

[0043] a determining unit, configured to determine a first sequence test value according to a first preset value algorithm, and send a first mesh message to a first node based on the first sequence test value;

[0044] The judging unit is used to judge whether the response message sent by the first node is received; if so, the correction is completed and the process ends; if not, the process turns to the determining unit.

[0045] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps of the method for correcting the message sending sequence value as described above, or executes the steps of the method for transferring control authority of the Bluetooth mesh network as described above, by calling the computer program stored in the memory.

[0046] The message sending sequence value correction method, authority transfer method, device and equipment implemented in the present invention have the following beneficial effects: by correcting the message sending sequence value, the present invention can make the Bluetooth mesh network run stably and reduce R&D costs and equipment costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:

[0048] Figure 1 It is a schematic diagram of address information between a mobile phone and a node in the prior art;

[0049] Figure 2 is a flow chart of a method for correcting a message sending sequence value provided by an embodiment of the present invention;

[0050] Figure 3 is a schematic diagram of a message sending sequence value between a mobile phone and a node provided by an embodiment of the present invention;

[0051] Figure 4 is a flow chart of a method for correcting a message sending sequence value provided by an embodiment of the present invention;

[0052] Figure 5 is a flow chart of a method for correcting a message sending sequence value provided by an embodiment of the present invention;

[0053] Figure 6 is a schematic diagram of establishing mesh communication between a mobile phone and a node provided by an embodiment of the present invention;

[0054] Figure 7 is a flow chart of a method for correcting a message sending sequence value provided by an embodiment of the present invention;

[0055] Figure 8is a flow chart of a method for transferring control authority of a Bluetooth mesh network provided by an embodiment of the present invention;

[0056] Fig. 9 It is a schematic diagram of a message sending sequence value between a mobile phone and a node provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.

[0058] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0059] Example 1

[0060] The existing technology cannot stably operate the Bluetooth mesh network without a central server. Therefore, in an environment where there is no central server for data synchronization, the method of localizing the correction of Sequence values ​​can be used to allow multiple control terminals including mobile phones, tablets and other smart terminals to share the Bluetooth Mesh network.

[0061] It should be noted that the sequence value in the present invention refers to the Sequence value (also known as the Seq value). In a Bluetooth mesh network, a node will be attached with a Seq value when sending a message, and the Seq value will increase with the increasing number of messages sent. That is to say, each time the sender sends a message, its Seq value will be accumulated and increased by 1, which will serve as the basis for other nodes to determine whether to receive it. Similarly, the sequence test value is the Sequence test value. The index value in the present invention refers to the IVIndex value (also known as the index variable). The IV Index value is a 32-bit value, which is a shared network resource (that is, all nodes in the Bluetooth mesh network share the same IV Index value and use it for all subnets to which they belong). If a node is not in the mesh network for a period of time, it can recover the process by scanning the security network beacon or using the IV index.

[0062] refer to Figure 2 Taking the Sequence value correction required for establishing Bluetooth mesh communication between a mobile phone and a proxy node as an example, the message sending sequence value correction method of this embodiment includes the following steps:

[0063] S2. Determine the first sequence test value according to the first preset value algorithm, and send the first mesh message to the first node based on the first sequence test value. Specifically, determine the first sequence test value according to the current sequence value obtained and the first preset algorithm, and send the first mesh message to the first node based on the first sequence test value. Among them, the first sequence test value is greater than the current sequence value. The first mesh message can be either a control message or a confirmation message, such as sending an Acknowledged message (such as ConfigDefaultTtlGet) message to the proxy node address with a Sequence test value. If it is a control message, the response message is feedback on whether the execution is completed.

[0064] Optionally, the first preset value-taking algorithm includes but is not limited to a binary bitwise left shift method, that is, after converting the current sequence value into binary, it is bitwise shifted left by one position to obtain a new binary sequence value, and whether to perform base conversion is determined according to actual needs, and this new sequence value is used as the first sequence test value. For example, the current sequence value is 99 in decimal, which is 1100011 after conversion to binary. It is bitwise shifted left by one position to obtain a new binary sequence value of 11000110, which is then converted to decimal as 198. The first preset value-taking algorithm can also be a method of superimposing a preset number of values, that is, a new sequence test value is formed after superimposing a certain number during each correction, and the first mesh message is sent to the first node based on the new sequence test value. Of course, it can also be a method in which multiple value-taking algorithms are performed simultaneously and then compared to obtain the minimum Sequence test value, and the Sequence test value is greater than the Sequence correct value, so as to achieve the condition that the Sequence test value is greater than the Sequence correct value through the least number of times, thereby avoiding waste of Sequence values. Figure 3 As shown, after 99 is 198, and after 198 is 396. In fact, the best value is 209, and 396-209=187 Sequence values ​​are wasted in the middle.

[0065] S3. Determine whether a response message sent by the first node is received. If yes, complete the calibration and end. If no, jump to step S2.

[0066] Alternatively, if the number of jumps to step S2 reaches a preset frequency, the index value is restored to the corresponding value before the correction. Alternatively, if the first sequence test value reaches the maximum limit, the index value is restored to the corresponding value before the sequence value correction. Specifically, a timer can be set and steps S2 and S3 can be executed at a certain frequency. For example: when the mobile phone does not receive feedback after sending a message to the proxy node for too long, it continues to the next operation.

[0067] It should be noted that when the response message sent by the first node is not received, the first method is to use the sequence value corresponding to the most recent successful message as the current sequence value, and jump to step S2 for the second correction, and so on. Alternatively, when the response message sent by the first node is not received, the second method is to use the first sequence test value used for the current correction failure as the current sequence value, and jump to step S2 for the second correction, and so on. The first method can avoid the situation where the proxy node does not necessarily receive the first mesh message because the test value is invalid, such as the situation where it is not received due to power failure. At this time, it does not mean that the test value is invalid. For example, if the current value is 99, the test value is added by 1 to 100 for correction, if a power failure occurs, it will be recorded as no correction. If the second method is used, the current sequence value becomes 100, and the next test value becomes 101. This 100 is not used, but the test value of 100 may be valid. It can be understood that the most recent successful message sent refers to the last time the node successfully received a message.

[0068] Based on this, as an option, an operation of determining whether the power is off can be set before step S3. If so, the current sequence value is determined by the first method, and then the next correction is performed; if not, the current sequence value is determined by the second method, and then the next correction is performed. It can also be set on the first preset value algorithm, that is, the first preset value algorithm can be set to shift the corresponding number of bits to the left according to the number of corrections of the jump. Exemplarily, the current sequence value is first shifted left by one bit to obtain the first sequence test value required for the first correction, then it is determined whether the response message sent by the first node is received, if not, then jump, perform the second correction, shift the current sequence value left by two bits, and obtain the first sequence test value required for the second correction, then it is determined whether the response message sent by the first node is received, if not, then jump, perform the third correction, shift the current sequence value left by three bits, and obtain the first sequence test value required for the third correction, then it is determined whether the response message sent by the first node is received; and so on.

[0069] It should be noted that the correction method of this embodiment can also be applied to scenarios where nodes communicate with each other. For example, when a temperature sensor (node ​​module) sends information to an air-conditioning device, in order for the air-conditioning device to successfully receive the information, it is necessary to first perform a Sequence value correction so that the sensor and the air-conditioning device can successfully establish communication.

[0070] Preferably, in the method for correcting the message sending sequence value in some embodiments, reference is made to Figure 4, before step S2, it also includes step S1, the operation of saving the current index value in the Bluetooth mesh network. Since the ivIndex value may increase during the sequence value correction process, the increased ivIndex value due to the correction test failure will waste network resources, and step S1 is a backup measure to prevent the correction failure. In other words, when the correction fails, the ivIndex in the Bluetooth Mesh network can be restored to the saved value before the test to prevent resources from being wasted.

[0071] This embodiment corrects the message sending sequence value, and can ensure the stable operation of the Bluetooth mesh network in the absence of a central server, thereby reducing the R&D cost and equipment cost.

[0072] Example 2

[0073] refer to Figure 5 Before the mobile phone performs calibration, it needs to first perform step S0, update the index value operation, that is, the mobile phone needs to first obtain the IV Index value synchronized with the proxy node. Then, perform step S1, save the current index value in the Bluetooth mesh network, and after completing the calibration, perform step S4, perform the filtering configuration operation, so that the mobile phone and the proxy node can successfully establish mesh communication.

[0074] Understandably, if Figure 6 As shown, after the mobile phone is connected to the proxy node, according to the SIG Mesh protocol, the mobile phone needs to update the ivIndex and filter configuration request (mainly including black and white list configuration, etc.) with the proxy node before mesh communication can be carried out smoothly. When performing filtering configuration, the mobile phone needs to use the correct sequence value to communicate with the proxy node, otherwise the proxy node will ignore this configuration request. Because the correct ivIndex value needs to be used during the sequence correction process, the sequence value correction needs to be completed before executing the filtering configuration request, and the ivIndex update needs to be completed before executing the sequence value correction. The ivIndex update, sequence correction and filtering configuration request are performed in serial mode, that is, after completing the ivIndex update, the sequence value correction is performed, and after the sequence value correction is completed, the filtering configuration request is performed, thereby completing the successful establishment of Bluetooth mesh communication between the mobile phone and the proxy node.

[0075] This embodiment corrects the message sending sequence value, and can ensure the stable operation of the Bluetooth mesh network in the absence of a central server, thereby reducing the R&D cost and equipment cost.

[0076] Example 3

[0077] Generally speaking, the localized correction of the sequence value implemented in the above embodiment can only allow the mobile phone and a single node to perform corrections one by one. A more perfect solution is to allow the mobile phone and all online nodes in the mesh network to perform a sequence value correction once, so as to ensure that the sequence corrected in the mobile phone is universal in the entire mesh network. Therefore, the correction method of the message sending sequence value of this embodiment is proposed.

[0078] refer to Figure 7 , the method for correcting the message sending sequence value of this embodiment includes:

[0079] S10. Obtain, from the subscribed group address, a second mesh message sent by other nodes to the group address.

[0080] S20. Parse the second mesh message to obtain source addresses of other nodes.

[0081] S30. Determine a second sequence of test values ​​according to a second preset value-taking algorithm.

[0082] S40. For each source address, send a third mesh message to a corresponding node based on the second sequence test value.

[0083] S50: When a response message sent by other nodes is received, the correction is completed and the process ends.

[0084] Specifically, all online device nodes periodically send mesh status messages to a certain group address (such as 0xD100); then, the mobile phone and the proxy node complete the ivIndex update, Sequence value correction, and filter configuration request mentioned above; then, the mobile phone node subscribes to the group (such as 0xD100) to receive the mesh status message that the online device sends to the group periodically. Within a preset time, the mobile phone node parses the source address in the mesh message received from the 0xD100 group, determines the second sequence test value according to the second preset value algorithm, and sends a third mesh message to the corresponding node for each source address based on the second sequence test value to complete the Sequence value correction for each node.

[0085] It should be noted that the second preset value algorithm here preferably determines the second sequence test value in a manner of superimposing a preset number on the basis of the current sequence value.

[0086] This embodiment corrects the message sending sequence value, and can ensure the stable operation of the Bluetooth mesh network in the absence of a central server, thereby reducing the R&D cost and equipment cost.

[0087] Example 4

[0088] refer to Figure 8 The control authority transfer method of the Bluetooth mesh network provided in this embodiment includes the following steps:

[0089] S100: The first control terminal sends mesh network configuration information to the second control terminal via a preset sharing method.

[0090] S200. The second control end uses the above-mentioned message sequence value correction method to correct its message sending sequence value so as to successfully establish mesh communication with the node.

[0091] Preferably, after step S200, step S300 is executed, and the first control end adopts the above-mentioned message sequence value correction method to correct its message sending sequence value to obtain control authority.

[0092] For example, taking the transfer of permissions between smart terminal phones as an example, when multiple mobile phones do not use a central server to synchronize multi-terminal sequence values, in order for the sender to use a reasonable sequence value to pass the receiver's check of the sequence value, multiple mobile phones need to share the same Bluetooth Mesh network and use the same Provisioner (that is, the networking adapter) in the same Mesh network.

[0093] like Fig. 9 As shown in the figure, it includes three sub-graphs a1, a2, and a3. Sub-graph a1 can be understood as mobile phone 1 performing 99 different operations (or sending 99 different messages) in the Bluetooth Mesh network, and the corresponding sequence values ​​are 0-98. The RPL table in the module A cache is used to cache the source address and sequence value corresponding to each operation. Because it is a cache, it will be cleared when the device or system is powered off.

[0094] In the absence of a network (cloud), mobile phone 1 can send permissions (including mesh keys, network adapters, node lists, sequence values, control end device addresses, and other information) to mobile phone 2 by sharing the network, including but not limited to in the form of files, links, or mini-programs. At this time, mobile phone 2 can obtain the sequence information corresponding to mobile phone 1 (which can be understood as inheritance, copying, etc.). The sequence value corresponding to the first operation of mobile phone 2 is 99. Since mobile phone 2 can obtain the sequence information corresponding to mobile phone 1, at this time, 99 is greater than the latest sequence value 98 in the RPL table, indicating that the message does not need to be filtered and subsequent operations can be performed normally. Sub-graph a2 corresponds to this situation, and it is assumed that mobile phone 2 continues to operate until the sequence value is 208.

[0095] Sub-graph a3 indicates that mobile phone 2 continues to operate until the sequence value is 208, and the latest sequence value of the RPL table corresponding to module A (or the latest sequence value cached by module A) has been updated to 208. However, at this time, due to the lack of a central network (that is, a central server), mobile phone 1 cannot obtain or synchronize the sequence information of mobile phone 2 during the period corresponding to sub-graph a2 again, that is, the sequence information of mobile phone 1 is still 98. At this time, if mobile phone 1 operates and the sequence value is 99≤208, module A will ignore this mesh message. Therefore, when mobile phone 1 needs to re-communicate with the node device in mesh, the message sequence value correction method of the above-mentioned embodiment is used to correct its message sending sequence value to obtain control authority, thereby successfully establishing communication with the node device. The message sequence value correction method of preferred embodiment 1.

[0096] In this embodiment, the stable operation of the Bluetooth mesh network can be guaranteed without a central server, thereby reducing R&D costs and equipment costs.

[0097] Example 5

[0098] The message sending sequence value correction device of this embodiment is applied to a Bluetooth mesh network, and includes:

[0099] A determining unit is used to determine a first sequence test value according to a first preset value algorithm, and send a first mesh message to the first node based on the first sequence test value.

[0100] The judging unit is used to judge whether the response message sent by the first node is received. If so, the correction is completed and the process ends. If not, the process turns to the determining unit.

[0101] Specifically, the determining unit determines a first sequence test value according to the acquired current sequence value and a first preset algorithm, and sends a first mesh message to the first node based on the first sequence test value, wherein the first sequence test value is greater than the current sequence value.

[0102] Optionally, the first preset value-taking algorithm includes but is not limited to a binary bitwise left shift method, that is, after converting the current sequence value into binary, it is bitwise shifted left by one position to obtain a new binary sequence value, and whether to perform base conversion is determined according to actual needs, and this new sequence value is used as the first sequence test value. The first preset value-taking algorithm can also be a preset number superposition value-taking method, that is, a new sequence test value is formed after superimposing a certain number during each correction, and the first mesh message is sent to the first node according to this new sequence test value. Of course, it can also be a method in which multiple value-taking algorithms are performed simultaneously and then compared to obtain the minimum Sequence test value, and the Sequence test value is greater than the Sequence correct value, so as to achieve the Sequence test value greater than the Sequence correct value through the least number of times, thereby avoiding waste of Sequence values.

[0103] As an option, the judgment unit can be set to restore the index value to the corresponding value before the correction when the number of times the turn determination unit reaches a preset frequency. Alternatively, if the first sequence test value reaches the maximum limit, the index value is restored to the corresponding value before the sequence value correction. Specifically, a timer can be set and the jump can be performed at a certain frequency. For example: when the mobile phone sends a message to the proxy node for too long and does not receive feedback, it continues to the next operation.

[0104] It should be noted that when the response message sent by the first node is not received, the first method is to use the sequence value corresponding to the most recent successful message as the current sequence value, and jump to step S2 for the second correction, and so on. Alternatively, when the response message sent by the first node is not received, the second method is to use the first sequence test value used for the current correction failure as the current sequence value, and jump to step S2 for the second correction, and so on. The first method can avoid the situation where the proxy node does not necessarily receive the first mesh message because the test value is invalid, such as the situation where it is not received due to power failure. At this time, it does not mean that the test value is invalid. For example, if the current value is 99, the test value is added by 1 to 100 for correction, if a power failure occurs, it will be recorded as no correction. If the second method is used, the current sequence value becomes 100, and the next test value becomes 101. This 100 is not used, but the test value of 100 may be valid.

[0105] Based on this, as an option, an operation of determining whether the power is off can be set before step S3. If so, the current sequence value is determined by the first method, and then the next correction is performed; if not, the current sequence value is determined by the second method, and then the next correction is performed. It can also be set on the first preset value algorithm, that is, the first preset value algorithm can be set to shift the corresponding number of bits to the left according to the number of corrections of the jump. Exemplarily, the current sequence value is first shifted left by one bit to obtain the first sequence test value required for the first correction, then it is determined whether the response message sent by the first node is received, if not, then jump, perform the second correction, shift the current sequence value left by two bits, and obtain the first sequence test value required for the second correction, then it is determined whether the response message sent by the first node is received, if not, then jump, perform the third correction, shift the current sequence value left by three bits, and obtain the first sequence test value required for the third correction, then it is determined whether the response message sent by the first node is received; and so on.

[0106] It should be noted that the correction device of this embodiment can be used not only in the scenario where the mobile phone communicates with the node, but also in the scenario where the nodes communicate with each other. For example, when the temperature sensor (node ​​module) sends information to the air-conditioning equipment, in order for the air-conditioning equipment to successfully receive it, it is necessary to first perform Sequence value correction so that the sensor and the air-conditioning equipment can successfully establish communication.

[0107] This embodiment corrects the message sending sequence value, and can ensure that the Bluetooth mesh network can still run stably without a central server, thereby reducing research and development costs and equipment costs.

[0108] Example 6

[0109] The computer device of this embodiment includes a memory and a processor. The memory stores a computer program. The processor executes the steps of the message sending sequence value correction method of the above embodiment, or executes the steps of the control authority transfer method of the Bluetooth mesh network of the above embodiment by calling the computer program stored in the memory.

[0110] The processor of the present invention is used to provide computing and control capabilities. It should be understood that in the embodiments of the present application, the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0111] This embodiment can ensure that the Bluetooth mesh network can still run stably without a central server, thereby reducing R&D costs and equipment costs.

[0112] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0113] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0114] It can be understood that the above embodiments only express the preferred implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the patent scope of the present invention. It should be pointed out that, for ordinary technicians in this field, the above technical features can be freely combined without departing from the concept of the present invention, and several deformations and improvements can be made, which all belong to the protection scope of the present invention. Therefore, all equivalent changes and modifications made to the scope of the claims of the present invention should belong to the coverage of the claims of the present invention.

Claims

1. A method for correcting a message sending sequence value, applied in a Bluetooth mesh network, characterized in that: The method comprises the following steps: S2. Determine a first sequence test value according to a first preset value algorithm, and send a first mesh message to the first node based on the first sequence test value; S3. Determine whether a response message sent by the first node is received; If yes, the calibration is completed and the process ends; If not, jump to step S2; Step S2 includes: Determine the first sequence test value according to the acquired current sequence value and the first preset value algorithm, and send the first mesh message to the first node based on the first sequence test value; Wherein, the first sequence test value is greater than the current sequence value.

2. The method for correcting the message sending sequence value according to claim 1, characterized in that: Step S2 includes: The current sequence value is shifted left bit by bit in binary to obtain a new sequence value, and the new sequence value is used as the first sequence test value.

3. The method for correcting the message sending sequence value according to claim 1, characterized in that: Before step S2, the method further comprises: S1. Save the current index value in the Bluetooth mesh network.

4. The method for correcting the message sending sequence value according to claim 3, characterized in that: Before step S1, the method further comprises: S0, update index value; After step S3, the method further comprises: S4. Perform filtering configuration to successfully establish mesh communication.

5. The method for correcting the message sending sequence value according to claim 1, characterized in that: The method further includes: S10. Obtaining, from the subscribed group address, a second mesh message sent by other nodes to the group address; S20. Parse the second mesh message to obtain the source address of the other node; S30, determining a second sequence of test values ​​according to a second preset value algorithm; S40, for each of the source addresses, sending a third mesh message to a corresponding node based on the second sequence test value; S50: When a response message sent by the other node is received, the correction is completed and the process ends.

6. A method for transferring control authority of a Bluetooth mesh network, characterized in that: The following steps are involved: S100, the first control terminal sends mesh network configuration information to the second control terminal through a preset sharing method; S200. The second control end adopts the correction method described in any one of claims 1 to 5 to correct its message sending sequence value so that it can successfully establish mesh communication with the node.

7. The method for transferring control authority of a Bluetooth mesh network according to claim 6, characterized in that: After step S200, the method further includes: S300. The first control end adopts the correction method described in any one of claims 1 to 5 to correct its message sending sequence value to obtain control authority.

8. A correction device for message sending sequence value, applied in a Bluetooth mesh network, characterized in that: include: a determining unit, configured to determine a first sequence test value according to a first preset value algorithm, and send a first mesh message to a first node based on the first sequence test value; A judging unit, configured to judge whether a response message sent by the first node is received; if so, completing the correction and ending; If not, turn to the determination unit; The determining unit is used for: Determine the first sequence test value according to the acquired current sequence value and the first preset value algorithm, and send the first mesh message to the first node based on the first sequence test value; Wherein, the first sequence test value is greater than the current sequence value.

9. A computer device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps of the method for correcting the message sending sequence value as described in any one of claims 1 to 5, or executes the steps of the method for transferring control authority of a Bluetooth mesh network as described in any one of claims 6 to 7 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Bluetooth communication system, method and equipment

    CN114745704A

  • Method and apparatus for transmitting and receiving data in mesh network using bluetooth

    US20200068656A1

  • Methods and nodes for obtaining information regarding a bluetooth mesh network

    US20210211905A1