CN113157388A - Automatic calibration method and system for instrument parameters - Google Patents

Automatic calibration method and system for instrument parameters Download PDF

Info

Publication number
CN113157388A
CN113157388A CN202110362621.4A CN202110362621A CN113157388A CN 113157388 A CN113157388 A CN 113157388A CN 202110362621 A CN202110362621 A CN 202110362621A CN 113157388 A CN113157388 A CN 113157388A
Authority
CN
China
Prior art keywords
instrument
upper computer
parameters
calibration
library file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110362621.4A
Other languages
Chinese (zh)
Inventor
张名列
何银山
耿向阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dongfeng Electric Drive Systems Co Ltd
Original Assignee
Dongfeng Electric Drive Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongfeng Electric Drive Systems Co Ltd filed Critical Dongfeng Electric Drive Systems Co Ltd
Priority to CN202110362621.4A priority Critical patent/CN113157388A/en
Publication of CN113157388A publication Critical patent/CN113157388A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45508Runtime interpretation or emulation, e g. emulator loops, bytecode interpretation
    • G06F9/45512Command shells
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Computational Linguistics (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides an automatic calibration method and system for instrument parameters, wherein the method comprises the following steps: compiling an encryption and decryption algorithm for communication between the upper computer and the instrument, generating a dynamic link library file and then importing the dynamic link library file into Valuecan; establishing UDS diagnostic protocol service, establishing a service parameter list, forming a UDS diagnostic library file, and importing the UDS diagnostic library file into a database under a specified directory; and importing a dynamic library link file for safe access, calling a UDS diagnostic library file and calibrating and reading instrument parameters through a function block function. By the scheme, batch automatic calibration of instrument parameters can be realized, the development period is shortened, the efficiency is improved, and the error risk caused by manual calibration value input can be reduced.

Description

Automatic calibration method and system for instrument parameters
Technical Field
The invention relates to the field of automobile instruments, in particular to an automatic instrument parameter calibration method and system.
Background
The vehicle instrument generally needs to be calibrated in parameters before leaving a factory, but a production line does not have corresponding calibration equipment, coordination equipment has certain difficulty, and the production line urgently needs automatic calibration software. The development period of a general software project is long, developers are few, a project team can be just built, a production line needs manual calibration, the efficiency is low, manual operation has error risks, and an upper computer for simulating calibration equipment to perform parameter calibration needs to be developed in a short time to solve the problem.
Disclosure of Invention
In view of this, the embodiment of the invention provides an automatic calibration method and system for instrument parameters, so as to solve the problems of long development period, low production line calibration efficiency and error risk of the existing software.
In a first aspect of the embodiments of the present invention, there is provided an instrument parameter automatic calibration method, including:
compiling an encryption and decryption algorithm for communication between the upper computer and the instrument, generating a dynamic link library file and then importing the dynamic link library file into Valuecan;
establishing UDS diagnostic protocol service, establishing a service parameter list, forming a UDS diagnostic library file, and importing the UDS diagnostic library file into a database under a specified directory;
and calling a UDS diagnostic protocol through a function block function to realize the calibration and reading of the instrument parameters.
In a second aspect of the embodiments of the present invention, there is provided a system for automatic calibration of instrument parameters, including:
the import module is used for compiling an encryption and decryption algorithm of the communication between the upper computer and the instrument, generating a dynamic link library file and importing the dynamic link library file into Valuecan;
the building module is used for building a UDS diagnostic protocol service, building a service parameter list, forming a UDS diagnostic library file and then importing the UDS diagnostic library file into a database specified directory;
and the parameter calibration and reading module is used for calling the UDS diagnostic protocol through the functional block function to realize the calibration and reading of the instrument parameters.
In a third aspect of the embodiments of the present invention, there is provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the method according to the first aspect of the embodiments of the present invention.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method provided in the first aspect of the embodiments of the present invention.
In the embodiment of the invention, the script development upper computer is compiled, so that batch automatic calibration of different parameter sets of different projects is realized, the project development period is shortened, the production efficiency is improved, meanwhile, the batch calibration of a production line is facilitated, and the error risk caused by manual input is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart of a method for automatically calibrating a parameter of an instrument according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a calibration process for a parameter of an instrument according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a reading process of a meter parameter according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons skilled in the art without any inventive work shall fall within the protection scope of the present invention, and the principle and features of the present invention shall be described below with reference to the accompanying drawings.
The terms "comprises" and "comprising," when used in this specification and claims, and in the accompanying drawings and figures, are intended to cover non-exclusive inclusions, such that a process, method or system, or apparatus that comprises a list of steps or elements is not limited to the listed steps or elements.
Referring to fig. 1, fig. 1 is a schematic flow chart of an automatic calibration method for an instrument parameter according to an embodiment of the present invention, including:
s101, compiling an encryption and decryption algorithm for communication between an upper computer and an instrument, generating a dynamic link library file and then importing the dynamic link library file into Valuecan;
the encryption algorithm is used for processing plaintext data to enable the plaintext data to become unreadable ciphertext, the decryption algorithm is used for processing the ciphertext data to enable the ciphertext data to become readable plaintext, and the encryption and decryption algorithm is common communication encryption and decryption algorithms such as SHA and DES. The encryption and decryption processes are realized by writing codes, and dll files, namely dynamic link libraries, are generated.
The Valuecan is an interface for converting Can data into USB and is used for realizing the connection between the upper computer and the instrument. By creating an encryption and decryption algorithm, generating a dll file, importing the dll file into a Valuecan specified directory, and calling the dll file, the safe access of an upper computer to the instrument can be realized.
S102, establishing a UDS diagnostic protocol service, establishing a service parameter list, forming a UDS diagnostic library file, and importing the UDS diagnostic library file into a database under a specified directory;
UDS (Unified Diagnostic Service) is a standardized standard for vehicle Diagnostic Service, and can send a message defined based on UDS to an ECU, access a failure memory of each control unit, update a firmware program, and the like. The calibration and reading of the instrument parameters can be realized based on the UDS diagnostic service.
And S103, calling a UDS diagnostic protocol through the function block function to realize the calibration and reading of the instrument parameters.
And importing a dynamic library link file for safe access, and calling a UDS diagnostic protocol and a parameter list through a function block function to realize an instrument parameter calibration flow and a reading flow. Specifically, calibration and reading of instrument parameters are realized through simulation of a Valuecan-based script writing, a UDS related protocol is established, a script is written based on a Function block Function of Valuecan, parameters are set, and the UDS protocol is called to realize calibration and reading of the parameters.
Wherein, before parameter calibration, safety verification is required to be carried out:
the upper computer sends a connection request to the instrument, the instrument responds to the connection request, the upper computer requests seeds for the instrument, the instrument replies the seeds, the upper computer calculates keys according to the received seeds through an encryption algorithm and sends the keys to the instrument, the instrument receives the keys sent by the upper computer, obtains a corresponding plaintext through a decryption algorithm, and the plaintext obtained through decryption is compared with the seeds;
if the comparison is correct, the instrument makes a positive response to indicate that the safe access passes, the upper computer can calibrate the parameters of the instrument, and if the comparison is incorrect, the instrument makes a negative response to indicate that the safe access does not pass, and the calibration of the parameters of the instrument is not allowed.
Further, after the security access successfully passes:
the upper computer requests the instrument to calibrate the parameters, and the upper computer receives the positive or negative response of the instrument and indicates the success or failure of parameter calibration;
correspondingly, the upper computer requests the instrument to read the parameters, and the upper computer receives the positive or negative response of the instrument and indicates that the parameter reading is successful or failed.
For example, as shown in fig. 2, the upper computer sets parameters to invoke the relevant UDS protocol for calibration, the meter replies a positive or negative response, and if the response is negative (N), the calibration parameters fail; if the answer is positive (Y), all the parameters are reset after calibration is completed.
As shown in fig. 3, the upper computer sets parameters to call the relevant UDS protocol to read, the meter replies a positive or negative response, and if the response is negative (N), the reading of the parameters fails; if the answer is positive (Y), all corresponding parameters are read.
By the method provided by the embodiment, batch automatic calibration of different parameter sets of different projects can be realized, the production efficiency is high, and errors caused by manual operation can be reduced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In another embodiment of the present invention, there is provided a system for automated calibration of instrument parameters, comprising:
the import module is used for compiling an encryption and decryption algorithm of the communication between the upper computer and the instrument, generating a dynamic link library file and importing the dynamic link library file into Valuecan;
the building module is used for building a UDS diagnostic protocol service, building a service parameter list, forming a UDS diagnostic library file and then importing the UDS diagnostic library file into a database specified directory;
and the parameter calibration and reading module is used for calling a UDS diagnostic protocol through the function block function to realize the calibration and reading of the instrument parameters.
The method for calibrating and reading the instrument parameters by calling the UDS diagnostic protocol through the function block function further comprises the following steps:
the upper computer sends a connection request to the instrument, the instrument responds to the connection request, the upper computer requests seeds for the instrument, the instrument replies the seeds, the upper computer calculates keys according to the received seeds through an encryption algorithm and sends the keys to the instrument, the instrument receives the keys sent by the upper computer, obtains a corresponding plaintext through a decryption algorithm, and the plaintext obtained through decryption is compared with the seeds;
if the comparison is correct, the instrument makes a positive response to indicate that the safe access passes, the upper computer can calibrate the parameters of the instrument, and if the comparison is incorrect, the instrument makes a negative response to indicate that the safe access does not pass, and the calibration of the parameters of the instrument is not allowed.
Optionally, the upper computer requests the instrument to perform parameter calibration, and the upper computer receives an instrument positive or negative response to indicate that the parameter calibration is successful or failed; correspondingly, the upper computer requests the instrument to read the parameters, and the upper computer receives the positive or negative response of the instrument and indicates that the parameter reading is successful or failed.
It is understood that in one embodiment, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program performs the steps S101 to S103 in the first embodiment, and the processor implements the automatic labeling and reading of the meter parameters when executing the computer program.
Those skilled in the art will appreciate that all or part of the steps in the method according to the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, such as ROM/RAM.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. An automatic calibration method for instrument parameters is characterized by comprising the following steps:
compiling an encryption and decryption algorithm for communication between the upper computer and the instrument, generating a dynamic link library file and then importing the dynamic link library file into Valuecan;
establishing UDS diagnostic protocol service, establishing a service parameter list, forming a UDS diagnostic library file, and importing the UDS diagnostic library file into a database under a specified directory;
and calling a UDS diagnostic protocol through a function block function to realize the calibration and reading of the instrument parameters.
2. The method of claim 1, wherein said invoking the UDS diagnostic protocol via a function block function to achieve calibration and reading of instrument parameters further comprises:
the upper computer sends a connection request to the instrument, the instrument responds to the connection request, the upper computer requests seeds for the instrument, the instrument replies the seeds, the upper computer calculates keys according to the received seeds through an encryption algorithm and sends the keys to the instrument, the instrument receives the keys sent by the upper computer, obtains a corresponding plaintext through a decryption algorithm, and the plaintext obtained through decryption is compared with the seeds;
if the comparison is correct, the instrument makes a positive response to indicate that the safe access passes, the upper computer can calibrate the parameters of the instrument, and if the comparison is incorrect, the instrument makes a negative response to indicate that the safe access does not pass, and the calibration of the parameters of the instrument is not allowed.
3. The method of claim 2, wherein a positive response by the meter indicating a security access pass, the upper computer operable to calibrate the meter parameters further comprises:
the upper computer requests the instrument to calibrate the parameters, and the upper computer receives the positive or negative response of the instrument and indicates the success or failure of parameter calibration;
correspondingly, the upper computer requests the instrument to read the parameters, and the upper computer receives the positive or negative response of the instrument and indicates that the parameter reading is successful or failed.
4. A system for automated calibration of instrument parameters, comprising:
the import module is used for compiling an encryption and decryption algorithm of the communication between the upper computer and the instrument, generating a dynamic link library file and importing the dynamic link library file into Valuecan;
the building module is used for building a UDS diagnostic protocol service, building a service parameter list, forming a UDS diagnostic library file and then importing the UDS diagnostic library file into a database specified directory;
and the parameter calibration and reading module is used for calling the UDS diagnostic protocol through the functional block function to realize the calibration and reading of the instrument parameters.
5. The system of claim 4, wherein said invoking the UDS diagnostic protocol by the functional block function to achieve calibration and reading of instrument parameters further comprises:
the upper computer sends a connection request to the instrument, the instrument responds to the connection request, the upper computer requests seeds for the instrument, the instrument replies the seeds, the upper computer calculates keys according to the received seeds through an encryption algorithm and sends the keys to the instrument, the instrument receives the keys sent by the upper computer, obtains a corresponding plaintext through a decryption algorithm, and the plaintext obtained through decryption is compared with the seeds;
if the comparison is correct, the instrument makes a positive response to indicate that the safe access passes, the upper computer can calibrate the parameters of the instrument, and if the comparison is incorrect, the instrument makes a negative response to indicate that the safe access does not pass, and the calibration of the parameters of the instrument is not allowed.
6. The system of claim 5, wherein a positive response by the meter indicating a secure access pass, the upper computer operable to calibrate the meter parameter further comprises:
the upper computer requests the instrument to calibrate the parameters, and the upper computer receives the positive or negative response of the instrument and indicates the success or failure of parameter calibration;
correspondingly, the upper computer requests the instrument to read the parameters, and the upper computer receives the positive or negative response of the instrument and indicates that the parameter reading is successful or failed.
7. An electronic device comprising a processor, a memory and a computer program stored in the memory and running on the processor, wherein the steps of the method for automatic calibration of a parameter of a meter according to any one of claims 1 to 3 are implemented when the computer program is executed by the processor.
8. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of a method for automated calibration of a parameter of a meter according to any one of claims 1 to 3.
CN202110362621.4A 2021-04-02 2021-04-02 Automatic calibration method and system for instrument parameters Pending CN113157388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110362621.4A CN113157388A (en) 2021-04-02 2021-04-02 Automatic calibration method and system for instrument parameters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110362621.4A CN113157388A (en) 2021-04-02 2021-04-02 Automatic calibration method and system for instrument parameters

Publications (1)

Publication Number Publication Date
CN113157388A true CN113157388A (en) 2021-07-23

Family

ID=76886417

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110362621.4A Pending CN113157388A (en) 2021-04-02 2021-04-02 Automatic calibration method and system for instrument parameters

Country Status (1)

Country Link
CN (1) CN113157388A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590084A (en) * 2021-08-02 2021-11-02 元贯汽车技术(上海)有限公司 Modular UDS diagnosis service method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647031A (en) * 2018-01-26 2018-10-12 上海仪电汽车电子***有限公司 Automobile instrument writes with a brush dipped in Chinese ink method and host computer online
CN111581657A (en) * 2020-05-11 2020-08-25 南京协和电子科技有限公司 Data encryption method for upgrading automobile instrument software
CN111572676A (en) * 2020-04-19 2020-08-25 东风汽车股份有限公司 Vehicle instrument configuration parameter calibration method
CN112327796A (en) * 2020-10-21 2021-02-05 诚迈科技(南京)股份有限公司 Control method and electronic control unit for automobile diagnosis service

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108647031A (en) * 2018-01-26 2018-10-12 上海仪电汽车电子***有限公司 Automobile instrument writes with a brush dipped in Chinese ink method and host computer online
CN111572676A (en) * 2020-04-19 2020-08-25 东风汽车股份有限公司 Vehicle instrument configuration parameter calibration method
CN111581657A (en) * 2020-05-11 2020-08-25 南京协和电子科技有限公司 Data encryption method for upgrading automobile instrument software
CN112327796A (en) * 2020-10-21 2021-02-05 诚迈科技(南京)股份有限公司 Control method and electronic control unit for automobile diagnosis service

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590084A (en) * 2021-08-02 2021-11-02 元贯汽车技术(上海)有限公司 Modular UDS diagnosis service method, device and system

Similar Documents

Publication Publication Date Title
CN101088071B (en) Method and device for secure parameterization of electronic devices
CN110275916B (en) Data operation record storage method, system, device and equipment
CN111290742A (en) Parameter verification method and device, electronic equipment and readable storage medium
CN111309506A (en) Method, equipment, server and readable storage medium for positioning compiling errors
CN112100078A (en) Method, device and equipment for generating interface test case
CN109344074B (en) Cross-platform automatic testing method and system
CN110908702A (en) Version switching method, version switching device, computer equipment and storage medium
US20100312541A1 (en) Program test device and program
CN112817935A (en) Data processing method, device and equipment based on field type and storage medium
CN105045671B (en) The method for upgrading system and device of a kind of intelligent terminal
CN114237960A (en) Prompting method and device for abnormal information, electronic equipment and storage medium
CN110737548B (en) Data request method and server
CN113157388A (en) Automatic calibration method and system for instrument parameters
CN114895935A (en) Method and device for flashing vehicle ECU, electronic equipment and storage medium
CN112699648B (en) Data processing method and device
CN111427582A (en) Management method, device and equipment of RT L code and computer readable storage medium
CN112686019A (en) Vehicle sensor data analysis method, device and storage medium
CN111752601A (en) Data configuration method, device and system, electronic equipment and storage medium thereof
CN110968841B (en) Activation method, device and system of programmable logic controller
CN115688120A (en) Secure chip firmware importing method, secure chip and computer readable storage medium
CN115495363A (en) Software testing method, electronic equipment and readable storage medium
CN109284128B (en) Method, device, storage medium and mobile terminal for converting data
CN111475400A (en) Verification method of service platform and related equipment
CN110990248A (en) Interface case test system, method, computer device and storage medium
CN117631655B (en) Secure communication method, apparatus, device and storage medium for vehicle diagnosis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination