WO2023051573A1 - Method and apparatus for generating ini file, computer device, and medium - Google Patents
Method and apparatus for generating ini file, computer device, and medium Download PDFInfo
- Publication number
- WO2023051573A1 WO2023051573A1 PCT/CN2022/121994 CN2022121994W WO2023051573A1 WO 2023051573 A1 WO2023051573 A1 WO 2023051573A1 CN 2022121994 W CN2022121994 W CN 2022121994W WO 2023051573 A1 WO2023051573 A1 WO 2023051573A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ini file
- authentication information
- ini
- file
- configuration
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 230000015654 memory Effects 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4403—Processor initialisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
Definitions
- the embodiments of the present application relate to the technical field of communications, for example, a method, device, computer equipment, and media for generating an ini file.
- the ini file is the abbreviation of Initialization File, that is, the initialization file.
- the ini file is a file used to set parameters for the initialization of the operating system or program. Its content is generally some variables and values or database link statements.
- the structure of the ini file is simple and easy to make, users who are familiar with the program system can easily forge the ini file, and the system or terminal will be configured at will. At this stage, there is a lack of effective management of the ini file, which may easily cause tampering of system information and data, which cannot be guaranteed Data security for clients when generating and using ini files.
- Embodiments of the present application provide a method and device for generating an ini file, a computer device, and a medium, so as to improve the security of the ini file and protect configuration information security.
- the embodiment of the present application provides a method for generating an ini file, and the method for generating the ini file includes:
- the ini file configuration parameter information includes ECU version authentication information, variable name authentication information and variable number authentication information;
- Determining the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file includes:
- the ini file authentication information corresponding to the current flashing ini file is determined according to the ECU version authentication information, the variable name authentication information, the variable number authentication information and the timestamp of the configuration ini file.
- the ini file authentication information includes 10 authentication bytes
- the ECU version authentication information includes 1 authentication byte
- the variable name authentication information includes 1 authentication byte
- the variable number authentication information includes 1 authentication byte
- the time stamp of the configuration ini file Contains 7 authentication bytes.
- the ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file are configured in hexadecimal numbers.
- determine the time stamp of the configuration ini file that is currently flashing the ini file including:
- the method for generating the ini file also includes:
- the current use time is between the legal use start time and the legal use end time, then it is considered that the ini file to be flashed is authenticated by the ini file; if the current use time is not between the legal use start time and the legal use Between the termination times, the flashing process of the ini file to be flashed is stopped.
- the method for generating the ini file also includes:
- the target ini file is stored in memory.
- the embodiment of the present application also provides a device for generating an ini file, and the device for generating the ini file includes:
- the information generation module is used to determine the ini file configuration parameter information of the current flash write ini file and the timestamp of the configuration ini file;
- the file generation module is used to determine the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file, and generate the target ini file that includes the ini file authentication information document.
- the embodiment of the present application also provides a computer device, which includes:
- processors one or more processors
- the one or more processors are made to implement the method for generating an ini file provided in the embodiment of the first aspect of the present application.
- the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the generation of an ini file provided in the embodiment of the first aspect of the present application is realized method.
- Fig. 1 is a flowchart of a method for generating an ini file provided in Embodiment 1 of the present application;
- Fig. 2 is a flowchart of a method for generating an ini file provided in Embodiment 2 of the present application;
- FIG. 3 is a structural diagram of an ini file generating device provided in Embodiment 3 of the present application.
- FIG. 4 is a schematic diagram of a hardware structure of a computer device provided in Embodiment 4 of the present application.
- this paper proposes an ini file generation method, device, computer equipment and media, so as to improve the security of the ini file and protect the security of configuration information.
- Fig. 1 is the flow chart of the generation method of a kind of ini file that the embodiment one of the present application provides, present embodiment can be applicable to the situation that the encryption authentication of ini file is carried out effective management, the generation method of this ini file can be by the generation of ini file device, the device for generating the ini file can be implemented in the form of software and/or hardware.
- the method for generating the ini file specifically includes the following steps:
- the ini file configuration parameter information includes ECU version authentication information, variable name authentication information and variable number authentication information.
- determining the ini file authentication information corresponding to the current flashing ini file is: according to the ECU version authentication information, the variable name authentication information , the authentication information of the number of variables and the time stamp of the configuration ini file determine the authentication information of the ini file corresponding to the currently flashed ini file.
- the ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file are configured in hexadecimal numbers.
- the special characters are removed from the ECU version information of the currently written ini file, and the rest is converted into a hexadecimal number, and after adding and summing all the characters, only the lowest two digits of the hexadecimal number are kept , as the ECU version authentication information.
- the ECU version information can be generated by the ECU itself, or can be preset in the program system by those skilled in the art, which is not limited in this embodiment.
- the number of variables currently flashing the ini file converts the number of variables into a hexadecimal number, and only keep the lowest two digits of the hexadecimal number as the authentication information for the number of variables.
- the number of variables currently flashed to the ini file is determined by the ini file. In this embodiment, the number of variables is not described too much, and the specific number of variables that can be read shall prevail.
- determining the time stamp of the configuration ini file of the current flashing ini file includes: determining the legal use start time and the legal use end time of the current flashing ini file, and according to the legal use start time and the legal Use the end time to determine the timestamp of the configuration ini file.
- the time stamp of the configuration ini file specifies the legal use time of the ini file, and the legal use time of the ini file includes a legal use start time and a legal use end time.
- the legal use start time and the legal use end time of the current flashing ini file are taken as a value, converted into a hexadecimal number, and the time stamp of the configuration ini file is generated.
- the ini file authentication information includes 10 authentication bytes; wherein, the ECU version authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte.
- the number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file includes 7 authentication bytes.
- S120 Determine the ini file authentication information corresponding to the currently flashed ini file according to the ini file configuration parameter information and the timestamp of the configured ini file, and generate a target ini file including the ini file authentication information.
- the four items of the above-mentioned ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file jointly constitute the corresponding
- the authentication information of the ini file realizes the function of encrypting the ini file and makes the ini file more secure.
- the method for generating the ini file further includes: obtaining the current use time of the ini file to be flashed, and the legal use start time and legal use end time corresponding to the ini file to be flashed; If the current use time is between the legal use start time and the legal use end time, then it is considered that the ini file to be flashed is authenticated by the ini file; if the current use time is not between the legal use start time and the legal use Between the termination times, the flashing process of the ini file to be flashed is stopped.
- the time stamp of configuring the ini file in the ini file authentication information is to obtain the legal use start time and legal use end time corresponding to the ini file to be flashed.
- the ini file to be flashed is authenticated by the ini file, that is, the ini file to be flashed is in the legal time period; if the current If the use time is not between the legal use start time and the legal use end time, the ini file authentication cannot be passed, that is, the ini file to be flashed is not within the legal time period, and the flashing process of the ini file to be flashed is stopped. In order to ensure the legal use of ini files and protect the security of configuration information.
- the method for generating the ini file further includes: storing the target ini file in memory.
- the target ini file containing the authentication information of the ini file is stored in the memory of the program system.
- it can be queried through the ini file containing the authentication information of the ini file stored in the memory of the program system, and through the ini file of the ini file to be flashed
- the file authentication information traces the generation information of the ini file and the content of the corresponding ini file authentication information, which is convenient for querying the storage history of the ini file and improving the security of the .ini file.
- FIG. 2 is a flow chart of a method for generating an ini file provided in Embodiment 2 of the present application. This embodiment is optimized on the basis of the foregoing embodiments.
- the method in this embodiment specifically includes:
- the ECU version authentication information includes 1 authentication byte. Take the ECU version number WISE63-P920-V102 as an example, remove special characters, take the ECU version number as WISE63P920V102, and add all the characters to get 61B , and the overflow part is not counted, only the lowest two digits of hexadecimal number are reserved, that is, the length of the last two bytes is 1B, and 1B is used as the ECU version authentication information of 1 authentication byte.
- the variable name authentication information includes 1 authentication byte. Assuming that the ini file has three variables ACComp_tiTrqDes_C, ACComp_tiTrqDyn_C and ACComp_tiTrqResv_C, convert the characters corresponding to the first letter AAA of all variable names into hexadecimal numbers, and add and sum to obtain C3 , and the overflow part of the sum is not counted, then C3 is used as the variable name authentication information of 1 authentication byte.
- the authentication information of the number of variables includes 1 authentication byte. For example, there are 312 variables in the ini file, and the converted hexadecimal number is 138. The overflow after conversion is not counted, and only the lowest two digits of the hexadecimal number are reserved. Then 38 is used as the variable number authentication information of 1 authentication byte.
- S220 Determine the legal use start time and legal use end time of the currently flashed ini file, and determine the time stamp of the configuration ini file according to the legal use start time and the legal use end time.
- the timestamp of the configuration ini file includes 7 authentication bytes. For example, if the legal use time of the ini file is set to be from August 1, 2021 to December 1, 2021, the value is 2021080120211201 , converted into a hexadecimal number is 72E2962A0B701, and the length is 7 bytes. If it is less than 7 bytes, the high bits will be filled with 0. Then 072E2962A0B701 is the timestamp of the configuration ini file with 7 authentication bytes.
- the ini file authentication information includes 10 authentication bytes; wherein, the ECU version authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte.
- the number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file includes 7 authentication bytes.
- the four items of the above-mentioned ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file jointly constitute the corresponding ini file authentication information, that is, the ini file authentication information is 1B C338072E 2962A0B701, a total of 10 authentication bytes.
- the ini file when generating the ini file, add the ini file authentication information of the currently flashed ini file to obtain the target ini file including the ini file authentication information.
- record the generated ini file and the ini file authentication information that is, the target ini file
- the ini file authentication information includes 10 length authentication bytes, that is, adding 10 length authentication bytes in the ini file can realize encryption
- the function of the ini file makes the ini file more secure, effectively prevents the client from maliciously tampering with the flashing data and content of the ini file, and ensures the information security of the system and terminal.
- the generation information and corresponding content of the ini file can be traced, which can It is convenient to query the historical records of ini files.
- the time stamp of the configuration ini file is included in the ini file authentication information, which specifies the legal use time of the ini file.
- FIG. 3 is a structural diagram of an ini file generation device provided in Embodiment 3 of the present application. This embodiment is applicable to the situation of effectively managing encryption and authentication of ini files.
- the generation device of described ini file comprises: information generation module 310 and file generation module 320, wherein:
- Information generation module 310 is used for determining the ini file configuration parameter information of current flash write ini file and the time stamp of configuration ini file;
- the file generation module 320 is used to determine the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configured ini file, and generate a target that includes the ini file authentication information ini file.
- the generating device of the ini file of the present embodiment by determining the ini file configuration parameter information of the current flash write ini file and the timestamp of configuring the ini file; Describe the ini file authentication information corresponding to the current flashing ini file, and generate a target ini file containing the ini file authentication information. It solves the lack of effective management of ini files at this stage, which may easily cause tampering of system information and data, and cannot guarantee the data security of clients when generating and using ini files, so as to improve the security of ini files and protect the security of configuration information .
- the ini file configuration parameter information includes ECU version authentication information, variable name authentication information and variable number authentication information;
- Determining the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file includes:
- the ini file authentication information corresponding to the current flashing ini file is determined according to the ECU version authentication information, the variable name authentication information, the variable number authentication information and the timestamp of the configuration ini file.
- the ini file authentication information includes 10 authentication bytes
- the ECU version authentication information includes 1 authentication byte
- the variable name authentication information includes 1 authentication byte
- the variable number authentication information includes 1 authentication byte
- the time stamp of the configuration ini file Contains 7 authentication bytes.
- the ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file are configured in hexadecimal numbers.
- determine the time stamp of the configuration ini file of the current flash write ini file including:
- the generating device of the ini file also includes:
- a time acquisition module configured to obtain the current use time of the ini file to be flashed, and the corresponding legal use start time and legal use end time of the ini file to be flashed;
- Brush write judging module be used for if described current use time is between legal use start time and legal use end time, then think that described ini file to be written ini file is authenticated by ini file; If described current use time is not in legal Between the start time of use and the end time of legal use, the flashing process of the ini file to be flashed is stopped.
- the generating device of the ini file also includes:
- the file storage module is used to store the target ini file in memory.
- the device for generating an ini file provided by each of the above embodiments can execute the method for generating an ini file provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method for generating an ini file.
- FIG. 4 is a schematic structural diagram of a computer device provided in Embodiment 4 of the present application.
- the computer device includes a processor 410, a memory 420, an input device 430, and an output device 440;
- the quantity can be one or more, and a processor 410 is taken as an example in FIG. Take the bus connection as an example.
- the memory 420 can be used to store software programs, computer-executable programs and modules, such as the program instructions/modules corresponding to the method for generating the ini file in the embodiment of the present application (for example, the device for generating the ini file
- the processor 410 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 420, that is, realizes the above-mentioned method for generating the ini file.
- the memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like.
- the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices.
- the memory 420 may further include memory located remotely from the processor 410, and these remote memories may be connected to the computer device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
- the input device 430 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the computer device.
- the output device 440 may include a display device such as a display screen.
- Embodiment 5 of the present application also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute a method for generating an ini file when executed by a computer processor, and the method for generating the ini file includes:
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
A method and apparatus for generating an ini file, a computer device, and a medium. The method for generating an ini file comprises: determining ini file configuration parameter information of a currently flashed ini file and a timestamp of a configuration ini file; determining ini file authentication information corresponding to the currently flashed ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file, and generating a target ini file containing the ini file authentication information, so that security of the ini file is improved, and configuration information security is protected.
Description
本申请要求于2021年9月28日提交中国专利局、申请号为202111140709.8、发明名称为“一种ini文件的生成方法、装置、计算机设备及介质”的国内申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the domestic application submitted to the China Patent Office on September 28, 2021, with the application number 202111140709.8, and the title of the invention is "a method, device, computer equipment and media for generating ini files", all of which are passed References are incorporated in this application.
本申请实施例涉及通信技术领域,例如一种ini文件的生成方法、装置、计算机设备及介质。The embodiments of the present application relate to the technical field of communications, for example, a method, device, computer equipment, and media for generating an ini file.
ini文件是Initialization File的缩写,即初始化文件,ini文件是用来对操作系统或程序初始化进行参数设置的文件,其内容一般是一些变量和值或者数据库的链接语句等。ini文件由节、键、值组成,例如:[EcuVersion]、Version=WISEC10-P201-V174,其中,[EcuVersion]为节,Version为键,WISEC10-P201-V174为值。The ini file is the abbreviation of Initialization File, that is, the initialization file. The ini file is a file used to set parameters for the initialization of the operating system or program. Its content is generally some variables and values or database link statements. The ini file consists of sections, keys, and values, for example: [EcuVersion], Version=WISEC10-P201-V174, where [EcuVersion] is the section, Version is the key, and WISEC10-P201-V174 is the value.
由于ini文件结构简单易于制作,熟悉程序系统的用户很容易伪造ini文件,则将对系统或者终端进行随意配置,现阶段缺乏对ini文件的有效管理,容易造成系统信息及数据的篡改,无法保障客户端在生成和使用ini文件时的数据安全。Because the structure of the ini file is simple and easy to make, users who are familiar with the program system can easily forge the ini file, and the system or terminal will be configured at will. At this stage, there is a lack of effective management of the ini file, which may easily cause tampering of system information and data, which cannot be guaranteed Data security for clients when generating and using ini files.
发明内容Contents of the invention
本申请实施例提供一种ini文件的生成方法、装置、计算机设备及介质,以实现提高ini文件的安全性,保护配置信息安全。Embodiments of the present application provide a method and device for generating an ini file, a computer device, and a medium, so as to improve the security of the ini file and protect configuration information security.
第一方面,本申请实施例提供了一种ini文件的生成方法,该ini文件的生成方法包括:In the first aspect, the embodiment of the present application provides a method for generating an ini file, and the method for generating the ini file includes:
确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;Determine the ini file configuration parameter information of the current flashing ini file and the timestamp of the configuration ini file;
根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。Determine the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configured ini file, and generate a target ini file containing the ini file authentication information.
进一步的,所述ini文件配置参数信息包括ECU版本认证信息、变量名称认证信息和变量个数认证信息;Further, the ini file configuration parameter information includes ECU version authentication information, variable name authentication information and variable number authentication information;
根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息包括:Determining the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file includes:
根据所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息。The ini file authentication information corresponding to the current flashing ini file is determined according to the ECU version authentication information, the variable name authentication information, the variable number authentication information and the timestamp of the configuration ini file.
进一步的,所述ini文件认证信息包括10个认证字节;Further, the ini file authentication information includes 10 authentication bytes;
其中,所述ECU版本认证信息包括1个认证字节,所述变量名称认证信息包括1个认证字节,所述变量个数认证信息包括1个认证字节,所述配置ini文件的时间戳包括7个认证字节。Wherein, the ECU version authentication information includes 1 authentication byte, the variable name authentication information includes 1 authentication byte, the variable number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file Contains 7 authentication bytes.
进一步的,所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳以16进制数配置。Further, the ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file are configured in hexadecimal numbers.
进一步的,确定当前刷写ini文件的配置ini文件的时间戳,包括:Further, determine the time stamp of the configuration ini file that is currently flashing the ini file, including:
确定当前刷写ini文件的合法使用起始时间和合法使用终止时间,并根据所述合法使用起始时间和所述合法使用终止时间确定所述配置ini文件的时间戳。Determine the legal use start time and legal use end time of the current flashing ini file, and determine the time stamp of the configuration ini file according to the legal use start time and the legal use end time.
进一步的,所述ini文件的生成方法还包括:Further, the method for generating the ini file also includes:
获取待刷写ini文件的当前使用时间,以及所述待刷写ini文件对应的合法使用起始时间和合法使用终止时间;Obtain the current use time of the ini file to be flashed, and the legal use start time and legal use end time corresponding to the ini file to be flashed;
若所述当前使用时间处于合法使用起始时间和合法使用终止时间之间,则认为所述待刷写ini文件通过ini文件认证;若所述当前使用时间未处于合法使用起始时间和合法使用终止时间之间,则停止所述待刷写ini文件的刷写进程。If the current use time is between the legal use start time and the legal use end time, then it is considered that the ini file to be flashed is authenticated by the ini file; if the current use time is not between the legal use start time and the legal use Between the termination times, the flashing process of the ini file to be flashed is stopped.
进一步的,所述ini文件的生成方法还包括:Further, the method for generating the ini file also includes:
将所述目标ini文件存储至内存中。The target ini file is stored in memory.
第二方面,本申请实施例还提供了一种ini文件的生成装置,该ini文件的生成装置包括:In the second aspect, the embodiment of the present application also provides a device for generating an ini file, and the device for generating the ini file includes:
信息生成模块,用于确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;The information generation module is used to determine the ini file configuration parameter information of the current flash write ini file and the timestamp of the configuration ini file;
文件生成模块,用于根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。The file generation module is used to determine the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file, and generate the target ini file that includes the ini file authentication information document.
第三方面,本申请实施例还提供了一种计算机设备,该计算机设备包括:In a third aspect, the embodiment of the present application also provides a computer device, which includes:
一个或多个处理器;one or more processors;
存储装置,用于存储多个程序,storage means for storing a plurality of programs,
当所述多个程序中的至少一个被所述一个或多个处理器执行时,使得所述一个或多个处理器实现本申请第一方面实施例所提供的一种ini文件的生成方法。When at least one of the multiple programs is executed by the one or more processors, the one or more processors are made to implement the method for generating an ini file provided in the embodiment of the first aspect of the present application.
第四方面,本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现本申请第一方面实施例所提供的一种ini文件的生成方法。In the fourth aspect, the embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the generation of an ini file provided in the embodiment of the first aspect of the present application is realized method.
为了更清楚地说明本申请实施例或相关技术中的技术方案,下面将对实施例或相关技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments or related technologies. Obviously, the accompanying drawings in the following description are only For some embodiments of the application, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1是本申请实施例一提供的一种ini文件的生成方法的流程图;Fig. 1 is a flowchart of a method for generating an ini file provided in Embodiment 1 of the present application;
图2是本申请实施例二提供的一种ini文件的生成方法的流程图;Fig. 2 is a flowchart of a method for generating an ini file provided in Embodiment 2 of the present application;
图3是本申请实施例三提供的一种ini文件的生成装置的结构图;FIG. 3 is a structural diagram of an ini file generating device provided in Embodiment 3 of the present application;
图4是本申请实施例四提供的一种计算机设备的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of a computer device provided in Embodiment 4 of the present application.
在ECU(Electronic Control Unit,电子控制单元)刷写变量时,用到的ini文件格式通常如下:When flashing variables in ECU (Electronic Control Unit, electronic control unit), the ini file format used is usually as follows:
起始字节start byte | 字段field | 数据类型type of data | 描述及要求Description and requirements |
00 | ECU软件版本ECU software version | STRINGSTRING | ASCII,最大20BytesASCII, maximum 20Bytes |
2020 | 变量信息variable information | WORDWORD | 键,值key, value |
上述ini文件很容易制作和破解,进而造成程序系统信息及数据的篡改。为解决现有的技术问题,本文提出了一种ini文件的生成方法、装置、计算机设备及介质,以实现提高ini文件的安全性,保护配置信息安全。The above-mentioned ini file is easy to make and crack, thereby causing tampering of program system information and data. In order to solve the existing technical problems, this paper proposes an ini file generation method, device, computer equipment and media, so as to improve the security of the ini file and protect the security of configuration information.
实施例一Embodiment one
图1为本申请实施例一提供的一种ini文件的生成方法的流程图,本实施例可适用于对ini文件加密认证进行有效管理的情况,该ini文件的生成方法可以由ini文件的生成装置来执行,该ini文件的生成装置可以通过软件和/或硬件的形式实现。该ini文件的生成方法具体包括如下步骤:Fig. 1 is the flow chart of the generation method of a kind of ini file that the embodiment one of the present application provides, present embodiment can be applicable to the situation that the encryption authentication of ini file is carried out effective management, the generation method of this ini file can be by the generation of ini file device, the device for generating the ini file can be implemented in the form of software and/or hardware. The method for generating the ini file specifically includes the following steps:
S110、确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳。S110. Determine the ini file configuration parameter information of the currently flashed ini file and the time stamp of the configuration ini file.
其中,所述ini文件配置参数信息包括ECU版本认证信息、变量名称认证信息和变量个数认证信息。Wherein, the ini file configuration parameter information includes ECU version authentication information, variable name authentication information and variable number authentication information.
具体的,根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息为:根据所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息。Specifically, according to the ini file configuration parameter information and the timestamp of the configured ini file, determining the ini file authentication information corresponding to the current flashing ini file is: according to the ECU version authentication information, the variable name authentication information , the authentication information of the number of variables and the time stamp of the configuration ini file determine the authentication information of the ini file corresponding to the currently flashed ini file.
在上述基础上,所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳以16进制数配置。Based on the above, the ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file are configured in hexadecimal numbers.
在本实施例中,将当前刷写ini文件的ECU版本信息去掉特殊字符,其余部分转换为16进制数,再将所有的字符相加求和后,只保留最低两位的16进制数,作为ECU版本认证信息。其中,ECU版本信息可以由ECU 自行配置生成,或是本领域技术人员预置于程序系统中,本实施例对此不作任何限制。In this embodiment, the special characters are removed from the ECU version information of the currently written ini file, and the rest is converted into a hexadecimal number, and after adding and summing all the characters, only the lowest two digits of the hexadecimal number are kept , as the ECU version authentication information. Wherein, the ECU version information can be generated by the ECU itself, or can be preset in the program system by those skilled in the art, which is not limited in this embodiment.
获取当前刷写ini文件的所有变量,将所有变量名称的首字母对应的字符转换为16进制数,再相加求和后,只保留最低两位的16进制数,作为变量名称认证信息。Obtain all the variables of the currently flashed ini file, convert the characters corresponding to the first letters of all variable names into hexadecimal numbers, and after adding and summing, only keep the lowest two digits of hexadecimal numbers as the variable name authentication information .
在上述基础上,获取当前刷写ini文件的所有变量的个数,将变量个数转换为16进制数,只保留最低两位的16进制数,作为变量个数认证信息。其中,当前刷写ini文件的变量个数由ini文件决定,本实施例对变量个数不作过多说明,以可读取到的变量的具体个数为准。On the basis of the above, obtain the number of all variables currently flashing the ini file, convert the number of variables into a hexadecimal number, and only keep the lowest two digits of the hexadecimal number as the authentication information for the number of variables. Wherein, the number of variables currently flashed to the ini file is determined by the ini file. In this embodiment, the number of variables is not described too much, and the specific number of variables that can be read shall prevail.
进一步的,确定当前刷写ini文件的配置ini文件的时间戳,包括:确定当前刷写ini文件的合法使用起始时间和合法使用终止时间,并根据所述合法使用起始时间和所述合法使用终止时间确定所述配置ini文件的时间戳。Further, determining the time stamp of the configuration ini file of the current flashing ini file includes: determining the legal use start time and the legal use end time of the current flashing ini file, and according to the legal use start time and the legal Use the end time to determine the timestamp of the configuration ini file.
其中,配置ini文件的时间戳规定了ini文件的合法使用时间,则ini文件的合法使用时间包括合法使用起始时间和合法使用终止时间。Wherein, the time stamp of the configuration ini file specifies the legal use time of the ini file, and the legal use time of the ini file includes a legal use start time and a legal use end time.
在本实施例中,将当前刷写ini文件的合法使用起始时间和合法使用终止时间作为一个数值,转换为16进制数,生成配置ini文件的时间戳。In this embodiment, the legal use start time and the legal use end time of the current flashing ini file are taken as a value, converted into a hexadecimal number, and the time stamp of the configuration ini file is generated.
在一实施例中,所述ini文件认证信息包括10个认证字节;其中,所述ECU版本认证信息包括1个认证字节,所述变量名称认证信息包括1个认证字节,所述变量个数认证信息包括1个认证字节,所述配置ini文件的时间戳包括7个认证字节。In one embodiment, the ini file authentication information includes 10 authentication bytes; wherein, the ECU version authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte. The number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file includes 7 authentication bytes.
S120、根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。S120. Determine the ini file authentication information corresponding to the currently flashed ini file according to the ini file configuration parameter information and the timestamp of the configured ini file, and generate a target ini file including the ini file authentication information.
可以理解的是,上述所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳四项,共同组成了所述当前刷写ini文件对应的ini文件认证信息,实现加密ini文件的作用,使ini文件更加安全。It can be understood that the four items of the above-mentioned ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file jointly constitute the corresponding The authentication information of the ini file realizes the function of encrypting the ini file and makes the ini file more secure.
在生成ini文件时,添加当前刷写ini文件的ini文件认证信息,得到 包含所述ini文件认证信息的目标ini文件,有效的防止客户端恶意篡改ini文件的刷写数据和内容,保障了程序系统和终端的信息安全。When generating the ini file, add the ini file authentication information of the currently flashed ini file to obtain the target ini file containing the ini file authentication information, effectively preventing the client from maliciously tampering with the flashing data and content of the ini file, and ensuring the program System and terminal information security.
在上述实施例的基础上,所述ini文件的生成方法还包括:获取待刷写ini文件的当前使用时间,以及所述待刷写ini文件对应的合法使用起始时间和合法使用终止时间;若所述当前使用时间处于合法使用起始时间和合法使用终止时间之间,则认为所述待刷写ini文件通过ini文件认证;若所述当前使用时间未处于合法使用起始时间和合法使用终止时间之间,则停止所述待刷写ini文件的刷写进程。On the basis of the foregoing embodiments, the method for generating the ini file further includes: obtaining the current use time of the ini file to be flashed, and the legal use start time and legal use end time corresponding to the ini file to be flashed; If the current use time is between the legal use start time and the legal use end time, then it is considered that the ini file to be flashed is authenticated by the ini file; if the current use time is not between the legal use start time and the legal use Between the termination times, the flashing process of the ini file to be flashed is stopped.
在上述基础上,若在读取待刷写ini文件之前,则确定待刷写ini文件的当前使用时间,并通过待刷写ini文件对应的ini文件认证信息,获取待刷写ini文件对应的ini文件认证信息中的配置ini文件的时间戳,即得到待刷写ini文件对应的合法使用起始时间和合法使用终止时间。On the basis of the above, if before reading the ini file to be written, determine the current usage time of the ini file to be written, and obtain the corresponding The time stamp of configuring the ini file in the ini file authentication information is to obtain the legal use start time and legal use end time corresponding to the ini file to be flashed.
若所述当前使用时间处于合法使用起始时间和合法使用终止时间之间,则认为所述待刷写ini文件通过ini文件认证,即待刷写ini文件处于合法时间段内;若所述当前使用时间未处于合法使用起始时间和合法使用终止时间之间,则无法通过ini文件认证,即待刷写ini文件未处于合法时间段内,停止所述待刷写ini文件的刷写进程,以保证ini文件的合法使用,保护配置信息安全。If the current use time is between the legal use start time and the legal use end time, then it is considered that the ini file to be flashed is authenticated by the ini file, that is, the ini file to be flashed is in the legal time period; if the current If the use time is not between the legal use start time and the legal use end time, the ini file authentication cannot be passed, that is, the ini file to be flashed is not within the legal time period, and the flashing process of the ini file to be flashed is stopped. In order to ensure the legal use of ini files and protect the security of configuration information.
在一实施例中,所述ini文件的生成方法还包括:将所述目标ini文件存储至内存中。In an embodiment, the method for generating the ini file further includes: storing the target ini file in memory.
可以理解的是,包含所述ini文件认证信息的目标ini文件存储至程序系统的内存中。在需要对待刷写ini文件进行查询其的生成信息和合法使用时间时,可以通过存储至程序系统的内存中的包含所述ini文件认证信息的ini文件进行查询,通过待刷写ini文件的ini文件认证信息追溯ini文件的生成信息和相应ini文件认证信息内容,方便查询ini文件的存储历史记录,提高.ini文件的安全性。It can be understood that the target ini file containing the authentication information of the ini file is stored in the memory of the program system. When it is necessary to query the generation information and legal use time of the ini file to be flashed, it can be queried through the ini file containing the authentication information of the ini file stored in the memory of the program system, and through the ini file of the ini file to be flashed The file authentication information traces the generation information of the ini file and the content of the corresponding ini file authentication information, which is convenient for querying the storage history of the ini file and improving the security of the .ini file.
本申请实施例的技术方案,通过确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信 息,并生成包含所述ini文件认证信息的目标ini文件。解决了现阶段缺乏对ini文件的有效管理,容易造成系统信息及数据的篡改,无法保障客户端在生成和使用ini文件时的数据安全问题,以实现提高ini文件的安全性,保护配置信息安全。In the technical solution of the embodiment of the present application, by determining the ini file configuration parameter information of the current ini file and the timestamp of configuring the ini file; according to the ini file configuration parameter information and the timestamp of the configuration ini file, the current Flash the ini file authentication information corresponding to the ini file, and generate a target ini file containing the ini file authentication information. It solves the lack of effective management of ini files at this stage, which may easily cause tampering of system information and data, and cannot guarantee the data security of clients when generating and using ini files, so as to improve the security of ini files and protect the security of configuration information .
实施例二Embodiment two
图2为本申请实施例二提供的一种ini文件的生成方法的流程图,本实施例以上述实施例为基础进行优化。FIG. 2 is a flow chart of a method for generating an ini file provided in Embodiment 2 of the present application. This embodiment is optimized on the basis of the foregoing embodiments.
相应的,本实施例的方法具体包括:Correspondingly, the method in this embodiment specifically includes:
S210、确定当前刷写ini文件的ECU版本认证信息、变量名称认证信息和变量个数认证信息。S210. Determine the ECU version authentication information, variable name authentication information, and variable number authentication information of the currently flashed ini file.
在一实施例中,所述ECU版本认证信息包括1个认证字节,以ECU版本号WISE63-P920-V102为例,去掉特殊字符,取ECU版本号为WISE63P920V102,所有字符相加求和得到61B,和的溢出部分不算,只保留最低两位的16进制数,即最后两位字节长度为1B,1B作为1个认证字节的ECU版本认证信息。In one embodiment, the ECU version authentication information includes 1 authentication byte. Take the ECU version number WISE63-P920-V102 as an example, remove special characters, take the ECU version number as WISE63P920V102, and add all the characters to get 61B , and the overflow part is not counted, only the lowest two digits of hexadecimal number are reserved, that is, the length of the last two bytes is 1B, and 1B is used as the ECU version authentication information of 1 authentication byte.
所述变量名称认证信息包括1个认证字节,假设ini文件共有ACComp_tiTrqDes_C、ACComp_tiTrqDyn_C和ACComp_tiTrqResv_C三个变量,将所有变量名称的首字母AAA对应的字符转换为16进制数,相加求和得到C3,和的溢出部分不算,则C3作为1个认证字节的变量名称认证信息。The variable name authentication information includes 1 authentication byte. Assuming that the ini file has three variables ACComp_tiTrqDes_C, ACComp_tiTrqDyn_C and ACComp_tiTrqResv_C, convert the characters corresponding to the first letter AAA of all variable names into hexadecimal numbers, and add and sum to obtain C3 , and the overflow part of the sum is not counted, then C3 is used as the variable name authentication information of 1 authentication byte.
所述变量个数认证信息包括1个认证字节,例如,ini文件中有312个变量,转换为16进制数为138,转换后溢出部分不计,只保留最低两位的16进制数,则38作为1个认证字节的变量个数认证信息。The authentication information of the number of variables includes 1 authentication byte. For example, there are 312 variables in the ini file, and the converted hexadecimal number is 138. The overflow after conversion is not counted, and only the lowest two digits of the hexadecimal number are reserved. Then 38 is used as the variable number authentication information of 1 authentication byte.
S220、确定当前刷写ini文件的合法使用起始时间和合法使用终止时间,并根据所述合法使用起始时间和所述合法使用终止时间确定所述配置ini文件的时间戳。S220. Determine the legal use start time and legal use end time of the currently flashed ini file, and determine the time stamp of the configuration ini file according to the legal use start time and the legal use end time.
在一实施例中,所述配置ini文件的时间戳包括7个认证字节,例如,设定ini文件的合法使用时间为2021年8月1日至2021年12月1日,则 取数值2021080120211201,转换为16进制数为72E2962A0B701,长度为7个字节,若不足7个字节,则在高位用0补足,则072E2962A0B701为7个认证字节的配置ini文件的时间戳。In one embodiment, the timestamp of the configuration ini file includes 7 authentication bytes. For example, if the legal use time of the ini file is set to be from August 1, 2021 to December 1, 2021, the value is 2021080120211201 , converted into a hexadecimal number is 72E2962A0B701, and the length is 7 bytes. If it is less than 7 bytes, the high bits will be filled with 0. Then 072E2962A0B701 is the timestamp of the configuration ini file with 7 authentication bytes.
S230、根据所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息。S230. Determine the ini file authentication information corresponding to the currently flashed ini file according to the ECU version authentication information, the variable name authentication information, the variable number authentication information, and the timestamp of the configured ini file.
在本实施例中,所述ini文件认证信息包括10个认证字节;其中,所述ECU版本认证信息包括1个认证字节,所述变量名称认证信息包括1个认证字节,所述变量个数认证信息包括1个认证字节,所述配置ini文件的时间戳包括7个认证字节。In this embodiment, the ini file authentication information includes 10 authentication bytes; wherein, the ECU version authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte, and the variable name authentication information includes 1 authentication byte. The number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file includes 7 authentication bytes.
在上述基础上,上述所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳四项,共同组成了所述当前刷写ini文件对应的ini文件认证信息,即ini文件认证信息为1B C338072E 2962A0B701,共计10个认证字节。On the basis of the above, the four items of the above-mentioned ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file jointly constitute the corresponding ini file authentication information, that is, the ini file authentication information is 1B C338072E 2962A0B701, a total of 10 authentication bytes.
S240、生成包含所述ini文件认证信息的目标ini文件。S240. Generate a target ini file including the authentication information of the ini file.
具体的,在生成ini文件时,添加当前刷写ini文件的ini文件认证信息,得到包含所述ini文件认证信息的目标ini文件。Specifically, when generating the ini file, add the ini file authentication information of the currently flashed ini file to obtain the target ini file including the ini file authentication information.
S250、将所述目标ini文件存储至内存中。S250. Store the target ini file into memory.
具体的,记录生成的ini文件和ini文件认证信息,即目标ini文件,将ini文件和ini文件认证信息存储至程序系统的内存中,以在后续通过ini文件认证信息可以查询对应的ini文件的生成信息。Specifically, record the generated ini file and the ini file authentication information, that is, the target ini file, store the ini file and the ini file authentication information in the memory of the program system, so that the corresponding ini file can be queried through the ini file authentication information in the subsequent Generate information.
在另一实施例中,获取待刷写ini文件的当前使用时间,以及所述待刷写ini文件对应的合法使用起始时间和合法使用终止时间;若所述当前使用时间处于合法使用起始时间和合法使用终止时间之间,则认为所述待刷写ini文件通过ini文件认证;若所述当前使用时间未处于合法使用起始时间和合法使用终止时间之间,则停止所述待刷写ini文件的刷写进程。In another embodiment, obtain the current use time of the ini file to be flashed, and the corresponding legal use start time and legal use end time of the ini file to be flashed; if the current use time is at the start of legal use time and the legal use end time, then it is considered that the ini file to be flashed has passed the ini file authentication; if the current use time is not between the legal use start time and the legal use end time, then stop the ini file to be flashed The flashing process that writes the ini file.
本申请实施例的技术方案,通过在生成的ini文件时添加ini文件认证信息,ini文件认证信息包含10个长度认证字节,即在ini文件中增加10个长度认证字节,既可以实现加密ini文件的作用,使ini文件更加安全, 有效的防止客户端恶意篡改ini文件的刷写数据和内容,保障了系统和终端的信息安全,同时,可以追溯ini文件的生成信息和相应内容,可以方便查询ini文件的历史记录。另一方面,在ini文件认证信息中包含配置ini文件的时间戳,规定了ini文件的合法使用时间。In the technical solution of the embodiment of the present application, by adding ini file authentication information when generating the ini file, the ini file authentication information includes 10 length authentication bytes, that is, adding 10 length authentication bytes in the ini file can realize encryption The function of the ini file makes the ini file more secure, effectively prevents the client from maliciously tampering with the flashing data and content of the ini file, and ensures the information security of the system and terminal. At the same time, the generation information and corresponding content of the ini file can be traced, which can It is convenient to query the historical records of ini files. On the other hand, the time stamp of the configuration ini file is included in the ini file authentication information, which specifies the legal use time of the ini file.
实施例三Embodiment three
图3为本申请实施例三提供的一种ini文件的生成装置的结构图,本实施例可适用于对ini文件加密认证进行有效管理的情况。FIG. 3 is a structural diagram of an ini file generation device provided in Embodiment 3 of the present application. This embodiment is applicable to the situation of effectively managing encryption and authentication of ini files.
如图3所示,所述ini文件的生成装置包括:信息生成模块310和文件生成模块320,其中:As shown in Figure 3, the generation device of described ini file comprises: information generation module 310 and file generation module 320, wherein:
信息生成模块310,用于确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳; Information generation module 310, is used for determining the ini file configuration parameter information of current flash write ini file and the time stamp of configuration ini file;
文件生成模块320,用于根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。The file generation module 320 is used to determine the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configured ini file, and generate a target that includes the ini file authentication information ini file.
本实施例的ini文件的生成装置,通过确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。解决了现阶段缺乏对ini文件的有效管理,容易造成系统信息及数据的篡改,无法保障客户端在生成和使用ini文件时的数据安全问题,以实现提高ini文件的安全性,保护配置信息安全。The generating device of the ini file of the present embodiment, by determining the ini file configuration parameter information of the current flash write ini file and the timestamp of configuring the ini file; Describe the ini file authentication information corresponding to the current flashing ini file, and generate a target ini file containing the ini file authentication information. It solves the lack of effective management of ini files at this stage, which may easily cause tampering of system information and data, and cannot guarantee the data security of clients when generating and using ini files, so as to improve the security of ini files and protect the security of configuration information .
在上述各实施例的基础上,所述ini文件配置参数信息包括ECU版本认证信息、变量名称认证信息和变量个数认证信息;On the basis of the foregoing embodiments, the ini file configuration parameter information includes ECU version authentication information, variable name authentication information and variable number authentication information;
根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息包括:Determining the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file includes:
根据所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息。The ini file authentication information corresponding to the current flashing ini file is determined according to the ECU version authentication information, the variable name authentication information, the variable number authentication information and the timestamp of the configuration ini file.
在上述各实施例的基础上,所述ini文件认证信息包括10个认证字节;On the basis of the foregoing embodiments, the ini file authentication information includes 10 authentication bytes;
其中,所述ECU版本认证信息包括1个认证字节,所述变量名称认证信息包括1个认证字节,所述变量个数认证信息包括1个认证字节,所述配置ini文件的时间戳包括7个认证字节。Wherein, the ECU version authentication information includes 1 authentication byte, the variable name authentication information includes 1 authentication byte, the variable number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file Contains 7 authentication bytes.
在上述各实施例的基础上,所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳以16进制数配置。On the basis of the above embodiments, the ECU version authentication information, the variable name authentication information, the variable number authentication information and the time stamp of the configuration ini file are configured in hexadecimal numbers.
在上述各实施例的基础上,确定当前刷写ini文件的配置ini文件的时间戳,包括:On the basis of the above-mentioned embodiments, determine the time stamp of the configuration ini file of the current flash write ini file, including:
确定当前刷写ini文件的合法使用起始时间和合法使用终止时间,并根据所述合法使用起始时间和所述合法使用终止时间确定所述配置ini文件的时间戳。Determine the legal use start time and legal use end time of the current flashing ini file, and determine the time stamp of the configuration ini file according to the legal use start time and the legal use end time.
在上述各实施例的基础上,所述ini文件的生成装置还包括:On the basis of the above-mentioned embodiments, the generating device of the ini file also includes:
时间获取模块,用于获取待刷写ini文件的当前使用时间,以及所述待刷写ini文件对应的合法使用起始时间和合法使用终止时间;A time acquisition module, configured to obtain the current use time of the ini file to be flashed, and the corresponding legal use start time and legal use end time of the ini file to be flashed;
刷写判断模块,用于若所述当前使用时间处于合法使用起始时间和合法使用终止时间之间,则认为所述待刷写ini文件通过ini文件认证;若所述当前使用时间未处于合法使用起始时间和合法使用终止时间之间,则停止所述待刷写ini文件的刷写进程。Brush write judging module, be used for if described current use time is between legal use start time and legal use end time, then think that described ini file to be written ini file is authenticated by ini file; If described current use time is not in legal Between the start time of use and the end time of legal use, the flashing process of the ini file to be flashed is stopped.
在上述各实施例的基础上,所述ini文件的生成装置还包括:On the basis of the above-mentioned embodiments, the generating device of the ini file also includes:
文件存储模块,用于将所述目标ini文件存储至内存中。The file storage module is used to store the target ini file in memory.
上述各实施例所提供的ini文件的生成装置可执行本申请任意实施例所提供的ini文件的生成方法,具备执行ini文件的生成方法相应的功能模块和有益效果。The device for generating an ini file provided by each of the above embodiments can execute the method for generating an ini file provided by any embodiment of the present application, and has corresponding functional modules and beneficial effects for executing the method for generating an ini file.
实施例四Embodiment Four
图4为本申请实施例四提供的一种计算机设备的结构示意图,如图4所示,该计算机设备包括处理器410、存储器420、输入装置430和输出装置440;计算机设备中处理器410的数量可以是一个或多个,图4中以一 个处理器410为例;计算机设备中的处理器410、存储器420、输入装置430和输出装置440可以通过总线或其他方式连接,图4中以通过总线连接为例。FIG. 4 is a schematic structural diagram of a computer device provided in Embodiment 4 of the present application. As shown in FIG. 4, the computer device includes a processor 410, a memory 420, an input device 430, and an output device 440; The quantity can be one or more, and a processor 410 is taken as an example in FIG. Take the bus connection as an example.
存储器420作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例中的ini文件的生成方法对应的程序指令/模块(例如,ini文件的生成装置中的信息生成模块310和文件生成模块320)。处理器410通过运行存储在存储器420中的软件程序、指令以及模块,从而执行计算机设备的各种功能应用以及数据处理,即实现上述的ini文件的生成方法。The memory 420, as a computer-readable storage medium, can be used to store software programs, computer-executable programs and modules, such as the program instructions/modules corresponding to the method for generating the ini file in the embodiment of the present application (for example, the device for generating the ini file The information generation module 310 and the file generation module 320 in ). The processor 410 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 420, that is, realizes the above-mentioned method for generating the ini file.
存储器420可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器420可进一步包括相对于处理器410远程设置的存储器,这些远程存储器可以通过网络连接至计算机设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. In some examples, the memory 420 may further include memory located remotely from the processor 410, and these remote memories may be connected to the computer device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置430可用于接收输入的数字或字符信息,以及产生与计算机设备的用户设置以及功能控制有关的键信号输入。输出装置440可包括显示屏等显示设备。The input device 430 can be used to receive input numbers or character information, and generate key signal input related to user settings and function control of the computer device. The output device 440 may include a display device such as a display screen.
实施例五Embodiment five
本申请实施例五还提供一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种ini文件的生成方法,该ini文件的生成方法包括:Embodiment 5 of the present application also provides a storage medium containing computer-executable instructions, the computer-executable instructions are used to execute a method for generating an ini file when executed by a computer processor, and the method for generating the ini file includes:
确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;Determine the ini file configuration parameter information of the current flashing ini file and the timestamp of the configuration ini file;
根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证 信息的目标ini文件。Determine the corresponding ini file authentication information of the current flash write ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file, and generate a target ini file that includes the ini file authentication information.
Claims (10)
- ini文件的生成方法,包括:The generation method of the ini file, including:确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;Determine the ini file configuration parameter information of the current flashing ini file and the timestamp of the configuration ini file;根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。Determine the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configured ini file, and generate a target ini file containing the ini file authentication information.
- 根据权利要求1所述的ini文件的生成方法,其中,所述ini文件配置参数信息包括ECU版本认证信息、变量名称认证信息和变量个数认证信息;The generation method of ini file according to claim 1, wherein, said ini file configuration parameter information comprises ECU version authentication information, variable name authentication information and variable number authentication information;根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息包括:Determining the ini file authentication information corresponding to the current flashing ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file includes:根据所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息。The ini file authentication information corresponding to the current flashing ini file is determined according to the ECU version authentication information, the variable name authentication information, the variable number authentication information and the timestamp of the configuration ini file.
- 根据权利要求2所述的ini文件的生成方法,其中,所述ini文件认证信息包括10个认证字节;The generation method of ini file according to claim 2, wherein, said ini file authentication information comprises 10 authentication bytes;其中,所述ECU版本认证信息包括1个认证字节,所述变量名称认证信息包括1个认证字节,所述变量个数认证信息包括1个认证字节,所述配置ini文件的时间戳包括7个认证字节。Wherein, the ECU version authentication information includes 1 authentication byte, the variable name authentication information includes 1 authentication byte, the variable number authentication information includes 1 authentication byte, and the time stamp of the configuration ini file Contains 7 authentication bytes.
- 根据权利要求2所述的ini文件的生成方法,其中,所述ECU版本认证信息、所述变量名称认证信息、所述变量个数认证信息和所述配置ini文件的时间戳以16进制数配置。The generation method of ini file according to claim 2, wherein, the time stamp of described ECU version authentication information, described variable name authentication information, described variable number authentication information and described configuration ini file is in hexadecimal number configure.
- 根据权利要求1所述的ini文件的生成方法,其中,确定当前刷写ini文件的配置ini文件的时间戳,包括:The generation method of ini file according to claim 1, wherein, determine the time stamp of the configuration ini file of current brush write ini file, comprise:确定当前刷写ini文件的合法使用起始时间和合法使用终止时间,并根据所述合法使用起始时间和所述合法使用终止时间确定所述配置ini文件的时间戳。Determine the legal use start time and legal use end time of the current flashing ini file, and determine the time stamp of the configuration ini file according to the legal use start time and the legal use end time.
- 根据权利要求5所述的ini文件的生成方法,其中,所述ini文件的 生成方法还包括:The generation method of ini file according to claim 5, wherein, the generation method of described ini file also comprises:获取待刷写ini文件的当前使用时间,以及所述待刷写ini文件对应的合法使用起始时间和合法使用终止时间;Obtain the current use time of the ini file to be flashed, and the legal use start time and legal use end time corresponding to the ini file to be flashed;若所述当前使用时间处于合法使用起始时间和合法使用终止时间之间,则认为所述待刷写ini文件通过ini文件认证;若所述当前使用时间未处于合法使用起始时间和合法使用终止时间之间,则停止所述待刷写ini文件的刷写进程。If the current use time is between the legal use start time and the legal use end time, then it is considered that the ini file to be flashed is authenticated by the ini file; if the current use time is not between the legal use start time and the legal use Between the termination times, the flashing process of the ini file to be flashed is stopped.
- 根据权利要求1所述的ini文件的生成方法,其中,所述ini文件的生成方法还包括:The generation method of ini file according to claim 1, wherein, the generation method of described ini file also comprises:将所述目标ini文件存储至内存中。The target ini file is stored in memory.
- ini文件的生成装置,包括:ini file generation device, including:信息生成模块,设置为确定当前刷写ini文件的ini文件配置参数信息以及配置ini文件的时间戳;The information generation module is configured to determine the ini file configuration parameter information of the current flash write ini file and the timestamp of the configuration ini file;文件生成模块,设置为根据所述ini文件配置参数信息和所述配置ini文件的时间戳确定所述当前刷写ini文件对应的ini文件认证信息,并生成包含所述ini文件认证信息的目标ini文件。The file generation module is configured to determine the corresponding ini file authentication information of the current brush write ini file according to the ini file configuration parameter information and the timestamp of the configuration ini file, and generate the target ini file that includes the ini file authentication information document.
- 一种计算机设备,所述计算机设备包括:A computer device comprising:一个或多个处理器;one or more processors;存储装置,设置为存储一个或多个程序;a storage device configured to store one or more programs;当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-7中任一项所述的ini文件的生成方法。When the one or more programs are executed by the one or more processors, the one or more processors are made to implement the method for generating an ini file according to any one of claims 1-7.
- 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-7中任一项所述的ini文件的生成方法。A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method for generating the ini file according to any one of claims 1-7 is implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111140709.8 | 2021-09-28 | ||
CN202111140709.8A CN113867818B (en) | 2021-09-28 | 2021-09-28 | Method, device, computer equipment and medium for generating ini file |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023051573A1 true WO2023051573A1 (en) | 2023-04-06 |
Family
ID=78991688
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/121994 WO2023051573A1 (en) | 2021-09-28 | 2022-09-28 | Method and apparatus for generating ini file, computer device, and medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113867818B (en) |
WO (1) | WO2023051573A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113867818B (en) * | 2021-09-28 | 2024-04-16 | 潍柴动力股份有限公司 | Method, device, computer equipment and medium for generating ini file |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6574657B1 (en) * | 1999-05-03 | 2003-06-03 | Symantec Corporation | Methods and apparatuses for file synchronization and updating using a signature list |
US20040098427A1 (en) * | 2002-11-18 | 2004-05-20 | Luosheng Peng | Device memory management during electronic file updating |
US20090094421A1 (en) * | 2007-10-05 | 2009-04-09 | Phoenix Technologies Ltd. | Manufacturing mode for secure firmware using lock byte |
US20110161335A1 (en) * | 2009-12-30 | 2011-06-30 | Symantec Corporation | Locating the latest version of replicated data files |
CN107800819A (en) * | 2017-11-17 | 2018-03-13 | 深圳市泉眼网络科技有限公司 | A kind of generation method of file identification, device and server |
CN113867818A (en) * | 2021-09-28 | 2021-12-31 | 潍柴动力股份有限公司 | Method and device for generating ini file, computer equipment and medium |
Family Cites Families (39)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008130610A1 (en) * | 2007-04-20 | 2008-10-30 | Mark Williams | Vertical curve system for surface grading |
US7720659B2 (en) * | 2007-06-30 | 2010-05-18 | Schlumberger Technology Corporation | Simulating fluid flow in reservoir with modified grid |
EP2270577A1 (en) * | 2009-06-30 | 2011-01-05 | Essilor International (Compagnie Générale D'Optique) | Method of and apparatus for generating a surface of an optical lens |
CN102833264B (en) * | 2012-09-07 | 2016-03-30 | 北京星网锐捷网络技术有限公司 | Prevent authenticated user from passing through to act on behalf of the method for fee evasion, device and Authentication Client |
US8838848B2 (en) * | 2012-09-14 | 2014-09-16 | Dell Products Lp | Systems and methods for intelligent system profile unique data management |
US9298371B1 (en) * | 2014-12-22 | 2016-03-29 | American Megatrends, Inc. | System and method of reducing write cycles and increasing longevity of non-volatile memory in baseboard management controller (BMC) |
CN107015914B (en) * | 2016-01-28 | 2020-12-22 | 长城汽车股份有限公司 | Data calibration method and system |
DK3249955T3 (en) * | 2016-05-23 | 2019-11-18 | Oticon As | CONFIGURABLE HEARING, INCLUDING A RADIATION FORM FILTER UNIT AND AMPLIFIER |
US10536314B2 (en) * | 2016-06-03 | 2020-01-14 | Centre Of Excellence In Wireless Technology | OFDMA apparatus and method thereof for performing OFDM based communication in wireless communication system |
CN106850311B (en) * | 2017-03-03 | 2019-12-13 | 上海蔚来汽车有限公司 | Data security transmission system and method for firmware upgrade |
CN107273749B (en) * | 2017-05-31 | 2019-12-27 | 武汉英泰斯特电子技术有限公司 | Vehicle ECU file safe flashing method and system |
CN107637014B (en) * | 2017-08-02 | 2020-11-24 | 福建联迪商用设备有限公司 | Configurable POS machine key pair generation method and storage medium |
CN107450931A (en) * | 2017-08-15 | 2017-12-08 | 竞技世界(北京)网络技术有限公司 | Visualizing editing method and device based on INI configuration files |
CN107918863A (en) * | 2017-10-19 | 2018-04-17 | 阿里巴巴集团控股有限公司 | Preposition processing and collocation method, device and equipment based on financial product |
CN107919955B (en) * | 2017-12-28 | 2021-02-26 | 北京奇虎科技有限公司 | Vehicle network security authentication method, system, vehicle, device and medium |
CN109212999B (en) * | 2018-07-20 | 2020-09-01 | 北京航空航天大学 | Intelligent generation method and system for digital satellite simulation working condition |
CN109445892A (en) * | 2018-10-15 | 2019-03-08 | 珠海格力电器股份有限公司 | A kind of data display method, device, electronic equipment and storage medium |
CN109871225B (en) * | 2019-02-22 | 2022-05-27 | 北京经纬恒润科技股份有限公司 | Electronic control unit ECU upgrading method and ECU |
CN109947465B (en) * | 2019-03-29 | 2022-06-14 | 北京经纬恒润科技股份有限公司 | Data processing method and system |
CN110138774A (en) * | 2019-05-14 | 2019-08-16 | 重庆天蓬网络有限公司 | A kind of hold-up interception method of the general CC attack of dynamic configuration |
CN110213113B (en) * | 2019-06-19 | 2021-12-03 | 中信科移动通信技术股份有限公司 | WEB configuration management method of base station and base station |
CN110196715A (en) * | 2019-06-25 | 2019-09-03 | 上海仪电汽车电子系统有限公司 | A kind of code generating system and method |
CN110460581B (en) * | 2019-07-12 | 2021-09-28 | 捷德(中国)科技有限公司 | File sharing method, system, equipment, SE device, shared end and medium |
CN110365540A (en) * | 2019-07-30 | 2019-10-22 | 上海朝旭电子科技有限公司 | A kind of security system data processing equipment |
CN111274385A (en) * | 2019-08-29 | 2020-06-12 | 无锡畅云网络有限公司 | Log clustering classification technology based on text similarity |
CN110673892B (en) * | 2019-09-17 | 2023-01-03 | 中电万维信息技术有限责任公司 | Interface unified calling method based on component configuration |
CN110824982A (en) * | 2019-10-23 | 2020-02-21 | 武汉光庭信息技术股份有限公司 | ECU remote debugging method, server and storage medium |
CN112749383A (en) * | 2019-10-29 | 2021-05-04 | 上海商汤智能科技有限公司 | Software authentication method and related product |
CN110990282B (en) * | 2019-12-04 | 2023-07-21 | 中国直升机设计研究所 | Automatic unit testing method |
CN111010305A (en) * | 2019-12-23 | 2020-04-14 | 烽火通信科技股份有限公司 | Configuration management system and method based on NETCONF protocol |
CN111182066A (en) * | 2019-12-31 | 2020-05-19 | 青梧桐有限责任公司 | Log level dynamic adjustment method based on token authentication |
CN111353168A (en) * | 2020-02-27 | 2020-06-30 | 闻泰通讯股份有限公司 | Multimedia file management method, device, equipment and storage medium |
CN111464639B (en) * | 2020-03-31 | 2023-01-24 | 潍柴动力股份有限公司 | Data acquisition method and device, storage medium and processor |
CN112084159B (en) * | 2020-07-28 | 2023-02-21 | 重庆攸亮科技股份有限公司 | File synchronization system and method based on Bluetooth communication |
CN112202665B (en) * | 2020-09-30 | 2022-03-15 | 郑州信大捷安信息技术股份有限公司 | Vehicle-mounted security gateway and data communication method thereof |
CN112363984B (en) * | 2020-11-13 | 2024-04-23 | 北京天融信网络安全技术有限公司 | Method and device for generating in-vehicle security rule file |
CN112540958B (en) * | 2020-12-08 | 2023-08-29 | 北京百度网讯科技有限公司 | File processing method, device, equipment and computer storage medium |
CN112988218A (en) * | 2021-02-05 | 2021-06-18 | 上海航天卫星应用有限公司 | Configurable information flow management method and system |
CN112883382B (en) * | 2021-03-03 | 2023-05-23 | 一汽解放汽车有限公司 | Vehicle writing method, internet of vehicles box, vehicle and storage medium |
-
2021
- 2021-09-28 CN CN202111140709.8A patent/CN113867818B/en active Active
-
2022
- 2022-09-28 WO PCT/CN2022/121994 patent/WO2023051573A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6574657B1 (en) * | 1999-05-03 | 2003-06-03 | Symantec Corporation | Methods and apparatuses for file synchronization and updating using a signature list |
US20040098427A1 (en) * | 2002-11-18 | 2004-05-20 | Luosheng Peng | Device memory management during electronic file updating |
US20090094421A1 (en) * | 2007-10-05 | 2009-04-09 | Phoenix Technologies Ltd. | Manufacturing mode for secure firmware using lock byte |
US20110161335A1 (en) * | 2009-12-30 | 2011-06-30 | Symantec Corporation | Locating the latest version of replicated data files |
CN107800819A (en) * | 2017-11-17 | 2018-03-13 | 深圳市泉眼网络科技有限公司 | A kind of generation method of file identification, device and server |
CN113867818A (en) * | 2021-09-28 | 2021-12-31 | 潍柴动力股份有限公司 | Method and device for generating ini file, computer equipment and medium |
Also Published As
Publication number | Publication date |
---|---|
CN113867818B (en) | 2024-04-16 |
CN113867818A (en) | 2021-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019095416A1 (en) | Information pushing method and apparatus, and terminal device and storage medium | |
CN110689349B (en) | Transaction hash value storage and searching method and device in blockchain | |
WO2022143540A1 (en) | Block chain index storage method and apparatus, computer device and medium | |
US20230074102A1 (en) | Method and apparatus for processing data based on block chain, device and readable storage medium | |
WO2023051573A1 (en) | Method and apparatus for generating ini file, computer device, and medium | |
CN110851127B (en) | Universal evidence-storing method based on blockchain | |
CN111580965A (en) | Data request processing method and system | |
CN104077420A (en) | Method and device for importing data into HBase database | |
CN104572781A (en) | Method and device for generating transaction log | |
US9292549B2 (en) | Method and system for index serialization | |
WO2021129557A1 (en) | File encryption method and related apparatus | |
WO2020140626A1 (en) | Salt-based data possession verification method and terminal device | |
CN109951541A (en) | A kind of serial number generation method and server | |
WO2023155531A1 (en) | Data read-write method and apparatus and related device | |
US8307230B2 (en) | Methods for managing process activity data using a system-wide daemon | |
CN108512930B (en) | Shared file management method, device, server and storage medium | |
CN104484628A (en) | Multi-application intelligent card with encryption and decryption functions | |
CN107332661A (en) | The method of data encryption | |
CN111062041A (en) | Data processing method and system implemented based on font library | |
CN116628285B (en) | Block chain transaction data query method and device | |
Cui et al. | Power system real time data encryption system based on DES algorithm | |
WO2016175880A1 (en) | Merging incoming data in a database | |
WO2023142605A1 (en) | Blockchain-based data processing method and related apparatus | |
CN111866134A (en) | Method and system for generating hash value and address of block chain transaction and storage medium | |
CN112685451B (en) | Data query processing method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22874958 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 11202305390W Country of ref document: SG |
|
NENP | Non-entry into the national phase |
Ref country code: DE |