Burning method and device and storage medium
By preprocessing and service adaptation of the original files, and using unified diagnostic services to generate service configuration files, the general firing of car companies' firmware is realized, the problems of high development costs and long cycles in the existing technology are solved, and efficient Low-cost burning solution.
Patent Information
- Application Number
- CN202411214657.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-03
AI Technical Summary
The existing technology is difficult to meet the firmware burning needs of different car companies efficiently and at low cost, resulting in high development costs and cycles.
By preprocessing the original file, the files to be burned are generated, and the service adaptation is carried out based on unified diagnostic services and user instructions, the service configuration files are generated, and the firmware is burned into the vehicle equipment using the general burning platform to realize general burning.
There is no need to frequently develop a burning platform, which saves development costs and cycles, and meets the burning needs of different car companies efficiently and at low cost, achieving the flexibility and scalability of general burning.
Smart Images

Figure CN119248307A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a burning method, device and storage medium. Background Art
[0002] With the continuous development of vehicle and information technology, more and more devices on vehicles need to be updated, and one of the common ways to update functions is firmware burning. Firmware burning is to burn the firmware program into the device. In related technologies, as many car companies actively invest in the research and development of vehicle functions, how to efficiently and cost-effectively meet the burning needs of different car companies has become an urgent problem to be solved. Summary of the invention
[0003] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, a burning method, device and storage medium of the present application can realize universal burning, without the need to frequently develop burning platforms for the burning needs of different users or projects, saving development costs and development cycles, and efficiently and low-costly meeting the burning needs of different car companies.
[0004] In a first aspect, the present application provides a burning method, comprising:
[0005] Preprocess the original file to generate the file to be burned;
[0006] Perform service adaptation based on unified diagnostic services and user instructions to obtain a service configuration file;
[0007] Based on the file to be burned and the service configuration file, the burning device is burned.
[0008] In some embodiments, the preprocessing of the original file includes at least one of the following:
[0009] In response to the completion instruction, the original file is completed;
[0010] In response to the verification instruction, determining a verification code and adding it to the original file;
[0011] In response to the first encryption instruction, encrypting the original file;
[0012] In response to the signing instruction, appending a digital signature to the original document;
[0013] In response to the extension instruction, the extended function is added to the original file.
[0014] In some embodiments, the service adaptation based on the unified diagnostic service and the user instruction includes at least one of the following:
[0015] In response to the service sending an encryption instruction, a mapping relationship between the encryption algorithm and the service is established;
[0016] In response to the service reply decryption instruction, a mapping relationship between the decryption algorithm and the service is established;
[0017] Adapt the context of the service;
[0018] Adapt service timeout parameters.
[0019] In some embodiments, before the burning device is burned, the method further includes:
[0020] In response to the instruction to configure encryption and decryption algorithms, display the preset cryptographic algorithms;
[0021] In response to an instruction to select a cryptographic algorithm, the selected cryptographic algorithm is loaded to obtain a cryptographic algorithm file;
[0022] In response to the instruction of extending the cryptographic algorithm, the extended cryptographic algorithm is generated into a DLL file to obtain a cryptographic algorithm file;
[0023] A compressed package file is generated based on the file to be burned, the service configuration file and the cryptographic algorithm file.
[0024] In some embodiments, the step of burning the burning device based on the file to be burned and the service configuration file includes:
[0025] Get the service configuration file;
[0026] Read services from the obtained service configuration file in a preset order and send corresponding service data;
[0027] When response data in response to the service data is received, the response data is stored or displayed.
[0028] In some embodiments, the step of burning the burning device based on the file to be burned and the service configuration file further includes:
[0029] If no response data in response to the service data is received and there is a timeout error, performing timeout error processing;
[0030] If response data in response to the service data is not received and there is no timeout error, a negative response process is performed.
[0031] In some embodiments, the sending corresponding service data includes:
[0032] When the read service needs to be encrypted, the service data to be sent is encrypted and the encrypted service data is sent.
[0033] In some embodiments, upon receiving response data in response to the service data, storing or displaying the response data comprises:
[0034] When receiving response data in response to the service data and when it is determined that decryption is required, decrypting the response data;
[0035] The decrypted response data is stored or displayed.
[0036] In some embodiments, the burning method further includes:
[0037] In response to the instruction to select a communication protocol, the communication protocol selected by the user is used as the target communication protocol; wherein the communication protocol includes: a CAN bus communication protocol and an Ethernet communication protocol.
[0038] In a second aspect, the present application provides a burning device, comprising:
[0039] A preprocessing unit, used to preprocess the original file to generate a file to be burned;
[0040] An adaptation unit, used to perform service adaptation based on the unified diagnostic service and user instructions to obtain a service configuration file;
[0041] The burning unit is used to burn the burning device based on the file to be burned and the service configuration file.
[0042] In a third aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the above is implemented.
[0043] The burning method provided by the present application generates a file to be burned by preprocessing the original file; performs service adaptation based on a unified diagnostic service and user instructions to obtain a service configuration file; and burns a burning device based on the file to be burned and the service configuration file. In this way, a universal burning platform can be used to generate a file to be burned, a service configuration file can be generated based on user instructions, and the firmware can be burned into a vehicle device, thereby realizing universal burning. There is no need to frequently develop a burning platform for the burning needs of different users or projects, which saves development costs and development cycles, and can efficiently and cost-effectively meet the burning needs of different automobile companies.
[0044] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1is a flowchart of a burning method provided by an exemplary embodiment;
[0046] Figure 2 is a flowchart of a burning method provided by another exemplary embodiment;
[0047] Figure 3 is a flowchart of a burning method provided by another exemplary embodiment;
[0048] Figure 4 is a flowchart of a burning method provided by yet another exemplary embodiment;
[0049] Figure 5 It is a schematic diagram of the structure of a burning device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0050] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0051] This embodiment provides a burning method, which can use a general burning platform to generate files to be burned, generate service configuration files based on user instructions, and burn firmware into vehicle equipment, thereby eliminating the need to frequently develop burning platforms for burning needs of different users or projects, saving development costs and development cycles, and being able to efficiently and cost-effectively meet the burning needs of different car companies.
[0052] The implementation process of the burning method of the embodiment of the present application is described below with reference to the accompanying drawings for illustration.
[0053] Figure 1 This is a flowchart of a programming method provided by an exemplary embodiment. Figure 1 The burning method provided in this embodiment includes the following steps S110 to S130:
[0054] Step S110, pre-processing the original file to generate a file to be burned;
[0055] Step S120: performing service adaptation based on the unified diagnostic service and user instructions to obtain a service configuration file;
[0056] Step S130: Burn the burning device based on the file to be burned and the service configuration file.
[0057] The execution subject of this embodiment may be a terminal, which may be used to display a graphical user interface. The terminal is used to interact with the user through the graphical user interface, such as downloading and installing a corresponding client through the terminal and running it, such as calling a corresponding applet and running it, such as logging into a website and presenting a corresponding graphical user interface, etc.
[0058] In step S110, an original file is obtained. The original file may be stored in a local storage space or in a storage space of another device. The original file may be a file obtained by compiling a program, and the file includes at least one section of code. The program may be a firmware program such as a bootloader program to be burned.
[0059] The preprocessing of the original file includes at least one of the following: completion, encryption, calculation of CRC and signature, etc. The user can select one or more preprocessing options according to actual needs to prepare the file to be burned. Among them, the file to be burned is an executable file. Of course, the user can also not select the above preprocessing options, but directly generate the file to be burned based on the obtained original file.
[0060] In step S120, UDS (Unified Diagnostic Services) is adapted according to the actual needs of the user. For example, the context relationship between services can be configured, and the context relationship refers to whether the response data of the previous service is used as the send data of the next service. For another example, how the service request needs to send data, how to receive the response data, and the service timeout setting can be configured. After the adaptation is completed, the information involved in the adaptation process is serialized to obtain a service configuration file. In this embodiment, serialization can prevent the service configuration file from being tampered with and deciphered.
[0061] Among them, one project may involve one or more services. When multiple services are involved, each service may be adapted separately. Accordingly, each service may correspond to a service configuration file, or each service corresponds to a service configuration file, or some services correspond to a service configuration file, and the remaining services correspond to one or more other service configuration files.
[0062] Optionally, after the adaptation is completed, in response to the user clicking the instruction to generate the project file, a compressed package file is generated, which includes the file to be burned and the service configuration file. The format of the compressed package file can be .zip, .rar, .7z, etc., which can be selected according to actual needs.
[0063] By generating a compressed package file, it can reduce or even avoid the omission or loss of files when adding files to be burned and service configuration files during the subsequent burning process.
[0064] In step S130, the files generated in step S110 and step S120 are loaded, and the connected device is burned based on the loaded files. During the burning process, it is only necessary to meet the UDS protocol and send and receive data according to the service configuration file. Among them, for the service configuration file, the file needs to be deserialized, and specifically can be deserialized to the corresponding storage class in the device memory, so as to facilitate the subsequent reading and storage of related information.
[0065] It should be noted that the terminal executing steps S110 to S130 may be the same terminal. Alternatively, the terminal executing steps S110 to S130 may include at least two terminals, for example, the terminal executing steps S110 and S120 may be the same terminal, and the terminal executing step S130 may be another terminal; or, three terminals may be used to respectively execute steps S110, S120, and S130.
[0066] The burning method provided in this embodiment generates a file to be burned by preprocessing the original file; performs service adaptation based on a unified diagnostic service and user instructions to obtain a service configuration file; and burns the burning device based on the file to be burned and the service configuration file. In this way, a universal burning platform can be used to generate the file to be burned, a service configuration file can be generated based on user instructions, and the firmware can be burned into the vehicle device, thereby realizing universal burning. There is no need to frequently develop a burning platform for the burning needs of different users or projects, which saves development costs and development cycles, and can efficiently and cost-effectively meet the burning needs of different automobile companies.
[0067] In some embodiments, step S110, preprocessing the original file, includes at least one of the following:
[0068] In response to the completion instruction, the original file is completed;
[0069] In response to the verification instruction, determining a verification code and adding it to the original file;
[0070] In response to the first encryption instruction, encrypting the original file;
[0071] In response to the signing instruction, appending a digital signature to the original document;
[0072] In response to the extension instruction, the extended function is added to the original file.
[0073] When completion is needed, you can check whether the code is correct in terms of syntax and semantics, and perform intelligent filtering, formatting, and other processing to make the code in the original file correct and complete.
[0074] In addition, the empty positions in the code in the original file can be filled with empty instruction characters to make the code continuous, and the empty instruction characters are filled with a preset length to align. Due to the different specific parameters of memories of different specifications, the single block length of the upgrade file is different. Therefore, the filling and alignment processing is performed, and the preset characters are used to fill, and the file aligned with the preset length is obtained, which is convenient for subsequent verification. Among them, the empty position refers to the blank position in the target code, and the empty instruction character can be represented by 0xFF or other characters used to indicate that the position is blank.
[0075] When a checksum is required, a checksum file corresponding to the completed file is prepared. Specifically, the checksum information of the completed file can be calculated by a checksum algorithm, and the checksum information includes a checksum; the checksum information is combined with the address information, length information and other auxiliary information of the code (for example, the checksum information header and information tail) to form an initial checksum file; the initial checksum file is further filled and aligned to obtain a checksum file corresponding to the completed file; the completed file is combined with the checksum file to obtain the file to be burned. Among them, the content in the checksum file can be added to the completed file and is located after the content in the file.
[0076] Optionally, the check algorithm may be a CRC (Cyclic redundancy check) algorithm or a parity check algorithm, etc., which may be selected according to actual needs.
[0077] When encryption is required, the original file may be encrypted using a commonly used encryption algorithm, for example, an MD (Message Digest) algorithm or an AES (Advanced Encryption Standard) algorithm.
[0078] It can be understood that: when adding a check code to the original file, the original file may not be encrypted; or when no check code is added to the original file, the original file may be encrypted; or, the check code may be added to the original file and the original file may be encrypted, and the specific selection may be made according to actual needs.
[0079] When a signature needs to be added, a digital signature can be added to the original file. The algorithm for calculating the digital signature can adopt a common algorithm, which is not specifically limited in this embodiment. Generally speaking, an asymmetric encryption algorithm is used to calculate the digital signature. By adding a digital signature, it is helpful to identify the source of the file to be burned and prevent the file to be burned from being tampered with.
[0080] When expansion is needed, users can add the expanded functions according to actual needs. By providing expansion, the flexibility and scalability of the general burning platform can be improved, and the user experience can be enhanced.
[0081] In some examples, such as Figure 2 After loading the original file, the user may be prompted whether to perform completion processing. If the user clicks on the option for confirming the completion execution, the original file is completed in response to the completion instruction; if the user clicks on the option for skipping or canceling the completion, the completion processing is not performed and the next step is directly performed.
[0082] The user may be prompted whether to calculate and add a verification code. If the user clicks on the option to confirm adding the verification code, the verification code is calculated and added to the original file in response to the verification instruction. If the user clicks on the option to skip or cancel the calculation, no calculation is performed and the next step is performed directly.
[0083] The user may be prompted whether to perform encryption processing. If the user clicks on the option for confirming encryption, the original file is encrypted in response to the first encryption instruction; if the user clicks on the option for skipping or canceling encryption, encryption is not performed and the next step is directly performed.
[0084] The user may be prompted whether to calculate and add a digital signature. If the user clicks on the option to confirm the calculation and addition of the digital signature, the digital signature is calculated and added to the digital signature in response to the signature instruction. If the user clicks on the option to skip or cancel the calculation and addition of the digital signature, no calculation is performed and the next step is proceeded directly.
[0085] The user may be prompted whether to perform the extension. If the user clicks on the option for confirming the extension, the extended function is added to the original file in response to the extension instruction. If the user clicks on the option for skipping or canceling the extension, the extension is not performed and the next step is directly performed.
[0086] It is understandable that the execution order of the above processing procedures can be set according to actual needs, and this embodiment does not make any specific limitation here.
[0087] In other examples, in the pre-processing graphical user interface, options such as completion, calculation of checksums, encryption, signing, and extension may be displayed. The user can click on the processing items to be executed according to actual needs. When the user clicks on the completion option, the original file is completed in response to the completion instruction. When the user clicks on the calculation of checksum instructions, the checksum is determined and added to the original file in response to the verification instructions. When the user clicks on the encryption option, the original file is encrypted in response to the first encryption instruction. When the user clicks on the signature option, a digital signature is attached to the original file in response to the signature instruction. When the user clicks on the extension instruction, the extended function is added to the original file in response to the extension instruction.
[0088] In some embodiments, please refer to Figure 3 Step S120, performing service adaptation based on the unified diagnostic service and the user instruction, includes at least one of the following:
[0089] In response to the service sending an encryption instruction, a mapping relationship between the encryption algorithm and the service is established;
[0090] In response to the service reply decryption instruction, a mapping relationship between the decryption algorithm and the service is established;
[0091] Adapt the context of the service;
[0092] Adapt service timeout parameters.
[0093] In the service sending adaptation process, if it is determined that the user needs to encrypt the sent service data, the service sends an encryption instruction in response to which a mapping relationship between the encryption algorithm and the service is established. In specific implementation, the user may be prompted whether the sent service data needs to be encrypted. If the user clicks on the option to confirm the service sending encryption, the service sends an encryption instruction in response to which a mapping relationship between the encryption algorithm and the service is established so that the corresponding encryption algorithm can be found when sending data; if the user clicks on the option to skip or cancel encryption, encryption configuration is not performed and the next step is directly performed. The encryption algorithm may be a preset encryption algorithm or an extended encryption algorithm.
[0094] During the service response adaptation process, if it is determined that the user needs to decrypt the received response data, a mapping relationship between the decryption algorithm and the service is established in response to the service response decryption instruction. In specific implementation, the user can be prompted whether the received response data needs to be decrypted. If the user clicks on the option for confirming the service response decryption, a mapping relationship between the decryption algorithm and the service is established in response to the service response decryption instruction, so that the corresponding encryption and decryption algorithm can be found when the response data is received; if the user clicks on the option for skipping or canceling decryption, no decryption configuration is performed, and the next step is directly performed. Among them, the decryption algorithm can be a preset decryption algorithm or an extended decryption algorithm.
[0095] In the process of adapting the contextual relationship of the service, it is determined according to the user's choice whether to use the response data of the previous service as the data sent by the next service, or not to use the response data of the previous service as the data sent by the next service. In specific implementation, the user may be prompted whether to use the response data of a service as the data sent by the next service. If the user clicks on the option for confirming to use the response data of a service as the data sent by the next service, the response data of the service is used as the data sent by the next service; if the user clicks on the option for rejecting to use the response data of a service as the data sent by the next service, the response data of the service is not used as the data sent by the next service.
[0096] In the process of adapting the service timeout parameters, the service timeout parameters can be set by the user; if the user does not set them, the default service timeout parameters are used. In some examples, when the user sets the service timeout parameters, the service adaptation graphical user interface can display a service timeout parameter display box, and the default service timeout parameters are displayed in the display box by default. After the user places the cursor in the display box, the service timeout parameters entered by the user can be obtained. In other examples, when the user sets the service timeout parameters, the service adaptation graphical user interface can display a service timeout parameter display box, and a button for increasing the service timeout parameter and a button for decreasing the service timeout parameter can be set on one side of the display box. Of course, the adjustment process of the service timeout parameters is not limited to this, and this embodiment is only used as an example here.
[0097] In addition, the service adaptation process may also include the following steps a1 to a4:
[0098] Step a1: In response to the instruction for configuring encryption and decryption algorithms, display the preset cryptographic algorithms;
[0099] Step a2, in response to an instruction to select a cryptographic algorithm, loading the selected cryptographic algorithm to obtain a cryptographic algorithm file;
[0100] Step a3, in response to the instruction of extending the cryptographic algorithm, generating a DLL file of the extended cryptographic algorithm to obtain a cryptographic algorithm file;
[0101] Step a4: Generate a compressed package file based on the file to be burned, the service configuration file and the cryptographic algorithm file.
[0102] In order to further enhance security, the user can choose whether to set the encryption and decryption algorithm for the service configuration file according to actual needs. Specifically, the user can be prompted whether to configure the encryption and decryption algorithm; if the user receives an instruction to confirm the configuration of the encryption and decryption algorithm, step a1 is executed. In step a1, in addition to displaying at least one preset cryptographic algorithm, the option of extending the cryptographic algorithm is also displayed. If the user selects the preset cryptographic algorithm, steps a2 and a4 are executed. If the preset cryptographic algorithm is not what the user needs, when it is confirmed that the user clicks the option of extending the cryptographic algorithm, steps a3 and a4 are executed.
[0103] In the process of extending the cryptographic algorithm, a mapping relationship between the function name of the cryptographic algorithm and the DLL is established to provide guidance for subsequent calls to the cryptographic algorithm file. Optionally, a reflection mechanism is configured for the extended cryptographic algorithm to allow the program to create objects at runtime and map the function name string to the corresponding function entry address.
[0104] In this embodiment, different users are supported to expand the cryptographic algorithm according to actual needs, thereby improving the flexibility and scalability of the burning method so that it can be applied to more scenarios.
[0105] In some embodiments, please refer to Figure 4 Step S130, based on the file to be burned and the service configuration file, burning the burning device includes the following steps b1 to b5:
[0106] Step b1, obtain the file to be burned and the service configuration file, and enter the burning service process;
[0107] Step b2: read the service in the service configuration file and send the service data corresponding to the service;
[0108] Step b3: upon receiving response data in response to the service data, storing or displaying the response data;
[0109] Step b4: If no response data is received and there is a timeout error, perform timeout error processing;
[0110] Step b5: If no response data is received and there is no timeout error, a negative response is processed.
[0111] In step b1, in response to the burning instruction, the compressed package file is loaded. The compressed package file includes the files to be burned and the service configuration file. In the service adaptation process, when there is a project encryption and decryption requirement, the compressed package file also includes a cryptographic algorithm file. The files to be burned and the service configuration file are extracted from the compressed package file; when there is a cryptographic algorithm file, the cryptographic algorithm file is also extracted from the compressed package file.
[0112] Optionally, in order to avoid user misoperation, when receiving the burning instruction from the user, the information of the compressed package file used for burning, such as the modification time, etc., is obtained, so that it can be judged whether the compressed package file is available according to the modification time. If so, the compressed package file is loaded. If not, a prompt message is generated to prompt the user that the current compressed package file is unavailable.
[0113] In step b2, after extracting each file, the burning service process is entered. A service in the service configuration file is read in order, and the service data of the service is obtained and sent. The service data of the service is filled in according to the context of the service, that is, according to the context of the service, if the response data of the previous service needs to be used as the service data of the current service, the response data of the previous service needs to be filled in the service data of the current service before sending.
[0114] Optionally, during the service adaptation process, if the service sending encryption is configured based on the service sending encryption instruction, the encryption algorithm corresponding to the service is determined based on the mapping relationship between the encryption algorithm and the service, and the service data to be sent is encrypted. If the service sending encryption is not configured, the service data is sent directly.
[0115] In step b3, after sending the service data, wait to receive the response data in response to the service data. If the response data is received within the preset time period determined based on the service timeout parameter, the response data is stored or displayed. Then, continue to execute steps b2 and b3, read the next service in sequence, send the service data of the service, and receive the response data in response to the service data. After receiving the response data, it is also possible to determine whether the received response data is correct based on the context of the service. This cycle is repeated until the last service is processed in sequence.
[0116] Optionally, during the service adaptation process, if the service response decryption configuration is configured based on the service response decryption instruction, the received response data is decrypted based on the decryption algorithm determined by the mapping relationship between the decryption algorithm and the service. If the service response decryption configuration is not configured, no decryption processing is performed.
[0117] For any of the services, if no response data in response to the service data is received within a preset time period, it is determined whether a timeout error occurs. Specifically, within a preset time period determined based on the service timeout parameter, if the received information corresponds to a timeout error, it is confirmed that a timeout error occurs, and step b4 is executed to perform timeout error processing, such as prompting the user that the service has timed out; if a negative response code exists in the received information, step b5 is executed to perform negative response processing, such as prompting the user that the service has been negatively responded to. After performing timeout error processing or negative response processing, the burning process ends.
[0118] In some embodiments, the burning process also includes: in response to an instruction to select a communication protocol, the communication protocol selected by the user is used as the target communication protocol; wherein the communication protocols include: CAN bus communication protocol, and Ethernet communication protocol. Specifically, the user graphical interface corresponding to the burning process may display options for communication protocols that the user can select, and the options may specifically include: UDSOnCAN and UDSOnIP; UDSOnCAN means data is transmitted via the CAN bus, and UDSOnIP means data is transmitted via Ethernet. When the user selects UDSOnCAN according to actual needs, the CAN bus communication protocol is used as the target communication protocol to enable data transmission based on the CAN bus. When the user selects UDSOnIP according to actual needs, the Ethernet communication protocol is used as the target communication protocol to enable data transmission based on Ethernet.
[0119] The burning method provided in this embodiment can allow users to generate burning files and service configuration files according to their own needs, and can execute the burning process to achieve the purpose of universal burning. There is no need to frequently develop burning platforms to meet the burning requirements of different projects, saving development costs and development cycles; moreover, the service can be adapted according to user instructions, which is specifically achieved by means of configuration files, so that this embodiment has good flexibility and scalability; in addition, users can also select the communication protocol for transmitting data according to actual needs.
[0120] In order to better implement the burning method of the embodiment of the present application, the embodiment of the present application also provides a burning device. Figure 5 For a structural diagram of a burning device provided in an embodiment of the present application, please refer to Figure 5 The burning device comprises:
[0121] The preprocessing unit 501 is used to preprocess the original file to generate a file to be burned;
[0122] The adaptation unit 502 is used to perform service adaptation based on the unified diagnostic service and the user instruction to obtain a service configuration file;
[0123] The burning unit 503 is used to burn the burning device based on the file to be burned and the service configuration file.
[0124] In some embodiments, the preprocessing unit is used to implement at least one of the following:
[0125] In response to the completion instruction, the original file is completed;
[0126] In response to the verification instruction, determining a verification code and adding it to the original file;
[0127] In response to the first encryption instruction, encrypting the original file;
[0128] In response to the signing instruction, appending a digital signature to the original document;
[0129] In response to the extension instruction, the extended function is added to the original file.
[0130] In some embodiments, the adaptation unit is configured to implement at least one of the following:
[0131] In response to the service sending an encryption instruction, a mapping relationship between the encryption algorithm and the service is established;
[0132] In response to the service reply decryption instruction, a mapping relationship between the decryption algorithm and the service is established;
[0133] Adapt the context of the service;
[0134] Adapt service timeout parameters.
[0135] In some embodiments, the burning device further includes a first processing unit, configured to:
[0136] In response to the instruction to configure encryption and decryption algorithms, display the preset cryptographic algorithms;
[0137] In response to an instruction to select a cryptographic algorithm, the selected cryptographic algorithm is loaded to obtain a cryptographic algorithm file;
[0138] In response to the instruction of extending the cryptographic algorithm, the extended cryptographic algorithm is generated into a DLL file to obtain a cryptographic algorithm file;
[0139] Generate a compressed package file based on the file to be burned, the service configuration file and the password algorithm file.
[0140] In some embodiments, the burning unit is specifically used for:
[0141] Get the service configuration file;
[0142] Read services from the obtained service configuration file in a preset order and send corresponding service data;
[0143] When response data is received in response to the service data, the response data is stored or presented.
[0144] In some embodiments, the burning unit is specifically used for:
[0145] If no response data is received and there is a timeout error, perform timeout error processing;
[0146] If no response data is received and there is no timeout error, a negative response is processed.
[0147] In some embodiments, the burning unit is specifically used for:
[0148] When the read service needs to be encrypted, the service data to be sent is encrypted and the encrypted service data is sent.
[0149] In some embodiments, the burning unit is specifically used for:
[0150] Upon receiving response data in response to the service data, and upon determining that decryption is required, decrypting the response data;
[0151] The decrypted response data is stored or displayed.
[0152] In some embodiments, the burning device further includes a second processing unit, configured to:
[0153] In response to the instruction to select a communication protocol, the communication protocol selected by the user is used as the target communication protocol; wherein the communication protocols include: CAN bus communication protocol and Ethernet communication protocol.
[0154] In the embodiment of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the function of the module or unit. The above-mentioned each "module" or "unit" can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned each unit.
[0155] The burning device may be integrated in a terminal or server that has a storage device and a processor installed therein and has computing capability, or the burning device is the terminal or server.
[0156] In some embodiments, the present application also provides an electronic device, including a memory and a processor, the memory is used to store executable instructions of the processor, and the processor is configured to perform the steps in the above-mentioned method embodiments by executing the executable instructions.
[0157] The processor may include one or more processing cores. The memory may include one or more computer-readable storage media. The memory stores a computer program, which can be run on the processor. The processor is electrically connected to the memory. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0158] The processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0159] The memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0160] The above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiment of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiment of the present application is intended to include but not limited to these and any other suitable types of memory.
[0161] The electronic device may also include a power module, a wireless fidelity module, a Bluetooth module, an input module, etc., which will not be described in detail here.
[0162] In some embodiments, the present application further provides a computer-readable storage medium, which stores a computer program. The computer-readable storage medium can be applied to an electronic device, and the computer program enables the electronic device to execute the corresponding process in the method in the embodiment of the present application, which will not be described here for the sake of brevity.
[0163] In some embodiments, the present application further provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device executes the corresponding process in the method in the embodiment of the present application, which will not be repeated here for the sake of brevity.
[0164] In some embodiments, the present application further provides a computer program, which includes a computer program, and the computer program is stored in a computer-readable storage medium. The processor of the electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device executes the corresponding process in the method in the embodiment of the present application, which will not be repeated here for the sake of brevity.
[0165] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0166] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0167] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0168] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0169] In addition, each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0170] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for an electronic device (which can be a personal computer, a server) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk.
[0171] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.
[0172] For the purposes of this specification, a "computer readable medium" may be any device that can contain, store, communicate, propagate or transport a program for use with or in conjunction with an instruction execution system, apparatus or device. More specific examples (a non-exhaustive list) of computer readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM).
[0173] In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0174] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A burning method, characterized in that: include: Preprocess the original file to generate the file to be burned; Perform service adaptation based on unified diagnostic services and user instructions to obtain a service configuration file; Based on the file to be burned and the service configuration file, the burning device is burned.
2. The burning method according to claim 1, characterized in that: The preprocessing of the original file includes at least one of the following: In response to the completion instruction, the original file is completed; In response to the verification instruction, determining a verification code and adding it to the original file; In response to the first encryption instruction, encrypting the original file; In response to the signing instruction, appending a digital signature to the original document; In response to the extension instruction, the extended function is added to the original file.
3. The burning method according to claim 1, characterized in that: The service adaptation based on the unified diagnostic service and the user instruction includes at least one of the following: In response to the service sending an encryption instruction, a mapping relationship between the encryption algorithm and the service is established; In response to the service reply decryption instruction, a mapping relationship between the decryption algorithm and the service is established; Adapt the context of the service; Adapt service timeout parameters.
4. The burning method according to claim 1, characterized in that: Before the burning device is burned, the method further includes: In response to the instruction to configure encryption and decryption algorithms, display the preset cryptographic algorithms; In response to an instruction to select a cryptographic algorithm, the selected cryptographic algorithm is loaded to obtain a cryptographic algorithm file; In response to the instruction of extending the cryptographic algorithm, the extended cryptographic algorithm is generated into a DLL file to obtain a cryptographic algorithm file; A compressed package file is generated based on the file to be burned, the service configuration file and the cryptographic algorithm file.
5. The burning method according to claim 1, characterized in that: The step of burning the burning device based on the file to be burned and the service configuration file includes: Get the service configuration file; Read services from the obtained service configuration file in a preset order and send corresponding service data; When response data in response to the service data is received, the response data is stored or displayed.
6. The burning method according to claim 1, characterized in that: The step of burning the burning device based on the file to be burned and the service configuration file further includes: If no response data in response to the service data is received and there is a timeout error, performing timeout error processing; If response data in response to the service data is not received and there is no timeout error, a negative response process is performed.
7. The burning method according to claim 5, characterized in that: The sending of corresponding service data includes: When the service read needs to be encrypted, encrypt the service data to be sent, and send the encrypted service data; When receiving response data in response to the service data, storing or displaying the response data comprises: When receiving response data in response to the service data and when it is determined that decryption is required, decrypting the response data; The decrypted response data is stored or displayed.
8. The burning method according to claim 1, characterized in that: Also includes: In response to the instruction to select a communication protocol, the communication protocol selected by the user is used as the target communication protocol; wherein the communication protocol includes: a CAN bus communication protocol and an Ethernet communication protocol.
9. A burning device, characterized in that: include: A preprocessing unit, used to preprocess the original file to generate a file to be burned; An adaptation unit, used to perform service adaptation based on the unified diagnostic service and user instructions to obtain a service configuration file; The burning unit is used to burn the burning device based on the file to be burned and the service configuration file.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
