Node communication judgment method and device, terminal equipment and storage medium
By dividing the data judgment cycle into multiple communication cycles and performing cyclic communication judgment, the problem of misjudgment in the case of multiple slave nodes is solved, and the stability and accuracy of the system are improved.
Patent Information
- Application Number
- CN202411569823.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
Traditional wireless communication determination methods can easily lead to misjudgment when there are many slave nodes, affecting the stability and accuracy of the communication system.
By obtaining the first communication time required by the master node to complete a complete data communication with each slave node, the single data judgment cycle is divided into several consecutive communication cycles, and cyclic communication judgment is made for each data judgment cycle, and the node communication result in the data judgment cycle is determined to be successful in communication.
It reduces the risk of misjudgment of wireless communication, improves the stability and accuracy of the communication system, ensures the effectiveness and integrity of the data, and enhances the adaptability and fault tolerance of the system.
Smart Images

Figure CN119545413A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a node communication determination method, device, terminal equipment and storage medium. Background Art
[0002] Wireless communication technology is widely used in various fields such as the Internet of Things, smart homes, and smart healthcare, and plays a pivotal role in electric vehicles and smart devices. In order to meet the needs of many scenarios, establishing a fast, stable, and efficient wireless networking system is crucial for the development of future smart devices and electric vehicles.
[0003] In traditional wireless communication, the communication cycle between the master and slave nodes is fixed. There are multiple communication cycles in each communication cycle. In each communication cycle, the master node needs to complete wireless communication with all slave nodes, that is, to ensure that all slave nodes receive data and send confirmation feedback, so that the communication between the master node and the slave nodes can be considered to be successfully completed. As long as one or more slave nodes fail to communicate among all slave nodes, the wireless communication is considered to have failed. However, in actual applications, when there are a large number of slave nodes, the probability of the master node successfully obtaining all slave node data in a communication cycle is lower. If the traditional wireless communication judgment method is used, it will be simply defined as a system communication failure, affecting the stability judgment of the communication system. Furthermore, there are multiple communication cycles between the master node and the slave node in a data judgment cycle. As long as any single communication cycle in the data judgment cycle succeeds, it is judged that the communication between the master node and the slave node in this data judgment cycle is successful. However, when there are a large number of slave nodes, it is easy to have different communication cycles in a data judgment cycle. When different slave nodes communicate with the master node, due to the existence of multiple communication cycles, the data of the slave node may have been successfully uploaded to the master node. If the traditional wireless communication judgment method is used, it is easy to judge that the system communication fails, which will lead to misjudgment and affect the subsequent system planning. How to improve the accuracy of wireless communication judgment is a technical problem that needs to be solved urgently. Summary of the invention
[0004] The present invention is directed to a node communication judgment method, device, terminal equipment and storage medium to solve the above technical problems, reduce the risk of misjudgment of wireless communication, and improve the stability of the communication system.
[0005] In order to solve the above technical problems, the present invention provides a node communication determination method comprising:
[0006] Acquire slave nodes included in the communication system, and divide a single data judgment cycle into a plurality of continuous communication cycles according to a first communication time required for the master node to complete a complete data communication with each of the slave nodes;
[0007] A cyclic communication judgment is performed on each of the data judgment cycles. When there is a communication cycle in which any master node successfully communicates with a slave node within a single data judgment cycle, the node communication result of the data judgment cycle is determined to be successful communication; wherein, when the slave node receives the data sent by the master node, it is determined that the master node and the slave node of the communication cycle have successfully communicated.
[0008] In the above scheme, based on the first communication time required for the master node to complete a complete data communication with each slave node, a single data judgment cycle is divided into several continuous communication cycles, ensuring that the time of each communication cycle is sufficient to complete a complete data communication. In each data judgment cycle, the system performs cyclic communication judgment. When there is a communication cycle in which any master node and slave node successfully communicate within a single data judgment cycle, it is determined that the master node and slave node of the data judgment cycle have successfully communicated. Through cyclic judgment, even if a communication cycle fails, the system can still judge the success of the overall communication through other successful cycles, thereby reducing the probability of misjudgment and ensuring the validity and accuracy of system data. In each communication cycle, only when all slave nodes receive the data sent by the master node and send confirmation feedback, the master node and slave node of the communication cycle are determined to have successfully communicated. This ensures the validity of the data of each node. Allowing different communication cycles to succeed within a data judgment cycle ensures that even in a complex environment, key data can be successfully transmitted and integrated, thereby ensuring the integrity and availability of data. By changing the traditional judgment criteria, the adaptability and fault tolerance of the system are improved, thereby reducing the risk of system misjudgment. Performing cyclic judgments of multiple communication cycles for each data judgment cycle can effectively cope with changes in the communication environment and network instability. When different communication reports between the slave node and the master node appear within the data judgment cycle, misjudgment of system communication results caused by a single communication failure can be avoided.
[0009] In one implementation, the node communication determination method further includes:
[0010] Control the master node to periodically initiate a data communication request to each slave node in the communication system until the communication is terminated; wherein the periodicity is to control the master node to send a data communication request to each slave node at a preset time interval.
[0011] In one implementation, the cyclic communication determination for each data determination cycle specifically includes:
[0012] Simultaneously displaying a plurality of continuous communication cycles based on a preset window;
[0013] Continuously executing a sliding window operation, and cyclically displaying each communication cycle included in the data determination cycle based on the sliding window operation;
[0014] Communication judgment is performed one by one on the communication cycles displayed in the preset window to obtain the node communication result of each communication cycle.
[0015] In one implementation, the cyclically displaying the communication cycles included in each of the data determination cycles based on the sliding window operation further includes:
[0016] Acquire the communication cycle displayed in the preset window and the second communication cycle after the communication cycle one by one;
[0017] The communication cycles included in each of the data judgment cycles are constructed based on the communication cycle and the second communication cycle; wherein the total number of cycles of the communication cycle and the second communication cycle is the number of communication cycles included in a single data judgment cycle.
[0018] In a second aspect, the present application further provides a node communication determination device, comprising: a cycle division module and a communication determination module;
[0019] The cycle division module is used to obtain slave nodes included in the communication system, and divide a single data judgment cycle into a plurality of continuous communication cycles according to a first communication time required for the master node to complete a complete data communication with each of the slave nodes;
[0020] The communication judgment module is used to perform cyclic communication judgment on each of the data judgment cycles. When there is a communication cycle in which any master node and slave node communicate successfully within a single data judgment cycle, the node communication result of the data judgment cycle is judged to be successful communication; wherein, when the slave node receives the data sent by the master node, it is judged that the communication between the master node and the slave node of the communication cycle is successful.
[0021] In the above scheme, based on the first communication time required for the master node to complete a complete data communication with each slave node, a single data judgment cycle is divided into several continuous communication cycles, ensuring that the time of each communication cycle is sufficient to complete a complete data communication. In each data judgment cycle, the system performs cyclic communication judgment. When there is a communication cycle in which any master node and slave node successfully communicate within a single data judgment cycle, it is determined that the master node and slave node of the data judgment cycle have successfully communicated. Through cyclic judgment, even if a communication cycle fails, the system can still judge the success of the overall communication through other successful cycles, thereby reducing the probability of misjudgment and ensuring the validity and accuracy of system data. In each communication cycle, only when all slave nodes receive the data sent by the master node and send confirmation feedback, the master node and slave node of the communication cycle are determined to have successfully communicated. This ensures the validity of the data of each node. Allowing different communication cycles to succeed within a data judgment cycle ensures that even in a complex environment, key data can be successfully transmitted and integrated, thereby ensuring the integrity and availability of data. By changing the traditional judgment criteria, the adaptability and fault tolerance of the system are improved, thereby reducing the risk of system misjudgment. Performing cyclic judgments of multiple communication cycles for each data judgment cycle can effectively cope with changes in the communication environment and network instability. When different communication reports between the slave node and the master node appear within the data judgment cycle, misjudgment of system communication results caused by a single communication failure can be avoided.
[0022] In one implementation, the node communication determination device further includes a communication control module, specifically:
[0023] Control the master node to periodically initiate communication to each slave node in the communication system until the communication is terminated; wherein the periodicity is to control the master node to send data to each slave node at a preset time interval.
[0024] In one implementation, the cyclic communication determination for each data determination cycle specifically includes:
[0025] Simultaneously displaying a plurality of continuous communication cycles based on a preset window;
[0026] Continuously executing a sliding window operation, and cyclically displaying each communication cycle included in the data determination cycle based on the sliding window operation;
[0027] Communication judgment is performed one by one on the communication cycles displayed in the preset window to obtain the node communication result of each communication cycle.
[0028] In one implementation, the cyclically displaying the communication cycles included in each of the data determination cycles based on the sliding window operation further includes:
[0029] Acquire the communication cycle displayed in the preset window and the second communication cycle after the communication cycle one by one;
[0030] The communication cycles included in each of the data judgment cycles are constructed based on the communication cycle and the second communication cycle; wherein the total number of cycles of the communication cycle and the second communication cycle is the number of communication cycles included in a single data judgment cycle.
[0031] In a third aspect, the present application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the node communication judgment method as described above is implemented.
[0032] In a fourth aspect, the present application further provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the node communication determination method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a flow chart of a node communication determination method provided in one embodiment of the present invention;
[0034] Figure 2 A schematic diagram of a communication method between a master node and a slave node in a single communication cycle provided in one embodiment of the present invention;
[0035] Figure 3 A schematic diagram of a traditional data judgment cycle division method provided in an embodiment of the present invention;
[0036] Figure 4 A schematic diagram of a cyclic data judgment period division method provided in one embodiment of the present invention;
[0037] Figure 5 A schematic diagram of a module of a node communication determination device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0038] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0039] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0041] Example 1
[0042] See also Figure 1 , Figure 1 The flowchart of a node communication determination method provided in an embodiment of the present invention is as follows. The present invention provides a node communication determination method, including steps 101 to 102, and each step is specifically as follows:
[0043] Step 101: Obtain slave nodes included in the communication system, and divide a single data judgment cycle into a plurality of continuous communication cycles according to a first communication time required for the master node to complete a complete data communication with each slave node.
[0044] In an embodiment of the present invention, the master node is started and initialized to ensure that its hardware and software environment work properly. By broadcasting or scanning, all slave nodes in the communication system can be identified, and the unique identifier (ID) and related parameters of each slave node can be obtained. In the node communication architecture, the master node is usually responsible for initiating communication requests and managing slave nodes, while the slave nodes respond to the master node's requests and provide data or execute commands. The master node establishes a communication connection with each slave node in turn, specifically, controls the master node to send a test data packet to each slave node and receives the test data response returned by the slave node. The time for the master node to complete a complete data communication with each slave node is recorded to obtain the first communication time. According to the measured first communication time, the communication cycle of each slave node is calculated. The data judgment cycle refers to the time interval or frequency at which the master node or slave node analyzes, verifies and judges the received data during the node communication process. During this cycle, the system will check the validity, correctness, integrity, etc. of the communication data to ensure the reliability and stability of the communication. The data judgment cycle should be greater than the sum of the communication times of all slave nodes to ensure that within each judgment cycle, the master node can complete a complete data communication with all slave nodes. The setting of the data judgment cycle needs to comprehensively consider multiple factors such as system real-time requirements, communication time and efficiency, system load, data update frequency, system stability and reliability, hardware resource limitations and user needs. Exemplarily, if the data judgment cycle is 100ms, the first communication time required for the master node to complete a complete data communication with each slave node, that is, a single node communication cycle is 30ms, then a data judgment cycle can be divided into 3 (100 / 30 is an integer) communication cycles. In an embodiment of the present invention, a single data judgment cycle is divided into several consecutive communication cycles, and the master node can exchange data with different slave nodes in each communication cycle, thereby realizing parallel processing. This parallel communication method is more efficient than serial communication because it reduces the overall communication time and allows the data of multiple slave nodes to be processed simultaneously. Further, in each communication cycle, the master node can communicate with the slave node in a timely manner to obtain the latest data or send control instructions. This periodic communication mode helps to ensure the real-time nature of the data, which is particularly important for application scenarios that require rapid response (such as industrial automation control).
[0045] In one embodiment, the node communication determination method further includes: controlling the master node to periodically initiate a data communication request to each slave node in the communication system until the communication is terminated; wherein the periodicity is to control the master node to send a data communication request to each slave node at a preset time interval.
[0046] See also Figure 2 , Figure 2The schematic diagram of the communication mode between the master node and the slave node in a single communication cycle provided in one embodiment of the present invention. In the embodiment of the present invention, a data communication request is sent to the slave node in the communication system by broadcasting or multicasting. Among them, the broadcasting mode can send data requests or instructions to all slave nodes, which is suitable for the situation where all slave nodes need to be notified at one time; the multicasting mode can selectively send data to a group of slave nodes, which is suitable for the scene where multiple slave nodes need to be communicated at the same time, but not all slave nodes need to participate. When the data communication request type sent by the master node to the slave node is a data request, the slave node returns the corresponding data according to the request, such as sensor data, status information, etc.; when the data communication request type sent by the master node to the slave node is a control instruction, such as start, stop, restart and other operation instructions, the slave node performs the corresponding operation and returns the execution result; when the data communication request type sent by the master node to the slave node is configuration update information, such as parameter setting, system update, etc., the slave node receives and applies the new configuration; when the data communication request type sent by the master node to the slave node is confirmation information, to ensure the correct reception and processing of data or instructions, the slave node returns a confirmation response. The preset time interval is generally a smaller time interval to meet the real-time requirements of the system and ensure timely update and response of data. However, the preset time interval should be greater than the time (first communication time) for the master node to complete a complete data communication with each slave node to ensure that the master node can complete a complete data communication with all slave nodes in each communication cycle. The specific time interval is set by the user according to the real-time requirements of the system, the first communication time, the number of slave nodes and the frequency of data changes, and is not limited here. Through periodic data communication, the master node can efficiently exchange and process data with each slave node in the communication system. This periodic communication mode not only improves communication efficiency and real-time performance, but also enhances the stability and controllability of the system, ensuring that the system can operate reliably and efficiently in various complex scenarios. By flexibly adjusting the preset time interval, the system can also adapt to different communication requirements and network environments, thereby achieving the best communication effect and resource utilization.
[0047] Step 102: Perform cyclic communication judgment on each data judgment cycle. When there is a communication cycle in which any master node and slave node successfully communicate within a single data judgment cycle, the node communication result of the data judgment cycle is judged to be successful communication; wherein, when the slave node receives the data sent by the master node, it is judged that the communication between the master node and the slave node of the communication cycle is successful.
[0048] In one embodiment, a cyclic communication judgment is performed on each data judgment cycle, specifically including: simultaneously displaying multiple consecutive communication cycles based on a preset window; continuously executing a sliding window operation, and cyclically displaying the communication cycles included in each data judgment cycle based on the sliding window operation; performing communication judgment on each communication cycle displayed in the preset window, and obtaining the node communication results of each communication cycle.
[0049] In an embodiment of the present invention, the size of the window, that is, the number of communication cycles presented at the same time, is preset, and the preset window is started and initialized. The initial data of several continuous communication cycles are loaded in the preset window, including the planned communication time of each communication cycle, the communication object (slave node), the data request or instruction content, etc. The information of multiple communication cycles in the preset window is displayed simultaneously in the user interface or the system monitoring interface to ensure that the user or system administrator can intuitively view the current and upcoming communication tasks. The specific window size is customized by the user according to the system real-time requirements, the communication load, and the number of data judgment cycles, and is not limited here. If the system requires high real-time performance, the window should be set smaller to ensure that each communication cycle is processed in time; if the communication load is heavy, the window should be set larger to balance the processing capacity and communication efficiency of the master node; the size of the preset window should also match the number of communication cycles in the data judgment cycle to ensure that the window can fully display all communication cycles in one or more data judgment cycles. After the preset window is initialized, the sliding window operation is started to ensure that the window can continuously update and display new communication cycle data. Set the sliding step size, that is, the number of communication cycles that the window moves forward or backward each time the sliding window operation is performed. The sliding step size should be set according to the processing capacity and communication requirements of the system. After each data judgment cycle ends, a sliding window operation is performed to move the window to display the communication cycle data in the next data judgment cycle. The sliding operation can be triggered automatically or manually by the user or system administrator. The sliding window operation is generally performed after the currently displayed communication cycle data has been processed. For example, when all communication cycles in the preset window have completed the communication judgment and obtained the results, the sliding operation can be performed. The sliding window operation can slide forward or backward, and the specific method depends on the communication schedule and data processing requirements of the system. When sliding, the communication cycle data in the window will be automatically updated to display the new communication cycle information. The sliding step size can be fixed or dynamically adjusted. A fixed sliding step size is suitable for situations where the communication task is relatively stable; the dynamically adjusted sliding step size can be adjusted according to the real-time status of the system (such as communication load, data change frequency, etc.) to improve communication efficiency and system stability. In the embodiment of the present invention, when performing communication judgment on the communication cycle displayed in the window, the data integrity of the slave node is used as the judgment criterion for the communication result. If the data of all slave nodes in the current window are complete, it is determined that the communication between the master node and the slave node in the current data judgment period is successful, otherwise the communication fails. Preferably, the integrity of the data of the slave node can be determined by checking the data length and data content consistency. Specifically, for data length check, when the master node sends a data packet, it is accompanied by the actual length information of the data packet.After receiving the data packet, the slave node checks whether the received data length is consistent with the sent data length; for data content consistency check, the master node sends some key data check values (such as checksum, CRC, etc.) when sending the data packet. After receiving the data packet, the slave node recalculates the check value of the key data and compares it with the received check value. If the two are consistent, the data is considered complete.
[0050] In an embodiment of the present invention, by pre-dividing a single data judgment cycle into several continuous communication cycles and displaying multiple communication cycles simultaneously based on a preset window, the system can efficiently manage and execute communication tasks. By continuously executing the sliding window operation, the system can flexibly update and display new communication cycle information to ensure timely processing and response of communication tasks. This communication judgment method not only improves communication efficiency and real-time performance, but also enhances the stability and controllability of the system, ensuring that in various complex scenarios, the system can promptly detect and handle communication anomalies, thereby improving the overall communication quality and reliability.
[0051] In one embodiment, the communication cycles included in each data judgment cycle are cyclically displayed based on a sliding window operation, and also include: acquiring the communication cycle displayed in a preset window and the second communication cycle located after the communication cycle one by one; constructing the communication cycle included in each data judgment cycle based on the communication cycle and the second communication cycle; wherein the total number of communication cycles and the second communication cycle is the number of communication cycles included in a single data judgment cycle.
[0052] In the embodiment of the present invention, from the current sliding window to each communication cycle of the window, the data of the currently displayed communication cycle and the data of the second communication cycle that follows are sequentially obtained. This ensures the formation of a continuous data sequence, which is convenient for subsequent analysis and processing. By combining the current communication cycle with the second communication cycle that follows it, a complete data judgment cycle containing multiple communication cycles is constructed. Exemplarily, there are 10 communication cycles in the node communication process, and each data judgment cycle includes 3 communication cycles. See Figure 3 , Figure 3A schematic diagram of a traditional data judgment cycle division method provided in one embodiment of the present invention. If the traditional data judgment cycle division method is used, the first data judgment cycle is the 1st, 2nd, and 3rd communication cycles, the second data judgment cycle is the 4th, 5th, and 6th communication cycles, the third data judgment cycle is the 7th, 8th, and 9th communication cycles, and so on. The last data judgment cycle only includes the 10th communication cycle (because there are not enough cycles to constitute a complete judgment cycle). This method spans a fixed communication cycle when processing data and cannot be adjusted dynamically. Fixed segmentation makes it impossible to quickly reflect changes in new data within any judgment cycle. For example, if the data in the 3rd communication cycle is incorrect, the judgments of the first two cycles will not be corrected in time. In the embodiment of the present invention, the construction of each data judgment cycle can be dynamically adjusted through a sliding window operation. See. Figure 4 , Figure 4 A schematic diagram of a cyclic data judgment cycle division method provided in one embodiment of the present invention. Specifically, the first data judgment cycle is still the 1st, 2nd, and 3rd communication cycles, but the second data judgment cycle can be evaluated for the 2nd, 3rd, and 4th communication cycles and the subsequent 5th and 6th communication cycles to form a new data judgment cycle, and the information of the 2nd and 3rd cycles is combined with the data of the upcoming 4th cycle when summarizing all node information. That is, the second data judgment cycle can actually have a variety of permutations and combinations of communication cycles, such as the 2nd, 3rd, and 4th communication cycles, the 3rd, 4th, and 5th communication cycles, or the 4th, 5th, and 6th communication cycles. As long as the communication result of the node in a communication cycle in any permutation and combination is a successful communication, the node communication of the current data judgment cycle can be judged to be successful. In the traditional node communication judgment method, only three specific communication cycles are concerned in each data judgment cycle. If the data of a certain cycle is lost, it is necessary to wait for the next judgment cycle, resulting in reduced data availability. Each time, the upcoming cycle (such as the next communication cycle of the previous cycle) is included to ensure that each step can make decisions based on the latest available data, thereby improving data utilization. And because of the dynamic structure, the data judgment cycle can be updated flexibly in real time. Each time, only the window needs to be moved to ensure the continuous data flow of each cycle, so that abnormal situations can be identified more quickly and adjustments can be made in time. In addition, each judgment cycle includes the data of the previous and next cycles, which will not cause idle cycles, so that idle time can be effectively used for data transmission and processing. There will be no problem of low communication efficiency caused by having to wait within a certain period due to fixed cycles.
[0053] In the embodiment of the present invention, the use of a sliding window-based operation cycle to display each data judgment cycle can provide higher flexibility, real-time and data integrity compared to the traditional data cycle division method. Through dynamic updates and instant feedback, the master node can fully evaluate the data of the slave node at any time point, significantly improving the efficiency and responsiveness of the communication system, thereby improving the reliability and performance of the entire system.
[0054] In an embodiment of the present invention, a node communication determination device is also provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned node communication determination method is implemented.
[0055] In an embodiment of the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored computer program. When the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned node communication determination method.
[0056] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to complete the present invention. One or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the node communication judgment device.
[0057] The node communication judgment device can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The node communication judgment device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will understand that the above components are merely examples of the node communication judgment device and do not constitute a limitation on the node communication judgment device. It may include more or fewer components than the components, or combine certain components, or different components. For example, the node communication judgment device may also include input and output devices, network access devices, buses, etc.
[0058] The processor may be a central processing unit (CPU), or 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. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the node communication judgment device, and uses various interfaces and lines to connect various parts of the entire node communication judgment device.
[0059] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the node communication judgment device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, a text conversion function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0060] Among them, if the module based on the judgment of node communication is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0061] The embodiment of the present invention provides a node communication judgment method, which divides a single data judgment cycle into several continuous communication cycles based on the first communication time required for the master node and each slave node to complete a complete data communication, thereby ensuring that the time of each communication cycle is sufficient to complete a complete data communication. In each data judgment cycle, the system performs cyclic communication judgment. When there is a communication cycle in which any master node and slave node successfully communicate within a single data judgment cycle, it is determined that the master node and slave node of the data judgment cycle communicate successfully. Through cyclic judgment, even if a communication cycle fails, the system can still judge the success of the overall communication through other successful cycles, thereby reducing the probability of misjudgment and ensuring the validity and accuracy of system data. In each communication cycle, only when all slave nodes receive the data sent by the master node and send confirmation feedback, the master node and slave node of the communication cycle are determined to communicate successfully. This ensures the validity of each node data. Allowing different communication cycles to succeed within a data judgment cycle ensures that even in a complex environment, key data can be successfully transmitted and integrated, thereby ensuring the integrity and availability of data. By changing the traditional judgment criteria, the adaptability and fault tolerance of the system are improved, thereby reducing the risk of system misjudgment. Performing cyclic judgments of multiple communication cycles for each data judgment cycle can effectively cope with changes in the communication environment and network instability. When different communication reports between the slave node and the master node appear within the data judgment cycle, misjudgment of system communication results caused by a single communication failure can be avoided.
[0062] Example 2
[0063] See also Figure 5 , Figure 5 Schematic diagram of a node communication judgment device provided in an embodiment of the present invention. The present invention provides a node communication judgment device, including: a cycle division module 201 and a communication judgment module 202;
[0064] The cycle division module 201 is used to obtain slave nodes included in the communication system, and divide a single data judgment cycle into a plurality of continuous communication cycles according to a first communication time required for the master node to complete a complete data communication with each slave node;
[0065] The communication judgment module 202 is used to perform cyclic communication judgment on each data judgment cycle. When there is a communication cycle in which any node successfully communicates within a single data cycle, the node communication within the data judgment cycle is determined to be successful; wherein, when each slave node receives the data sent by the master node, the node communication in the communication cycle is determined to be successful.
[0066] In one embodiment, the node communication judgment device also includes a communication control module, specifically: controlling the master node to periodically initiate communication to each slave node in the communication system until the communication is terminated; wherein the periodicity is to control the master node to send data to each slave node at a preset time interval.
[0067] In one embodiment, a cyclic communication judgment is performed on each data judgment cycle, specifically including: simultaneously displaying multiple consecutive communication cycles based on a preset window; continuously executing a sliding window operation, and cyclically displaying the communication cycles included in each data judgment cycle based on the sliding window operation; performing communication judgment on each communication cycle displayed in the preset window, and obtaining the node communication results of each communication cycle.
[0068] In one embodiment, the communication cycles included in each data judgment cycle are cyclically displayed based on a sliding window operation, and also include: acquiring the communication cycle displayed in a preset window and the second communication cycle located after the communication cycle one by one; constructing the communication cycle included in each data judgment cycle based on the communication cycle and the second communication cycle; wherein the total number of communication cycles and the second communication cycle is the number of communication cycles included in a single data judgment cycle.
[0069] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0070] The embodiment of the present invention provides a node communication judgment device, which divides a single data judgment cycle into several continuous communication cycles based on the first communication time required for the master node and each slave node to complete a complete data communication, thereby ensuring that the time of each communication cycle is sufficient to complete a complete data communication. In each data judgment cycle, the system performs cyclic communication judgment. When there is a communication cycle in which any master node and slave node successfully communicate within a single data judgment cycle, it is determined that the master node and slave node of the data judgment cycle communicate successfully. Through cyclic judgment, even if a communication cycle fails, the system can still judge the success of the overall communication through other successful cycles, thereby reducing the probability of misjudgment and ensuring the validity and accuracy of system data. In each communication cycle, only when all slave nodes receive the data sent by the master node and send confirmation feedback, the master node and slave node of the communication cycle are determined to communicate successfully. This ensures the validity of each node data. Allowing different communication cycles to succeed within a data judgment cycle ensures that even in a complex environment, key data can be successfully transmitted and integrated, thereby ensuring the integrity and availability of data. By changing the traditional judgment criteria, the adaptability and fault tolerance of the system are improved, thereby reducing the risk of system misjudgment. Performing cyclic judgments of multiple communication cycles for each data judgment cycle can effectively cope with changes in the communication environment and network instability. When different communication reports between the slave node and the master node appear within the data judgment cycle, misjudgment of system communication results caused by a single communication failure can be avoided.
[0071] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A node communication determination method, characterized in that: include: Acquire slave nodes included in the communication system, and divide a single data judgment cycle into a plurality of continuous communication cycles according to a first communication time required for the master node to complete a complete data communication with each of the slave nodes; A cyclic communication judgment is performed on each of the data judgment cycles. When there is a communication cycle in which any master node successfully communicates with a slave node within a single data judgment cycle, the node communication result of the data judgment cycle is determined to be successful communication; wherein, when the slave node receives the data sent by the master node, it is determined that the master node and the slave node of the communication cycle have successfully communicated.
2. A node communication determination method as claimed in claim 1, characterized in that: The node communication determination method further includes: Control the master node to periodically initiate a data communication request to each slave node in the communication system until the communication is terminated; wherein the periodicity is to control the master node to send a data communication request to each slave node at a preset time interval.
3. A node communication determination method as claimed in claim 1, characterized in that: The cyclic communication judgment for each data judgment cycle specifically includes: Simultaneously displaying a plurality of continuous communication cycles based on a preset window; Continuously executing a sliding window operation, and cyclically displaying each communication cycle included in the data determination cycle based on the sliding window operation; Communication judgment is performed one by one on the communication cycles displayed in the preset window to obtain the node communication result of each communication cycle.
4. A node communication determination method as claimed in claim 3, characterized in that: The cyclic display of the communication cycles contained in each data judgment cycle based on the sliding window operation also includes: Acquire the communication cycle displayed in the preset window and the second communication cycle after the communication cycle one by one; The communication cycles included in each of the data judgment cycles are constructed based on the communication cycle and the second communication cycle; wherein the total number of cycles of the communication cycle and the second communication cycle is the number of communication cycles included in a single data judgment cycle.
5. A node communication determination device, characterized in that: include: Cycle division module and communication judgment module; The cycle division module is used to obtain slave nodes included in the communication system, and divide a single data judgment cycle into a plurality of continuous communication cycles according to a first communication time required for the master node to complete a complete data communication with each of the slave nodes; The communication judgment module is used to perform cyclic communication judgment on each of the data judgment cycles. When there is a communication cycle in which any master node and slave node communicate successfully within a single data judgment cycle, the node communication result of the data judgment cycle is judged to be successful communication; wherein, when the slave node receives the data sent by the master node, it is judged that the communication between the master node and the slave node of the communication cycle is successful.
6. A node communication determination device as claimed in claim 5, characterized in that: The node communication determination device also includes a communication control module, specifically: Control the master node to periodically initiate communication to each slave node in the communication system until the communication is terminated; wherein the periodicity is to control the master node to send data to each slave node at a preset time interval.
7. A node communication determination device as claimed in claim 5, characterized in that: The cyclic communication judgment for each data judgment cycle specifically includes: Simultaneously displaying a plurality of continuous communication cycles based on a preset window; Continuously executing a sliding window operation, and cyclically displaying each communication cycle included in the data determination cycle based on the sliding window operation; Communication judgment is performed one by one on the communication cycles displayed in the preset window to obtain the node communication result of each communication cycle.
8. A node communication determination device as claimed in claim 7, characterized in that: The cyclic display of the communication cycles contained in each data judgment cycle based on the sliding window operation also includes: Acquire the communication cycle displayed in the preset window and the second communication cycle after the communication cycle one by one; The communication cycles included in each of the data judgment cycles are constructed based on the communication cycle and the second communication cycle; wherein the total number of cycles of the communication cycle and the second communication cycle is the number of communication cycles included in a single data judgment cycle.
9. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the node communication determination method as described in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the node communication determination method as described in any one of claims 1 to 4.