Vehicle log reporting methods, systems, devices, computer equipment, and storage media

By introducing a log agent service module into the electronic control unit to receive and manage vehicle health report logs from various software components, the problem of inconsistent maintenance and management in existing technologies is solved, thereby improving cost-effectiveness.

CN120599722BActive Publication Date: 2025-10-31CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511102819.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-07
Publication Date
2025-10-31
Estimated Expiration
2045-08-07

AI Technical Summary

Technical Problem

The existing vehicle log reporting process cannot be maintained and managed uniformly, leading to increased development and maintenance costs.

Method used

By introducing a log agent service module into the electronic control unit, the global structure variable of the vehicle health report log sent by each software component is received, and the underlying software interface is called for unified management according to the preset log reporting service strategy.

Benefits of technology

It enables unified maintenance and management of logs for various software components in the electronic control unit, reducing development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599722B_ABST
    Figure CN120599722B_ABST
Patent Text Reader

Abstract

This application relates to a vehicle log reporting method, system, device, computer equipment, and storage medium. The method includes: receiving a global structure variable populated with vehicle health report logs from each software component via a log proxy service module configured in the electronic control unit (ECU) and communicating with multiple software components therein; retrieving the vehicle health report logs from the global structure variable; and reporting the vehicle health report logs according to a preset log reporting service strategy by calling the underlying software interface. This method enables the log proxy service module to uniformly maintain and manage the logs reported by each software component deployed in the ECU, thus reducing development and maintenance costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a vehicle log reporting method, system, device, computer equipment, storage medium, and computer program product. Background Technology

[0002] With the development of vehicle technology, the log reporting function of Electronic Control Units (ECUs) is a core technology for achieving fault diagnosis, status monitoring, and functional safety. Specifically, ECUs can achieve log reporting based on the automotive open system architecture. Log reporting is accomplished by each software component (SWC) deployed within the ECU calling the underlying software interface. The automotive open system architecture is an open automotive electronic software architecture standard jointly developed by global automakers, component suppliers, and technology companies, aiming to achieve standardized, modular development and cross-platform reuse of automotive ECU software.

[0003] In traditional technology, each software component (SWC) deployed in the electronic control unit calls the same underlying software interface to report logs. Therefore, the same scheduling strategy needs to be implemented within each software component, such as setting the same log reporting strategy. Furthermore, when the underlying software interface changes, the strategy also needs to be applied to each software component, meaning all software components need to be modified. Consequently, the existing vehicle log reporting process cannot be uniformly maintained and managed, thus increasing development and maintenance costs. Summary of the Invention

[0004] Therefore, it is necessary to provide a vehicle log reporting method, system, device, computer equipment, storage medium, and computer program product that can achieve unified maintenance and management of the vehicle log reporting process to reduce development and maintenance costs, in order to address the above-mentioned technical problems.

[0005] Firstly, this application provides a vehicle log reporting method, applied to a log proxy service module in an electronic control unit, wherein the log proxy service module is communicatively connected to multiple software components configured in the electronic control unit, including:

[0006] Receive global structure variables filled with vehicle health report logs sent by each of the software components, and obtain the vehicle health report logs from the global structure variables;

[0007] According to the preset log reporting service strategy, the underlying software interface is called to report the vehicle health report log.

[0008] In one embodiment, when the preset log reporting service strategy is a variable frequency reporting strategy, the step of calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: obtaining the time difference between the current time and the state switching time; the state switching time is the time when the vehicle's electronic control unit (ECU) undergoes a state switching, and the ECU undergoing a state switching includes at least one of the following: the vehicle being woken up and the ECU undergoing a reset process; obtaining the log reporting frequency that matches the time difference from the variable frequency reporting strategy; and calling the underlying software interface to report the vehicle health report log according to the log reporting frequency.

[0009] In one embodiment, obtaining the log reporting frequency matching the time difference from the variable frequency reporting strategy includes: when the time difference is less than or equal to a preset first time difference threshold, or when the time difference is greater than or equal to a preset second time difference threshold, using the first log reporting frequency as the log reporting frequency matching the time difference; wherein the second time difference threshold is greater than the first time difference threshold; when the time difference is greater than the first time difference threshold and less than the second time difference threshold, attenuating the first log reporting frequency, and using the attenuated log reporting frequency as the log reporting frequency matching the time difference; wherein the attenuated log reporting frequency is less than the first log reporting frequency.

[0010] In one embodiment, the attenuation processing of the first log reporting frequency and the use of the attenuated log reporting frequency as a log reporting frequency matching the time difference includes: for any current vehicle health report log in each of the vehicle health report logs, determining the current software component that sent the current vehicle health report log, and a pre-calibrated frequency attenuation coefficient and a third time difference threshold for the current software component; wherein the third time difference threshold is greater than the first time difference threshold and less than the second time difference threshold; when the time difference is greater than the first time difference threshold and less than or equal to the third time difference threshold, based on... The attenuated log reporting frequency is obtained based on the frequency attenuation coefficient and the time difference, and the attenuated log reporting frequency is used as the log reporting frequency that matches the time difference; wherein, the attenuated log reporting frequency is negatively correlated with the time difference; when the time difference is greater than the third time difference threshold and less than the second time difference threshold, the second log reporting frequency is used as the log reporting frequency that matches the time difference; the second log reporting frequency is the attenuated log reporting frequency obtained based on the frequency attenuation coefficient and the third time difference threshold, and the second log reporting frequency is less than the first log reporting frequency.

