Data transmission method and device, micro control unit and autonomous vehicle
By introducing a microcontroller unit into the vehicle and using a real-time operating system to achieve timed data transmission between the functional control unit and the electronic control unit, the latency problem caused by the non-real-time operating system is solved, and the data transmission accuracy and the safety of autonomous driving are improved.
Patent Information
- Application Number
- CN202310182431.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-02-20
AI Technical Summary
In existing technologies, the non-real-time operating system of vehicle intelligent control functions causes data transmission delays, affecting the safety and efficiency of autonomous driving.
A microcontroller unit (MCU) is introduced between the functional control unit and the electronic control unit. Through a real-time operating system, data is sent at regular intervals or in real time, ensuring the accuracy and timeliness of data transmission.
It improves the accuracy and efficiency of data transmission, reduces frequent alarms from the ECU, and enhances the safety and reliability of autonomous driving.
Smart Images

Figure CN116257010B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of automatic driving, and in particular, to a data transmission method and device, a micro control unit, and an automatic driving vehicle. BACKGROUND
[0002] With the development of vehicle intelligent control technology, there are more and more intelligent control functions on vehicles. Each intelligent control function can correspond to a function control unit to control different functions. For example, a wiper corresponds to a function control unit to respond to the control operation of starting and stopping the wiper; a vehicle door corresponds to a function control unit to respond to the control operation of opening and closing the vehicle door. Each function control unit needs to send the operation of the driver to the ECU (Electronic Control Unit) of the vehicle in a timely manner to realize automatic driving control of the vehicle based on the operation of the driver. SUMMARY
[0003] The present disclosure provides a data transmission method and device, a micro control unit, and an automatic driving vehicle.
[0004] According to a first aspect of the present disclosure, a data transmission method is provided, which is applied to a micro control unit in a vehicle, wherein at least one function control unit, the micro control unit, and an electronic control unit are deployed on the vehicle, the function control unit is a unit that receives a control operation of a user and converts the control operation of the user into operation data; the micro control unit is in communication connection with the function control unit and the electronic control unit respectively; and the method comprises:
[0005] receiving operation data sent by the function control unit; wherein the operation data is used to indicate the control situation of the user on the vehicle; and the operation data corresponds to the control operation of the user on the function control unit on the vehicle;
[0006] sending the operation data to the electronic control unit at a timing according to the receiving time of the operation data; wherein the electronic control unit is a unit that performs automatic driving control on the vehicle according to the operation data.
[0007] According to a second aspect of the present disclosure, a data transmission device is provided, which is applied to a micro control unit in a vehicle, wherein at least one function control unit, the micro control unit, and an electronic control unit are deployed on the vehicle, the function control unit is a unit that receives a control operation of a user and converts the control operation of the user into operation data; the micro control unit is in communication connection with the function control unit and the electronic control unit respectively; and the device comprises:
[0008] a data receiving module, configured to receive operation data sent by the function control unit; wherein the operation data is used to indicate a control situation of the user on the vehicle; the operation data corresponds to a control operation made by the user on the function control unit on the vehicle;
[0009] a data sending module, configured to send the operation data to the electronic control unit in a timing manner according to a receiving time of the operation data; wherein the electronic control unit is a unit for automatically driving the vehicle according to the operation data.
[0010] According to a third aspect of the present disclosure, a micro control unit is provided, comprising:
[0011] at least one processor; and
[0012] a memory connected with the at least one processor in communication;
[0013] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect of the present disclosure.
[0014] According to a fourth aspect of the present disclosure, a non-transitory computer readable storage medium storing computer instructions is provided, and the computer instructions are used to enable the computer to perform the method according to the first aspect of the present disclosure.
[0015] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method according to the first aspect of the present disclosure.
[0016] According to a sixth aspect of the present disclosure, an autonomous vehicle is provided, and the vehicle comprises the micro control unit according to the first aspect of the present disclosure; the vehicle is deployed with at least one function control unit, the micro control unit and an electronic control unit; the function control unit is a unit for controlling a function on the vehicle; the micro control unit is connected with the function control unit and the electronic control unit in communication respectively; and the electronic control unit is a unit for automatically driving the vehicle according to the operation data.
[0017] According to the technology of the present disclosure, the data transmission efficiency of the vehicle is improved.
[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings are used to better understand the present scheme, and do not constitute a limitation on the present disclosure. Among them:
[0020] Figure 1 is a flow diagram of a data transmission method according to an embodiment of the present disclosure;
[0021] Figure 2 is a schematic diagram of the module structure in the data transmission process according to an embodiment of the present disclosure;
[0022] Figure 3 is a flow diagram of a data transmission method according to an embodiment of the present disclosure;
[0023] Figure 4 is a flow diagram of a data transmission method according to an embodiment of the present disclosure;
[0024] Figure 5 is a structural block diagram of a data transmission device according to an embodiment of the present disclosure;
[0025] Figure 6 is a structural block diagram of a data transmission device according to an embodiment of the present disclosure;
[0026] Figure 7 is a structural block diagram of an electronic device for implementing a data transmission method according to an embodiment of the present disclosure;
[0027] Figure 8 is a structural block diagram of an electronic device for implementing a data transmission method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, which include various details of the embodiments of the present disclosure to assist in understanding, and should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Also, in order to make the description clear and concise, the description of well-known functions and structures is omitted in the following description.
[0029] With the development of vehicle intelligent control technology, there are more and more intelligent control functions on vehicles, and each intelligent control function corresponds to a function control unit. For example, the control of a wiper can correspond to a function control unit, and the control of a brake can correspond to a function control unit. The function control units of various intelligent control functions need to periodically send messages to the ECU through the CAN (Controller Area Network) bus, so as to control the vehicle to automatically drive on the basis of the CAN message. For example, if a user steps on the accelerator to accelerate, the vehicle can realize automatic driving functions such as obstacle avoidance under the condition of acceleration. If the ECU does not regularly receive messages, it will alarm, affecting the safe driving of the vehicle. For example, if the ECU does not receive a message for controlling the vehicle speed, the vehicle may not be able to drive normally; for another example, if the ECU does not receive a message for locking the vehicle door after the vehicle is started, the ECU will alarm and prompt the user that there may be a driving danger.
[0030] However, the function control unit is configured with a non-real-time operating system, for example, a Linux operating system. The non-real-time operating system cannot accurately and regularly send messages and other data, and may have a delay, affecting the data transmission efficiency. If the delay time is too long, the ECU will frequently alarm, affecting the normal driving of the vehicle.
[0031] The present disclosure provides a data transmission method and device, a micro control unit and an autonomous vehicle, which are applied to the autonomous driving technology in the field of artificial intelligence, and in particular to the computing hardware field of unmanned driving technology, so as to improve the data transmission efficiency of the vehicle.
[0032] It should be noted that the data transmitted in the present embodiment is not for a specific user and cannot reflect the personal information of a specific user. It should be noted that the data transmitted in the present embodiment comes from a public data set.
[0033] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0034] To enable the reader to have a more profound understanding of the implementation principle of the present disclosure, the following embodiments will be further detailed. Figures 1-8
[0035] Figure 1 A flowchart of a data transmission method according to an embodiment of the present disclosure is provided. The method is applied to a micro control unit in a vehicle. The vehicle is deployed with at least one function control unit, a micro control unit and an electronic control unit. The function control unit is configured to receive a user's control operation and convert the user's control operation into operation data. The micro control unit is communicatively connected with the function control unit and the electronic control unit. The method can be performed by a data transmission device. As shown in Figure 1 The method comprises the following steps:
[0036] S101, receiving operation data sent by the function control unit; wherein the operation data corresponds to a control operation made by a user on the function control unit of the vehicle.
[0037] Exemplarily, the vehicle is deployed with a micro control unit (MCU), an electronic control unit (ECU) and a plurality of function control units. The function control unit is configured to receive a user's control operation and convert the user's control operation into operation data. Different function control units can correspond to different functions, and the number of function control units can correspond to the number of functions on the vehicle. For example, the control of the windshield wiper can correspond to one function control unit, and the control of the vehicle door can also correspond to one function control unit.
[0038] The MCU can be communicatively connected with the function control unit and the ECU, i.e., the MCU can interact with the function control unit and the ECU. The MCU is configured with a real-time operating system, for example, FreeRTOS (Free Real time operating system). Through the real-time operating system, the MCU can transmit data in real time or at a fixed time, avoiding data transmission delay. In this embodiment, the MCU can transmit data such as messages to the ECU at a fixed time.
[0039] When a user uses the vehicle, the function control unit on the vehicle can respond to the user's control operation on each function in real time. The user can be the driver of the vehicle. The user can make a control operation on the function control unit, for example, the function control unit is the windshield wiper of the vehicle, and the user can make a control operation to turn on the windshield wiper. The function control unit can respond to the user's control operation in real time. The control operation includes operation data, which corresponds to the user's control operation on the function control unit of the vehicle, and can represent the user's control of the vehicle. For example, the user wants to turn on the windshield wiper and makes a certain control operation. The operation data in the control operation indicates that the windshield wiper is turned on.
[0040] The function control unit determines operation data corresponding to the control operation made by the user in response to the control operation. The function control unit can be configured to send the operation data to the MCU in real time or at a timing, and the MCU receives the operation data sent by the function control unit. The data transmission mode between the function control unit and the MCU can be preset, and the transmission protocol can be preset, and the data transmission between the function control unit and the MCU is performed according to the preset transmission protocol. The operation data can be in the form of a message, for example, it can be a CAN message, that is, the function control unit can send the operation data to the MCU through the CAN bus.
[0041] S102, according to the receiving time of the operation data, the operation data is sent to the electronic control unit at a timing; wherein the electronic control unit is a unit for automatically driving the vehicle according to the operation data.
[0042] Exemplarily, the MCU can send the operation data to the ECU in real time or at a timing after receiving the operation data. The ECU, as a driving computer of the vehicle, can automatically drive the vehicle according to the operation data. The MCU can preset a time period for sending the operation data to the ECU, for example, the MCU can send the operation data to the ECU once every certain time period. The MCU can also preset a time point for sending the operation data, and the MCU determines the time of receiving the operation data as the receiving time. According to the receiving time, it is determined whether the receiving time is the time point for sending the operation data to the ECU, if yes, the received operation data can be sent to the ECU; if not, the operation data can be sent to the ECU at the preset time point.
[0043] The data transmission mode between the MCU and the ECU can be preset, for example, the data transmission between the MCU and the ECU is through the CAN bus. The CAN bus system for data transmission can be arranged in the chassis of the vehicle, that is, the MCU can send the operation data in the form of CAN bus message to the ECU through the chassis.
[0044] In this embodiment, the operation data is sent to the electronic control unit, including: converting the operation data into a controller area network bus message in a preset format; transmitting the controller area network bus message to the electronic control unit through the controller area network bus.
[0045] Specifically, the MCU and the ECU can transmit data through the CAN bus, that is, the data transmitted between the MCU and the ECU is a CAN bus message. If the operation data received by the MCU from the function control unit is in the form of a CAN bus message, the MCU can send the received CAN bus message to the ECU.
[0046] The MCU can be provided with a preset format of the CAN bus message, if the operation data sent by the function control unit is not in the form of the CAN bus message, the MCU can first convert the received operation data into the CAN bus message in the preset format, and then send the CAN bus message to the ECU through the CAN bus. For example, the MCU can send the CAN bus message through the CAN bus system of the chassis.
[0047] The MCU can be provided with a preset format of the CAN bus message, if the operation data sent by the function control unit is not in the form of the CAN bus message, the MCU can first convert the received operation data into the CAN bus message in the preset format, and then send the CAN bus message to the ECU through the CAN bus. For example, the MCU can send the CAN bus message through the CAN bus system of the chassis.
[0048] Figure 2 A module structure diagram in a data transmission process is provided for the embodiment of the present disclosure. Figure 2 In the embodiment, the function control unit 201 sends operation data to the MCU 202, and the MCU 202 sends the operation data in the form of the CAN bus message to the ECU 204 in a timely manner through the chassis 203, i.e., through the CAN bus system. The function control unit 201 can also be set to send operation data in a timely manner when sending operation data to the MCU 202, but since the function control unit 201 is a non-real-time operating system, there can be a delay when sending operation data, which does not affect the MCU 202 sending data to the ECU 204 in a timely manner.
[0049] The embodiment of the present disclosure sets an MCU between the function control unit and the ECU, so that the operation data of the function control unit is first sent to the MCU, and then the MCU sends the operation data to the ECU in a timely manner, reduces the direct data transmission between the function control unit and the ECU, avoids the delay of the non-real-time operating system of the function control unit when sending data to the ECU, and thus avoids the frequent alarm of the ECU. By sending operation data to the ECU through the MCU, the ECU can receive the operation data in a timely manner, avoids missing data, improves the accuracy and efficiency of data transmission, and realizes the control of the ECU on the automatic driving, thereby improving the safety of the automatic driving.
[0050] Figure 3 A flowchart of a data transmission method is provided for the embodiment of the present disclosure, which is an optional embodiment based on the above-mentioned embodiment.
[0051] In the embodiment, the operation data is sent to the electronic control unit in a timely manner according to the receiving time of the operation data, which can be refined as follows: determining the receiving time of the operation data; and sending the operation data to the electronic control unit if the receiving time of the operation data meets the preset time requirement.
[0052] As shown in Figure 3 The method comprises the following steps:
[0053] S301, receive operation data sent by the function control unit; wherein the operation data corresponds to a control operation made by the user on the function control unit of the vehicle.
[0054] By way of example, this step can refer to step S101 described above, and will not be described again.
[0055] S302, determine the receiving time of the operation data.
[0056] By way of example, the MCU receives the operation data sent by the function control unit, and determines the time when the operation data is received in real time as the receiving time.
[0057] S303, if the receiving time of the operation data meets a preset time requirement, send the operation data to the electronic control unit.
[0058] By way of example, a time requirement is preset, and after the receiving time of the operation data is obtained, it is determined whether the receiving time meets the preset time requirement. If yes, the MCU can send the operation data to the ECU; if no, the MCU does not send the operation data to the ECU until the current time meets the time requirement and then sends the operation data. For example, the preset time requirement is a preset time point, and the MCU can determine whether the time point of the receiving time is the preset time point. If yes, the operation data is sent to the ECU; if no, the operation data can be sent again when the current time is the preset time point.
[0059] The MCU can send the operation data to the ECU on time based on the real-time operating system according to the preset time requirement, avoid data sending delay, cause the ECU to alarm, meet the real-time requirement of data transmission, and improve the efficiency of data transmission and the safety of vehicle driving.
[0060] In this embodiment, if the receiving time of the operation data meets the preset time requirement, the operation data is sent to the electronic control unit, including: determining a time for data sending to the electronic control unit before the receiving time as a first time; and if a time difference between the receiving time and the first time is a preset first time period, the operation data corresponding to the control operation is sent to the electronic control unit.
[0061] Specifically, the MCU can record the time when the operation data is received each time, and the content of the operation data received each time can be consistent or inconsistent. The MCU can also record the time when the operation data is sent to the ECU each time. After obtaining the current receiving time, the time when the data is sent to the ECU before the current operation data is received is determined, that is, the time when the operation data is sent to the ECU closest to the receiving time before the receiving time, as the first time. For example, the MCU receives operation data at 12 o'clock, and the receiving time is 12 o'clock. At 10:30, 11 o'clock and 11:30, the MCU sends operation data to the ECU at these three time points, respectively. Therefore, it can be determined that the first time is 11:30, which is closest to 12 o'clock.
[0062] After obtaining the first time, the time difference between the receiving time and the first time is determined. A first time period is set in advance, and the determined time difference is compared with the first time period. If the time difference is the preset first time period, it is determined that the MCU can transmit data to the ECU, and the MCU sends the operation data to the ECU. If the time difference is not the first time period, the operation data is not sent to the ECU. For example, the receiving time is 12 o'clock, and the first time is 11:30. Therefore, the time difference is 30 minutes. The preset first time period is 30 minutes, and the MCU can send the operation data to the ECU.
[0063] The beneficial effect of such setting is that according to the preset first time period, it is determined whether the MCU can immediately send the operation data to the ECU after receiving the operation data, the timing sending of the MCU is realized, the data congestion in the transmission between the MCU and the ECU is avoided, and the efficiency and accuracy of data transmission are improved.
[0064] In the embodiment, the method further includes: if the time difference between the receiving time and the first time is less than the preset first time period, obtaining the current time; and if the time difference between the current time and the first time is the preset first time period, sending the operation data corresponding to the control operation to the electronic control unit.
[0065] Specifically, after the first time is determined, the time difference between the first time and the receiving time is determined. The determined time difference is compared with the preset first time period. If the time difference is less than the preset first time period, the time of the current time is obtained in real time as the current time, and the current time is updated in real time.
[0066] The time difference between the current time and the first time is determined in real time, and the time difference is compared with the first time period. Since the current time changes in real time, the time difference that changes in real time is compared with the first time period. If the time difference between the current time and the first time reaches the preset first time period, that is, the time difference between the current time and the first time is the first time period, the MCU can send operation data corresponding to the control operation to the ECU; if the time difference between the current time and the first time does not reach the preset first time period, the real-time current time is continuously obtained until the time difference between the current time and the first time reaches the first time period. After determining that the time difference between the current time and the first time is the first time period, a new first time is determined, and the comparison of the time difference and the first time period is repeated.
[0067] The beneficial effect of such setting is that by obtaining the current time and determining in real time whether the time difference between the current time and the first time reaches the first time period, the MCU can timely and regularly send data to the ECU, avoid excessive data transmission at certain times, cause data loss, reduce ECU alarms, and improve data transmission efficiency and accuracy.
[0068] In the embodiment, the method further includes: if the operation data transmitted by the function control unit is not received, obtaining the time at which the data is sent to the electronic control unit before the current time, as a second time; and if the time difference between the current time and the second time reaches the preset first time period, the operation data corresponding to the second time is retransmitted to the electronic control unit.
[0069] Specifically, a non-real-time operating system is deployed in the function control unit, which cannot accurately perform regular data transmission to the MCU, and there may be a delay when the function control unit sends operation data to the MCU. Alternatively, the function control unit has a fault and cannot normally send operation data to the MCU. That is, the MCU can not receive the data transmitted by the function control unit.
[0070] Regardless of whether the MCU receives the operation data transmitted by the function control unit, the MCU can determine the current time in real time to perform data transmission to the ECU. When the MCU does not receive the operation data transmitted by the function control unit, the MCU can obtain the current time in real time, and obtain the time at which the operation data is sent to the ECU before the current time as a second time. That is, the MCU can record the time at which the data is transmitted to the ECU each time, and determine the time closest to the current time as the second time.
[0071] The time difference between the current time and the second time is determined in real time, and the time difference between the current time and the second time is compared with the preset first time period. If the time difference between the current time and the second time reaches the preset first time period, and the MCU does not receive operation data transmitted by the function control unit at the current time, the MCU obtains the operation data transmitted to the ECU at the second time, and retransmits the operation data corresponding to the second time to the ECU, that is, transmits operation data consistent with the last transmitted data to the ECU. If the time difference between the current time and the second time does not reach the preset first time period, the current time continues to be obtained until the time difference between the current time and the second time reaches the preset first time period.
[0072] The beneficial effect of such arrangement is that the MCU can still send data to the ECU at a regular time when no operation data is received, avoiding the delay of the ECU receiving data and causing an alarm, and ensuring the normal driving of the vehicle.
[0073] In the embodiment, the method further includes: determining the number of times of transmitting the same operation data to the electronic control unit as the first number; and transmitting first prompt information to the electronic control unit if it is determined that the first number is equal to or greater than a preset first number threshold; wherein the first prompt information is used to prompt the user to check the vehicle.
[0074] Specifically, the MCU records the number of times of retransmitting a certain operation data to the ECU, that is, the number of times of transmitting the same operation data to the ECU as the first number. Different operation data can correspond to different first numbers. That is, each operation data can be retransmitted by the MCU. The first number corresponding to the operation data can be incremented by one each time the operation data is retransmitted. The MCU can determine the first number of the operation data after updating the first number.
[0075] A first number threshold can be preset in the MCU. After determining the latest first number, the first number can be compared with the first number threshold. If it is determined that the first number is equal to or greater than the preset first number threshold, the MCU can transmit first prompt information to the ECU, the ECU can alarm and display the first prompt information to the user. The first prompt information is used to prompt the user to check the vehicle. For example, the first prompt information can be transmitted to the ECU in the form of CAN bus message, and the name of the function control unit that needs to be checked can be included in the first prompt information, so as to facilitate the user to check specifically. If the driver does not handle after the ECU alarms, it can cause problems in the driving of the vehicle, such as the failure of the wiper to work normally, the failure of the vehicle door, etc.
[0076] If it is determined that the first number of times is less than the preset first number of times threshold, the MCU continues to wait for the operation data of the function control unit, and does not need to send the first prompt information to the ECU.
[0077] The beneficial effect of such an arrangement is that if the number of times that the MCU sends repeated messages is too high, the ECU can be prompted to issue an alarm, avoiding problems in driving the vehicle and affecting driving safety.
[0078] In this embodiment, the electronic control unit is further configured to determine a number of times that the same operation data is received by the micro control unit, as a second number of times; and if it is determined that the second number of times is equal to or greater than a preset first number of times threshold, a second prompt information is issued; wherein the second prompt information is used to prompt a user to check the vehicle.
[0079] Specifically, the ECU can record the number of times that the same operation data is received in real time as the second number of times. Each time the ECU receives repeated operation data, the second number of times corresponding to the operation data is incremented by one. The ECU can also have a preset first number of times threshold. After determining the latest second number of times of the operation data, the second number of times is compared with the first number of times threshold. If the second number of times is equal to or greater than the preset first number of times threshold, the ECU can actively issue a second prompt information to issue an alarm. The second prompt information is used to prompt a user to check the vehicle. The source of the operation data, i.e. the function control unit corresponding to the operation data, can be included in the second prompt information, so as to facilitate the user to check. If the second number of times is less than the preset first number of times threshold, the ECU continues to wait for the operation data sent by the MCU.
[0080] The beneficial effect of such an arrangement is that the ECU itself records the number of times that the operation data is retransmitted. If the number of times that the ECU receives repeated messages is too high, the ECU can timely issue an alarm, improving the safety of autonomous driving.
[0081] The embodiments of the present disclosure reduce the direct data transmission between the function control unit and the ECU by arranging an MCU between the function control unit and the ECU, so that the operation data of the function control unit is first sent to the MCU, and then the MCU sends the operation data to the ECU at a regular time. This avoids the non-real-time operating system of the function control unit from causing a delay when sending data to the ECU, thereby causing the ECU to frequently issue an alarm. By sending the operation data to the ECU through the MCU, it is ensured that the ECU can receive the operation data on time, avoiding missing data of the ECU, improving the accuracy and efficiency of data transmission, and realizing the autonomous driving control of the ECU, thereby improving the safety of autonomous driving.
[0082] Figure 4 A flowchart of a data transmission method according to an embodiment of the present disclosure is shown in the figure. This embodiment is an optional embodiment based on the above-mentioned embodiments.
[0083] In this embodiment, the function control unit is configured to determine a time before the current time at which the function control unit transmits data to the micro control unit as a third time, and transmit operation data corresponding to the control operation to the micro control unit if a time difference between the current time and the third time is a preset second time period.
[0084] As shown in Figure 4 the method comprises the following steps:
[0085] S401, the function control unit determines operation data based on a control operation made by a user on the function control unit on the vehicle, and determines a time before the current time at which the function control unit transmits data to the micro control unit as a third time.
[0086] For example, the function control unit determines operation data corresponding to the control operation in response to a control operation made by a user on each function on the vehicle. The function control unit can not send the operation data to the MCU immediately after determining the operation data.
[0087] The function control unit can obtain the current time in real time and can record the time of each transmission of operation data to the MCU. After obtaining the operation data, the function control unit can determine the time of transmission of the operation data to the MCU before the current time as the third time. That is, the time of the last transmission of operation data before the current time is determined as the third time. The content of the operation data transmitted before the current time can be the same as or different from the content of the operation data obtained at the current time.
[0088] S402, if the function control unit determines that the time difference between the current time and the third time is a preset second time period, the function control unit transmits operation data corresponding to the control operation to the micro control unit.
[0089] For example, the function control unit can be preset with a second time period, and the time difference between the current time and the third time is determined and compared with the second time period. If the time difference between the current time and the third time is the preset second time period, the function control unit can transmit operation data corresponding to the control operation to the MCU. If the time difference between the current time and the third time is less than the second time period, the function control unit continues to obtain a new current time until the time difference between the current time and the third time is the second time period.
[0090] By setting the second time period, the function control unit can transmit operation data to the MCU as regularly as possible, avoid data loss caused by congestion during data transmission, and improve the efficiency and accuracy of data transmission.
[0091] In the embodiment, the function control unit is further configured to resend the operation data corresponding to the third time to the micro control unit if no control operation of the user is responded to, and a time difference between the current time and the third time is a preset second time period.
[0092] Specifically, the user can not perform a control operation on the function control unit during driving. If the function control unit does not respond to the control operation of the user, the function control unit can still send operation data to the MCU. For example, the function control unit can send the operation data sent last time or preset default data to the MCU.
[0093] The function control unit can acquire the current time in real time and determine the third time before the current time. A second time period is preset to determine the time difference between the current time and the third time. If the time difference is the preset second time period and the function control unit does not respond to a new control operation, the function control unit can resend the operation data sent at the third time to the MCU. If the time difference has not reached the second time period, the function control unit can continue to acquire a new current time until the time difference reaches the second time period.
[0094] If a new control operation of the user is responded to during the acquisition of the new current time, the time difference between the new current time and the third time is determined. If the time difference reaches the second time period, the operation data corresponding to the new control operation is sent to the MCU.
[0095] The beneficial effect of such a setting is that when the user does not perform a new control operation, the function control unit can still continue to send operation data to the MCU, so that the MCU can perform normal transmission work on the ECU and ensure the automatic driving control of the vehicle.
[0096] In the embodiment, the method further includes: determining the number of times that the function control unit sends the same operation data to the micro control unit as a third number; if it is determined that the third number is equal to or greater than a preset second number threshold, a third prompt information is sent; and the third prompt information is used to prompt the user to check the vehicle.
[0097] Specifically, the MCU can record the number of times that the function control unit resends as the third number in real time. Different third numbers can correspond to different operation data. That is, the third number is the number of times that the function control unit sends the same operation data to the MCU.
[0098] The MCU can update the third number of the same operation data when receiving the same operation data, for example, can add one to the third number of the operation data. A second number threshold is preset in the MCU, and after obtaining the updated third number, the third number is compared with the second number threshold. If the third number is equal to or greater than the preset second number threshold, the MCU can issue a third prompt information for alarm, and the third prompt information can be used to prompt the user to check the vehicle; if the third number is less than the preset second number threshold, the MCU does not issue a prompt information and continues to wait for data from the function control unit.
[0099] The beneficial effect of such setting is that the MCU can record the number of times of repeatedly receiving the same data from the function control unit, and if the number of times of repeatedly receiving the data is too much, the MCU can alarm to improve the safety of driving.
[0100] S403, the micro control unit receives the operation data sent by the function control unit.
[0101] Exemplarily, this step can refer to the above step S101, and will not be repeated here.
[0102] S404, the micro control unit sends the operation data to the electronic control unit at a timing according to the receiving time of the operation data; wherein the electronic control unit is a unit for automatically driving the vehicle according to the operation data.
[0103] Exemplarily, this step can refer to the above step S102, and will not be repeated here.
[0104] The embodiment of the present disclosure sets an MCU between the function control unit and the ECU, so that the operation data of the function control unit is first sent to the MCU, and then the MCU sends the operation data to the ECU at a timing, reduces the direct data transmission between the function control unit and the ECU, avoids the delay of the non-real-time operating system of the function control unit when sending data to the ECU, thereby causing the frequent alarm of the ECU. By sending the operation data to the ECU through the MCU, it is ensured that the ECU can receive on time, avoids the data missing of the ECU, improves the accuracy and efficiency of data transmission, realizes the automatic driving control of the ECU, and improves the safety of automatic driving.
[0105] Figure 5 A structural block diagram of a data transmission device provided by the embodiment of the present disclosure is provided. The device is applied to a micro control unit in a vehicle, and the vehicle is deployed with at least one function control unit, a micro control unit and an electronic control unit. The function control unit is a unit for receiving the control operation of the user and converting the control operation of the user into operation data. The micro control unit is in communication connection with the function control unit and the electronic control unit. For the convenience of description, only the parts related to the embodiment of the present disclosure are shown. For details, refer to the above description of the method. Figure 5The data transmission device 500 includes a data receiving module 501 and a data sending module 502.
[0106] The data receiving module 501 is used to receive operation data sent by the function control unit; wherein the operation data corresponds to the control operation performed by the user on the function control unit on the vehicle.
[0107] The data transmission module 502 is used to periodically send the operation data to the electronic control unit according to the reception time of the operation data; wherein the electronic control unit is a unit that performs autonomous driving control of the vehicle according to the operation data.
[0108] Figure 6 This is a structural block diagram of a data transmission device provided in an embodiment of the present disclosure, such as... Figure 6 As shown, the data transmission device 600 includes a data receiving module 601 and a data sending module 602, wherein the data sending module 602 includes a first determining submodule 6021 and a first judging submodule 6022.
[0109] The first determining submodule 6021 is used to determine the receiving time of the operation data;
[0110] The first judgment submodule 6022 is used to send the operation data to the electronic control unit if the reception time of the operation data meets the preset time requirement.
[0111] In one example, the first judgment submodule 6022 is specifically used for:
[0112] The time before the receiving time is determined to be the first time when data is sent to the electronic control unit; if the time difference between the receiving time and the first time is a preset first time period, then the operation data corresponding to the control operation is sent to the electronic control unit.
[0113] In one example, the device also includes:
[0114] The first acquisition module is used to acquire the current time if the time difference between the received time and the first time is less than a preset first time period;
[0115] The time difference arrival module is used to send the operation data corresponding to the control operation to the electronic control unit if the time difference between the current time and the first time is a preset first time period.
[0116] In one example, the device also includes:
[0117] The second obtaining module is configured to, if the operation data transmitted by the function control unit is not received, obtain a time at which data is sent to the electronic control unit before the current time, as a second time.
[0118] The retransmission module is configured to, if a time difference between the current time and the second time reaches a preset first time period, retransmit operation data corresponding to the second time to the electronic control unit.
[0119] In one example, the apparatus further includes:
[0120] The first recording module is configured to determine a number of times that the same operation data is sent to the electronic control unit, as a first number of times.
[0121] The first prompting module is configured to, if it is determined that the first number of times is equal to or greater than a preset first number of times threshold, send first prompting information to the electronic control unit; wherein the first prompting information is used to prompt a user to view the vehicle.
[0122] In one example, the electronic control unit is further configured to determine a number of times that the same operation data is received from the micro control unit, as a second number of times; if it is determined that the second number of times is equal to or greater than a preset first number of times threshold, send second prompting information; wherein the second prompting information is used to prompt a user to view the vehicle.
[0123] In one example, the data sending module 602 includes:
[0124] The format conversion submodule is configured to convert the operation data into a controller area network bus message in a preset format.
[0125] The message sending submodule is configured to transmit the controller area network bus message to the electronic control unit through the controller area network bus.
[0126] In one example, the function control unit is further configured to determine a time at which data is transmitted to the micro control unit before the current time, as a third time; if a time difference between the current time and the third time is a preset second time period, transmit operation data corresponding to the control operation to the micro control unit.
[0127] In one example, the function control unit is further configured to, if a control operation of a user is not responded to, retransmit operation data corresponding to the third time to the micro control unit when the time difference between the current time and the third time is the preset second time period.
[0128] In one example, the apparatus further includes:
[0129] The second recording module is configured to determine a third number of times that the function control unit sends the same operation data to the micro control unit.
[0130] The second prompting module is configured to issue a third prompt information if it is determined that the third number of times is equal to or greater than a preset second number threshold. The third prompt information is used to prompt the user to check the vehicle.
[0131] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device.
[0132] Figure 7 A structural block diagram of an electronic device is provided for an embodiment of the present disclosure. The electronic device can be a microcontroller, such as Figure 7 As shown, the electronic device 700 includes at least one processor 702 and a memory 701 connected with the at least one processor 702 in communication. The memory stores instructions executable by the at least one processor 702. The instructions are executed by the at least one processor 702 to enable the at least one processor 702 to perform the data transmission method of the present disclosure.
[0133] The electronic device 700 further includes a receiver 703 and a transmitter 704. The receiver 703 is configured to receive instructions and data sent by other devices, and the transmitter 704 is configured to send instructions and data to external devices.
[0134] According to an embodiment of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, a computer program product, and a vehicle.
[0135] According to an embodiment of the present disclosure, the present disclosure further provides a computer program product. The computer program product includes a computer program stored in a readable storage medium. The at least one processor of the electronic device can read the computer program from the readable storage medium. The at least one processor executes the computer program to enable the electronic device to perform the scheme provided in any of the above embodiments.
[0136] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. In the present embodiment, the electronic device can be a microcontroller. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present disclosure described and / or claimed in this document.
[0137] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 802 or a computer program loaded from storage unit 808 into random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via bus 804. Input / output (I / O) interface 805 is also connected to bus 804.
[0138] Multiple components in device 800 are connected to I / O interface 805, including: input unit 806, such as keyboard, mouse, etc.; output unit 807, such as various types of monitors, speakers, etc.; storage unit 808, such as disk, optical disk, etc.; and communication unit 809, such as network card, modem, wireless transceiver, etc. Communication unit 809 allows device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0139] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above, such as data transfer methods. For example, in some embodiments, the data transfer method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the data transfer method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the data transfer method by any other suitable means (e.g., by means of firmware).
[0140] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0141] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, or entirely on a remote machine or server.
[0142] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0143] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0144] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0145] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short). The server can also be a server of a distributed system, or a server combined with a blockchain.
[0146] In an automatic driving vehicle provided by an embodiment of the present disclosure, a micro control unit implementing a data transmission method is included. At least one function control unit, the micro control unit and an electronic control unit are deployed on the vehicle, the function control unit being a unit for controlling functions on the vehicle; the micro control unit being in communication connection with the function control unit and the electronic control unit respectively; and the electronic control unit being a unit for automatically driving and controlling the vehicle according to operation data.
[0147] It should be understood that the various forms of flow shown above can be used to reorder, add, or remove steps. For example, the steps described in the present disclosure can be performed in parallel, in series, or in a different order, as long as the desired results of the technology disclosed in the present disclosure are achieved, which is not limited herein.
[0148] The specific implementation described above does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data transmission method, the method being applied to a micro control unit in a vehicle, on which at least one function control unit, the micro control unit and an electronic control unit are deployed, the function control unit being a unit that receives a user's control operation and converts the user's control operation into operation data. The micro control unit is respectively connected with the function control unit and the electronic control unit in communication; the method comprises: receiving operation data sent by the function control unit; wherein the operation data corresponds to a control operation made by a user on the function control unit of the vehicle; sending the operation data to the electronic control unit in time according to the receiving time of the operation data; wherein the electronic control unit is a unit for automatically driving the vehicle according to the operation data; wherein the operation data is sent to the electronic control unit in time according to the receiving time of the operation data, comprising: in response to the time difference between the receiving time and the first time being a preset first time period, the operation data corresponding to the control operation is sent to the electronic control unit; wherein the first time is the nearest time of data sending to the electronic control unit before the receiving time; in response to the time difference between the receiving time and the first time being less than the preset first time period, the current time is obtained; if the time difference between the current time and the first time is the preset first time period, the operation data corresponding to the control operation is sent to the electronic control unit; if the time difference between the current time and the first time does not reach the preset first time period, the current time is continuously obtained until the time difference between the current time and the first time reaches the first time period; in response to not receiving the operation data transmitted by the function control unit, the time of data sending to the electronic control unit before the current time is determined, the nearest time to the current time is determined as the second time; if the time difference between the current time and the second time reaches the preset first time period, the operation data corresponding to the second time is retransmitted to the electronic control unit.
2. The method of claim 1, further comprising: determining the number of times of sending the same operation data to the electronic control unit as the first number; if it is determined that the first number is equal to or greater than a preset first number threshold, sending first prompt information to the electronic control unit; wherein the first prompt information is used to prompt the user to check the vehicle.
3. The method of claim 2, wherein the electronic control unit is further configured to determine a number of times that the micro control unit transmits the same operation data, as a second number, and to issue a second prompt if the second number is equal to or greater than a preset first number threshold. The second prompt information is used to prompt the user to check the vehicle.
4. The method of any one of claims 1-3, wherein, The operation data is sent to the electronic control unit, comprising: converting the operation data into a controller area network bus message in a preset format; transmitting the controller area network bus message to the electronic control unit through the controller area network bus.
5. The method of any one of claims 1-3, wherein, The function control unit is also used to determine the time of data transmission to the micro control unit before the current time as the third time; if the time difference between the current time and the third time is a preset second time period, the operation data corresponding to the control operation is transmitted to the micro control unit.
6. The method of claim 5, wherein the function control unit is further configured to resend the operation data corresponding to the third time to the micro control unit if no response to the control operation of the user is received, and the time difference between the current time and the third time is a preset second time period.
7. The method of claim 6, further comprising: determining a third number of times that the function control unit sends the same operation data to the micro control unit; if it is determined that the third number of times is equal to or greater than a preset second number threshold, issuing a third prompt information; wherein the third prompt information is used to prompt the user to check the vehicle.
8. A data transmission apparatus, the apparatus being applied to a micro control unit in a vehicle, on which at least one function control unit, the micro control unit and an electronic control unit are deployed, the function control unit being a unit that receives a user's control operation and converts the user's control operation into operation data; the micro control unit is in communication connection with the function control unit and the electronic control unit respectively; the device comprises: a data receiving module configured to receive operation data sent by the function control unit; wherein the operation data corresponds to a control operation of the user on the function control unit of the vehicle; a data sending module configured to send the operation data to the electronic control unit at a timing according to a receiving time of the operation data; wherein the electronic control unit is a unit for automatically driving the vehicle according to the operation data; wherein the data sending module is further configured to: in response to a time difference between the receiving time and a first time being a preset first time period, send the operation data corresponding to the control operation to the electronic control unit; wherein the first time is the most recent time of data sending to the electronic control unit before the receiving time; further comprising: a first acquisition module configured to acquire a current time in response to a time difference between the receiving time and the first time being less than the preset first time period; a time difference reaching module configured to send the operation data corresponding to the control operation to the electronic control unit if the time difference between the current time and the first time is the preset first time period; if the time difference between the current time and the first time does not reach the preset first time period, continue to acquire the current time until the time difference between the current time and the first time reaches the first time period; a second acquisition module configured to acquire a second time which is the most recent time of data sending to the electronic control unit before the current time in response to not receiving the operation data transmitted by the function control unit; a resend module configured to resend the operation data corresponding to the second time to the electronic control unit if the time difference between the current time and the second time reaches the preset first time period.
9. The device of claim 8, further comprising: a first recording module configured to determine a first number of times that the same operation data is sent to the electronic control unit; a first prompt module configured to send a first prompt information to the electronic control unit if it is determined that the first number of times is equal to or greater than a preset first number threshold; wherein the first prompt information is used to prompt the user to check the vehicle.
10. The apparatus of claim 9, wherein the electronic control unit is further configured to determine a number of times that the micro control unit receives the same operation data, the number of times being a second number of times, and to issue a second prompt if the second number of times is equal to or greater than a preset first number of times threshold. the second prompt information is used to prompt the user to check the vehicle.
11. The apparatus of any one of claims 8-10, wherein, The data sending module comprises: a format conversion submodule, configured to convert the operation data into a controller area network bus message in a preset format; a message sending submodule, configured to transmit the controller area network bus message to the electronic control unit via the controller area network bus.
12. The apparatus of any one of claims 8-10, wherein, The function control unit is further configured to determine a time at which data is transmitted to the micro control unit before the current time as a third time, and transmit operation data corresponding to the control operation to the micro control unit if a time difference between the current time and the third time is a preset second time period.
13. The apparatus according to claim 12, wherein the function control unit is further configured to retransmit operation data corresponding to the third time to the micro control unit if no response is received to the control operation, and the time difference between the current time and the third time is the preset second time period.
14. The apparatus according to claim 13, further comprising: a second recording module, configured to determine a third number of times at which the function control unit transmits the same operation data to the micro control unit; a second prompting module, configured to issue third prompting information if it is determined that the third number is equal to or greater than a preset second number threshold; wherein the third prompting information is used to prompt the user to view the vehicle.
15. A micro control unit, comprising: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to execute the method of any one of claims 1-7.
17. A computer program product comprising a computer program, wherein, The computer program, when executed by the processor, implements the steps of the method of any one of claims 1-7.
18. An autonomous vehicle, wherein, The vehicle comprises the micro control unit of claim 15; the vehicle is provided with at least one function control unit, the micro control unit and an electronic control unit, the function control unit is a unit for controlling the function of the vehicle; the micro control unit is in communication connection with the function control unit and the electronic control unit respectively; and the electronic control unit is a unit for automatically driving the vehicle according to the operation data.
Citation Information
Patent Citations
Intelligent meeting lamp control system based on AI image recognition and navigation system
CN111055759A