Carrier carrier shape memory alloy (CSMA) time slot allocation method and device based on dual-mode communication
By updating the number and type of slave nodes in the three-phase CCO module and dividing the carrier CSMA time slots according to preset rules, the communication delay problem caused by the complexity of CSMA time slot allocation is solved, and communication efficiency and system stability are improved.
Patent Information
- Application Number
- CN202411959857.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-03-21
AI Technical Summary
In the three-phase CCO module, the allocation of CSMA time slots is complicated, which causes nodes to be unable to obtain the sending slots in time, causing communication abnormalities or delays, affecting the real-time nature of the power meter reading system and the stable operation of the smart grid.
By obtaining the number and type of slave nodes of each phase line, the information is updated, and the carrier CSMA time slot is divided in the next routing period according to the preset rules, so that the wired slave nodes of each phase line can send messages in the corresponding time slot.
Accurately divide phase line time slots, avoid channel conflicts, dynamically adjust the number of slave nodes to maximize the utilization of communication resources, and improve system communication efficiency.
Smart Images

Figure CN119676838A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart grid communication, and in particular to a carrier CSMA time slot allocation method and device based on dual-mode communication. Background Art
[0002] With the upgrading and transformation of smart grid technology, dual-mode communication modules based on broadband power line carrier (HPLC) communication and high-speed low-power wireless (HRF) communication have been widely used in power meter reading systems. Dual-mode communication modules not only improve the efficiency and stability of data transmission, but also enhance the system's adaptability to different environmental conditions.
[0003] In the dual-mode communication system, the communication module adopts a channel access mechanism based on beacon frames to achieve efficient and orderly communication. As the core of the system, the central coordinator (CCO) periodically sends beacon frames, which contain various time slot information within the beacon period planned by the CCO, such as beacon slots, time division multiple access (TDMA) slots, and carrier sense multiple access (CSMA) slots. This time slot allocation mechanism ensures the reasonable allocation and effective utilization of communication resources and avoids communication conflicts and interference. For the slave nodes under the CCO, they must strictly follow the time slots allocated by the CCO for channel access to ensure smooth communication. Among them, the CSMA time slot is a time slot that is used by slave nodes in need. Its flexibility and dynamics enable the system to adapt to the communication needs of different nodes.
[0004] For the three-phase CCO module, the allocation of CSMA time slots becomes more complicated because STAs (stations or nodes) are distributed on different phase lines. In order to ensure that all nodes on the three-phase line can access the channel fairly and efficiently, the CSMA time slot is further subdivided into three phase line time slots, and the sum of the total length of these three phase line time slots constitutes the length of the entire CSMA time slot. In practical applications, if the time slot allocation of the three-phase line is unreasonable or there are differences, it may cause the node to fail to obtain its own transmission time slot in time, which will cause communication anomalies or communication delays. This will not only affect the real-time and accuracy of the power meter reading system, but also may pose a potential threat to the stable operation of the smart grid. Therefore, how to reasonably allocate the CSMA time slots of the three-phase line to reduce communication delays, improve communication efficiency and stability has become a problem that needs to be solved urgently. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a carrier CSMA time slot allocation method and device based on dual-mode communication to solve at least one problem existing in the background technology.
[0006] In a first aspect, an embodiment of the present application provides a carrier CSMA time slot allocation method based on dual-mode communication, which is applied to a three-phase CCO module, and the method includes: The number and type of slave nodes of each phase line are obtained; wherein the types of slave nodes include wired slave nodes and wireless slave nodes.
[0007] In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated; Based on the updated number and type of each phase line slave node, the carrier CSMA time slot of the next routing cycle is divided into phase lines according to preset rules, so that the wired slave nodes of each phase line send messages in the corresponding phase line time slot in the next routing cycle.
[0008] In a second aspect, an embodiment of the present application provides a carrier CSMA time slot allocation device based on dual-mode communication, the device comprising: An acquisition unit is used to acquire the number and type of slave nodes of each phase line; wherein the types of the slave nodes include wired slave nodes and wireless slave nodes.
[0009] An updating unit, used to update the number and type of slave nodes of each phase line based on the received message information sent by each phase line node in the current routing cycle; The phase line division unit is used to divide the carrier CSMA time slot of the next routing cycle into phase lines based on the updated number and type of each phase line slave node and according to preset rules, so that the wired slave node of each phase line sends a message in the corresponding phase line time slot in the next routing cycle.
[0010] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed by a processor of an electronic device, the electronic device can execute the carrier CSMA time slot allocation method based on dual-mode communication provided in any one of the first aspects above.
[0011] In a fourth aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: processor; memory for storing computer executable instructions; The processor is used to execute the computer executable instructions to implement the carrier CSMA time slot allocation method based on dual-mode communication as described in any one of the first aspects above.
[0012] The embodiment of the present application updates the number and type of slave nodes in the current routing cycle, and then divides the carrier CSMA time slot into phase lines in the next routing cycle, so that the phase line time slots can be divided more accurately and channel conflicts can be avoided. On the other hand, each routing cycle can be dynamically adjusted based on the number of corresponding slave nodes, thereby maximizing the use of communication resources and improving the communication efficiency of the system.
[0013] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic flow chart of a carrier CSMA time slot allocation method based on dual-mode communication applied to a three-phase CCO module provided in an embodiment of the present application; Figure 2 A schematic diagram of a partial network topology structure of a three-phase CCO module provided in an embodiment of the present application; Figure 3 A flow chart of carrier CSMA time slot phase line division provided in an embodiment of the present application; Figure 4 A schematic diagram of a carrier CSMA time slot allocation device based on dual-mode communication provided in one embodiment of the present application; Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0015] In order to make the technical solutions and beneficial effects of the present invention more clearly understood, the following is a detailed description by listing specific embodiments. Unless otherwise defined, the technical and scientific terms used herein have the same meanings as those in the technical field to which this application belongs.
[0016] Figure 1 The following is a flow chart of a carrier CSMA time slot allocation method based on dual-mode communication for a three-phase CCO module provided in an embodiment of the present application. Figure 1 As shown, the time slot allocation method of the embodiment of the present application includes: S1. Obtain the number and type of slave nodes of each phase line.
[0017] Specifically, before the current routing cycle begins, the three-phase CCO module obtains the number and type of slave nodes of each phase line. Among them, the types of slave nodes include wired slave nodes and wireless slave nodes. A wired slave node refers to a node whose best communication method with the node of the previous level is through power line transmission, and a wireless slave node refers to a node whose best communication method with the node of the previous level is through wireless transmission. It should be noted that each slave node and the node of the previous level can use both power line communication and wireless communication. The specific communication method to be used needs to be determined based on the channel conditions, signal-to-noise ratio and communication success rate. Specifically, the three-phase CCO module can obtain the corresponding network topology through networking. The network topology shows the best routes between nodes and between nodes and CCO. Correspondingly, the number and type of slave nodes of each phase line in the three-phase CCO module can be obtained through the network topology. Figure 2 FIG. 1 is a schematic diagram of a partial network topology structure of a three-phase CCO module in an embodiment of the present application. Figure 2 As shown, the A-phase network topology of the CCO module is a tree structure. The messages of the next-level nodes need to be forwarded through the upper-level nodes (PCO1, PCO2, PCO3). The topology includes the first-level nodes PCO1 and STA3, the second-level nodes STA4, PCO2, PCO3, STA5, and the third-level nodes STA6, STA7, and STA8; among them, PCO2, STA5, STA6, and STA8 are wireless slave nodes, STA1 and STA2 are also wireless slave nodes, and the others are wired slave nodes. It should be noted that routing refers to the process of selecting the transmission path of the data message from the source node to the destination node. This process involves the direction of movement of the data message in the network, the transmission mode, and which intermediate nodes are used for transmission until it finally reaches the destination node. The routing cycle is the time period used for routing evaluation in the dual-mode communication network of the power consumption information collection system; specifically, the routing cycle is a fixed time period used by nodes in the network to evaluate and maintain routing information. During this period, the node will perform a series of routing-related operations, including but not limited to: discovering neighbor nodes to form a discovery list, communication success rate statistics, routing table updates, etc.
[0018] S2. In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated.
[0019] In the current routing cycle, since the number and type of nodes in each phase line are directly related and affect the allocation efficiency and rationality of the carrier CSMA time slot, the embodiment of the present application receives the message information sent by each phase line slave node in real time, thereby dynamically updating the number and type of slave nodes of each phase line. In the embodiment of the present application, the three-phase CCO module can flexibly adjust and re-divide the time slots according to the latest node status at the end of each routing cycle through a real-time update mechanism to adapt to the needs of dynamic changes in the network. It should be noted that the CCO module can store the number and type of nodes of each phase line through internal registers. When the nodes of each phase line change, it only needs to update the corresponding count value.
[0020] As an optional specific implementation, S2 includes: In the current routing cycle, if an association request message is received from a certain node, then the node is a newly added slave node; The number and type of slave nodes of the phase line corresponding to the newly added slave node are updated based on the association request message.
[0021] Specifically, when a node receives a discovery beacon sent by a slave node corresponding to the three-phase CCO module, the node can send an association request message in the corresponding time slot according to the discovery beacon. After receiving the association request message, the three-phase CCO module confirms that the node is a newly added slave node, and correspondingly updates the number and type of slave nodes of the phase line corresponding to the newly added slave node. It should be noted that if a node does not have a newly added slave node, the number of slave nodes of the phase line corresponding to the node increases by one.
[0022] As an optional specific implementation, S2 further includes: In the current routing cycle, if a proxy change request message sent by a slave node is received, the number and type of slave nodes of the phase line corresponding to the slave node are updated based on the proxy change request message.
[0023] In the power communication system, from the data transmission mode, slave nodes include wired slave nodes and wireless slave nodes; from the proxy or not, slave nodes include stations (STA) and proxy nodes (PCO). Most STAs need to forward messages through the PCO of the upper layer, and PCOs also need to forward messages through the PCO of the upper layer. When a station needs to change the PCO, it will send a proxy change request message to the CCO. The proxy change request message contains the node information requested to be changed, the new proxy node information, and the new route. After receiving this message, the CCO will update the proxy relationship of the node according to the information in the message, and correspondingly, update the number and type of slave nodes of the phase line corresponding to the node based on the information in the message. For example, if the proxy node of a slave node is PCOx, the communication mode between the slave node and the proxy node is wireless. When the proxy node of the slave node becomes PCOy, and the communication mode is wired, the slave node sends the corresponding proxy change request message. Correspondingly, after the CCO receives the message, the number of wired slave nodes of the corresponding phase line increases by one, and the number of wireless slave nodes decreases by one.
[0024] As an optional specific implementation, S2 further includes: In the current routing cycle, based on the received discovery list messages sent by the phase line slave nodes, the number and type of each phase line slave node are updated.
[0025] The discovery list message is a message used by the slave node to broadcast its neighbor node information. The message contains information about all neighbor nodes discovered by the node, including the MAC address of the neighbor node, the communication success rate with the neighbor node, the signal strength and signal-to-noise ratio, etc. In the embodiment of the present application, the three-phase CCO module receives the discovery list message sent by each phase line slave node, so as to discover the network status and routing changes of each slave node, and then update the network topology structure. Correspondingly, the CCO module updates the number and type of each phase line slave node based on the updated network topology structure. It should be noted that the network topology structure is the connection network structure between the CCO module and each slave node.
[0026] As an optional specific implementation, S2 further includes: In the current routing cycle, the heartbeat detection message sent by each phase line slave node is received, and whether the corresponding slave node is online is determined according to the receiving result, and the number and type of each phase line slave node are updated.
[0027] Specifically, if a heartbeat detection message sent by a slave node is received, it is determined that the slave node is online; correspondingly, the number and type of the phase line slave nodes corresponding to the slave node are not updated; If the heartbeat detection message sent by a slave node is not received, and the heartbeat detection message of the node is not received within the preset heartbeat period, the node is judged to be offline, and correspondingly, the number and type of the phase line slave nodes corresponding to the node are updated.
[0028] In the embodiment of the present application, the CCO module needs to timely perceive the online status of the nodes in the network in order to perform network management. Whether the node is online is based on the sending of heartbeat detection messages by each node at regular intervals. Each site needs to send heartbeat detection messages at regular intervals. If the heartbeat detection message sent to the CCO indicates that a certain node is active, the CCO considers that the node is active, that is, the node is online, and correspondingly, the number and type of slave nodes of the phase line corresponding to the node are not updated. The CCO module periodically detects the activity of the node. At this time, if the CCO finds that the number of active times of a certain node is 0 within the preset heartbeat cycle, the CCO determines that the node is offline. Specifically, in the current routing cycle, if the heartbeat detection message sent by a slave node is not received, and the heartbeat detection message of the node is not received within the heartbeat cycle, the node is judged to be offline, and correspondingly, the CCO module updates the number and type of slave nodes of the phase line corresponding to the node. It should be noted that there is a clear difference between a node being offline and not connected to the network. When a node is offline, if the CCO receives the heartbeat message of the node or the heartbeat message of the node carried by other nodes again, the CCO module can immediately set the node to the connected state; when the node is not connected to the network, the node must re-associate with the request before it can be connected to the network again. In the embodiment of the present application, the CCO module can update the online and offline status of the node in a timely manner based on the received heartbeat detection message. It should be noted that if a slave node of the CCO module is offline, since the offline node does not occupy time slot resources, the number of slave nodes of the phase line corresponding to the slave node is reduced by one. The preset heartbeat period is set according to the requirements of the communication protocol, and this application is not limited.
[0029] S3. Based on the updated number and type of each phase line slave node, divide the carrier CSMA time slot of the next routing cycle into phase lines according to preset rules, so that the wired slave node of each phase line sends a message in the corresponding phase line time slot in the next routing cycle.
[0030] In the embodiment of the present application, the CSMA time slot is divided into a carrier CSMA time slot and a wireless CSMA time slot; wherein, since the wireless CSMA time slot has no distinction between phase lines, there is only one CSMA time slot on the wireless; and the carrier CSMA time slot needs to be divided according to the phase line to prevent channel conflicts. Specifically, the present application updates the number and type of slave nodes of each phase line in the current routing cycle, and then divides the carrier CSMA time slot of the next routing cycle by phase line according to preset rules, so that the wired slave nodes of each phase line send messages in the time slot corresponding to the next routing cycle. Specifically, in the next routing cycle, the three-phase CCO module periodically sends a central beacon frame, which contains the allocation result of the carrier CSMA time slot. After receiving the central beacon frame, the wired slave nodes of each phase line send messages in the corresponding time slot according to the allocated carrier CSMA time slot. The embodiment of the present application updates the number and type of slave nodes in the current routing cycle, and then divides the carrier CSMA time slot into phase lines in the next routing cycle, so that the phase line time slots can be divided more accurately and channel conflicts can be avoided. On the other hand, each routing cycle can be dynamically adjusted based on the number of corresponding slave nodes, thereby maximizing the use of communication resources and improving the communication efficiency of the system.
[0031] Figure 3 The carrier CSMA time slot phase line division flow chart provided in an embodiment of the present application. Figure 3 As shown, as an optional specific implementation, S3 includes: S301. Based on the updated number and type of each phase line slave node, obtain the updated total number of wired slave nodes, and the updated number and proportion of each phase line wired slave nodes.
[0032] Specifically, the three-phase CCO module includes phase A, phase B and phase C. The CCO module obtains the corresponding updated total number of wired slave nodes, the number and proportion of wired slave nodes in phase A, the number and proportion of wired slave nodes in phase B, and the number and proportion of wired slave nodes in phase C based on the updated number and type of slave nodes in each phase.
[0033] S302: Obtain the total length of the carrier CSMA time slot of the next routing cycle based on the updated total number of wired slave nodes.
[0034] Specifically, the total length of the carrier CSMA time slot of the next routing cycle is obtained according to the total number of wired slave nodes before the update, the total length of the carrier CSMA time slot of the current routing cycle, and the total number of wired slave nodes after the update. Specifically, it can be obtained by the following formula: T'=T x (k' / k) Wherein, k' is the total number of wired slave nodes after the update, k is the total number of wired slave nodes before the update, T' is the total length of the carrier CSMA time slots of the next routing cycle, and T is the total length of the carrier time slots of the current routing cycle.
[0035] In an embodiment of the present application, the total length of the updated carrier CSMA time slot is dynamically adjusted based on the number of wired slave nodes, so that time slot resources can be reasonably allocated to avoid message conflicts, thereby maintaining efficient and stable communication.
[0036] S303 : Based on the updated proportion of wired slave nodes on each phase line and the total length of the carrier CSMA time slot of the next routing cycle, the length of each phase line carrier CSMA time slot is obtained.
[0037] Specifically, the carrier CSMA time slot length of each phase line is allocated according to the proportion of each wired slave node, thereby ensuring that each phase line can obtain a time slot length that matches its communication needs, avoiding waste and competition of time slots, and thus improving the communication efficiency of each phase line. For example, when the proportion of wired nodes in a phase line is large, it can obtain more time slot lengths to meet its communication needs; conversely, when the proportion of wired nodes in a phase line is small, its time slot length is also small, thereby avoiding idleness and waste of time slots.
[0038] S304: Based on the length of each phase line CSMA time slot and a preset CSMA time slot threshold, the carrier CSMA time slots of the next routing cycle are evenly divided.
[0039] Furthermore, S304 includes: Based on the CSMA time slot length of each phase line and the preset CSMA time slot threshold, the number of slices of each phase line is obtained; The carrier CSMA time slots of the next routing cycle are arranged in slices and balanced according to the number of slices of each phase line; wherein the time slot length of each slice is equal to the preset CSMA time slot threshold; Each time slot after balanced arrangement is judged, and if the phase lines of adjacent time slots are the same, they are merged into one time slot.
[0040] In the embodiment of the present application, the CSMA time slot of each phase line is divided into multiple slices with the preset CSMA time slot threshold as the slice unit, and then the slices of each phase line are evenly arranged, so that the time slices of each phase line are finally balanced in the entire CSMA time slot, and each phase line has a relatively uniform opportunity to transmit data, avoiding the high delay caused by a long waiting time of a phase line, ensuring that each phase line can obtain sufficient communication resources, and improving the data communication rate. It should be noted that arranging the carrier CSMA time slot into slices and arranging them evenly does not change the communication time of each phase line, but improves the utilization and efficiency of communication resources through more refined time slice allocation, effectively coordinates the access of these nodes, reduces conflicts and waiting, enhances the stability of the system, and thus reduces the delay in power grid communication. In multi-phase line communication, nodes of different phase lines may try to access the channel at the same time. Through balanced slicing, nodes of each phase line can obtain relatively uniform time slices for data transmission, so that high delay will not occur.
[0041] The slice balance arrangement in the embodiment of the present application means that each phase line is evenly allocated on the carrier CSMA time slot according to the number of slices. The details are as follows: Assume that the three phase lines can be divided into N1, N2, and N3 slices, and N1 <= N2 <= N3, then there are a total of M slices = N1 + N2 + N3; first allocate the time slot slices of the first phase line, and the positions are as follows: 0, M / N1, 2M / N1, ..., (N1 -1)M / N1; the positions of the time slot slices of the second phase line are as follows: 1, 1 + M / N2, ..., 1 + (N2 -1)M / N2. If the time slot slice has been stored in the corresponding position, look for an empty position backward; the time slot slice of the last phase line is stored in the remaining empty position.
[0042] After balanced arrangement, each time slot is judged. If the phase lines of adjacent time slots are the same, they are merged into one time slot. It should be noted that the preset CSMA threshold size is preset according to the actual communication situation. The time slot length of each phase line is divided by the preset CSMA threshold size, and the integer part is the number of slices of the phase line. For example, the preset CSMA threshold is 10ms, and the CSMA time slot lengths of the three phase lines are 88ms, 100ms, and 53ms, then the corresponding number of slices is 8, 10, and 5.
[0043] It should be understood that although Figure 1 and Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 and Figure 3At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0044] Figure 4 Schematic diagram of a carrier CSMA time slot allocation device based on dual-mode communication provided in one embodiment of the present application. Figure 4 As shown, the carrier CSMA time slot allocation device 400 of the embodiment of the present application includes: The acquisition unit 401 is used to acquire the number and type of slave nodes of each phase line; wherein the types of the slave nodes include wired slave nodes and wireless slave nodes.
[0045] An updating unit 402, configured to update the number and type of slave nodes of each phase line based on the received message information sent by each phase line node in the current routing cycle; The phase line division unit 403 is used to divide the carrier CSMA time slot of the next routing cycle into phase lines based on the updated number and type of each phase line slave node according to a preset rule, so that the wired slave node of each phase line sends a message in the corresponding phase line time slot in the next routing cycle.
[0046] Optionally, in the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, if an association request message is received from a certain node, then the node is a newly added slave node; The number and type of slave nodes of the phase line corresponding to the newly added slave node are updated based on the association request message.
[0047] Optionally, in the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, if a proxy change request message sent by a slave node is received, the number and type of slave nodes of the phase line corresponding to the slave node are updated based on the proxy change request message.
[0048] Optionally, in the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, based on the received discovery list messages sent by the phase line slave nodes, the number and type of each phase line slave node are updated.
[0049] Optionally, in the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, the heartbeat detection message sent by each phase line slave node is received, and whether the corresponding slave node is online is determined according to the receiving result, and the number and type of each phase line slave node are updated.
[0050] Optionally, judging whether the corresponding slave node is online according to the receiving result, and updating the number and type of slave nodes of each phase line, including: If a heartbeat detection message is received from a slave node, the slave node is judged to be online; correspondingly, the number and type of the phase line slave nodes corresponding to the slave node are not updated; If the heartbeat detection message sent by a slave node is not received, and the heartbeat detection message of the node is not received within the preset heartbeat period, the node is judged to be offline, and correspondingly, the number and type of the phase line slave nodes corresponding to the node are updated.
[0051] Optionally, based on the updated number and type of each phase line slave node, the carrier CSMA time slot of the next routing cycle is divided into phase lines according to a preset rule, including: Based on the updated number and type of each phase line slave node, the total number of updated wired slave nodes and the updated number and proportion of each phase line wired slave node are obtained; Obtaining the total length of the carrier CSMA time slot of the next routing cycle based on the total number of updated wired slave nodes; Based on the updated proportion of wired slave nodes of each phase line and the total length of the carrier CSMA time slot of the next routing cycle, the length of the carrier CSMA time slot of each phase line is obtained; Based on the length of each phase line CSMA time slot and the preset CSMA time slot threshold, the carrier CSMA time slots of the next routing cycle are evenly divided.
[0052] Optionally, based on the length of each phase line CSMA time slot and a preset CSMA time slot threshold, the carrier CSMA time slot of the next routing cycle is evenly divided, including: Based on the CSMA time slot length of each phase line and the preset CSMA time slot threshold, the number of slices of each phase line is obtained; The carrier CSMA time slots of the next routing cycle are arranged in slices and balanced according to the number of slices of each phase line; wherein the time slot length of each slice is equal to the preset CSMA time slot threshold; Each time slot after balanced arrangement is judged, and if the phase lines of adjacent time slots are the same, they are merged into one time slot.
[0053] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed by a processor of an electronic device, enable the electronic device to execute the steps in the carrier CSMA time slot allocation method based on dual-mode communication as described in any of the above embodiments.
[0054] The embodiments of the present application may be systems, methods and / or computer program products. The computer program product may include a computer-readable storage medium on which computer-readable program instructions are loaded for causing a processor to implement various aspects of the present application. In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions to implement various aspects of the present application.
[0055] Computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. Computer readable storage medium is a tangible device that can keep and store instructions used by an instruction execution device. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage medium include: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination of the above.
[0056] Various aspects of the present application are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0057] An embodiment of the present application also provides an electronic device. Figure 5 The structure diagram of an electronic device provided by an embodiment of the present application is shown. As shown in the figure, the electronic device 500 includes: one or more processors 501 and a memory 502; the memory 502 stores computer executable instructions; the processor 501 is used to execute the computer executable instructions to implement the steps in the carrier CSMA time slot allocation method based on dual-mode communication as in any of the above embodiments.
[0058] The processor 501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0059] The memory 502 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may execute the program instructions to implement the steps in the text recognition method of each embodiment of the present application described above and / or other desired functions.
[0060] In one example, the electronic device 500 may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown in the figure).
[0061] In addition, the input device may also include, for example, a keyboard, a mouse, a microphone, etc. The output device may output various information to the outside, and may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.
[0062] Of course, to simplify, Figure 5 Only a part of the components related to the present application in the electronic device 500 is shown, and components such as a bus, an input device / output interface, etc. are omitted. In addition, according to specific application conditions, the electronic device 500 may also include any other appropriate components.
[0063] It should be noted that the embodiments of the carrier CSMA time slot allocation method based on dual-mode communication, the carrier CSMA time slot allocation device embodiment based on dual-mode communication, the computer-readable storage medium embodiment and the electronic device embodiment provided in the embodiments of the present application belong to the same concept; the technical features in the technical solutions recorded in each embodiment can be arbitrarily combined without conflict.
[0064] It should be understood that the above embodiments are exemplary and are not intended to include all possible implementations included in the claims. Various modifications and changes may be made on the basis of the above embodiments without departing from the scope of the present disclosure. Similarly, the various technical features of the above embodiments may be arbitrarily combined to form other embodiments of the present invention that may not be explicitly described. Therefore, the above embodiments only express several implementations of the present invention and do not limit the scope of protection of the patent of the present invention.
Claims
1. A carrier CSMA time slot allocation method based on dual-mode communication, applied to a three-phase CCO module, characterized in that: The method comprises: Acquire the number and type of slave nodes of each phase line; wherein the types of the slave nodes include wired slave nodes and wireless slave nodes; In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated; Based on the updated number and type of each phase line slave node, the carrier CSMA time slot of the next routing cycle is divided into phase lines according to preset rules, so that the wired slave nodes of each phase line send messages in the corresponding phase line time slot in the next routing cycle.
2. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 1, characterized in that: In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, if an association request message is received from a certain node, then the node is a newly added slave node; The number and type of slave nodes of the phase line corresponding to the newly added slave node are updated based on the association request message.
3. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 1, characterized in that: In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, if a proxy change request message sent by a slave node is received, the number and type of slave nodes of the phase line corresponding to the slave node are updated based on the proxy change request message.
4. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 1, characterized in that: In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, based on the received discovery list messages sent by the phase line slave nodes, the number and type of each phase line slave node are updated.
5. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 1, characterized in that: In the current routing cycle, based on the received message information sent by each phase line node, the number and type of each phase line slave node are updated, including: In the current routing cycle, the heartbeat detection message sent by each phase line slave node is received, and whether the corresponding slave node is online is determined according to the receiving result, and the number and type of each phase line slave node are updated.
6. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 5, characterized in that: Determine whether the corresponding slave node is online based on the received result, and update the number and type of slave nodes on each phase line, including: If a heartbeat detection message is received from a slave node, the slave node is judged to be online; correspondingly, the number and type of the phase line slave nodes corresponding to the slave node are not updated; If the heartbeat detection message sent by a slave node is not received, and the heartbeat detection message of the node is not received within the preset heartbeat period, the node is judged to be offline, and correspondingly, the number and type of the phase line slave nodes corresponding to the node are updated.
7. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 1, characterized in that: Based on the updated number and type of slave nodes on each phase line, the carrier CSMA time slots of the next routing cycle are divided into phase lines according to preset rules, including: Based on the updated number and type of each phase line slave node, the total number of updated wired slave nodes and the updated number and proportion of each phase line wired slave node are obtained; Obtaining the total length of the carrier CSMA time slot of the next routing cycle based on the total number of updated wired slave nodes; Based on the updated proportion of wired slave nodes of each phase line and the total length of the carrier CSMA time slot of the next routing cycle, the length of the carrier CSMA time slot of each phase line is obtained; Based on the length of each phase line CSMA time slot and the preset CSMA time slot threshold, the carrier CSMA time slots of the next routing cycle are evenly divided.
8. The carrier CSMA time slot allocation method based on dual-mode communication as claimed in claim 7, characterized in that: Based on the length of each phase line CSMA time slot and the preset CSMA time slot threshold, the carrier CSMA time slot of the next routing cycle is evenly divided, including: Based on the CSMA time slot length of each phase line and the preset CSMA time slot threshold, the number of slices of each phase line is obtained; The carrier CSMA time slots of the next routing cycle are arranged in slices and balanced according to the number of slices of each phase line; wherein the time slot length of each slice is equal to the preset CSMA time slot threshold; Each time slot after balanced arrangement is judged, and if the phase lines of adjacent time slots are the same, they are merged into one time slot.
9. A carrier CSMA time slot allocation device based on dual-mode communication, characterized in that: The device comprises: An acquisition unit, used to acquire the number and type of slave nodes of each phase line; wherein the types of the slave nodes include wired slave nodes and wireless slave nodes; An updating unit, used to update the number and type of slave nodes of each phase line based on the received message information sent by each phase line node in the current routing cycle; The phase line division unit is used to divide the carrier CSMA time slot of the next routing cycle into phase lines based on the updated number and type of each phase line slave node and according to preset rules, so that the wired slave node of each phase line sends a message in the corresponding phase line time slot in the next routing cycle.
10. An electronic device, characterized in that: The electronic device comprises: processor; memory for storing computer executable instructions; The processor is used to execute the computer executable instructions to implement the carrier CSMA time slot allocation method based on dual-mode communication as described in any one of claims 1 to 8.
Citation Information
Cited By
Dual-mode communication diversity sending method and system
CN120434820A