[0011] In one embodiment, the method further includes: persistently caching the vehicle health report log when the time difference is less than or equal to a preset first time difference threshold.

[0012] In one embodiment, when the preset log reporting service strategy is a fixed-period reporting strategy, the step of calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: calling the underlying software interface to report the vehicle health report log according to the log reporting period preset in the fixed-period reporting strategy.

[0013] In one embodiment, when the preset log reporting service policy is a change reporting policy, the step of calling the underlying software interface to report the vehicle health report log according to the preset log reporting service policy includes: when an update to the vehicle health report log is detected, calling the underlying software interface to report the vehicle health report log.

[0014] Secondly, this application also provides a vehicle log reporting system applied to an electronic control unit, the system comprising: a log proxy service module, and multiple software components communicatively connected to the log proxy service module; wherein:

[0015] Any of the aforementioned software components is used to fill the vehicle health report log to be uploaded into a global structure variable according to a preset structure, and send the global structure variable filled with the vehicle health report log to the log proxy service module;

[0016] The log proxy service module is used to receive global structure variables filled with vehicle health report logs sent by each of the software components, and to obtain the vehicle health report logs from the global structure variables.

[0017] The log proxy service module is also used to call the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy.

[0018] Thirdly, this application also provides a vehicle log reporting device, applied to a log proxy service module in an electronic control unit, wherein the log proxy service module is communicatively connected to multiple software components installed in the electronic control unit, including:

[0019] The vehicle log receiving module is used to receive global structure variables filled with vehicle health report logs sent by each of the software components, and to obtain the vehicle health report logs from the global structure variables.

[0020] The vehicle log reporting module is used to call the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy.

[0021] Fourthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any embodiment of the first aspect.

[0022] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect.

[0023] In a sixth aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the embodiments of the first aspect.

[0024] The aforementioned vehicle log reporting method, system, device, computer equipment, storage medium, and computer program product receive global structure variables filled with vehicle health report logs from various software components via a log proxy service module configured within the electronic control unit (ECU) and connected to multiple software components within the ECU. The module then retrieves the vehicle health report logs from these global structure variables and, according to a preset log reporting service strategy, calls the underlying software interface to report the vehicle health report logs. This application allows the log proxy service module within the ECU to receive global structure variables from various software components connected to it, extract the vehicle health report logs, and then, according to a preset log reporting service strategy, call the underlying software interface to report the vehicle health report logs. This method enables the log proxy service module to uniformly maintain and manage the logs reported by each software component deployed within the ECU, thus reducing development and maintenance costs. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 This is an application environment diagram of the vehicle log reporting method in one embodiment;

[0027] Figure 2 This is a flowchart illustrating a vehicle log reporting method in one embodiment;

[0028] Figure 3 This is a schematic diagram of the process of reporting vehicle health report logs in one embodiment;

[0029] Figure 4 This is a flowchart illustrating the process of obtaining the log reporting frequency in one embodiment;

[0030] Figure 5 This is a flowchart illustrating the process of using the attenuated reporting frequency as the log reporting frequency in one embodiment.

[0031] Figure 6 This is a schematic diagram illustrating the correspondence between log reporting frequency and time difference in another embodiment;

[0032] Figure 7 This is a schematic diagram of the structure of a vehicle log reporting system in one embodiment;

[0033] Figure 8This is a schematic diagram of the VHR proxy service architecture in one embodiment;

[0034] Figure 9 This is a structural block diagram of a vehicle log reporting device in one embodiment;

[0035] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0037] The vehicle log reporting method provided in this application embodiment can be applied to, for example, Figure 1 The application environment shown is an electronic control unit (ECU). This ECU may contain a log proxy service module, multiple software components, and underlying software interfaces. The log proxy service module can communicate with these software components and report logs by calling the underlying software interfaces. Specifically, when a vehicle health report log needs to be reported, each software component can populate the vehicle health report log into a global structure variable and send it to the log proxy service module. Upon receiving the global structure variable, the log proxy service module can retrieve the vehicle health report log from it and then, according to a preset log reporting service strategy, call the underlying software interfaces to report the vehicle health report log.

[0038] In one embodiment, such as Figure 2 As shown, a vehicle log reporting method is provided, which can be applied to... Figure 1 Taking the log proxy service module in the example, the following steps are included:

[0039] Step S201: Receive global structure variables filled with vehicle health report logs sent by each software component, and retrieve vehicle health report logs from the global structure variables.

[0040] Among them, the vehicle health report log refers to the VHR log that each software component (SWC) in the electronic control unit needs to report, and the global structure variable is a pre-set structure variable used to populate the vehicle health report log. This global structure variable can be obtained by each software component filling the vehicle health report log into the pre-set structure variable.

[0041] Specifically, when any software component in the electronic control unit needs to report the vehicle health report log, it can fill the vehicle health report log into a global structure variable and send the global structure variable to the log proxy service module set in the electronic control unit. The log proxy service module can then integrate the global structure variables sent by various software components and extract the vehicle health report log filled in from the global structure variable.

