Vehicle mileage data processing method, controller, medium and vehicle
By using the main controller and the auxiliary controller to jointly calculate the vehicle's mileage in the vehicle, the problem of abnormal vehicle speed signal affecting mileage calculation is solved, and the accuracy and user experience of mileage data are improved.
Patent Information
- Application Number
- CN202410677547.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-05-29
AI Technical Summary
In the prior art, the calculation results of vehicle mileage are easily affected by abnormal vehicle speed signals, resulting in abnormal mileage displayed on the central control screen, affecting the user's perception and experience.
By setting up the main controller and multiple auxiliary controllers in the vehicle, the vehicle speed signal in the CAN bus is collectively received and a single mileage is calculated separately. The main controller selects a maximum single-stop mileage less than or equal to the upper mileage limit value from the calculation results of each auxiliary controller as the current single-stop mileage, and updates the total mileage.
It improves the accuracy of vehicle mileage data processing, ensures the accuracy of single mileage and total mileage, thereby improving user perception and experience.
Smart Images

Figure CN118457231B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of vehicle data processing, and in particular, relates to a vehicle mileage data processing method, a controller, a medium and a vehicle. Background Art
[0002] At present, the vehicle mileage displayed on the vehicle's central control screen is generally calculated by a controller based on the acquired vehicle speed signal. When the vehicle is turned off, the controller will store the calculated vehicle mileage. When the vehicle is turned on, the controller will read the stored vehicle mileage and display it on the vehicle's central control screen. However, if the vehicle speed signal acquired by the controller is abnormal, it will cause an abnormality in the calculation result of the vehicle mileage, which will in turn cause the vehicle mileage displayed on the vehicle's central control screen to be abnormal, affecting the user's perception and experience. Based on this, how to improve the accuracy of vehicle mileage data processing is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a vehicle mileage data processing method, a main controller, an auxiliary controller, a computer program product, a computer storage medium and a vehicle, thereby improving the accuracy of vehicle mileage data processing at least to a certain extent.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to a first aspect of an embodiment of the present application, a vehicle mileage data processing method is provided, the vehicle comprising a main controller and at least one auxiliary controller, the method being executed on the main controller, the method comprising: in response to the vehicle switching from a current start state to a stop state, obtaining the total mileage of the vehicle up to the last time the start state was switched to the stop state; obtaining the single mileage of the vehicle in the current start state calculated by the main controller and each of the auxiliary controllers respectively; obtaining the mileage upper limit value of the vehicle in the current start state, and selecting a maximum single mileage that is less than or equal to the mileage upper limit value from the single mileages calculated by the main controller and each of the auxiliary controllers respectively as the current single mileage; based on the current single mileage, updating the total mileage of the vehicle up to the last time the start state was switched to the stop state, and storing the updated total mileage as the total mileage of the vehicle up to the current time the start state was switched to the stop state.
[0006] In some embodiments of the present application, based on the aforementioned scheme, the method further includes: if the single driving mileage calculated by the main controller and each of the auxiliary controllers respectively is greater than the driving mileage upper limit value, then the current single driving mileage is determined to be 0.
[0007] In some embodiments of the present application, based on the aforementioned scheme, after storing the updated total mileage as the total mileage of the vehicle from the time the current start-up state is switched to the stop state, the method further includes: determining whether the at least one auxiliary controller stores the updated total mileage; if the at least one auxiliary controller stores the updated total mileage, clearing the single mileage of the vehicle in the current start-up state calculated by the main controller.
[0008] In some embodiments of the present application, based on the aforementioned scheme, obtaining the total mileage of the vehicle as of the last time it switched from the start state to the stop state includes: obtaining and determining whether the total mileage stored in the main controller is a valid value; if the total mileage stored in the main controller is a valid value, then using the total mileage stored in the main controller as the total mileage of the vehicle as of the last time it switched from the start state to the stop state; if the total mileage stored in the main controller is an invalid value, then using the total mileage stored in the auxiliary controller as the total mileage of the vehicle as of the last time it switched from the start state to the stop state.
[0009] In some embodiments of the present application, based on the aforementioned scheme, the main controller and each of the auxiliary controllers calculate the single mileage of the vehicle in the current startup state through the following steps: when it is detected that the vehicle is in the startup state, read the vehicle speed signal value at each moment in real time; according to the vehicle speed signal value at each moment, calculate and update the single mileage of the vehicle in the current startup state in real time until it is detected that the vehicle switches from the current startup state to the stop state.
[0010] In some embodiments of the present application, based on the aforementioned scheme, after reading the vehicle speed signal value of the vehicle at each moment in real time, the method also includes: determining whether the vehicle speed signal value of the vehicle at each moment is a valid value; if the vehicle speed signal value of the vehicle at each moment is an invalid value, then assigning the vehicle speed signal value of the vehicle at each moment to 0.
[0011] In some embodiments of the present application, based on the aforementioned scheme, obtaining the upper limit value of the mileage of the vehicle in the current startup state includes: obtaining a preset mileage value as the upper limit value of the mileage of the vehicle in the current startup state; or, obtaining the fuel consumption / electricity consumption of the vehicle in the current startup state, and determining the upper limit value of the mileage of the vehicle in the current startup state based on the fuel consumption / electricity consumption.
[0012] According to a second aspect of an embodiment of the present application, a main controller is provided, wherein the main controller is used to execute the method described in the first aspect of the embodiment of the present application.
[0013] According to a third aspect of an embodiment of the present application, a vehicle mileage data processing method is provided, the vehicle comprising the main controller and at least one auxiliary controller according to the second aspect of the embodiment of the present application, the method being executed on any one of the auxiliary controllers, the method comprising: in response to the vehicle switching from a current start state to a stop state, obtaining a total mileage updated by the main controller, and updating the total mileage of the vehicle up to the last time the start state was switched to the stop state; judging whether the total mileage updated by the main controller is a valid value; if the total mileage updated by the main controller is a valid value, storing the total mileage updated by the main controller as the total mileage of the vehicle up to the time the current start state is switched to the stop state; if the total mileage updated by the main controller is an invalid value, judging whether the total mileage updated by any one of the auxiliary controllers is a valid value; if the total mileage updated by any one of the auxiliary controllers is a valid value, storing the total mileage updated by any one of the auxiliary controllers as the total mileage of the vehicle up to the time the current start state is switched to the stop state.
[0014] In some embodiments of the present application, based on the aforementioned scheme, the method further includes: if the total mileage updated by at least one auxiliary controller is an invalid value, then the invalid value is defined as the total mileage of the vehicle from the time the current start state is switched to the stop state and stored.
[0015] In some embodiments of the present application, based on the aforementioned scheme, the updating of the total mileage of the vehicle as of the last time it switched from the start state to the stop state includes: obtaining and determining whether the total mileage of the vehicle as of the last time it switched from the start state to the stop state stored in any one of the auxiliary controllers is a valid value; if the total mileage of the vehicle as of the last time it switched from the start state to the stop state stored in any one of the auxiliary controllers is a valid value, then obtaining the current single travel mileage of the vehicle in the current start state determined by the main controller, and updating the total mileage of the vehicle based on the current single travel mileage. The total mileage of the vehicle as of the last time it switched from the start state to the stop state is updated; if the total mileage of the vehicle as of the last time it switched from the start state to the stop state stored in at least one auxiliary controller is an invalid value, then obtain and judge whether the total mileage updated by the main controller is a valid value; if the total mileage updated by the main controller is a valid value, then the total mileage updated by the main controller is determined as the total mileage updated by any one of the auxiliary controllers; if the total mileage updated by the main controller is an invalid value, then it is defined as the invalid value as the total mileage updated by any one of the auxiliary controllers.
[0016] According to a fourth aspect of an embodiment of the present application, an auxiliary controller is provided, wherein the auxiliary controller is used to execute the method described in the third aspect of the embodiment of the present application.
[0017] According to the fifth aspect of the embodiments of the present application, a computer program product is provided, which includes computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor executes the methods described in the first and third aspects of the embodiments of the present application.
[0018] According to the sixth aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which computer program instructions are stored. The computer program instructions are loaded and executed by a processor to implement the operations performed by the methods described in the first aspect and the third aspect of the embodiments of the present application.
[0019] According to a seventh aspect of an embodiment of the present application, a vehicle is provided, comprising a main controller as described in the second aspect of the embodiment of the present application and at least one auxiliary controller as described in the fourth aspect of the embodiment of the present application.
[0020] Based on the technical solution proposed in this application, compared with the existing solution of updating the total mileage data of the vehicle only through a certain controller, this application updates the total mileage data of the vehicle through multiple controllers (i.e., a main controller and multiple auxiliary controllers), which can improve the accuracy of the vehicle mileage data processing. Specifically, since the communication between the various devices in the vehicle is mainly based on the CAN bus when the vehicle is traveling each time, it is easy to cause data transmission loss or inaccuracy. For example, the controller obtains the vehicle speed data from the vehicle CAN bus. Due to the possibility of abnormal speed signal received from the CAN bus, the accuracy of the single mileage calculated by the controller based on the vehicle speed data obtained from the vehicle CAN bus cannot be guaranteed, and then the accuracy of the total mileage of the vehicle updated based on the obtained single mileage cannot be guaranteed. This application receives the vehicle speed signal in the CAN bus at the same time through multiple controllers, and each controller calculates the single mileage based on the obtained speed signal, and then the main controller selects an optimal single mileage from the single mileage calculated by each controller as the current single mileage, which can ensure that the final single mileage is calculated based on the vehicle speed signal with the highest accuracy. In this way, the accuracy of the current single driving mileage is improved, thereby improving the accuracy of the vehicle's total driving mileage updated based on the current single driving mileage, and further improving the accuracy of vehicle mileage data processing.
[0021] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0023] Figure 1 A block diagram of a vehicle in an embodiment of the present application is shown;
[0024] Figure 2 A flow chart showing a vehicle mileage data processing method in an embodiment of the present application is shown;
[0025] Figure 3 The overall flow chart of the main controller processing vehicle mileage data according to an embodiment of the present application is shown;
[0026] Figure 4A flowchart showing another vehicle mileage data processing method in an embodiment of the present application is shown;
[0027] Figure 5 A flowchart showing the processing of vehicle mileage data by the auxiliary controller according to an embodiment of the present application is shown;
[0028] Figure 6 A flowchart showing the processing of vehicle mileage data by the auxiliary controller according to an embodiment of the present application is shown;
[0029] Figure 7 A flow chart showing a main controller and an auxiliary controller jointly processing vehicle mileage data according to an embodiment of the present application is shown;
[0030] Figure 8 A schematic diagram of the structure of a main controller or an auxiliary controller in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0034] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0035] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0036] In order to make those skilled in the art better understand the present application, firstly, Figure 1 , the vehicle involved in this application is briefly described using a specific embodiment.
[0037] See also Figure 1 , showing a block diagram of a vehicle in an embodiment of the present application.
[0038] Specifically, Figure 1 The vehicle 100 shown includes a main controller 101 and at least one auxiliary controller 102, wherein the main controller 101 may be an ECU controller of the vehicle, and the auxiliary controller 102 may be a VIU controller of the vehicle. In the present application, the main controller 101 and each auxiliary controller 102 may communicate with each other, and the main controller 101 and each auxiliary controller 102 may obtain a vehicle speed signal from a CAN bus of the vehicle.
[0039] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0040] Reference Figure 2 , shows a flow chart of a vehicle mileage data processing method in an embodiment of the present application, wherein the vehicle may include a main controller and at least one auxiliary controller, and the vehicle mileage data processing method may be executed by a device having a computing and processing function, for example, it may be executed by the main controller, referring to Figure 1 As shown, the vehicle mileage data processing method includes at least steps 210 to 240, which are described in detail as follows:
[0041] In step 210 , in response to the vehicle switching from the current start state to the stop state, the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state is obtained.
[0042] In the present application, it should be noted that when the vehicle is ignited, or when the power button of the vehicle is turned on, or when the vehicle is shifted into the forward / reverse gear, the vehicle can be considered to enter the start state; when the vehicle is turned off, or when the power button of the vehicle is turned off, or when the vehicle is shifted into the P gear, the vehicle can be considered to enter the stop state.
[0043] In the present application, when it is detected that the vehicle switches from the current start state to the stop state, the main controller can obtain the total mileage of the vehicle until the last time it switches from the start state to the stop state. Specifically, the total mileage of the vehicle until the last time it switches from the start state to the stop state can be obtained according to the following steps 211 to 213:
[0044] Step 211, obtaining and determining whether the total mileage stored in the main controller is a valid value.
[0045] Step 212: If the total mileage stored in the main controller is a valid value, the total mileage stored in the main controller is used as the total mileage of the vehicle up to the last time it switched from the start state to the stop state.
[0046] Step 213: If the total mileage stored in the main controller is an invalid value, the total mileage stored in the auxiliary controller is used as the total mileage of the vehicle up to the last time it switched from the start state to the stop state.
[0047] In the present application, it should be noted that each time the vehicle switches from the start state to the stop state, its main controller and each auxiliary controller will update and store the total mileage. However, if the main controller is replaced or damaged, it is possible that the total mileage stored in the main controller when the vehicle last switched from the start state to the stop state will be lost, that is, the total mileage stored in the main controller is abnormal, for example, the total mileage is 0. Based on this, when the vehicle switches from the current start state to the stop state, the present application, after obtaining the total mileage stored in the main controller, also determines whether the total mileage stored in the main controller is a valid value.
[0048] If the total mileage stored in the main controller is a valid value, it means that there is no abnormality in the total mileage stored in the main controller, and the total mileage stored in the main controller is used as the total mileage of the vehicle until the last time it switched from the start state to the stop state. If the total mileage stored in the main controller is an invalid value, it means that there is an abnormality in the total mileage stored in the main controller, and the total mileage stored in the auxiliary controller can be used as the total mileage of the vehicle until the last time it switched from the start state to the stop state.
[0049] In the present application, it should be noted that if the total mileage stored in the auxiliary controller is an invalid value, the total mileage of the vehicle up to the last time it switched from the start state to the stop state can be defined as an invalid value.
[0050] In step 220, the single driving mileage of the vehicle in the current startup state calculated by the main controller and each of the auxiliary controllers is obtained.
[0051] In the present application, when the vehicle is in the startup state, the main controller and each auxiliary controller will calculate the single mileage of the vehicle in the current startup state in real time. Specifically, obtaining the single mileage of the vehicle in the current startup state calculated by the main controller and each auxiliary controller can be performed according to the following steps 221 to 222:
[0052] Step 221, when it is detected that the vehicle is in the starting state, the vehicle speed signal value of the vehicle at each moment is read in real time.
[0053] Step 222, based on the vehicle speed signal value at each moment, the single trip mileage of the vehicle in the current start state is calculated and updated in real time until it is detected that the vehicle switches from the current start state to the stop state.
[0054] In the present application, a sensor for collecting vehicle speed model values will be configured in the vehicle, and when it is detected that the vehicle is in the starting state, the sensor collects the vehicle speed signal value, for example, the vehicle speed signal value is collected every 10ms, and the collected vehicle speed signal value will be transmitted to the CAN bus, and the main controller and each auxiliary controller will read the vehicle speed signal value of the vehicle at each moment in real time from the CAN bus.
[0055] After reading the vehicle speed signal value, the main controller and each auxiliary controller can calculate and update the single mileage of the vehicle in the current start-up state in real time according to the vehicle speed signal value at each moment, until it is detected that the vehicle switches from the current start-up state to the stop state. Specifically, a vehicle speed-time curve can be constructed according to the read vehicle speed signal value and the corresponding reading time, and then the constructed vehicle speed-time curve is integrated to obtain the single mileage in the current entire start-up state. It can be understood that the higher the reading frequency of the vehicle speed signal value, the more accurate the calculated single mileage of the vehicle in the current start-up state.
[0056] In the present application, after reading the vehicle speed signal value at each moment in real time, the following steps 2211 to 2212 may also be performed:
[0057] Step 2211, determining whether the vehicle speed signal value at each moment is a valid value.
[0058] Step 2212: If the vehicle speed signal value at each moment is an invalid value, the vehicle speed signal value at each moment is assigned a value of 0.
[0059] It should be noted that in the process of the main controller and each auxiliary controller reading the vehicle speed signal value from the CAN bus in real time, due to various reasons, the vehicle speed signal value may be abnormally read, for example, the vehicle speed signal value is not read, and the read vehicle speed signal value is abnormally high. If the vehicle speed signal value read at a certain moment is abnormal, the vehicle speed signal value is determined to be an invalid value, and the vehicle speed signal value of the vehicle at that moment can be assigned to 0.
[0060] In step 230, the mileage upper limit of the vehicle in the current startup state is obtained, and the maximum single mileage that is less than or equal to the mileage upper limit is selected from the single mileages calculated by the main controller and each of the auxiliary controllers as the current single mileage.
[0061] In the present application, obtaining the upper limit of the mileage of the vehicle in the current startup state may be performed according to the following step 231:
[0062] Step 231, obtaining a preset mileage value as the mileage upper limit of the vehicle in the current startup state. In this step, the maximum mileage of the vehicle when it is fully charged or fully fueled can be used as the mileage upper limit of the vehicle in the current startup state.
[0063] In the present application, obtaining the upper limit of the mileage of the vehicle in the current startup state may also be performed according to the following step 232:
[0064] Step 232, obtain the fuel consumption / electricity of the vehicle in the current startup state, and determine the upper limit of the mileage of the vehicle in the current startup state based on the fuel consumption / electricity. In this step, the fuel / electricity consumption of the vehicle under a preset working condition (such as a high-speed working condition) can be pre-tested, and the upper limit of the mileage of the vehicle in the current startup state can be calculated based on the fuel consumption / electricity and the fuel / electricity consumption.
[0065] In this application, the following step 232 may also be performed:
[0066] Step 233: If the single driving mileages respectively calculated by the main controller and each of the auxiliary controllers are greater than the driving mileage upper limit, the current single driving mileage is determined to be 0.
[0067] It can be understood that if the single driving mileage is greater than the driving mileage upper limit, it means that the calculated single driving mileage is abnormal, and the current single driving mileage can be defined as 0 at this time.
[0068] In the present application, the main controller and each of the auxiliary controllers calculate the single driving mileage of the vehicle in the current startup state according to the vehicle speed signal value read at each time. Since each controller may have abnormal reading of the vehicle speed signal value, in the present application, the accuracy of the current single driving mileage can be guaranteed by selecting the maximum single driving mileage that is less than or equal to the driving mileage upper limit value from the single driving mileages calculated by the main controller and each of the auxiliary controllers as the current single driving mileage.
[0069] In step 240, based on the current single mileage, the total mileage of the vehicle up to the last time it switched from the start state to the stop state is updated, and the updated total mileage is stored as the total mileage of the vehicle up to the current time it switched from the start state to the stop state.
[0070] In the present application, specifically, for example, the total mileage of the vehicle as of the last time it switched from the start state to the stop state is 28,000 kilometers. If the current single mileage is 80 kilometers, then the updated total mileage is 28,000+80=28,080 kilometers. 28,080 kilometers can be stored as the total mileage of the vehicle as of the current time it switched from the start state to the stop state.
[0071] It should be noted that the main controller can store the updated total mileage in the E side (after recording in the E side, the data will not be lost after hibernation).
[0072] In the present application, after storing the updated total mileage as the total mileage of the vehicle up to the time when the current start state is switched to the stop state, the following steps 251 to 252 may also be performed:
[0073] Step 251, determining whether the at least one auxiliary controller stores the updated total mileage.
[0074] Step 252: If the at least one auxiliary controller stores the updated total mileage, clear the single mileage of the vehicle in the current startup state calculated by the main controller.
[0075] In this application, in order to make those skilled in the art better understand this application, Figure 3 The vehicle mileage data processing method proposed in this application is explained in an overall manner using a specific embodiment.
[0076] See also Figure 3 , shows an overall flow chart of the main controller processing vehicle mileage data according to an embodiment of the present application.
[0077] In the present application, based on the proposed technical solution, compared with the existing solution that only updates the total mileage data of the vehicle through a certain controller, the present application updates the total mileage data of the vehicle through multiple controllers (i.e., a main controller and multiple auxiliary controllers), which can improve the accuracy of the vehicle mileage data processing. Specifically, since the communication between the various devices in the vehicle is mainly based on the CAN bus when the vehicle is traveling each time, it is easy to cause data transmission loss or inaccuracy. For example, the controller obtains the vehicle speed data from the vehicle CAN bus. Due to the possibility of abnormal speed signal received from the CAN bus, the accuracy of the single mileage calculated by the controller based on the vehicle speed data obtained from the vehicle CAN bus cannot be guaranteed, and then the accuracy of the total mileage of the vehicle updated based on the obtained single mileage cannot be guaranteed. In the present application, multiple controllers simultaneously receive the vehicle speed signal in the CAN bus, and each controller calculates the single mileage based on the obtained speed signal, and then the main controller selects an optimal single mileage from the single mileage calculated by each controller as the current single mileage, which can ensure that the final single mileage is calculated based on the vehicle speed signal with the highest accuracy. In this way, the accuracy of the current single driving mileage is improved, thereby improving the accuracy of the vehicle's total driving mileage updated based on the current single driving mileage, and further improving the accuracy of vehicle mileage data processing.
[0078] In the present application, a main controller is proposed, and the main controller is used to execute the vehicle mileage data processing method as described above.
[0079] Reference Figure 4 , shows a flow chart of another vehicle mileage data processing method in an embodiment of the present application, wherein the vehicle includes a main controller and at least one auxiliary controller, and the vehicle mileage data processing method can be executed by a device with a computing and processing function, for example, it can be executed by any of the auxiliary controllers, refer to Figure 4 As shown, the vehicle mileage data processing method includes at least steps 410 to 450, which are described in detail as follows:
[0080] In step 410, in response to the vehicle switching from the current start state to the stop state, the total mileage updated by the main controller is obtained, and the total mileage of the vehicle up to the last time it switched from the start state to the stop state is updated.
[0081] In the present application, when it is detected that the vehicle switches from the current start state to the stop state, the auxiliary controller can obtain the total mileage updated by the main controller. Specifically, when the vehicle switches from the current start state to the stop state, the main controller will update the total mileage of the vehicle up to the last time it switched from the start state to the stop state. Therefore, the auxiliary controller can communicate with the main controller to obtain the total mileage updated by the main controller.
[0082] In the present application, in addition to obtaining the total mileage updated by the main controller, the auxiliary controller also updates the total mileage of the vehicle as of the last time it switched from the start state to the stop state, thereby obtaining the total mileage updated by the auxiliary controller.
[0083] In step 420, it is determined whether the total mileage updated by the main controller is a valid value.
[0084] It should be noted that when the auxiliary controller obtains the updated total mileage from the main controller, there may be abnormalities in the total mileage, for example, the updated total mileage does not exist in the main controller, or a message is lost when obtaining the total mileage updated by the main controller. Based on this, in step 420, it is necessary to determine whether the total mileage updated by the main controller is a valid value to ensure that the total mileage updated from the main controller is accurate.
[0085] In step 430 , if the total mileage updated by the main controller is a valid value, the total mileage updated by the main controller is stored as the total mileage of the vehicle up to the time when the current start state is switched to the stop state.
[0086] In the present application, if the total mileage updated by the main controller is a valid value, it means that the auxiliary controller obtains the updated total mileage from the main controller without any abnormality. At this time, the total mileage updated by the main controller is directly stored as the total mileage of the vehicle from the time the current start state is switched to the stop state.
[0087] It should be noted that the auxiliary controller can store the updated total mileage in the E side (after recording in the E side, the data will not be lost after hibernation).
[0088] In step 440, if the total mileage updated by the main controller is an invalid value, it is determined whether the total mileage updated by any one of the auxiliary controllers is a valid value.
[0089] In the present application, if the total mileage updated by the main controller is an invalid value, it means that an abnormality has occurred in the acquisition of the updated total mileage by the auxiliary controller from the main controller. At this time, it is determined whether the total mileage updated by any of the auxiliary controllers is a valid value.
[0090] In step 450 , if the total mileage updated by any one of the auxiliary controllers is a valid value, the total mileage updated by any one of the auxiliary controllers is stored as the total mileage of the vehicle up to the time when the current start state is switched to the stop state.
[0091] Furthermore, in the present application, the following step 460 may also be performed:
[0092] Step 460: If the total mileage updated by the at least one auxiliary controller is an invalid value, define the invalid value as the total mileage of the vehicle up to the time when the current start state is switched to the stop state and store it.
[0093] In the present application, if the total mileage updated by any one of the auxiliary controllers is an invalid value, it can be determined whether the total mileage updated by other auxiliary controllers except for the any one of the auxiliary controllers is an invalid value. If the total mileage updated by other auxiliary controllers is a valid value, the total mileage updated by other auxiliary controllers is stored as the total mileage of the vehicle when the current start state is switched to the stop state. If the total mileage updated by at least one auxiliary controller (i.e., all auxiliary controllers) is an invalid value, the reason may be that other basic data obtained by all auxiliary controllers for calculating the total mileage are abnormal.
[0094] In order to help those skilled in the art better understand the above step 410, that is, how to update the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state, the following steps 411 to 415 may be performed:
[0095] Step 411, obtaining and determining whether the total mileage of the vehicle up to the last time it switched from the start state to the stop state stored in any one of the auxiliary controllers is a valid value.
[0096] In the step of updating the total mileage of the vehicle as of the last time it switched from the start state to the stop state, first obtain the total mileage of the vehicle as of the last time it switched from the start state to the stop state stored in any one of the auxiliary controllers, and determine whether it is a valid value. It should be noted here that since the auxiliary controller may be replaced, if the auxiliary controller has been replaced, the total mileage stored in the history will be cleared. Because, in order to ensure that the total mileage updated by the auxiliary controller is accurate, the present application can determine whether the total mileage of the vehicle as of the last time it switched from the start state to the stop state stored in any one of the auxiliary controllers is a valid value.
[0097] Step 412, if the total mileage of the vehicle as of the last time it switched from the start state to the stop state stored in any of the auxiliary controllers is a valid value, then the current single trip mileage of the vehicle in the current start state determined by the main controller is obtained, and based on the current single trip mileage, the total mileage of the vehicle as of the last time it switched from the start state to the stop state is updated.
[0098] In the present application, a sensor for collecting vehicle speed model values will be configured in the vehicle, and when it is detected that the vehicle is in the starting state, the sensor collects the vehicle speed signal value, for example, the vehicle speed signal value is collected every 10ms, and the collected vehicle speed signal value will be transmitted to the CAN bus, and the main controller and each auxiliary controller will read the vehicle speed signal value of the vehicle at each moment in real time from the CAN bus.
[0099] After reading the vehicle speed signal value, the main controller and each auxiliary controller can calculate and update the single mileage of the vehicle in the current start-up state in real time according to the vehicle speed signal value at each moment, until it is detected that the vehicle switches from the current start-up state to the stop state. Specifically, a vehicle speed-time curve can be constructed according to the read vehicle speed signal value and the corresponding reading time, and then the constructed vehicle speed-time curve is integrated to obtain the single mileage in the current entire start-up state. It can be understood that the higher the reading frequency of the vehicle speed signal value, the more accurate the calculated single mileage of the vehicle in the current start-up state.
[0100] It should be noted that the main controller will determine the current single driving mileage of the vehicle in the current startup state. Specifically, the main controller and each of the auxiliary controllers calculate the single driving mileage of the vehicle in the current startup state according to the vehicle speed signal value read at each time. Since each controller may have abnormal reading of the vehicle speed signal value, therefore, in this application, the accuracy of the current single driving mileage can be guaranteed by selecting the maximum single driving mileage that is less than or equal to the driving mileage upper limit value from the single driving mileages calculated by the main controller and each of the auxiliary controllers. Furthermore, after the main controller determines the current single driving mileage of the vehicle in the current startup state, any of the auxiliary controllers can directly obtain it from the main controller.
[0101] In the present application, specifically, for example, the effective total mileage of the vehicle as of the last time it switched from the start state to the stop state is 28,000 kilometers. If the current single mileage is 80 kilometers, then the updated total mileage is 28,000+80=28,080 kilometers. 28,080 kilometers can be stored as the total mileage of the vehicle as of the current time it switched from the start state to the stop state.
[0102] Step 413, if the total mileage of the vehicle stored in the at least one auxiliary controller up to the last time it switched from the start state to the stop state is an invalid value, then obtain and determine whether the total mileage updated by the main controller is a valid value.
[0103] In the present application, if the total mileage of the vehicle until the last time it switched from the start state to the stop state stored in any of the auxiliary controllers is an invalid value, it can be determined whether the total mileage of the vehicle until the last time it switched from the start state to the stop state stored in other auxiliary controllers other than the any of the auxiliary controllers is an invalid value. If the total mileage of the vehicle until the last time it switched from the start state to the stop state stored in other auxiliary controllers is a valid value, then based on the current single trip of the vehicle in the current start state determined by the main controller, the total mileage of the vehicle until the last time it switched from the start state to the stop state is updated. If the total mileage of the vehicle until the last time it switched from the start state to the stop state stored in other auxiliary controllers is an invalid value, that is, the total mileage of the vehicle until the last time it switched from the start state to the stop state stored in at least one auxiliary controller (that is, all auxiliary controllers) is an invalid value, it means that all auxiliary controllers may have been replaced, and the total mileage stored in the history may be cleared. At this time, it is possible to obtain and determine again whether the total mileage updated by the main controller is a valid value.
[0104] Step 414: If the total mileage updated by the main controller is a valid value, the total mileage updated by the main controller is determined as the total mileage updated by any one of the auxiliary controllers.
[0105] In the present application, if the total mileage updated by the main controller is a valid value, it means that the auxiliary controller obtains the updated total mileage from the main controller without any abnormality. At this time, the total mileage updated by the main controller is directly used as the total mileage updated by any auxiliary controller.
[0106] Step 415: If the total mileage updated by the main controller is an invalid value, the invalid value is defined as the total mileage updated by any auxiliary controller.
[0107] In this application, in order to make those skilled in the art better understand this application, Figure 5 and Figure 6 Another specific embodiment is used to explain the vehicle mileage data processing method proposed in this application as a whole.
[0108] See also Figure 5 , shows a flow chart of an auxiliary controller processing vehicle mileage data according to an embodiment of the present application.
[0109] See also Figure 6 , shows a flow chart of an auxiliary controller processing vehicle mileage data according to an embodiment of the present application.
[0110] In the present application, based on the proposed technical solution, compared with the existing solution of updating the total mileage data of the vehicle only through a certain controller, the present application updates the total mileage data of the vehicle through multiple controllers (i.e., a main controller and multiple auxiliary controllers), which can improve the accuracy of the vehicle mileage data processing. Specifically, the auxiliary controller first updates its own total mileage that needs to be stored based on the total mileage updated by the main controller. When the total mileage updated by the main controller is an invalid value, the auxiliary controller itself updates the total mileage of the vehicle and stores it. In this way, the loss of total mileage caused by hardware replacement of the controller and other reasons can be avoided. By synchronizing the updated total mileage, the total mileage stored in the auxiliary controller can be synchronized to the main controller when the total mileage in the subsequent main controller is abnormal, which can ensure that the updated total mileage is not lost and the error is small, thereby improving the accuracy of the vehicle mileage data processing.
[0111] In the present application, an auxiliary controller is proposed, which is used to execute the vehicle mileage data processing method as described above.
[0112] Based on the same inventive concept, an embodiment of the present application also provides a vehicle, which includes the main controller as described above and at least one auxiliary controller as described above.
[0113] In order to make those skilled in the art better understand the present application, Figure 7 Another specific embodiment is used to illustrate the logic of a vehicle in processing vehicle mileage data.
[0114] See also Figure 7 , shows a flow chart of a main controller and an auxiliary controller jointly processing vehicle mileage data according to an embodiment of the present application.
[0115] Based on the technical solution proposed in this application, compared with the existing solution of updating the total mileage data of the vehicle only through a certain controller, this application updates the total mileage data of the vehicle through multiple controllers (i.e., a main controller and multiple auxiliary controllers), which can improve the accuracy, stability and robustness of vehicle mileage data processing. Specifically:
[0116] On the one hand, since the communication between various devices in the vehicle is mainly based on the CAN bus when the vehicle is driving, it is easy to lose or inaccurate data transmission. For example, the controller obtains the vehicle speed data from the vehicle CAN bus. Due to the possibility of abnormal speed signal received from the CAN bus, the accuracy of the single driving mileage calculated by the controller based on the vehicle speed data obtained from the vehicle CAN bus cannot be guaranteed, and then the accuracy of the vehicle total driving mileage updated based on the obtained single driving mileage cannot be guaranteed. In this application, multiple controllers simultaneously receive the vehicle speed signal in the CAN bus, and each controller calculates the single driving mileage based on the obtained speed signal, and then the main controller selects an optimal single driving mileage from the single driving mileage calculated by each controller as the current single driving mileage, which can ensure that the final single driving mileage is calculated based on the vehicle speed signal with the highest accuracy. In this way, the accuracy of the current single driving mileage is improved, thereby improving the accuracy of the vehicle total driving mileage updated based on the current single driving mileage, and then improving the accuracy of vehicle mileage data processing.
[0117] On the other hand, since the vehicle controller may need to be replaced due to damage or aging, this may easily lead to the possibility of loss of the historical total mileage data stored in the vehicle controller. In the existing scheme, if the total mileage data stored in a vehicle controller is lost, the total mileage data updated by the vehicle controller will also be inaccurate, thereby showing that the stability of vehicle mileage data processing is low, affecting the user experience. The present application updates the total mileage data of the vehicle through multiple controllers. When the total mileage data stored in any controller is lost, the controller can synchronously update the latest total mileage data from other controllers, thereby ensuring that the total mileage data will not be lost, thereby improving the stability and robustness of vehicle mileage data processing and improving user experience.
[0118] In practical applications, this application proposes a strategy for the main controller and the auxiliary controller to calculate and store the total mileage at the same time, and a strategy for multiple controllers to calculate the total mileage at the same time, and the main controller arbitrates to select the optimal calculation result, and updates the total mileage at the same time. When the auxiliary controller updates the total mileage, it gives priority to the optimal calculation result selected by the main controller, so that the total mileage information of the main controller and the auxiliary controller is changed synchronously to avoid cumulative errors in the calculation results between multiple controllers. At the same time, multiple controllers memorize and store the total mileage at the same time. When the hardware of the main controller is damaged and replaced, the total mileage of the main controller can be updated according to the total mileage memorized by the auxiliary controller; when the auxiliary controller is replaced, the total mileage can also be updated according to the total mileage memorized by the main controller.
[0119] By using the technical strategy proposed in this application, it is possible to avoid the negative perception caused by the instrument display errors due to the problem of a single controller receiving abnormal CAN signals, and at the same time effectively improve the accuracy of the total mileage calculation results (for example, during a vehicle driving process, the main controller receives abnormal vehicle speed CAN signals 10 times, and the auxiliary controller receives abnormal vehicle speed CAN signals 5 times, then the single mileage calculated by the auxiliary controller will be more accurate than the single mileage calculated by the main controller. Therefore, the main controller will be able to display the total mileage determined based on the single mileage of the auxiliary controller on the instrument for update). In addition, after the main controller is replaced, the total mileage of the main controller can also be updated according to the total mileage memorized in the auxiliary controller, and the correct total mileage can be displayed on the instrument, effectively improving the accuracy of the total mileage display, improving the accuracy of the control logic and calculation results, and avoiding obvious faults / inaccuracies in functions that the user directly contacts.
[0120] Based on the same inventive concept, an embodiment of the present application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium and suitable for being read and executed by a processor, so that a computer device having the processor executes the vehicle mileage data processing method as described above.
[0121] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program instruction is stored. The at least one computer program instruction is loaded and executed by a processor to implement the operations performed by the vehicle mileage data processing method as described above.
[0122] refer to Figure 8 , shows a schematic diagram of the structure of the main controller or the auxiliary controller in an embodiment of the present application, wherein the main controller or the auxiliary controller includes one or more memories 804, one or more processors 802, and at least one computer program (computer program instruction) stored in the memory 804 and executable on the processor 802, and when the processor 802 executes the computer program, the vehicle mileage data processing method described above is implemented.
[0123] Among them, Figure 8In the embodiment of the present invention, a bus architecture (represented by bus 800) is shown, which may include any number of interconnected buses and bridges, and bus 800 links various circuits including one or more processors represented by processor 802 and memory represented by memory 804. Bus 800 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 805 provides an interface between bus 800 and receiver 801 and transmitter 803. Receiver 801 and transmitter 803 may be the same element, namely a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 802 is responsible for managing bus 800 and general processing, while memory 804 may be used to store data used by processor 802 when performing operations.
[0124] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hard wiring, or a combination of any of these. In addition, each functional unit may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0126] The units described as separate components may or may not be physically separated, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed in multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly or all or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store computer program instructions.
[0128] The above description is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A vehicle mileage data processing method, characterized in that: The vehicle includes a main controller and at least one auxiliary controller, the method is executed in the main controller, and the method includes: In response to the vehicle switching from the current start state to the stop state, obtaining the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state; Acquire the single driving mileage of the vehicle in the current startup state calculated by the main controller and each of the auxiliary controllers respectively; Acquire the mileage upper limit of the vehicle in the current startup state, and select the maximum single driving mileage that is less than or equal to the mileage upper limit from the single driving mileages calculated by the main controller and each of the auxiliary controllers as the current single driving mileage; Based on the current single mileage, the total mileage of the vehicle up to the last time it switched from the start state to the stop state is updated, and the updated total mileage is stored as the total mileage of the vehicle up to the current time it switched from the start state to the stop state.
2. The method according to claim 1, characterized in that The method further comprises: If the single driving mileages respectively calculated by the main controller and each of the auxiliary controllers are greater than the driving mileage upper limit, the current single driving mileage is determined to be 0.
3. The method according to claim 1, characterized in that: After storing the updated total mileage as the total mileage of the vehicle up to the time when the current start state is switched to the stop state, the method further includes: determining whether the at least one auxiliary controller stores the updated total mileage; If the at least one auxiliary controller stores the updated total mileage, the single mileage of the vehicle in the current startup state calculated by the main controller is cleared.
4. The method according to claim 1, characterized in that The obtaining of the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state includes: Obtaining and determining whether the total mileage stored in the main controller is a valid value; If the total mileage stored in the main controller is a valid value, the total mileage stored in the main controller is used as the total mileage of the vehicle up to the last time the vehicle was switched from the start state to the stop state; If the total mileage stored in the main controller is an invalid value, the total mileage stored in the auxiliary controller is used as the total mileage of the vehicle up to the last time it was switched from the start state to the stop state.
5. The method according to claim 1, characterized in that: The main controller and each of the auxiliary controllers calculate the single driving mileage of the vehicle in the current startup state through the following steps: When the vehicle is detected to be in a starting state, the speed signal value of the vehicle at each moment is read in real time; According to the vehicle speed signal value at each moment, the single driving mileage of the vehicle in the current start state is calculated and updated in real time until it is detected that the vehicle switches from the current start state to the stop state.
6. The method according to claim 5, characterized in that After reading the vehicle speed signal value of the vehicle at each moment in real time, the method further includes: Determining whether the vehicle speed signal value at each moment is a valid value; If the vehicle speed signal value of the vehicle at each moment is an invalid value, the vehicle speed signal value of the vehicle at each moment is assigned a value of 0.
7. The method according to claim 1, characterized in that The obtaining of the upper limit of the mileage of the vehicle in the current startup state includes: Acquire a preset mileage value as the upper limit of the mileage of the vehicle in the current startup state; or, The fuel consumption / electricity of the vehicle in the current startup state is obtained, and based on the fuel consumption / electricity, an upper limit value of the mileage of the vehicle in the current startup state is determined.
8. A main controller, characterized in that: The main controller is used to execute the method according to any one of claims 1 to 7.
9. A vehicle mileage data processing method, characterized in that: The vehicle comprises the main controller as claimed in claim 8 and at least one auxiliary controller, and the method is executed in any one of the auxiliary controllers, and the method comprises: In response to the vehicle switching from the current start state to the stop state, obtaining the total mileage updated by the main controller, and updating the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state; Determining whether the total mileage updated by the main controller is a valid value; If the total mileage updated by the main controller is a valid value, the total mileage updated by the main controller is stored as the total mileage of the vehicle up to the time when the current start state is switched to the stop state; If the total mileage updated by the main controller is an invalid value, determining whether the total mileage updated by any one of the auxiliary controllers is a valid value; If the total mileage updated by any one of the auxiliary controllers is a valid value, the total mileage updated by any one of the auxiliary controllers is stored as the total mileage of the vehicle up to the time when the current start state is switched to the stop state.
10. The method according to claim 9, characterized in that The method further comprises: If the total mileage updated by the at least one auxiliary controller is an invalid value, the invalid value is defined and stored as the total mileage of the vehicle up to the time when the current start state is switched to the stop state.
11. The method according to claim 9, characterized in that The updating of the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state includes: Obtaining and determining whether the total mileage of the vehicle stored in any one of the auxiliary controllers up to the last time the vehicle switched from the start state to the stop state is a valid value; If the total mileage of the vehicle up to the last time it switched from the start state to the stop state stored in any one of the auxiliary controllers is a valid value, then the current single trip mileage of the vehicle in the current start state determined by the main controller is obtained, and based on the current single trip mileage, the total mileage of the vehicle up to the last time it switched from the start state to the stop state is updated; If the total mileage of the vehicle up to the last time the vehicle switched from the start state to the stop state stored in the at least one auxiliary controller is an invalid value, obtaining and determining whether the total mileage updated by the main controller is a valid value; If the total mileage updated by the main controller is a valid value, the total mileage updated by the main controller is determined as the total mileage updated by any one of the auxiliary controllers; If the total mileage updated by the main controller is an invalid value, the invalid value is defined as the total mileage updated by any one of the auxiliary controllers.
12. An auxiliary controller, characterized in that: The auxiliary controller is used to execute the method according to any one of claims 9 to 11.
13. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 7 and claims 9 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which are loaded and executed by a processor to implement the operations performed by the method according to any one of claims 1 to 7 and claims 9 to 11.
15. A vehicle, characterized in that: The vehicle comprises a main controller as claimed in claim 8 and at least one auxiliary controller as claimed in claim 12 .
Citation Information
Patent Citations
Vehicle mileage storage method and device, electronic equipment and storage medium
CN114407651A
Vehicle engine oil maintenance period monitoring method, vehicle control unit and vehicle
CN115523006A