CN112333037A - Communication link self-detection method and system and automatic driving vehicle - Google Patents

Communication link self-detection method and system and automatic driving vehicle Download PDF

Info

Publication number
CN112333037A
CN112333037A CN201910717310.8A CN201910717310A CN112333037A CN 112333037 A CN112333037 A CN 112333037A CN 201910717310 A CN201910717310 A CN 201910717310A CN 112333037 A CN112333037 A CN 112333037A
Authority
CN
China
Prior art keywords
data information
time
receiving
communication
state parameter
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910717310.8A
Other languages
Chinese (zh)
Other versions
CN112333037B (en
Inventor
张伍召
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910717310.8A priority Critical patent/CN112333037B/en
Publication of CN112333037A publication Critical patent/CN112333037A/en
Application granted granted Critical
Publication of CN112333037B publication Critical patent/CN112333037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

At least one embodiment of the present disclosure provides a communication link self-detection method, which relates to the technical field of automatic driving, where the communication link is used for communication between a publisher and a subscriber in a publish-subscribe communication framework, and the method is performed by the subscriber, and the subscriber is a virtual module defined in the publish-subscribe communication framework, and the method includes: receiving first data information sent by a publisher; determining at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when second data information is received before the first data information; and detecting whether the communication link is abnormal or not based on the at least one communication state parameter. At least one embodiment of the present disclosure also provides a communication link self-detection system and an autonomous vehicle.

Description

Communication link self-detection method and system and automatic driving vehicle
Technical Field
The disclosed embodiments relate to the field of autonomous driving technologies, and in particular, to a method and a system for performing communication link self-detection by a subscriber, and an autonomous driving vehicle.
Background
Publish-subscribe communications frameworks are widely used in various electronic systems, wherein typically, autonomous vehicles often also use the communications framework for intra-system communications to support end-to-end communications between different operating modules in the autonomous vehicle system; the operational status of the publish-subscribe messaging framework plays a crucial role in the stability and safety of the entire autonomous vehicle system.
Disclosure of Invention
The disclosure aims to at least solve the problem that a publish-subscribe communication framework in the prior art cannot detect whether a communication link of the communication framework is abnormal or not, and provides a communication link self-detection method and system and an automatic driving vehicle.
In a first aspect, the disclosed embodiments provide a communication link self-detection method performed by a subscriber, where the communication link is used for communication between a publisher and the subscriber, where the publisher communicates in a publish-subscribe communication manner, and the subscriber is a virtual module created inside when the publisher is created, where the method includes:
receiving first data information sent by a publisher;
determining at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when second data information is received before the first data information;
and detecting whether the communication link is abnormal or not based on the at least one communication state parameter.
In some embodiments, the step of determining at least one communication state parameter of the first data information based on a first time instant at which the first data information is received and a second time instant at which a second data information is received before the first data information specifically includes:
and comparing a first time when the first data information is received with a second time when second data information is received before the first data information through a predefined callback function, so as to determine at least one communication state parameter of the first data information.
In some embodiments, the at least one communication state parameter comprises: a frequency of receiving the messages published by the publisher and/or a time delay of receiving the messages published by the publisher.
In some embodiments, when the at least one communication status parameter includes the frequency of receiving the message issued by the publisher, the step of determining the at least one communication status parameter of the first data information based on a first time instant at which the first data information is received and a second time instant at which a second data information is received before the first data information specifically includes:
calling a predefined first callback function; when the first callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the Nth historical data information before the first data information as the second time of the second data information, calculating the difference value between the first time of the first data information and the second data information, and calculating the quotient of N and the difference value, wherein N is an integer greater than 2;
and receiving the processing result fed back by the first callback function as the frequency of receiving the messages published by the publishers.
In some embodiments, when the at least one communication status parameter comprises a delay of receiving the message published by the publisher, the step of determining the at least one communication status parameter of the first data information based on a first time of receiving the first data information and a second time of receiving a second data information before the first data information comprises:
calling a predefined second callback function; when the second callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the 1 st historical data information before the first data information as the second time of the second data information, and calculating the difference value between the first time of the first data information and the second time of the second data information;
and receiving a processing result fed back by the second callback function as the time delay of the message issued by the issuer.
In some embodiments, said detecting whether an anomaly of said communication link occurs based on said at least one communication status parameter comprises:
comparing the at least one communication state parameter with a corresponding predetermined range respectively;
detecting an anomaly in the communication link if at least one of the at least one communication state parameter is outside a corresponding predetermined range.
In some embodiments, the step of detecting whether the communication link is abnormal based on the at least one communication state parameter comprises:
comparing the at least one communication state parameter with a corresponding predetermined range respectively;
if at least one of the at least one communication state parameter is outside the corresponding predetermined range, determining that the process of the communication link for communicating the first data information is erroneous;
counting the accumulated times of errors in the process of transmitting data information by the communication link in the current first statistical period;
judging whether the accumulated times reach a preset threshold value or not;
and when the accumulated times reach a preset threshold value, detecting that the communication link is abnormal.
In a second aspect, the disclosed embodiment provides a communication link self-detection system executed by a subscriber, where the communication link is used for communication between a publisher and the subscriber, where the publisher communicates in a publish-subscribe communication manner, and the subscriber is a virtual module created inside when the publisher is created, the system includes:
the receiving module is used for receiving first data information sent by a publisher;
the determining module is used for determining at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when second data information is received before the first data information;
and the detection module is used for detecting whether the communication link is abnormal or not based on the at least one communication state parameter.
In some embodiments, the determining module is specifically configured to compare, by a predefined callback function, a first time at which the first data message is received with a second time at which a second data message is received before the first data message, so as to determine at least one communication status parameter of the first data message.
In some embodiments, the at least one communication state parameter comprises: a frequency of receiving the messages published by the publisher and/or a time delay of receiving the messages published by the publisher.
In some embodiments, when the at least one communication status parameter comprises the frequency of receiving messages published by the publisher, the determining module comprises:
the first call unit is used for calling a predefined first callback function; when the first callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the Nth historical data information before the first data information as the second time of the second data information, calculating the difference value between the first time of the first data information and the second data information, and calculating the quotient of N and the difference value, wherein N is an integer greater than 2;
a first receiving unit, configured to receive a processing result fed back by the first callback function as the frequency of receiving the message issued by the issuer.
In some embodiments, when the at least one communication state parameter comprises the latency of receiving the message published by the publisher, the determining module comprises:
the second calling unit is used for calling a predefined second callback function; when the second callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the 1 st historical data information before the first data information as the second time of the second data information, and calculating the difference value between the first time of the first data information and the second time of the second data information;
and the second receiving unit is configured to receive a processing result fed back by the second callback function, where the processing result is used as the time delay of receiving the message issued by the issuer.
In some embodiments, the detection module comprises:
the comparison unit is used for comparing the at least one communication state parameter with the corresponding preset range respectively;
and the first detection unit is used for detecting that the communication link is abnormal when at least one of the at least one communication state parameter is compared to be out of the corresponding preset range.
In some embodiments, the detection module comprises:
the comparison unit is used for comparing the at least one communication state parameter with the corresponding preset range respectively;
the judging unit is used for judging that the process of transmitting the first data information by the communication link is wrong when at least one of the at least one communication state parameter is compared to be out of the corresponding preset range;
the statistical unit is used for counting the accumulated times of errors in the process of transmitting the data information by the communication link in the current first statistical period;
the judging unit is used for judging whether the accumulated times reach a preset threshold value or not;
and the second detection unit is used for detecting that the communication link is abnormal when the judgment unit judges that the accumulated times reaches a preset threshold value.
In a third aspect, an embodiment of the present disclosure provides an autonomous vehicle, including: such as the communication link self-detection system described above.
The technical scheme disclosed by the invention can timely and effectively detect whether the communication link in the publish-subscribe communication framework is abnormal or not, and is favorable for maintaining the stability and the safety of the automatic driving vehicle system.
Drawings
Fig. 1 is a block diagram showing a configuration of an autonomous vehicle system according to the related art;
fig. 2 is a flowchart of a communication link self-detection method according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of an alternative implementation of step S2 in an embodiment of the disclosure;
FIG. 4 is a flowchart of an alternative implementation of step S2 in an embodiment of the disclosure;
FIG. 5 is a flowchart of an alternative implementation of step S3 in the present disclosure;
FIG. 6 is a flowchart of an alternative implementation of step S3 in the present disclosure;
fig. 7 is a flowchart of another communication link self-detection method provided by the embodiments of the present disclosure;
fig. 8 is a flowchart of a further communication link self-detection method provided by an embodiment of the present disclosure;
FIG. 9 is a block diagram of a publish-subscribe communications framework provided by embodiments of the present disclosure;
FIG. 10 is a block diagram of an architecture of a determination module in accordance with an embodiment of the present disclosure;
FIG. 11 is a block diagram of another configuration of a determination module in an embodiment of the present disclosure;
FIG. 12 is a block diagram of another configuration of a determination module in an embodiment of the present disclosure;
FIG. 13 is a block diagram of a detection module according to an embodiment of the disclosure;
fig. 14 is another structural block diagram of the detection module in the embodiment of the present disclosure.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present disclosure, a communication link self-detection method, a communication link self-detection system and an autonomous vehicle provided by the present disclosure are described in detail below with reference to the accompanying drawings.
Example embodiments will be described more fully hereinafter with reference to the accompanying drawings, but which may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood that, although the terms first, second, etc. may be used herein to describe various elements, these elements should not be limited by these terms, which are used to distinguish one object from another.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
In order to facilitate better understanding of the technical aspects of the present disclosure by those skilled in the art, a description will now be made of related art.
Fig. 1 is a block diagram of an autonomous vehicle system according to related art, where as shown in fig. 1, the autonomous vehicle system includes a plurality of work modules and a publish-subscribe communication framework, where the publish-subscribe communication framework is formed based on certain hardware and software, and the publish-subscribe communication framework is used to provide interfaces for the work modules, and each work module calls a corresponding interface when receiving and sending a message.
Specifically, taking the message delivery process of the two working modules based on the publish-subscribe communication framework as an example; one of the two working modules acts as a message writing module (writer) and the other as a message reading module (reader) which subscribes to the message writing module. In the end-to-end data communication, the message writing module uses a preset sending frequency f0Writing data information into the publish-subscribe communication framework, broadcasting the written data by the publish-subscribe communication framework, and enabling the message reading module subscribed to the message writing module to be at the same frequency f from the publish-subscribe communication framework0Data information is read.
However, in practical applications, it has been found that when the publish-subscribe messaging framework is in an abnormal state (e.g., data congestion or data transmission rate fluctuation within the autonomous vehicle signaling framework), the message write module may be at the frequency f0Transmitting data information, but the message reading module will be at a different frequency f0Is much smaller than the predetermined transmission frequency f (e.g. the reception frequency is much smaller than the predetermined transmission frequency f)0Or the receiving frequency is at a predetermined transmitting frequency f0Fluctuating over a larger range) of data information, resulting in poor timeliness of the data information and compromised stability and safety of the autonomous vehicle system. Therefore, how to timely and effectively detect whether the publish-subscribe communication framework is in a normal state or an abnormal state is very important for maintaining the stability and the safety of the automatic driving vehicle system.
In order to detect whether the publish-subscribe communication framework is in a normal state or an abnormal state, the present disclosure provides a corresponding technical solution, which will be exemplarily described below with reference to specific embodiments.
The "publisher" in the present disclosure specifically refers to the aforementioned message writing module, and the "subscriber" specifically refers to a virtual module that is created and defined in the publish-subscribe communication framework and has the same function as the message reading module of the autopilot system; it should be noted that there is an essential difference between the "subscriber" in the present disclosure and the aforementioned message reading module, specifically, the subscriber in the present disclosure defines a virtual module inside the publish-subscribe communication framework, and the aforementioned message reading module is a pure hardware module located outside the publish-subscribe communication framework or a module formed by hardware and software.
The communication link self-detection method provided by the disclosure is executed by a subscriber inside a publish-subscribe communication framework, so that the publish-subscribe communication framework can detect whether the communication link is abnormal or not.
As an alternative, when the publish-subscribe communication framework provides an interface for a certain work module, the publish-subscribe communication framework takes the work module as a publisher (i.e. the publisher is created), and automatically constructs a subscriber to subscribe to the publisher in itself; the subscriber is essentially a runnable program generated inside the publish-subscribe communications framework, capable of implementing corresponding processing logic.
Fig. 2 is a flowchart of a communication link self-detection method according to an embodiment of the present disclosure, and as shown in fig. 2, the self-detection method includes:
and step S1, receiving the first data information sent by the publisher.
In some embodiments, the publisher may be selected from any of the operational modules included in existing autonomous vehicle systems, such as a perception module (for perceiving the surrounding environment and generating corresponding perception data), a preprocessing module (for preprocessing the perception data, such as denoising), a decision-making planning module (for generating decision information from the perception data), and a control module (for generating and issuing control information from the decision information to control a vehicle operating system to perform corresponding operations).
The publisher writes data information into the publish-subscribe communication framework at a preset frequency, and the subscriber receives the data information sent by the publisher through a communication link in the publish-subscribe communication framework.
The data information received by the data self-detection system in step S1 with the time at which step S1 is performed as the first time is referred to as first data information.
Step S2, determining at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when the second data information is received before the first data information is received.
In the present disclosure, the communication status parameter of the first data information is a parameter capable of describing a transfer attribute of the first data information within the communication link, and the communication status of the first data information can reflect the working status of the communication link to some extent.
As an optional implementation manner of step S2, the subscriber calls a predefined callback function through a pre-stored function pointer, so that the callback function calculates at least one communication state parameter of the first data information according to the receiving time of the first data information and the second time of the second data information located before the first data information.
In the disclosure, the technical means for calculating the communication state parameter of the first data information based on the callback function may only record a function pointer of the callback function in the data self-detection system (the callback function is stored outside the publish-subscribe communication framework), which is beneficial to lightweight of the publish-subscribe communication framework, and is a preferred scheme in the disclosure.
In some embodiments, the at least one communication state parameter comprises: the frequency at which the subscriber receives messages published by the publisher (referred to as "receive frequency") and/or the delay in receiving messages published by the publisher (referred to as "receive delay").
Fig. 3 is a flowchart of an alternative implementation method of step S2 in the embodiment of the present disclosure, and as shown in fig. 3, when the at least one communication state parameter includes a receiving frequency, step S2 specifically includes:
step S201a, call a predefined first callback function.
The data self-detection system calls a first call-back function which is defined in advance through a function pointer; when the first callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the Nth historical data information before the first data information as the second time of the second data information, calculating the difference value between the first time of the first data information and the second data information, and calculating the quotient of N and the difference value, wherein N is an integer greater than 2.
Further optionally, N satisfies: n is more than or equal to 4 and less than or equal to 10.
Step S202a, receiving the processing result of the first callback function feedback as the frequency of the subscriber receiving the published message of the publisher.
It should be noted that, the above-mentioned technical means that the difference between the first time of the first data information and the receiving time of the nth historical data information before the first data information (i.e. the second time of the second data information) is calculated, and the quotient of N and the difference is calculated, and the calculation result is used as the frequency of receiving the message published by the publisher by the subscriber is only one alternative in the present disclosure, and does not limit the technical solution of the present disclosure. In the present disclosure, other existing receiving frequency determining algorithms can also be used to determine the frequency of receiving the messages published by the publishers by the subscribers, which is not exemplified here.
In addition, the technical means for calculating the receiving frequency of the first data information (i.e. the frequency of the subscriber receiving the message published by the publisher) based on the first callback function can make the data self-detection system only need to record a function pointer corresponding to the first callback function (the first callback function is stored outside the publish-subscribe communication framework), which is a preferred solution in the present disclosure, and is beneficial to lightweight the publish-subscribe communication framework.
Fig. 4 is a flowchart of another alternative implementation method of step S2 in the embodiment of the present disclosure, and as shown in fig. 4, when the at least one communication state parameter includes a reception delay time, step S2 specifically includes:
step S201b, call a predefined second callback function.
The data self-detection system calls a predefined second callback function through the function pointer; and when the second callback function is called, executing a processing procedure of acquiring the current time of the system to be used as the receiving time of the first data information, acquiring the receiving time of the 1 st historical data information before the first data information to be used as the second time of the second data information, and calculating the difference value between the first time of the first data information and the second time of the second data information.
Step S202b, receiving the processing result fed back by the second callback function as the time delay when the subscriber receives the message published by the publisher.
It should be noted that, by using the technical means of calculating the time delay of the first data information (i.e., the time delay of the subscriber receiving the message published by the publisher) based on the second callback function, only the function pointer corresponding to the second callback function (stored outside the publish-subscribe communication framework) needs to be recorded in the data self-detection system, which is beneficial to lightweight the publish-subscribe communication framework, and is a preferred scheme in the present disclosure.
Of course, in some embodiments, the at least one communication status parameter may include both the receiving frequency and the receiving time delay, and the step S2 may include the step S201a, the step S202a, the step S201b, and the step S202b, and the execution sequence of the step S201a and the step S201b is not limited.
Step S3, detecting whether the communication link is currently abnormal according to at least one communication state parameter.
Since the communication status of the first data message received by the subscriber can reflect the working status of the communication link to a certain extent, the at least one communication status parameter obtained in step S2 can effectively detect whether the communication link is currently in a normal state or an abnormal state in time.
Fig. 5 is a flowchart of an alternative implementation method of step S3 in the present disclosure, and as shown in fig. 5, step S3 includes:
step S301, comparing the at least one communication state parameter with the corresponding predetermined range, and determining whether there is a communication state parameter whose value is outside the corresponding predetermined range.
In the present disclosure, a corresponding predetermined state parameter range (i.e., a predetermined range) is configured for each communication state parameter; specifically, the predetermined status parameter range corresponding to each communication status parameter may be configured by manual input or automatically configured by the publish-subscribe communication framework when the publish-subscribe communication framework creates a subscriber.
In some embodiments, when the at least one communication status parameter only includes a receiving frequency, a predetermined frequency range is configured in advance, and a frequency covered by the predetermined frequency range is a normal receiving frequency. At this time, it is detected whether the reception frequency obtained in step S2 is outside the predetermined frequency range; if the receiving frequency obtained in step S2 is detected to be outside the predetermined frequency range, it indicates that the receiving frequency is abnormal, and at this time, step S301 determines that there is a communication state parameter whose value is outside the corresponding predetermined range in at least one communication state parameter; if it is detected that the receiving frequency obtained in step S2 is within the predetermined frequency range, it indicates that the receiving frequency is normal, and at this time, step S301 determines that there is no communication state parameter whose value is outside the corresponding predetermined state parameter range in at least one communication state parameter.
In some embodiments, when the at least one communication status parameter only includes the receiving delay, a predetermined delay range is configured in advance, and the receiving delay covered by the predetermined delay range is the normal receiving delay. At this time, it is detected whether the reception delay obtained in step S2 is outside the predetermined delay range; if the reception delay obtained in step S2 is detected to be outside the predetermined delay range, it indicates that the reception delay is abnormal, and at this time, step S301 determines that there is a communication state parameter whose value is outside the corresponding predetermined state parameter range in at least one communication state parameter; if it is detected that the reception delay obtained in step S2 is within the predetermined delay range, it indicates that the reception delay is normal, and at this time, step S301 determines that there is no communication state parameter whose value is outside the corresponding predetermined range among the at least one communication state parameter.
In some embodiments, when the at least one communication state parameter includes both the receiving frequency and the receiving delay, a predetermined frequency range and a predetermined delay range are configured in advance; at this time, it is detected whether the reception frequency obtained at step S2 is outside the predetermined frequency range and whether the reception delay obtained at step S2 is outside the predetermined delay range; if the receiving frequency obtained in step S2 is detected to be outside the predetermined frequency range, and/or the time delay obtained in step S2 is detected to be outside the predetermined time delay range (at least one of the receiving frequency and the receiving time delay is abnormal), step S301 determines that there is a communication state parameter whose value is outside the corresponding predetermined range in at least one communication state parameter; if it is detected that the receiving frequency obtained in step S2 is within the predetermined frequency range and the time delay obtained in step S2 is within the predetermined time delay range (both the receiving frequency and the receiving time delay are normal), step S301 determines that there is no communication state parameter whose value is outside the corresponding predetermined range in the at least one communication state parameter.
In step S301, when it is determined that there is no communication state parameter whose value is outside the corresponding predetermined range in the at least one communication state parameter, it is characterized that each communication state is normal, and thereafter step S302 is performed; otherwise, step S303a is executed.
Step S302, detecting that the communication link is in a normal state.
Step S303a, detecting that the publish-subscribe communication framework is abnormal.
Fig. 6 is a flowchart of another alternative implementation method of step S3 in the present disclosure, and as shown in fig. 6, step S3 includes:
step S301, comparing the at least one communication state parameter with the corresponding predetermined range, and determining whether there is a communication state parameter whose value is outside the corresponding predetermined range in the at least one communication state parameter.
For the detailed description of step S301, reference may be made to the foregoing contents, which are not described herein again.
In step S301, when it is determined that there is no communication state parameter whose value is outside the corresponding predetermined range among the at least one communication state parameter, it is characterized that each communication state is normal, and thereafter step S302 is performed.
When it is determined that there is a communication state parameter having a value outside the corresponding predetermined state parameter range among the at least one communication state parameter, it indicates that there is at least one communication state abnormality, and thereafter step S303b is performed.
Step S302, detecting that the communication link is in a normal state.
Step S303b, determining that the process of the communication link transmitting the first data information is wrong.
And step S304, counting the accumulated times of errors in the process of transmitting the data information by the publish-subscribe communication framework in the current first statistical period.
Step S305, judging whether the accumulated times reaches a preset threshold value.
In this embodiment, it is considered that the communication link is occasionally abnormal in a short time, and the stability and the safety of the system of the autonomous vehicle are not affected, so in some embodiments, the first statistical period may be set in advance, and the accumulated number of times of errors in the process of transmitting the data information written by the publisher through the communication link in the current statistical period is counted, and whether the accumulated number of times reaches the predetermined threshold value is determined, so as to determine that the communication link is currently in an abnormal state or a normal state.
It should be noted that the position resetting "0" process is performed after the accumulated number of times after each first statistical cycle is finished.
In step S305, when it is determined that the accumulated number of times reaches the predetermined threshold, step S306 is executed; otherwise, step S307 is executed.
And S306, detecting that the publish-subscribe communication frame is abnormal.
And step S307, detecting that the publish-subscribe communication frame is in a normal state currently.
Fig. 7 is a flowchart of another communication link self-testing method according to an embodiment of the disclosure, and as shown in fig. 7, the communication link self-testing method shown in fig. 7 includes steps S4 in addition to steps S1 to S3, and only step S4 is described in detail below.
When step S3 detects an abnormality in the communication link, step S4 is executed.
And step S4, sending alarm information.
In the present disclosure, the presentation form of the alarm information is not limited. For example, the alarm information is information sent to a display in the vehicle-mounted system, and is used for controlling the display to display the alarm information; or the alarm information is information sent to a sound box in the vehicle-mounted system and is used for controlling the sound box to broadcast alarm information. For other presentation forms of the alarm information, no one example is given here.
Fig. 8 is a flowchart of a method for self-testing a communication link according to an embodiment of the present disclosure, and as shown in fig. 8, the communication link shown in fig. 8 includes steps S5 as well as steps S1-S3, and only step S5 is described in detail below.
And step S5, counting the quantity of the data information received in the period every second counting period.
The technical solution of the present disclosure does not limit the execution sequence between step S5 and the above steps S1 to S3; the case where step S5 is performed after step S3 is merely exemplarily illustrated in fig. 8.
It should be noted that, in the embodiment of the present disclosure, the communication link self-checking method may also include the above-mentioned step S1-step S3, step S4, and step S5, and the combined technical solutions also belong to the protection scope of the present disclosure.
Fig. 9 is a block diagram of a communication link self-detection system provided in an embodiment of the present disclosure, and as shown in fig. 9, the communication link self-detection system may be used to implement the communication link self-detection method provided in the foregoing embodiment, where the communication link is used for communicating with a publisher and a subscriber in a publish-subscribe communication manner, and the subscriber is a virtual module created inside when the publisher is created, and the system includes: the device comprises a receiving module 1, a determining module 2 and a detecting module 3.
The receiving module 1 is configured to receive first data information sent by a publisher.
The determining module 2 is configured to determine at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when the second data information is received before the first data information.
The detection module 3 is used for detecting whether the communication link is abnormal or not based on each communication state parameter determined by the determination module 2.
In some embodiments, the determining module 2 is specifically configured to compare, through a predefined callback function, a first time at which the first data message is received with a second time at which the second data message is received before the first data message, so as to determine at least one communication state parameter of the first data message.
In some embodiments, the at least one communication state parameter comprises: the frequency of receipt of messages posted by a publisher and/or the time delay of receipt of messages posted by a publisher.
Fig. 10 is a block diagram of a structure of a determining module in the present disclosure, and as shown in fig. 10, in some embodiments, when the at least one communication status parameter includes a frequency of receiving a message issued by a publisher, the determining module 2 includes: a first calling unit 201a and a first receiving unit 202 a.
The first calling unit 201a is configured to call a predefined first callback function; and when the first callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the Nth historical data information before the first data information as the second time of the second data information, calculating the difference value of the first time of the first data information and the second data information, and calculating the quotient of N and the difference value, wherein N is an integer greater than 2.
The first receiving unit 202a is configured to receive the processing result fed back by the first callback function as a frequency of receiving the message published by the publisher.
Fig. 11 is another structural block diagram of the determining module in the disclosure, and as shown in fig. 11, in some embodiments, when the at least one communication status parameter includes a time delay of receiving a message issued by a publisher, the determining module 2 includes: a second calling unit 201b and a second receiving unit 202 b.
The second calling unit 201b is configured to call a predefined second callback function; when the second callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the 1 st historical data information before the first data information as the second time of the second data information, and calculating the difference value between the first time of the first data information and the second time of the second data information;
the second receiving unit 202b is configured to receive a processing result fed back by the second callback function as a time delay of receiving the message issued by the publisher.
Fig. 12 is a block diagram of still another structure of the determining module in the disclosure, and as shown in fig. 12, in some embodiments, when the at least one communication state parameter includes both a receiving frequency and a receiving time delay, the determining module 2 may include the first invoking unit 201a, the first receiving unit 202a, the second invoking unit 201b, and the second receiving unit 202 b.
Fig. 13 is a block diagram of a detection module according to the present disclosure, and as shown in fig. 13, in some embodiments, the detection module includes 3: a comparison unit 301 and a first detection unit 302.
The comparing unit 301 is configured to compare each communication state parameter determined by the determining module 2 with a corresponding predetermined range.
The first detecting unit 302 is configured to detect that an abnormality occurs in the communication link when at least one of the communication state parameters determined by the determining module 2 is out of a corresponding predetermined range by comparison; otherwise, the communication link is detected to be in a normal state.
Fig. 14 is a block diagram of a structure of a detection module according to the present disclosure, where the detection module shown in fig. 14 includes: comparing unit 301, determining unit 303, counting unit 304, judging unit 305 and second detecting unit 306.
The comparing unit 301 is configured to compare each communication state parameter determined by the determining module 2 with a corresponding predetermined range.
The determining unit 303 is configured to determine that the process of the communication link transmitting the first data information is faulty when at least one of the communication state parameters is outside the corresponding predetermined range.
The counting unit 304 is configured to count the accumulated number of times of errors in the process of transferring data information by the communication link in the current first counting period.
The judgment unit 305 is configured to judge whether the accumulated number of times reaches a predetermined threshold.
The second detecting unit 306 is configured to detect that the communication link is abnormal when the determining unit determines that the accumulated number of times reaches the predetermined threshold; otherwise, the communication link is detected to be in a normal state.
Continuing to refer to FIG. 9, in some embodiments, the publish-subscribe communications framework further comprises: an alarm module 4; the alarm module 4 is configured to send out alarm information when the detection module detects that the communication link is abnormal.
Continuing to refer to FIG. 9, in some embodiments, the publish-subscribe communications framework further comprises: and the counting module 5 is used for counting the number of the data information received in the period every second counting period.
In addition, the communication link self-detection system may further include a creating module (not shown), where the creating module is configured to create a subscriber to the information published by the publisher in the publish-subscribe communication framework when the publish-subscribe communication framework provides a communication interface for the publisher, and for the description of the subscriber, reference may be made to the foregoing contents, and details are not described here.
For specific descriptions of each module and unit in this embodiment, reference may be made to the content of the description of the corresponding step in the foregoing embodiment, and details are not described here again.
The embodiment of the present disclosure further provides an autonomous driving vehicle, where the autonomous driving vehicle system includes the communication link self-detection system provided in the foregoing embodiment, and for specific description of the communication link self-detection system, reference may be made to the foregoing contents, and details are not described here again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods disclosed above, functional modules/units in the apparatus, may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to one of ordinary skill in the art
Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted in a generic and descriptive sense only and not for purposes of limitation. In some instances, features, characteristics and/or elements described in connection with a particular embodiment may be used alone or in combination with features, characteristics and/or elements described in connection with other embodiments, unless expressly stated otherwise, as would be apparent to one skilled in the art. Accordingly, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the disclosure as set forth in the appended claims.