[0042] Step S202: According to the preset log reporting service strategy, call the underlying software interface to report the vehicle health report log.

[0043] The preset log reporting service strategy refers to the strategy for reporting vehicle health report logs that is set in advance for the log agent service module. The underlying software interface is the log reporting interface provided in the electronic control unit for reporting logs to the cloud. Specifically, after the log agent service module obtains the vehicle health report logs, it can call the underlying software interface according to the above-mentioned preset log reporting service strategy to report the vehicle health report logs to the cloud.

[0044] In the aforementioned vehicle log reporting method, a log proxy service module, configured within the electronic control unit (ECU) and connected to multiple software components within the ECU, receives global structure variables populated with vehicle health report logs from each software component and retrieves the vehicle health report logs from these global structure variables. Following a preset log reporting service strategy, the module calls the underlying software interface to report the vehicle health report logs. This application allows the log proxy service module within the ECU to receive global structure variables from various software components connected to it, extract the vehicle health report logs, and then call the underlying software interface to report the vehicle health report logs according to a preset log reporting service strategy. This method enables the log proxy service module to uniformly maintain and manage the logs reported by each software component deployed within the ECU, thus reducing development and maintenance costs.

[0045] In one embodiment, when the preset log reporting service policy is a variable frequency reporting policy, such as Figure 3 As shown, step S202 may further include:

[0046] Step S301: Obtain the time difference between the current time and the state transition time; the state transition time is the time when the vehicle's electronic control unit undergoes a state transition, and the state transition of the electronic control unit includes at least one of the following: the vehicle is woken up, and the electronic control unit performs a reset process.

[0047] In this embodiment, the preset log reporting service strategy can refer to a variable frequency reporting strategy. In this strategy, the log reporting frequency for vehicle health reports via the underlying software interface is variable, and this frequency can be determined based on the time difference between the current time and the state transition time. Here, the current time refers to the real-time time, while the state transition time refers to the time when the electronic control unit (ECU) undergoes a state transition. This state transition can include two scenarios: the vehicle being woken up from a sleep state, and the ECU undergoing a reset.

[0048] Specifically, if the preset log reporting service strategy refers to a variable frequency reporting strategy for reporting vehicle health reports at a non-fixed frequency, it is first necessary to collect the current time and the time difference between the current time and the state transition time. The state transition time refers to the time when the vehicle's electronic control unit undergoes a state transition, that is, the time when the vehicle is woken up or the electronic control unit performs a reset process.

[0049] Step S302: Obtain the log reporting frequency that matches the time difference from the variable frequency reporting strategy;

[0050] Step S303: According to the log reporting frequency, call the underlying software interface to report the vehicle health report log.

[0051] Then, the log reporting frequency that matches the time difference can be obtained from the variable frequency reporting strategy. For example, the variable frequency reporting strategy may store the correspondence between different time differences and log reporting frequencies, so that the log reporting frequency that matches the time difference can be obtained. Then, according to the log reporting frequency, the underlying software interface can be called to report the vehicle health report log.

[0052] In this embodiment, the preset log reporting service strategy can also be a variable frequency reporting strategy. It can be based on the time difference between the current time and the state switching time to obtain a matching log reporting frequency. The underlying software interface is called according to the above log reporting frequency to report the vehicle health report log. This method can improve the intelligence of vehicle health report log reporting.

[0053] Furthermore, such as Figure 4 As shown, step S302 may further include:

[0054] Step S401: If the time difference is less than or equal to a preset first time difference threshold, or if the time difference is greater than or equal to a preset second time difference threshold, the first log reporting frequency is used as the log reporting frequency that matches the time difference; wherein, the second time difference threshold is greater than the first time difference threshold.

[0055] The first time difference threshold and the second time difference threshold are two preset time difference thresholds. If the time difference between the current time and the state transition time is less than or equal to the first time difference threshold, or if the time difference between the current time and the state transition time is greater than or equal to the preset second time difference threshold, then the first log reporting frequency is used as the log reporting frequency that matches the time difference. The first log reporting frequency can be the preset normal log reporting frequency.

[0056] Step S402: When the time difference is greater than the first time difference threshold and less than the second time difference threshold, the first log reporting frequency is attenuated, and the attenuated log reporting frequency is used as the log reporting frequency that matches the time difference; wherein the attenuated log reporting frequency is less than the first log reporting frequency.

[0057] If the time difference is between the first and second time difference thresholds (i.e., the time difference is greater than the first threshold but less than the second threshold), the log proxy service module can attenuate the first log reporting frequency to obtain a reduced log reporting frequency. This reduced frequency is then used as the log reporting frequency that matches the time difference. In other words, when the time difference is between the first and second thresholds, the log reporting frequency can be appropriately reduced, resulting in a reduced log reporting frequency lower than the first log reporting frequency. Since the ROM FIFO log cache space of the electronic control unit (ECU) may become insufficient after a state switch, appropriately reducing the log reporting frequency can save ROM FIFO log cache space, thereby preventing the loss of vehicle health report logs.

