WO2015192374A1 - Method and device for measuring distance characteristic information - Google Patents

Method and device for measuring distance characteristic information Download PDF

Info

Publication number
WO2015192374A1
WO2015192374A1 PCT/CN2014/080409 CN2014080409W WO2015192374A1 WO 2015192374 A1 WO2015192374 A1 WO 2015192374A1 CN 2014080409 W CN2014080409 W CN 2014080409W WO 2015192374 A1 WO2015192374 A1 WO 2015192374A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
mount
control node
ranging
length
Prior art date
Application number
PCT/CN2014/080409
Other languages
French (fr)
Chinese (zh)
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 奇点新源国际技术开发(北京)有限公司
Priority to CN201480051125.5A priority Critical patent/CN105556901B/en
Priority to PCT/CN2014/080409 priority patent/WO2015192374A1/en
Publication of WO2015192374A1 publication Critical patent/WO2015192374A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for measuring distance feature information.
  • BACKGROUND OF THE INVENTION Currently, if it is necessary to measure the distance between two physical nodes, it is generally achieved by using an echo generated by discontinuous transmission of the dielectric. Specifically, the distance between the two physical nodes is determined by measuring the time difference between the transmitted signal and the reflected signal.
  • Embodiments of the present invention provide a method and a device for measuring distance feature information, which are capable of measuring distance feature information between a control node and each mounted node mounted on a bus, and achieving low cost.
  • a method for measuring distance characteristic information is provided, which is applied to a bus system, the bus system includes a control node and at least one mount node, and the control node and the mount node communicate via a bus; Methods include:
  • the control node determines a length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node; the first mount node is one of the at least one mount node Carrier node
  • control node calculates distance feature information between the control node and the first mount node according to the length of time.
  • control node determines a length of time from the sending of the ranging command to the first mount node to the receiving the reply message of the first mount node, including:
  • the control node listens to whether there is data transmission on the sending port and the receiving port;
  • the control node sends a ranging command to the first mount node, and receives a reply message of the first mount node for the ranging command;
  • the control node determines a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port.
  • the determining, by detecting the first bit of the ranging command sent by the sending port, to the receiving port, receiving the first bit of the reply message includes:
  • Determining, by means of timing, a length of time from when the transmitting port detects the first bit of the ranging command to when the receiving port receives the end of the first bit of the reply message; or, by metering a pulse The numberwise manner determines the length of time from when the transmitting port hears the first bit of the ranging command to when the receiving port receives the end of the first bit of the reply message.
  • the method further includes:
  • the control node repeatedly performs the step of determining the length of time by the preset number of times - 1 time to obtain a preset number of time lengths;
  • the calculating, by the control node, distance feature information between the control node and the first mount node according to the length of time includes:
  • the control node performs filtering processing on the obtained preset number of time lengths
  • the control node performs statistical calculation according to the filtering result to obtain a statistical value of the length of time; the control node calculates distance feature information between the control node and the first mounted node according to the statistical value of the length of time.
  • control node performs filtering processing on the obtained preset number of times of time, including: for the preset number of times, the control node removes a length of time in which the value is greater than or equal to the first set threshold. And a length of time when the value is less than or equal to the second set threshold, and the first set threshold is greater than the second set threshold.
  • control node determines, before the sending of the ranging command to the first mount node to the time length of receiving the reply message of the first mount node, the method further includes:
  • the control node sends a ranging preparation command to the first mount node, where the ranging preparation command is used to instruct the first mount node to perform ranging preparation;
  • the control node receives a ranging preparation reply message sent by the first mount node, and the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mount node is completed.
  • the distance feature information is specifically a time length, a distance value, or a proportional value.
  • a method for measuring distance characteristic information is provided, which is applied to a bus system, where the bus system includes a control node and at least one mount node, and the control node and the mount node pass Bus communication; the method includes:
  • the first mount node receives the ranging command sent by the control node; the first mount node is one of the at least one mount node;
  • the first mount node sends a ranging command reply message to the control node, so that the control node listens for a length of time from sending a ranging command to the first mount node to receiving the reply message of the first mount node Calculating distance feature information between the control node and the first mount node according to the length of time.
  • the method further includes: the first mounting node receiving a ranging preparation command sent by the control node, where the ranging preparation command is used Instructing the first mount node to perform ranging preparation;
  • the first loading node After completing the ranging preparation, the first loading node sends a ranging preparation reply message to the control node, where the ranging preparation reply message is used to notify the control node of the ranging of the first mounting node. Ready to finish.
  • a measurement device for distance feature information is provided, which is applied to a control node in a bus system, the bus system includes a control node and at least one mount node, and the control node and the mount node pass Bus communication; the device includes:
  • a first determining unit configured to determine a length of time from sending a ranging command to the first mount node to receiving the reply message of the first mount node; the first mount node is the at least one mount One of the nodes in the node;
  • a calculating unit configured to calculate distance feature information between the control node and the first mount node according to the length of time determined by the first determining unit.
  • the first determining unit includes:
  • a listening subunit configured to listen for data transmission on the sending port and the receiving port
  • a transceiver unit configured to send a ranging command to the first mount node, and receive a reply message of the first mount node to the ranging command
  • the determining subunit is specifically configured to:
  • Determining the range of the ranging command sent from the listening port by detecting the number of pulses The length of time from one bit to the receiving port receiving the first bit of the reply message.
  • the first determining unit is further configured to: repeatedly perform the preset number of times - the step of determining the length of time, to obtain a preset number of time lengths;
  • the calculation unit specifically includes:
  • a filtering subunit configured to filter a preset number of times obtained by the first determining unit
  • the average calculation subunit is configured to perform statistical calculation according to the filtering result to obtain a statistical value of the length of time
  • a distance calculation unit configured to calculate distance feature information between the control node and the first mount node according to the statistical value of the time length.
  • the filtering subunit is specifically configured to: remove, for the preset number of times, a length of time in which the value is greater than or equal to the first set threshold, and a time length in which the value is less than or equal to the second set threshold, The first set threshold is greater than the second set threshold.
  • the method further includes:
  • a first sending unit configured to send a ranging preparation command to the first mounting node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation
  • a first receiving unit configured to receive a ranging preparation reply message sent by the first loading node, where the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mounting node is completed.
  • the distance feature information is specifically a time length, a distance value, or a proportional value.
  • a fourth aspect provides a measurement device for distance feature information, which is applied to a mount node in a bus system, the bus system including a control node and at least one mount node, and between the control node and the mount node Communicating via the bus; the device comprises:
  • the first mounting node is one of the at least one mounting node;
  • a second sending unit configured to send a ranging command reply message to the control node, so that the control node listens to send a ranging command from the first mounting node to the receiving the reply message of the first mounting node.
  • the second receiving unit is further configured to: receive a ranging preparation command sent by the control node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation;
  • the second sending unit is further configured to: after the ranging preparation is completed, send a ranging standard to the control node.
  • the standby response message is used to notify the control node that the ranging preparation of the first mount node is completed.
  • the control node and the mount node communicate through the bus; the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node;
  • the first mount node is one of the at least one mount node;
  • the control node calculates distance feature information between the control node and the first mount node according to the length of time. Therefore, the measurement of the distance characteristic information between the control node and the first mount node is realized by transmitting the message through the bus; the measurement method of the distance feature information does not need to disconnect the bus, and the implementation is low in difficulty and low in cost.
  • FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of a first embodiment of a method for measuring distance feature information according to an embodiment of the present invention
  • FIG. 3 is a schematic diagram of a second embodiment of a method for measuring distance feature information according to an embodiment of the present invention
  • FIG. 4 is a measurement of distance feature information according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of a fourth embodiment of a method for measuring distance characteristic information according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of a first embodiment of a distance characteristic information measuring apparatus according to an embodiment of the present invention
  • FIG. 1 is a schematic diagram showing an example of a method for measuring distance feature information and a device according to an embodiment of the present invention.
  • the method and device for measuring distance information in the embodiment of the present invention can be applied to a bus system.
  • the bus system includes a control node 110, at least one mount node 120, and a bus 130.
  • the control node 110 communicates with each of the mount nodes 120 via a bus 130, and each mount node 120 is mounted on the bus. 130.
  • the bus 130 is preferably continuous and the media is unique to ensure the accuracy of the distance information measurement results of embodiments of the present invention.
  • FIG. 2 is a schematic diagram of a first embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
  • Step 201 The control node determines a length of time from when the ranging command is sent to the first mount node to the reply message received by the first mount node.
  • the first mount node in the embodiment of the present invention refers to any one of the at least one mount node mounted on the bus.
  • Step 202 The control node calculates distance feature information between the control node and the first mount node according to the length of time.
  • the distance feature information in the embodiment of the present invention may be a parameter capable of expressing physical distance information such as a time length, a distance value, or a proportional value;
  • the length of time may be the length of time that the control node detects that the information is sent from the control node to the first mount node, for example, 4s, and may also be the first mount from the control node to the control node.
  • the length of time that the node sends information to receive the feedback information of the first mount node for example, 8s;
  • the distance value may be a physical distance between the control node and the first mount node, for example, 50m;
  • the ratio value may be a ratio of the length of the current first mount node measured by the control node to the length of the mount node farthest from the control node, for example, 5%, and the proportional value may also be the current measured by the control node.
  • the ratio of the length of the first mount node to the length of the mount node closest to the control node, for example, 3, is not limited in this embodiment of the present invention.
  • the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, and calculating the distance between the control node and the first mount node according to the length of time.
  • the feature information thereby transmitting the message through the bus, realizes the measurement of the distance characteristic information between the control node and the first mount node; the distance feature information measurement method does not need to disconnect the bus, and the implementation is low in difficulty and low in cost.
  • FIG. 3 is a schematic diagram of a second embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
  • Step 301 The first mount node receives a ranging command sent by the control node.
  • Step 302 The first mount node sends a ranging command reply message to the control node, so that the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, according to the time.
  • the length calculates the distance characteristic information between the control node and the first mount node.
  • the first mount node cooperates with the control node, and after receiving the ranging command sent by the control node, sends a ranging command reply message to the control node, thereby implementing the control node to the control node and the first mount node.
  • Measurement of distance information between features. 4 is a schematic diagram of a third embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
  • Step 401 The control node sends a ranging preparation command to the first mounting node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation.
  • Step 402 After receiving the ranging preparation command, the first mount node performs a task of scanning the bus and receiving the command to immediately reply, and sending a ranging preparation reply message to the control node, where the ranging preparation reply message is used. The distance measurement preparation of the first mount node of the control node is notified to be completed.
  • the first mount node may stop the execution of other tasks while executing the scan bus and receiving the command to immediately reply to the task.
  • the control node After receiving the ranging preparation reply message, the control node needs to determine that there is no other data transmission on the bus, and is in an idle state, so as not to interfere with the determination of the time length of the subsequent control node, and ensure the accuracy of the distance measurement result.
  • Step 403 The control node starts to listen to whether its own sending port and receiving port have data transmission.
  • the sending port of the control node is used to send data to different mount nodes through the bus; the receiving port of the control node is used to receive data sent to different mount nodes through the bus.
  • Step 404 The control node sends a ranging command to the first mount node.
  • Step 405 After receiving the ranging command, the first mount node immediately sends a ranging command reply message to the first mount node.
  • Step 406 The control node receives the ranging command reply message, and determines a length of time from when the sending port detects the first bit of the ranging command to the receiving port receives the first bit of the reply message. .
  • the control node since the bus has been determined to be in an idle state before performing step 403, the control node The data sent by the sending port that is heard must be a ranging command, and the data received by the receiving port that is heard must be a ranging command reply message.
  • the ranging command and the ranging command reply message can be accurately transmitted on the bus. Length of time.
  • the length of time includes the processing time of the first mount node receiving the ranging command and the sending the ranging command reply message, but the processing time is extremely small with respect to the length of time, which is ignored in the embodiment of the present invention. Excluding.
  • control node when the control node determines the length of time, it may be implemented by timing, or may be implemented by measuring the number of pulses.
  • a timer may be set in the control node, and the first bit of the ranging command sent by the sending port is detected from the control node, and the control node detects the receiving.
  • the port receives the first bit of the reply message and ends timing.
  • a pulse of a certain preset frequency may be preset, and the first bit of the ranging command sent by the sending port is detected from the control node to start counting pulses, to the control node. The first bit ending count of the reply message received by the receiving port is detected.
  • the accuracy of the distance measurement result can be adjusted by adjusting the frequency of the pulse to adjust the accuracy of the time length. Specifically, the higher the frequency of the pulse, the higher the accuracy of the time length, and the higher the accuracy of the distance measurement result.
  • Step 407 The control node calculates distance feature information between the control node and the first mount node according to the length of time.
  • the data transmission round-trip time on the bus of the unit distance may be determined in advance, and the control node may calculate the distance characteristic information between the control node and the first mount node by using the following formula:
  • S is the distance characteristic information between the control node and the first mount node
  • T is the time length
  • t is the data transmission round-trip time on the bus with a unit distance.
  • the distance feature information calculated by the formula is actually a distance value between the control node and the first mount node.
  • the distance characteristic information S between the control node and the first mount node is 50 m.
  • the data transmission round-trip time on the bus of the unit distance can be measured experimentally, and the specific measurement manner is similar to the measurement method of the time length of the embodiment of the present invention, and the difference is only that the length of the measured bus is known in advance before the experiment.
  • Distance such as lm.
  • the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, and calculating the distance between the control node and the first mount node according to the length of time.
  • FIG. 5 is a schematic diagram of a fourth embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
  • Steps 501 to 506 are the same as steps 401 to 406, and are not described here.
  • Step 507 The control node repeatedly executes the preset number of times - 1 step 504 to 506, and obtains a preset number of time lengths.
  • the specific value of the preset number of times may be set autonomously in an actual application, and is not limited herein.
  • Each step 504 to step 506 is performed, that is, a time length is obtained.
  • the preset number of times is performed -1 times, the steps 504 to 506 are added, and the steps 504 to 506 are performed before, and the preset number of times is performed 504.
  • Step 506 correspondingly obtaining a preset number of time lengths.
  • Step 508 The control node performs filtering processing on the obtained preset number of times of time length
  • control node may remove the time length in which the value is greater than or equal to the first set threshold and the time length in which the value is less than or equal to the second set threshold, thereby implementing the filtering process.
  • the first set threshold is greater than a second set threshold.
  • the values of the first set threshold and the second set threshold may be set autonomously in practical applications, for example, the first set threshold may be the maximum length of time, and the second set threshold may be the minimum length of time. .
  • the value range between the first set threshold and the second set threshold may be an interval in which the probability of occurrence of the time length is greater than a preset value, which is not limited herein.
  • the preset time lengths obtained by the control node are: 508ms, 501ms, 498ms, 4 92ms, and 501ms
  • the first set threshold is 508ms
  • the second set threshold is 492ms
  • the shell lj is removed.
  • the filtering process is completed, and the filtering results are: 501ms, 498ms and 501ms.
  • Step 509 The control node performs statistical calculation according to the filtering result to obtain a statistical value of the length of time.
  • the statistical calculation herein may be an arithmetic average calculation, a geometric average calculation, and a calculation method according to the weight coefficient calculation.
  • the data transmission round-trip time on the bus of the unit distance may be determined in advance, and the control node may calculate the distance characteristic information between the control node and the first mount node by using the following formula:
  • S is the distance characteristic information between the control node and the first mount node
  • Ts is the average value of the time length
  • t is the data transmission round-trip time on the bus of the unit distance.
  • the calculated distance feature information S is actually a distance value between the control node and the first mount node.
  • FIG. 6 is a schematic diagram of a first embodiment of a distance characteristic information measuring apparatus according to an embodiment of the present invention.
  • the apparatus may be applied to a control node in a bus system, where the bus system includes a control node and at least one mount node, and the control The node and the mount node communicate with each other through a bus; as shown in FIG.
  • the apparatus 600 includes: a first determining unit 610, configured to determine to send a ranging command from the first mount node to receive the first a length of time of the reply message of the mounting node; the first mount node is one of the at least one mount node;
  • the calculating unit 620 is configured to calculate distance feature information between the control node and the first mount node according to the length of time determined by the first determining unit 610.
  • the first determining unit 610 may include:
  • a listening subunit configured to listen for data transmission on the sending port and the receiving port
  • a transceiver unit configured to send a ranging command to the first mount node, and receive a reply message of the first mount node to the ranging command
  • Determining a subunit configured to determine a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port.
  • the determining subunit may be specifically configured to:
  • the length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port is determined by metering the number of pulses.
  • the first determining unit 610 is further configured to: repeatedly perform the step of determining the length of time by the preset number of times -1 times, to obtain a preset number of time lengths;
  • the calculating unit 620 may specifically include:
  • a filtering subunit configured to perform filtering processing on the preset number of times obtained by the first determining unit
  • An average calculation subunit configured to perform statistical calculation according to the filtering result, to obtain a statistical value of a length of time; and a distance calculation subunit, configured to calculate the control node and the first mount node according to the statistical value of the length of time Distance information between the features.
  • the filtering subunit may be specifically configured to: remove, for the preset number of times, a length of time in which the value is greater than or equal to the first set threshold, and a length of time in which the value is less than or equal to the second set threshold, The first set threshold is greater than a second set threshold.
  • the device may further include:
  • a first sending unit configured to send a ranging preparation command to the first mounting node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation
  • the first receiving unit is configured to receive a ranging preparation reply message sent by the first mounting node, where the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mounting node is completed.
  • the transceiver subunit and the computing unit may be implemented by a processor in the control node, and the listening subunit and the determining subunit may be implemented by a processor, or may be through a peripheral of the processor.
  • the hardware structure is implemented. For example, if it is determined that the subunit determines the time length by measuring the number of pulses, the listening subunit and the determining subunit may pass a CPLD (Compl Ex Programmable Logic Device, which can communicate with the main processor, Complex programmable logic device (FPGA) or FPGA (Field Programmable Gate Array) implementation, as a peripheral of the processor, through the pre-set protocol communication, accept the control of the processor.
  • CPLD Computer Ex Programmable Logic Device
  • the support frequency of CPLD can be higher than that of the processor, but there is no need to replace the higher performance processing by increasing the frequency of the processor, saving resources and power consumption, and when the frequency needs to be improved, there is no need to The original structure is changed, and the scalability is enhanced.
  • the CPLD measures the number of pulses
  • the number of pulses can be sent to the processor according to a preset data format and a communication protocol, and the processor is assisted to complete the counting of the pulse number.
  • a narrow pulse echo interference occurs, it will affect the triggering of the determining sub-unit for the initial time measurement of the time length, so that the determined time length is not accurate.
  • the initial trigger pulse of a certain width can be filtered out by the CPLD to ensure time. Triggering the initial time of the length measurement and the accuracy of the length of time Sex.
  • the distance feature information may specifically be a time length, a distance value, or a proportional value.
  • the apparatus determines a length of time from when the ranging command is sent to the first mount node to the reply message of the first mount node, and the distance between the control node and the first mount node is calculated according to the length of time.
  • the feature information thereby transmitting the message through the bus, realizes the measurement of the distance characteristic information between the control node and the first mount node; the distance feature information measurement method does not need to disconnect the bus, and the implementation is low in difficulty and low in cost.
  • 7 is a schematic diagram of a second embodiment of a distance measuring apparatus according to an embodiment of the present invention.
  • the apparatus may be applied to a mount node in a bus system, where the bus system includes a control node and at least one mount node, and the control node and The mount nodes communicate with each other through a bus; as shown in FIG. 7, the apparatus 700 includes:
  • a second receiving unit 710 configured to receive a ranging command sent by the control node;
  • the first mounting node is one of the at least one mounting node;
  • a second sending unit 720 configured to send a ranging command reply message to the control node, so that the control node listens to send a ranging command from the first mount node to receive the reply message of the first mount node.
  • Length of time calculating distance feature information between the control node and the first mount node according to the length of time.
  • the second receiving unit 710 is further configured to: receive a ranging preparation command sent by the control node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation;
  • the second sending unit 720 is further configured to: after completing the ranging preparation, send a ranging preparation reply message to the control node, where the ranging preparation reply message is used to notify the control node of the first hanging The ranging of the carrier node is ready to be completed.
  • the device cooperates with the control node, and after receiving the ranging command sent by the control node, sends a ranging command reply message to the control node, thereby realizing the distance between the control node and the first mounting node. Measurement of feature information. It will be apparent to those skilled in the art that the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM.
  • a diskette, an optical disk, etc. comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or in certain portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.
  • the various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
  • the description since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Radar Systems Or Details Thereof (AREA)
  • Small-Scale Networks (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)

Abstract

A method and device for measuring distance characteristic information. The method is applicable in a bus system. The bus system comprises a control node and at least one mounted node. The control node and the mounted node communicate with each other via a bus. The method comprises: a control node determines the length of time from the transmission of a distance measurement command to a first mounted node to the reception of a reply message from the first mounted node (201), where the first mounted node is one mounted node among the at least one mounted node; and, the control node calculates distance characteristic information between the control node and the first mounted node on the basis of the length of time (202). The method and device allow the measurement of the physical distance between the control node and each mounted node mounted on the bus and are inexpensive to implement.

Description

一种距离特征信息的测量方法及装置  Method and device for measuring distance characteristic information
技术领域 本发明涉及通信领域, 尤其涉及一种距离特征信息的测量方法及装置。 背景技术 目前, 如果需要测量两个物理节点之间的距离, 一般利用电介质传输不连续 产生的回波实现。 具体的, 通过测量发射信号和反射信号的时间差确定两个物理 节点之间的距离。 TECHNICAL FIELD The present invention relates to the field of communications, and in particular, to a method and an apparatus for measuring distance feature information. BACKGROUND OF THE INVENTION Currently, if it is necessary to measure the distance between two physical nodes, it is generally achieved by using an echo generated by discontinuous transmission of the dielectric. Specifically, the distance between the two physical nodes is determined by measuring the time difference between the transmitted signal and the reflected signal.
但是, 在总线系统例如 485总线系统中, 如果使用现有的距离测量方法测量 控制节点与总线上挂载的某一挂载节点之间的物理距离, 需要断开总线才能实 现, 总线上挂载多个挂载节点时, 使用现有的距离测量方法测量控制节点与总线 上挂载的各个挂载节点之间的物理距离的实现难度过大, 且实现成本高。 发明内容 本发明实施例提供一种距离特征信息的测量方法及装置,能够测量控制节点 与总线上挂载的各个挂载节点之间的距离特征信息, 且实现成本低。  However, in a bus system such as a 485 bus system, if the existing distance measurement method is used to measure the physical distance between the control node and a mounted node mounted on the bus, the bus needs to be disconnected to be implemented, and the bus is mounted. When multiple nodes are mounted, it is difficult to measure the physical distance between the control node and each mounted node mounted on the bus by using the existing distance measurement method, and the implementation cost is high. SUMMARY OF THE INVENTION Embodiments of the present invention provide a method and a device for measuring distance feature information, which are capable of measuring distance feature information between a control node and each mounted node mounted on a bus, and achieving low cost.
第一方面, 提供一种距离特征信息的测量方法, 应用于总线系统, 所述总线 系统包括控制节点和至少一个挂载节点, 所述控制节点和所述挂载节点之间通过 总线通信; 该方法包括:  In a first aspect, a method for measuring distance characteristic information is provided, which is applied to a bus system, the bus system includes a control node and at least one mount node, and the control node and the mount node communicate via a bus; Methods include:
控制节点确定从向第一挂载节点发送测距命令到接收到所述第一挂载节点 的回复消息的时间长度; 所述第一挂载节点是所述至少一个挂载节点中的一个挂 载节点;  The control node determines a length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node; the first mount node is one of the at least one mount node Carrier node
所述控制节点根据所述时间长度计算所述控制节点与所述第一挂载节点之 间的距离特征信息。  And the control node calculates distance feature information between the control node and the first mount node according to the length of time.
可选地,所述控制节点确定从向第一挂载节点发送测距命令到接收到所述第 一挂载节点的回复消息的时间长度, 包括:  Optionally, the control node determines a length of time from the sending of the ranging command to the first mount node to the receiving the reply message of the first mount node, including:
所述控制节点侦听发送端口和接收端口上是否有数据传输;  The control node listens to whether there is data transmission on the sending port and the receiving port;
所述控制节点向所述第一挂载节点发送测距命令,并且接收所述第一挂载节 点对于所述测距命令的回复消息; 所述控制节点确定从侦听到所述发送端口发送的测距命令的第一个比特到 所述接收端口接收到所述回复消息的第一个比特的时间长度。 The control node sends a ranging command to the first mount node, and receives a reply message of the first mount node for the ranging command; The control node determines a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port.
可选地,所述确定从侦听到所述发送端口发送的测距命令的第一个比特到所 述接收端口接收到所述回复消息的第一个比特的时间长度, 包括:  Optionally, the determining, by detecting the first bit of the ranging command sent by the sending port, to the receiving port, receiving the first bit of the reply message, includes:
通过计时的方式确定从所述发送端口侦听到所述测距命令的第一个比特开 始到所述接收端口接收到所述回复消息的第一个比特结束的时间长度; 或者, 通过计量脉冲数量的方式确定从所述发送端口侦听到所述测距命令的第一 个比特开始到所述接收端口接收到所述回复消息的第一个比特结束的时间长度。  Determining, by means of timing, a length of time from when the transmitting port detects the first bit of the ranging command to when the receiving port receives the end of the first bit of the reply message; or, by metering a pulse The numberwise manner determines the length of time from when the transmitting port hears the first bit of the ranging command to when the receiving port receives the end of the first bit of the reply message.
可选地,所述控制节点根据所述时间长度计算所述控制节点与所述第一挂载 节点之间的距离特征信息之前, 还包括:  Optionally, before the calculating, by the control node, the distance feature information between the control node and the first mount node, the method further includes:
所述控制节点重复执行预设次数 -1次所述确定时间长度的步骤,得到预设次 数个时间长度;  The control node repeatedly performs the step of determining the length of time by the preset number of times - 1 time to obtain a preset number of time lengths;
所述控制节点根据所述时间长度计算所述控制节点与所述第一挂载节点之 间的距离特征信息包括:  The calculating, by the control node, distance feature information between the control node and the first mount node according to the length of time includes:
所述控制节点对得到的预设次数个时间长度进行过滤处理;  The control node performs filtering processing on the obtained preset number of time lengths;
所述控制节点根据过滤结果进行统计计算, 得到时间长度的统计值; 所述控制节点根据所述时间长度的统计值计算所述控制节点与所述第一挂 载节点之间的距离特征信息。  The control node performs statistical calculation according to the filtering result to obtain a statistical value of the length of time; the control node calculates distance feature information between the control node and the first mounted node according to the statistical value of the length of time.
可选地, 所述控制节点对得到的预设次数个时间长度进行过滤处理, 包括: 对于所述预设次数个时间长度,所述控制节点去除其中数值大于等于第一设 定门限的时间长度以及数值小于等于第二设定门限的时间长度, 所述第一设定门 限大于第二设定门限。  Optionally, the control node performs filtering processing on the obtained preset number of times of time, including: for the preset number of times, the control node removes a length of time in which the value is greater than or equal to the first set threshold. And a length of time when the value is less than or equal to the second set threshold, and the first set threshold is greater than the second set threshold.
可选地,所述控制节点确定从向第一挂载节点发送测距命令到接收到所述第 一挂载节点的回复消息的时间长度之前, 还包括:  Optionally, the control node determines, before the sending of the ranging command to the first mount node to the time length of receiving the reply message of the first mount node, the method further includes:
所述控制节点向所述第一挂载节点发送测距准备命令,所述测距准备命令用 于指示所述第一挂载节点进行测距准备;  The control node sends a ranging preparation command to the first mount node, where the ranging preparation command is used to instruct the first mount node to perform ranging preparation;
所述控制节点接收所述第一挂载节点发送的测距准备回复消息,所述测距准 备回复消息用于告知所述控制节点所述第一挂载节点的测距准备完成。  The control node receives a ranging preparation reply message sent by the first mount node, and the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mount node is completed.
可选地, 所述距离特征信息具体为时间长度、 距离值或比例值。  Optionally, the distance feature information is specifically a time length, a distance value, or a proportional value.
第二方面, 提供一种距离特征信息的测量方法, 应用于总线系统, 所述总线 系统包括控制节点和至少一个挂载节点, 所述控制节点和所述挂载节点之间通过 总线通信; 该方法包括: In a second aspect, a method for measuring distance characteristic information is provided, which is applied to a bus system, where the bus system includes a control node and at least one mount node, and the control node and the mount node pass Bus communication; the method includes:
第一挂载节点接收所述控制节点发送的测距命令;所述第一挂载节点是所述 至少一个挂载节点中的一个挂载节点;  The first mount node receives the ranging command sent by the control node; the first mount node is one of the at least one mount node;
第一挂载节点向所述控制节点发送测距命令回复消息,以便所述控制节点侦 听从向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复消息的时 间长度、 根据所述时间长度计算所述控制节点与所述第一挂载节点之间的距离特 征信息。  The first mount node sends a ranging command reply message to the control node, so that the control node listens for a length of time from sending a ranging command to the first mount node to receiving the reply message of the first mount node Calculating distance feature information between the control node and the first mount node according to the length of time.
可选地,所述第一挂载节点接收所述控制节点发送的测距命令之前,还包括: 所述第一挂载节点接收控制节点发送的测距准备命令,所述测距准备命令用 于指示所述第一挂载节点进行测距准备;  Optionally, before the first loading node receives the ranging command sent by the control node, the method further includes: the first mounting node receiving a ranging preparation command sent by the control node, where the ranging preparation command is used Instructing the first mount node to perform ranging preparation;
所述第一挂载节点在完成测距准备后,向所述控制节点发送测距准备回复消 息, 所述测距准备回复消息用于告知所述控制节点所述第一挂载节点的测距准备 完成。  After completing the ranging preparation, the first loading node sends a ranging preparation reply message to the control node, where the ranging preparation reply message is used to notify the control node of the ranging of the first mounting node. Ready to finish.
第三方面, 提供一种距离特征信息的测量装置, 应用于总线系统中的控制节 点, 所述总线系统包括控制节点和至少一个挂载节点, 所述控制节点和所述挂载 节点之间通过总线通信; 该装置包括:  In a third aspect, a measurement device for distance feature information is provided, which is applied to a control node in a bus system, the bus system includes a control node and at least one mount node, and the control node and the mount node pass Bus communication; the device includes:
第一确定单元,用于确定从向第一挂载节点发送测距命令到接收到所述第一 挂载节点的回复消息的时间长度; 所述第一挂载节点是所述至少一个挂载节点中 的一个挂载节点;  a first determining unit, configured to determine a length of time from sending a ranging command to the first mount node to receiving the reply message of the first mount node; the first mount node is the at least one mount One of the nodes in the node;
计算单元,用于根据所述第一确定单元确定的所述时间长度计算所述控制节 点与所述第一挂载节点之间的距离特征信息。  And a calculating unit, configured to calculate distance feature information between the control node and the first mount node according to the length of time determined by the first determining unit.
可选地, 所述第一确定单元包括:  Optionally, the first determining unit includes:
侦听子单元, 用于侦听发送端口和接收端口上是否有数据传输;  a listening subunit, configured to listen for data transmission on the sending port and the receiving port;
收发子单元, 用于向所述第一挂载节点发送测距命令, 并且接收所述第一挂 载节点对于所述测距命令的回复消息;  a transceiver unit, configured to send a ranging command to the first mount node, and receive a reply message of the first mount node to the ranging command;
确定子单元,用于确定从侦听到所述发送端口发送的测距命令的第一个比特 到所述接收端口接收到所述回复消息的第一个比特的时间长度。  Determining a subunit for determining a length of time from the first bit of the ranging command sent from the listening port to the first bit of the reply message received by the receiving port.
可选地, 所述确定子单元具体用于:  Optionally, the determining subunit is specifically configured to:
通过计时的方式确定从侦听到所述发送端口发送的测距命令的第一个比特 到所述接收端口接收到所述回复消息的第一个比特的时间长度; 或者,  Determining, by means of timing, a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port; or
通过计量脉冲数量的方式确定从侦听到所述发送端口发送的测距命令的第 一个比特到所述接收端口接收到所述回复消息的第一个比特的时间长度。 Determining the range of the ranging command sent from the listening port by detecting the number of pulses The length of time from one bit to the receiving port receiving the first bit of the reply message.
可选地,所述第一确定单元还用于: 重复执行预设次数 -1次所述确定时间长 度的步骤, 得到预设次数个时间长度;  Optionally, the first determining unit is further configured to: repeatedly perform the preset number of times - the step of determining the length of time, to obtain a preset number of time lengths;
计算单元具体包括:  The calculation unit specifically includes:
过滤子单元,用于对所述第一确定单元得到的预设次数个时间长度进行过滤 处理;  a filtering subunit, configured to filter a preset number of times obtained by the first determining unit;
平均值计算子单元, 用于根据过滤结果进行统计计算, 得到时间长度的统计 值;  The average calculation subunit is configured to perform statistical calculation according to the filtering result to obtain a statistical value of the length of time;
距离计算子单元,用于根据所述时间长度的统计值计算所述控制节点与所述 第一挂载节点之间的距离特征信息。  a distance calculation unit, configured to calculate distance feature information between the control node and the first mount node according to the statistical value of the time length.
可选地, 所述过滤子单元具体用于: 对于所述预设次数个时间长度, 去除其 中数值大于等于第一设定门限的时间长度以及数值小于等于第二设定门限的时 间长度, 所述第一设定门限大于第二设定门限。  Optionally, the filtering subunit is specifically configured to: remove, for the preset number of times, a length of time in which the value is greater than or equal to the first set threshold, and a time length in which the value is less than or equal to the second set threshold, The first set threshold is greater than the second set threshold.
可选地, 还包括:  Optionally, the method further includes:
第一发送单元, 用于向所述第一挂载节点发送测距准备命令, 所述测距准备 命令用于指示所述第一挂载节点进行测距准备;  a first sending unit, configured to send a ranging preparation command to the first mounting node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation;
第一接收单元, 用于接收所述第一挂载节点发送的测距准备回复消息, 所述 测距准备回复消息用于告知所述控制节点所述第一挂载节点的测距准备完成。  And a first receiving unit, configured to receive a ranging preparation reply message sent by the first loading node, where the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mounting node is completed.
可选地, 所述距离特征信息具体为时间长度、 距离值或比例值。  Optionally, the distance feature information is specifically a time length, a distance value, or a proportional value.
第四方面, 提供一种距离特征信息的测量装置, 应用于总线系统中的挂载节 点, 所述总线系统包括控制节点和至少一个挂载节点, 所述控制节点和所述挂载 节点之间通过总线通信; 该装置包括:  A fourth aspect provides a measurement device for distance feature information, which is applied to a mount node in a bus system, the bus system including a control node and at least one mount node, and between the control node and the mount node Communicating via the bus; the device comprises:
第二接收单元, 用于接收所述控制节点发送的测距命令; 所述第一挂载节点 是所述至少一个挂载节点中的一个挂载节点;  a second receiving unit, configured to receive a ranging command sent by the control node; the first mounting node is one of the at least one mounting node;
第二发送单元, 用于向所述控制节点发送测距命令回复消息, 以便所述控制 节点侦听从向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复消 息的时间长度、 根据所述时间长度计算所述控制节点与所述第一挂载节点之间的 距离特征信息。  a second sending unit, configured to send a ranging command reply message to the control node, so that the control node listens to send a ranging command from the first mounting node to the receiving the reply message of the first mounting node. a length of time, and calculating distance feature information between the control node and the first mount node according to the length of time.
可选地, 所述第二接收单元还用于: 接收控制节点发送的测距准备命令, 所 述测距准备命令用于指示所述第一挂载节点进行测距准备;  Optionally, the second receiving unit is further configured to: receive a ranging preparation command sent by the control node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation;
所述第二发送单元还用于: 在完成测距准备后, 向所述控制节点发送测距准 备回复消息, 所述测距准备回复消息用于告知所述控制节点所述第一挂载节点的 测距准备完成。 The second sending unit is further configured to: after the ranging preparation is completed, send a ranging standard to the control node. The standby response message is used to notify the control node that the ranging preparation of the first mount node is completed.
本发明实施例中, 控制节点和挂载节点之间通过总线通信; 控制节点确定从 向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复消息的时间长 度; 所述第一挂载节点是所述至少一个挂载节点中的一个挂载节点; 所述控制节 点根据所述时间长度计算所述控制节点与所述第一挂载节点之间的距离特征信 息。 从而通过总线传输消息的方式实现了控制节点与第一挂载节点之间距离特征 信息的测量; 这一距离特征信息的测量方法中无需断开总线, 实现难度低且成本 低。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例 或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动性的前提下, 还可以根据这些附图获得其他的附图。  In the embodiment of the present invention, the control node and the mount node communicate through the bus; the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node; The first mount node is one of the at least one mount node; the control node calculates distance feature information between the control node and the first mount node according to the length of time. Therefore, the measurement of the distance characteristic information between the control node and the first mount node is realized by transmitting the message through the bus; the measurement method of the distance feature information does not need to disconnect the bus, and the implementation is low in difficulty and low in cost. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and obviously, in the following description The drawings are only some of the embodiments of the present invention, and other drawings may be obtained from those skilled in the art without departing from the drawings.
图 1为本发明实施例应用场景示例图;  FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;
图 2为本发明实施例距离特征信息的测量方法第一实施例示意图; 图 3为本发明实施例距离特征信息的测量方法第二实施例示意图; 图 4为本发明实施例距离特征信息的测量方法第三实施例示意图; 图 5为本发明实施例距离特征信息的测量方法第四实施例示意图; 图 6为本发明实施例距离特征信息的测量装置第一实施例示意图; 图 7为本发明实施例距离特征信息的测量装置第二实施例示意图。 具体实施方式 这里将详细地对示例性实施例进行说明, 其示例表示在附图中。下面的描述 涉及附图时, 除非另有表示, 不同附图中的相同数字表示相同或相似的要素。 以 下示例性实施例中所描述的实施方式并不代表与本发明相一致的所有实施方式。 相反, 它们仅是与如所附权利要求书中所详述的、 本发明的一些方面相一致的装 置和方法的例子。  2 is a schematic diagram of a first embodiment of a method for measuring distance feature information according to an embodiment of the present invention; FIG. 3 is a schematic diagram of a second embodiment of a method for measuring distance feature information according to an embodiment of the present invention; FIG. 4 is a measurement of distance feature information according to an embodiment of the present invention; FIG. 5 is a schematic diagram of a fourth embodiment of a method for measuring distance characteristic information according to an embodiment of the present invention; FIG. 6 is a schematic diagram of a first embodiment of a distance characteristic information measuring apparatus according to an embodiment of the present invention; A schematic diagram of a second embodiment of a measuring device for distance characteristic information of an embodiment. BEST MODE FOR CARRYING OUT THE INVENTION Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description of the drawings refers to the same or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with aspects of the invention as detailed in the appended claims.
参见图 1, 为本发明实施例距离特征信息测量方法及装置所应用场景示例 图。 如图 1所示, 本发明实施例距离特征信息测量方法及装置可以应用于总线系 统中, 总线系统中包括控制节点 110、 至少一个挂载节点 120 以及总线 130 ; 其 中, 控制节点 110与各个挂载节点 120之间通过总线 130进行通信, 各个挂载节 点 120均挂载在总线 130上。 FIG. 1 is a schematic diagram showing an example of a method for measuring distance feature information and a device according to an embodiment of the present invention. As shown in FIG. 1 , the method and device for measuring distance information in the embodiment of the present invention can be applied to a bus system. In the system, the bus system includes a control node 110, at least one mount node 120, and a bus 130. The control node 110 communicates with each of the mount nodes 120 via a bus 130, and each mount node 120 is mounted on the bus. 130.
优选地, 总线 130最好连续且介质唯一, 以尽量保证本发明实施例距离特征 信息测量结果的准确性。  Preferably, the bus 130 is preferably continuous and the media is unique to ensure the accuracy of the distance information measurement results of embodiments of the present invention.
在以上场景示例的基础上对本发明实施例距离特征信息的测量方法进行更 为详细的说明。  The measurement method of the distance feature information of the embodiment of the present invention will be described in more detail on the basis of the above scenario examples.
参见图 2, 为本发明实施例距离特征信息的测量方法第一实施例示意图, 该 方法包括:  FIG. 2 is a schematic diagram of a first embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
步骤 201 : 控制节点确定从向第一挂载节点发送测距命令到接收到第一挂载 节点的回复消息的时间长度;  Step 201: The control node determines a length of time from when the ranging command is sent to the first mount node to the reply message received by the first mount node.
其中,本发明实施例中的第一挂载节点是指上述挂载在总线上的至少一个挂 载节点中的任一个挂载节点。  The first mount node in the embodiment of the present invention refers to any one of the at least one mount node mounted on the bus.
步骤 202 : 控制节点根据时间长度计算控制节点与第一挂载节点之间的距离 特征信息。  Step 202: The control node calculates distance feature information between the control node and the first mount node according to the length of time.
本发明实施例中的距离特征信息可以为时间长度、距离值或比例值等能够表 征物理距离信息的参数;  The distance feature information in the embodiment of the present invention may be a parameter capable of expressing physical distance information such as a time length, a distance value, or a proportional value;
其中,时间长度可以为控制节点测得的从控制节点开始发送信息至第一挂载 节点接收到该信息的时间长度, 例如 4s, 也可以为控制节点测得的从控制节点向 第一挂载节点发送信息至接收到第一挂载节点反馈信息的时间长度, 例如 8s; 距离值可以为控制节点与第一挂载节点之间的物理距离, 例如 50m;  The length of time may be the length of time that the control node detects that the information is sent from the control node to the first mount node, for example, 4s, and may also be the first mount from the control node to the control node. The length of time that the node sends information to receive the feedback information of the first mount node, for example, 8s; the distance value may be a physical distance between the control node and the first mount node, for example, 50m;
比例值可以为控制节点测得的当前第一挂载节点的时间长度与离控制节点 最远的挂载节点的时间长度的比例值, 例如 5%, 比例值也可以为控制节点测得 的当前第一挂载节点的时间长度与离控制节点最近的挂载节点的时间长度的比 例值, 例如 3, 本发明实施例对此不作限定。  The ratio value may be a ratio of the length of the current first mount node measured by the control node to the length of the mount node farthest from the control node, for example, 5%, and the proportional value may also be the current measured by the control node. The ratio of the length of the first mount node to the length of the mount node closest to the control node, for example, 3, is not limited in this embodiment of the present invention.
本实施例中,控制节点确定从向第一挂载节点发送测距命令到接收到第一挂 载节点的回复消息的时间长度, 根据时间长度计算控制节点与第一挂载节点之间 的距离特征信息, 从而通过总线传输消息的方式实现了控制节点与第一挂载节点 之间距离特征信息的测量; 这一距离特征信息测量方法中无需断开总线, 实现难 度低且成本低。 参见图 3, 为本发明实施例距离特征信息的测量方法第二实施例示意图, 该 方法包括: In this embodiment, the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, and calculating the distance between the control node and the first mount node according to the length of time. The feature information, thereby transmitting the message through the bus, realizes the measurement of the distance characteristic information between the control node and the first mount node; the distance feature information measurement method does not need to disconnect the bus, and the implementation is low in difficulty and low in cost. FIG. 3 is a schematic diagram of a second embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
步骤 301 : 第一挂载节点接收控制节点发送的测距命令;  Step 301: The first mount node receives a ranging command sent by the control node.
步骤 302 : 第一挂载节点向控制节点发送测距命令回复消息, 以便控制节点 确定从向第一挂载节点发送测距命令到接收到第一挂载节点的回复消息的时间长度、 根据时间长度计算控制节点与第一挂载节点之间的距离特征信息。  Step 302: The first mount node sends a ranging command reply message to the control node, so that the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, according to the time. The length calculates the distance characteristic information between the control node and the first mount node.
本实施例中, 第一挂载节点与控制节点配合, 在接收到控制节点发送的测距命 令后向控制节点发送测距命令回复消息, 从而实现了控制节点对控制节点与第一 挂载节点之间距离特征信息的测量。 参见图 4, 为本发明实施例距离特征信息的测量方法第三实施例示意图, 该 方法包括:  In this embodiment, the first mount node cooperates with the control node, and after receiving the ranging command sent by the control node, sends a ranging command reply message to the control node, thereby implementing the control node to the control node and the first mount node. Measurement of distance information between features. 4 is a schematic diagram of a third embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
步骤 401 : 控制节点向第一挂载节点发送测距准备命令, 所述测距准备命令用 于指示第一挂载节点进行测距准备。  Step 401: The control node sends a ranging preparation command to the first mounting node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation.
步骤 402:第一挂载节点接收到所述测距准备命令后,执行扫描总线和收到命令 立即回复的任务, 并且, 向控制节点发送测距准备回复消息, 所述测距准备回复消息 用于告知所述控制节点所述第一挂载节点的测距准备完成。  Step 402: After receiving the ranging preparation command, the first mount node performs a task of scanning the bus and receiving the command to immediately reply, and sending a ranging preparation reply message to the control node, where the ranging preparation reply message is used. The distance measurement preparation of the first mount node of the control node is notified to be completed.
可选地, 为了距离测量结果的准确性, 第一挂载节点在执行扫描总线和收到 命令立即回复任务的同时, 可以停止其他任务的执行。  Optionally, for the accuracy of the distance measurement result, the first mount node may stop the execution of other tasks while executing the scan bus and receiving the command to immediately reply to the task.
一般的, 控制节点接收到测距准备回复消息后, 还需要确定总线上无其他数据 传输, 处于空闲状态, 以免干扰后续控制节点对于时间长度的确定, 保证距离测量结 果的准确性。  Generally, after receiving the ranging preparation reply message, the control node needs to determine that there is no other data transmission on the bus, and is in an idle state, so as not to interfere with the determination of the time length of the subsequent control node, and ensure the accuracy of the distance measurement result.
步骤 403: 控制节点开始侦听自身的发送端口和接收端口是否有数据传输。 其中, 控制节点的发送端口用于通过总线向不同的挂载节点发送数据; 控制 节点的接收端口用于通过总线接收不同挂载节点向其发送的数据。  Step 403: The control node starts to listen to whether its own sending port and receiving port have data transmission. The sending port of the control node is used to send data to different mount nodes through the bus; the receiving port of the control node is used to receive data sent to different mount nodes through the bus.
步骤 404: 控制节点向第一挂载节点发送测距命令;  Step 404: The control node sends a ranging command to the first mount node.
步骤 405 :第一挂载节点接收到所述测距命令后,立即向第一挂载节点发送测距 命令回复消息;  Step 405: After receiving the ranging command, the first mount node immediately sends a ranging command reply message to the first mount node.
步骤 406:控制节点接收所述测距命令回复消息,确定从发送端口侦听到所述测 距命令的第一个比特到所述接收端口接收到所述回复消息的第一个比特的时间长度。  Step 406: The control node receives the ranging command reply message, and determines a length of time from when the sending port detects the first bit of the ranging command to the receiving port receives the first bit of the reply message. .
其中, 由于在执行步骤 403之前已经确定总线处于空闲状态, 因此, 控制节点 侦听到的发送端口发出数据必然是测距命令,而侦听到的接收端口接收到的数据必然 是测距命令回复消息。通过确定从侦听到所述发送端口发送的第一个比特开始到所述 接收端口接收到第一个比特结束的时间长度,可以准确地得到测距命令和测距命令回 复消息在总线上传输的时间长度。 Wherein, since the bus has been determined to be in an idle state before performing step 403, the control node The data sent by the sending port that is heard must be a ranging command, and the data received by the receiving port that is heard must be a ranging command reply message. By determining the length of time from the detection of the first bit transmitted by the transmitting port to the end of the receiving of the first bit by the receiving port, the ranging command and the ranging command reply message can be accurately transmitted on the bus. Length of time.
实际上, 这一时间长度中还包括第一挂载节点接收测距命令和发送测距命令回 复消息的处理时间,但是这一处理时间相对于时间长度而言极为微小,本发明实施例 中忽略不计。  In fact, the length of time includes the processing time of the first mount node receiving the ranging command and the sending the ranging command reply message, but the processing time is extremely small with respect to the length of time, which is ignored in the embodiment of the present invention. Excluding.
其中, 本步骤中控制节点确定所述时间长度时, 可以通过计时的方式实现, 或 者也可以通过计量脉冲数量的方式实现。  In this step, when the control node determines the length of time, it may be implemented by timing, or may be implemented by measuring the number of pulses.
具体的, 当通过计时的方式实现时, 可以在控制节点中设置计时器, 从控制 节点侦听到所述发送端口发送的测距命令的第一个比特开始计时, 到控制节点侦听 到接收端口接收到回复消息的第一个比特结束计时。  Specifically, when implemented by timing, a timer may be set in the control node, and the first bit of the ranging command sent by the sending port is detected from the control node, and the control node detects the receiving. The port receives the first bit of the reply message and ends timing.
当通过计量脉冲数量的方式实现时, 可以预先设定某一预设频率的脉冲, 从控 制节点侦听到所述发送端口发送的测距命令的第一个比特开始对脉冲计数, 到控制 节点侦听到接收端口接收到回复消息的第一个比特结束计数。  When the number of pulses is measured, a pulse of a certain preset frequency may be preset, and the first bit of the ranging command sent by the sending port is detected from the control node to start counting pulses, to the control node. The first bit ending count of the reply message received by the receiving port is detected.
在计量脉冲数量的方式下, 可以通过调整脉冲的频率来对应调整时间长度的精 度,进而调整距离测量结果的精度。具体的,脉冲的频率越高, 时间长度的精度越高, 距离测量结果的精度越高。  In the mode of measuring the number of pulses, the accuracy of the distance measurement result can be adjusted by adjusting the frequency of the pulse to adjust the accuracy of the time length. Specifically, the higher the frequency of the pulse, the higher the accuracy of the time length, and the higher the accuracy of the distance measurement result.
步骤 407: 控制节点根据时间长度计算控制节点与第一挂载节点之间的距离特 征信息。  Step 407: The control node calculates distance feature information between the control node and the first mount node according to the length of time.
其中, 可以预先确定单位距离的总线上数据传输往返时间, 则控制节点可以通 过以下公式计算控制节点与第一挂载节点之间的距离特征信息:  Wherein, the data transmission round-trip time on the bus of the unit distance may be determined in advance, and the control node may calculate the distance characteristic information between the control node and the first mount node by using the following formula:
S=T/t; S=T/t ;
其中, S为控制节点与第一挂载节点之间的距离特征信息, T为时间长度, t为 单位距离的总线上数据传输往返时间。这里,通过公式计算得到的距离特征信息实际 为控制节点与第一挂载节点之间的距离值。  Where S is the distance characteristic information between the control node and the first mount node, T is the time length, and t is the data transmission round-trip time on the bus with a unit distance. Here, the distance feature information calculated by the formula is actually a distance value between the control node and the first mount node.
例如, 假设 lm的总线上数据传输往返时间为 10ms, 时间长度 T为 500ms, 那 么, 控制节点与第一挂载节点之间的距离特征信息 S为 50m。  For example, assuming that the data transmission round-trip time on the bus of lm is 10 ms and the time length T is 500 ms, the distance characteristic information S between the control node and the first mount node is 50 m.
其中, 单位距离的总线上数据传输往返时间可以通过实验的方式测得, 具体测 量方式与本发明实施例时间长度的测量方法类似,区别仅在于实验之前预先已经获知 了所测量总线的长度为单位距离, 例如 lm。 本实施例中,控制节点确定从向第一挂载节点发送测距命令到接收到第一挂 载节点的回复消息的时间长度, 根据时间长度计算控制节点与第一挂载节点之间 的距离特征信息, 从而通过总线传输消息的方式实现了控制节点与第一挂载节点 之间距离特征信息的测量; 这一距离特征信息的测量方法中无需断开总线, 实现 难度低且成本低。 参见图 5, 为本发明实施例距离特征信息的测量方法第四实施例示意图, 该方 法包括: The data transmission round-trip time on the bus of the unit distance can be measured experimentally, and the specific measurement manner is similar to the measurement method of the time length of the embodiment of the present invention, and the difference is only that the length of the measured bus is known in advance before the experiment. Distance, such as lm. In this embodiment, the control node determines the length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, and calculating the distance between the control node and the first mount node according to the length of time. The feature information, thereby transmitting the message through the bus, realizes the measurement of the distance characteristic information between the control node and the first mount node; the distance feature information measurement method does not need to disconnect the bus, and the implementation is low in difficulty and low in cost. FIG. 5 is a schematic diagram of a fourth embodiment of a method for measuring distance feature information according to an embodiment of the present invention, where the method includes:
步骤 501〜步骤 506与步骤 401〜步骤 406相同, 这里不赘述。  Steps 501 to 506 are the same as steps 401 to 406, and are not described here.
步骤 507: 控制节点重复执行预设次数 -1次步骤 504〜步骤 506, 共得到预设次 数个时间长度。  Step 507: The control node repeatedly executes the preset number of times - 1 step 504 to 506, and obtains a preset number of time lengths.
其中, 所述预设次数的具体数值可以在实际应用中自主设置, 这里并不限制。 其中, 每执行一次步骤 504〜步骤 506, 即得到一个时间长度, 步骤 507中执行 预设次数 -1次步骤 504〜步骤 506加上之前执行步骤 504〜步骤 506, 共执行预设次数 次步骤 504〜步骤 506, 相应得到预设次数个时间长度。  The specific value of the preset number of times may be set autonomously in an actual application, and is not limited herein. Each step 504 to step 506 is performed, that is, a time length is obtained. In step 507, the preset number of times is performed -1 times, the steps 504 to 506 are added, and the steps 504 to 506 are performed before, and the preset number of times is performed 504. ~ Step 506, correspondingly obtaining a preset number of time lengths.
步骤 508: 控制节点对得到的预设次数个时间长度进行过滤处理;  Step 508: The control node performs filtering processing on the obtained preset number of times of time length;
可选地, 对于所述预设次数个时间长度, 控制节点可以去除其中数值大于等于 第一设定门限的时间长度以及数值小于等于第二设定门限的时间长度,从而实现所述 过滤处理。 所述第一设定门限大于第二设定门限。  Optionally, for the preset number of times, the control node may remove the time length in which the value is greater than or equal to the first set threshold and the time length in which the value is less than or equal to the second set threshold, thereby implementing the filtering process. The first set threshold is greater than a second set threshold.
其中, 第一设定门限和第二设定门限的数值可以在实际应用中自主设定, 例如 第一设定门限可以为数值最大的时间长度, 第二设定门限可以为数值最小的时间长 度。优选的,第一设定门限和第二设定门限之间的数值范围可以为时间长度出现概率 大于预设值的区间, 这里不限制。  The values of the first set threshold and the second set threshold may be set autonomously in practical applications, for example, the first set threshold may be the maximum length of time, and the second set threshold may be the minimum length of time. . Preferably, the value range between the first set threshold and the second set threshold may be an interval in which the probability of occurrence of the time length is greater than a preset value, which is not limited herein.
例如, 控制节点得到的预设次数个时间长度分别为: 508ms、 501ms、 498ms、 4 92ms和 501ms, 第一设定门限为 508ms、 第二设定门限为 492ms, 贝 lj, 去掉数值 50 For example, the preset time lengths obtained by the control node are: 508ms, 501ms, 498ms, 4 92ms, and 501ms, the first set threshold is 508ms, the second set threshold is 492ms, and the shell lj is removed.
8ms以及 492ms, 完成过滤处理, 得到过滤结果为: 501ms、 498ms和 501ms。 8ms and 492ms, the filtering process is completed, and the filtering results are: 501ms, 498ms and 501ms.
步骤 509: 控制节点根据过滤结果进行统计计算, 得到时间长度的统计值; 此处的统计计算可以是算数平均计算、 几何平均计算、 根据权重系数计算等计 算方式。  Step 509: The control node performs statistical calculation according to the filtering result to obtain a statistical value of the length of time. The statistical calculation herein may be an arithmetic average calculation, a geometric average calculation, and a calculation method according to the weight coefficient calculation.
仍以步骤 508为例, 过滤结果为 501ms、 498ms和 501ms, 则算数平均计算得 到时间长度的平均值为: (501+498+501 ) /3=500ms。 步骤 510:控制节点根据时间长度的统计值计算所述控制节点与所述第一挂载节 点之间的距离特征信息。 Still taking step 508 as an example, the filtering results are 501ms, 498ms, and 501ms, and the average value of the average length of the arithmetic calculation is: (501+498+501) /3=500ms. Step 510: The control node calculates distance feature information between the control node and the first mount node according to a statistical value of a length of time.
其中, 可以预先确定单位距离的总线上数据传输往返时间, 则控制节点可以通 过以下公式计算控制节点与第一挂载节点之间的距离特征信息:  Wherein, the data transmission round-trip time on the bus of the unit distance may be determined in advance, and the control node may calculate the distance characteristic information between the control node and the first mount node by using the following formula:
S=Ts/t; S=Ts/t ;
其中, S为控制节点与第一挂载节点之间的距离特征信息, Ts为时间长度的平 均值, t为单位距离的总线上数据传输往返时间。 这里, 计算得到的距离特征信息 S 实际为控制节点与第一挂载节点之间的距离值。  Where S is the distance characteristic information between the control node and the first mount node, Ts is the average value of the time length, and t is the data transmission round-trip time on the bus of the unit distance. Here, the calculated distance feature information S is actually a distance value between the control node and the first mount node.
本实施例中, 重复执行预设次数次步骤 504〜步骤 506, 得到预设次数个时间长 度, 对预设次数个时间长度进行过滤处理、 计算平均值, 得到时间长度的平均值后进 行距离特征信息的计算, 使得计算得到的距离特征信息更为准确。 参见图 6,为本发明实施例距离特征信息的测量装置第一实施例示意图,该装置 可以应用于总线系统中的控制节点, 所述总线系统包括控制节点和至少一个挂载节 点,所述控制节点和所述挂载节点之间通过总线通信;如图 6所示,该装置 600包括: 第一确定单元 610,用于确定从向第一挂载节点发送测距命令到接收到所述第一 挂载节点的回复消息的时间长度;所述第一挂载节点是所述至少一个挂载节点中的一 个挂载节点;  In this embodiment, the preset number of times steps 504 to 506 are repeatedly performed to obtain a preset number of time lengths, and the preset time lengths are filtered, the average value is calculated, and the average of the time lengths is obtained, and the distance characteristics are obtained. The calculation of the information makes the calculated distance feature information more accurate. 6 is a schematic diagram of a first embodiment of a distance characteristic information measuring apparatus according to an embodiment of the present invention. The apparatus may be applied to a control node in a bus system, where the bus system includes a control node and at least one mount node, and the control The node and the mount node communicate with each other through a bus; as shown in FIG. 6, the apparatus 600 includes: a first determining unit 610, configured to determine to send a ranging command from the first mount node to receive the first a length of time of the reply message of the mounting node; the first mount node is one of the at least one mount node;
计算单元 620,用于根据所述第一确定单元 610确定的所述时间长度计算所述控 制节点与所述第一挂载节点之间的距离特征信息。  The calculating unit 620 is configured to calculate distance feature information between the control node and the first mount node according to the length of time determined by the first determining unit 610.
可选地, 所述第一确定单元 610可以包括:  Optionally, the first determining unit 610 may include:
侦听子单元, 用于侦听发送端口和接收端口上是否有数据传输;  a listening subunit, configured to listen for data transmission on the sending port and the receiving port;
收发子单元, 用于向所述第一挂载节点发送测距命令, 并且接收所述第一挂载 节点对于所述测距命令的回复消息;  a transceiver unit, configured to send a ranging command to the first mount node, and receive a reply message of the first mount node to the ranging command;
确定子单元, 用于确定从侦听到所述发送端口发送的测距命令的第一个比特到 所述接收端口接收到所述回复消息的第一个比特的时间长度。  Determining a subunit, configured to determine a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port.
可选地, 所述确定子单元具体可以用于:  Optionally, the determining subunit may be specifically configured to:
通过计时的方式确定从侦听到所述发送端口发送的测距命令的第一个比特到所 述接收端口接收到所述回复消息的第一个比特的时间长度; 或者,  Determining, by means of timing, a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port; or
通过计量脉冲数量的方式确定从侦听到所述发送端口发送的测距命令的第一个 比特到所述接收端口接收到所述回复消息的第一个比特的时间长度。 可选地, 所述第一确定单元 610还可以用于: 重复执行预设次数 -1次所述确定 时间长度的步骤, 得到预设次数个时间长度; The length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port is determined by metering the number of pulses. Optionally, the first determining unit 610 is further configured to: repeatedly perform the step of determining the length of time by the preset number of times -1 times, to obtain a preset number of time lengths;
计算单元 620具体可以包括:  The calculating unit 620 may specifically include:
过滤子单元, 用于对所述第一确定单元得到的预设次数个时间长度进行过滤处 理;  a filtering subunit, configured to perform filtering processing on the preset number of times obtained by the first determining unit;
平均值计算子单元, 用于根据过滤结果进行统计计算, 得到时间长度的统计值; 距离计算子单元, 用于根据所述时间长度的统计值计算所述控制节点与所述第 一挂载节点之间的距离特征信息。  An average calculation subunit, configured to perform statistical calculation according to the filtering result, to obtain a statistical value of a length of time; and a distance calculation subunit, configured to calculate the control node and the first mount node according to the statistical value of the length of time Distance information between the features.
可选地, 所述过滤子单元具体可以用于: 对于所述预设次数个时间长度, 去除 其中数值大于等于第一设定门限的时间长度以及数值小于等于第二设定门限的时间 长度, 所述第一设定门限大于第二设定门限。  Optionally, the filtering subunit may be specifically configured to: remove, for the preset number of times, a length of time in which the value is greater than or equal to the first set threshold, and a length of time in which the value is less than or equal to the second set threshold, The first set threshold is greater than a second set threshold.
可选地, 该装置还可以包括:  Optionally, the device may further include:
第一发送单元, 用于向所述第一挂载节点发送测距准备命令, 所述测距准备命 令用于指示所述第一挂载节点进行测距准备;  a first sending unit, configured to send a ranging preparation command to the first mounting node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation;
第一接收单元, 用于接收所述第一挂载节点发送的测距准备回复消息, 所述测 距准备回复消息用于告知所述控制节点所述第一挂载节点的测距准备完成。  The first receiving unit is configured to receive a ranging preparation reply message sent by the first mounting node, where the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mounting node is completed.
在一种可能的实现方式中, 所述收发子单元和计算单元可以通过控制节点中的 处理器实现, 而侦听子单元和确定子单元可以通过处理器实现, 也可以通过处理器的 外设硬件结构实现,例如,假设确定子单元通过计量脉冲数量的方式确定所述时间长 度, 则所述侦听子单元和确定子单元可以通过可以与主处理器通信的 CPLD (Compl ex Programmable Logic Device, 复杂可编程逻辑器件) 或者 FPGA (Field Program mable Gate Array, 现场可编程门阵列) 实现, 作为处理器的外设, 通过预先设定的 协议通信, 接受处理器的控制。  In a possible implementation manner, the transceiver subunit and the computing unit may be implemented by a processor in the control node, and the listening subunit and the determining subunit may be implemented by a processor, or may be through a peripheral of the processor. The hardware structure is implemented. For example, if it is determined that the subunit determines the time length by measuring the number of pulses, the listening subunit and the determining subunit may pass a CPLD (Compl Ex Programmable Logic Device, which can communicate with the main processor, Complex programmable logic device (FPGA) or FPGA (Field Programmable Gate Array) implementation, as a peripheral of the processor, through the pre-set protocol communication, accept the control of the processor.
以 CPLD为例, CPLD的支持工作频率可以高于处理器, 却不需要因为提高处 理器的频率而更换更高性能的处理, 节省了资源和功耗, 而且在频率需要提高时, 不 需要对原有结构进行改变, 可伸缩性增强; 而且, CPLD计量脉冲数量后, 可以按照 预设的数据格式和通信协议将脉冲数量发送给处理器,协助处理器完成脉冲数量的计 另外, 总线上如果出现窄脉冲回波干扰时, 会影响到确定子单元对于时间长度 计量初始时刻的触发, 使得确定的时间长度不准确, 此时, 可以通过 CPLD过滤掉一 定宽度的起始触发脉冲,保证对于时间长度计量初始时刻的触发以及时间长度的准确 性。 Taking CPLD as an example, the support frequency of CPLD can be higher than that of the processor, but there is no need to replace the higher performance processing by increasing the frequency of the processor, saving resources and power consumption, and when the frequency needs to be improved, there is no need to The original structure is changed, and the scalability is enhanced. Moreover, after the CPLD measures the number of pulses, the number of pulses can be sent to the processor according to a preset data format and a communication protocol, and the processor is assisted to complete the counting of the pulse number. When a narrow pulse echo interference occurs, it will affect the triggering of the determining sub-unit for the initial time measurement of the time length, so that the determined time length is not accurate. At this time, the initial trigger pulse of a certain width can be filtered out by the CPLD to ensure time. Triggering the initial time of the length measurement and the accuracy of the length of time Sex.
可选地, 所述距离特征信息具体可以为时间长度、 距离值或比例值。  Optionally, the distance feature information may specifically be a time length, a distance value, or a proportional value.
本实施例中, 该装置确定从向第一挂载节点发送测距命令到接收到第一挂载节 点的回复消息的时间长度,根据时间长度计算控制节点与第一挂载节点之间的距离特 征信息,从而通过总线传输消息的方式实现了控制节点与第一挂载节点之间距离特征 信息的测量; 这一距离特征信息的测量方法中无需断开总线, 实现难度低且成本低。 参见图 7,为本发明实施例距离测量装置第二实施例示意图,该装置可以应用于 总线系统中的挂载节点,所述总线系统包括控制节点和至少一个挂载节点,所述控制 节点和所述挂载节点之间通过总线通信; 如图 7所示, 该装置 700包括:  In this embodiment, the apparatus determines a length of time from when the ranging command is sent to the first mount node to the reply message of the first mount node, and the distance between the control node and the first mount node is calculated according to the length of time. The feature information, thereby transmitting the message through the bus, realizes the measurement of the distance characteristic information between the control node and the first mount node; the distance feature information measurement method does not need to disconnect the bus, and the implementation is low in difficulty and low in cost. 7 is a schematic diagram of a second embodiment of a distance measuring apparatus according to an embodiment of the present invention. The apparatus may be applied to a mount node in a bus system, where the bus system includes a control node and at least one mount node, and the control node and The mount nodes communicate with each other through a bus; as shown in FIG. 7, the apparatus 700 includes:
第二接收单元 710,用于接收所述控制节点发送的测距命令;所述第一挂载节点 是所述至少一个挂载节点中的一个挂载节点;  a second receiving unit 710, configured to receive a ranging command sent by the control node; the first mounting node is one of the at least one mounting node;
第二发送单元 720,用于向所述控制节点发送测距命令回复消息, 以便所述控制 节点侦听从向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复消息的 时间长度、根据所述时间长度计算所述控制节点与所述第一挂载节点之间的距离特征 信息。  a second sending unit 720, configured to send a ranging command reply message to the control node, so that the control node listens to send a ranging command from the first mount node to receive the reply message of the first mount node. Length of time, calculating distance feature information between the control node and the first mount node according to the length of time.
可选地, 所述第二接收单元 710还可以用于: 接收控制节点发送的测距准备命 令, 所述测距准备命令用于指示所述第一挂载节点进行测距准备;  Optionally, the second receiving unit 710 is further configured to: receive a ranging preparation command sent by the control node, where the ranging preparation command is used to instruct the first mounting node to perform ranging preparation;
所述第二发送单元 720还可以用于: 在完成测距准备后, 向所述控制节点发送 测距准备回复消息,所述测距准备回复消息用于告知所述控制节点所述第一挂载节点 的测距准备完成。  The second sending unit 720 is further configured to: after completing the ranging preparation, send a ranging preparation reply message to the control node, where the ranging preparation reply message is used to notify the control node of the first hanging The ranging of the carrier node is ready to be completed.
本实施例中, 该装置与控制节点配合, 在接收到控制节点发送的测距命令后向 控制节点发送测距命令回复消息,从而实现了控制节点对控制节点与第一挂载节点之 间距离特征信息的测量。 本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加 必需的通用硬件平台的方式来实现。 基于这样的理解, 本发明实施例中的技术方 案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该 计算机软件产品可以存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若 干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例或者实施例的某些部分所述的方法。 本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似 的部分互相参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤 其, 对于系统实施例而言, 由于其基本相似于方法实施例, 所以描述的比较简单, 相关之处参见方法实施例的部分说明即可。 In this embodiment, the device cooperates with the control node, and after receiving the ranging command sent by the control node, sends a ranging command reply message to the control node, thereby realizing the distance between the control node and the first mounting node. Measurement of feature information. It will be apparent to those skilled in the art that the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM. , a diskette, an optical disk, etc., comprising instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or in certain portions of the embodiments. The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。任何在本 发明的精神和原则之内所作的修改、 等同替换和改进等, 均应包含在本发明的保 护范围之内。  The embodiments of the present invention described above are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

M ^ M ^
1、 一种距离特征信息的测量方法, 其特征在于, 应用于总线系统, 所述总 线系统包括控制节点和至少一个挂载节点,所述控制节点和所述挂载节点之间通 过总线通信; 该方法包括: A method for measuring distance characteristic information, characterized in that it is applied to a bus system, the bus system includes a control node and at least one mount node, and the control node and the mount node communicate via a bus; The method includes:
控制节点确定从向第一挂载节点发送测距命令到接收到所述第一挂载节点 的回复消息的时间长度;所述第一挂载节点是所述至少一个挂载节点中的一个挂 载节点;  The control node determines a length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node; the first mount node is one of the at least one mount node Carrier node
所述控制节点根据所述时间长度计算所述控制节点与所述第一挂载节点之 间的距离特征信息。  And the control node calculates distance feature information between the control node and the first mount node according to the length of time.
2、 根据权利要求 1所述的方法, 其特征在于, 所述控制节点确定从向第一 挂载节点发送测距命令到接收到所述第一挂载节点的回复消息的时间长度, 包 括:  The method according to claim 1, wherein the control node determines a length of time from the sending of the ranging command to the first mount node to the receipt of the reply message of the first mount node, including:
所述控制节点侦听发送端口和接收端口上是否有数据传输;  The control node listens to whether there is data transmission on the sending port and the receiving port;
所述控制节点向所述第一挂载节点发送测距命令,并且接收所述第一挂载节 点对于所述测距命令的回复消息;  The control node sends a ranging command to the first mount node, and receives a reply message of the first mount node for the ranging command;
所述控制节点确定从侦听到所述发送端口发送的测距命令的第一个比特到 所述接收端口接收到所述回复消息的第一个比特的时间长度。  The control node determines a length of time from the first bit of the ranging command sent by the transmitting port to the first bit of the reply message received by the receiving port.
3、 根据权利要求 2所述的方法, 其特征在于, 所述确定从侦听到所述发送 端口发送的测距命令的第一个比特到所述接收端口接收到所述回复消息的第一 个比特的时间长度, 包括:  The method according to claim 2, wherein the determining, from detecting the first bit of the ranging command sent by the sending port to the receiving port, receiving the first message of the reply message The length of the bits, including:
通过计时的方式确定从所述发送端口侦听到所述测距命令的第一个比特开 始到所述接收端口接收到所述回复消息的第一个比特结束的时间长度; 或者, 通过计量脉冲数量的方式确定从所述发送端口侦听到所述测距命令的第一 个比特开始到所述接收端口接收到所述回复消息的第一个比特结束的时间长度。  Determining, by means of timing, a length of time from when the transmitting port detects the first bit of the ranging command to when the receiving port receives the end of the first bit of the reply message; or, by metering a pulse The numberwise manner determines the length of time from when the transmitting port hears the first bit of the ranging command to when the receiving port receives the end of the first bit of the reply message.
4、 根据权利要求 1至 3任一项所述的方法, 其特征在于, 所述控制节点根 据所述时间长度计算所述控制节点与所述第一挂载节点之间的距离特征信息之 前, 还包括:  The method according to any one of claims 1 to 3, wherein the control node calculates the distance characteristic information between the control node and the first mount node according to the length of time, Also includes:
所述控制节点再重复执行预设次数 -1次所述确定时间长度的步骤,得到预设 次数个时间长度;  The control node repeats the step of determining the length of time by the preset number of times - 1 time, and obtains a preset number of times;
所述控制节点根据所述时间长度计算所述控制节点与所述第一挂载节点之 间的距离特征信息包括: 所述控制节点对得到的预设次数个时间长度进行过滤处理; 所述控制节点根据过滤结果进行统计计算, 得到时间长度的统计值; 所述控制节点根据所述时间长度的统计值计算所述控制节点与所述第一挂 载节点之间的距离特征信息。 The calculating, by the control node, the distance characteristic information between the control node and the first mount node according to the length of time includes: The control node performs filtering processing on the obtained preset number of times; the control node performs statistical calculation according to the filtering result to obtain a statistical value of the length of time; the control node calculates the statistical value according to the length of time Distance feature information between the control node and the first mount node.
5、 根据权利要求 4所述的方法, 其特征在于, 所述控制节点对得到的预设 次数个时间长度进行过滤处理, 包括:  The method according to claim 4, wherein the control node performs filtering processing on the obtained preset number of times of time, including:
对于所述预设次数个时间长度,所述控制节点去除其中数值大于等于第一设 定门限的时间长度以及数值小于等于第二设定门限的时间长度,所述第一设定门 限大于第二设定门限。  For the preset number of times, the control node removes a length of time in which the value is greater than or equal to the first set threshold and a time length in which the value is less than or equal to the second set threshold, the first set threshold is greater than the second Set the threshold.
6、 根据权利要求 1至 5任一项所述的方法, 其特征在于, 所述控制节点确 定从向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复消息的时 间长度之前, 还包括:  The method according to any one of claims 1 to 5, wherein the control node determines that a response message is sent from the first mount node to a reply message of the first mount node. Before the length of time, it also includes:
所述控制节点向所述第一挂载节点发送测距准备命令,所述测距准备命令用 于指示所述第一挂载节点进行测距准备;  The control node sends a ranging preparation command to the first mount node, where the ranging preparation command is used to instruct the first mount node to perform ranging preparation;
所述控制节点接收所述第一挂载节点发送的测距准备回复消息,所述测距准 备回复消息用于告知所述控制节点所述第一挂载节点的测距准备完成。  The control node receives a ranging preparation reply message sent by the first mount node, and the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mount node is completed.
7、 根据权利要求 1至 6任一项所述的方法, 其特征在于, 所述距离特征信 息具体为时间长度、 距离值或比例值。  The method according to any one of claims 1 to 6, wherein the distance characteristic information is specifically a time length, a distance value or a proportional value.
8、 一种距离特征信息的测量方法, 其特征在于, 应用于总线系统, 所述总 线系统包括控制节点和至少一个挂载节点,所述控制节点和所述挂载节点之间通 过总线通信; 该方法包括: A method for measuring distance characteristic information, characterized in that it is applied to a bus system, the bus system includes a control node and at least one mount node, and the control node and the mount node communicate via a bus; The method includes:
第一挂载节点接收所述控制节点发送的测距命令;所述第一挂载节点是所述 至少一个挂载节点中的一个挂载节点;  The first mount node receives the ranging command sent by the control node; the first mount node is one of the at least one mount node;
第一挂载节点向所述控制节点发送测距命令回复消息, 以便所述控制节 点侦听从向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复消息 的时间长度、根据所述时间长度计算所述控制节点与所述第一挂载节点之间的距 离特征信息。  The first mount node sends a ranging command reply message to the control node, so that the control node listens to the length of time from sending the ranging command to the first mount node to receiving the reply message of the first mount node. And calculating distance feature information between the control node and the first mount node according to the length of time.
9、 根据权利要求 8所述的方法, 其特征在于, 所述第一挂载节点接收所述 控制节点发送的测距命令之前, 还包括:  The method according to claim 8, wherein before the receiving, by the first loading node, the ranging command sent by the control node, the method further includes:
所述第一挂载节点接收控制节点发送的测距准备命令,所述测距准备命令用 于指示所述第一挂载节点进行测距准备; 所述第一挂载节点在完成测距准备后,向所述控制节点发送测距准备回复消 息,所述测距准备回复消息用于告知所述控制节点所述第一挂载节点的测距准备 完成。 The first mount node receives a ranging preparation command sent by the control node, where the ranging preparation command is used to instruct the first mount node to perform ranging preparation; After completing the ranging preparation, the first mounting node sends a ranging preparation reply message to the control node, where the ranging preparation reply message is used to notify the control node of the ranging of the first mounting node. Ready to finish.
10、 一种距离特征信息的测量装置, 其特征在于, 应用于总线系统中的控制 节点, 所述总线系统包括控制节点和至少一个挂载节点,所述控制节点和所述挂 载节点之间通过总线通信; 该装置包括: 10. A measuring device for distance characteristic information, characterized in that it is applied to a control node in a bus system, the bus system comprising a control node and at least one mount node, between the control node and the mount node Communicating via the bus; the device comprises:
第一确定单元,用于确定从向第一挂载节点发送测距命令到接收到所述第一 挂载节点的回复消息的时间长度;所述第一挂载节点是所述至少一个挂载节点中 的一个挂载节点;  a first determining unit, configured to determine a length of time from sending a ranging command to the first mount node to receiving the reply message of the first mount node; the first mount node is the at least one mount One of the nodes in the node;
计算单元,用于根据所述第一确定单元确定的所述时间长度计算所述控制节 点与所述第一挂载节点之间的距离特征信息。  And a calculating unit, configured to calculate distance feature information between the control node and the first mount node according to the length of time determined by the first determining unit.
11、 根据权利要求 10所述的装置, 其特征在于, 所述第一确定单元包括: 侦听子单元, 用于侦听发送端口和接收端口上是否有数据传输;  The device according to claim 10, wherein the first determining unit comprises: a listening subunit, configured to listen to whether there is data transmission on the sending port and the receiving port;
收发子单元, 用于向所述第一挂载节点发送测距命令, 并且接收所述第一挂 载节点对于所述测距命令的回复消息;  a transceiver unit, configured to send a ranging command to the first mount node, and receive a reply message of the first mount node to the ranging command;
确定子单元,用于确定从侦听到所述发送端口发送的测距命令的第一个比特 到所述接收端口接收到所述回复消息的第一个比特的时间长度。  Determining a subunit for determining a length of time from the first bit of the ranging command sent from the listening port to the first bit of the reply message received by the receiving port.
12、 根据权利要求 11所述的装置, 其特征在于, 所述确定子单元具体用于: 通过计时的方式确定从侦听到所述发送端口发送的测距命令的第一个比特 到所述接收端口接收到所述回复消息的第一个比特的时间长度; 或者,  The device according to claim 11, wherein the determining subunit is specifically configured to: determine, by means of a timing, from detecting the first bit of the ranging command sent by the sending port to the The length of time that the receiving port receives the first bit of the reply message; or
通过计量脉冲数量的方式确定从侦听到所述发送端口发送的测距命令的第 一个比特到所述接收端口接收到所述回复消息的第一个比特的时间长度。  The length of time from the first bit of the ranging command transmitted by the transmitting port to the first bit of the reply message received by the receiving port is determined by metering the number of pulses.
13、根据权利要求 10至 12任一项所述的装置, 其特征在于, 所述第一确定 单元还用于: 再重复执行预设次数 -1次所述确定时间长度的步骤,得到预设次数 个时间长度;  The device according to any one of claims 10 to 12, wherein the first determining unit is further configured to: repeatedly perform the step of determining the length of time by the preset number of times - 1 to obtain a preset The length of time;
计算单元具体包括:  The calculation unit specifically includes:
过滤子单元,用于对所述第一确定单元得到的预设次数个时间长度进行过滤 处理;  a filtering subunit, configured to filter a preset number of times obtained by the first determining unit;
平均值计算子单元, 用于根据过滤结果进行统计计算, 得到时间长度的统计 值;  The average calculation subunit is configured to perform statistical calculation according to the filtering result to obtain a statistical value of the length of time;
距离计算子单元,用于根据所述时间长度的统计值计算所述控制节点与所述 第一挂载节点之间的距离特征信息。 a distance calculation unit, configured to calculate the control node from the statistical value of the length of time Distance characteristic information between the first mount nodes.
14、根据权利要求 13所述的装置, 其特征在于, 所述过滤子单元具体用于: 对于所述预设次数个时间长度,去除其中数值大于等于第一设定门限的时间长度 以及数值小于等于第二设定门限的时间长度,所述第一设定门限大于第二设定门 限。  The device according to claim 13, wherein the filtering subunit is specifically configured to: remove, for the preset number of times, a length of time in which the value is greater than or equal to the first set threshold, and the value is less than And a length of time equal to the second set threshold, the first set threshold is greater than the second set threshold.
15、 根据权利要求 10至 14任一项所述的装置, 其特征在于, 还包括: 第一发送单元, 用于向所述第一挂载节点发送测距准备命令, 所述测距准备 命令用于指示所述第一挂载节点进行测距准备;  The device according to any one of claims 10 to 14, further comprising: a first sending unit, configured to send a ranging preparation command to the first mounting node, the ranging preparation command And configured to instruct the first mount node to perform ranging preparation;
第一接收单元, 用于接收所述第一挂载节点发送的测距准备回复消息, 所述 测距准备回复消息用于告知所述控制节点所述第一挂载节点的测距准备完成。  And a first receiving unit, configured to receive a ranging preparation reply message sent by the first loading node, where the ranging preparation reply message is used to notify the control node that the ranging preparation of the first mounting node is completed.
16、根据权利要求 10至 15任一项所述的装置, 其特征在于, 所述距离特征 信息具体为时间长度、 距离值或比例值。  The apparatus according to any one of claims 10 to 15, wherein the distance characteristic information is specifically a time length, a distance value or a proportional value.
17、 一种距离特征信息的测量装置, 其特征在于, 应用于总线系统中的挂 载节点, 所述总线系统包括控制节点和至少一个挂载节点,所述控制节点和所述 挂载节点之间通过总线通信; 该装置包括: 17. A measuring device for distance characteristic information, characterized in that it is applied to a mounting node in a bus system, the bus system comprising a control node and at least one mounting node, the control node and the mounting node Communicating via the bus; the device comprises:
第二接收单元,用于接收所述控制节点发送的测距命令;所述第一挂载节点 是所述至少一个挂载节点中的一个挂载节点;  a second receiving unit, configured to receive a ranging command sent by the control node; the first mounting node is one of the at least one mounting node;
第二发送单元,用于向所述控制节点发送测距命令回复消息, 以便所述控 制节点侦听从向第一挂载节点发送测距命令到接收到所述第一挂载节点的回复 消息的时间长度、根据所述时间长度计算所述控制节点与所述第一挂载节点之间 的距离特征信息。  a second sending unit, configured to send a ranging command reply message to the control node, so that the control node listens to send a ranging command from the first mounting node to the receiving the reply message of the first mounting node. a length of time, and calculating distance feature information between the control node and the first mount node according to the length of time.
18、根据权利要求 17所述的装置, 其特征在于, 所述第二接收单元还用于: 接收控制节点发送的测距准备命令,所述测距准备命令用于指示所述第一挂载节 点进行测距准备;  The apparatus according to claim 17, wherein the second receiving unit is further configured to: receive a ranging preparation command sent by the control node, where the ranging preparation command is used to indicate the first mounting The node performs ranging preparation;
所述第二发送单元还用于: 在完成测距准备后, 向所述控制节点发送测距准 备回复消息,所述测距准备回复消息用于告知所述控制节点所述第一挂载节点的 测距准备完成。  The second sending unit is further configured to: after completing the ranging preparation, send a ranging preparation reply message to the control node, where the ranging preparation reply message is used to notify the control node of the first mounting node The ranging is ready to be completed.
PCT/CN2014/080409 2014-06-20 2014-06-20 Method and device for measuring distance characteristic information WO2015192374A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480051125.5A CN105556901B (en) 2014-06-20 2014-06-20 A kind of measurement method and device of distance feature information
PCT/CN2014/080409 WO2015192374A1 (en) 2014-06-20 2014-06-20 Method and device for measuring distance characteristic information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/080409 WO2015192374A1 (en) 2014-06-20 2014-06-20 Method and device for measuring distance characteristic information

Publications (1)

Publication Number Publication Date
WO2015192374A1 true WO2015192374A1 (en) 2015-12-23

Family

ID=54934727

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/080409 WO2015192374A1 (en) 2014-06-20 2014-06-20 Method and device for measuring distance characteristic information

Country Status (2)

Country Link
CN (1) CN105556901B (en)
WO (1) WO2015192374A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113176560A (en) * 2021-04-21 2021-07-27 中煤科工集团重庆研究院有限公司 RS485 bus-based wired distance measurement method for multiple devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090096665A1 (en) * 2007-10-10 2009-04-16 Acterna Llc Method For Locating Cable Impairments
JP2009118041A (en) * 2007-11-05 2009-05-28 Omron Corp Position relation detection system for node station
CN102209110A (en) * 2011-05-18 2011-10-05 东南大学 Online controllable sensing node positioning method
CN103095527A (en) * 2013-01-05 2013-05-08 奇点新源国际技术开发(北京)有限公司 Method and system for measuring signal transmission time
CN103200098A (en) * 2007-08-31 2013-07-10 晶像股份有限公司 Ensuring physical locality of entities sharing data

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102184436B (en) * 2011-05-16 2013-04-17 重庆大学 Method for sensing position of object in Internet of things
CN103616666A (en) * 2013-11-29 2014-03-05 天津孚感科技有限公司 Method and system for complex space ranging and positioning
CN103675800A (en) * 2013-12-05 2014-03-26 惠州Tcl移动通信有限公司 Method for measuring distance and electronic device for achievement of distance measurement

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103200098A (en) * 2007-08-31 2013-07-10 晶像股份有限公司 Ensuring physical locality of entities sharing data
US20090096665A1 (en) * 2007-10-10 2009-04-16 Acterna Llc Method For Locating Cable Impairments
JP2009118041A (en) * 2007-11-05 2009-05-28 Omron Corp Position relation detection system for node station
CN102209110A (en) * 2011-05-18 2011-10-05 东南大学 Online controllable sensing node positioning method
CN103095527A (en) * 2013-01-05 2013-05-08 奇点新源国际技术开发(北京)有限公司 Method and system for measuring signal transmission time

Also Published As

Publication number Publication date
CN105556901A (en) 2016-05-04
CN105556901B (en) 2019-02-22

Similar Documents

Publication Publication Date Title
US9810780B2 (en) Time of flight (ToF) measurement
JP5847808B2 (en) Two-way ranging messaging method
JP2012199984A5 (en)
US10386451B2 (en) Method for an enhanced time of arrival positioning system
JP2014518492A (en) Improved connection setup for low energy wireless networks based on scan window and scan interval estimation
TWI706349B (en) Payment method, distance measurement method, payment equipment and distance measurement equipment
CN104901851B (en) A kind of method and system of detection network quality
JP2004304755A5 (en)
WO2017197879A1 (en) Method and device for adjusting power
WO2015192374A1 (en) Method and device for measuring distance characteristic information
WO2016050153A1 (en) Network fault detection method and related network element
WO2018035740A1 (en) Time measurement-based positioning method, and relevant device and system
JP2019509531A5 (en)
WO2019078779A1 (en) Ftm procedures in wireless networks
CN114167396A (en) Control method based on ultra-wideband ranging and related device
CN106559861A (en) Bluetooth equipment data transmission method and device
WO2018113193A1 (en) Time synchronization method, device and system
WO2019078778A1 (en) Distance measurements in wireless networks
CN114501483B (en) Information processing method, device and terminal
WO2016106546A1 (en) Ca-based signal transmission method, apparatus and device
CN109387829B (en) Distance detection device and distance detection method thereof
SE537316C2 (en) Improved arrival time positioning system
JP2009225124A (en) Radio device and method of measuring congestion degree in it

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480051125.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14895120

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.05.2017)

122 Ep: pct application non-entry in european phase

Ref document number: 14895120

Country of ref document: EP

Kind code of ref document: A1