Vehicle log reporting method, system and device, computer equipment and storage medium

By introducing a log proxy service module into the electronic control unit, receiving and managing the log reporting process of each software component, the problem of unification of maintenance and management in the prior art is solved, and the cost reduction is achieved.

CN120599722AActive Publication Date: 2025-09-05CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing vehicle log reporting process cannot be maintained and managed in a unified manner, resulting in high development and maintenance costs.

Method used

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

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599722A_ABST
    Figure CN120599722A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle log reporting method, system and device, computer equipment and a storage medium. The method comprises the following steps: receiving a global structure variable filled with a vehicle health report log sent by each software component through a log proxy service module which is arranged in an electronic control unit and is in communication connection with a plurality of software components arranged in the electronic control unit, and obtaining the vehicle health report log from the global structure variable; and according to a preset log reporting service strategy, calling an underlying software interface, and reporting the vehicle health report log. By adopting the method, the log reported by each software component deployed in the electronic control unit is uniformly maintained and managed by the log proxy service module, so that the development and maintenance cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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 Art

[0002] With the advancement of vehicle technology, the log reporting function of electronic control units (ECUs) has become a core technology for fault diagnosis, status monitoring, and functional safety. Specifically, ECUs can implement log reporting based on the Automotive Open System Architecture (OSA). Each software component (SWC) deployed in the ECU calls the underlying software interface to implement log reporting. The OSA is an open automotive electronic software architecture standard jointly developed by global automakers, parts suppliers, and technology companies. It aims to achieve standardized, modular development, and cross-platform reuse of automotive ECU software.

[0003] Traditionally, each software component (SWC) deployed in an electronic control unit (ECU) calls the same underlying software interface to report logs. This requires implementing the same scheduling strategy within each SWC, such as setting the same log reporting policy. Furthermore, changes to the underlying software interface require implementing the strategy across all SWCs, requiring changes to all SWCs. Consequently, the existing vehicle log reporting process cannot be centrally maintained and managed, increasing development and maintenance costs. Summary of the Invention

[0004] Based on this, it is necessary to provide a vehicle log reporting method, system, device, computer equipment, storage medium and computer program product that can realize unified maintenance and management of vehicle log reporting process to reduce development and maintenance costs in response to the above technical problems.

[0005] In a first aspect, the present application provides a vehicle log reporting method, which is applied to a log proxy service module in an electronic control unit, wherein the log proxy service module is communicatively connected with multiple software components provided in the electronic control unit, including:

[0006] Receiving a global structure variable filled with a vehicle health report log sent by each software component, and obtaining the vehicle health report log from the global structure variable;

[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, calling the underlying software interface to report the vehicle health report log in accordance with 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 state switching of the vehicle's electronic control unit occurs, and the state switching of the electronic control unit includes at least one of the vehicle being awakened and the electronic control unit performing a reset process; obtaining a log reporting frequency that matches the time difference from the variable frequency reporting strategy; calling the underlying software interface according to the log reporting frequency to report the vehicle health report log.

[0009] In one embodiment, obtaining the log reporting frequency that matches 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 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 that matches 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 that matches the time difference; wherein the attenuated log reporting frequency is less than the first log reporting frequency.

[0010] In one embodiment, the attenuation processing is performed on the first log reporting frequency, and the attenuated log reporting frequency is used as the log reporting frequency that matches the time difference, including: for any current vehicle health report log in each of the vehicle health report logs, determining the current software component that sends the current vehicle health report log, and the frequency attenuation coefficient and the third time difference threshold 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; 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 according to the frequency attenuation coefficient and the time difference, and the attenuated log reporting frequency is used 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, the second log reporting frequency is used as the log reporting frequency matching the time difference; the second log reporting frequency is the attenuated log reporting frequency obtained according to 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: when the time difference is less than or equal to a preset first time difference threshold, performing persistent caching processing on the vehicle health report log.

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

[0013] In one embodiment, when the preset log reporting service strategy is a change reporting strategy, calling the underlying software interface to report the vehicle health report log in accordance with the preset log reporting service strategy includes: when detecting that the vehicle health report log is updated, calling the underlying software interface to report the vehicle health report log.

[0014] In a second aspect, the present application further provides a vehicle log reporting system, which is applied to an electronic control unit. The system includes: a log proxy service module, and a plurality of software components in communication with the log proxy service module; wherein:

[0015] Any of the software components is used to fill the vehicle health report log to be uploaded into the 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;

[0016] The log agent service module is configured to receive a global structure variable filled with a vehicle health report log sent by each software component, and obtain the vehicle health report log from the global structure variable;

[0017] The log agent service module is further used to call the underlying software interface and report the vehicle health report log according to a preset log reporting service strategy.

[0018] In a third aspect, the present application further provides a vehicle log reporting device, which is applied to a log proxy service module in an electronic control unit, wherein the log proxy service module is communicatively connected with multiple software components provided in the electronic control unit, including:

[0019] A vehicle log receiving module, configured to receive a global structure variable filled with a vehicle health report log sent by each software component, and obtain the vehicle health report log from the global structure variable;

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

[0021] In a fourth aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the embodiments of the first aspect when executing the computer program.

[0022] In a fifth aspect, the present application further 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 one of the embodiments in the first aspect.

[0023] In a sixth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.

[0024] The above-mentioned vehicle log reporting method, system, device, computer equipment, storage medium and computer program product, receives the global structure variable filled with the vehicle health report log sent by each software component through a log proxy service module provided in the electronic control unit and connected to the multiple software components provided in the electronic control unit, and obtains the vehicle health report log from the global structure variable; according to the preset log reporting service strategy, calls the underlying software interface to report the vehicle health report log. This application can use the log proxy service module in the electronic control unit to receive the global structure variables sent by each software component connected to it and extract the vehicle health report log from it, and then can call the underlying software interface according to the preset log reporting service strategy to report the vehicle health report log. In this way, the log proxy service module is used to uniformly maintain and manage the logs reported by each software component deployed in the electronic control unit, thereby reducing development and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

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

[0027] Figure 2 A schematic diagram of a process for reporting a vehicle log in one embodiment;

[0028] Figure 3 A schematic diagram of a process for reporting a vehicle health report log in one embodiment;

[0029] Figure 4 A schematic diagram of a process for obtaining log reporting frequency in one embodiment;

[0030] Figure 5 This is a flow chart of using the attenuated reporting frequency as the log reporting frequency in one embodiment;

[0031] Figure 6 A schematic diagram of the corresponding relationship between log reporting frequency and time difference in another embodiment;

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

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

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

[0035] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0036] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0037] The vehicle log reporting method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The application environment can be an electronic control unit, which can include a log agent service module, multiple software components and an underlying software interface. The log agent service module can communicate with multiple software components and realize log reporting by calling the underlying software interface. Specifically, when the vehicle health report log needs to be reported, each software component can fill the vehicle health report log into the global structure variable and send it to the log agent service module. After receiving the global structure variable, the log agent service module can obtain the vehicle health report log from it, and then call the underlying software interface according to the preset log reporting service strategy to report the vehicle health report log.

[0038] In one embodiment, Figure 2 As shown, a vehicle log reporting method is provided, which is applied to Figure 1 The log proxy service module in the example is used to illustrate the following steps:

[0039] Step S201: receiving a global structure variable filled with a vehicle health report log sent by each software component, and obtaining the vehicle health report log from the global structure variable.

[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 fill the vehicle health report log. The global structure variable can be obtained after each software component fills the vehicle health report log into the structure variable of the preset structure.

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

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

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

[0044] In the above-mentioned vehicle log reporting method, a log proxy service module provided in an electronic control unit and communicatively connected to a plurality of software components provided in the electronic control unit receives a global structure variable filled with a vehicle health report log sent by each software component, and obtains the vehicle health report log from the global structure variable; according to a preset log reporting service strategy, the underlying software interface is called to report the vehicle health report log. In this application, a log proxy service module in an electronic control unit can receive the global structure variables sent by each software component communicatively connected thereto, and extract the vehicle health report log therefrom. After that, the underlying software interface can be called according to a preset log reporting service strategy to report the vehicle health report log. In this way, the log proxy service module is used to uniformly maintain and manage the logs reported by each software component deployed in the electronic control unit, thereby 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, obtaining the time difference between the current time and the state switching time; the state switching time is the time when the state of the vehicle's electronic control unit switches, and the state switching of the electronic control unit includes at least one of the vehicle being awakened and the electronic control unit being reset.

[0047] In this embodiment, the preset log reporting service strategy may refer to a variable frequency reporting strategy, in which the frequency of reporting the vehicle health report log by calling the underlying software interface is variable, and the frequency can be determined based on the time difference between the current time and the state switching time. The current time refers to the current real time, and the state switching time refers to the time when the electronic control unit undergoes a state switching. The state switching can include the following two situations: the situation where the vehicle is awakened from a dormant state, and the situation where the electronic control unit performs a reset process.

[0048] Specifically, if the preset log reporting service strategy refers to a variable frequency reporting strategy for reporting vehicle health report logs 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 switching time, where the state switching time refers to the time when the vehicle's electronic control unit switches states, that is, the time when the vehicle is awakened or the electronic control unit is reset.

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

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

[0051] Afterwards, 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, and 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, and can be based on the time difference between the current time and the state switching time, so as to obtain a matching log reporting frequency based on the time difference, and call the underlying software interface according to the above log reporting frequency to report the vehicle health report log. In this way, the intelligence level of vehicle health report log reporting can be improved.

[0053] Further, if Figure 4 As shown, step S302 may further include:

[0054] Step S401: 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, 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] Among them, the first time difference threshold and the second time difference threshold are two pre-set time difference thresholds respectively. If the time difference between the current time and the state switching time is less than or equal to the first time difference threshold, or the time difference between the current time and the state switching time is greater than or equal to the preset second time difference threshold, the first log reporting frequency will be used as the log reporting frequency that matches the time difference. The first log reporting frequency can be the pre-set 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 time difference threshold and the second time difference threshold, that is, the time difference is greater than the first time difference threshold and less than the second time difference threshold, the log proxy service module can attenuate the first log reporting frequency to obtain an attenuated log reporting frequency, and then use the attenuated log reporting frequency as the log reporting frequency that matches the time difference. That is, when the time difference is between the first time difference threshold and the second time difference threshold, the log reporting frequency can be appropriately reduced so that the attenuated log reporting frequency is less than the first log reporting frequency. Since insufficient ROM FIFO log buffer space may occur in the electronic control unit after a state switch occurs, appropriately reducing the log reporting frequency can save ROM FIFO log buffer space in the electronic control unit, 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 log reporting frequency can be appropriately reduced to save the ROM FIFO log cache space of the electronic control unit, thereby avoiding the loss of the vehicle health report log and improving the integrity of the vehicle health report log reporting.

[0059] Further, if 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 sends the current vehicle health report log, as well as the frequency attenuation coefficient and the third time difference threshold 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 may refer to any one of the vehicle health report logs sent by each software component, and 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 switching 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 may also be different, that is, the reporting frequency of different vehicle health report logs may also be different, and the frequency attenuation degree may match the software component that sends the vehicle health report log.

[0062] Moreover, in the present embodiment, the process of attenuating the first log reporting frequency can be achieved through a frequency attenuation coefficient. The frequency attenuation coefficient can be used to characterize the attenuation speed of the log reporting frequency and match the current software component. In the present embodiment, the attenuation of the first log reporting frequency can also be set with a minimum value of the log reporting frequency, that is, after reaching the minimum value, the log reporting frequency will no longer be further reduced. The third time difference threshold is the time threshold for achieving the minimum log reporting frequency by using the frequency attenuation coefficient to perform frequency attenuation. The third time difference threshold is also 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. The time difference threshold can also match the current software component.

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