[0058] In this embodiment, if the time difference is less than or equal to the first time difference threshold, or the time difference is greater than or equal to the second time difference threshold, log reporting can be implemented according to the first log reporting frequency. If the time difference is between the first time difference threshold and the second time difference threshold, the ROM FIFO log cache space of the electronic control unit can be saved by appropriately reducing the log reporting frequency, thereby avoiding the loss of vehicle health report logs and improving the integrity of vehicle health report log reporting.

[0059] Furthermore, such as Figure 5 As shown, step S402 may further include:

[0060] Step S501: For any current vehicle health report log in each vehicle health report log, determine the current software component that sent the current vehicle health report log, and the frequency attenuation coefficient and third time difference threshold that are pre-calibrated for the current software component; wherein, the third time difference threshold is greater than the first time difference threshold and less than the second time difference threshold.

[0061] The current vehicle health report log can refer to any one of the vehicle health report logs sent by various software components. The current software component is the software component that reports the current vehicle health report log. In this embodiment, if the time difference between the current time and the state transition time is between the first time difference threshold and the second time difference threshold, then the reporting frequency attenuation degree of different vehicle health report logs can also be different. That is, the reporting frequency of different vehicle health report logs can also be different, and this frequency attenuation degree can be matched with the software component that sends the vehicle health report log.

[0062] Furthermore, in this embodiment, the process of attenuating the first log reporting frequency can be achieved through a frequency attenuation coefficient. This frequency attenuation coefficient can be used to characterize the rate of attenuation of the log reporting frequency, matching the current software component. In this embodiment, the attenuation of the first log reporting frequency can also be set with a minimum value for the log reporting frequency. That is, after reaching the minimum value, the log reporting frequency will not be further reduced. The third time difference threshold is the time threshold for attenuating the frequency using the frequency attenuation coefficient to reach the minimum log reporting frequency. This third time difference threshold is also located between the first time difference threshold and the second time difference threshold. That is, the third time difference threshold is greater than the first time difference threshold and less than the second time difference threshold. This time difference threshold can also be matched with the current software component.

[0063] Specifically, the log proxy service module can determine the current software component that reported the current vehicle health report log for each current vehicle health report log. Then, based on the current software component, it can obtain the corresponding frequency attenuation coefficient and third time difference threshold of the current vehicle health report log.

[0064] Step S502: When the time difference is greater than the first time difference threshold and less than or equal to the third time difference threshold, the attenuated log reporting frequency is obtained according to the frequency attenuation coefficient and the time difference, and the attenuated log reporting frequency is used as the log reporting frequency that matches the time difference; wherein, the attenuated log reporting frequency is negatively correlated with the time difference.

[0065] If the time difference is between the first and third time difference thresholds, the log reporting frequency decreases continuously as the time difference increases during this stage. That is, the attenuated log reporting frequency is negatively correlated with the time difference. In this case, the log proxy service module can calculate the attenuated log reporting frequency based on the frequency attenuation coefficient and the time difference, and then use the attenuated log reporting frequency as the log reporting frequency that matches the time difference until the time difference reaches the third time difference threshold, at which point the log reporting frequency reaches its minimum value.

[0066] Step S503: If the time difference is greater than the third time difference threshold and less than the second time difference threshold, the second log reporting frequency is used as the log reporting frequency that matches the time difference. The second log reporting frequency is the attenuated log reporting frequency obtained based on the frequency attenuation coefficient and the third time difference threshold. The second log reporting frequency is less than the first log reporting frequency.

[0067] If the time difference is greater than the third time difference threshold and less than the second time difference threshold, that is, the time difference is between the third and second time difference thresholds, since the log reporting frequency has decreased to the minimum value after reaching the third time difference threshold, the lowest value of the log reporting frequency can be used as the log reporting frequency that matches the time difference. This lowest value of the log reporting frequency is the second log reporting frequency, which is used as the log reporting frequency that matches the time difference. This second log reporting frequency can be obtained based on the frequency attenuation coefficient and the third time difference threshold. This second log reporting frequency is less than the first log reporting frequency.

[0068] For example, if the default log reporting service strategy is a variable frequency reporting strategy, the correspondence between the log reporting frequency and the time difference can be as follows: Figure 6 As shown, T1 represents the first time difference threshold, T2 represents the third time difference threshold, T3 represents the second time difference threshold, and the slope -K represents the frequency attenuation coefficient. Figure 6As shown, when the time difference is less than or equal to the preset first time difference threshold, i.e., 0≤T≤T1, the log reporting frequency is the first log reporting frequency m. Then, when the time difference is greater than the first time difference threshold and less than or equal to the third time difference threshold, i.e., T1<T≤T2, the log reporting frequency is the attenuated log reporting frequency obtained according to the frequency attenuation coefficient and the time difference, which can be set to -K×T + b. If the time difference is greater than the third time difference threshold and less than the second time difference threshold, i.e., T2<T<T3, then the log reporting frequency can be set to the second log reporting frequency n, and the second log reporting frequency n is less than the first log reporting frequency m. Finally, if the time difference is greater than or equal to the preset second time difference threshold, i.e., T3≤T, then the log reporting frequency can also be set to the first log reporting frequency m.

[0069] Through this embodiment, the frequency attenuation coefficient and the third time difference threshold can also be set according to the software component that sends the vehicle health report log, so that when the time difference is between the first time difference threshold and the third time difference threshold, the log reporting frequency can be gradually reduced according to the frequency attenuation coefficient until the third time difference threshold is reached, and then the minimum log reporting frequency, i.e., the second log reporting frequency, is used as the log reporting frequency. By this method, the accuracy of log reporting frequency setting can be further improved.

[0070] In addition, the vehicle log reporting method may further include: performing persistent caching on the vehicle health report log when the time difference is less than or equal to the preset first time difference threshold.

[0071] In this embodiment, if the time difference is less than or equal to the preset first time difference threshold, on the basis of uploading the vehicle health report log by calling the underlying software interface according to the first log reporting frequency, in order to ensure that the vehicle health report log is not lost, persistent caching can also be performed on the vehicle health report log during this period. For example, the vehicle health report log can be persistently cached in the cache of the software component that reports the vehicle health report log.

[0072] In this embodiment, when the time difference is less than or equal to the preset first time difference threshold, in addition to uploading the vehicle health report log by calling the underlying software interface according to the first log reporting frequency, persistent caching can also be performed on the vehicle health report log. By this method, the loss of vehicle health report logs caused by the state switching process of the electronic control unit can be avoided, thereby further improving the integrity of the vehicle health report logs.

[0073] In one embodiment, if the preset log reporting service strategy is a fixed-period reporting strategy, step S202 may further include: calling the underlying software interface to report the vehicle health report log according to the log reporting period preset in the fixed-period reporting strategy.

[0074] In this embodiment, the preset log reporting service strategy can also be a fixed period reporting strategy. Under this reporting strategy, the vehicle health report log can be reported according to a certain preset period, such as once every 10 milliseconds. This reporting period is the log reporting period.

[0075] Specifically, if the preset log reporting service strategy is a fixed-period reporting strategy, the log proxy service module can call the underlying software interface according to the pre-set log reporting period in the fixed-period reporting strategy to report the vehicle health report logs. For example, if the preset log reporting service strategy is a fixed-period reporting strategy that reports every 10 milliseconds, the log proxy service module can call the underlying software interface every 10 milliseconds to report the vehicle health report logs.

[0076] In this embodiment, the preset log reporting service strategy can also be a fixed-period reporting strategy. Under this strategy, the log proxy service module can report vehicle health report logs according to a pre-set fixed period. This embodiment can increase the diversity of vehicle health report log reporting methods.

[0077] In one embodiment, if the preset log reporting service policy is a change reporting policy, step S202 may further include: when an update to the vehicle health report log is detected, calling the underlying software interface to report the vehicle health report log.

[0078] In this embodiment, the preset log reporting service strategy can also be a change reporting strategy. Under this reporting strategy, the reporting can be carried out after the vehicle health report log is detected to be updated. For example, if the log proxy service module detects that the vehicle health report log provided by a certain software component is different from the vehicle health report log cached by the software component in the previous time, it will trigger the underlying software interface call to report the vehicle health report log.

[0079] Specifically, if the preset log reporting service strategy implements a change reporting strategy after detecting an update to the vehicle health report log, the log proxy service module can call the underlying software interface to report the vehicle health report log when it detects that the vehicle health report log provided by a certain software component in the current instance is different from the vehicle health report log previously cached by that software component. Taking an update to the vehicle health report log provided by software component A as an example, if the log proxy service module detects that the vehicle health report log provided by software component A in the current instance is different from the previously cached vehicle health report log provided by software component A, it can call the underlying software interface to report the vehicle health report log provided by software component A in the current instance.

[0080] In this embodiment, the preset log reporting service strategy can also be a change reporting strategy. Under this strategy, the log proxy service module can report the log after detecting an update to the vehicle health report log. This embodiment can improve the timeliness of vehicle health report log reporting.

[0081] In one embodiment, a vehicle log reporting system is also provided, such as... Figure 7 As shown, this system can be applied to electronic control units (ECUs). For example, the system can be installed in an ECU. The system may include a log agent service module 702, and multiple software components communicatively connected to the log agent service module, namely software component 701-1, software component 701-2, ..., software component 701-n; wherein:

[0082] Any software component is used to populate the vehicle health report log to be uploaded into a global structure variable according to a preset structure, and send the global structure variable filled with the vehicle health report log to the log agent service module 702.

[0083] Any software component can refer to any one of software component 701-1, software component 701-2, ... or software component 701-n. If a software component needs to upload vehicle health report logs, it can first fill the vehicle health report logs to be uploaded into a global structure variable according to a preset structure, and then send the global structure variable filled with vehicle health report logs to the log agent service module 702.

[0084] For example, vehicle health report logs can be populated into a global structure variable with the following structure:

[0085] / **

[0086] * @brief Server Virtual Hardware Register (VHR) Data Block Structure

[0087] * @details is used to record real-time and historical data block information of server-side hardware registers.

[0088] /

