WO2022198927A1 - 一种针对短距离单线信号传输软件的检测方法及装置 - Google Patents

一种针对短距离单线信号传输软件的检测方法及装置 Download PDF

Info

Publication number
WO2022198927A1
WO2022198927A1 PCT/CN2021/116412 CN2021116412W WO2022198927A1 WO 2022198927 A1 WO2022198927 A1 WO 2022198927A1 CN 2021116412 W CN2021116412 W CN 2021116412W WO 2022198927 A1 WO2022198927 A1 WO 2022198927A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
test
slave
cycle
data packet
Prior art date
Application number
PCT/CN2021/116412
Other languages
English (en)
French (fr)
Inventor
王京京
底青云
杨永友
洪林峰
谢棋军
Original Assignee
中国科学院地质与地球物理研究所
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院地质与地球物理研究所 filed Critical 中国科学院地质与地球物理研究所
Publication of WO2022198927A1 publication Critical patent/WO2022198927A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Definitions

  • the present application relates to the technical field of drilling equipment, and in particular, to a detection method and device for short-distance single-wire signal transmission software.
  • the instrument string is composed of multiple node devices.
  • the data needs to be aggregated to the central control so that the central control can upload it to the ground control system.
  • the communication bus for mounting multiple node devices can only be single-wired.
  • the existing single-line signal transmission has problems such as complicated transmission process. Therefore, the applicant has previously proposed a single-line-based data transmission method and device, and its public document is CN112134772A. This solution solves the problem of the transmission process of single-line signal transmission. complicated question.
  • the embodiments of the present application provide a detection method and device for short-distance single-wire signal transmission software, so as to solve the technical problem of the lack of a single-wire data transmission method in the prior art.
  • an embodiment of the present application provides a detection method for short-distance single-wire signal transmission software, including: a first test node is connected to a communication bus as a master node; in a first communication sub-cycle, the first test node Receive the first data packet returned by the first slave node on the communication bus based on the data request instruction of the first slave node, and complete the test of the operation state of the first slave node based on the first data packet; A test node receives several data packets actively uploaded by all slave nodes on the communication bus, and based on several data packets, completes the test of any one or more of the following: communication timing operation status, priority relationship of slave nodes, The running state of the slave node; wherein, the first communication sub-cycle and the second communication sub-cycle together constitute a communication cycle.
  • the first test node receives the first data packet returned by the first slave node on the communication bus based on the data request instruction of the first slave node, and based on the first data packet package to complete the test of the running state of the first slave node, specifically including: the first test node sends the first slave node data request instruction to the first slave node on the communication bus in the first time slot of the first communication sub-cycle ; In the first response time interval of the second time slot of the first communication sub-cycle, according to whether the potential of the slave node on the communication bus is converted from the first preset potential to the second preset potential, determine the response node, and based on The responding node determines whether the running state of the first slave node is abnormal; if it is determined that there is one responding node, within the first upload time interval of the second time slot of the first communication sub-cycle, the first data returned by the responding node is received. packet, and based on the first data packet, determine whether the first data packet returned by the first slave node on the communication bus based on
  • the transmission detection circuit determines whether the potential of the slave node on the communication bus is converted from the first preset potential to the second preset potential; within the first response time interval of the second time slot of the first communication sub-cycle, the communication bus In the case that the potential of no slave node is converted from the first preset potential to the second preset potential, it is determined that there is no responding node on the communication bus, and it is determined that the first slave node is in an abnormal operating state.
  • judging whether the operating state of the first slave node is normal based on the first data packet specifically includes: performing a correctness check on the first data packet to determine whether the first data packet is the first slave node.
  • the data packet returned by the node and determine whether the first data packet is an empty packet or a data packet with a problem in content; and determine whether the encoding end bit of the first data packet is a split mark or an end mark; when the first data packet is not the first data packet A data packet returned by the slave node, or the first data packet is an empty packet or a data packet with content problems, or the end bit of the first data packet is not an end mark or a split mark, determine the first slave node
  • the operating status is abnormal.
  • the first test node receives several data packets actively uploaded by all slave nodes on the communication bus, and based on the several data packets, completes any one of the following Item or multiple tests: communication timing operation status, priority relationship of slave nodes, slave node operation status, specifically including: in the second communication sub-cycle, the first test node receives all data uploaded by slave nodes on the communication bus and/or based on the content of the corresponding data packets uploaded by each slave node in several data packets, determine whether the communication timing is normal or not Whether the running state of the node is normal; and/or based on the sequence of uploading data packets from each slave node in several data packets and the preset priority relationship, judging whether the priority relationship of the slave node is normal.
  • the method further includes: in the third time slot of the second communication sub-cycle, the first test node sends an inquiry command to all slave nodes; in the fourth time slot of the second communication sub-cycle In the fifth time slot of the second communication sub-cycle, the received return value is the first return value.
  • the embodiments of the present application also provide another detection method for short-distance single-wire signal transmission software, including: several test nodes are connected to the communication bus as slave nodes; The test node sends a second test data packet to the master node based on the second test node data request instruction sent by the master node, and completes the test of the slave node operating state identification function of the master node based on the second test data packet; in the second communication In the sub-cycle, several test nodes actively send test data packets to the master node, and complete the test of any one or more of the following functions based on several test data packets: The node's slave node operation state identification function and the master node's communication sequence operation state identification function; wherein, the first communication sub-cycle and the second communication sub-cycle together constitute a communication cycle.
  • the second test node in the first communication sub-cycle, sends a second test data packet to the master node based on the second test node data request instruction sent by the master node, and based on the second test node
  • the data packet completes the test of the identification function of the slave node running state of the master node, which specifically includes: the second test node receives the second test node data request instruction sent by the master node in the first time slot of the first communication sub-cycle, and in the first During the first response time interval of the second time slot of a communication sub-cycle, only the second test node is determined as the responding node; during the first upload time interval of the second time slot of the first communication sub-cycle, the second test node Based on the second test node data request instruction, send the correct second test data packet to the master node; after the master node determines the correctness of the correct second test data packet, the second test node determines the master node's slave node operating status identification
  • the function is normal; or, within
  • the method further includes: in the first communication sub-period In the first response time interval of the second time slot of the period, it is determined that there is no responding node on the communication bus; when the master node determines that the second test node is in an abnormal operating state, it is determined that the slave node operating state identification function of the master node is normal.
  • test nodes actively send test data packets to the master node, and based on several test data packets, complete the test of any one or more of the following functions Test: the function of identifying the priority relationship of the slave nodes of the master node, the function of identifying the running status of the slave nodes of the master node, and the function of identifying the operation status of the communication sequence of the master node.
  • the priority relationship of the master node sends a test data packet to the master node, and when it is determined that the master node can identify the slave node priority relationship as abnormal, it is determined that the slave node priority relationship identification function of the master node is normal; and/or several test nodes are Upload the test data packet to the master node in the fifth time slot; if the second test node does not upload the test data packet to the master node in its corresponding fifth time slot, the master node can ignore the second test node, and in the fifth time slot.
  • the fifth time slot corresponding to the three test nodes continues to receive the test data packets uploaded by the third test node, it is determined that the slave node operating status identification function of the master node is normal; and/or the second test node uploads the second test data packet to the master node.
  • the time of the test data packet is longer than the fifth time slot; in the case that the master node determines that the communication sequence operation status is abnormal and jumps to the next first communication sub-cycle, it is determined that the communication sequence operation status recognition function of the master node is normal;
  • Five timeslots are the threshold time for any test node to upload test packets to the master node.
  • the embodiments of the present application also provide a detection device for short-distance single-wire signal transmission software, including: a slave node operating state detection module and a function detection module; when the test device is connected to a communication bus as a master node;
  • the slave node running state detection module is used for, in the first communication sub-cycle, the first test node receives the first data packet returned by the first slave node on the communication bus based on the data request instruction of the first slave node, and based on the first data packet , to complete the test of the running state of the first slave node;
  • the function detection module is used for the first test node to receive several data packets actively uploaded by all slave nodes on the communication bus in the second communication sub-cycle, and based on several data packets Data package, complete the test of any one or more of the following: communication timing operation status, priority relationship of slave nodes, slave node operation status; wherein, the first communication sub-cycle and the second communication sub-cycle together constitute a communication cycle .
  • the embodiments of the present application also provide another detection device for short-distance single-wire signal transmission software, including: a slave node operating state detection module and a function detection module; when the test device is connected to the communication bus as a slave node ;
  • the slave node operating state detection module is used for in the first communication sub-cycle, the second test node obtains an instruction based on the second test node data sent by the master node, sends the second test data packet to the master node, and based on the second test node
  • the data packet completes the test of the identification function of the slave node operating state of the master node;
  • the function detection module is used for several test nodes to actively send test data packets to the master node in the second communication sub-cycle, and based on several test data packets , and complete the test of any one or more of the following functions: the function of identifying the priority relationship of the slave nodes of the master node, the function of identifying the operating status of the slave nodes of the master node, and the function
  • a detection method and device for short-distance single-wire signal transmission software provided by the embodiments of the present application, by connecting the test node as the master node on the communication bus, realizes the test of the slave node; and by connecting the test node as the slave node On the communication bus, the test of the master node is realized, so as to realize the test process of the equipment string in the drilling operation.
  • the entire testing process is adapted to the previously self-developed single-line data transmission method, which solves the technical problem of the lack of a single-line data transmission method in the prior art, ensures the practicability of the test method, and at the same time The accuracy of the test results is guaranteed.
  • Figure 1 is a flow chart of a self-developed short-distance single-wire data transmission protocol
  • Figure 2 is a schematic diagram of the operating cycle of the master node in the self-developed short-distance single-wire data transmission protocol
  • FIG. 3 is a schematic diagram of a connection relationship of a single-line node device according to an embodiment of the present application
  • FIG. 4 is a flowchart of a detection method for short-distance single-wire signal transmission software provided by an embodiment of the present application
  • FIG. 5 is a structural diagram of a detection device for short-distance single-wire signal transmission software provided by an embodiment of the present application
  • FIG. 6 is a structural diagram of another detection device for short-distance single-wire signal transmission software according to an embodiment of the present application.
  • one communication period of the master node is T, and as shown in FIG. 2 , the communication period T is divided into a first communication sub-period T1 and a second communication sub-period T2.
  • the master node sends the instruction information of data transmission to the slave node of the instrument through the communication bus, and enters the receiving mode; the slave node of the instrument judges whether it needs to send data according to the instruction information of data transmission; if the slave node of the instrument judges When the data needs to be sent out, the data is sent to the master node through the communication bus. Then, the master node judges whether the received data times out, if not, it continues to receive data; if it times out, the second communication sub-cycle T2 is performed.
  • the master node is in the receiving mode, and the instrument slave node transmits the data through the communication bus according to the preset instrument slave node priority, the potential situation of the bus and the data status of other instrument slave nodes. are sent to the master node in turn.
  • the instrument slave node in the first communication sub-cycle T1, using the master node control mode, the instrument slave node will not actively transmit data, but the data of each instrument slave node on the communication bus is periodically polled by the master node for transmission; In the second communication sub-period T2, the slave node of the instrument can actively send data to the master node to complete single-line data transmission.
  • Embodiments of the present application provide a detection method and device for short-distance single-wire signal transmission software to solve the above technical problems. It should be noted that the connection relationship of each instrument node equipment in the drilling operation is shown in FIG. 3 .
  • FIG. 3 is a schematic diagram of a connection relationship between node devices on a single line according to an embodiment of the present application. As shown in Fig. 3, node 1, node 2, ..., and node m are connected in series, that is, each drilling instrument or drilling equipment is connected on a communication bus in the form of nodes.
  • FIG. 4 is a flowchart of a detection method for short-distance single-wire signal transmission software provided by an embodiment of the present application. As shown in Figure 4, the test method in the embodiment of the present application mainly includes the following steps:
  • Step 401 Determine whether the test node is connected to the communication bus as a master node.
  • the test equipment is used as the test node i and other nodes are connected in series on the communication bus, so as to realize the test process of the master node or the slave node .
  • one test device is taken as the master node to be connected to the communication bus; when the master node is tested, several test devices are taken as slave nodes to be connected to the master node to be tested. on the communication bus.
  • test node i determines whether the test node i is connected to the communication bus as a master node or is connected to the communication bus as a slave node. Then, if the test node i is connected to the communication bus as a master node, the test node i can test the slave nodes connected to the communication bus; if the test node i is connected to the communication bus as a slave node, then The master node connected to the communication bus can be tested.
  • the specific testing process is described in the following steps.
  • Step 402 The first test node receives the first data packet returned by the first slave node on the communication bus based on the data request instruction of the first slave node, and completes the test of the running state of the first slave node based on the first data packet.
  • the first test node i1 After determining that the first test node i1 is connected to the communication bus as the master node, the first test node i1 starts to test a slave node on the communication bus within the first communication sub-cycle T1. It should be noted that, in this embodiment of the present application, the first test node i1 may complete the test on all slave nodes in sequence starting from the first slave node, or may start from any slave node and perform tests on all slave nodes in a non-fixed test order. The test is not limited in this application.
  • first the first test node i1 sends the first slave node data request instruction to the first slave node, and receives the first slave node data request instruction returned by the slave node based on the first slave node data request instruction. A data packet, and then complete the function test of the slave node.
  • the first test node i1 performs a running state test on the first slave node.
  • the specific process is as follows:
  • the first test node i1 sends the first slave node data request instruction to the first slave node on the communication bus in the first time slot t1 of the first communication sub-cycle T1; in the second time slot t2 of the first communication sub-cycle T1 During the first response time interval tw1, the response node is determined according to whether the potential of the slave node on the communication bus is converted from the first preset potential to the second preset potential. The response node is determined by the potential condition of the slave node on the communication bus; the potential condition of the slave node can be detected according to the data transmission detection circuit.
  • the first slave node receives the first slave node data request instruction in the first time slot t1 of the first communication sub-cycle T1
  • the first response time interval tw1 in the second time slot t2 of the first communication sub-cycle T1 In the case where the potentials of the slave nodes can be converted from the first preset potential to the second preset potential, the slave nodes whose potentials are converted from the first preset potential to the second preset potential are determined as the response nodes.
  • the first communication sub-period T1 is composed of the first time slot t1 and the second time slot t2; the second time slot t2 is composed of the first response time interval tw1 and the first upload time interval tpn1.
  • the first test node i1 also needs to record the response time from the first response time interval tw1 until the potential of the response node is converted from the first preset potential to the second preset potential. It should be noted that the response time is the basis for judging whether the responding node responds with a delay.
  • a preliminary judgment is made on the running state of the first slave node based on the determined response node. If the first slave node receives the first slave node data request instruction in the first time slot t1 of the first communication sub-cycle T1, the first response time interval tw1 in the second time slot t2 of the first communication sub-cycle T1 In the case where the potential of only one slave node on the communication bus is converted from the first preset potential to the second preset potential, it is preliminarily judged that the operating state of the first slave node is normal; if the first slave node is in the first communication sub-cycle T1 After receiving the first slave node data request instruction within the first time slot t1 of the In a case where the first preset potential is converted to the second preset potential, or the potential response of the slave node on the communication bus is delayed (that is, within the first upload time interval tnp1, the slave node on the communication bus is The potential is converted from the first
  • the first test node i1 receives the first data packet returned from the node corresponding to the above-mentioned potential conversion from the first preset potential to the second preset potential, and performs a correctness check on the first data packet;
  • the correctness check specifically includes: parsing the first data packet, determining whether the first data packet is a data packet returned by the first slave node, and judging whether the first data packet is an empty packet or a data packet with problematic content, and judging whether the first data packet is a data packet returned by the first slave node.
  • the encoding end bit of the data packet is a splitting mark or an end mark; after parsing, if the first data packet is the data packet returned by the first slave node, and is not an empty packet or a data packet with no problem in content, and the first data packet is The end bit of is the end flag or the split flag, then it is determined that the first data packet is correct.
  • the data packets with content problems can be data packets with garbled characters, missing data or problems in the format; it should also be noted that the data packets contain the unique ID number corresponding to the slave node, so , after analyzing the first data packet, it can be determined whether it is the data packet returned by the first slave node based on the ID number in the first data packet.
  • the first data packet is not the data packet returned by the first slave node, or the first data packet is an empty packet or a data packet with problematic content, or the end bit of the first data packet is not an end mark or a split mark, then determine the first data packet. A packet error. It should also be noted that the end bit of the data packet indicates whether there is an abnormality in a slave node or whether it has the splitting function when the data packet is too large. If the data packet is too large, and the larger data packet cannot be split and sent, it means that the slave node is in an abnormal operating state. If the first data packet is correct, it is determined that the first slave node is running normally, and the test of the second communication sub-cycle T2 is continued; if the first data packet is wrong, it is determined that the first slave node is abnormal.
  • the refusal to receive a response based on Delay the corresponding slave node since it cannot be ruled out that none of the potentials of the slave nodes on the communication bus are converted from the first preset potential to the second preset potential due to the mutual influence between the slave nodes, or the potential response of the slave nodes on the communication bus is delayed, therefore, It cannot be determined whether the first slave node is in an abnormal running state, or the test of the first slave node is abnormal due to the abnormal running state of other slave nodes.
  • a one-to-one test is performed on the first slave node.
  • a one-to-one test only the test node and the tested node can occupy the bus, so the influence of other nodes can be excluded.
  • the one-to-one test on the first slave node is divided into the following three verification situations:
  • the first test node i1 sends the first slave node data request instruction to the first slave node; the first test node i1 records the first slave node self-received first slave node data request instruction after sending, to the first slave node.
  • the response time for the potential of the first slave node to be converted from the first preset potential to the second preset potential if the first test node i1 has not received the response from the first slave node that the potential is converted from the first preset potential to the second preset potential, It is determined that the running state of the first slave node is abnormal.
  • the test node sends the first slave node data request instruction to the first slave node; the first test node i1 records the first slave node self-received first slave node data request instruction after sending, and the potential to the first slave node is given by The response time for converting the first preset potential to the second preset potential, if the response time of the first test node i1 is less than the second time slot t2 of the first communication sub-period T1, it is determined that the first slave node responds normally, and there are other The slave node responds abnormally.
  • the first test node i1 first continues to receive the first data packet returned by the first slave node based on the data request instruction of the first slave node, and judges whether the first data packet is correct. 1.
  • the running state of the slave node is abnormal; if it is judged that the first data packet is correct, it is determined that the running state of the first slave node is normal.
  • the first test node i1 sends the first slave node data request instruction to the first slave node; the first test node i1 records the first slave node self-received first slave node data request instruction after sending, to the first slave node. If the response time of the first slave node is greater than the second time slot t2 of the first communication sub-period T1, it is determined that the first slave node is in an abnormal operating state. At this time, the first test node i1 first continues to receive the first data packet returned by the first slave node based on the data request instruction of the first slave node, and judges whether the first data packet is correct. 1. The running state of the slave node is abnormal; if it is judged that the first data packet is correct, it is determined that the running state of the first slave node is normal.
  • this application since it is not certain whether there is a slave node with abnormal running status in other slave nodes, or it is determined that there is a slave node with abnormal running status in other slave nodes but it is not sure which one is, therefore, this application implements For example, after the one-to-one test on the first slave node, the one-to-one test based on the first data fetching instruction is performed on all other slave nodes.
  • the command potential is converted from the first preset potential to the second preset potential, or if there are all other slave nodes requesting the command potential based on the first data by the first preset potential If the potential is converted to the second preset potential and a data packet is returned, it means that the node is in an abnormal operating state. After a one-to-one test based on the first data fetching instruction is performed on all other slave nodes, a slave node with an abnormal running state is reported.
  • the first test node i1 if the first test node i1 has not finished receiving the first data packet after the second time slot t2 of the first communication sub-period T1 ends, it is determined that the communication sequence operating status of the device is abnormal. After finishing receiving the first data packet, check the correctness of the first data packet; in the case that the first data packet is correct, determine that the first slave node is in a normal operating state, report that the communication sequence operating state is abnormal, and jump to the first slave node.
  • Two tests of the communication sub-cycle T2 in the case of an error in the first data packet, it is determined that the running state of the first slave node is abnormal, and the first test node i1 reports that the running state of the communication sequence is abnormal, and reports that the running state of the first slave node is abnormal.
  • the first test node i1 receives the first data returned by the first slave node based on the first slave node data request instruction
  • the second time slot t2 After receiving the second data packet sent by the second slave node (for example, the second time slot t2 has ten seconds, after the first data packet returned by the first slave node, the second time slot t2 is also There are five seconds, in the remaining five seconds of the second time slot t2, the second slave node responds and returns the second data packet), it is determined that the running state of the second slave node is abnormal; then, the first test node i1 checks the first slave node. The nodes perform a one-to-one test, and the second slave node performs a one-to-one test based on the data fetch instruction of the first slave node.
  • the first test node i1 reports that the running state of the second slave node is abnormal; if it is judged that the running state of the first slave node is abnormal, the first test node i1 reports that the running state of the first slave node is abnormal, The running state of the second slave node is abnormal, and a one-to-one test result of the second slave node requesting an instruction based on the data of the first slave node is reported.
  • the one-to-one test result based on the first slave node data request instruction includes: based on the first slave node data request instruction, the second slave node potential is not converted from the first preset potential to the second preset potential.
  • the second slave node potential is converted from the first preset potential to the second preset potential and the second data packet returned is wrong, based on the first slave node data request instruction
  • the second slave node potential is determined by The first preset potential is converted to the second preset potential and the returned second data packet is correct, based on the first slave node data request instruction
  • the second slave node responds with a delay and the returned second data packet is wrong, based on the first slave node data
  • the response of the second slave node for requesting an instruction is delayed and the second data packet returned is correct.
  • the above-mentioned second slave node may be a slave node at any position on the communication bus, and is not necessarily the second slave node in the order bit.
  • the first test node i1 in the second time slot t2 of the first communication sub-period T1, if the first test node i1 first receives the second data request instruction sent by the second slave node based on the first slave node In the case of receiving the first data packet returned by the first slave node, it is determined that the running state of the second slave node is abnormal. Then, the first test node i1 performs a one-to-one test on the first slave node, and performs a one-to-one test on the second slave node based on the data fetching instruction of the first slave node.
  • the first test node i1 reports that the running state of the second slave node is abnormal, and reports the one-to-one test result of the second slave node requesting an instruction based on the data of the first slave node;
  • the first test node i1 reports that the first slave node runs abnormally, the second slave node runs abnormally, and reports the one-to-one test result of the second slave node requesting an instruction based on the first slave node data.
  • the first test node i1 in the second time slot t2 of the first communication sub-period T1, if the first test node i1 receives the second data sent by the second slave node based on the data request instruction from the first slave node packet and the third data packet sent by the third slave node, and if the first data packet is not received, the first test node i1 conducts a one-to-one test on the first slave node, and tests the second slave node and the third slave node. The slave node performs a one-to-one test based on the first slave node data fetch instruction.
  • the first test node i1 reports that the running state of the second slave node is abnormal, the running state of the third slave node is abnormal, and reports that the second slave node obtains an instruction based on the data of the first slave node.
  • Step 403 The first test node receives several data packets actively uploaded by all slave nodes on the communication bus, and based on several data packets, completes the test of any one or more of the following: Priority relationship, running status of slave nodes.
  • the second communication sub-period T2 is divided into several sixth time slots t6 according to the number of slave nodes, wherein each sixth time slot t6 is composed of a second response time interval tw2 and a second time slot t6.
  • the upload time interval tnp2 is composed together. No matter what kind of data packet is uploaded from any slave node, it needs to respond within the corresponding second response time interval tw2, and the data upload is completed in the corresponding second upload time interval tnp2, otherwise it will jump to the next slave node.
  • the first test node i1 when the first test node i1 receives several data packets actively uploaded by all slave nodes on the communication bus, if the length of time required for each slave node to upload the corresponding data packet is within the corresponding sixth time In the time slot t6, it is determined that the communication sequence running state is normal; if the time required for any slave node to upload the corresponding data packet in each slave node is longer than the sixth time slot t6, it is determined that the communication sequence running state is abnormal. At this time, the first test node reports that the communication timing operation status is abnormal.
  • the correctness of the several data packets is checked to determine the correctness of each data packet.
  • the first test node i1 performs a one-to-one test based on the corresponding slave node data requesting instruction for the corresponding slave node in an abnormal operating state. If it is judged that the running state of the corresponding slave node is abnormal, the first test node reports that the running state of the corresponding slave node is abnormal. 1. Test the test process to find out the slave node with abnormal running state.
  • the first test node i1 after the first test node i1 receives several data packets actively uploaded by all the slave nodes on the communication bus, it is judged based on the order in which each slave node uploads the corresponding data packets whether it is in a preset priority relationship If the sequence of uploading the corresponding data packets from each slave node is the same as the preset priority relationship, it is determined that the priority relationship of the slave nodes is normal; the sequence of uploading the corresponding data packets from each slave node is the same as the preset priority relationship. In different cases, it is determined that the priority relationship of the slave node is abnormal, and at this time, the first test node reports that the priority relationship of the slave node is abnormal.
  • the second communication sub-period T2 may also be divided into a third time slot t3, a fourth time slot t4, and a fifth time slot t5; wherein, the third time slot t3 is used for the first test
  • the node i1 sends an inquiry command to all the slave nodes to ask all the slave nodes whether there are data packets that need to be uploaded
  • the fourth time slot t4 is used to receive the return value returned by all the slave nodes based on the inquiry command, wherein the return value has the first return value
  • the value is the second return value
  • the fifth time slot t5 is used to receive all the data packets uploaded by the slave nodes whose return value is the first return value from all the slave nodes.
  • the first test node i1 asks all slave nodes whether they have data; in the fifth time slot t5 of the second communication sub-cycle T2, the slave nodes that need to upload data packets Return the first return value to the first test node i1, and the slave node that does not need to upload data packets returns the second return value to the first test node i1 (for example, the first slave node needs to upload data packets, and the second slave node does not need to upload data packets.
  • the first slave node If the data packet needs to be uploaded, the first slave node returns '1' to the first test node i1, and the second slave node returns '0' to the first test node i1); the slave node that needs to upload the data packet returns the first return value Then, the first test node i1 counts these slave nodes, and divides the fifth time slot t5 into several upload time slots tpn according to the number of slave nodes that need to upload data packets; wherein, each upload time slot tpn It is composed of the third response time interval tw3 and the third upload time interval tnp3 together.
  • the potential of each slave node that needs to upload the data packet is converted from the first preset potential to the second preset potential to complete the response; the corresponding data packet is uploaded in the third upload time interval tnp3 . It should be noted that, in each third response time interval tw3, it is also necessary to record the time from the third response time interval tw3 to the completion of the conversion of the potential of the corresponding slave node from the first preset potential to the second preset potential.
  • a one-to-one test is performed on the slave nodes whose return value is the first return value in the fourth time slot t4 of the second communication sub-period T2. If it is judged that the running state of the slave nodes whose return value is the first return value is normal, the first test node i1 jumps to the next first communication sub-cycle T1, and continues to execute the test; if it is judged that the return value is the first return value The running state of the slave node is abnormal, and the first test node reports that the running state of the corresponding slave node is abnormal.
  • the first test node i1 traverses all slave nodes on the communication bus to test all slave nodes.
  • the first test node i1 completes the test on the slave node.
  • Step 404 The second test node sends a second test data packet to the master node based on the second test node data request instruction sent by the master node, and completes the test of the slave node operating state identification function of the master node based on the second test data packet .
  • test node i If it is determined that the test node i is not connected to the communication bus as a master node, then it is determined that the test node i is connected to the communication bus as a slave node.
  • Function test wherein, the first test node i1 may be one of several test nodes i.
  • any test node i2 (the second test node) is selected to test the master node's slave node operating state identification function on the master node. specifically:
  • the second test node i2 receives the second test node data request instruction sent by the master node in the first time slot t1 of the first communication sub-cycle T1; during the first communication sub-cycle T1 During the first response time interval tw1 of the second time slot t2, only the second test node is determined as the response node, that is, based on the data request instruction of the second test node, the potential of the second test node is converted from the first preset potential to the second preset potential Set the potential; within the first upload time interval tpn1 of the second time slot t2 of the first communication sub-period T1, the second test node i2 sends the correct second test data packet to the master node based on the second test node data request instruction Or the wrong second test data packet; in the case where the second test node i2 requests an instruction based on the second test node data and sends the correct second test data packet to the master node, if the master node can determine the correct second
  • the second test node i2 after the second test node i2 receives the second test node data request instruction sent by the master node in the first time slot t1 of the first communication sub-cycle T1, if the first communication sub-cycle During the first response time interval tw1 of the second time slot t2 of T1, based on the data request instruction of the second test node, the potential of the second test node is not converted from the first preset potential to the second preset potential, and the third test node The potential of i3 is converted from the first preset potential to the second preset potential (that is, the third test node i3 responds based on the second test node data request instruction); at the master node, it can be determined that the second test node is in an abnormal operating state and the third test node is in an abnormal state.
  • the running state of the third test node it is determined that the function of identifying the running state of the slave node of the master node is normal; when the master node cannot determine that the running state of the second test node is abnormal or the running state of the third test node is abnormal, determine the master node.
  • the function of identifying the running state of the slave node is abnormal.
  • the second test node i2 reports that the function of identifying the running state of the slave node of the master node is abnormal.
  • the second test node i2 after the second test node i2 receives the second test node data request instruction sent by the master node in the first time slot t1 of the first communication sub-cycle T1, if the second test node i2 automatically The first response time interval tw1 starts, and the time until the potential of the second test node i2 is converted from the first preset potential to the second preset potential is greater than the first response time of the second time slot t2 of the first communication sub-period T1 In the case of interval tw1, if the master node is within the first upload time interval tpn1 of the second time slot t2 of the first communication sub-cycle T1, it refuses to receive the second test node's request for data based on the second test node instruction, and sends to the master node.
  • the second test data packet of the master node determines that the slave node operating state identification function of the master node is normal; if the master node is within the first upload time interval tpn1 of the second time slot t2 of the first communication sub-period T1, The test node data request instruction, the second test data packet sent to the master node, determines that the slave node operating state identification function of the master node is abnormal. At this time, the second test node i2 reports that the slave node operating state identification function of the master node is abnormal.
  • the second test node i2 after the second test node i2 receives the second test node data request instruction sent by the master node in the first time slot t1 of the first communication sub-period T1, if the second test node i2 is in During the first response time interval tw1 of the second time slot t2 of the first communication sub-period T1, the potential of the second test node i2 has not been converted from the first preset potential to the second preset potential, and the master node determines the second potential.
  • abnormal running state of the test node i2 it is determined that the function of identifying the running state of the slave node of the master node is normal; when the master node cannot determine that the running state of the second test node i2 is abnormal, the function of identifying the running state of the slave node of the master node is determined. If it is abnormal, at this time, the second test node i2 reports that the function of identifying the running state of the slave node of the master node is abnormal.
  • the potential of the second test node i2 has not been converted from the first preset potential to the second preset potential, and also includes the third The potentials of the test node i3 and the second test node i2 are simultaneously converted from the first predetermined potential to the second predetermined potential. Due to the conflict of bus occupancy, the potential of the second test node i2 will not be converted from the first predetermined potential. is the case of the second preset potential.
  • Step 405 several test nodes actively send test data packets to the master node, and based on several test data packets, complete the test of any one or more of the following functions: the slave node priority relationship identification function of the master node, the master node The node's slave node operation status recognition function and the master node's communication timing operation status recognition function.
  • test nodes i in the second communication sub-period T2, several test nodes i (i2, i3...) send correct test data packets to the master node according to the wrong priority relationship;
  • the priority relationship can be any kind of priority relationship that is different from the priority relationship of the slave node, which is not limited in this application; in the case where it is determined that the master node can identify the priority relationship of the slave node as abnormal, determine the priority relationship of the master node.
  • the priority relationship identification function of the slave node is normal; if it is determined that the master node cannot identify the priority relationship of the slave node as abnormal, it is determined that the priority relationship identification function of the slave node of the master node is abnormal.
  • test nodes i (i2, i3...) send wrong test data packets to the master node according to the wrong priority relationship; after determining that the master node can identify the slave node priority relationship as abnormal , and the test data packets that can identify errors, so as to determine that when the operating state of the slave node is identified as abnormal, it is determined that the identification function of the priority relationship of the slave node of the master node and the identification function of the operating state of the slave node of the master node are normal; If the priority relationship of the slave node cannot be identified as abnormal, or the wrong test data packet cannot be identified, and the operating status of the slave node cannot be identified as abnormal, determine the slave node priority relationship identification function of the master node or the master node's priority relationship identification function.
  • the function of identifying the running state of the slave node is abnormal.
  • any one or more of the several test nodes i (i2, i3...) report the function of identifying the priority relationship of the slave node of the master node or the function of identifying the running state of the slave node of the master node. abnormal.
  • test nodes i in the second communication sub-period T2, several test nodes i (i2, i3...) all upload data packets to the master node in the seventh time slot t7; if the second test node i2 does not The data needs to be uploaded, so in the corresponding seventh time slot t7, no data packet is uploaded to the master node, if the master node can ignore the second test node i2, continue to receive the uploaded data from other slave nodes in the next seventh time slot t7 package, it is determined that the identification function of the slave node operating status of the master node is normal; otherwise, it is determined that the identification function of the slave node operating status of the master node is abnormal, and any one or more of the several test nodes i (i2, i3...) report the master node.
  • the function of identifying the running status of the slave node is abnormal.
  • several test nodes i (i2, i3...) have no data to upload, if the master node can jump to the next communication cycle, it is determined that the slave node operating status recognition function of the master node is normal; otherwise, It is determined that the function of identifying the running state of the slave node of the master node is abnormal.
  • any one or more of the several test nodes i (i2, i3...) report that the function of identifying the running state of the slave node of the master node is abnormal.
  • each seventh time slot t7 is composed of a fourth response time interval tw4 and a fourth upload time interval tnp4, and testing the uploading of data packets from the slave node requires Respond in the corresponding fourth response time interval tw4, and complete the data upload in the corresponding fourth upload time interval tnp4, otherwise jump to the next slave node.
  • the master node determines that the communication sequence is abnormal and jumps to the next first communicator In the case of a cycle, it is determined that the communication sequence operation status of the master node is normal; in the case that the master node cannot determine that the communication sequence operation status is abnormal and jumps to the next first communication sub-cycle, determine the communication sequence operation status of the master node.
  • the identification function is abnormal. At this time, any one or more of the several test nodes i (i2, i3 . . . ) report that the communication sequence operation status of the master node is abnormal in the identification function.
  • test nodes i (i2, i3%) have completed the test of the master node.
  • the embodiments of the present application also provide a detection device for short-distance single-wire signal transmission software, the internal structure of which is shown in FIG. 5 .
  • FIG. 5 is a structural diagram of a detection device for short-distance single-wire signal transmission software according to an embodiment of the present application.
  • the apparatus includes: a slave node running state detection module 501 and a function detection module 502 .
  • the slave node operating state detection module 501 is used for receiving the first slave node on the communication bus based on the first slave node in the first communication sub-cycle.
  • the function detection module 502 is used for the first test node to receive communication in the second communication sub-cycle All the slave nodes on the bus actively upload several data packets, and based on several data packets, complete the test of the communication timing operation status, the priority relationship of the slave nodes and the operation status of the slave nodes.
  • the embodiment of the present application also provides another detection device for short-distance single-wire signal transmission software, the internal structure of which is shown in FIG. 6 .
  • FIG. 6 is a structural diagram of another detection device for short-distance single-wire signal transmission software according to an embodiment of the present application.
  • the apparatus includes: a slave node running state detection module 601 and a function detection module 602 .
  • the slave node operation state detection module 601 is used for the second test node to obtain an instruction based on the second test node data sent by the master node in the first communication sub-cycle. , send the second test data packet to the master node, and complete the test of the slave node operating state identification function of the master node based on the second test data packet; the function detection module 602 is used for several tests in the second communication sub-cycle.
  • the node actively sends test data packets to the master node, and based on several data packets, completes the identification function of the master node's slave node priority relationship, the master node's slave node operation status identification function, and the master node's communication sequence operation status identification function. test.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Environmental & Geological Engineering (AREA)

Abstract

本申请公开了一种针对短距离单线信号传输软件的检测方法及装置,用以解决现有中缺少一种对短距离单线传输软件进行检测的方法的技术问题。方法包括:测试节点作为主节点在第一通信子周期内,接收从节点基于数据索取指令返回的数据包,以完成对从节点的功能测试;在第二通信子周期内接收从节点主动上传的数据包,以完成对从节点的功能测试;测试节点作为从节点在第一通信子周期内,基于主节点发送的数据索取指令向主节点发送测试数据包,以完成对主节点的功能测试;在第二通信子周期内,若干个测试从节点按照错误优先级关系向主节点发送测试数据包以完成主节点的功能测试。本申请通过上述方法实现了对短距离单线传输软件的检测过程。

Description

一种针对短距离单线信号传输软件的检测方法及装置 技术领域
本申请涉及钻井设备技术领域,尤其涉及一种针对短距离单线信号传输软件的检测方法及装置。
背景技术
钻井作业时,仪器串由多个节点设备组合在一起工作,过程中需要将数据汇总到中控,以便由中控上传至地面控制系统。由于空间限制,挂载多个节点设备的通信总线只能单线。但现有的单线信号传输存在着传输过程复杂等问题,因此,申请人之前研究提出了一种基于单线的传输数据方法及设备,其公开文件为CN112134772A,该方案解决了单线信号传输存在传输过程复杂的问题。
但到目前为止,还没有一种针对上述传输机制的安全可靠性的检测方案,而在钻井作业中对每个节点设备的安全可靠性检测是一个必要环节。
发明内容
有鉴于此,本申请实施例提供了一种针对短距离单线信号传输软件的检测方法及装置,用以解决现有技术中,缺少一种可以对单线的传输数据方法进行检测的技术问题。
第一方面,本申请实施例提供了一种针对短距离单线信号传输软件的检测方法,包括:第一测试节点作为主节点连接在通信总线上;在第一通信子周期内,第一测试节点接收通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于第一数据包,完成对第一从节点运行状态的测试;在第二通信子周期内,第一测试节点接收通信总线上的所有从节点主动上传的若干个数据包,并基于若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态;其中,第一通信子周期与第二通信子周期共同构成一个通信周期。
在本申请的一种实现方式中,在第一通信子周期内,第一测试节点接收通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于第一数据包,完成对第一从节点运行状态的测试,具体包括:第一测试节点在第一通信子周期的第一时隙内,向通信总线上的第一从节点发送第一从节点数据索取指令;在第一通信子周期的第二时隙的第一响应时间间隔内,根据通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位,确定响应节 点,并基于响应节点,判断第一从节点运行状态是否异常;在确定有一个响应节点的情况下,在第一通信子周期的第二时隙的第一上传时间间隔内,接收响应节点返回的第一数据包,并基于第一数据包,判断第一从节点运行状态是否正常;其中,第一时隙、第二时隙共同构成第一通信子周期;第一响应时间间隔、第一上传时间间隔共同构成第二时隙。
在本申请的一种实现方式中,在第一通信子周期的第二时隙的第一响应时间间隔内,根据通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位,确定响应节点,并基于响应节点,判断第一从节点运行状态是否异常,具体包括:在第一通信子周期的第二时隙的第一响应时间间隔内,第一测试节点通过数据传输检测电路,判断通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位;在确定第一通信子周期的第二时隙的第一响应时间间隔内,通信总线上没有从节点的电位由第一预设电位转换为第二预设电位的情况下,确定通信总线上没有响应节点,且确定第一从节点运行状态异常。
在本申请的一种实现方式中,基于第一数据包,判断第一从节点运行状态是否正常,具体包括:对第一数据包进行正确性检验,以判断第一数据包是否为第一从节点返回的数据包;以及判断第一数据包是否为空包或者内容存在问题的数据包;以及判断第一数据包的编码结束位是否为拆分标识或者结束标识;在第一数据包不是第一从节点返回的数据包,或者第一数据包为空包或者为内容存在问题的数据包,或者第一数据包的结束位不是结束标识或者不是拆分标识的情况下,确定第一从节点运行状态异常。
在本申请的一种实现方式中,在第二通信子周期内,第一测试节点接收通信总线上的所有从节点主动上传的若干个数据包,并基于若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态,具体包括:在第二通信子周期内,第一测试节点接收通信总线上的所有从节点上传的数据包,并基于若干个数据包中各从节点上传相应数据包所需时间长度判断通信时序运行状况是否正常;和/或基于若干个数据包中各从节点上传的相应数据包的内容,判断从节点的运行状态是否正常;和/或基于若干个数据包中各从节点上传数据包的顺序和预设的优先级关系,判断从节点的优先级关系是否正常。
在本申请的一种实现方式中,方法还包括:在第二通信子周期的第三时隙内,第一测试节点向所有从节点发送询问指令;在第二通信子周期的第四时隙内,接收所有从节点基于询问指令返回的返回值,其中,返回值为第一返回值或者第二返回值;在第二通信子周期的第五时隙内,接收返回值为第一返回值所对应从节点上传的数据包;基于上传的数据包,完成对返回值为第一返回值 所对应从节点的从节点运行状态测试;其中,第三时隙、第四时隙共同构成第二通信子周期;第三时间间隔、第四时间间隔共同构成第三时隙。
第二方面,本申请实施例还提供了另一种针对短距离单线信号传输软件的检测方法,包括:若干个测试节点作为从节点连接在通信总线上;在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向主节点发送第二测试数据包,并基于第二测试数据包完成对主节点的从节点运行状态识别功能的测试;在第二通信子周期内,若干个测试节点主动向主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能;其中,第一通信子周期与第二通信子周期共同构成一个通信周期。
在本申请的一种实现方式中,在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向主节点发送第二测试数据包,并基于第二测试数据包完成对主节点的从节点运行状态识别功能的测试,具体包括:第二测试节点在第一通信子周期的第一时隙内接收主节点发送的第二测试节点数据索取指令,在第一通信子周期的第二时隙的第一响应时间间隔内,仅确定第二测试节点为响应节点;在第一通信子周期的第二时隙的第一上传时间间隔内,第二测试节点基于第二测试节点数据索取指令,向主节点发送正确的第二测试数据包;在主节点确定正确的第二测试数据包的正确性之后,第二测试节点确定主节点的从节点运行状态识别功能为正常;或者,在第一通信子周期的第二时隙的第一上传时间间隔内,第二测试节点基于第二测试节点数据索取指令,向主节点发送错误的第二测试数据包;在主节点能够识别错误的第二测试数据包,并跳转到第二通信子周期的情况下,确定主节点的从节点运行状态识别功能为正常;其中,第一时隙、第二时隙共同构成第一通信子周期;第一响应时间间隔、第一上传时间间隔共同构成第二时隙。
在本申请的一种实现方式中,在第二测试节点在第一通信子周期的第一时隙内接收主节点发送的第二测试节点数据索取指令之后,方法还包括:在第一通信子周期的第二时隙的第一响应时间间隔内,确定通信总线上没有响应节点;在主节点确定第二测试节点运行状态异常的情况下,确定主节点的从节点运行状态识别功能为正常。
在本申请的一种实现方式中,在第二通信子周期内,若干个测试节点主动向主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能,具体包括:在第二通信 子周期内,若干个测试节点按照错误的优先级关系向主节点发送测试数据包,在确定主节点能够识别从节点优先级关系为异常的情况下,确定主节点的从节点优先级关系识别功能正常;和/或若干个测试节点均以第五时隙向主节点上传测试数据包;若第二测试节点在其对应的第五时隙内,没有向主节点上传测试数据包,在主节点能够忽略第二测试节点,并在第三测试节点对应的第五时隙继续接收第三测试节点的上传的测试数据包的情况下,确定主节点的从节点运行状态识别功能正常;和/或第二测试节点向主节点上传第二测试数据包的时间大于第五时隙;在主节点确定通信时序运行状况异常并跳转到下一个第一通信子周期的情况下,确定主节点的通信时序运行状况识别功能正常;其中,第五时隙为任意一个测试节点,向主节点上传测试数据包的阈值时间。
第三方面,本申请实施例还提供了一种针对短距离单线信号传输软件的检测装置,包括:从节点运行状态检测模块、功能检测模块;在测试装置作为主节点连接在通信总线上时;从节点运行状态检测模块,用于在第一通信子周期内,第一测试节点接收通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于第一数据包,完成对第一从节点运行状态的测试;功能检测模块,用于在第二通信子周期内,第一测试节点接收通信总线上的所有从节点主动上传的若干个数据包,并基于若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态;其中,第一通信子周期与第二通信子周期共同构成一个通信周期。
第四方面,本申请实施例还提供了另一种针对短距离单线信号传输软件的检测装置,包括:从节点运行状态检测模块、功能检测模块;在测试装置作为从节点连接在通信总线上时;从节点运行状态检测模块,用于在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向主节点发送第二测试数据包,并基于第二测试数据包完成对主节点的从节点运行状态识别功能的测试;功能检测模块,用于在第二通信子周期内,若干个测试节点主动向主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能;其中,第一通信子周期与第二通信子周期共同构成一个通信周期。
本申请实施例提供的一种针对短距离单线信号传输软件的检测方法及装置,通过将测试节点作为主节点连接在通信总线上,实现对从节点的测试;以及通过将测试节点作为从节点连接在通信总线上,实现对主节点的测试,以此实现对钻井作业中的设备串进行的测试过程。另外,整个的测试过程与之前自研的单线的传输数据方法相适配,解决了现有技术中缺少一种对单线的传输数 据方法进行测试的技术问题,保证了测试方法的实用性,同时保证了测试结果的准确性。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为一种自研的短距离单线数据传输协议流程图;
图2为自研的短距离单线数据传输协议中主节点运行周期示意图;
图3为本申请实施例提供的一种单线上节点设备连接关系示意图;
图4为本申请实施例提供的一种针对短距离单线信号传输软件的检测方法流程图;
图5为本申请实施例提供的一种针对短距离单线信号传输软件的检测装置结构图;
图6为本申请实施例提供的另一种针对短距离单线信号传输软件的检测装置结构图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
现有的单线数据传输方法或者过程,均较为复杂,不能适应多种工作场景。因此,申请人之前提出了一种自研的短距离单线数据传输协议,其公开文件为CN112134772A。数据传输协议的流程图如图1所示,且其主节点的运行周期如图2所示。
具体地,主节点的一个通信周期为T,并且如图2所示,通信周期T被划分为第一通信子周期T1,以及第二通信子周期T2。在第一通信子周期T1内,主节点通过通信总线向仪器从节点发送数据传输的指令信息,并进入接收模式;仪器从节点根据数据传输的指令信息判断是否需要发送数据;仪器从节点若判断出需要发送数据,将数据通过通信总线发送至主节点。然后,主节点判断接收数据是否超时,如果没有超时则继续接收数据;如果超时,则进行第二通信子周期T2。
进一步地,在第二通信子周期T2内,主节点进行接收模式,仪器从节点根据预先设定的仪器从节点优先级、总线的电位情况与其他仪器从节点的数据状态,将数据通过通信总线依次发送至主节点。
即,在第一通信子周期T1内,采用主节点控制模式,仪器从节点不会主动传输数据,是通过主节点周期性的轮询通信总线上的每个仪器从节点的数据进行传输;在第二通信子周期T2内,仪器从节点可以将数据主动发送至主节点,以完成单线的数据传输。
以上为申请人之前提出的一种单线数据传输机制的具体实现过程。现有技术中,缺少一种针对上述数据传输机制的软件测试方法,但在实际的钻井作业中,对仪器串上的各个仪器节点进行测试又是必不可少的一个环节。
本申请实施例提供了一种针对短距离单线信号传输软件的检测方法及装置,以解决上述技术问题。需要说明的是,钻井作业中的各个仪器节点设备的连接关系如图3所示。
图3为本申请实施例提供的一种单线上节点设备连接关系示意图。如图3所示,节点1、节点2、…、以及节点m串联在一起,即各个钻井仪器或者钻井设备以节点的形式连接在一根通信总线上。
下面通过附图对本申请实施例提出的技术方案进行详细的说明。
图4为本申请实施例提供的一种针对短距离单线信号传输软件的检测方法流程图。如图4所示,本申请实施例中的测试方法,主要包括以下步骤:
步骤401、判断测试节点是否作为主节点连接在通信总线上。
本申请实施例提出的针对钻井作业中的短距离单线数据传输的测试方法中,将测试设备作为测试节点i与其他节点一起串连在通信总线上,以实现对主节点或者从节点的测试过程。需要说明的是,在对从节点设备进行测试时,取一个测试设备作为主节点连接在通信总线上;在对主节点进行测试时,取若干个测试设备作为从节点与待测试的主节点连接在通信总线上。
首先,判断测试节点i是作为主节点连接在通信总线上,还是作为从节点连接通信总线上。然后,如果测试节点i是作为主节点连接在通信总线上的,则测试节点i可以对连接在通信总线上的从节点进行测试;如果测试节点i是作为从节点连接在通信总线上的,则可以对连接在通信总线上的主节点进行测试。具体的测试过程如下述步骤所描述。
步骤402、第一测试节点接收通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于第一数据包,完成对第一从节点运行状态的测试。
在确定第一测试节点i1作为主节点连接在通信总线上之后,第一测试节点i1在第一通信子周期T1内,开始对通信总线上的一个从节点开始进行测试。需要说明的是,本申请实施例中第一测试节点i1可以从第一个从节点开始依次对所有从节点完成测试,也可以从任意一个从节点开始,按照非固定的测试顺序对所有从节点进行测试,在本申请中不做限定。本申请实施例按照从第一个从节点开始测试说明,首先第一测试节点i1向第一从节点发送第一从节点数据索取指令,并接收从节点基于第一从节点数据索取指令返回的第一数据包,进而完成从节点的功能测试。
在第一通信子周期T1内,第一测试节点i1对第一从节点进行对运行状态测试具体过程如下:
第一测试节点i1在第一通信子周期T1的第一时隙t1内向通信总线上的第一从节点发送第一从节点数据索取指令;在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内,根据通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位,确定响应节点。其中,响应节点是由从节点在通信总线上的电位情况确定的;从节点的电位情况可根据数据传输检测电路进行检测得到。如果第一从节点在第一通信子周期T1的第一时隙t1内接收到第一从节点数据索取指令后,在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内有从节点的电位可以由第一预设电位转换为第二预设电位的情况下,确定这些电位由第一预设电位转换为第二预设电位的从节点为响应节点。需要说明的是,第一通信子周期T1由第一时隙t1和第二时隙t2共同构成;第二时隙t2由第一响应时间间隔tw1和第一上传时间间隔tpn1共同构成。
在本申请的一个实施例中,第一测试节点i1还需要记录自第一响应时间间隔tw1开始,到响应节点的电位完成由第一预设电位转换为第二预设电位的响应时间。需要说明的是,响应时间是判断响应节点是否响应延迟的依据。
在本申请的一个实施例中,在确定响应节点后,首先基于所确定的响应节点,对第一从节点的运行状态进行初步判断。如果第一从节点在第一通信子周期T1的第一时隙t1内接收到第一从节点数据索取指令后,在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内,通信总线上只有一个从节点的电位由第一预设电位转换为第二预设电位的情况下,初步判断第一从节点运行状态正常;如果第一从节点在第一通信子周期T1的第一时隙t1内接收到第一从节点数据索取指令后,在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内,通信总线上的从节点的电位没有任何一个由第一预设电位转换为第二预设电位的情况下,或者通信总线上的从节点的电位响应延迟的情况下(即在第一上传时间间隔tnp1内,通信总线上的从节点的电位由第一预设电位 转换为第二预设电位,而不是在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内完成电位由第一预设电位转换为第二预设电位的过程),确定第一从节点响应状态为异常状态。需要说明的是,在第一通信子周期的第二时隙的第一响应时间间隔内,如果在通信总线上有两个或者两个以上的从节点的电位想要同时由第一预设电位转换为第二预设电位的情况下(即存在两个或两个以上从节点基于第一数据索取指令作出响应),由于总线的占用冲突,因此也不会出现电位由第一预设电位转换为第二预设电位的情况。
在本申请的一个实施例中,通信总线上只有一个从节点的电位由第一预设电位转换为第二预设电位的情况下,在第一通信子周期T1的第二时隙t2的第一上传时间间隔tnp1内,第一测试节点i1接收上述电位由第一预设电位转换为第二预设电位所对应从节点返回的第一数据包,并对第一数据包进行正确性检验;正确性检验具体包括:解析第一数据包,以第一数据包是否为第一从节点返回的数据包,以及判断第一数据包是否为空包或者内容存在问题的数据包,以及判断第一数据包的编码结束位是否为拆分标识或者结束标识;经过解析如果第一数据包是第一从节点返回的数据包,且不是空包或者内容不存在问题的数据包,且第一数据包的结束位为结束标识或者拆分标识,则确定第一数据包正确。需要说明的是,内容存在问题的数据包可以是,数据包中的数据存在乱码、缺失或者格式存在问题的数据包;还需要说明的是,数据包中含有从节点对应的唯一ID号,因此,在对第一数据包解析后,可基于第一数据包中的ID号判断是否为第一从节点返回的数据包。如果第一数据包不是第一从节点返回的数据包,或者第一数据包为空包或者内容存在问题的数据包,或者第一数据包的结束位不是结束标识或者拆分标识,则确定第一数据包错误。还需要说明的是,数据包的结束位,说明了一个从节点是否存在异常或者是否具备数据包过大时的拆分功能。如果数据包过大时,不能对较大的数据包进行拆分后再发送,则说明从节点运行状态异常。在第一数据包正确的情况下,确定第一从节点运行状态正常,继续执行第二通信子周期T2的测试;在第一数据包错误的情况下,确定第一从节点运行状态异常。
在本申请的一个实施例中,在初步判断第一从节点的运行状态异常的情况下,在第一通信子周期T1的第二时隙t2的第一上传时间间隔tnp1内,拒绝接收基于响应延迟对应的从节点。由于不能排除从节点间由于相互影响所导致通信总线上的从节点的电位没有任何一个由第一预设电位转换为第二预设电位,或者通信总线上的从节点的电位响应延迟,因此,不能确定是否是第一从节点运行状态异常,还是由于其他从节点运行状态异常而导致对第一从节点测试出现异常,因此,对第一从节点进行一对一测试。一对一测试时,只有测试节点 与被测试节点可以占用总线,因此可排除其他节点影响问题。对第一从节点的一对一测试具体分为以下三种验证情况:
1.第一测试节点i1向第一从节点发送第一从节点数据索取指令;第一测试节点i1在发送后记录第一从节点自接收到第一从节点数据索取指令,到第一从节点的电位由第一预设电位转换为第二预设电位的响应时间,如果第一测试节点i1一直没收到第一从节点的电位由第一预设电位转换为第二预设电位的响应,确定第一从节点运行状态异常。
2.测试节点向第一从节点发送第一从节点数据索取指令;第一测试节点i1在发送后记录第一从节点自接收到第一从节点数据索取指令,到第一从节点的电位由第一预设电位转换为第二预设电位的响应时间,如果第一测试节点i1响应时间小于第一通信子周期T1的第二时隙t2,则确定第一从节点响应正常,且存在其他的从节点响应异常。此时,第一测试节点i1首先继续接收第一从节点基于第一从节点数据索取指令返回的第一数据包,判断第一数据包是否正确,如果经判断第一数据包不正确,确定第一从节点运行状态异常;如果经判断第一数据包正确,则确定第一从节点运行状态正常。
3.第一测试节点i1向第一从节点发送第一从节点数据索取指令;第一测试节点i1在发送后记录第一从节点自接收到第一从节点数据索取指令,到第一从节点的电位由第一预设电位转换为第二预设电位的响应时间,如果第一从节点的响应时间大于第一通信子周期T1的第二时隙t2,确定第一从节点运行状态异常。此时,第一测试节点i1首先继续接收第一从节点基于第一从节点数据索取指令返回的第一数据包,判断第一数据包是否正确,如果经判断第一数据包不正确,确定第一从节点运行状态异常;如果经判断第一数据包正确,则确定第一从节点运行状态正常。
在本申请的一个实施例中,由于不确定其他从节点中是否存在运行状态异常的从节点,或者确定其他从节点中存在运行状态异常的从节点但不确定是哪一个,因此,本申请实施例在对第一从节点一对一测试之后,对其他所有从节点均进行基于第一数据索取指令的一对一测试。可以理解的是,如果存在其他所有从节点基于第一数据索取指令电位由第一预设电位转换为第二预设电位,或者存在其他所有从节点基于第一数据索取指令电位由第一预设电位转换为第二预设电位且返回数据包,则说明该节点运行状态异常。在对其他所有从节点均进行基于第一数据索取指令的一对一测试之后,报告运行状态异常的从节点。
在本申请的一个实施例中,如果在第一通信子周期T1的第二时隙t2结束后,第一测试节点i1还没有结束接收第一数据包,则确定设备的通信时序运行 状况异常。在结束接收第一数据包之后,对第一数据包进行正确性检验;在第一数据包正确的情况下,确定第一从节点运行状态正常,报告通信时序运行状态异常,并跳转到第二通信子周期T2的测试;在第一数据包错误的情况下,确定第一从节点运行状态异常,第一测试节点i1报告通信时序运行状态异常,以及报告第一从节点运行状态异常。
在本申请的一个实施例中,在第一通信子周期T1的第二时隙t2内,如果在第一测试节点i1基于第一从节点数据索取指令接收到第一从节点返回的第一数据包后,又接收到第二从节点发送的第二数据包的情况下(例如,第二时隙t2有十秒,在第一从节点返回的第一数据包后,第二时隙t2还有五秒,在此第二时隙t2剩余的五秒内,第二从节点响应并返回第二数据包),确定第二从节点运行状态异常;然后,第一测试节点i1对第一从节点进行一对一测试,并对第二从节点进行基于第一从节点数据索取指令的一对一测试。
如果经判断第一从节点运行状态正常,第一测试节点i1报告第二从节点运行状态异常;如果经判断第一从节点运行状态异常,第一测试节点i1报告第一从节点运行状态异常,第二从节点运行状态异常,以及报告第二从节点基于第一从节点数据索取指令的一对一测试结果。可以理解的是,其中,基于第一从节点数据索取指令的一对一测试结果包括:基于第一从节点数据索取指令第二从节点电位没有由第一预设电位转换为第二预设电位、基于第一从节点数据索取指令第二从节点电位由第一预设电位转换为第二预设电位且返回的第二数据包错误、基于第一从节点数据索取指令第二从节点电位由第一预设电位转换为第二预设电位且返回的第二数据包正确、基于第一从节点数据索取指令第二从节点响应延迟且返回的第二数据包错误、基于第一从节点数据索取指令第二从节点响应延迟且返回的第二数据包正确。还可以理解的是,上述第二从节点可以是通信总线上任意位置的从节点,不一定是顺序位的第二个从节点。
在本申请的一个实施例中,在第一通信子周期T1的第二时隙t2内,如果在第一测试节点i1基于第一从节点数据索取指令首先接收到第二从节点发送的第二数据包,然后又接收到第一从节点返回的第一数据包的情况下,确定第二从节点的运行状态异常。然后,第一测试节点i1对第一从节点进行一对一测试,并对第二从节点进行基于第一从节点数据索取指令的一对一测试。如果经判断第一从节点运行状态正常,第一测试节点i1报告第二从节点运行状态异常,以及报告第二从节点基于第一从节点数据索取指令的一对一测试结果;如果经判断第一从节点运行状态异常,第一测试节点i1报告第一从节点运行状态异常,第二从节点运行状态异常,以及报告第二从节点基于第一从节点数据索取指令的一对一测试结果。
在本申请的一个实施例中,在第一通信子周期T1的第二时隙t2内,如果在第一测试节点i1基于第一从节点数据索取指令接收到第二从节点发送的第二数据包以及第三从节点发送的第三数据包,并没有接收到第一数据包的情况下,第一测试节点i1对第一从节点进行一对一测试,并对第二从节点以及第三从节点进行基于第一从节点数据索取指令的一对一测试。如果经判断第一从节点运行状态正常,第一测试节点i1报告第二从节点运行状态异常,第三从节点运行状态异常,以及报告第二从节点基于第一从节点数据索取指令的一对一测试结果,以及报告第三从节点基于第一从节点数据索取指令的一对一测试结果;如果经判断第一从节点运行状态异常,第一测试节点i1报告第一从节点运行状态异常,第二从节点运行状态异常,第三从节点运行状态异常,以及报告第二从节点基于第一从节点数据索取指令的一对一测试结果,以及报告第三从节点基于第一从节点数据索取指令的一对一测试结果。
步骤403、第一测试节点接收通信总线上的所有从节点主动上传的若干个数据包,并基于若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态。
在进入第二通信子周期T2后,通信总线上的所有从节点按优先级顺序上传的对应从节点的数据包,如果存在从节点没有数据上传,上传空数据包或者不上传数据即可。在本申请的一个实施例中,第二通信子周期T2按照从节点的个数分割为若干个第六时隙t6,其中,每个第六时隙t6由第二响应时间间隔tw2和第二上传时间间隔tnp2共同构成,无论任意从节点上传哪种数据包都需在相应的第二响应时间间隔tw2内响应,在相应的第二上传时间间隔tnp2将数据上传完成,否则跳转到下个从节点。
在本申请的一个实施例中,在第一测试节点i1接收通信总线上所有从节点主动上传的若干个数据包时,如果各从节点上传相应数据包所需时间长度均在相应的第六时隙t6内,确定通信时序运行状况正常;如果在各从节点中存在任意一个从节点上传相应数据包所需的时间大于第六时隙t6的情况下,确定通信时序运行状况异常。此时,第一测试节点报告通信时序运行状况异常。
在本申请的一个实施例中,在第一测试节点i1接收通信总线上所有从节点主动上传的若干个数据包后,对若干个数据进行正确性检验,以判断各个数据包的正确性。在若干个数据包均正确的情况下,确定所有从节点的运行状态正常。若存在错误数据包,则确定错误数据包相应的从节点运行状态异常。此时,第一测试节点i1对相应运行状态异常的从节点,进行基于相应从节点数据索取指令的一对一测试。如果经判断相应的从节点运行状态异常,第一测试节点报告相应从节点运行状态异常;如果经判断相应的从节点运行状态正常,对所有 其他从节点执行基于相应从节点数据索取指令的一对一测试测试过程,以至找出运行状态异常的从节点。
在本申请的一个实施例中,在第一测试节点i1接收通信总线上所有从节点主动上传的若干个数据包后,基于各从节点上传相应数据包的顺序判断是否与预设的优先级关系相同;在各从节点上传相应数据包的顺序与预设的优先级关系相同的情况下,确定从节点的优先级关系正常;在各从节点上传相应数据包的顺序与预设的优先级关系不同的情况下,确定从节点的优先级关系异常,此时,第一测试节点报告从节点的优先级关系异常。
在本申请的一个实施例中,第二通信子周期T2还可以分割为第三时隙t3、第四时隙t4、第五时隙t5;其中,第三时隙t3,用于第一测试节点i1向所有从节点发送询问指令,以询问所有从节点是否有数据包需要上传;第四时隙t4,用于接收所有从节点基于询问指令返回的返回值,其中,返回值有第一返回值第二返回值;第五时隙t5,用于接收所有从节点中返回值为第一返回值所对应从节点上传的数据包。在第二通信子周期T2的第四时隙t4内,第一测试节点i1询问所有从节点是否有数据;在第二通信子周期T2的第五时隙t5内,需要上传数据包的从节点将第一返回值返回给第一测试节点i1,不需要上传数据包的从节点将第二返回值返回给第一测试节点i1(例如,第一从节点需要上传数据包,第二从节点不需要上传数据包,则第一从节点返回‘1’给第一测试节点i1,第二从节点返回‘0’给第一测试节点i1);在需要上传数据包的从节点返回第一返回值后,第一测试节点i1对这些从节点进行统计,并按照需要上传数据包的从节点的个数,将第五时隙t5分割成若干个上传时隙tpn;其中,每个上传时隙tpn由第三响应时间间隔tw3和第三上传时间间隔tnp3共同构成。每个需要上传数据包的从节点在第三响应时间间隔tw3内,电位完成由第一预设电位转换为第二预设电位,以完成响应;在第三上传时间间隔tnp3上传相应的数据包。需要说明的是,在每个第三响应时间间隔tw3内还需要记录自第三响应时间间隔tw3开始,到相应从节点的电位完成由第一预设电位转换为第二预设电位的时间。
基于上传的数据包,对在第二通信子周期T2的第四时隙t4内,返回值为第一返回值的从节点,进行一对一测试。如果经判断返回值为第一返回值的从节点运行状态均正常,第一测试节点i1跳转到下一个第一通信子周期T1,继续执行测试;如果经判断存在返回值为第一返回值的从节点运行状态异常,第一测试节点报告相应从节点运行状态异常。
第一测试节点i1遍历通信总线上的所有从节点,以对所有从节点进行测试。
至此,完成第一测试节点i1完成对从节点的测试。
步骤404、第二测试节点基于主节点发送的第二测试节点数据索取指令,向主节点发送第二测试数据包,并基于第二测试数据包完成对主节点的从节点运行状态识别功能的测试。
若确定测试节点i不是作为主节点连接在通信总线上,则确定测试节点i是作为从节点连接在通信总线上的,此时,若干个测试节点i(i2,i3…)可以对主节点进行功能测试;其中,第一测试节点i1可以是若干个测试节点i中的一个。
首先,任取一个测试节点i2(第二测试节点)对主节点进行主节点的从节点运行状态识别功能测试。具体地:
在本申请的一个实施例中,第二测试节点i2在第一通信子周期T1的第一时隙t1内,接收主节点发送的第二测试节点数据索取指令;在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内,仅确定第二测试节点为响应节点,即基于第二测试节点数据索取指令,第二测试节点电位由第一预设电位转换为第二预设电位;在第一通信子周期T1的第二时隙t2的第一上传时间间隔tpn1内,第二测试节点i2基于第二测试节点数据索取指令,向主节点发送正确的第二测试数据包或者错误的第二测试数据包;在第二测试节点i2基于第二测试节点数据索取指令,向主节点发送正确的第二测试数据包的情况下,主节点如果可以确定正确的第二测试数据包的正确性,第二测试节点i2确定主节点的从节点运行状态识别功能为正常;或者,在第一通信子周期T1的第二时隙t2的第一上传时间间隔tpn1内,如果第二测试节点i2基于第二测试节点数据索取指令,向主节点发送错误的第二测试数据包的情况下,主节点在接收到错误的第二测试数据包后,能够识别出错误的第二测试数据包,并跳转到第二通信子周期T2;在主节点能够识别错误的第二测试数据包情况下,确定主节点的从节点运行状态识别功能为正常;在主节点不能识别错误的第二测试数据包情况下,确定主节点的从节点运行状态识别功能为异常,第二测试节点i2报告主节点的从节点运行状态识别功能异常。
在本申请的一个实施例中,在第二测试节点i2在第一通信子周期T1的第一时隙t1内接收主节点发送的第二测试节点数据索取指令之后,如果在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内,基于第二测试节点数据索取指令,第二测试节点的电位未由第一预设电位转换为第二预设电位,第三测试节点i3的电位由第一预设电位转换为第二预设电位(即第三测试节点i3基于第二测试节点数据索取指令做出响应);在主节点可以确定第二测试节点运行状态异常以及第三测试节点运行状态异常的情况下,确定主节点的从节点运行状态识别功能为正常;在主节点不能确定第二测试节点运行状态异常或者 第三测试节点运行状态异常的情况下,确定主节点的从节点运行状态识别功能为异常,此时,第二测试节点i2报告主节点的从节点运行状态识别功能异常。
在本申请的一个实施例中,在第二测试节点i2在第一通信子周期T1的第一时隙t1内接收主节点发送的第二测试节点数据索取指令之后,如果第二测试节点i2自第一响应时间间隔tw1开始,到第二测试节点i2的电位完成由第一预设电位转换为第二预设电位的时间大于第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1的情况下,如果主节点在第一通信子周期T1的第二时隙t2的第一上传时间间隔tpn1内,拒绝接收第二测试节点基于第二测试节点数据索取指令,向主节点发送的第二测试数据包,确定主节点的从节点运行状态识别功能为正常;如果主节点在第一通信子周期T1的第二时隙t2的第一上传时间间隔tpn1内,仍然接收基于第二测试节点数据索取指令,向主节点发送的第二测试数据包,确定主节点的从节点运行状态识别功能为异常,此时,第二测试节点i2报告主节点的从节点运行状态识别功能异常。
在本申请的一个实施例中,在第二测试节点i2在第一通信子周期T1的第一时隙t1内接收主节点发送的第二测试节点数据索取指令之后,如果第二测试节点i2在第一通信子周期T1的第二时隙t2的第一响应时间间隔tw1内,第二测试节点i2的电位一直没有由第一预设电位转换为第二预设电位,在主节点确定第二测试节点i2运行状态异常的情况下,确定主节点的从节点运行状态识别功能为正常;在主节点不能确定第二测试节点i2运行状态异常的情况下,确定主节点的从节点运行状态识别功能为异常,此时,第二测试节点i2报告主节点的从节点运行状态识别功能异常。需要说明的是,在第一通信子周期的第二时隙的第一响应时间间隔内第二测试节点i2的电位一直没有由第一预设电位转换为第二预设电位,还包括第三测试节点i3与第二测试节点i2的电位同时由第一预设电位转换为第二预设电位,由于总线的占用冲突,因此第二测试节点i2也不会出现电位由第一预设电位转换为第二预设电位的情况。
步骤405、若干个测试节点主动向主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项的功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能。
在本申请的一个实施例中,在第二通信子周期T2内,若干个测试节点i(i2,i3…)按照错误的优先级关系,向主节点发送正确的测试数据包;其中,错误的优先级关系可以是,与从节点优先级关系不相同任何一种优先级关系,本申请在此不做限定;在确定主节点能够识别从节点优先级关系为异常的情况下,确定主节点的从节点优先级关系识别功能正常;在确定主节点不能够识别 从节点优先级关系为异常的情况下,确定主节点的从节点优先级关系识别功能异常,此时,若干个测试节点i(i2,i3…)中的任意一个或多个报告主节点的从节点优先级关系识别功能异常。或者,
在第二通信子周期T2内,若干个测试节点i(i2,i3…)按照错误的优先级关系,向主节点发送错误的测试数据包;在确定主节点能够识别从节点优先级关系为异常,以及能够识别错误的测试数据包,从而确定从节点运行状态识别为异常的情况下,确定主节点的从节点优先级关系识别功能以及主节点的从节点运行状态识别功能正常;在确定主节点不能够识别从节点优先级关系为异常,或者不能够识别错误的测试数据包,进而不能确定从节点运行状态识别为异常的情况下,确定主节点的从节点优先级关系识别功能或者主节点的从节点运行状态识别功能异常,此时,若干个测试节点i(i2,i3…)中的任意一个或多个报告主节点的从节点优先级关系识别功能或者主节点的从节点运行状态识别功能异常。
在本申请的一个实施例中,在第二通信子周期T2内,若干个测试节点i(i2,i3…)均以第七时隙t7向主节点上传数据包;若第二测试节点i2没有数据需要上传,因此在对应的第七时隙t7内,没有向主节点上传数据包,如果主节点能够忽略第二测试节点i2,继续在下一个第七时隙t7接收其他从节点的上传的数据包,则确定主节点的从节点运行状态识别功能正常;否则,确定主节点的从节点运行状态识别功能异常,若干个测试节点i(i2,i3…)中的任意一个或多个报告主节点的从节点运行状态识别功能异常。另外,在若干个测试节点i(i2,i3…)均没有数据需要上传的情况下,如果主节点能够跳转到下一个通讯周期,则确定主节点的从节点运行状态识别功能正常;否则,确定主节点的从节点运行状态识别功能异常,此时,若干个测试节点i(i2,i3…)中的任意一个或多个报告主节点的从节点运行状态识别功能异常。
在本申请的一个实施例中,在第二通信子周期T2内,每个第七时隙t7由第四响应时间间隔tw4和第四上传时间间隔tnp4共同构成,测试从节点上传数据包都需在相应的第四响应时间间隔tw4内响应,在相应的第四上传时间间隔tnp4将数据上传完成,否则跳转到下个从节点。如果第二测试节点i2向主节点上传第二测试数据包的时间大于第七时隙t7的第四上传时间间隔tnp4;在主节点确定通信时序运行状况异常并跳转到下一个第一通信子周期的情况下,确定主节点的通信时序运行状况识别功能正常;在主节点不能确定通信时序运行状况异常并跳转到下一个第一通信子周期的情况下,确定主节点的通信时序运行状况识别功能异常,此时,若干个测试节点i(i2,i3…)中的任意一个或多个报告主节点的通信时序运行状况识别功能异常。
至此,若干个测试节点i(i2,i3…)完成对主节点的测试。
以上为本申请实施例提供的方法实施例,基于同样的发明构思本申请实施例还提供了一种针对短距离单线信号传输软件的检测装置,其内部结构如图5所示。
图5为本申请实施例提供的一种针对短距离单线信号传输软件的检测装置结构图。如图5所示,装置包括:从节点运行状态检测模块501、功能检测模块502。
进一步地,在测试装置作为主节点连接在通信总线上时;从节点运行状态检测模块501,用于在第一通信子周期内,第一测试节点接收通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于第一数据包,完成对第一从节点运行状态的测试;功能检测模块502,用于在第二通信子周期内,第一测试节点接收通信总线上的所有从节点主动上传的若干个数据包,并基于若干个数据包,完成对通信时序运行状况、从节点的优先级关系以及从节点运行状态的测试。
基于同样的发明构思本申请实施例还提供了另一种针对短距离单线信号传输软件的检测装置,其内部结构如图6所示。
图6为本申请实施例提供的另一种针对短距离单线信号传输软件的检测装置结构图。如图6所示,装置包括:从节点运行状态检测模块601、功能检测模块602。
进一步地,在测试装置作为从节点连接在通信总线上时;从节点运行状态检测模块601,用于在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向主节点发送第二测试数据包,并基于第二测试数据包完成对主节点的从节点运行状态识别功能的测试;功能检测模块602,用于在第二通信子周期内,若干个测试节点主动向主节点发送测试数据包,并基于若干个数据包,完成对主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能的测试。
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。

Claims (12)

  1. 一种针对短距离单线信号传输软件的检测方法,其特征在于,所述方法包括:
    第一测试节点作为主节点连接在通信总线上;
    在第一通信子周期内,第一测试节点接收所述通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于所述第一数据包,完成对所述第一从节点运行状态的测试;
    在第二通信子周期内,第一测试节点接收所述通信总线上的所有从节点主动上传的若干个数据包,并基于所述若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态;
    其中,所述第一通信子周期与所述第二通信子周期共同构成一个通信周期。
  2. 根据权利要求1所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,所述在第一通信子周期内,第一测试节点接收所述通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于所述第一数据包,完成对所述第一从节点运行状态的测试,具体包括:
    所述第一测试节点在第一通信子周期的第一时隙内,向所述通信总线上的第一从节点发送第一从节点数据索取指令;
    在第一通信子周期的第二时隙的第一响应时间间隔内,根据所述通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位,确定响应节点,并基于所述响应节点,判断所述第一从节点运行状态是否异常;
    在确定有一个响应节点的情况下,在第一通信子周期的第二时隙的第一上传时间间隔内,接收所述响应节点返回的第一数据包,并基于所述第一数据包,判断所述第一从节点运行状态是否正常;
    其中,所述第一时隙、所述第二时隙共同构成第一通信子周期;所述第一响应时间间隔、第一上传时间间隔共同构成第二时隙。
  3. 根据权利要求2所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,所述在第一通信子周期的第二时隙的第一响应时间间隔内,根据所述通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位,确定响应节点,并基于所述响应节点,判断所述第一从节点运行状态是否异常,具体包括:
    在第一通信子周期的第二时隙的第一响应时间间隔内,所述第一测试节点通过数据传输检测电路,判断所述通信总线上的从节点的电位是否由第一预设电位转换为第二预设电位;
    在确定第一通信子周期的第二时隙的第一响应时间间隔内,所述通信总线上没有从节点的电位由第一预设电位转换为第二预设电位的情况下,确定所述通信总线上没有响应节点,且确定所述第一从节点运行状态异常。
  4. 根据权利要求2所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,所述基于所述第一数据包,判断所述第一从节点运行状态是否正常,具体包括:
    对所述第一数据包进行正确性检验,以判断所述第一数据包是否为所述第一从节点返回的数据包;
    以及判断所述第一数据包是否为空包或者内容存在问题的数据包;
    以及判断所述第一数据包的编码结束位是否为拆分标识或者结束标识;
    在所述第一数据包不是所述第一从节点返回的数据包,或者所述第一数据包为空包或者为内容存在问题的数据包,或者所述第一数据包的结束位不是结束标识或者不是拆分标识的情况下,确定所述第一从节点运行状态异常。
  5. 根据权利要求1所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,所述在第二通信子周期内,第一测试节点接收所述通信总线上的所有从节点主动上传的若干个数据包,并基于所述若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态,具体包括:
    在第二通信子周期内,第一测试节点接收所述通信总线上的所有从节点上传的数据包,并基于所述若干个数据包中各从节点上传相应数据包所需时间长度判断通信时序运行状况是否正常;和/或
    基于所述若干个数据包中各从节点上传的相应数据包的内容,判断所述从节点的运行状态是否正常;和/或
    基于所述若干个数据包中各从节点上传数据包的顺序和预设的优先级关系,判断所述从节点的优先级关系是否正常。
  6. 根据权利要求1所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,所述方法还包括:
    在第二通信子周期的第三时隙内,所述第一测试节点向所有从节点发送询问指令;
    在第二通信子周期的第四时隙内,接收所有从节点基于所述询问指令返回的返回值,其中,所述返回值为第一返回值或者第二返回值;
    在第二通信子周期的第五时隙内,接收返回值为第一返回值所对应从节点上传的数据包;
    基于所述上传的数据包,完成对所述返回值为第一返回值所对应从节点的从节点运行状态测试;
    其中,所述第三时隙、所述第四时隙共同构成第二通信子周期;所述第三时间间隔、所述第四时间间隔共同构成第三时隙。
  7. 一种针对短距离单线信号传输软件的检测方法,其特征在于,所述方法包括:
    若干个测试节点作为从节点连接在通信总线上;
    在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向所述主节点发送第二测试数据包,并基于所述第二测试数据包完成对主节点的从节点运行状态识别功能的测试;
    在第二通信子周期内,所述若干个测试节点主动向所述主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能;
    其中,所述第一通信子周期与所述第二通信子周期共同构成一个通信周期。
  8. 根据权利要求7所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,所述在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向所述主节点发送第二测试数据包,并基于所述第二测试数据包完成对主节点的从节点运行状态识别功能的测试,具体包括:
    所述第二测试节点在第一通信子周期的第一时隙内接收主节点发送的第二测试节点数据索取指令,在第一通信子周期的第二时隙的第一响应时间间隔内,仅确定所述第二测试节点为响应节点;
    在第一通信子周期的第二时隙的第一上传时间间隔内,所述第二测试节点基于所述第二测试节点数据索取指令,向所述主节点发送正确的第二测试数据包;
    在所述主节点确定所述正确的第二测试数据包的正确性之后,所述第二测试节点确定所述主节点的从节点运行状态识别功能为正常;或者,
    在第一通信子周期的第二时隙的第一上传时间间隔内,所述第二测试节点基于所述第二测试节点数据索取指令,向所述主节点发送错误的第二测试数据包;
    在所述主节点能够识别所述错误的第二测试数据包,并跳转到第二通信子周期的情况下,确定所述主节点的从节点运行状态识别功能为正常;
    其中,所述第一时隙、所述第二时隙共同构成第一通信子周期;所述第一响应时间间隔、所述第一上传时间间隔共同构成第二时隙。
  9. 根据权利要求8所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,在所述第二测试节点在第一通信子周期的第一时隙内接收主节点发送的第二测试节点数据索取指令之后,所述方法还包括:
    在第一通信子周期的第二时隙的第一响应时间间隔内,确定所述通信总线上没有响应节点;
    在所述主节点确定所述第二测试节点运行状态异常的情况下,确定所述主节点的从节点运行状态识别功能为正常。
  10. 根据权利要求7所述的一种针对短距离单线信号传输软件的检测方法,其特征在于,在第二通信子周期内,所述若干个测试节点主动向所述主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能,具体包括:
    在第二通信子周期内,所述若干个测试节点按照错误的优先级关系向所述主节点发送测试数据包,在确定所述主节点能够识别所述从节点优先级关系为异常的情况下,确定所述主节点的从节点优先级关系识别功能正常;和/或
    所述若干个测试节点均以第五时隙向主节点上传测试数据包;若所述第二测试节点在其对应的第五时隙内,没有向所述主节点上传测试数据包,在所述主节点能够忽略所述第二测试节点,并在第三测试节点对应的第五时隙继续接收所述第三测试节点的上传的测试数据包的情况下,确定所述主节点的从节点运行状态识别功能正常;和/或
    所述第二测试节点向主节点上传所述第二测试数据包的时间大于第五时隙;在所述主节点确定通信时序运行状况异常并跳转到下一个第一通信子周期的情况下,确定主节点的通信时序运行状况识别功能正常;
    其中,所述第五时隙为任意一个测试节点,向主节点上传测试数据包的阈值时间。
  11. 一种针对短距离单线信号传输软件的检测装置,其特征在于,所述装置包括:从节点运行状态检测模块、功能检测模块;
    在所述测试装置作为主节点连接在通信总线上时;
    所述从节点运行状态检测模块,用于在第一通信子周期内,第一测试节点接收所述通信总线上第一从节点基于第一从节点数据索取指令返回的第一数据包,并基于所述第一数据包,完成对所述第一从节点运行状态的测试;
    所述功能检测模块,用于在第二通信子周期内,第一测试节点接收所述通信总线上的所有从节点主动上传的若干个数据包,并基于所述若干个数据包,完成对以下任意一项或多项的测试:通信时序运行状况、从节点的优先级关系、从节点运行状态;
    其中,所述第一通信子周期与所述第二通信子周期共同构成一个通信周期。
  12. 一种针对短距离单线信号传输软件的检测装置,其特征在于,所述装置包括:从节点运行状态检测模块、功能检测模块;
    在所述测试装置作为从节点连接在通信总线上时;
    所述从节点运行状态检测模块,用于在第一通信子周期内,第二测试节点基于主节点发送的第二测试节点数据索取指令,向所述主节点发送第二测试数据包,并基于所述第二测试数据包完成对主节点的从节点运行状态识别功能的测试;
    所述功能检测模块,用于在第二通信子周期内,所述若干个测试节点主动向所述主节点发送测试数据包,并基于若干个测试数据包,完成对以下任意一项或多项功能的测试:主节点的从节点优先级关系识别功能、主节点的从节点运行状态识别功能、主节点的通信时序运行状况识别功能;
    其中,所述第一通信子周期与所述第二通信子周期共同构成一个通信周期。
PCT/CN2021/116412 2021-03-26 2021-09-03 一种针对短距离单线信号传输软件的检测方法及装置 WO2022198927A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110323251.3 2021-03-26
CN202110323251.3A CN113067751B (zh) 2021-03-26 2021-03-26 一种针对短距离单线信号传输软件的检测方法及装置

Publications (1)

Publication Number Publication Date
WO2022198927A1 true WO2022198927A1 (zh) 2022-09-29

Family

ID=76563838

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116412 WO2022198927A1 (zh) 2021-03-26 2021-09-03 一种针对短距离单线信号传输软件的检测方法及装置

Country Status (3)

Country Link
CN (1) CN113067751B (zh)
AU (1) AU2021257914B1 (zh)
WO (1) WO2022198927A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067751B (zh) * 2021-03-26 2022-02-11 中国科学院地质与地球物理研究所 一种针对短距离单线信号传输软件的检测方法及装置
CN113934579B (zh) * 2021-10-11 2022-05-17 中国科学院地质与地球物理研究所 一种短距离单信号传输网络的硬件检测方法及设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070201387A1 (en) * 2005-12-19 2007-08-30 Fujitsu Limited Information processing device, communication load distribution method
EP2439885A1 (en) * 2010-10-08 2012-04-11 Honeywell International Inc. Method for digital communication between a plurality of nodes connected by a serial field bus and corresponding system, in particular a field control system or field surveillance system
CN108089055A (zh) * 2016-11-23 2018-05-29 中国航发商用航空发动机有限责任公司 一种线缆测试装置及其测试方法
CN111537918A (zh) * 2020-06-09 2020-08-14 上海赞太科技有限公司 一种分布式线束测试装置及其方法
CN112134772A (zh) * 2020-09-09 2020-12-25 中国科学院地质与地球物理研究所 一种基于单线的传输数据方法及设备
CN113067751A (zh) * 2021-03-26 2021-07-02 中国科学院地质与地球物理研究所 一种针对短距离单线信号传输软件的检测方法及装置

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009300248A (ja) * 2008-06-13 2009-12-24 Mitsubishi Electric Corp 並列試験装置

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070201387A1 (en) * 2005-12-19 2007-08-30 Fujitsu Limited Information processing device, communication load distribution method
EP2439885A1 (en) * 2010-10-08 2012-04-11 Honeywell International Inc. Method for digital communication between a plurality of nodes connected by a serial field bus and corresponding system, in particular a field control system or field surveillance system
CN108089055A (zh) * 2016-11-23 2018-05-29 中国航发商用航空发动机有限责任公司 一种线缆测试装置及其测试方法
CN111537918A (zh) * 2020-06-09 2020-08-14 上海赞太科技有限公司 一种分布式线束测试装置及其方法
CN112134772A (zh) * 2020-09-09 2020-12-25 中国科学院地质与地球物理研究所 一种基于单线的传输数据方法及设备
CN113067751A (zh) * 2021-03-26 2021-07-02 中国科学院地质与地球物理研究所 一种针对短距离单线信号传输软件的检测方法及装置

Also Published As

Publication number Publication date
CN113067751B (zh) 2022-02-11
CN113067751A (zh) 2021-07-02
AU2021257914B1 (en) 2022-07-14

Similar Documents

Publication Publication Date Title
WO2022198927A1 (zh) 一种针对短距离单线信号传输软件的检测方法及装置
CN105700510B (zh) Can通信系统的错误分散检测方法及can通信系统
US8140922B2 (en) Method for correlating an error message from a PCI express endpoint
US6754721B2 (en) Method for configuring a station connected to a field bus
CN107544463B (zh) 一种车用控制器诊断功能的自动测试方法及测试装置
CN103530211B (zh) 一种基于uvm平台的pcie回环自检测的方法
WO2022037150A1 (zh) 车辆ecu识别方法、系统及车辆诊断设备
JP7119437B2 (ja) 車両用マスタ電子制御装置、車両用スレーブ電子制御装置、車両用ログ収集システム及び車両用ログ収集プログラム
CN111614531B (zh) 用于监视lin节点的方法、介质、监视设备
CN114386366B (zh) 在ic验证环境中芯片读写性能的自动检测系统和方法
KR101330143B1 (ko) Can 게이트웨이 자동 테스트 방법
CN113341906B (zh) 一种故障处理方法、装置、设备及汽车
CN112398672B (zh) 一种报文检测方法及装置
US11537485B2 (en) Test sequencing method, configuration generating method, and configuration generating apparatus for testing devices according to their communication protocols
WO2023131073A1 (zh) 一种面向车机测试的自检方法及自检装置
CN109120479B (zh) 一种基于网络报文格式的网络吞吐量测试方法
CN114124745B (zh) 一种用于诊断mvb通信故障的方法与系统
CN111930582A (zh) 系统管理总线检测平台、处理器及系统管理总线检测方法
US20200327085A1 (en) Method for determining the transmission speed of a communication module in adapting a connected communication module to a bus and a device for said method
KR20200052746A (ko) 차량 게이트웨이 시스템 및 그 제어 방법
US20230231739A1 (en) Inspection apparatus and inspection method
WO2023005866A1 (zh) 一种总线控制方法及相关装置
CN108614751A (zh) 一种pcie回环自检测的方法
CN113985854B (zh) 数据处理方法、装置及电子设备
CN112838892B (zh) 以太网mac数据通信光模块的测试装置和方法

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21932539

Country of ref document: EP

Kind code of ref document: A1