[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 time difference threshold and the third time difference threshold, in this stage, the log reporting frequency continues to decrease with the increase of the time difference, 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 thus 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 time the log reporting frequency reaches the lowest value.

[0066] Step S503: 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 according to the frequency attenuation coefficient and the third time difference threshold, and the second log reporting frequency is less than the first log reporting frequency.

[0067] However, 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 time difference threshold and the second time difference threshold, since the log reporting frequency has been reduced to the minimum value after reaching the third time difference threshold, when the time difference is between the third time difference threshold and the second time difference threshold, the lowest value of the log reporting frequency can be used as the log reporting frequency matching the time difference. The lowest value of the log reporting frequency is the second log reporting frequency, that is, the second log reporting frequency is used as the log reporting frequency matching the time difference. The second log reporting frequency can be obtained according to the frequency attenuation coefficient and the third time difference threshold. The second log reporting frequency is less than the first log reporting frequency.

[0068] For example, when the preset log reporting service strategy is a variable frequency reporting strategy, the corresponding relationship 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 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, that is, 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, that is, T1 < T ≤ T2, the log reporting frequency is the attenuated log reporting frequency obtained according to the frequency attenuation coefficient and the time difference, and 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, that is, 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, that is, 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 after reaching the third time difference threshold, the minimum log reporting frequency, that is, 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 processing 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 processing can also be performed on the vehicle health report log in 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, when the preset log reporting service policy is a fixed period reporting policy, 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 policy.

[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 pre-set period, for example, once every 10 milliseconds. This reporting period is the log reporting period.

[0075] Specifically, if the preset log reporting service policy is a fixed-period reporting policy that reports logs at a fixed interval, the log proxy service module can call the underlying software interface according to the log reporting period pre-set in the fixed-period reporting policy, thereby reporting the vehicle health report log. For example, if the preset log reporting service policy is a fixed-period reporting policy 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 log.

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

[0077] In one embodiment, when the preset log reporting service policy is a change reporting policy, step S202 may further include: when a vehicle health report log update is detected, calling an 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, reporting can be performed after detecting that the vehicle health report log has been updated. For example, the log agent service module detects that the vehicle health report log provided by a software component at this time is different from the vehicle health report log cached by the software component last time, then the underlying software interface call is triggered to report the vehicle health report log.

[0079] Specifically, if the preset log reporting service strategy implements a log reporting change reporting strategy after detecting that the vehicle health report log has been updated, the log proxy service module can call the underlying software interface when it 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 last time, thereby realizing the reporting of the vehicle health report log. Taking the update of the vehicle health report log provided by software component A as an example, when the log proxy service module detects that the vehicle health report log provided by software component A is different from the cached vehicle health report log provided by software component A last time, it can call the underlying software interface to realize the reporting of the vehicle health report log provided by software component A at that time.

[0080] In this embodiment, the preset log reporting service strategy can also be a change reporting strategy. Under this strategy, the log agent service module can report the log after detecting that the vehicle health report log is updated. This embodiment can improve the timeliness of vehicle health report log reporting.

[0081] In one embodiment, a vehicle log reporting system is also provided. Figure 7 As shown, the system can be applied to an electronic control unit, for example, the system can be set in the electronic control unit, and the system can 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, used to fill the vehicle health report log to be uploaded into the global structure variable according to the preset structure, and send the global structure variable filled with the vehicle health report log to the log agent service module 702.

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

[0084] For example, the vehicle health report log can be filled 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 the real-time and historical data block information of the server-side hardware registers

[0088] * /

[0089] typedef struct {

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

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

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

[0093] uint8 *LastVhrPtr; / **< Last VHR data block pointer (for difference comparison) * /

[0094] uint17 LastVhrLen; / **< Length of the last VHR data block (unit: byte) * /

[0095] } ServerVhrStruct;

[0096] Afterwards, the above structure variables can be provided to the interface of the log agent service module 702 as reporting logs.

[0097] The log agent 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;

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

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

[0100] In this embodiment, a vehicle log reporting system is also provided, which can be applied to the electronic control unit of a vehicle, and may include a log agent service module 702, and multiple software components that are communicatively connected to the log agent service module; any software component is used to fill the vehicle health report log to be uploaded into the 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; the log agent 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 agent service module 702 is also used to call the underlying software interface according to the preset log reporting service strategy to report the vehicle health report log. In this embodiment, the log proxy service module 702 in the electronic control unit can receive the global structure variables sent by each software component communicating with it, and extract the vehicle health report log from it. After that, the underlying software interface can be called according to the preset log reporting service strategy to report the vehicle health report log. In this way, the log proxy service module 702 can uniformly maintain and manage the logs reported by each software component deployed in the electronic control unit, thereby reducing development and maintenance costs.

[0101] In one embodiment, a VHR proxy service solution based on the automotive open system architecture is also provided. The VHR proxy service solution achieves high cohesion and low coupling, and uniformly transmits the logs to be reported by the SWC of each app to the VHR service for processing, and then calls the bottom software VHR interface to report to the cloud. The VHR service handles the reporting strategies and methods of each APP, and the specific log content is filled by the SWC of each APP. The policy only needs to change the VHR service, and there is no need to change the service of the APP. The problem of log loss for a few seconds in the sleep to wake-up stage can also be handled in a unified manner. The VHR proxy service solution provides a general platform architecture concept, which solves the problem of log loss from sleep to wake-up, unifies management, and improves portability, maintainability, and robustness. It shortens the development cycle, improves software quality, reduces economic costs, and is conducive to 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 is as follows:

[0102] 1. The reporting log of each SWC of the APP is filled into its own global structure variable, and the data type is unified:

[0103] / **

[0104] * @brief Server virtual hardware register (VHR) data block structure

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

[0106] * /

[0107] typedef struct {

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

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

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

[0111] uint8 *LastVhrPtr; / **< Last VHR data block pointer (for difference comparison) * /

[0112] uint16 LastVhrLen; / **< Length of the last VHR data block (unit: byte) * /

[0113] } ServerVhrStruct;

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

[0115] 2. VHR service reporting strategy:

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

[0117] (2) Change reporting: compare the VHR log of the current APP with the previous VHR log cache. If there is a difference, call the bottom software VHR interface to report it after updating the cache.

[0118] (3) When the vehicle goes from sleep to wake-up or the ECU is reset, the frequency of VHR log change reporting decreases over time. If the VHR FIFO buffer is insufficient, the VHR logs of the first few seconds before power-on will be lost, making it impossible to analyze and locate the problem. To address this situation, the following function formula is used to solve the risk of no log analysis. The VHR processing function used can be as follows:

[0119]

[0120] Among them, 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. When the strategy falls, 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, unifies 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 - mentioned embodiments are displayed in sequence according to the arrows, these steps do not necessarily execute 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 restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above - mentioned embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily execute at the same moment, but can execute at different moments, and the execution order of these steps or stages is not necessarily 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, embodiments of the present application also provide a vehicle log reporting device for implementing the aforementioned vehicle log reporting method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more vehicle log reporting device embodiments provided below can be found in the above-described limitations of the vehicle log reporting method and will not be further elaborated here.

[0126] In one embodiment, Figure 9 As shown, a vehicle log reporting device is provided, which is applied to a log proxy service module in an electronic control unit. The log proxy service module is communicatively connected with multiple software components provided 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 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;

[0128] The vehicle log reporting module 902 is used to call the underlying software interface and 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 state switching of the vehicle's electronic control unit occurs, and the state switching of the electronic control unit includes at least one of the vehicle being awakened and the electronic control unit performing a reset process; from the variable frequency reporting strategy, obtain the log reporting frequency that matches the time difference; according to the log reporting frequency, call the underlying software interface to report the vehicle health report log.

[0130] In one embodiment, the vehicle log reporting module 902 is further used to use the first log reporting frequency as the log reporting frequency that matches the time difference when the time difference is less than or equal to a preset first time difference threshold, or 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; when the time difference is greater than the first time difference threshold and less than the second time difference threshold, attenuate the first log reporting frequency, and use the attenuated log reporting frequency as the log reporting frequency that matches 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 used to determine, for any current vehicle health report log in each vehicle health report log, the current software component that sends the current vehicle health report log, and the frequency attenuation coefficient and third time difference threshold 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; 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 according to 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 according to 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 processing on 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 policy is a fixed period reporting policy, 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 policy.

[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 of the vehicle health report log is detected.

[0135] Each module in the vehicle log reporting device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.

[0136] In an exemplary embodiment, a computer device is provided. The computer device may be a log agent service module, and its internal structure diagram may be as follows: Figure 10As shown. The computer device includes a processor, a memory, an input / output interface and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a vehicle log reporting method is implemented.

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

[0138] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

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

[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, stored data, displayed data, 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 relevant data must comply with relevant regulations.

[0142] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, 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 various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.

[0143] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, 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 above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A vehicle log reporting method, characterized in that: A log proxy service module is applied to an electronic control unit, wherein the log proxy service module is communicatively connected with a plurality of software components provided in the electronic control unit. The method comprises: Receiving a global structure variable filled with a vehicle health report log sent by each software component, and obtaining the vehicle health report log from the global structure variable; According to the preset log reporting service strategy, the underlying software interface is called to report the vehicle health report log.

2. The method according to claim 1, characterized in that In the case where the preset log reporting service strategy is a variable frequency reporting strategy, calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: Obtaining a time difference between the current time and a state switching time; the state switching time is the time when the state of the electronic control unit of the vehicle switches, and the state switching of the electronic control unit includes at least one of the following: the vehicle being awakened and the electronic control unit being reset; Obtaining a log reporting frequency that matches the time difference from the variable frequency reporting strategy; According to the log reporting frequency, the underlying software interface is called to report the vehicle health report log.

3. The method according to claim 2, characterized in that The acquiring, from the variable frequency reporting strategy, a log reporting frequency that matches the time difference, 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, 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; 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.

4. The method according to claim 3, characterized in that The attenuating the first log reporting frequency and using the attenuated log reporting frequency as the log reporting frequency matching the time difference includes: For any current vehicle health report log in each of the vehicle health report logs, determining a current software component that sends 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, obtaining the attenuated log reporting frequency according to the frequency attenuation coefficient and the time difference, and using the attenuated log reporting frequency 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 according to the frequency attenuation coefficient and the third time difference threshold, and the second log reporting frequency is less than the first log reporting frequency.

5. The method according to claim 3, characterized in that The method further comprises: When the time difference is less than or equal to a preset first time difference threshold, the vehicle health report log is persistently cached.

6. The method according to claim 1, characterized in that In the case where the preset log reporting service strategy is a fixed period reporting strategy, calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: According to the log reporting period preset in the fixed period reporting strategy, the underlying software interface is called to report the vehicle health report log.

7. The method according to claim 1, characterized in that In the case where the preset log reporting service strategy is a change reporting strategy, calling the underlying software interface to report the vehicle health report log according to the preset log reporting service strategy includes: When it is detected that the vehicle health report log is updated, the underlying software interface is called to report the vehicle health report log.

8. A vehicle log reporting system, characterized in that: Applied to an electronic control unit, the system includes: a log agent service module, and a plurality of software components communicatively connected to the log agent service module; wherein: Any of the software components is used to fill the vehicle health report log to be uploaded into the 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; The log agent service module is configured to receive a global structure variable filled with a vehicle health report log sent by each software component, and obtain the vehicle health report log from the global structure variable; The log agent service module is further used to call the underlying software interface and report the vehicle health report log according to a preset log reporting service strategy.

9. A vehicle log reporting device, characterized in that: A log proxy service module is applied to an electronic control unit, wherein the log proxy service module is communicatively connected with a plurality of software components provided in the electronic control unit, and the device comprises: A vehicle log receiving module, configured to receive a global structure variable filled with a vehicle health report log sent by each software component, and obtain the vehicle health report log from the global structure variable; The vehicle log reporting module is used to call the underlying software interface and report the vehicle health report log according to the preset log reporting service strategy.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

12. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Information sending method and device, log reporting method and device, equipment and medium

    CN116436757A

  • Log management system for Android vehicle machine

    CN116996498A

  • Vehicle data uploading method and device and storage medium

    CN117201404A

  • SWC program monitoring method and system, controller and vehicle-mounted operating system

    CN118245319A

  • Log processing method and device, computer equipment and storage medium

    CN118331953A