[0089] typedef struct {

[0090] VDMS_MsgID msgId; / **< Message ID (associated with the message type of the VDMS protocol) @see VDMS_MSG_ID * /

[0091] uint8 *VhrPtr; / **< Current VHR data block pointer (dynamic memory, requires external lifecycle management) * /

[0092] uint17 VhrLen; / **< Current VHR data block length VhrLen = 2 * LastVhrLen (unit: bytes) * /

[0093] uint8 *LastVhrPtr; / **< Pointer to the last VHR data block (used for difference comparison) * /

[0094] uint17 LastVhrLen; / **< Last VHR data block length (in bytes) * /

[0095] ServerVhrStruct;

[0096] Afterwards, the aforementioned structure variables can be used as an interface to provide log reporting logs to the log broker service module 702.

[0097] Log broker service module 702 is used to receive global structure variables filled with vehicle health report logs sent by various software components, and to obtain vehicle health report logs from global structure variables;

[0098] The log agent service module 702 is also used to call the underlying software interface to report vehicle health report logs according to the preset log reporting service strategy.

[0099] The log broker service module 702 can receive global structure variables filled with vehicle health report logs sent by various software components, namely software component 701-1, software component 701-2, ... and software component 701-n. It can then obtain the vehicle health report logs filled in by each of the global structure variables, and then call the underlying software interface according to the preset log reporting service strategy to report the vehicle health report logs.

[0100] In this embodiment, a vehicle log reporting system is also provided. This system can be applied to the electronic control unit of a vehicle and may include a log proxy service module 702 and multiple software components communicatively connected to the log proxy service module. Each software component is used to fill the vehicle health report log to be uploaded into a global structure variable according to a preset structure, and send the global structure variable filled with the vehicle health report log to the log proxy service module 702. The log proxy service module 702 is used to receive the global structure variable filled with the vehicle health report log sent by each software component, and obtain the vehicle health report log from the global structure variable. The log proxy service module 702 is also used to call the underlying software interface to report the vehicle health report log according to a preset log reporting service strategy. In this embodiment, the log agent service module 702 in the electronic control unit can receive global structure variables sent by various software components that are connected to it, and extract the vehicle health report log from them. Then, according to the preset log reporting service strategy, the underlying software interface can be called to report the vehicle health report log. In this way, the log agent service module 702 can uniformly maintain and manage the logs reported by each software component deployed in the electronic control unit, thus reducing development and maintenance costs.

[0101] In one embodiment, a VHR proxy service solution based on an open automotive system architecture is also provided. This VHR proxy service solution achieves high cohesion and low coupling by uniformly transmitting the logs to be reported by the SWC of each app to the VHR service for processing and then calling the underlying software VHR interface to report to the cloud. The VHR service handles the reporting strategies and methods of each app, with the specific log content filled by the SWC of each app. Strategy implementation only requires changes to the VHR service, without requiring changes to the app's services. It also uniformly handles the issue of log loss during the sleep-to-wake phase (a few seconds). This VHR proxy service solution provides a general platform architecture concept, solves the log loss problem during sleep-to-wake, provides unified management, and improves portability, maintainability, and robustness. It shortens the development cycle, improves software quality, reduces economic costs, and facilitates rapid product updates and iterations. Specifically, the VHR proxy service architecture used in this embodiment can be as follows: Figure 8 As shown, the specific implementation method is as follows:

[0102] 1. The logs reported by each SWC in the APP are populated into its own global structure variable, using the same data type:

[0103] / **

[0104] * @brief Server Virtual Hardware Register (VHR) Data Block Structure

[0105] * @details is used to record real-time and historical data block information of server-side hardware registers.

[0106] /

[0107] typedef struct {

[0108] VDMS_MsgID msgId; / **< Message ID (associated with the message type of the VDMS protocol) @see VDMS_MSG_ID * /

[0109] uint8 *VhrPtr; / **< Current VHR data block pointer (dynamic memory, requires external lifecycle management) * /

[0110] uint16 VhrLen; / **< Current VHR data block length VhrLen = 2 * LastVhrLen (unit: bytes) * /

[0111] uint8 *LastVhrPtr; / **< Pointer to the last VHR data block (used for difference comparison) * /

[0112] uint16 LastVhrLen; / **< Last VHR data block length (in bytes) * /

[0113] ServerVhrStruct;

[0114] For example, the SWC1_VHR_DATA, SWC2_VHR_DATA, and SWCn_VHR_DATA structure variables serve as interfaces provided to the VHR agent service for reporting logs.

[0115] 2. VHR service reporting strategy:

[0116] (1) Periodic reporting, such as setting the reporting period to 10 milliseconds.

[0117] (2) Change reporting: Compare the VHR logs of the current traversal APP with the VHR log cache of the previous time. If there is a difference, update the cache and call the underlying software VHR interface to report.

[0118] (3) During the vehicle's sleep-to-wake process or ECU reset, the frequency of VHR log changes reported decreases over time. In cases where the VHR FIFO buffer is insufficient, VHR logs from the first few seconds after power-on may be lost, making it impossible to analyze and locate the problem. To address this, the following function formula was used to resolve the risk of no log analysis. The VHR processing function used is shown below:

[0119]

[0120] wherein, represents the reporting frequency, represents the time interval.

[0121] The schematic diagram of the VHR processing function can be as Figure 6 shown. When 0 ≤ T ≤ T1, the reporting frequency is m, the normal reporting frequency; and the VHR logs for this time period are persistently cached. When T1 < T ≤ T2, the reporting frequency is -K×T + b, and the value of K can be calibrated according to the size of the ROMFIFO and the amount of reported data. When T2 < T < T3, the reporting frequency is n. When T3 ≤ T, the reporting frequency is m, the normal reporting frequency.

[0122] Reporting the VHR logs according to the above strategy can prevent the loss of VHR logs during the sleep-to-wake-up phase, providing an effective basis for problem analysis and location.

[0123] The VHR proxy service solution provided in this embodiment achieves high cohesion and low coupling. The logs to be reported by the SWC of each app are uniformly transmitted to the VHR service for processing and then the underlying software VHR interface is called to report to the cloud. The VHR service processes the reporting strategies and methods of each APP, and the specific log content is filled by the SWC of each APP. For the policy, only the VHR service needs to be changed, and there is no need to change the services of the APPs. The problem of losing logs for a few seconds during the sleep-to-wake-up phase can also be uniformly processed. The VHR proxy service solution provides a general platform architecture idea, solves the problem of losing logs during sleep-to-wake-up, enables unified management, and improves portability, maintainability, and robustness. It shortens the development cycle, improves software quality, reduces economic costs, and is conducive to the rapid update and iteration of products.

[0124] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0125] Based on the same inventive concept, this application also provides a vehicle log reporting device for implementing the vehicle log reporting method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more vehicle log reporting device embodiments provided below can be found in the limitations of the vehicle log reporting method described above, and will not be repeated here.

[0126] In one embodiment, such as Figure 9 As shown, a vehicle log reporting device is provided, applied to a log proxy service module in an electronic control unit. The log proxy service module is communicatively connected to multiple software components set in the electronic control unit, including: a vehicle log receiving module 901 and a vehicle log reporting module 902, wherein:

[0127] The vehicle log receiving module 901 is used to receive global structure variables filled with vehicle health report logs sent by various software components, and to obtain vehicle health report logs from the global structure variables.

[0128] The vehicle log reporting module 902 is used to call the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy.

[0129] In one embodiment, when the preset log reporting service strategy is a variable frequency reporting strategy, the vehicle log reporting module 902 is further used to obtain the time difference between the current time and the state switching time; the state switching time is the time when the vehicle's electronic control unit undergoes a state switch, and the electronic control unit undergoing a state switch includes at least one of the following: the vehicle is woken up, and the electronic control unit performs a reset process; from the variable frequency reporting strategy, the log reporting frequency that matches the time difference is obtained; according to the log reporting frequency, the underlying software interface is called to report the vehicle health report log.

[0130] In one embodiment, the vehicle log reporting module 902 is further configured to: use the first log reporting frequency as the log reporting frequency matching the time difference when the time difference is less than or equal to a preset first time difference threshold, or when the time difference is greater than or equal to a preset second time difference threshold; wherein the second time difference threshold is greater than the first time difference threshold; and when the time difference is greater than the first time difference threshold and less than the second time difference threshold, perform attenuation processing on the first log reporting frequency, and use the attenuated log reporting frequency as the log reporting frequency matching the time difference; wherein the attenuated log reporting frequency is less than the first log reporting frequency.

[0131] In one embodiment, the vehicle log reporting module 902 is further configured to, for any current vehicle health report log in each vehicle health report log, determine the current software component that sent the current vehicle health report log, and a pre-calibrated frequency attenuation coefficient and a third time difference threshold for the current software component; wherein the third time difference threshold is greater than a first time difference threshold and less than a second time difference threshold; when the time difference is greater than the first time difference threshold and less than or equal to the third time difference threshold, obtain the attenuated log reporting frequency based on the frequency attenuation coefficient and the time difference, and use the attenuated log reporting frequency as the log reporting frequency matching the time difference; wherein the attenuated log reporting frequency is negatively correlated with the time difference; when the time difference is greater than the third time difference threshold and less than the second time difference threshold, use the second log reporting frequency as the log reporting frequency matching the time difference; the second log reporting frequency is the attenuated log reporting frequency obtained based on the frequency attenuation coefficient and the third time difference threshold, and the second log reporting frequency is less than the first log reporting frequency.

[0132] In one embodiment, the vehicle log reporting module 902 is further configured to perform persistent caching of the vehicle health report log when the time difference is less than or equal to a preset first time difference threshold.

[0133] In one embodiment, when the preset log reporting service strategy is a fixed-period reporting strategy, the vehicle log reporting module 902 is further used to call the underlying software interface to report the vehicle health report log according to the log reporting period preset in the fixed-period reporting strategy.

[0134] In one embodiment, when the preset log reporting service policy is a change reporting policy, the vehicle log reporting module 902 is further used to call the underlying software interface to report the vehicle health report log when an update to the vehicle health report log is detected.

[0135] The various modules in the aforementioned vehicle log reporting device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0136] In one exemplary embodiment, a computer device is provided, which may be a log broker service module, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, input / output interfaces, and a communication interface. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a vehicle log reporting method.

[0137] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0138] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0139] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0140] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0141] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0142] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0143] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0144] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for reporting vehicle logs, characterized in that, A log proxy service module applied in an electronic control unit, the log proxy service module being communicatively connected to multiple software components configured in the electronic control unit, the method comprising: Receive global structure variables filled with vehicle health report logs sent by each of the software components, and obtain the vehicle health report logs from the global structure variables; According to the preset log reporting service strategy, the underlying software interface is called to report the vehicle health report log; the preset log reporting service strategy includes a variable frequency reporting strategy; When the time difference between the current time and the state transition time is greater than the first time difference threshold and less than or equal to the third time difference threshold, the first log reporting frequency is attenuated according to the frequency attenuation coefficient and the time difference to obtain the attenuated log reporting frequency, which is then used as the log reporting frequency of the vehicle health report log. The attenuated log reporting frequency is negatively correlated with the time difference, and the frequency attenuation coefficient and the third time difference threshold are calibrated for the software component sending the vehicle health report log. When the time difference is greater than the third time difference threshold and less than the second time difference threshold, the second log reporting frequency obtained according to the frequency attenuation coefficient and the third time difference threshold is used as the log reporting frequency. The second log reporting frequency is less than the first log reporting frequency; the third time difference threshold is greater than the first time difference threshold and less than the second time difference threshold.

