Communication quality assessment method and device, terminal equipment and storage medium
By dividing the data judgment cycle into multiple master-slave node communication cycles and using PS and PDR indicators, the problem of the inability to accurately evaluate the communication quality of master-slave nodes in the prior art is solved, real-time evaluation and accuracy under different conditions are achieved Sex improvement.
Patent Information
- Application Number
- CN202411515320.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-11
AI Technical Summary
The existing communication quality evaluation methods cannot accurately reflect the communication quality between master and slave nodes, especially in the case of network delay and packet loss, commonly used PS and PDR indicators cannot fully evaluate communication quality.
By dividing the data judgment cycle into several master-slave node communication cycles, the first communication result of each communication cycle is obtained one by one, and the master-slave node communication quality evaluation results are generated using two evaluation indicators: PS and PDR.
Real-time communication quality assessment under different load conditions and network states is realized, problems can be discovered and solved in a timely manner, avoiding the phenomenon of problems being covered up during long-term monitoring, and improving the accuracy of communication quality assessment.
Smart Images

Figure CN119420672A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a communication quality assessment method, device, terminal equipment and storage medium. Background Art
[0002] With the rapid development of communication technology, communication systems are increasingly used in various industries, and their stability and reliability are of vital importance to business continuity and security. In master-slave communication, the master node controls the timing and process of communication, and the slave node exchanges data according to the instructions of the master node. The master node is responsible for scheduling and managing communication, and the slave node responds to the master node's request. Each node exchanges data within a certain time interval. However, due to the limitations of the physical communication method of data, it is impossible to guarantee that every data communication of each node will be successful. Therefore, it is necessary to consider the data stability of communication between master and slave nodes. When evaluating the communication quality between master and slave nodes, the commonly used indicators are Packet Success Rate (hereinafter referred to as PS) and Packet Delivery Ratio (hereinafter referred to as PDR). These two indicators are used to measure the success rate of network communication and the ratio of data packet transmission, respectively, to help evaluate the performance and reliability of the network.
[0003] However, PS only focuses on whether the data packet arrives successfully, without considering network latency and packet loss. If the network latency is high, but the packet success rate is still high, this may mask potential performance issues. When two networks have the same PS, the actual communication quality and experience may be different. For example, one network may perform poorly under high load, but PS does not reflect this situation. PDR focuses on the delivery of data packets, but it does not consider the transmission delay of data packets, that is, a high PDR does not necessarily mean fast data transmission speed. If the network is congested, PDR may still remain high, which may mask network performance issues such as packet delays and retransmissions. Accurately evaluating communication quality can help detect data loss, errors, or corruption, which is critical to ensuring data integrity and system reliability. Summary of the invention
[0004] The present invention aims at a communication quality assessment method, device, terminal equipment and storage medium to solve the above technical problems and improve the accuracy of communication quality assessment of master-slave communication.
[0005] In order to solve the above technical problems, the present invention provides a communication quality assessment method, comprising:
[0006] The master node initiates a data request instruction to the slave nodes in the communication system, so that the slave nodes reply with data response instructions in sequence based on the received data request instructions;
[0007] Based on a single communication cycle of a master-slave node in the communication system, the data judgment cycle is divided into a plurality of consecutive master-slave node communication cycles; wherein the communication cycle is a time interval for a data exchange between a slave node and a master node;
[0008] Obtaining the first communication result of each slave node in each master-slave node communication cycle one by one, substituting the first communication result into the PS index calculation formula and the PDR index calculation formula, and generating the first PS index result and the first PDR index result of each slave node;
[0009] A master-slave node communication quality evaluation result of the communication system is generated based on the first PS indicator result and the first PDR indicator result.
[0010] In the above scheme, the data judgment cycle is divided into several master-slave node communication cycles, allowing the latest communication results to be obtained within a controllable time range. This dynamicity allows the system to evaluate the quality of communication in real time under different load conditions and network conditions. By obtaining the first communication result of each communication cycle one by one, the system can track and record the communication performance of each cycle in real time. This allows problems to be discovered and solved in a timely manner, avoiding problems from being covered up in long-term monitoring. Using both PS and PDR evaluation indicators can more comprehensively reflect the communication quality between master and slave nodes. PS is only a single success rate indicator and cannot fully evaluate the performance of the network. PDR supplements the consideration of data packet delivery, helps identify problems such as packet loss or retransmission, and improves the accuracy of communication quality evaluation.
[0011] In one implementation, the control master node initiates a data request instruction to a slave node in the communication system so that the slave node sequentially replies with a data response instruction based on the received data request instruction, specifically including:
[0012] Pre-setting a response order in the communication system for the slave nodes to reply to the data request instruction;
[0013] Control the master node to cyclically initiate a data request instruction in the communication system; wherein the cyclicity is to initiate the data request instruction once every communication cycle between the master and slave nodes;
[0014] The slave nodes in the communication system are controlled to reply to the data response instruction once according to the preset response times.
[0015] In one implementation, the step of obtaining the first communication result of each slave node in each master-slave node communication cycle one by one, substituting the first communication result into the PS index calculation formula and the PDR index calculation formula, and generating the first PS index result and the first PDR index result of each slave node specifically includes:
[0016] Obtaining a first communication result of each slave node in each master-slave node communication cycle during a single data evaluation process; wherein the data evaluation process includes a plurality of data judgment cycles;
[0017] When it is detected that the slave node has a first communication result of failure in several master-slave node communication cycles within the data judgment cycle, the PS index calculation formula and the PDR index calculation formula are expressed as follows:
[0018]
[0019] PDR = 100%;
[0020] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; and m is the number of data judgment cycles included in a data judgment process.
[0021] In one implementation, when it is detected that the slave node has a first communication result of a plurality of master-slave node communication cycles within the data determination cycle that fails, the method further includes:
[0022] Determine whether there are consecutive failed master-slave node communication cycles within the master-slave node communication cycle in which the first communication result is failed;
[0023] When the number of consecutive failed master-slave node communication cycles reaches a preset number, the expressions of the PS index calculation formula and the PDR index calculation formula are updated as follows:
[0024]
[0025]
[0026] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0027] In one implementation, generating a master-slave node communication quality evaluation result of the communication system based on the first PS indicator result and the first PDR indicator result specifically includes:
[0028] If there is a complete data exchange between the master node and each of the slave nodes within the current data judgment cycle, it is determined that the current first PDR indicator result of the communication system is 100%;
[0029] When communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, determining that the first communication result of the master-slave node communication cycle is a communication failure;
[0030] When there are several data judgment cycles in which the communication data is incomplete in the number of data judgment cycles included in a single data judgment process, the PDR indicator calculation formula of the communication system is expressed as follows:
[0031]
[0032] Wherein, x is the number of master-slave node communication periods included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0033] In one implementation, when the communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, determining that the first communication result of the master-slave node communication cycle is a communication failure further includes:
[0034] Obtaining the first communication result of each master-slave node communication cycle within a single data judgment cycle;
[0035] If the first communication result of each of the master-slave node communication cycles within the data determination cycle is a communication failure, it is determined that the master-slave node communication within the data determination cycle has failed.
[0036] In a second aspect, the present application further provides a communication quality assessment device, comprising: an instruction sending module, a cycle division module, an index calculation module and a communication judgment module;
[0037] The instruction sending module is used to control the master node to initiate a data request instruction to the slave nodes in the communication system, so that the slave nodes reply with data response instructions in sequence based on the received data request instructions;
[0038] The cycle division module is used to divide the data judgment cycle into a plurality of consecutive master-slave node communication cycles based on a single master-slave node communication cycle in the communication system; wherein the communication cycle is a time interval for a data exchange between a slave node and a master node;
[0039] The index calculation module is used to obtain the first communication result of each slave node in each master-slave node communication cycle one by one, substitute the first communication result into the PS index calculation formula and the PDR index calculation formula, and generate the first PS index result and the first PDR index result of each slave node;
[0040] The communication judgment module is used to generate a master-slave node communication quality evaluation result of the communication system based on the first PS indicator result and the first PDR indicator result.
[0041] In the above scheme, the data judgment cycle is divided into several master-slave node communication cycles, allowing the latest communication results to be obtained within a controllable time range. This dynamicity allows the system to evaluate the quality of communication in real time under different load conditions and network conditions. By obtaining the first communication result of each communication cycle one by one, the system can track and record the communication performance of each cycle in real time. This allows problems to be discovered and solved in a timely manner, avoiding problems from being covered up in long-term monitoring. Using both PS and PDR evaluation indicators can more comprehensively reflect the communication quality between master and slave nodes. PS is only a single success rate indicator and cannot fully evaluate the performance of the network. PDR supplements the consideration of data packet delivery, helps identify problems such as packet loss or retransmission, and improves the accuracy of communication quality evaluation.
[0042] In one implementation, the instruction sending module is used to control the master node to initiate a data request instruction to the slave node in the communication system, so that the slave node sequentially replies with a data response instruction based on the received data request instruction, specifically including:
[0043] Pre-setting a response order in the communication system for the slave nodes to reply to the data request instruction;
[0044] Control the master node to cyclically initiate a data request instruction in the communication system; wherein the cyclicity is to initiate the data request instruction once every communication cycle between the master and slave nodes;
[0045] The slave nodes in the communication system are controlled to reply to the data response instruction once according to the preset response times.
[0046] In one implementation, the first communication result of each slave node in each master-slave node communication cycle is obtained one by one, and the first communication result is substituted into the PS index calculation formula and the PDR index calculation formula to generate the first PS index result and the first PDR index result of each slave node, specifically including:
[0047] Obtaining a first communication result of each slave node in each master-slave node communication cycle during a single data evaluation process; wherein the data evaluation process includes a plurality of data judgment cycles;
[0048] When it is detected that the slave node has a first communication result of failure in several master-slave node communication cycles within the data judgment cycle, the PS index calculation formula and the PDR index calculation formula are expressed as follows:
[0049]
[0050] PDR = 100%;
[0051] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; and m is the number of data judgment cycles included in a data judgment process.
[0052] In one implementation, when it is detected that the slave node has a first communication result of a plurality of master-slave node communication cycles within the data determination cycle that fails, the method further includes:
[0053] Determine whether there are consecutive failed master-slave node communication cycles within the master-slave node communication cycle in which the first communication result is failed;
[0054] When the number of consecutive failed master-slave node communication cycles reaches a preset number, the expressions of the PS index calculation formula and the PDR index calculation formula are updated as follows:
[0055]
[0056]
[0057] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0058] In one implementation, generating a master-slave node communication quality evaluation result of the communication system based on the first PS indicator result and the first PDR indicator result specifically includes:
[0059] If there is a complete data exchange between the master node and each of the slave nodes within the current data judgment cycle, it is determined that the current first PDR indicator result of the communication system is 100%;
[0060] When communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, determining that the first communication result of the master-slave node communication cycle is a communication failure;
[0061] When there are several data judgment cycles in which the communication data is incomplete in the number of data judgment cycles included in a single data judgment process, the PDR indicator calculation formula of the communication system is expressed as follows:
[0062]
[0063] Wherein, x is the number of master-slave node communication periods included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0064] In one implementation, when the communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, determining that the first communication result of the master-slave node communication cycle is a communication failure further includes:
[0065] Obtaining the first communication result of each master-slave node communication cycle within a single data judgment cycle;
[0066] If the first communication result of each of the master-slave node communication cycles within the data determination cycle is a communication failure, it is determined that the master-slave node communication within the data determination cycle has failed.
[0067] 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 communication quality assessment method as described above is implemented.
[0068] 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 communication quality assessment method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 A flow chart of a communication quality assessment method provided in one embodiment of the present invention;
[0070] Figure 2 A schematic diagram of communication between a master and a slave node in a single communication cycle provided in one embodiment of the present invention;
[0071] Figure 3 A schematic diagram of a master-slave node communication method provided in one embodiment of the present invention;
[0072] Figure 4 A module diagram of a communication quality assessment device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0073] 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.
[0074] 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.
[0075] 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.
[0076] First, some terms in this application are explained to facilitate understanding by those skilled in the art.
[0077] (1) Packet Success Rate: refers to the ratio of the number of successfully received packets to the total number of sent packets. It is used to measure the proportion of packets that successfully reach the destination during the transmission process.
[0078] (2) Packet Delivery Ratio: refers to the ratio of the number of successfully delivered data packets to the total number of sent data packets. PDR is used to evaluate the actual delivery rate of data packets and help understand the transmission reliability of the network.
[0079] Example 1
[0080] See also Figure 1 , Figure 1 The flowchart of a communication quality evaluation method provided in an embodiment of the present invention is as follows. The present invention provides a communication quality evaluation method, including steps 101 to 104, each of which is as follows:
[0081] Step 101: Control the master node to initiate a data request instruction to the slave nodes in the communication system, so that the slave nodes reply with data response instructions in sequence based on the received data request instructions.
[0082] In one embodiment, the control master node initiates a data request instruction to the slave nodes in the communication system so that the slave nodes reply with data response instructions in sequence based on the received data request instructions, specifically including: pre-setting the response order of the slave nodes in replying to the data request instructions in the communication system; controlling the master node to cyclically initiate data request instructions in the communication system; wherein the cyclicity is to initiate the data request instruction once every master-slave node communication cycle; controlling the slave nodes in the communication system to reply with the data response instruction once according to the preset number of responses.
[0083] In an embodiment of the present invention, the response order of the slave node replying to the data request instruction is pre-set in the communication system, and the response order is generally determined by the following mechanisms: polling mechanism, priority mechanism, request-response mechanism and timestamp mechanism, etc. The polling mechanism is a simple and easy-to-implement communication method. The master node sends requests to each slave node in sequence, and the slave nodes reply in sequence. Exemplarily, the master node first asks slave node A, and after A completes the response, it asks slave node B, and after B completes the response, it asks slave node C, and so on. The priority mechanism is that each slave node responds according to the priority order, and the master node arranges the response order of the slave nodes according to the priority. Exemplarily, slave node A has a high priority, and the master node first receives the response from A, then B with a medium priority, and finally C with a low priority. The request-response mechanism is that when different data types are required, the slave node can respond according to the request order of the master node. Exemplarily, the master node first requests temperature data, and the slave node A provides temperature data response, and then requests humidity data, and the slave node B provides humidity data response. The timestamp mechanism is that the slave node determines the response order according to the timestamp or time mark of the master node. See also Figure 2 , Figure 2 The present invention provides a communication diagram of a master-slave node in a single communication cycle. In the present invention, after the master node initiates a data request instruction, the slave nodes reply in sequence according to the numbering sequence. The master node is controlled to cyclically initiate data request instructions in the communication system according to user needs until the communication is interrupted. The slave nodes in the communication system will respond according to the preset number of times.
[0084] Step 102: Divide the data determination cycle into a plurality of consecutive master-slave node communication cycles based on a single master-slave node communication cycle in the communication system.
[0085] In the embodiment of the present invention, the data judgment cycle refers to the time interval for the slave node to process and judge the received data. This cycle determines the frequency of the slave node when processing and judging the data. The data judgment cycle affects the frequency of the slave node to process and analyze the data. For example, in a sensor network, the sensor processes and makes decisions on the data at regular intervals. Exemplarily, the sensor judges the received data once every 1 second to detect whether an alarm needs to be triggered. The control node checks the status data every 5 seconds to determine whether the control parameters need to be adjusted. The secondary master-slave node communication cycle refers to the time interval for a complete data exchange between the master node and the slave node. This includes the entire cycle from the master node sending a request to the slave node responding. A single communication cycle determines the frequency of data exchange between the master node and the slave node. For example, the master node requests data from the slave node at regular intervals and waits for a response. This cycle affects the degree of data synchronization between the master and slave nodes. If the cycle is shorter, the system can exchange data more frequently and maintain better synchronization. Exemplarily, the master node requests status data from the slave node every 10 seconds, and the slave node responds immediately after receiving the request. The master node requests data from multiple slave nodes every minute, and each slave node sends a response in turn after the request arrives. If the data update cycle is 100ms and the communication cycle of the master and slave nodes is 30ms, then one data judgment cycle of the master and slave nodes includes 3 (100 / 30 is an integer) master and slave node communication cycles.
[0086] Step 103: Obtain the first communication result of each slave node in each master-slave node communication cycle one by one, substitute the first communication result into the PS index calculation formula and the PDR index calculation formula, and generate the first PS index result and the first PDR index result of each slave node.
[0087] In one embodiment, the step of obtaining the first communication result of each slave node in each master-slave node communication cycle one by one, substituting the first communication result into the PS indicator calculation formula and the PDR indicator calculation formula, and generating the first PS indicator result and the first PDR indicator result of each slave node specifically includes: obtaining the first communication result of each slave node in each master-slave node communication cycle in a single data evaluation process; wherein the data evaluation process includes a plurality of data judgment cycles; when it is detected that the first communication result of the slave node in a plurality of master-slave node communication cycles within the data judgment cycle is a failure, the expressions of the PS indicator calculation formula and the PDR indicator calculation formula are:
[0088]
[0089] PDR = 100%;
[0090] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; and m is the number of data judgment cycles included in a data judgment process.
[0091] In the embodiment of the present invention, it is assumed that there are m data judgment cycles in a complete data evaluation process (one data judgment cycle includes three consecutive master-slave node communication cycles for illustration). If there are n master-slave node communication cycles (the above n communication failure cycles are not consecutive) in which data upload fails from node i in a complete data evaluation process, that is, the first communication result is a failure, then the PS of a single node is: PSi=1-n / (3*m), PDR=100%.
[0092] As an optimization scheme of an embodiment of the present invention, in one embodiment, when it is detected that the slave node has a first communication result of several master-slave node communication cycles within the data judgment cycle as failed, it also includes: determining whether there are consecutive failed master-slave node communication cycles within the master-slave node communication cycle with the first communication result as failed; when the consecutive failed master-slave node communication cycles reach a preset number, the expressions of the PS indicator calculation formula and the PDR indicator calculation formula are updated as follows:
[0093]
[0094]
[0095] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0096] Assume that there are m data judgment cycles in a complete data evaluation process (one data judgment cycle includes three consecutive master-slave node communication cycles for illustration). If there are n master-slave node communication cycles (among the above n communication failure cycles, there are a three consecutive cycles) in which data upload fails from node i in a complete data evaluation process, that is, the first communication result is failure, then the PS of a single node is: PSi = 1-n / (m*3); PDR = 1-a / m.
[0097] Step 104: Generate a master-slave node communication quality evaluation result of the communication system based on the first PS indicator result and the first PDR indicator result.
[0098] In one embodiment, the communication quality evaluation result of the master-slave node of the communication system is generated based on the first PS indicator result and the first PDR indicator result, specifically including: if there is a complete data exchange between the master node and each of the slave nodes in the current data judgment cycle, then the current first PDR indicator result of the communication system is determined to be 100%; when the communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, the first communication result of the master-slave node communication cycle is determined to be a communication failure; when the number of data judgment cycles included in a single data judgment process has several data judgment cycles with incomplete communication data, the expression of the PDR indicator calculation formula of the communication system is:
[0099]
[0100] Wherein, x is the number of master-slave node communication periods included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0101] For the communication system, if a complete communication between the master and slave nodes can be completed within each data judgment cycle, the current system PDR can be considered to be 100%. A data exchange between the slave node and the master node can usually be considered as a complete communication between the master and slave nodes. This "complete communication" usually includes the following steps: data request, response reception, data response and confirmation reception. If there are a data judgment cycle of incomplete master-slave node communication data within m data judgment cycles, the current communication system PDR can be considered to be 1-a / m.
[0102] In one embodiment, when the communication data between the master node and any slave node within the master-slave node communication cycle is incomplete, determining the first communication result of the master-slave node communication cycle is a communication failure, and also includes: obtaining the first communication result of each master-slave node communication cycle within a single data judgment cycle; if the first communication result of each master-slave node communication cycle within the data judgment cycle is a communication failure, determining that the master-slave node communication of the data judgment cycle has failed.
[0103] In the embodiment of the present invention, if the first communication results of each of the master-slave node communication cycles in a single data judgment cycle are all communication failures (or when the communication data are all incomplete), it is determined that the master-slave node communication in the data judgment cycle has failed. And in each master-slave node communication cycle in the data judgment cycle, any slave node with which the master node fails to communicate is counted as a master-slave node communication failure in the current communication cycle.
[0104] See also Figure 3 , Figure 3A schematic diagram of a master-slave node communication method provided in one embodiment of the present invention. Figure 3 An example of a communication quality assessment method provided in an embodiment of the present invention is provided. The communication system includes a master node and three slave nodes. A data judgment process includes 4 data judgment cycles. Each data judgment cycle includes 3 master-slave node communication cycles. The master-slave node communication cycles in which the communication fails are marked in red. Based on a communication quality assessment method provided in an embodiment of the present invention, there are 2 communication cycle anomalies and 0 data judgment cycle anomalies in slave node 1. Then the PS of slave node 1 is 1-2 / (4*3)=83.33%; PDR=1-0 / 4=100%. There are 4 communication cycle anomalies and 1 data judgment cycle anomaly in slave node 2. Then the PS of slave node 2 is 1-4 / (4*3)=66.67%; PDR=1-1 / 4=75%. For further information, see Figure 4 It can be seen that the data communication between the master and slave nodes failed in the second data judgment cycle and the third data judgment cycle. In each communication cycle in the second data judgment cycle, there is a slave node that fails to communicate with the master node; in the third data judgment cycle, slave node 2 fails to communicate with the master node for three consecutive times, then the PDR of the communication system = 1-2 / 4 = 50%. It should be noted that the calculation method described in the above example is based on the calculation that the master and slave nodes must communicate successfully in each master-slave node communication cycle. If it is based on the judgment method in the traditional data quality assessment scheme that the master-slave node communication in the data judgment cycle is normal as long as the communication data between the master and slave nodes is complete, then the PDR of the communication system = 1-1 / 4 = 75%.
[0105] The obtained first PS indicator result of each node and the first PDR indicator result, and the PDR indicator result of the communication system are used as the communication quality evaluation results of the master and slave nodes of the communication system in this data judgment process.
[0106] In an embodiment of the present invention, a communication quality assessment 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 communication quality assessment method is implemented.
[0107] 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 executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned communication quality evaluation method.
[0108] Exemplarily, the computer program can 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 can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the communication quality assessment device.
[0109] The communication quality assessment device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The communication quality assessment device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of the communication quality assessment device and do not constitute a limitation on the communication quality assessment device. The communication quality assessment device may include more or fewer components than the components, or a combination of certain components, or different components. For example, the communication quality assessment device may also include input and output devices, network access devices, buses, and the like.
[0110] 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 gate 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 communication quality assessment device, and uses various interfaces and lines to connect various parts of the entire communication quality assessment device.
[0111] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the communication quality assessment 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, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), 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.), 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.
[0112] Wherein, if the module based on the communication quality assessment 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. Wherein, 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.
[0113] An embodiment of the present invention provides a communication quality assessment method, which divides the data judgment cycle into several master-slave node communication cycles, allowing the latest communication results to be obtained within a controllable time range. This dynamicity allows the system to evaluate the quality of communication in real time under different load conditions and network conditions. By obtaining the first communication result of each communication cycle one by one, the system can track and record the communication performance of each cycle in real time. This allows problems to be discovered and solved in a timely manner, avoiding problems from being covered up in long-term monitoring. Using both PS and PDR evaluation indicators can more comprehensively reflect the communication quality between master and slave nodes. PS is only a single success rate indicator and cannot fully evaluate the performance of the network. PDR supplements the consideration of data packet delivery, helps to identify problems such as packet loss or retransmission, and improves the accuracy of communication quality assessment.
[0114] Example 2
[0115] See also Figure 4 , Figure 4 The module diagram of a communication quality evaluation device provided in one embodiment of the present invention is as follows. The present invention provides a communication quality evaluation device, including: an instruction sending module 201, a cycle division module 202, an index calculation module 203 and a communication judgment module 204;
[0116] The instruction sending module 201 is used to control the master node to initiate a data request instruction to the slave nodes in the communication system, so that the slave nodes reply with data response instructions in sequence based on the received data request instructions;
[0117] The cycle division module 202 is used to divide the data judgment cycle into a plurality of consecutive master-slave node communication cycles based on a single master-slave node communication cycle in the communication system; wherein the communication cycle is the time interval for a data exchange between the slave node and the master node;
[0118] The index calculation module 203 is used to obtain the first communication result of each of the master-slave node communication cycles one by one, substitute the first communication result into the PS index calculation formula and the PDR index calculation formula, and generate the first PS index result and the first PDR index result of each of the data judgment cycles;
[0119] The communication determination module 204 is used to generate a communication quality evaluation result of the master-slave node of the communication system based on the first PS indicator result and the first PDR indicator result.
[0120] In one embodiment, the instruction sending module is used to control the master node to initiate a data request instruction to the slave node in the communication system, so that the slave node replies with a data response instruction in sequence based on the received data request instruction, specifically including: pre-setting the response order of the slave node to reply to the data request instruction in the communication system; controlling the master node to cyclically initiate a data request instruction in the communication system; wherein the cyclicity is to initiate the data request instruction once every master-slave node communication cycle; controlling the slave node in the communication system to reply to the data response instruction once according to the preset number of responses.
[0121] In one embodiment, the first communication result of each slave node in each master-slave node communication cycle is obtained one by one, and the first communication result is substituted into the PS indicator calculation formula and the PDR indicator calculation formula to generate the first PS indicator result and the first PDR indicator result of each slave node, which specifically includes: obtaining the first communication result of each slave node in each master-slave node communication cycle in a single data evaluation process; wherein the data evaluation process includes a plurality of data judgment cycles; when it is detected that the first communication result of the slave node in a plurality of master-slave node communication cycles within the data judgment cycle is a failure, the expressions of the PS indicator calculation formula and the PDR indicator calculation formula are:
[0122]
[0123] PDR = 100%;
[0124] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; and m is the number of data judgment cycles included in a data judgment process.
[0125] In one embodiment, when it is detected that the slave node has a first communication result of several master-slave node communication cycles within the data judgment cycle that fails, it also includes: determining whether there are consecutive failed master-slave node communication cycles within the master-slave node communication cycle where the first communication result is failed; when the consecutive failed master-slave node communication cycles reach a preset number, the expressions of the PS indicator calculation formula and the PDR indicator calculation formula are updated as follows:
[0126]
[0127]
[0128] Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0129] In one embodiment, the communication quality evaluation result of the master-slave node of the communication system is generated based on the first PS indicator result and the first PDR indicator result, specifically including: if there is a complete data exchange between the master node and each of the slave nodes in the current data judgment cycle, then the current first PDR indicator result of the communication system is determined to be 100%; when the communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, the first communication result of the master-slave node communication cycle is determined to be a communication failure; when the number of data judgment cycles included in a single data judgment process has several data judgment cycles with incomplete communication data, the expression of the PDR indicator calculation formula of the communication system is:
[0130]
[0131] Wherein, x is the number of master-slave node communication periods included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
[0132] In one embodiment, when the communication data between the master node and any slave node within the master-slave node communication cycle is incomplete, determining the first communication result of the master-slave node communication cycle is a communication failure, and also includes: obtaining the first communication result of each master-slave node communication cycle within a single data judgment cycle; if the first communication result of each master-slave node communication cycle within the data judgment cycle is a communication failure, determining that the master-slave node communication of the data judgment cycle has failed.
[0133] 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.
[0134] An embodiment of the present invention provides a communication quality assessment device, which divides the data judgment cycle into several master-slave node communication cycles, allowing the latest communication results to be obtained within a controllable time range. This dynamicity allows the system to evaluate the quality of communication in real time under different load conditions and network conditions. By obtaining the first communication result of each communication cycle one by one, the system can track and record the communication performance of each cycle in real time. This allows problems to be discovered and solved in a timely manner, avoiding problems from being covered up in long-term monitoring. Using both PS and PDR evaluation indicators can more comprehensively reflect the communication quality between master and slave nodes. PS is only a single success rate indicator and cannot fully evaluate the performance of the network. PDR supplements the consideration of data packet delivery, helps to identify problems such as packet loss or retransmission, and improves the accuracy of communication quality assessment.
[0135] 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 communication quality assessment method, characterized in that: include: Control the master node to initiate a data request instruction to the slave nodes in the communication system, so that the slave nodes reply with data response instructions in sequence based on the received data request instructions; Based on a single communication cycle of a master-slave node in the communication system, the data judgment cycle is divided into a plurality of consecutive master-slave node communication cycles; wherein the communication cycle is a time interval for a data exchange between a slave node and a master node; Obtaining the first communication result of each slave node in each master-slave node communication cycle one by one, substituting the first communication result into the PS index calculation formula and the PDR index calculation formula, and generating the first PS index result and the first PDR index result of each slave node; A master-slave node communication quality evaluation result of the communication system is generated based on the first PS indicator result and the first PDR indicator result.
2. A communication quality assessment method as claimed in claim 1, characterized in that: The control master node initiates a data request instruction to the slave nodes in the communication system so that the slave nodes sequentially reply with data response instructions based on the received data request instructions, specifically including: Pre-setting a response order in the communication system for the slave nodes to reply to the data request instruction; Control the master node to cyclically initiate a data request instruction in the communication system; wherein the cyclicity is to initiate the data request instruction once every communication cycle between the master and slave nodes; The slave nodes in the communication system are controlled to reply to the data response instruction once according to the preset response times.
3. A communication quality assessment method as claimed in claim 1, characterized in that: The step of obtaining the first communication result of each slave node in each master-slave node communication cycle one by one, substituting the first communication result into a PS index calculation formula and a PDR index calculation formula, and generating a first PS index result and a first PDR index result of each slave node specifically includes: Obtaining a first communication result of each slave node in each master-slave node communication cycle during a single data evaluation process; wherein the data evaluation process includes a plurality of data judgment cycles; When it is detected that the slave node has a first communication result of failure in several master-slave node communication cycles within the data judgment cycle, the PS index calculation formula and the PDR index calculation formula are expressed as follows: PDR = 100%; Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; and m is the number of data judgment cycles included in a data judgment process.
4. A communication quality assessment method as claimed in claim 3, characterized in that: When it is detected that the slave node has a first communication result of a plurality of master-slave node communication cycles within the data judgment cycle that fails, the method further includes: Determine whether there are consecutive failed master-slave node communication cycles within the master-slave node communication cycle in which the first communication result is failed; When the number of consecutive failed master-slave node communication cycles reaches a preset number, the expressions of the PS index calculation formula and the PDR index calculation formula are updated as follows: Wherein, i is any slave node in the communication system; n is the number of failed master-slave node communication cycles; x is the number of master-slave node communication cycles included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
5. A communication quality assessment method as claimed in claim 1, characterized in that: The generating the master-slave node communication quality evaluation result of the communication system based on the first PS indicator result and the first PDR indicator result specifically includes: If there is a complete data exchange between the master node and each of the slave nodes within the current data judgment cycle, it is determined that the current first PDR indicator result of the communication system is 100%; When communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, determining that the first communication result of the master-slave node communication cycle is a communication failure; When there are several data judgment cycles in which the communication data is incomplete in the number of data judgment cycles included in a single data judgment process, the PDR indicator calculation formula of the communication system is expressed as follows: Wherein, x is the number of master-slave node communication periods included in a single data judgment cycle; m is the number of data judgment cycles included in a data judgment process; a is the number of master-slave node communication cycles with x consecutive communication failures.
6. A communication quality assessment method as claimed in claim 5, characterized in that: When the communication data between the master node and any slave node in the master-slave node communication cycle is incomplete, determining that the first communication result of the master-slave node communication cycle is a communication failure, further comprising: Obtaining the first communication result of each master-slave node communication cycle within a single data judgment cycle; If the first communication result of each of the master-slave node communication cycles within the data determination cycle is a communication failure, it is determined that the master-slave node communication within the data determination cycle has failed.
7. A communication quality assessment device, characterized in that: include: Instruction sending module, cycle division module, index calculation module and communication judgment module; The instruction sending module is used to control the master node to initiate a data request instruction to the slave nodes in the communication system, so that the slave nodes reply with data response instructions in sequence based on the received data request instructions; The cycle division module is used to divide the data judgment cycle into a plurality of consecutive master-slave node communication cycles based on a single master-slave node communication cycle in the communication system; wherein the communication cycle is a time interval for a data exchange between a slave node and a master node; The index calculation module is used to obtain the first communication result of each of the master-slave node communication cycles one by one, substitute the first communication result into the PS index calculation formula and the PDR index calculation formula, and generate the first PS index result and the first PDR index result of each of the data judgment cycles; The communication judgment module is used to generate a master-slave node communication quality evaluation result of the communication system based on the first PS indicator result and the first PDR indicator result.
8. A communication quality assessment device as claimed in claim 7, characterized in that: The instruction sending module is used to control the master node to initiate a data request instruction to the slave node in the communication system, so that the slave node sequentially replies with a data response instruction based on the received data request instruction, specifically including: Pre-setting a response order in the communication system for the slave nodes to reply to the data request instruction; Control the master node to cyclically initiate a data request instruction in the communication system; wherein the cyclicity is to initiate the data request instruction once every communication cycle between the master and slave nodes; The slave nodes in the communication system are controlled to reply to the data response instruction once according to the preset response times.
9. A terminal device, characterized in that: The invention comprises 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 communication quality assessment method according to any one of claims 1 to 6 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 executed, the device where the computer-readable storage medium is located is controlled to execute the communication quality assessment method according to any one of claims 1 to 6.
Citation Information
Cited By
EtherCAT real-time performance improving method and system, storage medium and program product
CN120848442A
Communication quality assessment method and apparatus, and terminal device and storage medium
WO2026092436A1