Calibration method and device adaptive to electronic control unit, equipment and storage medium
By acquiring measurement data and calibrating the server side when the server is disconnected, the problem that the prior art cannot perform measurement and calibration in offline state is solved, and the electronic control unit is realized Efficient and flexible measurement and calibration, suitable for special scenarios.
Patent Information
- Application Number
- CN202411149091.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art requires online connection when measuring and calibrating electronic control units, and cannot be performed offline, especially in special scenarios.
Provide a calibration method adapted to electronic control unit, by obtaining measurement data while disconnecting from the server side, and performing measurement and calibration according to preset measurement mechanism until the data meets preset standards, and supports offline state Perform measurement and calibration.
It realizes efficient measurement and calibration of electronic control units in offline state, meets the needs of special application scenarios, reduces dependence on network connections, and improves the flexibility and reliability of the measurement and calibration process.
Smart Images

Figure CN118963220A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a calibration method, device, equipment and storage medium for an adapted electronic control unit. Background Art
[0002] With the development of intelligent vehicles, the number of electronic control units (ECUs) is increasing. In order to tune the performance of each component of the vehicle to the best state before leaving the factory to better serve users, the OEM needs to spend a lot of manpower and material resources to measure and calibrate the vehicle ECU during the R&D and testing stages.
[0003] Currently, the vehicle-side electronic control unit is measured and calibrated through wired or remote wireless modes. In the wired mode, each measurement and calibration of the electronic control unit requires a calibration engineer to follow the vehicle one-on-one, and the wireless method requires the car box to be connected to the Internet in real time to perform remote measurement and calibration. Both wired and wireless methods are online methods, that is, the entire measurement and calibration process of the electronic control unit is fully participated by the PC (personal computer) host computer or cloud server, and its communication link is long and cannot be used in some special scenarios. Summary of the invention
[0004] In view of the above problems, the present application provides a calibration method, device, equipment and storage medium for adapting an electronic control unit, which are used to measure and calibrate the vehicle side in an offline state to meet special application scenarios.
[0005] According to one aspect of the present application, a calibration method for an adaptive electronic control unit is provided, and the calibration method is applied to a calibration device, comprising: obtaining measurement data in a state disconnected from a server; wherein the measurement data is data measured by the adaptive electronic control unit according to a preset measurement mechanism, and the preset measurement mechanism is a mechanism sent to the adaptive electronic control unit, or a mechanism constructed by the adaptive electronic control unit according to received configuration parameters; if the number of the measurement data reaches a preset number and / or the current moment is within a calibration period, the adaptive electronic control unit is calibrated based on the preset calibration mechanism to meet preset standards.
[0006] In an optional manner, the calibration method also includes: obtaining initial configuration parameters when successfully connected to the server; wherein the initial configuration parameters include sub-parameters of different configuration functions; performing a verification operation on the initial configuration parameters, and storing the sub-parameters of the configuration functions that have been successfully verified separately for use in constructing the preset measurement mechanism and the preset calibration mechanism.
[0007] In an optional manner, the verification operation includes an integrity check and a correctness check; the verification operation on the initial configuration parameters further includes: determining the integrity check value, instruction header information, and payload information corresponding to the initial configuration parameters based on a preset instruction protocol; calculating a target integrity check value according to the initial configuration parameters and a preset verification function, and determining whether the initial configuration parameters pass the integrity check based on the relationship between the target integrity check value and the integrity check value; wherein the integrity check value is a value calculated by the server side according to the preset verification function; and determining whether the initial configuration parameters pass the correctness check based on the instruction header information and the payload information.
[0008] In an optional manner, the preset function is a function that seeks a quotient based on a preset polynomial; the calculating a target integrity check value based on the initial configuration parameters and the preset check function further includes: converting the initial configuration parameters into a preset format value, dividing the preset format value by the preset polynomial, and using the calculated remainder as the target integrity check value; the determining whether the initial configuration parameters pass the integrity check based on the size relationship between the target integrity check value and the integrity check value further includes: if the size relationship indicates that the target integrity check value and the integrity check value are the same, then determining that the initial configuration parameters pass the integrity check.
[0009] In an optional manner, determining whether the initial configuration parameters pass the correctness check based on the instruction header information and the payload information further includes: summing the data length of the direction indication bit recorded in the instruction header information with all the data lengths recorded in the payload information, and comparing the calculated sum length with the total length of the data recorded in the instruction header information; if the sum length is the same as the total length of the data, it indicates that the initial configuration parameters pass the correctness check.
[0010] In an optional manner, the sub-parameters of the different configuration functions that have been successfully verified include measurement configuration parameters and calibration configuration parameters; the calibration method also includes: in response to a wake-up signal, detecting whether the measurement configuration parameters and / or the calibration configuration parameters exist; if the measurement configuration parameters exist, sending the measurement configuration parameters to the adapter electronic control unit so that the adapter electronic control unit constructs the preset measurement mechanism according to the measurement configuration parameters; if the calibration configuration parameters exist, constructing the preset calibration mechanism according to the calibration configuration parameters, and determining the preset standard.
[0011] In an optional manner, the calibration method also includes: when successfully connected to the server, if it is detected that updated configuration parameters exist in the server, downloading the updated configuration parameters; performing a verification operation on the updated configuration parameters, and updating the sub-parameters of different configuration functions that have been successfully verified to the corresponding storage area.
[0012] In an optional manner, the calibration method further includes: uploading the measurement data and the calibration data to the server when the connection with the server is successful, and deleting the stored measurement data and the calibration data when it is detected that the measurement data and the calibration data are successfully uploaded.
[0013] In an optional manner, before obtaining the measurement data, the calibration method further includes: detecting whether the number of messages received by each electronic control unit on the vehicle side changes within a preset time period; and using the electronic control unit whose number of messages changes as the adapted electronic control unit.
[0014] According to another aspect of the present application, a calibration device for an adaptive electronic control unit is provided, and the calibration device includes: an acquisition module, which is used to acquire measurement data when disconnected from a server; wherein the measurement data is data measured by the adaptive electronic control unit according to a preset measurement mechanism, and the preset measurement mechanism is a mechanism sent to the adaptive electronic control unit, or a mechanism constructed by the adaptive electronic control unit according to received configuration parameters; a calibration module, which is used to perform a calibration operation on the adaptive electronic control unit based on a preset calibration mechanism to meet preset standards if the number of the measurement data reaches a preset number and / or the current moment is within a calibration period.
[0015] According to one aspect of the present application, an electronic device is provided, including: a controller; and a memory for storing one or more programs, wherein when the one or more programs are executed by the controller, the above-mentioned calibration method is executed.
[0016] According to one aspect of the present application, a computer-readable storage medium is also provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned calibration method.
[0017] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned calibration method.
[0018] The calibration device of the present application can measure and calibrate the adaptive electronic control unit while being disconnected from the server. The timing of starting the calibration operation is determined based on the number of measurement data obtained or the relationship between the current moment and the calibration cycle. During the calibration operation on the adaptive electronic control unit, it is continuously adjusted and calibrated until the calibration data obtained meets the preset standards to meet the application scenarios of offline measurement and calibration.
[0019] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and are used together with the specification 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.
[0021] Figure 1 It is a schematic diagram of the scenario of measuring and calibrating the vehicle-side electronic control unit in the existing wireless mode and wired mode.
[0022] Figure 2 It is a flowchart of a calibration method for an adapted electronic control unit shown in an exemplary embodiment of the present application.
[0023] Figure 3 is based on Figure 2 The exemplary embodiment shown is a schematic flow chart of another calibration method for adapting an electronic control unit.
[0024] Figure 4 is based on Figure 3 The exemplary embodiment shown is a schematic flow chart of another calibration method for adapting an electronic control unit.
[0025] Figure 5 It is a schematic diagram of an application scenario of a calibration method shown in an exemplary embodiment of the present application.
[0026] Figure 6 It is a schematic diagram of the initial configuration process of the calibration device shown in an exemplary embodiment of the present application.
[0027] Figure 7 It is a schematic structural diagram of a calibration device adapted to an electronic control unit shown in an exemplary embodiment of the present application.
[0028] Figure 8 It is a structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0029] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0030] 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.
[0031] 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.
[0032] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0033] See also Figure 1 , Figure 1 This is a schematic diagram of the existing wireless and wired modes for measuring and calibrating the vehicle-side electronic control unit. In the wired mode, each measurement and calibration of the electronic control unit requires a calibration engineer to follow the vehicle one-on-one. In the wireless mode, the calibration box needs to be connected to the Internet in real time to perform remote measurement and calibration. Both wired and wireless methods are online methods, that is, the entire measurement and calibration process of the electronic control unit is fully participated by the PC host computer or cloud server. The communication link is long and cannot be used in some special scenarios, such as offline scenarios.
[0034] To this end, one aspect of the present application provides a calibration method for an adapted electronic control unit. Figure 2 , Figure 21 is a flow chart of a calibration method for an adapted electronic control unit shown in an exemplary embodiment of the present application. The calibration method is applied to a calibration device and includes at least S210 to S220, which are described in detail as follows:
[0035] S210: Acquire measurement data while disconnected from the server; wherein the measurement data is data measured by the adaptation electronic control unit according to a preset measurement mechanism, and the preset measurement mechanism is a mechanism sent to the adaptation electronic control unit, or a mechanism constructed by the adaptation electronic control unit according to received configuration parameters.
[0036] The server can be Figure 1 The cloud server shown in the figure, or the server on the PC host side. The calibration device can be connected to the cloud server wirelessly, such as 4G, WIFI, BLE, 5G and other wireless connections, to achieve data interaction between the two. If the calibration device cannot retrieve the cloud server within a certain period of time, or the two send requests to each other and do not respond for a long time, it means that the calibration device is disconnected from the server.
[0037] If the server is a server on the PC host side, the calibration device can be connected to it wirelessly, or connected to it via USB, or other physical links to achieve wired data interaction. Similarly, if it is detected that the wireless link and the physical link are disconnected, it indicates that the calibration device is disconnected from the server on the PC host side.
[0038] Before disconnecting from the server, there are two different pre-processing scenarios, which are described as follows:
[0039] First, the calibration device is normally connected to the adaptation electronic control unit and the server side respectively. In this scenario, the existing calibration method can be used to calibrate the adaptation electronic control unit. If the adaptation data link required during this calibration operation is the same as the link required for the calibration operation in this embodiment, there is no need to configure the data link separately afterwards; if the required adaptation data link is different, it is necessary to configure or wake up the corresponding adaptation data link when the connection with the server side is disconnected, so as to perform the calibration operation described in this embodiment on the adaptation electronic control unit.
[0040] Second, the calibration device is not connected to the adapter electronic control unit in the front end. In this scenario, the calibration device needs to be initialized to start calibrating the adapter electronic control unit. During the initialization process, the configuration of the adapter data link with the adapter electronic control unit needs to be completed before the calibration operation of the adapter electronic control unit can be started. In this scenario, it is necessary not only to detect that the server is disconnected, but also to detect that the configuration of the adapter data link with the adapter electronic control unit is completed before S210 can be executed.
[0041] The adapter electronic control unit is normally connected to the calibration equipment, and the calibration equipment can collect and calibrate data on it.
[0042] In the scenario where the execution subject of this embodiment is normally connected to the server side, the server side sends the configuration parameters required for the construction of the preset measurement mechanism and the preset calibration mechanism to the execution subject of this embodiment, and then the execution subject of this embodiment can construct the preset measurement mechanism and directly send the preset measurement mechanism to the adapter electronic control unit, or the execution subject of this embodiment sends the corresponding configuration parameters to the adapter electronic control unit to enable it to construct the preset measurement mechanism. For example, sending a CCP protocol (CAN Calibration Protocol, CAN bus calibration protocol) CRO (Command Receive Object, command receiving object) message can be used to configure the measurement parameters of the adapter electronic control unit (including measurement cycle duration, measurement element logical address, measurement element length and other information), also known as DAQ (Data Acquisition, data acquisition) function, and ensure that all necessary parameters have been correctly configured to the adapter electronic control unit, so that it can construct the preset measurement mechanism, thereby collecting the corresponding measurement data.
[0043] In some embodiments, the calibration device is connected to each electronic control unit on the vehicle side through a CAN bus. The calibration device can use the CAN bus active packet receiving mechanism to perform online detection (i.e., normal connection status detection) on each electronic control unit on the vehicle side to determine the adapted electronic control unit. In each CAN bus interrupt packet receiving interface, a received message statistics is added so that when each electronic control unit receives a message sent by the calibration device, it feeds back the number of messages it receives to the calibration device. The calibration device detects whether it is in a changed state within a preset time length to determine whether it is in a normal connection state. The specific method is: detect whether the number of messages received by each electronic control unit on the vehicle side changes within a preset time length; and use the electronic control unit with a changed number of messages as an adapted electronic control unit. Among them, the preset time length is adaptively configured according to the actual scenario.
[0044] The preset measurement mechanism is a data measurement mechanism adopted by the adaptive electronic control unit. The configuration parameters for constructing the mechanism are originally derived from the operation and maintenance personnel, who can upload the relevant configuration parameters to the server. When the calibration device is normally connected to the server, the server can send the relevant configuration parameters to the calibration device. The calibration device can temporarily store the relevant configuration parameters locally. When the calibration device is normally connected to the adaptive electronic control unit, the parameters are sent to the adaptive electronic control unit, so that the adaptive electronic control unit can construct the preset measurement mechanism according to the relevant configuration parameters. This construction method enables the adaptive electronic control unit to autonomously construct the preset measurement mechanism. During the construction process, the adaptive electronic control unit can make adaptive adjustments according to its own parameters or the scene in which it is located, so that the constructed preset measurement mechanism is more adaptive.
[0045] Alternatively, the calibration device directly constructs a preset measurement mechanism based on relevant configuration parameters, and when the calibration device and the adapting electronic control unit are normally connected, the calibration device directly sends the preset measurement mechanism to the adapting electronic control unit. Because the construction time required for different adapting electronic control units may be different, it cannot be guaranteed that the corresponding adapting electronic control unit will complete the construction of the preset measurement mechanism within the expected time. This construction method is completed in the calibration device, the construction time is controllable, and the construction time of the adapting electronic control unit can be saved, thereby improving the time controllability in the process of constructing the preset measurement mechanism.
[0046] S220: If the amount of measurement data reaches a preset amount and / or the current moment is within a calibration period, a calibration operation is performed on the adapted electronic control unit based on a preset calibration mechanism to meet a preset standard.
[0047] Among them, the preset calibration mechanism is a mechanism constructed by the execution subject of this embodiment according to the relevant configuration parameters issued by the server. Exemplarily, the communication link between the calibration device and the server operates normally, and the server actively detects whether the preset calibration mechanism of the calibration device is synchronized with its latest mechanism, or the calibration device actively sends the relevant information of the local preset calibration mechanism to the server, so that the server detects whether it is synchronized with the latest mechanism; if not, the server sends the latest relevant configuration parameters to the calibration device, so that it can construct the latest preset calibration mechanism. It is worth noting that if the server detects that the calibration device has not constructed a preset calibration mechanism, the server will directly send the relevant configuration parameters without the need for mechanism synchronization detection.
[0048] Send relevant configuration parameters to the calibration equipment,
[0049] The two trigger conditions for starting the calibration operation in this embodiment are conditions at different levels. One is based on the number of measurement data obtained (i.e., the data quantity level), and the other is based on the relationship between the current moment and the calibration cycle (i.e., the time level). Either of them can trigger the calibration device to perform calibration operations on the adapted electronic control unit.
[0050] At the same time, the calibration process of this embodiment is a continuous cycle process. After one calibration, it will be determined whether the calibration data returned by the adapter electronic control unit meets the preset standards; if not, the next calibration operation will be performed; if it meets, the calibration operation will be stopped.
[0051] The calibration device of this embodiment can measure and calibrate the adaptive electronic control unit while being disconnected from the server. The timing of starting the calibration operation is determined based on the number of measurement data obtained or the relationship between the current moment and the calibration cycle. During the calibration operation on the adaptive electronic control unit, it is continuously adjusted and calibrated until the calibration data obtained meets the preset standards to meet the application scenarios of offline measurement and calibration.
[0052] When the connection with the server is successful, the measurement data and calibration data are uploaded to the server, and when it is detected that the measurement data and calibration data are uploaded successfully, the stored measurement data and calibration data are deleted.
[0053] That is, when the calibration device is connected to the server, it can synchronize its local measurement data and calibration data to the server, and delete the locally stored measurement data and calibration data after the data synchronization is successful, so as to release the local storage space in time to facilitate the storage of subsequent data, thereby improving the storage efficiency of the calibration device itself.
[0054] In another exemplary embodiment of the present application, the origin of the configuration parameters of how to preset the measurement mechanism and the preset calibration mechanism is described in detail. Figure 3 , Figure 3 is based on Figure 2 The exemplary embodiment shown is a flow chart of another calibration method for an adapted electronic control unit. The calibration method is as follows Figure 2 Based on the S210 to S220 shown, S310 to S320 are also included, which are described in detail as follows:
[0055] S310: When the connection with the server is successful, initial configuration parameters are obtained; wherein the initial configuration parameters include sub-parameters of different configuration functions.
[0056] The connection in this embodiment can be a wireless signal connection or a wired connection. The calibration device can only perform bidirectional data transmission when it is successfully connected to the server. The calibration device can obtain initial configuration parameters from the server, which can be parameters sent by the user to the server, including but not limited to sub-parameters of different configuration functions, such as basic configuration parameters, measurement configuration parameters, calibration configuration parameters, etc.
[0057] S320: Perform a verification operation on the initial configuration parameters, and store the sub-parameters of the configuration functions that have been successfully verified respectively, so as to be used for constructing a preset measurement mechanism and a preset calibration mechanism.
[0058] Among them, the sub-parameters of different configuration functions can be used to perform different configuration operations, for example, using the measurement configuration parameters to construct a preset measurement mechanism, and using the calibration configuration parameters to construct a preset calibration mechanism.
[0059] This embodiment can verify the integrity and correctness of the initial configuration parameters, and store the sub-parameters of different configuration functions that have passed the verification in different storage areas for partitioned storage, so as to facilitate the subsequent rapid acquisition of the corresponding sub-parameters from the corresponding storage area, so as to improve the construction efficiency of the corresponding preset mechanism.
[0060] In some embodiments, the verification operation includes integrity verification and correctness verification; S320 further includes S321 to S323, which are described in detail as follows:
[0061] S321: Determine the integrity check value, instruction header information, and payload information corresponding to the initial configuration parameters based on the preset instruction protocol.
[0062] The integrity check value is a value included in the initial configuration parameters, or a value sent by the server when sending the initial configuration parameters. The command header information and payload information are parameters included in the initial configuration parameters.
[0063] An exemplary preset instruction protocol is shown in Table 1 below:
[0064] Table 1: Example of preset command protocol
[0065]
[0066] The initial configuration parameters received by the execution subject of this embodiment can determine the corresponding information according to the preset instruction protocol template. The instruction header information is the relevant information of "Header" in Table 1, and the payload information is the relevant information of "Payloads" in Table 1.
[0067] S322: Calculate a target integrity check value based on the initial configuration parameters and a preset check function, and determine whether the initial configuration parameters pass the integrity check based on the relationship between the target integrity check value and the integrity check value; wherein the integrity check value is a value calculated by the server according to the preset check function.
[0068] The preset verification function is a function used to calculate the integrity verification value. The execution subject and the server side of this embodiment share the same preset verification function. The execution subject of this embodiment determines the corresponding function input value based on part or all of the parameters in the initial configuration parameters, and inputs the preset verification function to calculate the target integrity verification value; compares the value with the integrity verification value sent to the execution subject of this embodiment, and determines whether the initial configuration parameters are complete based on the size comparison result.
[0069] S323: Determine whether the initial configuration parameters pass the correctness check according to the instruction header information and the payload information.
[0070] Data correctness is also an important prerequisite for characterization data analysis. If there are data errors, it will affect the correct establishment of the preset measurement mechanism and the preset calibration mechanism.
[0071] Exemplarily, the relevant information in the instruction header information and the payload information is matched with the corresponding preset information respectively, and the correctness of the initial configuration parameters is determined according to the matching results.
[0072] In another exemplary embodiment, corresponding verification information is generated according to the instruction header information and the payload information, and the verification information is further analyzed to determine whether the initial configuration parameters are correct.
[0073] This embodiment combines the preset instruction protocol with the initial configuration parameters, which can quickly determine whether the initial configuration parameters have data loss or errors during the transmission process, so as to complete the complete verification and correctness verification of the initial configuration parameters. The double verification is used to improve the rigor of the verification operation, making the parameters used to construct the preset measurement mechanism and the preset calibration mechanism more accurate and reliable.
[0074] In another exemplary embodiment, how to perform integrity check is further introduced, that is, the above S322 further includes S3221 to S3222; wherein the preset function is a function for finding the quotient based on a preset polynomial, which is described in detail as follows:
[0075] S3221: Convert the initial configuration parameter into a preset format value, divide the preset format value by a preset polynomial, and use the calculated remainder as the target integrity check value.
[0076] Exemplarily, the initial configuration parameters are converted into a binary string format value g = 101001110100001 (15 bits), and the string is divided by the polynomial g(x) = x^14+x^12+x^9+x^8+X^7+x^5+1 (preset polynomial); wherein the value of the kth bit in g corresponds to the coefficient of x^k in g(x). Multiply g(x) by x^m, that is, add m zeros after g, and then divide it by the m-order polynomial h(x). The binary code r corresponding to the (m-1)-order remainder r(x) is the CRC code (i.e., the integrity check value). h(x) can be freely selected or use the internationally accepted standard. Generally, according to the order m of h(x), the CRC algorithm is called CRC-m, such as CRC-32, CRC-64, etc.
[0077] S3222: If the size relationship indicates that the target integrity check value and the integrity check value are the same, it is determined that the initial configuration parameters pass the integrity check.
[0078] If the initial configuration parameters are complete and no data is missing during the transmission process, the calculated target integrity check value and the integrity check value should be the same, thereby verifying that the initial configuration parameters sent by the server are the same as the initial configuration parameters received by the execution subject of this embodiment.
[0079] In another exemplary embodiment, how to perform correctness verification is further introduced, that is, the above S323 further includes S3231 to S3232, which are described in detail as follows:
[0080] S3231: sum the data length of the direction indication bit recorded in the instruction header information and all the data lengths recorded in the payload information, and compare the calculated sum length with the total data length recorded in the instruction header information.
[0081] As shown in Table 1 above, the Length recorded in the Header is the total length of the data recorded in the instruction header information, which is the data length of the initial configuration parameters recorded by the server before sending the initial configuration parameters, and is used to subsequently verify whether the data is complete.
[0082] The data length of the direction indication bit recorded in the Header is summed with the length of all data recorded in the Payloads to calculate the summed length, which is the actual length representing the initial configuration parameters.
[0083] S3232: If the sum length is the same as the total length of the data, it indicates that the initial configuration parameters have passed the correctness check.
[0084] If the summed length is different from the total length of the data, it indicates that the initial configuration parameters are wrong. For example, if the summed length is greater than the total length of the data, it indicates that the initial configuration parameters may have been tampered with, and other data has been added to the initial configuration parameters. For another example, if the summed length is less than the total length of the data, it indicates that the initial configuration parameters are missing, resulting in a reduction in the data length.
[0085] This embodiment performs a simple sum operation on the data length recorded in the relevant information, and performs a simple size comparison between the sum length and the total length of the data recorded in the sent data information, so as to quickly determine whether the initial configuration parameters pass the correctness check.
[0086] In some embodiments, if the configuration parameters on the server are updated, the calibration device will download the updated configuration parameters in time to synchronously update the locally stored configuration parameters, as described below:
[0087] When the server is successfully connected, if the updated configuration parameters exist in the detection server, the updated configuration parameters are downloaded;
[0088] The updated configuration parameters are verified based on the preset protocol instructions, and the sub-parameters of different configuration functions that have been successfully verified are updated to the corresponding storage area.
[0089] The calibration device can only know whether there are updated configuration parameters in the server when it is successfully connected to the server. When the updated configuration parameters are detected, they are downloaded to the local computer in a timely manner and updated to the corresponding storage area after successful verification.
[0090] In another exemplary embodiment of the present application, how to configure the preset measurement mechanism and the preset calibration mechanism is described in detail. Figure 4 , Figure 4 is based on Figure 3 The exemplary embodiment shown is a flow chart of another calibration method for an adapted electronic control unit. The calibration method is as follows Figure 3 Based on the S310 to S320 shown, S410 to S430 are also included, which are described in detail as follows:
[0091] S410: In response to the wake-up signal, detect whether there are measurement configuration parameters and / or calibration configuration parameters.
[0092] The wake-up signal may be an electrical signal or a wireless signal, that is, a signal that wakes up the calibration device. For example, after the calibration device is powered on, it will initialize the hardware configuration and detect whether the measurement configuration parameters and / or calibration configuration parameters are stored in the local corresponding storage area.
[0093] S420: If there are measurement configuration parameters, the measurement configuration parameters are sent to the adaptation electronic control unit, so that the adaptation electronic control unit constructs a preset measurement mechanism according to the measurement configuration parameters.
[0094] In some embodiments, the calibration device may directly construct a preset measurement mechanism according to the measurement configuration parameters, and send the mechanism to the adapter electronic control unit so that it can collect measurement data according to the mechanism.
[0095] S430: If there are calibration configuration parameters, a preset calibration mechanism is constructed according to the calibration configuration parameters, and a preset standard is determined.
[0096] The preset calibration mechanism includes, but is not limited to, triggering conditions for the calibration operation and preset standards for stopping the calibration, which may be directly derived from the calibration configuration parameters, or may be determined based on the preset calibration mechanism and real-time scene conditions.
[0097] This embodiment further illustrates the method of constructing a preset measurement mechanism and a preset calibration mechanism. The calibration device can construct the corresponding preset mechanism in parallel according to the corresponding configuration parameters stored locally, and can also send the measurement configuration parameters therein to the adaptive electronic control unit so that the adaptive electronic control unit constructs the preset measurement mechanism according to the measurement configuration parameters.
[0098] In another exemplary embodiment of the present application, the application scenarios of the above-mentioned multiple calibration methods are exemplarily described. Figure 5 , Figure 5 It is a schematic diagram of an application scenario of a calibration method shown in an exemplary embodiment of the present application. It includes a vehicle end 100, a calibration device 200 and a server 300. The vehicle end 100 and the calibration device 200 are connected via a CAN bus, and data can be transmitted via the CCP protocol. The server 300 can be a server of a PC host computer (which is connected to the calibration device 200 via USB), or a cloud server (which is connected to the calibration device 200 via 4G / 5G / WIFI / BLE), and the connection module in the calibration device 200 is used to connect to the corresponding server.
[0099] The calibration device 200 can measure and calibrate the vehicle-adapted electronic control unit in an offline state with the server 300 based on the CCP protocol, and supports dynamic analysis of measurement parameters, and adjusts the calibration value and dynamically starts the measurement mechanism according to the parameters (the CANRX / TX engine in the calibration device 200 coordinates with the CCP protocol module). At the same time, in order to improve the data processing capability, a large-capacity local storage area is also set up, which can record a large amount of measurement data and calibration data (offline storage module in the calibration device 200), support long-term data collection and analysis, thereby reducing network dependence (reducing network maintenance and data traffic costs) and reducing manual intervention (reducing labor costs and improving overall operational efficiency). At the same time, in order to support multiple uplink channel connection methods (wired or wireless mode connection), this method defines a set of general communication protocols (communication protocol unified processing module in the calibration device 200) for data synchronization with the server 300 (PC or cloud). CCP measurement and calibration offline configuration module in the calibration device 200
[0100] See also Figure 6 , Figure 6 It is a schematic diagram of the initial configuration process of the calibration device shown in an exemplary embodiment of the present application. Start the calibration device 200, which will perform system initialization operations to initialize all necessary hardware interfaces and network connections. The calibration device 200 obtains the corresponding initial configuration parameters from the server 300 (the initial configuration parameters in the server 300 may be entered by the calibration engineer), and the communication protocol unified processing module verifies the integrity and correctness of the initial configuration parameters based on the preset protocol instructions, and submits the successfully verified configuration parameters to the CCP measurement and calibration offline configuration module for classification to be stored in different storage areas, so as to facilitate the calibration device 200 to quickly load the corresponding configuration parameters from the corresponding storage area after restarting, so as to ensure the persistence of the configuration.
[0101] The calibration device 200 will use the CAN bus active packet receiving mechanism to determine whether each electronic control unit in the vehicle end 100 is connected normally. In each CAN bus interrupt packet receiving interface, the received message statistics (CANRX / TX engine in the calibration device 200) are added to detect whether it is in a changed state within a preset time length. The specific method is: detect whether the number of messages received by each electronic control unit on the vehicle end changes within a preset time length; the electronic control unit with a changed number of messages is used as an adaptive electronic control unit. Among them, the preset time length is adaptively configured according to the actual scenario.
[0102] The CCP protocol module in the calibration device 200 loads the corresponding measurement configuration and calibration configuration parameters, establishes a communication connection with the adapter electronic control unit based on the CCP protocol, and performs offline measurement control and configuration process. Sending CCP protocol CRO messages can configure the measurement parameters of the adapter electronic control unit (including measurement cycle duration, measurement element logical address, measurement element length and other information), also known as DAQ function, and ensure that all necessary parameters have been correctly configured to the adapter electronic control unit so that it can build a preset measurement mechanism and collect corresponding measurement data.
[0103] When disconnected from the server 300, the calibration device 200 obtains the measurement data of the adapted electronic control unit in real time; if the number of measurement data reaches the preset number or the current moment is within the calibration cycle, the calibration operation is performed on the adapted electronic control unit based on the preset calibration mechanism until the obtained calibration data meets the preset standard. Among them, the offline storage module in the calibration device 200 can record the corresponding measurement data and calibration data in real time, and store them in the corresponding storage space to form a complete data log. After the calibration device 200 is connected to the server 300, data synchronization is performed, and after the data synchronization is completed, the data stored in the storage space is immediately deleted to improve the utilization of the storage space.
[0104] This application improves the reliability of the measurement and calibration process, and can perform offline measurement and calibration, and can be applied to remote or unstable network scenarios. At the same time, the local storage function of the calibration device ensures the persistence of data and enhances the security and data integrity of the system. It shows significant advantages in the measurement and calibration process of vehicle parts, improves the reliability, flexibility and efficiency of the system, greatly reduces operating and maintenance costs, and has broad application prospects and market value.
[0105] Another aspect of the present application also provides a calibration device adapted to an electronic control unit, such as Figure 7 As shown, Figure 7 1 is a schematic diagram of a calibration device for an electronic control unit according to an exemplary embodiment of the present application. The calibration device 700 includes:
[0106] The acquisition module 710 is used to obtain measurement data when the connection with the server is disconnected; wherein the measurement data is data measured by the adaptation electronic control unit according to a preset measurement mechanism, and the preset measurement mechanism is a mechanism sent to the adaptation electronic control unit, or a mechanism constructed by the adaptation electronic control unit according to the received configuration parameters.
[0107] The calibration module 730 is used to perform calibration operations on the adapted electronic control unit based on a preset calibration mechanism to meet preset standards if the amount of measurement data reaches a preset amount and / or the current moment is within a calibration period.
[0108] In another exemplary embodiment, the calibration device 700 further includes:
[0109] The download module is used to obtain initial configuration parameters when the server is successfully connected; wherein the initial configuration parameters include sub-parameters of different configuration functions.
[0110] The verification module is used to verify the initial configuration parameters and store the sub-parameters of the configuration functions that have been successfully verified respectively, so as to be used to construct a preset measurement mechanism and a preset calibration mechanism.
[0111] In another exemplary embodiment, the verification operation includes an integrity check and a correctness check; the verification module further includes:
[0112] The information determination unit is used to determine the integrity check value, instruction header information, and payload information corresponding to the initial configuration parameters based on a preset instruction protocol.
[0113] A calculation unit is used to calculate a target integrity check value according to the initial configuration parameters and a preset check function, and determine whether the initial configuration parameters pass the integrity check according to the size relationship between the target integrity check value and the integrity check value; wherein the integrity check value is a value calculated by the server according to the preset check function.
[0114] The correctness verification unit is used to determine whether the initial configuration parameters pass the correctness check based on the instruction header information and the payload information.
[0115] In another exemplary embodiment, the preset function is a function for finding a quotient based on a preset polynomial; and the calculation unit further includes:
[0116] The first calculation module is used to convert the initial configuration parameter into a preset format value, divide the preset format value by a preset polynomial, and use the calculated remainder as a target integrity check value.
[0117] The integrity check section is used to determine that the initial configuration parameters have passed the integrity check if the size relationship represents that the target integrity check value and the integrity check value are the same.
[0118] In another exemplary embodiment, the correctness verification further comprises:
[0119] The second calculation module is used to sum the data length of the direction indication bit recorded in the instruction header information and all the data lengths recorded in the payload information, and compare the calculated sum length with the total length of the data recorded in the instruction header information;
[0120] The correctness check section is used to indicate that the initial configuration parameters have passed the correctness check if the sum length is the same as the total length of the data.
[0121] In another exemplary embodiment, the sub-parameters of different configuration functions that are successfully verified include measurement configuration parameters and calibration configuration parameters; the calibration device 700 further includes:
[0122] The detection module is used to detect whether there are measurement configuration parameters and / or calibration configuration parameters in response to the wake-up signal.
[0123] The first construction module is used to send the measurement configuration parameters to the adaptation electronic control unit if there are any, so that the adaptation electronic control unit constructs a preset measurement mechanism according to the measurement configuration parameters.
[0124] The second construction module is used to construct a preset calibration mechanism according to the calibration configuration parameters if there are any calibration configuration parameters, and determine the preset standard.
[0125] In another exemplary embodiment, the calibration device 700 further includes:
[0126] The update detection module is used to download the updated configuration parameters if the updated configuration parameters exist in the server when the connection with the server is successful.
[0127] The update verification module is used to verify the updated configuration parameters and update the sub-parameters of different configuration functions that have been successfully verified to the corresponding storage area.
[0128] In another exemplary embodiment, the calibration device 700 further includes:
[0129] The synchronization module is used to upload the measurement data and calibration data to the server when the server is successfully connected, and delete the stored measurement data and calibration data when it is detected that the measurement data and calibration data are successfully uploaded.
[0130] In another exemplary embodiment, the calibration device 700 further includes:
[0131] The information detection module is used to detect whether the number of messages received by each electronic control unit on the vehicle side changes within a preset time period.
[0132] The determination module is used to take the electronic control unit with a changed number of messages as an adapted electronic control unit.
[0133] The calibration device of the calibration apparatus of the present application can measure and calibrate the adaptive electronic control unit while being disconnected from the server side. The timing of starting the calibration operation is determined based on the number of measurement data obtained or the relationship between the current moment and the calibration cycle. During the calibration operation on the adaptive electronic control unit, it is continuously adjusted and calibrated until the calibration data obtained meets the preset standards to meet the application scenarios of offline measurement and calibration.
[0134] It should be noted that the calibration device provided in the above embodiment and the calibration method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0135] Another aspect of the present application provides an electronic device, including: a controller; a memory for storing one or more programs, and when the one or more programs are executed by the controller, the above-mentioned calibration method is executed.
[0136] See also Figure 8 , Figure 8 1 is a schematic diagram of the structure of a computer system of an electronic device shown in an exemplary embodiment of the present application, which shows a schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application.
[0137] It should be noted that Figure 8 The computer system 800 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0138] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803, such as executing the method in the above embodiment. In the RAM 803, various programs and data required for system operation are also stored. The CPU 801, ROM 802 and RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0139] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read therefrom is installed into the storage section 808 as needed.
[0140] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 809, and / or installed from a removable medium 811. When the computer program is executed by a central processing unit (CPU) 801, various functions defined in the system of the present application are executed.
[0141] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0142] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0143] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0144] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the calibration method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0145] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the calibration method provided in each of the above embodiments.
[0146] According to one aspect of an embodiment of the present application, a computer system is also provided, including a central processing unit (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage portion into a random access memory (RAM), such as executing the method in the above embodiment. In RAM, various programs and data required for system operation are also stored. CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0147] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0148] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A calibration method for an adapted electronic control unit, characterized in that: Applied to calibration equipment, the calibration method includes: Acquire measurement data in a state of being disconnected from the server; wherein the measurement data is data measured by the adaptation electronic control unit according to a preset measurement mechanism, and the preset measurement mechanism is a mechanism sent to the adaptation electronic control unit, or a mechanism constructed by the adaptation electronic control unit according to received configuration parameters; If the amount of the measurement data reaches a preset amount and / or the current moment is within a calibration period, a calibration operation is performed on the adaptation electronic control unit based on a preset calibration mechanism to meet a preset standard.
2. The calibration method according to claim 1, characterized in that: The calibration method further comprises: When the connection with the server is successful, initial configuration parameters are obtained; wherein the initial configuration parameters include sub-parameters of different configuration functions; A verification operation is performed on the initial configuration parameters, and sub-parameters of the configuration functions that have been successfully verified are stored separately for use in constructing the preset measurement mechanism and the preset calibration mechanism.
3. The calibration method according to claim 2, characterized in that: The verification operation includes integrity verification and correctness verification; The verifying operation on the initial configuration parameters further comprises: Determine the integrity check value, instruction header information, and payload information corresponding to the initial configuration parameters based on a preset instruction protocol; Calculate a target integrity check value according to the initial configuration parameters and a preset check function, and determine whether the initial configuration parameters pass the integrity check according to the size relationship between the target integrity check value and the integrity check value; wherein the integrity check value is a value calculated by the server according to the preset check function; Determine whether the initial configuration parameters pass the correctness check according to the instruction header information and the payload information.
4. The calibration method according to claim 3, characterized in that: The preset function is a function for finding a quotient based on a preset polynomial; and the target integrity check value is calculated based on the initial configuration parameters and the preset check function, further comprising: Converting the initial configuration parameter into a preset format value, dividing the preset format value by the preset polynomial, and using the calculated remainder as a target integrity check value; The determining, based on the magnitude relationship between the target integrity check value and the integrity check value, whether the initial configuration parameter passes the integrity check further includes: If the size relationship indicates that the target integrity check value is the same as the integrity check value, it is determined that the initial configuration parameters pass the integrity check.
5. The calibration method according to claim 3, characterized in that: The determining, according to the instruction header information and the payload information, whether the initial configuration parameters pass the correctness check further includes: The data length of the direction indication bit recorded in the instruction header information is summed with the length of all data recorded in the payload information, and the calculated summed length is compared with the total length of the data recorded in the instruction header information; If the sum length is the same as the total length of the data, it indicates that the initial configuration parameters pass the correctness check.
6. The calibration method according to claim 2, characterized in that: The sub-parameters of different configuration functions that have been successfully verified include measurement configuration parameters and calibration configuration parameters; the calibration method also includes: In response to the wake-up signal, detecting whether the measurement configuration parameter and / or the calibration configuration parameter exists; If the measurement configuration parameter exists, the measurement configuration parameter is sent to the adaptation electronic control unit, so that the adaptation electronic control unit constructs the preset measurement mechanism according to the measurement configuration parameter; If the calibration configuration parameters exist, the preset calibration mechanism is constructed according to the calibration configuration parameters, and the preset standard is determined.
7. The calibration method according to claim 2, characterized in that: The calibration method further comprises: In a state where the connection with the server is successful, if it is detected that the server has updated configuration parameters, downloading the updated configuration parameters; A verification operation is performed on the updated configuration parameters, and sub-parameters of different configuration functions that have been successfully verified are updated to corresponding storage areas.
8. A calibration device adapted for an electronic control unit, characterized in that: The calibration device comprises: An acquisition module, used to acquire measurement data in a state of being disconnected from the server; wherein the measurement data is data measured by the adaptation electronic control unit according to a preset measurement mechanism, and the preset measurement mechanism is a mechanism sent to the adaptation electronic control unit, or a mechanism constructed by the adaptation electronic control unit according to received configuration parameters; The calibration module is used to perform a calibration operation on the adaptation electronic control unit based on a preset calibration mechanism to meet a preset standard if the amount of the measurement data reaches a preset amount and / or the current moment is within a calibration period.
9. An electronic device, characterized in that: include: Controller; A memory for storing one or more programs, which, when executed by the controller, enables the controller to implement the calibration method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the calibration method according to any one of claims 1 to 7.