Claims (15)

1. A communication link self-detection method performed by a subscriber, wherein the communication link is used for communication between a publisher and the subscriber who communicate in a publish-subscribe communication manner, and the subscriber is a virtual module created internally when the publisher is created, the method comprising:
receiving first data information sent by a publisher;
determining at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when second data information is received before the first data information;
and detecting whether the communication link is abnormal or not based on the at least one communication state parameter.
2. The method of claim 1, wherein the step of determining at least one communication status parameter of the first data information based on a first time instant at which the first data information is received and a second time instant at which a second data information is received before the first data information specifically comprises:
and comparing a first time when the first data information is received with a second time when second data information is received before the first data information through a predefined callback function, so as to determine at least one communication state parameter of the first data information.
3. The method of claim 1, wherein the at least one communication state parameter comprises: a frequency of receiving the messages published by the publisher and/or a time delay of receiving the messages published by the publisher.
4. The method of claim 3, wherein, when the at least one communication status parameter comprises the frequency of receiving messages published by the publisher, the determining at least one communication status parameter for the first data information based on a first time of receiving the first data information and a second time of receiving second data information prior to receiving the first data information comprises:
calling a predefined first callback function; when the first callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the Nth historical data information before the first data information as the second time of the second data information, calculating the difference value between the first time of the first data information and the second data information, and calculating the quotient of N and the difference value, wherein N is an integer greater than 2;
and receiving the processing result fed back by the first callback function as the frequency of receiving the messages published by the publishers.
5. The method of claim 3, wherein, when the at least one communication status parameter comprises a delay of receiving the message published by the publisher, the step of determining the at least one communication status parameter of the first data information based on a first time of receiving the first data information and a second time of receiving a second data information before the first data information comprises:
calling a predefined second callback function; when the second callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the 1 st historical data information before the first data information as the second time of the second data information, and calculating the difference value between the first time of the first data information and the second time of the second data information;
and receiving a processing result fed back by the second callback function as the time delay of the message issued by the issuer.
6. The method according to any one of claims 1 to 5, wherein the detecting whether the communication link is abnormal based on the at least one communication state parameter comprises:
comparing the at least one communication state parameter with a corresponding predetermined range respectively;
detecting an anomaly in the communication link if at least one of the at least one communication state parameter is outside a corresponding predetermined range.
7. The method according to any one of claims 1 to 5, wherein the step of detecting whether the communication link is abnormal based on the at least one communication state parameter comprises:
comparing the at least one communication state parameter with a corresponding predetermined range respectively;
if at least one of the at least one communication state parameter is outside the corresponding predetermined range, determining that the process of the communication link for communicating the first data information is erroneous;
counting the accumulated times of errors in the process of transmitting data information by the communication link in the current first statistical period;
judging whether the accumulated times reach a preset threshold value or not;
and when the accumulated times reach a preset threshold value, detecting that the communication link is abnormal.
8. A communication link self-test system performed by a subscriber, wherein the communication link is used for communication between a publisher and the subscriber communicating in a publish-subscribe communication, the subscriber being a virtual module created internally when the publisher is created, the system comprising:
the receiving module is used for receiving first data information sent by a publisher;
the determining module is used for determining at least one communication state parameter of the first data information based on a first time when the first data information is received and a second time when second data information is received before the first data information;
and the detection module is used for detecting whether the communication link is abnormal or not based on the at least one communication state parameter.
9. The system of claim 8, wherein the determining module is specifically configured to determine the at least one communication state parameter of the first data message by comparing a first time at which the first data message was received with a second time at which a second data message was received before the first data message via a predefined callback function.
10. The system of claim 8, wherein the at least one communication state parameter comprises: a frequency of receiving the messages published by the publisher and/or a time delay of receiving the messages published by the publisher.
11. The system of claim 10, wherein when the at least one communication status parameter comprises the frequency of receiving messages published by the publisher, the determination module comprises:
the first call unit is used for calling a predefined first callback function; when the first callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the Nth historical data information before the first data information as the second time of the second data information, calculating the difference value between the first time of the first data information and the second data information, and calculating the quotient of N and the difference value, wherein N is an integer greater than 2;
a first receiving unit, configured to receive a processing result fed back by the first callback function as the frequency of receiving the message issued by the issuer.
12. The system of claim 10, wherein when the at least one communication state parameter comprises the latency of receiving the message published by the publisher, the determining module comprises:
the second calling unit is used for calling a predefined second callback function; when the second callback function is called, executing a processing procedure of acquiring the current time of the system as the first time of the first data information, acquiring the receiving time of the 1 st historical data information before the first data information as the second time of the second data information, and calculating the difference value between the first time of the first data information and the second time of the second data information;
and the second receiving unit is configured to receive a processing result fed back by the second callback function, where the processing result is used as the time delay of receiving the message issued by the issuer.
13. The system of any of claims 8-12, wherein the detection module comprises:
the comparison unit is used for comparing the at least one communication state parameter with the corresponding preset range respectively;
and the first detection unit is used for detecting that the communication link is abnormal when at least one of the at least one communication state parameter is compared to be out of the corresponding preset range.
14. The system of any of claims 8-12, wherein the detection module comprises:
the comparison unit is used for comparing the at least one communication state parameter with the corresponding preset range respectively;
the judging unit is used for judging that the process of transmitting the first data information by the communication link is wrong when at least one of the at least one communication state parameter is compared to be out of the corresponding preset range;
the statistical unit is used for counting the accumulated times of errors in the process of transmitting the data information by the communication link in the current first statistical period;
the judging unit is used for judging whether the accumulated times reach a preset threshold value or not;
and the second detection unit is used for detecting that the communication link is abnormal when the judgment unit judges that the accumulated times reaches a preset threshold value.
15. An autonomous vehicle comprising: a communication link self-detection system as claimed in any one of claims 8 to 14.
CN201910717310.8A 2019-08-05 2019-08-05 Communication link self-detection method and system and automatic driving vehicle Active CN112333037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910717310.8A CN112333037B (en) 2019-08-05 2019-08-05 Communication link self-detection method and system and automatic driving vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910717310.8A CN112333037B (en) 2019-08-05 2019-08-05 Communication link self-detection method and system and automatic driving vehicle

