OTA software package generation method and device, electronic equipment and storage medium
By automatically matching the binary file definitions of vehicle components, a standardized OTA software package is generated, which solves the problems of irregular OTA software package naming, inconsistent file formats and irregular XML content, and improves configuration efficiency and accuracy.
Patent Information
- Application Number
- CN202411005619.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-15
AI Technical Summary
The OTA package's inconsistent naming, inconsistent file formats and irregular XML contents lead to the inability to configure the package correctly and the configuration efficiency is inefficient.
By obtaining the target configuration template and original files of vehicle components, automatically match the binary file definitions, and generating standardized OTA software packages, ensuring the unified file naming and format, reducing manual configuration workload, and improving generation accuracy and efficiency.
It realizes the correct configuration of OTA software packages, improves generation efficiency, reduces the risk of configuration errors, and ensures the unified file format and the accuracy of XML content.
Smart Images

Figure CN118963815A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and specifically to a method, device, electronic device and storage medium for generating an OTA software package. Background Art
[0002] OTA software packages often have the following problems in routine business: The naming of the software package is not standardized, that is, the naming does not comply with certain rules or conventions, which makes it difficult to identify and manage. The file format is not uniform, that is, the files in the software package may use the S19 format or HEX format instead of the unified bin format. This format inconsistency may cause OTA (over-the-air download), diagnosis and electrical inspection flashing to be incompatible. XML content is not standardized, for example: version information does not match, that is, the version recorded in the XML is inconsistent with the actual version; content tags are missing, resulting in some information cannot be accurately described; the value of the tag does not match the bin file name, affecting the accuracy of related operations.
[0003] Based on this, problems such as non-standard software package naming, non-uniform file formats, and non-standard XML content will lead to the inability to correctly configure the OTA software package and low configuration efficiency. Summary of the invention
[0004] In view of the above problems, the embodiments of the present invention provide a method, device, electronic device and storage medium for generating an OTA software package, which are used to solve the problems in the prior art such as irregular software package naming, inconsistent file formats and irregular XML content, which may lead to the inability to correctly configure the OTA software package and low configuration efficiency.
[0005] According to one aspect of an embodiment of the present invention, a method for generating an OTA software package is provided, the method comprising:
[0006] Obtaining a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured;
[0007] Acquire a target configuration template and at least one original file corresponding to the vehicle component, wherein the target configuration template includes a plurality of binary file definitions;
[0008] Matching the original file with the binary file definition to obtain a mapping relationship between each original file and each binary file definition;
[0009] An OTA software package corresponding to the vehicle component is generated based on the mapping relationship and the original file.
[0010] In an optional manner, the obtaining the target configuration template corresponding to the vehicle component includes:
[0011] Obtaining component information corresponding to the vehicle component;
[0012] Querying a preset template library to determine whether there is a configuration template corresponding to the component information;
[0013] If there is a configuration template corresponding to the component information, the configuration template is used as the target configuration template; or, if there is no configuration template corresponding to the component information, the target configuration template is created.
[0014] In an optional manner, the creating the target configuration template includes:
[0015] triggering a template creation request based on the vehicle component;
[0016] In response to the template creation request, query whether the vehicle component has a partition attribute, and obtain a query result;
[0017] Displaying a corresponding configuration interface according to the query result, and acquiring configuration content input based on the configuration interface, wherein the configuration content includes a binary file definition;
[0018] The configuration content is verified according to a preset rule, and if the configuration content passes the verification, the configuration template is generated based on the configuration content.
[0019] In an optional manner, displaying a corresponding configuration interface according to the query result and acquiring configuration content input based on the configuration interface includes:
[0020] If the query result is that the vehicle component does not support partition attributes, a configuration interface corresponding to a common partition is displayed, wherein the configuration interface corresponding to the common partition includes: a file list tag and a version number subtag and a sequence subtag corresponding to the file list tag; obtaining version configuration information input by the user based on the version number subtag, and a binary file definition input based on the sequence subtag;
[0021] Or, if the query result is that the vehicle component supports partition attributes, a configuration interface corresponding to the partition attributes is displayed, wherein the configuration interface corresponding to the partition attributes includes: a file list tag, a version number subtag corresponding to the file list tag, a first partition subtag and a second partition subtag, and sequence subtags corresponding to the first partition subtag and the second partition subtag; obtaining version configuration information input by the user based on the version number subtag, a binary file definition input based on the sequence subtag corresponding to the first partition subtag, and a binary file definition input based on the sequence subtag corresponding to the second partition subtag.
[0022] In an optional manner, matching the original file with the binary file definition to obtain a mapping relationship between each original file and each binary file definition includes:
[0023] Detecting a file format corresponding to the original file;
[0024] If the file format is in binary format, the original file is matched with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; or, if the file format is not in binary format, the original file is converted into a binary format to obtain an original file after format conversion, and the converted original file is matched with the binary file definition to obtain a mapping relationship between the converted original file and the binary file definition.
[0025] In an optional manner, the method further includes:
[0026] Check whether there are binary file definitions without mapping relationships in the configuration template;
[0027] If there is a binary file definition without a mapping relationship, a prompt message is generated and sent, wherein the prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship.
[0028] In an optional manner, generating an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file includes:
[0029] Mapping the original file to the target configuration template according to the mapping relationship to obtain configuration information corresponding to each binary file definition;
[0030] Obtaining file description information, wherein the file description information includes file structure and compression rules;
[0031] The configuration information in the target configuration template is used to generate an initial file according to the file structure, and the initial file is compressed according to the compression rule to obtain the OTA software package.
[0032] In an optional manner, the method further includes:
[0033] Verifying whether the file structure of the OTA software package matches a preset file structure, and obtaining a first verification result;
[0034] Performing a consistency check on the file content of the OTA software package to obtain a second check result;
[0035] If the first verification result is that the file structure does not match the preset file structure, and / or the second verification result is that there is an error in the file content, a prompt message is generated according to the first verification result and / or the second verification result, and a corresponding solution strategy is generated.
[0036] According to another aspect of an embodiment of the present invention, a device for generating an OTA software package is provided, the device comprising:
[0037] A receiving module, used for obtaining a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured;
[0038] An acquisition module, used for acquiring a target configuration template and an original file corresponding to the vehicle component, wherein the target configuration template includes a plurality of binary file definitions and file description information;
[0039] A matching module, used for matching the original file with the binary file definition to obtain a mapping relationship between the original file and the binary file definition;
[0040] A generation module is used to generate an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file.
[0041] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0042] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.
[0043] The method provided in the embodiment of the present application sets configuration templates for different vehicle components and standardizes file naming and format through configuration templates. Ensure that the configuration content meets the requirements. Secondly, automatically match the original file with the binary file definition, reduce the workload of manual configuration, and improve the accuracy and efficiency of software package generation. By establishing a mapping relationship, it ensures that the original file is accurately assigned to the corresponding binary file definition, reducing the risk of configuration errors.
[0044] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, 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 embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:
[0046] Figure 1 A schematic diagram of a process for generating an OTA software package provided by the present invention is shown;
[0047] Figure 2 A schematic diagram showing a flow chart of a configuration method of a configuration template provided by the present invention;
[0048] Figure 3 A schematic diagram showing the configuration contents corresponding to the common partitions provided by the present invention is shown;
[0049] Figure 4 A schematic diagram showing the configuration contents corresponding to the AB partitions provided by the present invention;
[0050] Figure 5 A schematic diagram showing the process of configuring the configuration template provided by the present invention
[0051] Figure 6 A schematic diagram of the structure of a device for generating an OTA software package provided by the present invention is shown;
[0052] Figure 7 A schematic structural diagram of an embodiment of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION
[0053] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0054] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.
[0055] Herein, unless explicitly stated, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.
[0056] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0057] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scopes of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and their authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.
[0058] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to software or hardware such as an electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.
[0059] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message is sent to the relevant user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.
[0060] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0061] According to an embodiment of the present invention, a method, apparatus, electronic device and storage medium for generating an OTA software package are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.
[0062] Figure 1 A flow chart of a method for generating an OTA software package of the present invention is shown, Figure 1 As shown, the method comprises the following steps:
[0063] Step S101, obtaining a software package generation request, wherein the software package generation request carries a vehicle component for which a software package is to be configured.
[0064] In the embodiment of the present application, the user specifies the specific vehicle component for which the software package needs to be generated, such as a specific electronic control unit (ECU) or sensor. At the same time, the specific version or model information of the vehicle component is input to ensure that the generated software package is compatible with the component, thereby generating a software package generation request according to the vehicle component specified by the user and related information.
[0065] Step S102, obtaining a target configuration template corresponding to a vehicle component and at least one original file, wherein the target configuration template includes a plurality of binary file definitions.
[0066] In the embodiment of the present application, obtaining the target configuration template corresponding to the vehicle component includes the following steps A1-A3:
[0067] Step A1, obtaining component information corresponding to vehicle components.
[0068] Specifically, after determining the vehicle components to be configured, obtain relevant information, such as component model, version, functional requirements, technical specifications, etc. Component information can be obtained through the vehicle's diagnostic interface, vehicle network, database or other data sources.
[0069] Step A2: Check whether there is a configuration template corresponding to the component information in the preset template library.
[0070] Specifically, the system will query the preset template library to determine whether there is a configuration template that matches the acquired component information. The template library can contain standard configuration templates for various vehicle components, which are pre-created based on the characteristics and functions of the components. The system will use the component information to search the template library to query whether there is a corresponding configuration template.
[0071] Step A3: if there is a configuration template corresponding to the component information, then the configuration template is used as the target configuration template; or, if there is no configuration template corresponding to the component information, then a target configuration template is created.
[0072] Specifically, if a configuration template matching the component information is found in the template library, then the template can be used as the target configuration template. Conversely, if no configuration template matching the component information is found in the template library, this may be because the component is new, special, or has unique requirements. In this case, a new target configuration template needs to be created.
[0073] Step S103, matching the original file with the binary file definition to obtain a mapping relationship between each original file and each binary file definition.
[0074] In the embodiment of the present application, matching the original file with the binary file definition to obtain a mapping relationship between each original file and each binary file definition includes the following steps B1-B2:
[0075] Step B1, detecting the file format corresponding to the original file.
[0076] Specifically, firstly, the file format of the original file is detected to be a valid file format (such as bin / s19 / hex, etc.), if it is a valid file format, the subsequent steps are executed, if the original file format is an invalid file format, the file type is prompted to be invalid, so that the user can re-upload the original file. Whether it is a valid file format can be realized by analyzing the file extension or file header information. Different file formats have specific identifiers or features, and the format type of the file can be determined by detecting these features.
[0077] Step B2: if the file format is a binary format, the original file is matched with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; or, if the file format is not a binary format, the original file is converted into a binary format to obtain an original file after format conversion, and the converted original file is matched with the binary file definition to obtain a mapping relationship between the converted original file and the binary file definition.
[0078] Specifically, if the format of the original file itself is in binary format (such as a .bin file), the original file is directly matched with the binary file definition in the target configuration template. This can be done by comparing the file's features, identifiers, or other relevant information to determine which binary file definition the original file corresponds to, thereby establishing a mapping relationship between them. On the contrary, if the format of the original file is not in binary format, such as a text file or other format, it needs to be converted to binary format first. The original file can be converted to binary form through a specific conversion tool or algorithm. Then, the converted original file is matched with the binary file definition, and a mapping relationship is also established.
[0079] As an example, the current user has uploaded two original files: "EngineControl.s19" and "ECUConfiguration.hex". For the original file "EngineControl.s19", it is a file in S19 format. The system will automatically convert the S19 format to binary format (bin file). The converted file can be matched and mapped with "EngineControlFile.bin" in the target configuration template. Similarly, for the original file "ECUConfiguration.hex", it is a file in HEX format. The system will convert it to binary format and then match it with "EngineControlFile.bin". In this way, through automatic format conversion and matching mapping, it can be ensured that files of different formats uploaded by users can correspond to the binary file definition in the target configuration template.
[0080] The method provided in the embodiment of the present application can match the original file uploaded by the user with the binary file definition in the target configuration template to determine the corresponding relationship between them. This provides a basis for subsequently generating a software package suitable for vehicle components according to the configuration template. The specific matching method and algorithm can be customized and optimized according to actual needs and the complexity of the file format.
[0081] In an embodiment of the present application, the method also includes: detecting whether there is a binary file definition without a mapping relationship in the configuration template; if there is a binary file definition without a mapping relationship, generating and sending a prompt message, wherein the prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship.
[0082] Specifically, the system will traverse the binary file definitions in the target configuration template to check whether there are any definitions that have not established a mapping relationship with the original file. These unmapped binary file definitions indicate that the corresponding content is missing in the original file. If a binary file definition without a mapping relationship is detected, the system will generate a prompt message. The prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship. This means that the user needs to provide the original files related to these unmapped definitions for correct configuration and processing. The prompt message can be sent to the user in a variety of ways, such as displaying a pop-up window or other notification methods on the user interface.
[0083] The method provided in the embodiment of the present application can find the original files missing in the configuration template and promptly notify the user that the corresponding files need to be provided to complete the configuration process. This ensures that the system can obtain all the required information to generate a software package suitable for vehicle components or perform other related processing. The specific prompt information content and sending method can be customized according to the system design and user experience requirements.
[0084] Step S104: Generate an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file.
[0085] In the embodiment of the present application, generating an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file includes the following steps C1-C3:
[0086] Step C1, mapping the original file to the target configuration template according to the mapping relationship, and obtaining the configuration information corresponding to each binary file definition.
[0087] Specifically, mapping the original file to the target configuration template according to the mapping relationship means associating each original file with the corresponding binary file definition in the target configuration template according to the previously established mapping. This ensures that each binary file definition can obtain the content of the original file corresponding to it. That is, through mapping, the data in the original file is extracted and converted into the specific configuration information required by the target configuration template.
[0088] Step C2, obtaining file description information, wherein the file description information includes file structure and compression rules.
[0089] Specifically, the file structure describes the organization and hierarchical relationship of each file in the OTA software package. The compression rule specifies how to compress the generated initial file to reduce the size of the software package and improve the transmission efficiency.
[0090] Step C3, generating an initial file according to the file structure using the configuration information in the target configuration template, and compressing the initial file according to the compression rule to obtain an OTA software package.
[0091] Specifically, the configuration information in the target configuration template is used to generate an initial file according to the file structure. According to the file structure defined in the file description information, the configuration information is organized into a file format that meets the requirements. The initial file is compressed according to the compression rules to obtain an OTA software package.
[0092] The method provided in the embodiment of the present application sets configuration templates for different vehicle components and standardizes file naming and format through configuration templates. Ensure that the configuration content meets the requirements. Secondly, the original file and the binary file definition are automatically matched, which reduces the workload of manual configuration and improves the accuracy and efficiency of software package generation. The establishment of a mapping relationship ensures that the original file is accurately assigned to the corresponding binary file definition, reducing the risk of configuration errors. In addition, the corresponding target configuration template and original file can be flexibly selected according to the needs of different vehicle components, thereby improving the configuration efficiency of the OTA software package.
[0093] Figure 2 A flow chart of a configuration method of a configuration template of the present invention is shown, Figure 2 As shown, the method comprises the following steps:
[0094] Step S201 : triggering a template creation request based on vehicle components.
[0095] In an embodiment of the present application, during the vehicle manufacturing process, the user needs to create a configuration template for a specified vehicle component. Alternatively, during vehicle maintenance / upgrade, the configuration template of the vehicle component needs to be updated. When the user determines to create a template for the vehicle component, the user can trigger a template creation request based on the system operation page.
[0096] Step S202, responding to the template creation request, querying whether the vehicle component has a partition attribute, and obtaining a query result.
[0097] In an embodiment of the present application, after receiving a template creation request, the system searches for information related to the requested vehicle component. Confirm whether the vehicle component has AB partition attributes. There may be two cases for the query result: If the vehicle component supports AB partition attributes, it means that the component can store different configurations or data in different partitions. If the vehicle component does not support AB partition attributes, it means that it does not have this special partitioning function. The query result is very important for the subsequent steps because it affects how to create a configuration template for the vehicle component.
[0098] Step S203, displaying a corresponding configuration interface according to the query result, and acquiring configuration content based on the input of the configuration interface, wherein the configuration content includes a binary file definition;
[0099] Among them, the corresponding configuration interface is displayed according to the query result, and the configuration content input based on the configuration interface is obtained, including: if the query result is that the vehicle component does not support the partition attribute, the configuration interface corresponding to the ordinary partition is displayed, wherein the configuration interface corresponding to the ordinary partition includes: a file list tag and a version number subtag and a sequence subtag corresponding to the file list tag; obtain the version configuration information input by the user based on the version number subtag, and the binary file definition input based on the sequence subtag.
[0100] Specifically, Figure 3 As shown, if the query result is that the vehicle component does not support partition attributes, the configuration interface corresponding to the displayed ordinary partition should include the following content: File list label (FileList): used to identify the file list to which the configuration information belongs. Version number sub-label (Version): The user can enter the version configuration information of the file list here. Sequence sub-label (Sequence): The user can enter the binary file definition here. In this configuration interface, the user can enter version information through the version number sub-label to identify the version of the current configuration. At the same time, the user can enter the definition of the binary file in the sequence sub-label, including the file's serial number, name, and flash address information. Through this configuration interface, users can easily configure vehicle components that do not support partition attributes to ensure that the attribute information of each bin file is accurate and there is no duplication.
[0101] Or, if the query result is that the vehicle component supports partition attributes, the configuration interface corresponding to the partition attributes is displayed, wherein the configuration interface corresponding to the partition attributes includes: a file list tag and a version number subtag corresponding to the file list tag, a first partition subtag and a second partition subtag, and sequence subtags corresponding to the first partition subtag and the second partition subtag; obtaining version configuration information input by the user based on the version number subtag, a binary file definition input based on the sequence subtag corresponding to the first partition subtag, and a binary file definition input based on the sequence subtag corresponding to the second partition subtag.
[0102] Specifically, Figure 4As shown, if the query result is that the vehicle component supports partition attributes, the configuration interface corresponding to the displayed partition attributes should include the following: File list label (FileList): used to identify the file list to which the entire configuration information belongs. Version number sub-label (Version): The user can enter the version configuration information of the file list here. First partition sub-label (A): used to describe the bin file list information of partition A. Second partition sub-label (B): used to describe the bin file list information of partition B. The sequence sub-label (Sequence) corresponding to the first partition sub-label: used to enter the binary file definition in partition A, including information such as serial number, file name, and flash address. The sequence sub-label (Sequence) corresponding to the second partition sub-label: used to enter the binary file definition in partition B, also including information such as serial number, file name, and flash address.
[0103] In this configuration interface, users can enter version information through the version number sub-label to identify the current configuration version. Then, users can enter the definition of the binary file in partition A in the sequence sub-label corresponding to the first partition sub-label, including the file's serial number, name, and flash address. Similarly, users can enter the definition of the binary file in partition B in the sequence sub-label corresponding to the second partition sub-label. Through this configuration interface, users can easily configure vehicle components that support AB partition attributes, ensuring that the attribute information of the bin file in each partition is accurate and non-repetitive.
[0104] Step S204: verify the configuration content according to preset rules. If the configuration content passes the verification, generate a configuration template based on the configuration content.
[0105] In the embodiment of the present application, verifying the configuration content according to the preset rules includes the following process: ① Check whether the bin file list is empty. If it is empty, prompt "at least one bin file is configured". ② Check whether each bin file name meets the requirements. The bin file name must be composed of numbers, letters and -, otherwise it prompts "the bin file name is illegal". ③ Check the logical address of each bin file. The logical address must start with 0x and be an 8-bit hexadecimal number, otherwise it prompts "the logical address is illegal". ④ For bin files in the same partition (normal or AVB), check whether the file name is repeated. If repeated, it prompts "xxx file is repeated". ⑤ For bin files in the same partition (normal or AVB), check whether the logical address is repeated. If repeated, it prompts "xxx logical address is repeated". ⑥ For AB partitions, check whether the number of bin file lists of the two partitions is the same. If the number is inconsistent, it prompts "the number of bin file lists of AB partitions is inconsistent". ⑦ For AB partitions, check whether the logical addresses of the bin files of the two partitions are mapped consistently. If there is an inconsistency, it prompts "AB partition xx logical address is inconsistent". If the configuration content passes all the above checks, a configuration template can be generated based on the configuration content.
[0106] The embodiment of the present application automatically queries whether the vehicle parts support partition attributes and displays the corresponding configuration interface, thereby reducing the steps of manual selection by the user and improving the efficiency of configuration. The configuration content is verified by preset rules, which reduces errors caused by human factors and ensures the accuracy and completeness of the generated configuration template. At the same time, for vehicle parts that support partition attributes, partition configuration can be performed to meet different needs. In addition, the file format in the software package is unified into bin format, which improves the compatibility of OTA / diagnosis / electric inspection flashing. Users can enter binary file definitions according to specific needs, which has a certain degree of flexibility.
[0107] In an embodiment of the present application, after generating an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file, the method also includes: verifying whether the file structure of the OTA software package matches the preset file structure to obtain a first verification result; performing a consistency check on the file content of the OTA software package to obtain a second verification result; if the first verification result is that the file structure does not match the preset file structure, and / or the second verification result is that there is an error in the file content, a prompt message is generated based on the first verification result and / or the second verification result, and a corresponding solution strategy is generated.
[0108] Specifically, the process of verifying the file structure of the OTA software package includes: according to the requirements of the OTA system, clarify the file structure that the software package should have, including the number, type, directory structure, etc. of files. Read the file structure of the OTA software package, such as the number of files and directory information. Compare the read software package file structure with the preset file structure to check whether they match, and obtain the first verification result. If the file structure of the software package completely matches the preset file structure, the first verification result is passed; otherwise, the first verification result is mismatch, and the specific mismatch is recorded, such as missing files, wrong file types, inconsistent directory structures, etc.
[0109] The process of consistency checking the file content of the OTA software package includes: first determine the consistency check rules: formulate consistency check rules for file content according to the functions and requirements of the software package, such as checking the value range of configuration parameters, specific identifiers or keywords in the file, etc. According to the verification rules, read the file content that needs to be verified in the software package. Then, according to the verification rules, check the read file content to determine whether it meets expectations. If the file content meets the consistency check rules, the second check result is passed; otherwise, the second check result is an error, and the specific error content and location are recorded.
[0110] After verifying the file structure and file content of the OTA software package, if the first verification result is that the file structure does not match the preset file structure, or the second verification result is that there is an error in the file content, the verification result needs to be analyzed in detail. That is, according to the specific situation of the verification result, a corresponding prompt message is generated to clearly point out the problem, such as "the necessary file xxx is missing in the software package file structure", "the configuration parameter zzz in the file yyy is out of the value range", etc. Generate a corresponding solution strategy for the problem in the prompt message. The solution strategy may include regenerating the software package, modifying the configuration parameters, supplementing the missing files, etc., and provide specific operational suggestions and steps. For example, if the first verification result is that a configuration file is missing in the file structure, the prompt message may be "the configuration file config.ini is missing in the OTA software package", and the solution strategy may be "recheck the process of generating the software package to ensure that the config.ini file is included in the software package."
[0111] As an example, Figure 5 As shown, users can directly modify the existing configuration template or create a new configuration template. The specific process is as follows:
[0112] Step 1, the user creates / edits a configuration template.
[0113] Step 2: Obtain the properties of whether the component selected by the user supports AB partitioning, and then display different configuration interfaces.
[0114] Step 3: The user fills in the configuration information based on the tags carried by the configuration interface.
[0115] Step 4, verify the configuration information filled in by the user according to the preset rules. The preset rules include: ① Whether the bin file list is empty, prompt: There is at least one bin file configuration. ② The bin file name must be composed of numbers and letters -, prompt: The bin file name is illegal. ③ The logical address must be an 8-bit hexadecimal starting with 0x, prompt: The logical address is illegal. ④ The bin file name in the same area (normal / AVB) cannot be repeated, prompt: xxx file is repeated. ⑤ The logical address in the same area (normal / AVB) cannot be repeated, prompt: xxx logical address is repeated. ⑥ The number of bin file lists configured in AB partitions must be the same, prompt: The number of bin file lists in AB partitions is inconsistent. ⑦ The logical addresses of bin files configured in AB partitions must be mapped consistently, prompt: Ab partition xx logical address is inconsistent.
[0116] Step 5: If the verification passes, the configuration template is saved in the background.
[0117] Step 6: The background verifies the configuration template again according to the preset rules, and stores it if the verification passes.
[0118] In this embodiment, a device for generating an OTA software package is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0119] This embodiment provides a device for generating an OTA software package, such as Figure 6 As shown, including:
[0120] A receiving module 61 is used to obtain a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured;
[0121] An acquisition module 62, used to acquire a target configuration template and an original file corresponding to a vehicle component, wherein the target configuration template includes a plurality of binary file definitions and file description information;
[0122] A matching module 63, used to match the original file with the binary file definition to obtain a mapping relationship between the original file and the binary file definition;
[0123] The generating module 64 is used to generate an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file.
[0124] In an embodiment of the present application, an acquisition module 62 is used to obtain component information corresponding to a vehicle component; query whether there is a configuration template corresponding to the component information in a preset template library; if there is a configuration template corresponding to the component information, then the configuration template is used as a target configuration template, or, if there is no configuration template corresponding to the component information, then a target configuration template is created.
[0125] In an embodiment of the present application, the acquisition module 62 is used to trigger a template creation request based on a vehicle component; respond to the template creation request, query whether the vehicle component has a partition attribute, and obtain the query result; display the corresponding configuration interface according to the query result, and obtain the configuration content input based on the configuration interface, wherein the configuration content includes a binary file definition; verify the configuration content according to preset rules, and if the configuration content verification passes, generate a configuration template based on the configuration content.
[0126] In an embodiment of the present application, an acquisition module 62 is used to display a configuration interface corresponding to a common partition if a query result is that a vehicle component does not support partition attributes, wherein the configuration interface corresponding to the common partition includes: a file list tag and a version number subtag and a sequence subtag corresponding to the file list tag; obtain version configuration information input by a user based on the version number subtag, and a binary file definition input based on the sequence subtag; or, an acquisition module 62 is used to display a configuration interface corresponding to the partition attribute if a query result is that a vehicle component supports partition attributes, wherein the configuration interface corresponding to the partition attribute includes: a file list tag and a version number subtag corresponding to the file list tag, a first partition subtag and a second partition subtag, and sequence subtags corresponding to the first partition subtag and the second partition subtag; obtain version configuration information input by a user based on the version number subtag, a binary file definition input based on the sequence subtag corresponding to the first partition subtag, and a binary file definition input based on the sequence subtag corresponding to the second partition subtag.
[0127] In an embodiment of the present application, the matching module 63 is used to detect the file format corresponding to the original file; if the file format is a binary format, the original file is matched with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; or, if the file format is not a binary format, the original file is converted into a binary format to obtain an original file after format conversion, and the converted original file is matched with the binary file definition to obtain a mapping relationship between the converted original file and the binary file definition.
[0128] In an embodiment of the present application, the device also includes: a prompt module, used to detect whether there is a binary file definition without a mapping relationship in the configuration template; if there is a binary file definition without a mapping relationship, a prompt message is generated and sent, wherein the prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship.
[0129] In an embodiment of the present application, a generation module 64 is used to map the original file to a target configuration template according to a mapping relationship to obtain configuration information corresponding to each binary file definition; obtain file description information, wherein the file description information includes a file structure and a compression rule to generate an initial file from the configuration information in the target configuration template according to the file structure, and compress the initial file according to the compression rule to obtain an OTA software package.
[0130] In an embodiment of the present application, the device also includes: a verification module, which is used to verify whether the file structure of the OTA software package matches the preset file structure to obtain a first verification result; perform a consistency check on the file content of the OTA software package to obtain a second verification result; if the first verification result is that the file structure does not match the preset file structure, and / or the second verification result is that there is an error in the file content, a prompt message is generated according to the first verification result and / or the second verification result, and a corresponding solution strategy is generated.
[0131] Figure 7 The schematic diagram of the structure of an embodiment of the electronic device of the present invention is shown, and the specific embodiment of the present invention does not limit the specific implementation of the electronic device.
[0132] like Figure 7 As shown, the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0133] The processor 402, the communication interface 404, and the memory 406 communicate with each other via the communication bus 408. The communication interface 404 is used to communicate with other devices such as a client or other server network elements. The processor 402 is used to execute the program 410, which can specifically execute the relevant steps used in the above method embodiment.
[0134] Specifically, the program 410 may include program code including computer executable instructions.
[0135] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0136] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0137] Program 410 can be specifically called by processor 402 to enable the electronic device to perform the following operations:
[0138] Obtain a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured; obtain a target configuration template and at least one original file corresponding to the vehicle component, wherein the target configuration template includes multiple binary file definitions; match the original files with the binary file definitions to obtain a mapping relationship between each original file and each binary file definition; and generate an OTA software package corresponding to the vehicle component based on the mapping relationship and the original files.
[0139] In an optional manner, obtaining a target configuration template corresponding to a vehicle component includes: obtaining component information corresponding to the vehicle component; querying whether a configuration template corresponding to the component information exists in a preset template library; if a configuration template corresponding to the component information exists, using the configuration template as a target configuration template, or, if a configuration template corresponding to the component information does not exist, creating a target configuration template.
[0140] In an optional manner, creating a target configuration template includes: triggering a template creation request based on a vehicle component; responding to the template creation request, querying whether the vehicle component has a partition attribute, and obtaining a query result; displaying a corresponding configuration interface according to the query result, and obtaining configuration content based on input on the configuration interface, wherein the configuration content includes a binary file definition; verifying the configuration content according to preset rules, and if the configuration content verification passes, generating a configuration template based on the configuration content.
[0141] In an optional manner, a corresponding configuration interface is displayed according to the query result, and configuration content based on input on the configuration interface is obtained, including:
[0142] If the query result is that the vehicle component does not support partition attributes, the configuration interface corresponding to the ordinary partition is displayed, wherein the configuration interface corresponding to the ordinary partition includes: a file list tag and a version number subtag and a sequence subtag corresponding to the file list tag; obtain the version configuration information input by the user based on the version number subtag, and the binary file definition input based on the sequence subtag; or, if the query result is that the vehicle component supports partition attributes, the configuration interface corresponding to the partition attribute is displayed, wherein the configuration interface corresponding to the partition attribute includes: a file list tag and a version number subtag corresponding to the file list tag, a first partition subtag and a second partition subtag, and sequence subtags corresponding to the first partition subtag and the second partition subtag; obtain the version configuration information input by the user based on the version number subtag, the binary file definition input based on the sequence subtag corresponding to the first partition subtag, and the binary file definition input based on the sequence subtag corresponding to the second partition subtag.
[0143] In an optional manner, the original file is matched with the binary file definition to obtain a mapping relationship between each original file and each binary file definition, including: detecting the file format corresponding to the original file; if the file format is a binary format, matching the original file with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; or, if the file format is not a binary format, performing binary format conversion on the original file to obtain the original file after format conversion, matching the converted original file with the binary file definition to obtain a mapping relationship between the converted original file and the binary file definition.
[0144] In an optional manner, the method also includes: detecting whether there is a binary file definition without a mapping relationship in the configuration template; if there is a binary file definition without a mapping relationship, generating and sending a prompt message, wherein the prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship.
[0145] In an optional manner, an OTA software package corresponding to the vehicle component is generated based on the mapping relationship and the original file, including: mapping the original file to the target configuration template according to the mapping relationship to obtain configuration information corresponding to each binary file definition; obtaining file description information, wherein the file description information includes a file structure and a compression rule; generating an initial file according to the file structure based on the configuration information in the target configuration template, and compressing the initial file according to the compression rule to obtain the OTA software package.
[0146] In an optional manner, it also includes: verifying whether the file structure of the OTA software package matches the preset file structure to obtain a first verification result; performing a consistency check on the file content of the OTA software package to obtain a second verification result; if the first verification result is that the file structure does not match the preset file structure, and / or the second verification result is that there is an error in the file content, then generating a prompt message based on the first verification result and / or the second verification result, and generating a corresponding solution strategy.
[0147] An embodiment of the present invention provides a storage medium storing at least one executable instruction. When the executable instruction is executed on a device for generating an OTA software package, the device for generating an OTA software package executes the method for generating an OTA software package in any of the above method embodiments.
[0148] The executable instructions may be specifically used to enable the OTA software package generation device to perform the following operations:
[0149] Obtain a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured; obtain a target configuration template and at least one original file corresponding to the vehicle component, wherein the target configuration template includes multiple binary file definitions; match the original files with the binary file definitions to obtain a mapping relationship between each original file and each binary file definition; and generate an OTA software package corresponding to the vehicle component based on the mapping relationship and the original files.
[0150] In an optional manner, obtaining a target configuration template corresponding to a vehicle component includes: obtaining component information corresponding to the vehicle component; querying whether a configuration template corresponding to the component information exists in a preset template library; if a configuration template corresponding to the component information exists, using the configuration template as a target configuration template, or, if a configuration template corresponding to the component information does not exist, creating a target configuration template.
[0151] In an optional manner, creating a target configuration template includes: triggering a template creation request based on a vehicle component; responding to the template creation request, querying whether the vehicle component has a partition attribute, and obtaining a query result; displaying a corresponding configuration interface according to the query result, and obtaining configuration content based on input on the configuration interface, wherein the configuration content includes a binary file definition; verifying the configuration content according to preset rules, and if the configuration content verification passes, generating a configuration template based on the configuration content.
[0152] In an optional manner, a corresponding configuration interface is displayed according to the query result, and configuration content based on input on the configuration interface is obtained, including:
[0153] If the query result is that the vehicle component does not support partition attributes, the configuration interface corresponding to the ordinary partition is displayed, wherein the configuration interface corresponding to the ordinary partition includes: a file list tag and a version number subtag and a sequence subtag corresponding to the file list tag; obtain the version configuration information input by the user based on the version number subtag, and the binary file definition input based on the sequence subtag; or, if the query result is that the vehicle component supports partition attributes, the configuration interface corresponding to the partition attribute is displayed, wherein the configuration interface corresponding to the partition attribute includes: a file list tag and a version number subtag corresponding to the file list tag, a first partition subtag and a second partition subtag, and sequence subtags corresponding to the first partition subtag and the second partition subtag; obtain the version configuration information input by the user based on the version number subtag, the binary file definition input based on the sequence subtag corresponding to the first partition subtag, and the binary file definition input based on the sequence subtag corresponding to the second partition subtag.
[0154] In an optional manner, the original file is matched with the binary file definition to obtain a mapping relationship between each original file and each binary file definition, including: detecting the file format corresponding to the original file; if the file format is a binary format, matching the original file with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; or, if the file format is not a binary format, performing binary format conversion on the original file to obtain the original file after format conversion, matching the converted original file with the binary file definition to obtain a mapping relationship between the converted original file and the binary file definition.
[0155] In an optional manner, the method also includes: detecting whether there is a binary file definition without a mapping relationship in the configuration template; if there is a binary file definition without a mapping relationship, generating and sending a prompt message, wherein the prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship.
[0156] In an optional manner, an OTA software package corresponding to the vehicle component is generated based on the mapping relationship and the original file, including: mapping the original file to the target configuration template according to the mapping relationship to obtain configuration information corresponding to each binary file definition; obtaining file description information, wherein the file description information includes a file structure and a compression rule; generating an initial file according to the file structure based on the configuration information in the target configuration template, and compressing the initial file according to the compression rule to obtain the OTA software package.
[0157] In an optional manner, it also includes: verifying whether the file structure of the OTA software package matches the preset file structure to obtain a first verification result; performing a consistency check on the file content of the OTA software package to obtain a second verification result; if the first verification result is that the file structure does not match the preset file structure, and / or the second verification result is that there is an error in the file content, then generating a prompt message based on the first verification result and / or the second verification result, and generating a corresponding solution strategy.
[0158] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system or other device. In addition, the embodiments of the present invention are not directed to any particular programming language.
[0159] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. Similarly, in order to simplify the present invention and help understand one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. Wherein, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, wherein each claim itself is a separate embodiment of the present invention.
[0160] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and further may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive.
[0161] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A method for generating an OTA software package, characterized in that: The method comprises: Obtaining a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured; Acquire a target configuration template and at least one original file corresponding to the vehicle component, wherein the target configuration template includes a plurality of binary file definitions; Matching the original file with the binary file definition to obtain a mapping relationship between each original file and each binary file definition; An OTA software package corresponding to the vehicle component is generated based on the mapping relationship and the original file.
2. The method according to claim 1, characterized in that The obtaining of the target configuration template corresponding to the vehicle component includes: Obtaining component information corresponding to the vehicle component; Querying a preset template library to determine whether there is a configuration template corresponding to the component information; If there is a configuration template corresponding to the component information, the configuration template is used as the target configuration template; or, if there is no configuration template corresponding to the component information, the target configuration template is created.
3. The method according to claim 2, characterized in that The creating the target configuration template comprises: triggering a template creation request based on the vehicle component; In response to the template creation request, query whether the vehicle component has a partition attribute, and obtain a query result; Displaying a corresponding configuration interface according to the query result, and acquiring configuration content input based on the configuration interface, wherein the configuration content includes a binary file definition; The configuration content is verified according to a preset rule, and if the configuration content passes the verification, the configuration template is generated based on the configuration content.
4. The method according to claim 3, characterized in that The displaying of a corresponding configuration interface according to the query result and obtaining configuration content input based on the configuration interface includes: If the query result is that the vehicle component does not support partition attributes, a configuration interface corresponding to a common partition is displayed, wherein the configuration interface corresponding to the common partition includes: a file list tag and a version number subtag and a sequence subtag corresponding to the file list tag; obtaining version configuration information input by the user based on the version number subtag, and a binary file definition input based on the sequence subtag; Or, if the query result is that the vehicle component supports partition attributes, a configuration interface corresponding to the partition attributes is displayed, wherein the configuration interface corresponding to the partition attributes includes: a file list tag, a version number subtag corresponding to the file list tag, a first partition subtag and a second partition subtag, and sequence subtags corresponding to the first partition subtag and the second partition subtag; obtaining version configuration information input by the user based on the version number subtag, a binary file definition input based on the sequence subtag corresponding to the first partition subtag, and a binary file definition input based on the sequence subtag corresponding to the second partition subtag.
5. The method according to claim 1, characterized in that The matching of the original file with the binary file definition to obtain a mapping relationship between each original file and each binary file definition includes: Detecting a file format corresponding to the original file; If the file format is in binary format, the original file is matched with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; or, if the file format is not in binary format, the original file is converted into a binary format to obtain an original file after format conversion, and the converted original file is matched with the binary file definition to obtain a mapping relationship between the converted original file and the binary file definition.
6. The method according to claim 5, characterized in that The method further comprises: Check whether there are binary file definitions without mapping relationships in the configuration template; If there is a binary file definition without a mapping relationship, a prompt message is generated and sent, wherein the prompt message is used to prompt the user to upload the original file corresponding to the binary file definition without a mapping relationship.
7. The method according to claim 1, characterized in that The generating an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file includes: Mapping the original file to the target configuration template according to the mapping relationship to obtain configuration information corresponding to each binary file definition; Obtaining file description information, wherein the file description information includes file structure and compression rules; The configuration information in the target configuration template is used to generate an initial file according to the file structure, and the initial file is compressed according to the compression rule to obtain the OTA software package.
8. The method according to claim 1, characterized in that The method further comprises: Verifying whether the file structure of the OTA software package matches a preset file structure, and obtaining a first verification result; Performing a consistency check on the file content of the OTA software package to obtain a second check result; If the first verification result is that the file structure does not match the preset file structure, and / or the second verification result is that there is an error in the file content, a prompt message is generated according to the first verification result and / or the second verification result, and a corresponding solution strategy is generated.
9. A device for generating an OTA software package, characterized in that: The device comprises: A receiving module, used for obtaining a software package generation request, wherein the software package generation request carries a vehicle component of a software package to be configured; An acquisition module, used for acquiring a target configuration template and an original file corresponding to the vehicle component, wherein the target configuration template includes a plurality of binary file definitions and file description information; A matching module, used for matching the original file with the binary file definition to obtain a mapping relationship between the original file and the binary file definition; A generation module is used to generate an OTA software package corresponding to the vehicle component based on the mapping relationship and the original file.
10. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the operation of the method according to any one of claims 1-7.