2. The method according to claim 1, characterized in that, When the preset log reporting service strategy is a variable frequency reporting strategy, the step of calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: Obtain the time difference between the current time and the state transition time; the state transition time is the time when the vehicle's electronic control unit undergoes a state transition, and the state transition of the electronic control unit includes at least one of the following: the vehicle being woken up and the electronic control unit performing a reset process; Obtain the log reporting frequency that matches the time difference from the variable frequency reporting strategy; According to the stated log reporting frequency, the underlying software interface is invoked to report the vehicle health report log.

3. The method according to claim 2, characterized in that, Obtaining the log reporting frequency that matches the time difference from the variable frequency reporting strategy includes: If the time difference is less than or equal to a preset first time difference threshold, or if the time difference is greater than or equal to a preset second time difference threshold, the first log reporting frequency is used as the log reporting frequency that matches the time difference; wherein, the second time difference threshold is greater than the first time difference threshold.

4. The method according to claim 2, characterized in that, The method further includes: If the time difference is less than or equal to a preset first time difference threshold, the vehicle health report log is persistently cached.

5. The method according to claim 1, characterized in that, When the preset log reporting service strategy is a fixed-period reporting strategy, the step of calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: According to the pre-set log reporting cycle in the fixed-cycle reporting strategy, the underlying software interface is called to report the vehicle health report log.

6. The method according to claim 1, characterized in that, When the preset log reporting service policy is a change reporting policy, the step of calling the underlying software interface to report the vehicle health report log according to the preset log reporting service policy includes: Upon detecting an update to the vehicle health report log, the underlying software interface is invoked to report the vehicle health report log.

7. A vehicle log reporting system, characterized in that, The system, applied to an electronic control unit, includes: a log agent service module, and multiple software components communicatively connected to the log agent service module; wherein: Any of the aforementioned software components is used to fill the vehicle health report log to be uploaded into a global structure variable according to a preset structure, and send the global structure variable filled with the vehicle health report log to the log proxy service module; The log proxy service module is used to receive global structure variables filled with vehicle health report logs sent by each of the software components, and to obtain the vehicle health report logs from the global structure variables. The log proxy service module is also used to call the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy; the preset log reporting service strategy includes a variable frequency reporting strategy. The log proxy service module is further configured to, when the time difference between the current time and the state transition time is greater than a first time difference threshold and less than or equal to a third time difference threshold, attenuate the first log reporting frequency according to the frequency attenuation coefficient and the time difference to obtain the attenuated log reporting frequency, and use the attenuated log reporting frequency as the log reporting frequency of the vehicle health report log; wherein, the attenuated log reporting frequency is negatively correlated with the time difference, and the frequency attenuation coefficient and the third time difference threshold are calibrated for the software component sending the vehicle health report log; when the time difference is greater than the third time difference threshold and less than the second time difference threshold, the second log reporting frequency obtained according to the frequency attenuation coefficient and the third time difference threshold is used as the log reporting frequency; the second log reporting frequency is less than the first log reporting frequency; the third time difference threshold is greater than the first time difference threshold and less than the second time difference threshold.

8. A vehicle log reporting device, characterized in that, A log proxy service module for use in an electronic control unit, the log proxy service module being communicatively connected to multiple software components installed in the electronic control unit, the device comprising: The vehicle log receiving module is used to receive global structure variables filled with vehicle health report logs sent by each of the software components, and to obtain the vehicle health report logs from the global structure variables. The vehicle log reporting module is used to call the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy; the preset log reporting service strategy includes a variable frequency reporting strategy. The vehicle log reporting module is further configured to attenuate the first log reporting frequency based on the frequency attenuation coefficient and the time difference when the time difference between the current time and the state transition time is greater than a first time difference threshold and less than or equal to a third time difference threshold, thereby obtaining the attenuated log reporting frequency and using it as the log reporting frequency for the vehicle health report log. The attenuated log reporting frequency is negatively correlated with the time difference, and the frequency attenuation coefficient and the third time difference threshold are calibrated for the software component sending the vehicle health report log. When the time difference is greater than the third time difference threshold and less than a second time difference threshold, the second log reporting frequency obtained based on the frequency attenuation coefficient and the third time difference threshold is used as the log reporting frequency. The second log reporting frequency is less than the first log reporting frequency; the third time difference threshold is greater than the first time difference threshold and less than the second time difference threshold.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Log management system for Android vehicle machine

    CN116996498A

  • Vehicle data uploading method and device and storage medium

    CN117201404A