Publications (2)

Publication Number Publication Date
CN112333037A true CN112333037A (en) 2021-02-05
CN112333037B CN112333037B (en) 2022-11-01

Family

ID=74319366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910717310.8A Active CN112333037B (en) 2019-08-05 2019-08-05 Communication link self-detection method and system and automatic driving vehicle

Country Status (1)

Country Link
CN (1) CN112333037B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794709A (en) * 2005-11-04 2006-06-28 华为技术有限公司 Noticing method and system of display information
CN104780551A (en) * 2014-01-14 2015-07-15 中国移动通信集团贵州有限公司 Signaling transfer point (STP) link state detection system and method
CN106230914A (en) * 2016-07-26 2016-12-14 重庆锐畅科技有限公司 A kind of electronic whiteboard data-sharing systems issued based on subscription information
WO2017014905A1 (en) * 2015-07-20 2017-01-26 Schweitzer Engineering Laboratories, Inc. Communication link failure detection in a software defined network
CN108282500A (en) * 2017-01-05 2018-07-13 阿里巴巴集团控股有限公司 Message issuance method, device and electronic equipment
CN109278674A (en) * 2018-08-31 2019-01-29 百度在线网络技术(北京)有限公司 Pilotless automobile system safety detection method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794709A (en) * 2005-11-04 2006-06-28 华为技术有限公司 Noticing method and system of display information
CN104780551A (en) * 2014-01-14 2015-07-15 中国移动通信集团贵州有限公司 Signaling transfer point (STP) link state detection system and method
WO2017014905A1 (en) * 2015-07-20 2017-01-26 Schweitzer Engineering Laboratories, Inc. Communication link failure detection in a software defined network
CN106230914A (en) * 2016-07-26 2016-12-14 重庆锐畅科技有限公司 A kind of electronic whiteboard data-sharing systems issued based on subscription information
CN108282500A (en) * 2017-01-05 2018-07-13 阿里巴巴集团控股有限公司 Message issuance method, device and electronic equipment
CN109278674A (en) * 2018-08-31 2019-01-29 百度在线网络技术(北京)有限公司 Pilotless automobile system safety detection method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于万海: "节点故障", 《汽车单片机与车载网络技术》 *

