Software security flashing management control method and device, equipment and storage medium
By employing a dual mechanism of platform permission verification and program content verification, combined with a binding mechanism of permission script files and one user, one computer, and one host computer, the security issues of vehicle controller software flashing operations are resolved. Fine-grained permission management and operation traceability are achieved, preventing unauthorized program flashing and malicious tampering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGFENG LIUZHOU MOTOR
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-15
AI Technical Summary
In the existing technology, the flashing operation of vehicle controller software lacks permission management, which leads to the risk of program flashing errors or parameter writing errors, and poses malicious tampering and security risks.
By employing a dual verification mechanism of platform permission verification and program content verification, combined with the validity period information and user permission information in the permission script file, fine-grained permission management and time-limited control are achieved. A binding mechanism of one user, one computer, and one host computer is adopted to prevent account sharing and permission abuse, and operation behavior is recorded for traceability.
It effectively prevents unauthorized program flashing and malicious tampering, ensures the security and reliability of flashing operations, and enables refined permission management and operation traceability.
Smart Images

Figure CN122046337A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive electronic software flashing security technology, and in particular to a control method, device, equipment and storage medium for software security flashing management. Background Technology
[0002] As vehicles become increasingly intelligent and connected, the functions of vehicle controller software are becoming more complex, leading to a significant increase in the frequency of software updates and maintenance. To ensure the safety and stability of vehicle operation, strict security controls are required for flashing controller software to prevent vehicle malfunctions or safety accidents caused by misoperation or malicious actions.
[0003] Currently, controller program flashing is typically done through a host computer, generally without user access control. Anyone can flash the program and change parameters, posing a risk of incorrect flashing or parameter writing, and even the potential for malicious flashing to bypass vehicle restrictions or write incorrect information, leading to vehicle accidents. Therefore, there is an urgent need for a method to securely manage host computer permissions and operations, enabling tiered operation, security verification, and operation traceability.
[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main objective of this invention is to provide a control method, apparatus, device, and storage medium for software security flashing management, aiming to solve the technical problem of how to prevent controller programs from being flashed or maliciously tampered with without authorization.
[0006] To achieve the above objectives, the present invention provides a control method for software security flashing management, the control method comprising the following steps:
[0007] The first user password entered by the user is sent to the controller, so that the controller uploads the user password to the platform for verification and obtains the authorization instruction. The scope of operation permissions corresponding to the user is determined according to the permission instructions; When the operation permission scope is such that the program flashing permission is in an open state, the program file to be flashed is obtained, and the content of the program file to be flashed is verified to obtain the verification result. If the verification result is that the content verification is successful, the program file to be flashed is sent to the controller so that the controller can perform the flashing operation.
[0008] In one embodiment, the step of sending the first user password entered by the user to the controller, so that the controller uploads the first user password to the platform for verification and authentication to obtain an authorization instruction, includes: Obtain a permission script file, wherein the permission script file contains user permission information and validity period information; Release the corresponding operation permissions based on the user permission information; Each time the system starts, it verifies whether the current time is within the validity period indicated by the validity period information. While the current time is within the validity period, receive the first user password entered by the user; The first user password is sent to the controller, so that the controller uploads the first user password to the platform for verification and obtains the authorization instruction.
[0009] In one embodiment, the step of obtaining the permission script file further includes: Respond to the account application information entered by the user; Generate a user account and a second user password based on the account application information; Obtain the current host computer identification code and the current computer identification information; Bind the user account, the second user password, the current host computer identification code, and the current computer identification information to generate an permission script file.
[0010] In one embodiment, the step of determining the scope of operation permissions corresponding to the user based on the permission instruction includes: Parse the permission command to obtain user level information and permission validity period information; Based on the user level information, the scope of operation permissions corresponding to the user is determined, wherein the scope of operation permissions includes the open status of program flashing permission, parameter writing permission, parameter reading permission and version reading permission; The validity period of the operation permission scope is determined based on the permission validity information.
[0011] In one embodiment, the step of performing content verification on the program file to be flashed and obtaining the verification result includes: The program file to be flashed is parsed to obtain hardware configuration flag information and program version information; Obtain the hardware identification information and current version information of the controller; By comparing the hardware configuration flag information and the hardware identification information, a hardware matching comparison result is obtained; By comparing the program version information with the current version information, a version upgrade comparison result is obtained; The verification result is obtained based on the hardware matching comparison result and the version upgrade comparison result.
[0012] In one embodiment, the step of comparing the hardware configuration flag information and the hardware identification information to obtain a hardware matching comparison result includes: Extract the first baud rate configuration value, the first chip model identifier value, and the first circuit board version value from the hardware configuration flag information; Extract the second baud rate configuration value, the second chip model identifier value, and the second circuit board version value from the hardware identification information; By comparing the first baud rate configuration value and the second baud rate configuration value, a first comparison result is obtained; By comparing the first chip model identifier value and the second chip model identifier value, a second comparison result is obtained; By comparing the version values of the first circuit board and the second circuit board, a third comparison result is obtained; Based on the first comparison result, the second comparison result, and the third comparison result, the hardware matching comparison result is determined.
[0013] In one embodiment, the step of comparing the program version information and the current version information to obtain the version upgrade comparison result includes: Extract the target version number and target version release date from the program version information; Extract the current version number and current version release date from the current version information; Compare the target version number with the current version number, determine whether the target version number is greater than or equal to the current version number, and obtain the version number comparison sub-result; By comparing the release date of the target version with the release date of the current version, it is determined whether the release date of the target version is later than or equal to the release date of the current version, and a date comparison sub-result is obtained; The version upgrade comparison result is determined based on the version number comparison result and the date comparison result.
[0014] Furthermore, to achieve the above objectives, the present invention also proposes a control device for software security flashing management, the device comprising: The password sending module is used to send the first user password entered by the user to the controller, so that the controller uploads the user password to the platform for verification and obtains the authorization instruction. The permission determination module is used to determine the scope of operation permissions corresponding to the user based on the permission instruction. The content verification module is used to obtain the program file to be flashed when the operation permission range is that the program flashing permission is in the open state, and to perform content verification on the program file to be flashed to obtain the verification result. The flashing execution module is used to send the program file to be flashed to the controller when the verification result is that the content verification is passed, so that the controller can perform the flashing operation.
[0015] Furthermore, to achieve the above objectives, the present invention also proposes a control device for software security flashing management, the device comprising: a memory, a processor, and a control program for software security flashing management stored in the memory and executable on the processor, the control program for software security flashing management being configured to implement the steps of the control method for software security flashing management as described above.
[0016] Furthermore, to achieve the above objectives, the present invention also proposes a storage medium storing a software security flashing management control program, wherein when the software security flashing management control program is executed by a processor, it implements the steps of the software security flashing management control method described above.
[0017] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the software security flashing management control method described above.
[0018] One or more technical solutions proposed in this application have at least the following technical effects: The system employs a dual verification mechanism involving platform permission checks and program content verification to ensure that only authorized users verified by the platform can perform flashing operations. Furthermore, the flashing program files undergo rigorous verification for hardware compatibility and version upgrades, effectively preventing unauthorized flashing and malicious tampering. Fine-grained permission management and timeliness control are achieved through validity period information and user permission information in the permission script file. A one-user-one-computer-one-host-computer binding mechanism prevents account sharing and permission abuse. Complete traceability of flashing activities is achieved through local storage and platform upload of operation records. Finally, a block transmission and write confirmation mechanism ensures the reliability and data integrity of the flashing process. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A flowchart is provided for Embodiment 1 of the control method for software security flashing management in this application; Figure 2 A flowchart illustrating the second embodiment of the control method for software security flashing management in this application; Figure 3 This is a schematic diagram of the module structure of the control device for software security flashing management in an embodiment of this application; Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the control method for software security flashing management in the embodiments of this application.
[0022] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0023] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0024] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0025] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or a control device capable of performing the above functions, such as a software security flashing management device. The following description uses a control device for software security flashing management as an example to illustrate this embodiment and the subsequent embodiments.
[0026] Based on this, embodiments of this application provide a control method for software security flashing management, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the control method for software security flashing management in this application.
[0027] In this embodiment, the control method for software security flashing management includes steps S10~S40: Step S10: Send the first user password entered by the user to the controller so that the controller uploads the user password to the platform for verification and obtains the authorization instruction; It should be noted that the user password refers to the authentication information entered by the user when logging into the host computer, used to verify the legitimacy of the user's identity. Additionally, the controller refers to the electronic control unit (ECU) in the vehicle, which performs specific control functions and is responsible for receiving data from the host computer and executing corresponding operations. Furthermore, the platform refers to the remote server-side management system used to store user information and perform permission verification.
[0028] In the specific implementation, the host computer sends the user password to the controller. The controller uploads the password to the platform for verification. If the user and password are confirmed to be normal, the platform issues an access permission instruction to the controller, which then forwards it to the host computer. Based on the access permission instruction, the user is granted access permission. To facilitate user operation and security management, such as the waste of resources from verification every time it is powered on, a valid verification is valid for the day of use. If the verification expires, it needs to be re-verified. In addition, the user and password are managed regularly by the backend. When a user becomes invalid or the permissions change, regular cleanup is required.
[0029] Users send their account information to the design center to request permissions. After evaluation, the design center provides users with a design script permission file, which contains user permissions and validity periods. The design center then sends the permission file to the user and places it on the host computer. The host computer reads the permission file, releases permissions based on the text, and periodically verifies the validity period. Expired permissions become invalid. Furthermore, the correct user password must be entered each time the host computer is accessed to prevent unauthorized operations.
[0030] In one feasible implementation, step S10 includes steps A11 to A15: Step A11: Obtain the permission script file, which contains user permission information and validity period information; It should be noted that the permission script file refers to the file generated by the design center that contains user permission configuration information, used for local permission verification and management. Additionally, user permission information refers to configuration data indicating the scope of operations a user can perform, including the open status of permissions such as program flashing, parameter writing, parameter reading, and version reading. Furthermore, validity period information refers to configuration data indicating the time range within which user permissions are valid; for example, one year for designers, six months for production personnel, one month for after-sales personnel, and one day for temporary users.
[0031] Understandably, the permission acquisition script file refers to the host computer reading the permission configuration file generated by the design center from a specified local path. This file contains user permission information and validity period information, which is used for subsequent permission verification and release.
[0032] Furthermore, step A11 also includes: Respond to the account application information entered by the user; Generate a user account and a second user password based on the account application information; Obtain the current host computer identification code and the current computer identification information; Bind the user account, the second user password, the current host computer identification code, and the current computer identification information to generate a permission script file.
[0033] It should be noted that account application information refers to the information provided by the user when submitting an account activation request to the design center, including user identity, usage requirements, etc. Additionally, the user account is a unique identifier created by the design center based on the user's application. Furthermore, the secondary user password is a verification password generated by the design center corresponding to the account. Finally, the host computer identification code is a unique identification code for the host computer hardware, used to identify a specific host computer device.
[0034] Furthermore, computer identification information refers to the unique identification information of the computer on which the host computer is installed, used to identify a specific computer device.
[0035] Understandably, responding to user-inputted account application information, generating a user account and a second user password based on the application information, obtaining the current host computer identification code and the current computer identification information, binding the user account, the second user password, the current host computer identification code, and the current computer identification information, and generating a permission script file means that the design center creates an account and password based on the user's application, and uniquely binds the account, password, host computer hardware, and computer to establish a one-to-one correspondence between user, computer, and host computer, preventing account sharing and permission abuse.
[0036] In the specific implementation, the host computer sets the permission script file locally, which internally configures the verification algorithm and user-related information, including the user's usage permissions and validity period. When the validity period expires, the host computer cannot open or operate the system. If the design center needs to change the user's permission validity period during use, it directly sends a command to the controller through the platform. The controller then sends the command to the host computer, which directly updates the script data, updating the user's permissions and validity period. It can even close the user's permissions and prohibit their use.
[0037] To ensure a one-to-one correspondence between a host computer and a user, and to prevent direct script replacement and shared permissions among multiple host computers, when a user requests permissions, the request information includes the user account and password. A unique identification code is then written to the host computer to bind the user information. Only that specific user is allowed to log in to the host computer. Upon the user's first login to the host computer on their computer, the host computer writes the user information, host computer identification code, and computer ID into the permission script file and uploads the information to the platform for recording and locking. This ensures one user, one computer, and one host computer. Subsequent use is only permitted if the user information, computer ID, and host computer identification code match the script, preventing shared accounts or direct theft by replacing the script file.
[0038] If there are discrepancies between user information, computer ID, and host computer identification code, the system will be locked immediately. You will need to reapply for the permission file from the design center, or the design center can issue a de-restriction command through the platform to re-bind the three pieces of information. This provides dual protection through two methods.
[0039] Step A12: Release the corresponding operation permissions based on the user permission information; Understandably, releasing the corresponding operation permissions based on user permission information means that the host computer reads the user permission information in the permission script file and opens the corresponding operation functions based on this information, enabling the user to perform the corresponding operations.
[0040] Step A13: On each startup, verify that the current time is within the validity period indicated by the validity information; It should be noted that each startup refers to the moment when the host computer software is opened, that is, the moment when the host computer program starts running.
[0041] Understandably, verifying whether the current time is within the validity period indicated by the validity information at each startup means that the host computer obtains the current system time at startup, compares it with the validity period information in the permission script file, and determines whether the current time is within the validity period. If it exceeds the validity period, the operation permission is locked.
[0042] Step A14: If the current time is within the validity period, receive the first user password entered by the user; Understandably, receiving the first user password input by the user while the current time is within the validity period means that after the validity period verification is passed, the host computer provides a password input interface to receive the verification password input by the user.
[0043] Step A15: Send the first user password to the controller so that the controller uploads the first user password to the platform for verification and obtains the authorization command.
[0044] Understandably, sending the first user's password to the controller allows the controller to upload the password to the platform for verification and to obtain the permission instruction. This means that the host computer sends the password entered by the user to the controller, the controller forwards the password to the remote platform for identity verification, and after the platform verifies the identity, it issues the permission instruction, indicating the scope of the user's operation permissions.
[0045] The beneficial effect of this step is that, through the dual mechanism of local verification of the permission script file and remote verification of the platform, it ensures that only legitimate users within the validity period can perform subsequent operations. At the same time, it establishes a binding relationship of one user, one computer, and one host computer, effectively preventing account sharing and permission abuse, and improving security.
[0046] In practice, the host computer sets the validity period, and the design center sets the validity period for each user based on the user's needs and operational requirements. For example, designers may have a one-year validity period, production personnel six months, after-sales personnel one month, and temporary users one day. The specific validity period is adjusted based on communication between the design center and the user. Once the validity period expires, a new application is required. Step S20: Determine the scope of operation permissions corresponding to the user based on the permission instructions; It should be noted that permission commands are control instructions issued by the platform based on the user's password verification result, used to indicate the scope and validity period of the user's operation permissions. Additionally, the scope of operation permissions refers to configuration data indicating the specific types of operations the user can perform, including the open status of program write permissions, parameter write permissions, parameter read permissions, and version read permissions.
[0047] Understandably, determining the user's corresponding operation permission scope based on permission instructions means that the host computer parses the permission instructions returned by the platform, matches the corresponding permission configuration based on the parsed user level information and permission validity period information, and determines the specific operation types that the user can perform and their validity period.
[0048] The beneficial effect of this step is that by parsing the permission instructions issued by the platform, the user's operation permissions are finely classified, ensuring that users of different levels can only perform operations within their authorized scope, realizing dynamic management and precise control of permissions, and avoiding security risks caused by unauthorized operations.
[0049] In the specific implementation, designers have full access with a permanent validity period; production line personnel can only perform program flashing, reading, and partial configuration changes; after-sales personnel can perform after-sales writing, reading, and partial configuration changes; temporary users can only read the version and parameters; and those not logged in do not support any operations. The host computer's access permissions are categorized as follows: program writing and reading, parameter writing and reading (including parameter configuration information such as VIN / function configuration, system parameter values, fault items and parameter thresholds, fault records, etc.).
[0050] In one feasible implementation, step S20 includes steps A21 to A23: Step A21: Parse the permission instructions to obtain user level information and permission validity period information; It should be noted that permission commands are control instructions issued by the platform based on the user's password verification result, used to indicate the scope and validity period of the user's operation permissions. Additionally, user level information indicates the user's identity category, including designer level, production personnel level, after-sales personnel level, temporary user level, and not logged in level. Furthermore, permission validity period information refers to the marker information issued by the platform indicating that the permission is valid for the current day.
[0051] Understandably, parsing permission commands to obtain user level information and permission validity information means that the host computer parses the permission commands returned by the platform and extracts the user level and permission validity information.
[0052] Step A22: Based on the user level information, determine the user's corresponding operation permission range, which includes the open status of program flashing permission, parameter writing permission, parameter reading permission, and version reading permission; It should be noted that the scope of operation permissions refers to the configuration data indicating the specific types of operations a user can perform, including the open status of program flashing permissions, parameter writing permissions, parameter reading permissions, and version reading permissions. In this embodiment, the designer level corresponds to full permissions, i.e., program flashing and reading, and parameter writing and reading. The production personnel level corresponds to program flashing, reading, and some configuration change permissions. The after-sales personnel level corresponds to after-sales writing, reading, and some configuration change permissions. The temporary user level corresponds to only reading version and parameter permissions. The unlogged-in level corresponds to no operation permissions supported. It can be understood that determining the user's corresponding scope of operation permissions based on user level information means matching the corresponding permission configuration based on the parsed user level to determine the specific types of operations the user can perform.
[0053] Step A23: Determine the validity period of the operation permission scope based on the permission validity information.
[0054] Understandably, determining the validity period of operation permissions based on the permission validity period information means setting a valid status of no-repeated verification for the current day based on the time expiration marker issued by the platform, so that users do not need to verify their passwords again within the validity period.
[0055] The beneficial effect of this step is that it enables refined access control through user hierarchical management. Users of different levels can only perform operations within their authorized scope, avoiding security risks caused by unauthorized operations. At the same time, the daily effective settings reduce the waste of resources due to repeated verification, balancing security and ease of operation.
[0056] Step S30: When the operation permission scope is that the program flashing permission is in the open state, obtain the program file to be flashed, and perform content verification on the program file to be flashed to obtain the verification result. It should be noted that the program file to be flashed refers to the software program file prepared for writing to the controller, containing program code and configuration information. Furthermore, content verification refers to the process of validating and matching the program file to ensure it meets the flashing requirements. Finally, the verification result refers to the judgment information generated after content verification, indicating whether the verification passed.
[0057] Understandably, when the operation permission scope is that the program flashing permission is in an open state, the process of obtaining the program file to be flashed and verifying its content to obtain the verification result means that after the host computer determines that the user has program flashing permission, it loads the target program file, performs hardware matching verification and version upgrade verification on the file, and determines whether the program file is allowed to be flashed.
[0058] The beneficial effect of this step is that it prevents the flashing of programs that are incompatible with the controller hardware through hardware matching verification, and prevents downgrade flashing to remove vehicle restrictions through version upgrade verification, effectively avoiding the impact of flashing incorrect programs on vehicle driving safety.
[0059] In practice, access control is used to prevent other personnel from flashing or rewriting other software. The flashing process involves setting flags within the program to match hardware and configuration parameters (such as baud rate). Only when the hardware and parameters match can the flashing process proceed, thus preventing flashing errors from affecting vehicle operation.
[0060] The program flashing does not overwrite the previous parameter configuration, including the original vehicle's locking restrictions / parameter configuration. If you need to change parameters or locking restrictions, you need to perform the parameter change write or unlocking operation. They are independent of each other and do not interfere with each other.
[0061] Some actions involve updating old programs and removing new features, such as vehicle locking restrictions or other restrictions. Updating old programs (program updates and iterations require verification of the current software version; only subsequent and current versions can be flashed) or programs that are incompatible with the controller or specific programs require the host computer to send a platform request (to write program version / user information) before it can be written, thus avoiding directly flashing and overwriting the original configuration restrictions.
[0062] Alternatively, the host computer generates a random number. The user sends the flashing application information (username, password, flashing program version) and the random number to the design center for confirmation. After the design center agrees, it returns a specific value to the user through a specific algorithm. The user writes the specific value into the host computer for verification (the host computer's calculation method is consistent with the design center). This flashing can proceed normally. After the flashing is completed, the permission expires, and a new application is required for the next specific flashing.
[0063] Step S40: If the verification result is that the content verification is successful, the program file to be flashed is sent to the controller so that the controller can perform the flashing operation.
[0064] Understandably, if the content verification result is successful, the program file to be flashed is sent to the controller so that the controller can perform the flashing operation. This means that after the content verification is successful, the host computer transmits the program file to the controller, and the controller writes the program into the storage area to complete the software update.
[0065] The benefit of this step is that only programs that have been verified as legitimate and compliant through content verification can be written to the controller, further ensuring the security of the write operation from the end of the process and preventing the unauthorized writing of malicious or erroneous programs.
[0066] In the actual implementation, every time a user operates the host computer, the host computer will record the changes before and after the operation, including time, user information, version before and after program flashing, parameter values before and after flashing, etc., and store the data locally for easy traceability, and send the changed data to the platform for record-keeping, so as to facilitate subsequent record-keeping and traceability, and to query user operations when necessary later.
[0067] This embodiment provides a control method for software security flashing management. By setting validity periods and permission levels for different users, it manages the operational norms of different users, ensuring the secure management of the host computer and preventing unauthorized operations that could affect vehicle operation. Two verification methods are used to verify the validity of users, preventing unauthorized use and verifying the validity period of user permissions to ensure safe and compliant operation. Operation records are set up and stored both locally and on the platform to ensure traceability of operational behavior. Verification is set for program content; if the requirements are not met, flashing is prohibited to prevent malicious unauthorization. Some non-standard operations require special application through the platform or design center, completion of review and traceability before operation, ensuring the legitimacy and security of operations and the traceability of the source of problems. A single mechanism of one user, one computer, and one host computer is established to prevent abuse by sharing users or host computers. Local scripts and platform verification are used to lock usage information, ensuring single-system security for standardized use.
[0068] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S30 includes steps S301 to S305: Step S301: Parse the program file to be flashed to obtain hardware configuration flag information and program version information; It should be noted that hardware configuration information refers to data embedded in the program file that indicates the target hardware configuration parameters, including baud rate, chip model, circuit board version, etc. Additionally, program version information refers to data indicating the version attributes of the program file, including version number and release date.
[0069] Understandably, parsing the program file to be flashed to obtain hardware configuration flag information and program version information means that the host computer parses the loaded program file and extracts the hardware configuration parameters and version attribute data contained therein for subsequent matching and verification.
[0070] Step S302: Obtain the controller's hardware identification information and current version information; It should be noted that hardware identification information refers to the configuration parameters of the actual controller hardware, including the actual baud rate, actual chip model, and actual circuit board version. Additionally, current version information refers to the software version attribute data currently running on the controller, including the current version number and the current version release date.
[0071] Understandably, obtaining the controller's hardware identification information and current version information means that the host computer reads the controller's actual hardware configuration parameters and the currently running software version attribute data from the controller through the communication interface.
[0072] Step S303: Compare the hardware configuration flag information and the hardware identification information to obtain the hardware matching comparison result; It should be noted that the hardware matching comparison result refers to the determination information on whether the hardware configuration flags in the instruction program file are consistent with the actual hardware identifiers of the controller.
[0073] Understandably, comparing hardware configuration flag information and hardware identification information to obtain hardware matching comparison results means comparing the hardware configuration parameters in the program file with the actual hardware parameters of the controller item by item to determine whether they match completely.
[0074] In one feasible implementation, step S303 includes steps A31 to A36: Step A31: Extract the first baud rate configuration value, the first chip model identifier value, and the first circuit board version value from the hardware configuration flag information; It is understandable that extracting the first baud rate configuration value, the first chip model identifier value, and the first circuit board version value from the hardware configuration flag information means extracting the target baud rate value, the target chip model code, and the target circuit board version code from the hardware configuration flag information obtained from the program file.
[0075] Step A32: Extract the second baud rate configuration value, the second chip model identifier value, and the second circuit board version value from the hardware identification information; It is understandable that extracting the second baud rate configuration value, the second chip model identifier value, and the second circuit board version value from the hardware identification information means extracting the actual baud rate value, the actual chip model code, and the actual circuit board version code from the hardware identification information read from the controller.
[0076] Step A33: Compare the first baud rate configuration value and the second baud rate configuration value to obtain the first comparison sub-result; Understandably, comparing the first baud rate configuration value and the second baud rate configuration value to obtain the first comparison result means comparing the target baud rate value in the program file with the actual baud rate value of the controller to obtain a judgment result indicating whether the two are consistent.
[0077] Step A34: Compare the first chip model identifier value and the second chip model identifier value to obtain the second comparison result; Understandably, comparing the first chip model identifier value and the second chip model identifier value to obtain the second comparison result means comparing the target chip model code in the program file with the actual chip model code of the controller to obtain a judgment result indicating whether the two are consistent.
[0078] Step A35: Compare the version values of the first circuit board and the second circuit board to obtain the third comparison result; Understandably, comparing the first circuit board version value and the second circuit board version value to obtain the third comparison result means comparing the target circuit board version code in the program file with the actual circuit board version code of the controller to obtain a judgment result indicating whether the two are consistent.
[0079] Step A36: Determine the hardware matching comparison result based on the first comparison result, the second comparison result, and the third comparison result.
[0080] Understandably, determining the hardware matching comparison result based on the first, second, and third comparison results means that the hardware matching relationship is determined to be valid when all three comparison results (baud rate, chip model, and circuit board version) are consistent; otherwise, the hardware matching relationship is determined to be invalid.
[0081] Step S304: Compare the program version information with the current version information to obtain the version upgrade comparison result; It should be noted that the version upgrade comparison result refers to the determination information on whether the version of the instruction program file satisfies the upgrade relationship relative to the current version of the controller.
[0082] As is understandable, comparing program version information with the current version information to obtain the version upgrade comparison result means comparing the version attribute of the program file with the current version attribute of the controller to determine whether the version upgrade conditions are met, thus preventing downgrade flashing.
[0083] In one feasible implementation, step S304 includes steps A41-A45: Step A41: Extract the target version number and target version release date from the program version information; As is understandable, extracting the target version number and target version release date from the program version information refers to extracting the target version number and target version release date data from the program version information obtained by parsing the program file.
[0084] Step A42: Extract the current version number and current version release date from the current version information; Understandably, extracting the current version number and release date from the current version information means extracting the currently running version number and release date data from the current version information read from the controller.
[0085] Step A43: Compare the target version number and the current version number, determine whether the target version number is greater than or equal to the current version number, and obtain the version number comparison result; Understandably, comparing the target version number with the current version number to determine whether the target version number is greater than or equal to the current version number and obtaining the version number comparison result means comparing the target version number of the program file with the current version number of the controller to determine whether the target version is not lower than the current version and obtaining the judgment result indicating the size relationship of the version numbers.
[0086] Step A44: Compare the release date of the target version with the release date of the current version, determine whether the release date of the target version is later than or equal to the release date of the current version, and obtain the date comparison sub-result; Understandably, comparing the release date of the target version with the release date of the current version to determine whether the release date of the target version is later than or equal to the release date of the current version and obtaining the date comparison sub-result means comparing the release date of the target version of the program file with the release date of the current version of the controller to determine whether the release time of the target version is not earlier than the current version and obtaining the determination result indicating the order of the dates.
[0087] Step A45: Determine the version upgrade comparison result based on the version number comparison result and the date comparison result.
[0088] Understandably, determining the version upgrade comparison result based on the version number comparison result and the date comparison result means that if both the version number and release date comparison results meet the upgrade conditions, the version upgrade relationship is determined to be valid; otherwise, the version upgrade relationship is determined to be invalid.
[0089] The beneficial effect of this step is that, through dual version attribute verification, it ensures that only subsequent or current versions of the program can be flashed, effectively preventing the removal of vehicle restriction functions by downgrading and flashing older versions of the program, and ensuring the effectiveness of vehicle safety policies.
[0090] Step S305: Obtain the verification result based on the hardware matching comparison result and the version upgrade comparison result.
[0091] Understandably, the verification result obtained based on the hardware matching comparison result and the version upgrade comparison result refers to the judgment result of the comprehensive hardware matching verification and version upgrade verification. If the hardware matching relationship is established and the version upgrade relationship is established, the content verification is determined to pass; otherwise, the content verification is determined to fail.
[0092] The beneficial effect of this step is that only program files that pass both hardware matching and version upgrade verification can be deemed to have passed the verification. This eliminates the risk of flashing incorrect programs or maliciously removing restrictions from the program content level, and fully ensures the security and reliability of the flashing operation.
[0093] This embodiment provides a control method for software security flashing management. It ensures a complete match between the program file and the controller hardware by comparing hardware configuration flags with hardware identifiers item by item. A dual comparison of program version information and current version information prevents downgraded flashing from removing vehicle restrictions. Finally, a verification result is obtained based on the hardware matching comparison result and the version upgrade comparison result, comprehensively ensuring the security and reliability of the flashing operation from the program content level.
[0094] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the control method of software security flashing management in this application. Any simple modifications based on this technical concept are within the protection scope of this application.
[0095] This application also provides a control device for software security flashing management; please refer to [reference needed]. Figure 3 The control device for software security flashing management includes: The password sending module 10 is used to send the first user password entered by the user to the controller, so that the controller uploads the user password to the platform for verification and obtains the permission instruction. The permission determination module 20 is used to determine the scope of operation permissions corresponding to a user based on permission instructions. The content verification module 30 is used to obtain the program file to be flashed and perform content verification on the program file to be flashed when the operation permission scope is that the program flashing permission is in the open state, and obtain the verification result. The flashing execution module 40 is used to send the program file to be flashed to the controller when the verification result is that the content verification is passed, so that the controller can perform the flashing operation.
[0096] The software security flashing management control device provided in this application, employing the software security flashing management control method in the above embodiments, can solve the technical problem of how to prevent the controller program from being flashed or maliciously tampered with without authorization. Compared with the prior art, the beneficial effects of the software security flashing management control device provided in this application are the same as those of the software security flashing management control method provided in the above embodiments, and other technical features in the software security flashing management control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0097] In one embodiment, the password sending module 10 is further configured to obtain an authorization script file, wherein the authorization script file contains user authorization information and validity period information; Release the corresponding operation permissions based on the user's permission information; Each time the system starts, it verifies whether the current time is within the validity period indicated by the validity information. While the current time is within the validity period, receive the first user password entered by the user; The first user's password is sent to the controller, which then uploads the password to the platform for verification and obtains the authorization command.
[0098] In one embodiment, the password sending module 10 is also used to respond to account application information entered by the user; Generate a user account and a second user password based on the account application information; Obtain the current host computer identification code and the current computer identification information; Bind the user account, the second user password, the current host computer identification code, and the current computer identification information to generate a permission script file.
[0099] In one embodiment, the permission determination module 20 is further configured to parse permission instructions to obtain user level information and permission validity period information; Based on user level information, determine the user's corresponding operation permission scope, which includes the open status of program flashing permission, parameter writing permission, parameter reading permission, and version reading permission; Determine the validity period of the operation permissions based on the permission validity information.
[0100] In one embodiment, the content verification module 30 is further configured to parse the program file to be flashed to obtain hardware configuration flag information and program version information; Obtain the controller's hardware identification information and current version information; By comparing the hardware configuration flag information and the hardware identification information, the hardware matching comparison results are obtained; Compare the program version information with the current version information to obtain the version upgrade comparison results; The verification results are obtained based on the hardware matching comparison results and the version upgrade comparison results.
[0101] In one embodiment, the content verification module 30 is further configured to extract the first baud rate configuration value, the first chip model identifier value, and the first circuit board version value from the hardware configuration flag information; Extract the second baud rate configuration value, the second chip model identifier value, and the second circuit board version value from the hardware identification information; By comparing the first baud rate configuration value with the second baud rate configuration value, the first comparison result is obtained; By comparing the first chip model identifier value and the second chip model identifier value, a second comparison result is obtained; By comparing the version values of the first circuit board and the second circuit board, a third comparison result is obtained; Based on the first, second, and third pairing results, the hardware matching comparison results are determined.
[0102] In one embodiment, the content verification module 30 is further configured to extract the target version number and target version release date from the program version information; Extract the current version number and current version release date from the current version information; Compare the target version number with the current version number, determine whether the target version number is greater than or equal to the current version number, and obtain the version number comparison result; Compare the release date of the target version with the release date of the current version to determine whether the release date of the target version is later than or equal to the release date of the current version, and obtain the date comparison sub-result; The version upgrade comparison result is determined based on the version number comparison result and the date comparison result.
[0103] This application provides a control device for software security flashing management. The control device for software security flashing management includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the control method for software security flashing management in the above embodiment 1.
[0104] The following is for reference. Figure 4This document illustrates a schematic diagram of a control device suitable for implementing software security flashing management in the embodiments of this application. The control device for software security flashing management in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The control device for software security flashing management shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0105] like Figure 4 As shown, the control device for software security flashing management may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the control device for software security flashing management. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the control device for software security flashing management to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a control device with various systems for software security flashing management, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.
[0106] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0107] The software security flashing management control device provided in this application, employing the software security flashing management control method in the above embodiments, can solve the technical problem of how to prevent the controller program from being flashed or maliciously tampered with without authorization. Compared with the prior art, the beneficial effects of the software security flashing management control device provided in this application are the same as those of the software security flashing management control method provided in the above embodiments, and other technical features in this software security flashing management control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0108] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0109] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0110] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the software security flashing management control method in the above embodiments.
[0111] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0112] The aforementioned computer-readable storage medium may be included in the control device for software security flashing management; or it may exist independently and not be assembled into the control device for software security flashing management.
[0113] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the control device for software security flashing management, the control device performs the following actions: sends the first user password entered by the user to the controller, causing the controller to upload the user password to the platform for verification and obtain an authorization instruction; determines the user's corresponding operation permission scope based on the authorization instruction; when the operation permission scope includes program flashing permission being open, obtains the program file to be flashed and performs content verification on the program file to be flashed, obtaining a verification result; if the verification result is that the content verification passes, sends the program file to be flashed to the controller, causing the controller to perform the flashing operation.
[0114] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0116] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0117] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described software security flashing management control method. This solves the technical problem of how to prevent the controller program from being unauthorizedly flashed or maliciously tampered with. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the software security flashing management control method provided in the above embodiments, and will not be repeated here.
[0118] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the software security flashing management control method described above.
[0119] The computer program product provided in this application can solve the technical problem of how to prevent the controller program from being unauthorizedly flashed or maliciously tampered with. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the software security flashing management control method provided in the above embodiments, and will not be repeated here.
[0120] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A control method for software security flashing management, characterized in that, The method includes: The first user password entered by the user is sent to the controller, so that the controller uploads the user password to the platform for verification and obtains the authorization instruction. The scope of operation permissions corresponding to the user is determined according to the permission instructions; When the operation permission scope is such that the program flashing permission is in an open state, the program file to be flashed is obtained, and the content of the program file to be flashed is verified to obtain the verification result. If the verification result is that the content verification is successful, the program file to be flashed is sent to the controller so that the controller can perform the flashing operation.
2. The method as described in claim 1, characterized in that, The step of sending the first user password entered by the user to the controller, so that the controller uploads the first user password to the platform for verification and authentication to obtain the authorization instruction, includes: Obtain a permission script file, wherein the permission script file contains user permission information and validity period information; Release the corresponding operation permissions based on the user permission information; Each time the system starts, it verifies whether the current time is within the validity period indicated by the validity period information. While the current time is within the validity period, receive the first user password entered by the user; The first user password is sent to the controller, so that the controller uploads the first user password to the platform for verification and obtains the authorization instruction.
3. The method as described in claim 2, characterized in that, The step of obtaining the permission script file further includes: Respond to the account application information entered by the user; Generate a user account and a second user password based on the account application information; Obtain the current host computer identification code and the current computer identification information; Bind the user account, the second user password, the current host computer identification code, and the current computer identification information to generate an permission script file.
4. The method as described in claim 1, characterized in that, The step of determining the user's corresponding operation permission range based on the permission instruction includes: Parse the permission command to obtain user level information and permission validity period information; Based on the user level information, the scope of operation permissions corresponding to the user is determined, wherein the scope of operation permissions includes the open status of program flashing permission, parameter writing permission, parameter reading permission and version reading permission; The validity period of the operation permission scope is determined based on the permission validity information.
5. The method as described in claim 1, characterized in that, The step of verifying the content of the program file to be written and obtaining the verification result includes: The program file to be flashed is parsed to obtain hardware configuration flag information and program version information; Obtain the hardware identification information and current version information of the controller; By comparing the hardware configuration flag information and the hardware identification information, a hardware matching comparison result is obtained; By comparing the program version information with the current version information, a version upgrade comparison result is obtained; The verification result is obtained based on the hardware matching comparison result and the version upgrade comparison result.
6. The method as described in claim 5, characterized in that, The step of comparing the hardware configuration flag information and the hardware identification information to obtain the hardware matching comparison result includes: Extract the first baud rate configuration value, the first chip model identifier value, and the first circuit board version value from the hardware configuration flag information; Extract the second baud rate configuration value, the second chip model identifier value, and the second circuit board version value from the hardware identification information; By comparing the first baud rate configuration value and the second baud rate configuration value, a first comparison result is obtained; By comparing the first chip model identifier value and the second chip model identifier value, a second comparison result is obtained; By comparing the version values of the first circuit board and the second circuit board, a third comparison result is obtained; Based on the first comparison result, the second comparison result, and the third comparison result, the hardware matching comparison result is determined.
7. The method as described in claim 5, characterized in that, The step of comparing the program version information and the current version information to obtain the version upgrade comparison result includes: Extract the target version number and target version release date from the program version information; Extract the current version number and current version release date from the current version information; Compare the target version number with the current version number, determine whether the target version number is greater than or equal to the current version number, and obtain the version number comparison sub-result; By comparing the release date of the target version with the release date of the current version, it is determined whether the release date of the target version is later than or equal to the release date of the current version, and a date comparison sub-result is obtained; The version upgrade comparison result is determined based on the version number comparison result and the date comparison result.
8. A control device for software security flashing management, characterized in that, The device includes: The password sending module is used to send the first user password entered by the user to the controller, so that the controller uploads the user password to the platform for verification and obtains the authorization instruction. The permission determination module is used to determine the scope of operation permissions corresponding to the user based on the permission instruction. The content verification module is used to obtain the program file to be flashed when the operation permission range is that the program flashing permission is in the open state, and to perform content verification on the program file to be flashed to obtain the verification result. The flashing execution module is used to send the program file to be flashed to the controller when the verification result is that the content verification is passed, so that the controller can perform the flashing operation.
9. A control device for software security flashing management, characterized in that, The device includes: a memory, a processor, and a control program for software security flashing management stored in the memory and executable on the processor, the control program for software security flashing management being configured to implement the steps of the control method for software security flashing management as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a control program for software security flashing management, which, when executed by a processor, implements the steps of the control method for software security flashing management as described in any one of claims 1 to 7.