CN116319450A - Message frame loss monitoring method, vehicle testing method, system, equipment and medium - Google Patents

Message frame loss monitoring method, vehicle testing method, system, equipment and medium Download PDF

Info

Publication number
CN116319450A
CN116319450A CN202310158545.4A CN202310158545A CN116319450A CN 116319450 A CN116319450 A CN 116319450A CN 202310158545 A CN202310158545 A CN 202310158545A CN 116319450 A CN116319450 A CN 116319450A
Authority
CN
China
Prior art keywords
message
vehicle
serial port
frame loss
bus controller
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.)
Pending
Application number
CN202310158545.4A
Other languages
Chinese (zh)
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.)
Weilai Automobile Technology Anhui Co Ltd
Original Assignee
Weilai Automobile Technology Anhui 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 Weilai Automobile Technology Anhui Co Ltd filed Critical Weilai Automobile Technology Anhui Co Ltd
Priority to CN202310158545.4A priority Critical patent/CN116319450A/en
Publication of CN116319450A publication Critical patent/CN116319450A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

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)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method for monitoring packet frame loss, a method for testing a vehicle machine, a system, equipment and a medium, which comprise the steps of acquiring packet information of a received packet when triggering packet interruption in the process of receiving the packet; detecting whether the message information meets a preset frame loss condition or not; the message information meets the preset frame loss condition, and outputs the frame loss prompt information so as to take corresponding measures, ensure effective control of the vehicle and improve the reliability of the test and the safety of vehicle running.

Description

Message frame loss monitoring method, vehicle testing method, system, equipment and medium
Technical Field
The invention relates to the technical field of automobile network communication, and particularly provides a method for monitoring message frame loss, a method, a system, equipment and a medium for testing an automobile machine.
Background
In recent years, the technology of the digital automobile cabin is developed rapidly, and when a host of the cabin is used for testing and taking charge of the real-time task of the whole automobile, the host CAN generally communicate with each task node on the whole automobile through buses such as CAN, LIN and the like.
The bus makes corresponding regulations on frame format transmitting and receiving mechanisms, so that frame transmitting and receiving mechanisms on the bus are quite perfect, but the transmission of each frame signal is realized through software of each task node, the accuracy of the running percentage of the software cannot be guaranteed, so that the situation of frame signal loss exists, and for a host computer of a cabin, when some signals (frames) are lost, vehicles cannot respond correspondingly, and the reliability of vehicle testing and the safety of vehicle running are reduced.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks, the present invention provides a method, a system, a device and a medium for monitoring the frame loss of a message, which solve or at least partially solve the technical problem that the running safety of a vehicle is reduced because the vehicle cannot respond correspondingly when the frame loss of the message in the bus of the vehicle occurs.
In a first aspect, the present invention provides a method for monitoring packet loss, where the method for monitoring packet loss includes:
in the process of receiving the message, when triggering the message receiving interruption, obtaining the message information of the received message;
detecting whether the message information meets a preset frame loss condition or not;
and if the message information meets the preset frame loss condition, outputting frame loss prompt information.
Further, in the above method for monitoring packet loss, acquiring packet information of a received packet includes:
if the received message has a message with a counting signal value, extracting the counting signal value as message information of the received message; and/or
If the received message has a message without a counting signal value, extracting the theoretical accumulated time length of the received message without the counting signal value as the message information of the received message; the determining process of the theoretical accumulated duration comprises the following steps: when the counting signal value of the set virtual counter reaches a preset counting threshold value, determining the theoretical accumulated duration according to the period of the message without the counting signal value and the preset counting threshold value; and/or
And extracting a first control signal carried in the received message for controlling the target object as message information of the received message.
Further, in the method for monitoring packet frame loss described above, the preset frame loss condition includes:
the counting signal values are not sequentially circulated according to a preset counting value range; and/or
The error between the theoretical accumulated time length and the actual timing time length of the timer is out of a preset error range; and/or
And the first control signal is inconsistent with the second control signal which is received by the upper computer and used for controlling the target object.
Further, the method for monitoring the packet loss further includes:
in the process of sending the message, determining the interrupt period of the timer according to the period of the message to be sent; determining the number of timers according to the number of messages to be sent in each period;
and sending the message to be sent to a target object based on the interrupt period of the timer and the number of the timers.
In a second aspect, the present invention provides a vehicle testing method, including:
receiving a function test instruction sent by an upper computer through a serial port; the function test instruction carries first serial port protocol data;
converting the first serial port protocol data into a message consistent with the bus type of the vehicle-mounted device and sending the message to the vehicle-mounted device;
receiving test response data sent by the vehicle machine in a message form;
converting the test response data into second serial port protocol data, and sending the second serial port protocol data to the upper computer;
wherein, in the process of interacting with the vehicle machine in a message, the monitoring is performed according to the method for monitoring the frame loss of the message according to any one of claims 1 to 4.
In a third aspect, a vehicle testing system is provided, the vehicle testing system includes an upper computer, a bus controller and a vehicle;
the bus controller comprises a serial port and a bus transceiver;
the upper computer is connected with the bus controller through a serial port;
the bus controller is connected with the vehicle machine through a bus transceiver;
the upper computer is used for sending a function test instruction to the bus controller through the serial port; the function test instruction carries first serial port protocol data;
the bus controller is used for receiving a function test instruction sent by the upper computer through the serial port; converting the first serial port protocol data into a message consistent with the bus type of the vehicle-mounted device and sending the message to the vehicle-mounted device;
the vehicle machine is used for receiving the message to respond and sending test response data to the bus controller in a message form;
the bus controller is also used for receiving test response data sent by the vehicle machine in a message form; converting the test response data into second serial port protocol data, and sending the second serial port protocol data to the upper computer;
the upper computer is also used for judging whether the function passes the test according to the second serial port protocol data, and recording and displaying the test state of each function;
the bus controller monitors according to the method for monitoring the frame loss of the message according to any one of the above in the process of interacting with the vehicle machine by the message.
In a fourth aspect, an electronic device is provided, where the electronic device includes a processor and a storage device, where the storage device is adapted to store a plurality of program codes, where the program codes are adapted to be loaded and executed by the processor to perform the method for monitoring packet loss as described in any one of the above, or to perform the method for testing a vehicle set as described above.
In a fifth aspect, a computer readable storage medium is provided, where the computer readable storage medium stores a plurality of program codes, where the program codes are adapted to be loaded and executed by a processor to perform the method for monitoring packet loss according to any one of the above, or to perform the method for testing a vehicle set according to the above.
The technical scheme provided by the invention has at least one or more of the following beneficial effects:
in the technical scheme of implementing the invention, in the process of receiving the message, when the message receiving interruption is triggered, the message information of the received message is acquired, whether the message information meets the preset frame loss condition is detected, and if the message information meets the preset frame loss condition, the frame loss prompt information is output so as to take corresponding measures, ensure the effective control of the vehicle and improve the reliability of the test and the safety of the vehicle running.
Drawings
The present disclosure will become more readily understood with reference to the accompanying drawings. As will be readily appreciated by those skilled in the art: the drawings are for illustrative purposes only and are not intended to limit the scope of the present invention. Moreover, like numerals in the figures are used to designate like parts, wherein:
fig. 1 is a flow chart illustrating main steps of a method for monitoring packet loss according to an embodiment of the present invention;
FIG. 2 is a flow chart of the main steps of a vehicle testing method according to an embodiment of the invention;
FIG. 3 is a block diagram of the main structure of a vehicle testing system according to one embodiment of the invention;
FIG. 4 is a block diagram of the main structure of the bus controller of FIG. 3;
fig. 5 is a main structural block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Some embodiments of the invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present invention, and are not intended to limit the scope of the present invention.
In the description of the present invention, a "module," "processor" may include hardware, software, or a combination of both. A module may comprise hardware circuitry, various suitable sensors, communication ports, memory, or software components, such as program code, or a combination of software and hardware. The processor may be a central processor, a microprocessor, an image processor, a digital signal processor, or any other suitable processor. The processor has data and/or signal processing functions. The processor may be implemented in software, hardware, or a combination of both. Non-transitory computer readable storage media include any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, and the like. The term "a and/or B" means all possible combinations of a and B, such as a alone, B alone or a and B. The term "at least one A or B" or "at least one of A and B" has a meaning similar to "A and/or B" and may include A alone, B alone or A and B. The singular forms "a", "an" and "the" include plural referents.
The bus in the host of the cabin makes corresponding regulations on the frame format transmitting and receiving mechanism, so that the frame transmitting and receiving mechanism on the bus is quite perfect, but the transmission of each frame signal is realized through the software of each task node, the accuracy of the running percentage of the software cannot be ensured, so that the situation of frame signal loss exists, and when certain signals (frames) are lost, the vehicle cannot respond correspondingly, and the running safety of the vehicle is reduced.
Therefore, in order to solve the technical problems, the invention provides the following technical scheme:
referring to fig. 1, fig. 1 is a schematic flow chart of main steps of a method for monitoring packet loss according to an embodiment of the present invention. As shown in fig. 1, the method for monitoring packet loss in the embodiment of the present invention mainly includes the following steps 101 to 103.
Step 101, in the process of receiving the message, when triggering the message receiving interruption, obtaining the message information of the received message;
the following describes the technical scheme of the invention by taking a test scene of a vehicle machine as an example but not limited to the test scene.
In a specific implementation process, when the vehicle is tested, the vehicle is an embedded Linux system, and many data operations such as log analysis, machine brushing, bug debugging and the like are performed during the test, so that in order to improve the data compatibility, an upper computer of the Linux system is generally used by a test bench. The CAN/LIN communication generally adopted by the automobile machine and the like as the lower computer is widely used in the prior art, but the tools which CAN be used for the automatic test of the main machine of the cabin are basically used under the Windows operating system, the compatibility of the Linux operating system is poor, the Linux operating system is generally difficult to use, the upper computer generally does not have a CAN/LIN interface, and if the requirements for developing the automatic test are met, the tools are difficult to add.
In order to solve the above technical problems, in this embodiment, a bus controller is provided, where the bus controller may communicate with a mini of an upper computer of a Linux operating system through a serial port such as USART, and then communicate with a host of a cabin through a CAN/LIN bus, and return a bus result to the upper computer in real time through a UART serial port. The bus controller and the host of the cabin interact through a message form.
In a specific implementation process, when the bus controller triggers the interrupt of receiving the message in the process of receiving the message sent by the host of the cabin, the bus controller stops receiving the message and acquires the message information of the received message.
In one implementation, the message information of the received message may be obtained by one or more of the following methods.
The first way is: if the received message has a message with a counting signal value, the counting signal value can be extracted as the message information of the received message.
Specifically, some relatively important messages usually carry a count signal value, and some unimportant messages do not carry a count signal value, so that after receiving a message, the received message can be classified into a message with a count signal value and a message without a count signal value. When the message information of the received message is obtained, if the message with the counting signal value exists, the counting signal value can be directly extracted as the message information of the received message.
The second way is: if the received message has a message without a counting signal value, extracting the theoretical accumulated time length of the received message without the counting signal value as the message information of the received message; the determining process of the theoretical accumulated duration comprises the following steps: when the counting signal value of the set virtual counter reaches a preset counting threshold value, determining the theoretical accumulated duration according to the period of the message without the counting signal value and the preset counting threshold value;
in a specific implementation process, if the received message has a message without a count signal value, the embodiment may set a virtual counter, and then use the virtual counter to perform a technology to obtain that when the technical signal value reaches a preset count threshold, the theoretical accumulation duration may be determined according to the period of the message without the count signal value and the preset count threshold. For example, the preset count threshold may be 16, and the period of the message without the count signal value is 10ms, and the theoretical cumulative duration is 160ms.
Third mode: and extracting a first control signal carried in the received message for controlling a target object (such as a vehicle) as message information of the received message.
In a specific implementation process, a control signal may be periodically sent to a target object through an interface of the upper computer uiautomatic 2 to control the target object, after the target object responds to the control signal, a returned message may carry the control signal, where the control signal carried by the returned message may be defined as a first control signal, and the control signal sent by the interface of the upper computer uiautomatic 2 may be defined as a second control signal. When the message information of the received message is obtained, a first control signal carried in the received message for controlling a target object is extracted as the message information of the received message.
Step 102, detecting whether the message information meets a preset frame loss condition;
in a specific implementation process, a frame loss condition for detecting whether a message is lost or not may be preset, and then whether the message information of the received message meets the preset frame loss condition is detected. The preset frame loss condition comprises that the counting signal values are not sequentially circulated according to a preset counting value range; and/or the error between the theoretical accumulated time length and the actual timing time length of the timer is out of a preset error range; and/or the first control signal is inconsistent with the second control signal which is received by the upper computer and used for controlling the target object.
And step 103, outputting frame loss prompt information if the message information meets the preset frame loss condition.
In a specific implementation process, the messages with the count signal values are usually circulated in turn according to a technical value range (0-15), so that if the two count values are not continuous, the message frame loss is indicated, and the frame loss prompt information is output.
In a specific implementation process, after a message without a counting signal value is accumulated to a preset counting threshold value for 16 times, the required theoretical accumulated time length is 160ms, the actual timing time length of a timer is 180ms, the error of the two is 20ms, and the preset error range is-2 ms to 2ms, at this time, the message frame loss is indicated, and the frame loss prompt information is output.
In a specific implementation process, the uiAutomaker 2 interface sends out a control signal, and the control signal returned by the target object after response is consistent under the condition of no frame loss, so that if the first control signal is inconsistent with the second control signal for target object performance control by the received upper computer, the frame loss of the message is indicated, and the frame loss prompt information is output, so that the message loss is processed in time, the target object is effectively controlled, and the reliability of target object testing and the safety of target object task completion are improved.
In the method for monitoring the frame loss of the message, when the message receiving interruption is triggered in the process of receiving the message, the message information of the received message is acquired, whether the message information meets the preset frame loss condition is detected, if the message information meets the preset frame loss condition, the frame loss prompt information is output, so that corresponding measures are taken, effective control of the vehicle is ensured, and the reliability of the test and the safety of the vehicle running are improved. For example, in the test section, the program may be corrected or the like, and in the vehicle running section, the vehicle may be controlled to stop running or the like.
In a specific implementation process, in order to prevent frame loss of a message in the process of sending the message, the interrupt period of the timer can be determined according to the period of the message to be sent; determining the number of timers according to the number of messages to be sent in each period; and sending the message to be sent to a target object based on the interrupt period of the timer and the number of the timers.
When the message to be sent is needed to be sent to the target object, priority can be set according to the importance of the message, and the message can be sent according to the order from high priority to low priority.
In a specific implementation process, a message with a period of 20/50/250/640ms and the like can determine that the interrupt period of the timer is 10ms; the interrupt period of the timer can be determined to be 100ms for a message with a period of 100/200/500/1000 ms. A relation table of the number of messages and the number of timers can be set, and then the needed number of timers can be obtained according to the relation table, so that the phenomenon that the messages are easy to lose frames when one timer triggers interruption of too many messages is avoided.
Referring to fig. 2, fig. 2 is a schematic flow chart of main steps of a vehicle testing method according to an embodiment of the invention. As shown in fig. 1, the method for monitoring packet loss in the embodiment of the present invention mainly includes the following steps 201 to 204.
Step 201, receiving a function test instruction sent by an upper computer through a serial port;
in a specific implementation process, the functional test instruction carries first serial port protocol data.
Step 202, converting the first serial port protocol data into a message consistent with the bus type of the vehicle-mounted device and sending the message to the vehicle-mounted device;
in a specific implementation process, after the vehicle machine receives the message, the vehicle machine can respond to obtain corresponding response test data, and the response test data is fed back in the form of the message.
Step 203, receiving test response data sent by the vehicle machine in a message form;
in a specific implementation process, in the process of interacting with the vehicle machine by using messages, the method for monitoring the frame loss of the messages according to the embodiment can monitor the message loss so as to reduce the phenomenon of message loss, and can discover the failure of message loss in time so as to perform corresponding processing and ensure the reliability of vehicle testing.
And 204, converting the test response data into second serial port protocol data, and transmitting the second serial port protocol data to the upper computer.
In a specific implementation process, after the upper computer receives the second serial port protocol data, whether the function passes the test can be judged according to the second serial port protocol data, the test state of each function is recorded and displayed, and a next test instruction is automatically issued until all the function tests are completed.
It should be noted that, although the foregoing embodiments describe the steps in a specific order, it will be understood by those skilled in the art that, in order to achieve the effects of the present invention, the steps are not necessarily performed in such an order, and may be performed simultaneously (in parallel) or in other orders, and these variations are within the scope of the present invention.
It will be appreciated by those skilled in the art that the present invention may implement all or part of the above-described methods according to the above-described embodiments, or may be implemented by means of a computer program for instructing relevant hardware, where the computer program may be stored in a computer readable storage medium, and where the computer program may implement the steps of the above-described embodiments of the method when executed by a processor. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable storage medium may include: any entity or device, medium, usb disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunications signals, software distribution media, and the like capable of carrying the computer program code. It should be noted that the computer readable storage medium may include content that is subject to appropriate increases and decreases as required by jurisdictions and by jurisdictions in which such computer readable storage medium does not include electrical carrier signals and telecommunications signals.
Further, the invention also provides a vehicle testing system.
Referring to fig. 3, fig. 3 is a main block diagram of a vehicle testing system according to an embodiment of the present invention, and fig. 4 is a main block diagram of a bus controller in fig. 3. As shown in fig. 3 to 4, the vehicle testing system in the embodiment of the invention may include an upper computer 31, a bus controller 32, and a vehicle 33. Wherein the bus controller 32 includes a serial port 321 and a bus transceiver 322; the upper computer 31 is connected with the bus controller 32 through a serial port 321; the bus controller 32 is connected to the vehicle 33 via a bus transceiver 322.
In a specific implementation process, the upper computer 31 is configured to send a functional test instruction to the bus controller 32 through the serial port 321; the function test instruction carries first serial port 321 protocol data;
the bus controller 32 is configured to receive a functional test instruction sent by the host computer 31 through the serial port 321; converting the first serial port 321 protocol data into a message with the same bus type as the vehicle-mounted device 33, and sending the message to the vehicle-mounted device 33;
the vehicle machine 33 is configured to receive the message for responding, and send test response data to the bus controller 32 in a message form;
the bus controller 32 is further configured to receive test response data sent by the vehicle machine 33 in a message form; converting the test response data into second serial port 321 protocol data, and transmitting the second serial port 321 protocol data to the upper computer 31;
the upper computer 31 is further configured to determine whether the function passes the test according to the second serial port 321 protocol data, and record and display a test status of each function;
the bus controller 32 monitors the message frame loss monitoring method according to the above embodiment during the interaction with the vehicle machine 33.
As shown in fig. 4, the bus controller 32 further includes a main controller 323, a power supply 324, a control button 325, and an indicator light 326; the serial port 321, the bus transceiver 322, the control button 325, the indicator light 326 and the power supply 324 are respectively connected with the main controller 323.
In one specific implementation, the master controller 323 may be selected as STM32F107RCT6, which has a 32-bit system, ARM core, 3.3V power supply, 72M highest main frequency, 256KB ROM,64KB RAM, and good program expansion space. Meanwhile, the method is rich in timer resources and suitable for controlling CAN/LIN message transmission in different periods.
The power supply 324 can be compatible with the 12V power input of the host computer of the cabin, and can be respectively reduced to 5V and 3.3V through 78M05 and AMS1117-3.3 power chips, thereby meeting the power input requirements of various peripheral devices on the line controller.
The serial port 321 may be a high-performance USB-USART converter FT232 chip, and a power input end of the serial port 321 is connected to a power output end of the bus controller 32. That is, the power supply voltage of the FT232 chip is 5V_USB which is obtained from the upper computer 31 through the USB port, and single-point grounding is adopted to realize the isolation of the USB power supply of the upper computer 31 and the power supply of the bus controller 32, so that the mutual interference of the power supplies is avoided, and the circuit system is protected; the main controller 323 can select the USART1 serial port 321, so as to not only meet the communication function of the serial port 321, but also reuse the serial port as a program programming port, thereby facilitating firmware upgrade.
The bus transceiver 322 may include a CAN transceiver 3221 and a LIN transceiver 3222. The CAN transceiver 3221 CAN select a TJA1050 CAN driver, adopts 5V power supply, converts TTL level signals output by a CAN controller of the main controller 323 into differential signals meeting CAN2.0 protocol, and ensures compatibility with a host CAN bus. The LIN transceiver 3222 may be a TJA1020LIN driver, and uses 12V power to convert the TTL level signal output by the LIN controller of the main controller 323 into a 12V signal meeting the LIN2.0 protocol requirement, so as to ensure compatibility with the LIN bus of the host.
The operation buttons are used for realizing operations such as manual control and software reset of the bus controller 32, and the indicator light 326 is used for indicating the heartbeat state of the controller and the normal sending of the CAN/LIN signal.
The working process of the vehicle-mounted machine 33 testing system of the embodiment is as follows:
(1) Initializing each hardware;
specifically, system clock initialization, timer initialization, operation key initialization, indicator light 326 initialization, CAN transceiver 3221 initialization, LIN transceiver 3222 initialization, serial port 321 initialization, interrupt initialization, and the like may be performed.
(2) The CAN/LIN message starts to be periodically sent;
(3) Bus indicator 326 begins to flash;
(4) Detecting whether a host bus is normal; if yes, executing the step (5), if not, ending;
(5) The main cycle starts;
(6) Bus controller 32 indicates that light 326 is beginning to flash;
(7) Serial port 321 scan procedure is started;
(8) Caching and displaying the data of the upper computer 31;
(9) Whether an enter key triggering interrupt is detected; if yes, executing the step (10), otherwise, returning to the step (8);
(10) Retrieving the required control instructions from the cached instruction set;
(11) And sending the control instruction to the vehicle machine 33, so that the vehicle machine 33 executes the task corresponding to the control instruction through reading and writing the bus message.
The invention further provides electronic equipment.
Referring to fig. 5, fig. 5 is a main structural block diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 5, the error compensation apparatus of the multi-level structure power grid dispatching system in the embodiment of the present invention may include a processor 51 and a storage device 52.
The storage device 52 may be configured to store a program for performing the error compensation method of the multi-level structure grid dispatching system of the above-described method embodiment, and the processor 51 may be configured to perform the program in the storage device 52, including, but not limited to, a program for performing the message frame loss monitoring method of the above-described method embodiment, or a program for performing the above-described on-board test method. For convenience of explanation, only those portions of the embodiments of the present invention that are relevant to the embodiments of the present invention are shown, and specific technical details are not disclosed, please refer to the method portions of the embodiments of the present invention.
In one implementation, the number of memory devices 52 and processors 51 may be multiple. The program for executing the error compensation method of the multi-level structure power grid dispatching system of the method embodiment may be divided into a plurality of sub-programs, and each sub-program may be loaded and executed by the processor 51 to execute the message frame loss monitoring method of the method embodiment, or execute different steps of the vehicle testing method. Specifically, each of the sub-programs may be stored in a different storage device 52, and each of the processors 51 may be configured to execute the program in one or more storage devices 52 to jointly implement the method for monitoring the packet loss of the method embodiment, or execute the vehicle test method, that is, each of the processors 51 executes the method for monitoring the packet loss of the method embodiment, or execute different steps of the vehicle test method, so as to jointly implement the method for monitoring the packet loss of the method embodiment, or execute the vehicle test method.
The plurality of processors 51 may be processors disposed on the same device, for example, the device may be a high-performance device composed of a plurality of processors, and the plurality of processors 51 may be processors configured on the high-performance device. The plurality of processors 51 may be processors disposed on different devices, for example, the devices may be a server cluster, and the plurality of processors 51 may be processors on different servers in the server cluster.
Further, the invention also provides a computer readable storage medium. In an embodiment of the computer readable storage medium according to the present invention, the computer readable storage medium may be configured to store a program for executing the method for monitoring a packet loss according to the embodiment of the method, or executing the method for testing a vehicle, where the program may be loaded and executed by a processor to implement the method for monitoring a packet loss, or executing the method for testing a vehicle. For convenience of explanation, only those portions of the embodiments of the present invention that are relevant to the embodiments of the present invention are shown, and specific technical details are not disclosed, please refer to the method portions of the embodiments of the present invention. The computer readable storage medium may be a storage device including various electronic devices, and optionally, the computer readable storage medium in the embodiments of the present invention is a non-transitory computer readable storage medium.
Further, it should be understood that, since the respective modules are merely set to illustrate the functional units of the apparatus of the present invention, the physical devices corresponding to the modules may be the processor itself, or a part of software in the processor, a part of hardware, or a part of a combination of software and hardware. Accordingly, the number of individual modules in the figures is merely illustrative.
Those skilled in the art will appreciate that the various modules in the apparatus may be adaptively split or combined. Such splitting or combining of specific modules does not cause the technical solution to deviate from the principle of the present invention, and therefore, the technical solution after splitting or combining falls within the protection scope of the present invention.
Thus far, the technical solution of the present invention has been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of protection of the present invention is not limited to these specific embodiments. Equivalent modifications and substitutions for related technical features may be made by those skilled in the art without departing from the principles of the present invention, and such modifications and substitutions will fall within the scope of the present invention.

Claims (10)

1. The method for monitoring the frame loss of the message is characterized by comprising the following steps:
in the process of receiving the message, when triggering the message receiving interruption, obtaining the message information of the received message;
detecting whether the message information meets a preset frame loss condition or not;
and if the message information meets the preset frame loss condition, outputting frame loss prompt information.
2. The method for monitoring packet loss according to claim 1, wherein obtaining packet information of the received packet comprises:
if the received message has a message with a counting signal value, extracting the counting signal value as message information of the received message; and/or
If the received message has a message without a counting signal value, extracting the theoretical accumulated time length of the received message without the counting signal value as the message information of the received message; the determining process of the theoretical accumulated duration comprises the following steps: when the counting signal value of the set virtual counter reaches a preset counting threshold value, determining the theoretical accumulated duration according to the period of the message without the counting signal value and the preset counting threshold value; and/or
And extracting a first control signal carried in the received message for controlling the target object as message information of the received message.
3. The method for monitoring packet loss according to claim 2, wherein the preset frame loss condition includes:
the counting signal values are not sequentially circulated according to a preset counting value range; and/or
The error between the theoretical accumulated time length and the actual timing time length of the timer is out of a preset error range; and/or
And the first control signal is inconsistent with the second control signal which is received by the upper computer and used for controlling the target object.
4. The method for monitoring packet loss according to claim 1, further comprising:
in the process of sending the message, determining the interrupt period of the timer according to the period of the message to be sent; determining the number of timers according to the number of messages to be sent in each period;
and sending the message to be sent to a target object based on the interrupt period of the timer and the number of the timers.
5. A vehicle testing method, comprising:
receiving a function test instruction sent by an upper computer through a serial port; the function test instruction carries first serial port protocol data;
converting the first serial port protocol data into a message consistent with the bus type of the vehicle-mounted device and sending the message to the vehicle-mounted device;
receiving test response data sent by the vehicle machine in a message form;
converting the test response data into second serial port protocol data, and sending the second serial port protocol data to the upper computer;
wherein, in the process of interacting with the vehicle machine in a message, the monitoring is performed according to the method for monitoring the frame loss of the message according to any one of claims 1 to 4.
6. The vehicle machine test system is characterized by comprising an upper computer, a bus controller and a vehicle machine;
the bus controller comprises a serial port and a bus transceiver;
the upper computer is connected with the bus controller through a serial port;
the bus controller is connected with the vehicle machine through a bus transceiver;
the upper computer is used for sending a function test instruction to the bus controller through the serial port; the function test instruction carries first serial port protocol data;
the bus controller is used for receiving a function test instruction sent by the upper computer through the serial port; converting the first serial port protocol data into a message consistent with the bus type of the vehicle-mounted device and sending the message to the vehicle-mounted device;
the vehicle machine is used for receiving the message to respond and sending test response data to the bus controller in a message form;
the bus controller is also used for receiving test response data sent by the vehicle machine in a message form; converting the test response data into second serial port protocol data, and sending the second serial port protocol data to the upper computer;
the upper computer is also used for judging whether the function passes the test according to the second serial port protocol data, and recording and displaying the test state of each function;
the bus controller monitors according to the method for monitoring the frame loss of the message according to any one of claims 1 to 4 in the process of interacting with the vehicle machine in the form of the message.
7. The vehicle testing system of claim 6, wherein the bus controller further comprises a main controller and a power supply;
the serial port, the bus transceiver and the power supply are respectively connected with the main controller.
8. The vehicle test system of claim 6, wherein the serial port power input is coupled to the bus controller power output.
9. An electronic device comprising a processor and a storage device, the storage device being adapted to store a plurality of program code, the program code being adapted to be loaded and executed by the processor to perform the method of monitoring for packet loss as claimed in any one of claims 1 to 4, or to perform the method of testing a vehicle in accordance with claim 5.
10. A computer readable storage medium, characterized in that a plurality of program codes are stored, which are adapted to be loaded and executed by a processor to perform the method for monitoring packet loss according to any one of claims 1 to 4 or to perform the method for testing a vehicle according to claim 5.
CN202310158545.4A 2023-02-20 2023-02-20 Message frame loss monitoring method, vehicle testing method, system, equipment and medium Pending CN116319450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310158545.4A CN116319450A (en) 2023-02-20 2023-02-20 Message frame loss monitoring method, vehicle testing method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310158545.4A CN116319450A (en) 2023-02-20 2023-02-20 Message frame loss monitoring method, vehicle testing method, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN116319450A true CN116319450A (en) 2023-06-23

Family

ID=86816111

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310158545.4A Pending CN116319450A (en) 2023-02-20 2023-02-20 Message frame loss monitoring method, vehicle testing method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116319450A (en)

Similar Documents

Publication Publication Date Title
CN100365994C (en) Method and system for regulating ethernet
US20180151003A1 (en) System and method for transferring diagnostic commands to a vehicle
CN112148515B (en) Fault positioning method, system, device, medium and equipment
JP2013510532A (en) Advanced communication control unit and method for recording protocol events
CN103970628A (en) Automatic detection system and automatic detection method thereof
CN116627877B (en) On-chip bus state recording system and method
CN113133041B (en) Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle
KR20120126873A (en) System for Dynamic Analysis of Embedded Software of Vehicle using UDS
CN112118144A (en) Ethernet data frame output method and system
CN101800672A (en) Equipment detection method and equipment
CN116340073B (en) Test method, device and system
CN116319450A (en) Message frame loss monitoring method, vehicle testing method, system, equipment and medium
CN113960991A (en) Vehicle fault diagnosis system, method and device, system-on-chip and vehicle
CN112634489B (en) Vehicle state determination method, device and system based on mobile terminal
CN115098342A (en) System log collection method, system, terminal and storage medium
CN110768874B (en) Modular Ethernet tester
US20220222135A1 (en) Electronic control device
CN112965929A (en) I2C communication bus monitoring and debugging equipment and method
CN111651308A (en) Method and device for acquiring debugging data of DP-to-HDMI chip and intelligent device
CN113655773B (en) Vehicle machine system communication serial port pressure testing system and method
CN109634906B (en) IC communication system and method
CN112986806A (en) Interface test method, test system and computer storage medium
CN111262757A (en) Network diagnosis parameter display method, device, motor driver, system and medium
CN113626279B (en) I2C communication monitoring method, device, CPLD and medium
CN114003420B (en) CPLD diagnosis method, system, equipment and computer storage medium

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