Also Published As

Publication number Publication date
CN112333037B (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN110213068B (en) Message middleware monitoring method and related equipment
CN104202201A (en) Log processing method and device and terminal
US20150113369A1 (en) Image transitioning and error detection for online presentations
US9929930B2 (en) Reducing an amount of captured network traffic data to analyze
CN105471932A (en) Front-end application monitoring method, front-end application and front-end application monitoring system
CN109167703B (en) Unmanned vehicle data monitoring method, device, equipment and storage medium
CN108366098B (en) Data interaction method and device for network nodes
CN102142989A (en) Failure positioning method and device for content delivery network
CN110096413A (en) A kind of disk localization method, system and electronic equipment and storage medium
CN109428682A (en) A kind of Message Processing confirmation method and device
CN102801575A (en) Loopback detecting method and device
CN112838980B (en) Message processing method, system, device, electronic equipment and storage medium
CN112333037B (en) Communication link self-detection method and system and automatic driving vehicle
CN108551402B (en) Information sending method and system, medium and computing equipment thereof
CN112615700B (en) Data sending method, gateway, system, electronic equipment and readable storage medium
CN108900466A (en) Prevent processing method, device, server and the storage medium of fallacious message
CN112013505B (en) Method and device for controlling communication compensation and air conditioner
CN105530110A (en) Network failure detection method and related network elements
CN112346447B (en) Safety detection method, safety detection module, safety system and automatic driving system
CN105389233A (en) Dual-system state parameter storage method, first system and dual-system terminal
CN106899504B (en) Cross-cluster service routing method and device
CN113793155B (en) Method and device for processing sent message
CN108833914B (en) Fault detection method and system for COB spliced wall
CN112988158A (en) Service engineering construction method, system, device and medium for automatically generating codes
CN111464662A (en) Multi-node master-slave network system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant