Vehicle configuration word modification method and device and vehicle
By grouping and building feature data of configuration items in vehicle configuration words, verifying the legality of configuration words to be written and modifying them, the problem of easy tampering in the existing technology is solved, and the modification of vehicle configuration words is improved Security.
Patent Information
- Application Number
- CN202411531265.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, when the vehicle configuration word is modified by a diagnostic instrument or an inspection device, only 27 service authentication is required, resulting in the configuration word being easily tampered with by arbitrarily after the key is leaked, causing serious harm.
By grouping multiple configuration items in the vehicle configuration word, feature data is constructed, and when receiving the configuration word to be written, feature data to be written is constructed according to the same grouping and construction method, and whether the two meet the preset conditions are met. , to determine the legality of the configuration word to be written and modify it.
It improves the security of vehicle configuration word modification, prevents configuration word from being arbitrarily tampered with after key leakage, and ensures the safety and stability of the vehicle.
Smart Images

Figure CN119475443A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle configuration word modification method, device and vehicle. Background Art
[0002] With the popularization and development of vehicles, vehicles can coordinate through multiple controllers (such as air-conditioning controllers, airbag controllers, body controllers, etc.) to ensure the operation of the vehicle. Each controller can correspond to a configuration word, which is the data used by the controller software to distinguish different vehicle configurations. For example, the configuration word can be used to distinguish the model of the vehicle's battery pack, so that the software uses the corresponding battery efficiency to calculate the battery life.
[0003] At present, since the configuration word of the controller is related to the overall operation of the vehicle, if the configuration word data needs to be changed, unreasonable changes will have serious consequences. Based on this, many car companies have not launched the function of remotely writing configuration words. If the configuration word needs to be changed due to software and hardware factors after the vehicle is launched, it can only be solved on-site by after-sales technicians, which consumes time and manpower.
[0004] Furthermore, in the prior art, there is also a function of remotely writing configuration words to a vehicle, which uses a diagnostic instrument or an electric inspection device to write the configuration words that need to be changed to a certain controller of the vehicle. However, in this method, the diagnostic instrument or the electric inspection device can change the configuration words as long as it passes the 27 service authentication of the controller. Since the algorithm of the 27 service is basically CMAC (Message Authentication Code, symmetric key block encryption algorithm), if the key is leaked, the configuration words will be arbitrarily tampered with, and there is no effective prevention measure, which will cause serious harm to the vehicle. Summary of the invention
[0005] The present application provides a vehicle configuration word modification method, device and vehicle to solve the technical problem in the prior art that when the vehicle configuration word is modified by a diagnostic instrument or an electric inspection device, the diagnostic instrument or the electric inspection device only needs to perform 27 service authentication, which leads to the configuration word being easily tampered with arbitrarily after the key is leaked, thereby causing serious harm to the vehicle.
[0006] In a first aspect, the present application provides a vehicle configuration word modification method, which is applied to any controller in a vehicle, the controller corresponds to a configuration word, the configuration word includes multiple configuration items, and the method includes:
[0007] Grouping the multiple configuration items included in the configuration word to obtain multiple configuration item sets;
[0008] For each of the configuration item sets, extract first features from the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set;
[0009] When receiving a configuration word to be written for modifying the configuration word, grouping the configuration items to be written included in the configuration word to be written according to the plurality of configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set;
[0010] For each of the to-be-written configuration item sets, performing second feature extraction on the to-be-written configuration items included in the to-be-written configuration item set according to the preset rule to obtain to-be-written feature data corresponding to the to-be-written configuration item set;
[0011] When it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset condition, the configuration word is modified according to the configuration word to be written.
[0012] As an optional implementation, the multiple configuration items included in the configuration word are grouped to obtain multiple configuration item sets, including:
[0013] According to a preset number of each configuration item set, randomly grouping multiple configuration items included in the configuration word to obtain multiple configuration item sets;
[0014] or,
[0015] Determine a bit position of each of the configuration items; group multiple configuration items included in the configuration word according to the bit position of each of the configuration items and the preset number to obtain multiple configuration item sets;
[0016] or,
[0017] Prioritize the multiple configuration items to obtain the priority of each configuration item; and group the multiple configuration items included in the configuration word according to the priority of each configuration item and the preset number to obtain multiple configuration item sets.
[0018] As an optional implementation, performing first feature extraction on the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set includes:
[0019] Determine a first bit value corresponding to each of the configuration items included in the configuration item set;
[0020] Determining the number of bits occupied by each of the configuration items;
[0021] Determining a target binary value from a plurality of preset binary values according to the bit position;
[0022] Adding all first bit values included in the configuration item set and the target binary value to obtain a second bit value;
[0023] The bit values corresponding to the first number of bits at the end of the second bit value are determined as the characteristic data corresponding to the configuration item set.
[0024] As an optional implementation, performing second feature extraction on the configuration items to be written included in the set of configuration items to be written according to the preset rule to obtain feature data to be written corresponding to the set of configuration items to be written includes:
[0025] Determine the first to-be-written bit value corresponding to each of the to-be-written configuration items included in the to-be-written configuration item set;
[0026] Adding all first bit values to be written included in the configuration item set and the target binary value to obtain a second bit value to be written;
[0027] The bit values corresponding to the first number of bits at the end of the second bit value to be written are determined as the to-be-written characteristic data corresponding to the to-be-written configuration item set.
[0028] As an optional implementation manner, the determining that each of the characteristic data to be written and the corresponding characteristic data satisfy a preset condition includes:
[0029] For each of the characteristic data to be written, determining a difference between the characteristic data to be written and the corresponding characteristic data;
[0030] Determine a preset difference range between the characteristic data to be written and the characteristic data;
[0031] When the difference is within the difference range, it is determined that the characteristic data to be written and the corresponding characteristic data meet a preset condition.
[0032] As an optional implementation, the configuration word further includes a reserved configuration item field and a flag bit for adding a new configuration, wherein the reserved configuration item field is used to record the configuration item to be split, and the flag bit for adding a new configuration is used to indicate whether there is a configuration item to be split in the configuration word;
[0033] The step of modifying the configuration word according to the configuration word to be written, when it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset condition, includes:
[0034] When it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset conditions, obtaining a first value corresponding to the reserved configuration item field of the configuration word to be written and a second value of the flag bit of whether to add a new configuration;
[0035] Determining whether the configuration word to be written meets a preset writing condition according to the first value and the second value;
[0036] When it is determined that the configuration word to be written meets the writing condition, the configuration word is modified according to the configuration word to be written.
[0037] As an optional implementation, determining whether the configuration word to be written meets a preset writing condition according to the first value and the second value includes:
[0038] In a case where the first value indicates that there is no configuration item to be split, determining whether the second value indicates that there is no configuration item to be split in the configuration word to be written;
[0039] If the second value indicates that the configuration word to be written does not have any configuration item to be split, determining that the configuration word to be written meets the preset writing condition;
[0040] In a case where the first value indicates that there is a configuration item to be split, determining whether the second value indicates that there is a configuration item to be split in the configuration word to be written;
[0041] If the second value indicates that the configuration word to be written has a configuration item to be split, it is determined that the configuration word to be written meets the preset writing condition.
[0042] As an optional implementation, the configuration word to be written is sent by a cloud server, and after the cloud server performs a preset security service authentication with the controller, the cloud server sends the configuration word to be written to the controller according to the configuration word identifier of the configuration word to be written.
[0043] In a second aspect, the present application provides a vehicle configuration word modification device, which is applied to any controller in a vehicle, the controller corresponds to a configuration word, the configuration word includes multiple configuration items, and the device includes:
[0044] A first grouping module, configured to group the plurality of configuration items included in the configuration word to obtain a plurality of configuration item sets, wherein each configuration item set includes a preset number of configuration items;
[0045] A first processing module, configured to process, for each of the configuration item sets, the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set;
[0046] A second grouping module is used for, when receiving a configuration word to be written for modifying the configuration word, grouping the configuration items to be written included in the configuration word to be written according to the plurality of configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set;
[0047] A second processing module is used for processing the configuration items to be written included in each of the configuration item sets to be written according to the preset rule to obtain the to-be-written characteristic data corresponding to the configuration item set to be written;
[0048] The modification module is used to modify the configuration word according to the configuration word to be written when it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset conditions.
[0049] In a third aspect, the present application provides a vehicle, comprising a processor and a memory, wherein the processor is used to execute a vehicle configuration word modification program stored in the memory to implement the vehicle configuration word modification method described in any one of the first aspects.
[0050] The technical solution provided by the embodiment of the present application is to obtain multiple configuration item sets by grouping multiple configuration items included in the configuration word, and for each configuration item set, perform a first feature extraction on the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set, and when receiving a configuration word to be written for modifying the above configuration word, group the configuration items to be written included in the configuration word to be written according to the above multiple configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set, and for each configuration item set to be written, perform a second feature extraction on the configuration items to be written included in the configuration item set to be written according to the above preset rule to obtain feature data to be written corresponding to the configuration item set to be written, and when it is determined that each of the above feature data to be written and the corresponding feature data meet a preset condition, the configuration word is modified according to the configuration word to be written. This technical solution groups multiple configuration items included in each configuration word included in the vehicle, and constructs characteristic data corresponding to each group of configuration items in advance. After receiving the configuration word to be written for modifying the configuration word, the characteristic data included in the configuration word to be written can be constructed according to the same grouping and construction method as the configuration word. Then, by comparing the characteristic data of the configuration word with the characteristic data of the configuration word to be written corresponding to the configuration word, it can be determined whether the configuration word to be written meets the preset conditions for modifying the configuration word, thereby realizing security verification of the configuration word to be written based on the characteristic data constructed by the configuration items, thereby improving the security of modifying the configuration words of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art texts are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0053] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0054] Figure 1 A flow chart of an embodiment of a method for modifying a vehicle configuration word provided in an embodiment of the present application;
[0055] Figure 2 A flowchart of another method for modifying vehicle configuration characters provided in an embodiment of the present application;
[0056] Figure 3 A block diagram of an embodiment of a vehicle configuration word modification device provided in an embodiment of the present application;
[0057] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described in the text are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0059] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0060] In order to solve the technical problem in the prior art that when modifying the configuration words of a vehicle through a diagnostic instrument or an electric inspection device, the diagnostic instrument or the electric inspection device only needs to perform 27 service authentication, which leads to the configuration words being easily tampered with arbitrarily after the key is leaked, thereby causing serious harm to the vehicle, the present application provides a vehicle configuration word modification method, device and vehicle, which can group multiple configuration items included in the configuration word for each configuration word included in the vehicle, and pre-construct feature data corresponding to the group of configuration items according to each group of configuration items, so that after receiving the configuration word to be written for modifying the configuration word, the feature data included in the configuration word to be written can be constructed according to the same grouping and construction method as the configuration word, and then by comparing the feature data of the configuration word with the feature data of the configuration word to be written corresponding to the configuration word, it can be determined whether the configuration word to be written meets the preset conditions for modifying the configuration word, thereby realizing security verification of the configuration word to be written according to the feature data constructed by the configuration item, thereby improving the security of modifying the vehicle configuration word.
[0061] The vehicle configuration word modification method provided by the present application is further explained below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0062] See also Figure 1 , is a flow chart of an embodiment of a vehicle configuration word modification method provided in an embodiment of the present application. As an embodiment, Figure 1 The process shown can be applied to any controller in a vehicle, and the controller can correspond to a configuration word, which can include multiple configuration items.
[0063] like Figure 1 As shown, the process may include the following steps:
[0064] Step 101: Group multiple configuration items included in a configuration word to obtain multiple configuration item sets.
[0065] Step 102: For each configuration item set, perform first feature extraction on the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set.
[0066] The following is a unified description of step 101 and step 102:
[0067] The above configuration items refer to the functional parameters set for the controller corresponding to the configuration word. For example, if the controller corresponding to the configuration word is an air-conditioning controller, then the configuration items may include vehicle seat parameters, vehicle personnel parameters, vehicle refrigeration parameters, etc.
[0068] The above configuration words refer to the configuration words corresponding to the vehicle controller. In actual applications, a vehicle may include multiple controllers, such as an air conditioning controller, a body controller, a drive controller, etc. The operation of multiple controllers of the vehicle can realize multiple functions of the vehicle. Each controller may correspond to one configuration word.
[0069] The first feature extraction refers to performing a feature processing operation on the configuration items included in the configuration item set, which is used to extract feature data between the configuration items included in the configuration item set.
[0070] In this embodiment, the execution subject of the embodiment of the present application may be any controller included in the vehicle, and the controller may correspond to a configuration word. Further, the configuration word may include multiple configuration items. Based on this, in order to improve the security when the configuration word is modified, the execution subject of the embodiment of the present application may construct feature data using the configuration items included in the configuration word, so as to perform security verification based on the above feature data when the configuration word is modified.
[0071] In one embodiment, in order to construct multiple feature data and thus improve the security when the configuration word is modified, the execution subject of the embodiment of the present application may group multiple configuration items included in the configuration word to obtain multiple configuration item sets.
[0072] As an optional implementation, the execution subject of the embodiment of the present application may evenly group the multiple configuration items included in the configuration word, that is, each configuration item set includes a preset number of configuration items. The above preset number is a positive integer, which can be 2, 3, or other values, and the embodiment of the present application does not limit this.
[0073] As an exemplary implementation, multiple configuration items included in the configuration word may be randomly grouped according to a preset number of each configuration item set to obtain multiple configuration item sets.
[0074] As another exemplary implementation, the bit position of each configuration item may be determined. Then, according to the bit position of each configuration item and the above-mentioned preset number, the multiple configuration items included in the configuration word are grouped to obtain multiple configuration item sets.
[0075] As an implementation scheme, the configuration items may be sorted in order of bits from most to least to obtain a configuration item sequence. Then, the configuration item sequence may be grouped in order of a preset number of configuration items from front to back to obtain multiple configuration item sets.
[0076] As another exemplary implementation, multiple configuration items may be prioritized to obtain a priority of each configuration item, and then, the multiple configuration items included in the configuration word may be grouped according to the priority and the preset number of each configuration item to obtain multiple configuration item sets.
[0077] As an implementation scheme, the configuration items may be sorted in descending order of priority to obtain a configuration item sequence. Afterwards, the configuration item sequence may be grouped in a preset number of configuration items as a group in order from front to back to obtain multiple configuration item sets, and the preset number may be 2, 3 or other numbers, which is not limited in the embodiment of the present application.
[0078] As another optional implementation, the execution subject of the embodiment of the present application may randomly group the multiple configuration items included in the configuration word, that is, the number of configuration items included in each obtained configuration item set may be the same or different.
[0079] In one embodiment, after the execution subject of the embodiment of the present application groups the multiple configuration items included in the configuration word into multiple configuration item sets, for each configuration item set, according to preset rules, feature extraction (hereinafter referred to as the first feature extraction for ease of distinction) is performed on the configuration items included in the configuration item set to obtain feature data corresponding to the configuration item set.
[0080] As an optional implementation, each configuration item included in the configuration word may correspond to a bit value. Based on this, the executing entity of the embodiment of the present application may determine the bit value corresponding to each configuration item included in the configuration item set (hereinafter referred to as the first bit value for ease of distinction).
[0081] Afterwards, the bits occupied by each configuration item may be determined, and based on the bits, a target binary value may be determined from a plurality of preset binary values.
[0082] As an exemplary implementation, when the bits of each configuration item are even numbers, a first binary value may be selected as the target binary value, and the first binary value may be 010 or other binary values, which is not limited in this embodiment of the present application; when the bits of each configuration item are odd numbers, a second binary value may be selected as the target binary value, and the second binary value may be 101 or other binary values, which is not limited in this embodiment of the present application. It should be noted that the first binary value and the second binary value are different binary values.
[0083] Optionally, if the bits corresponding to the above configuration items include both odd numbers and even numbers, then a third binary value different from both the first binary value and the second binary value may be used as the target binary value, for example, 110.
[0084] After determining the first bit value of each configuration item and the target binary value, all first bit values and the target binary value included in the configuration item set may be added together to obtain a second bit value.
[0085] Finally, the bit value corresponding to the first number of bits at the end of the second bit value can be determined as the characteristic data corresponding to the configuration item set. The first number can be a preset number, and can be 3, 4, or 5, which is not limited in the embodiment of the present application.
[0086] For example, assuming that the configuration item set includes two configuration items, the corresponding first bit values are 0101 and 0011 respectively, and continuing to assume that the above target binary value is 010, then after adding the three, the second bit value obtained is 1010. Continuing to assume that the above first number is 3, then taking the bit values corresponding to the last three bits of the second bit value as the feature data, the feature data obtained is 010.
[0087] For another example, two configuration items (P1 and P2) have a corresponding construction item (G1). If the bits occupied by P1 and P2 are even, then the binary number 010 is selected to participate in the construction of the data feature. If the bits occupied by P1 and P2 are odd, then the binary number 101 is selected to participate in the construction of the data feature. Based on this, P1+P2+extra selected binary number=PG.
[0088] After that, the last few bits of PG can be selected to form G1. In this way, a functional relationship of G1=F(P1, P2) is formed between P1, P2, and G1. By checking whether the functional relationship is met, it can be determined whether P1 and P2 are legal and correct configurations. In the same way, corresponding construction items are generated for the remaining configuration items to form a series of functional relationships, and finally the data characteristics of the entire configuration word are formed.
[0089] According to the above method, the configuration items included in the configuration word can be divided into multiple configuration item sets, and each configuration item set corresponds to one feature data.
[0090] In addition, the above-mentioned configuration words to be written can be sent by a cloud server connected to the vehicle, and the above-mentioned cloud server can be a diagnostic device of the vehicle (such as a diagnostic instrument or an electrical inspection device). Based on this, when the cloud server detects that the configuration words of the vehicle need to be modified, it can generate a configuration word after the configuration word is modified, and send the generated configuration word as the configuration word to be written to the main controller of the vehicle, so that the main controller of the vehicle sends the configuration word to be written to the controller corresponding to the configuration word consistent with the data identifier according to the data identifier of the configuration word to be written, that is, the execution subject of the embodiment of the present application.
[0091] Among them, before sending the configuration words to be written to the execution entity of the embodiment of the present application, in order to ensure the safe transmission of the configuration words to be written, the above-mentioned cloud server may first perform a preset security service authentication with the execution entity of the embodiment of the present application, and send the configuration words to be written to the vehicle after the authentication is passed.
[0092] As an exemplary implementation, the above-mentioned security service authentication may be 27 service (27 service refers to security access service, and the security concept adopts a seed and secret key relationship) authentication. Based on this, the cloud server may send an instruction to the 27 service requesting a seed to the vehicle's main controller. After receiving the request, the main controller may determine the controller (that is, the executive subject of the embodiment of the present application) that needs to modify the configuration word based on the identification information in the request (such as the diagnostic ID (Identity document) sent by the diagnostic device), and send the above-mentioned instruction to the controller. Afterwards, the controller may return the pre-stored seed to the main controller after receiving the instruction. After receiving the seed fed back by the executive subject of the embodiment of the present application, the main controller may feed back the seed to the cloud server.
[0093] Afterwards, the cloud server can calculate the KEY value of the seed according to the pre-stored key and key algorithm, and send the KEY value to the vehicle's main controller. After receiving the KEY value, the main controller will send the KEY value to the execution subject of the embodiment of the present application, so that the execution subject of the embodiment of the present application verifies whether the KEY value is correct, and feeds back the verification result to the vehicle's main controller.
[0094] Finally, the main controller can send the received verification result to the cloud server. When the verification result is passed, the cloud server can send the generated configuration word to be written to the main controller, so that the main controller sends the configuration word to be written to the execution entity of the embodiment of the present application.
[0095] Step 103: when receiving the configuration word to be written for modifying the configuration word, group the configuration items to be written included in the configuration word to be written according to the multiple configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set.
[0096] Step 104: for each set of configuration items to be written, perform second feature extraction on the configuration items to be written included in the set of configuration items to be written according to the preset rule to obtain feature data to be written corresponding to the set of configuration items to be written.
[0097] Step 105 : When it is determined that each of the characteristic data to be written and the corresponding characteristic data meet a preset condition, the configuration word is modified according to the configuration word to be written.
[0098] The following is a unified description of steps 103 to 105:
[0099] The configuration word to be written is a configuration word reset for the configuration word, which includes the modified content of the configuration word relative to the configuration word. In addition, it may also include the unmodified content of the configuration word. In this case, the configuration word to be written is the configuration word after the configuration word is modified.
[0100] Correspondingly, the configuration items to be written are the configuration items included in the configuration word to be written. It can be understood that, since the configuration word to be written is used to modify the configuration word, the configuration items to be written included in the configuration word to be written are part or all of the configuration items of the configuration word, which only modifies the parameter values of part or all of the configuration items.
[0101] The second feature extraction refers to performing feature processing operations on the configuration items to be written included in the configuration item set to be written, which is used to extract feature data (hereinafter referred to as feature data to be written for ease of distinction) between the configuration items to be written included in the configuration item set to be written.
[0102] In an embodiment of the present application, when the execution subject of the embodiment of the present application receives a configuration word to be written for modifying a configuration word, in order to ensure the security of modifying the configuration word, the configuration word to be written may be first verified to determine whether the configuration word to be written is legal.
[0103] In one embodiment, the execution subject of the embodiment of the present application may first determine all the configuration items to be written included in the configuration word to be written, and group the configuration items to be written included in the configuration word to be written according to the multiple configuration item sets included in the configuration word, and obtain the configuration item set to be written corresponding to each configuration item set. The configuration items included in the configuration item set here are the same configuration items as the configuration items to be written included in the corresponding configuration item set to be written, and the corresponding parameter values may be different or the same, which is not limited in the embodiment of the present application.
[0104] It can be understood that since the configuration items to be written included in the configuration word to be written may be all or part of the configuration items of the configuration word, the number of the configuration item sets to be written included in the configuration word to be written may be different from the number of the configuration item sets included in the configuration word, but there is a corresponding configuration item set for each configuration item set to be written.
[0105] As an optional implementation, all configuration items to be written included in the configuration word to be written may be determined first, and the target configuration item corresponding to each configuration item to be written and the configuration item set to which the target configuration item belongs may be determined among the configuration items included in the configuration word. Afterwards, the configuration item to be written may replace the target configuration item in the configuration item set, thereby obtaining the configuration item set to be written.
[0106] Based on this, after determining the set of configuration items to be written included in the configuration word to be written, for each set of configuration items to be written, feature extraction (hereinafter referred to as the second feature extraction for ease of distinction) can be performed on the configuration items to be written included in the set of configuration items to be written according to the preset rules for constructing the configuration item set, and the feature data to be written corresponding to the set of configuration items to be written can be obtained.
[0107] As an optional implementation, since each configuration item included in the configuration word may correspond to a bit value, then correspondingly, the configuration item to be written corresponding to the configuration item in the configuration word to be written also corresponds to the same bit value. Based on this, the execution subject of the embodiment of the present application may determine the bit value corresponding to each configuration item to be written included in the configuration item set to be written (hereinafter referred to as the first bit value to be written for ease of distinction).
[0108] Afterwards, all first bit values to be written included in the above-mentioned set of configuration items to be written and the target binary value determined in step 102 may be added together to obtain a second bit value to be written.
[0109] Finally, the bit values corresponding to the first number of bits at the end of the second bit value to be written can be determined as the feature data to be written corresponding to the set of configuration items to be written. The first number can be a preset number, and can be 3, 4, or 5, which is not limited in the embodiment of the present application.
[0110] For example, assuming that the set of configuration items to be written includes two configuration items to be written, and the corresponding first bit values to be written are 0101 and 0010 respectively, and continuing to assume that the above target binary value is 010, then after adding the three, the second bit value to be written is 1000. Continuing to assume that the above first number is 3, then taking the bit values corresponding to the last three bits of the second bit value to be written as the characteristic data to be written, the characteristic data to be written is 000.
[0111] Based on the characteristic data to be written corresponding to each configuration item to be written determined above, the execution subject of the embodiment of the present application can determine the characteristic data corresponding to each characteristic data to be written, and determine whether each characteristic data to be written and the corresponding characteristic data meet the preset condition. If the preset condition is met, it means that the set of configuration items to be written included in the configuration word to be written meets the functional relationship of constructing the characteristic data, and it means that the configuration word to be written is legal.
[0112] Optionally, when it is determined that each characteristic data to be written and the corresponding characteristic data meet a preset condition, the configuration word may be modified according to the configuration word to be written.
[0113] As an exemplary implementation, when the configuration word to be written includes all configuration items of the configuration word, the execution subject of the embodiment of the present application can directly replace the configuration word with the configuration word to be written.
[0114] As another exemplary implementation, when the configuration word to be written includes some configuration items of the configuration word, the execution subject of the embodiment of the present application may modify some configuration items of the configuration word according to the configuration word to be written.
[0115] On the contrary, when it is determined that there is characteristic data to be written and the corresponding characteristic data does not meet the preset conditions, the execution body of the embodiment of the present application may send a write failure message to the client that sends the configuration word to be written, and reject the client's write request within a preset time period (for example, 48 hours).
[0116] The technical solution provided by the embodiment of the present application is to obtain multiple configuration item sets by grouping multiple configuration items included in the configuration word, and for each configuration item set, perform a first feature extraction on the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set, and when receiving a configuration word to be written for modifying the above configuration word, group the configuration items to be written included in the configuration word to be written according to the above multiple configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set, and for each configuration item set to be written, perform a second feature extraction on the configuration items to be written included in the configuration item set to be written according to the above preset rule to obtain feature data to be written corresponding to the configuration item set to be written, and when it is determined that each of the above feature data to be written and the corresponding feature data meet a preset condition, the configuration word is modified according to the configuration word to be written. This technical solution groups multiple configuration items included in each configuration word included in the vehicle, and constructs characteristic data corresponding to each group of configuration items in advance. After receiving the configuration word to be written for modifying the configuration word, the characteristic data included in the configuration word to be written can be constructed according to the same grouping and construction method as the configuration word. Then, by comparing the characteristic data of the configuration word with the characteristic data of the configuration word to be written corresponding to the configuration word, it can be determined whether the configuration word to be written meets the preset conditions for modifying the configuration word, thereby realizing security verification of the configuration word to be written based on the characteristic data constructed by the configuration items, thereby improving the security of modifying the configuration words of the vehicle.
[0117] See also Figure 2 , which is a flow chart of another embodiment of a vehicle configuration word modification method provided in an embodiment of the present application. Figure 2 The process shown in Figure 1Based on the process shown, it describes how to further verify the configuration word to be written, so as to modify the configuration word according to the configuration word to be written, when it is determined that each feature data to be written and the corresponding feature data meet the preset conditions, and each configuration word also includes a reserved configuration item field and a flag bit for whether to add a new configuration. Figure 2 As shown, the process may include the following steps:
[0118] Step 201: When it is determined that each feature data to be written and the corresponding feature data meet a preset condition, obtain a first value corresponding to a reserved configuration item field of a configuration word to be written and a second value of a new configuration flag.
[0119] Step 202: Determine whether the configuration word to be written meets the preset writing condition according to the first value and the second value. If yes, execute step 203; if no, execute step 204.
[0120] Step 203: modify the configuration word according to the configuration word to be written.
[0121] Step 204: outputting a prompt message indicating that the configuration word to be written has failed, and not receiving any more configuration words to be written within a preset time period.
[0122] The following is a unified description of steps 201 to 204:
[0123] The above-mentioned reserved configuration item field is used to record the configuration items to be split. Since the modification of the configuration word may include splitting the existing configuration items, in the embodiment of the present application, the configuration items to be split can be recorded in the reserved configuration item field.
[0124] The above-mentioned first value is the numerical value recorded corresponding to the above-mentioned reserved configuration item field. The first value is used to represent the configuration item to be split recorded in the above-mentioned reserved configuration item field. For example, in the corresponding configuration item set by the configuration word, the number 1 represents configuration item A, the number 2 represents configuration item B, and the number 3 represents configuration item C. If the configuration item to be split is C, then the first value recorded in the reserved configuration item field is 3.
[0125] The above-mentioned whether to add a new configuration flag is used to indicate whether there are configuration items to be split in the configuration word. Both of them play the role of indicating whether there are configuration items to be split in the configuration word. The difference is that the reserved configuration item field records the detailed configuration items to be split, and whether to add a new configuration flag is used to indicate whether there are configuration items to be split in the configuration word.
[0126] The above-mentioned second value is the numerical value corresponding to the record of whether the above-mentioned new configuration flag is added. The second value specifically indicates whether there are configuration items to be split in the configuration word. For example, when the second value is 1, it indicates that there are configuration items to be split; when the second value is 0, it indicates that there are no configuration items to be split.
[0127] In the embodiment of the present application, the configuration word to be written can be re-authenticated according to whether the meanings represented by the reserved configuration item field and the value of the whether to add a configuration flag are inconsistent. Therefore, the execution subject of the embodiment of the present application can further obtain the first value corresponding to the reserved configuration item field of the configuration word to be written and the second value of the whether to add a configuration flag when determining that each feature data to be written and the corresponding feature data meet the preset conditions.
[0128] Based on this, the execution subject of the embodiment of the present application can determine whether the configuration word to be written meets the preset writing condition according to the above-mentioned first value and second value.
[0129] As an exemplary implementation, it can be determined whether the first value satisfies that there is no configuration item to be split, and when the first value represents that there is no configuration item to be split, it can be determined whether the second value represents that there is no configuration item to be split in the configuration word to be written.
[0130] Optionally, if the second value indicates that the configuration word to be written does not have any configuration item to be split, it is determined that the configuration word to be written meets a preset writing condition.
[0131] On the contrary, if the second value indicates that the configuration word to be written has a configuration item to be split, indicating that the two are contradictory, it is determined that the configuration word to be written does not meet the preset writing condition.
[0132] Wherein, in the case where it is determined that the first value indicates that there are configuration items to be split, it may be determined whether the second value indicates that there are configuration items to be split in the configuration word to be written.
[0133] Optionally, if the second value indicates that the configuration word to be written has a configuration item to be split, it means that the meanings represented by the two are consistent, and it is determined that the configuration word to be written meets the preset writing condition.
[0134] On the contrary, if the second value indicates that the configuration word to be written does not have a configuration item to be split, indicating that the two are contradictory, it is determined that the configuration word to be written does not meet the preset writing condition.
[0135] For example, if there are new configuration items to be split, the reserved configuration item field is used to define them. When not used, the default value is 0. If the configuration word written has new configuration items, the value of the whether new configuration flag is set to 2, otherwise it is set to 1. When the reserved configuration item field is not 0, if the whether new configuration flag is not 2, the configuration write is considered illegal and the configuration word write command will not be responded to within 24 hours.
[0136] Based on this, after the execution subject of the embodiment of the present application receives the corresponding configuration word to be written, it first checks whether the reserved configuration item field is 0. If it is 0, it then checks whether the newly added configuration flag is 0. If it is 0, the configuration word is illegal, and it will no longer respond to the configuration word write instruction within 24 hours and feedback the write failure. If it is not 0, it then checks whether the newly added configuration flag is 1. If it is not 1, the configuration word is illegal, and it will no longer respond to the configuration word write instruction within 24 hours and feedback the write failure.
[0137] Further, when it is determined that the configuration word to be written meets the preset writing condition, the configuration word can be modified directly according to the configuration word to be written. As for how to modify it specifically, please refer to the description in step 105, which will not be described in detail here.
[0138] Optionally, when it is determined that the configuration word to be written does not meet the writing condition, a prompt message for prompting that the writing of the configuration word to be written has failed can be output, and no configuration word to be written is received within a preset time period (for example, within 48 hours).
[0139] The technical solution provided by the embodiment of the present application, by determining that each feature data to be written and the corresponding feature data meet the preset conditions, obtaining the first value corresponding to the reserved configuration item field of the configuration word to be written, and the second value of whether a new configuration flag is added, and determining whether the configuration word to be written meets the preset writing conditions according to the above first value and second value, if so, modifying the configuration word according to the configuration word to be written; if not, outputting a prompt message for prompting that the writing of the configuration word to be written failed, and no longer receiving the configuration word to be written within a preset time period. This technical solution, by setting the reserved configuration item field and the whether a new configuration flag is added in the configuration word, can further verify whether the meanings represented by the values corresponding to the reserved configuration item field and the whether a new configuration flag are contradictory after the configuration word to be accessed meets the preset conditions, so as to achieve further verification of the configuration word to be written, and achieve double verification of the configuration word to be written, thereby ensuring the security of modifying the configuration word.
[0140] See also Figure 3, is a block diagram of an embodiment of a vehicle configuration word modification device provided in an embodiment of the present application. As an embodiment, the device can be applied to any controller in a vehicle, and the controller can correspond to a configuration word, and the configuration word can include multiple configuration items. Figure 3 As shown, the device may include:
[0141] A first grouping module 31 is used to group the multiple configuration items included in the configuration word to obtain multiple configuration item sets, wherein each configuration item set includes a preset number of configuration items;
[0142] A first processing module 32 is used for performing a first feature extraction on the configuration items included in each of the configuration item sets according to a preset rule to obtain feature data corresponding to the configuration item set;
[0143] A second grouping module 33 is used for, when receiving a configuration word to be written for modifying the configuration word, grouping the configuration items to be written included in the configuration word to be written according to the plurality of configuration item sets, to obtain a configuration item set to be written corresponding to each configuration item set;
[0144] A second processing module 34 is configured to perform second feature extraction on the configuration items to be written included in each of the configuration item sets to be written according to the preset rule to obtain feature data to be written corresponding to the configuration item set to be written;
[0145] The modification module 35 is used to modify the configuration word according to the configuration word to be written when it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset conditions.
[0146] like Figure 4 As shown, it is a schematic diagram of the structure of a vehicle provided in an embodiment of the present application, including a processor 41, a communication interface 42, a memory 43 and a communication bus 44, wherein the processor 41, the communication interface 42, and the memory 43 communicate with each other through the communication bus 44.
[0147] A memory 43, for storing computer programs;
[0148] In one embodiment of the present application, the processor 41 is used to execute the program stored in the memory 43 to implement the vehicle configuration word modification method provided by any of the above method embodiments, including:
[0149] Grouping the multiple configuration items included in the configuration word to obtain multiple configuration item sets;
[0150] For each of the configuration item sets, extract first features from the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set;
[0151] When receiving a configuration word to be written for modifying the configuration word, grouping the configuration items to be written included in the configuration word to be written according to the plurality of configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set;
[0152] For each of the to-be-written configuration item sets, performing second feature extraction on the to-be-written configuration items included in the to-be-written configuration item set according to the preset rule to obtain to-be-written feature data corresponding to the to-be-written configuration item set;
[0153] When it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset condition, the configuration word is modified according to the configuration word to be written.
[0154] An embodiment of the present application also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the vehicle configuration word modification method provided in any of the aforementioned method embodiments are implemented.
[0155] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0156] Through the text of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0157] It should be understood that the terms used in the text are only for the purpose of the specific example implementation of the text, and are not intended to be limited. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text can also be represented to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of the stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or their combinations. The method steps, processes, and operations of the text in the text are not interpreted as necessarily requiring them to be performed in the specific order of the text or description, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps can be used.
[0158] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for modifying a vehicle configuration word, characterized in that: Applied to any controller in a vehicle, the controller corresponds to a configuration word, the configuration word includes multiple configuration items, and the method includes: Grouping the multiple configuration items included in the configuration word to obtain multiple configuration item sets; For each of the configuration item sets, extract first features of the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set; When receiving a configuration word to be written for modifying the configuration word, grouping the configuration items to be written included in the configuration word to be written according to the plurality of configuration item sets to obtain a configuration item set to be written corresponding to each configuration item set; For each of the to-be-written configuration item sets, performing second feature extraction on the to-be-written configuration items included in the to-be-written configuration item set according to the preset rule to obtain to-be-written feature data corresponding to the to-be-written configuration item set; When it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset condition, the configuration word is modified according to the configuration word to be written.
2. The method according to claim 1, characterized in that The grouping of the multiple configuration items included in the configuration word to obtain multiple configuration item sets includes: According to a preset number of each configuration item set, the multiple configuration items included in the configuration word are randomly grouped to obtain multiple configuration item sets; or, Determine a bit position of each of the configuration items; group multiple configuration items included in the configuration word according to the bit position of each of the configuration items and the preset number to obtain multiple configuration item sets; or, Prioritize the multiple configuration items to obtain the priority of each configuration item; and group the multiple configuration items included in the configuration word according to the priority of each configuration item and the preset number to obtain multiple configuration item sets.
3. The method according to claim 1, characterized in that The step of performing first feature extraction on the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set includes: Determine a first bit value corresponding to each of the configuration items included in the configuration item set; Determining the number of bits occupied by each of the configuration items; Determining a target binary value from a plurality of preset binary values according to the bit position; Adding all first bit values included in the configuration item set and the target binary value to obtain a second bit value; The bit values corresponding to the first number of bits at the end of the second bit value are determined as the characteristic data corresponding to the configuration item set.
4. The method according to claim 3, characterized in that The performing second feature extraction on the configuration items to be written included in the set of configuration items to be written according to the preset rule to obtain feature data to be written corresponding to the set of configuration items to be written, comprises: Determine the first to-be-written bit value corresponding to each of the to-be-written configuration items included in the to-be-written configuration item set; Adding all first bit values to be written included in the configuration item set and the target binary value to obtain a second bit value to be written; The bit values corresponding to the first number of bits at the end of the second bit value to be written are determined as the to-be-written characteristic data corresponding to the to-be-written configuration item set.
5. The method according to claim 1, characterized in that The determining that each of the characteristic data to be written and the corresponding characteristic data meet a preset condition includes: For each of the characteristic data to be written, determining a difference between the characteristic data to be written and the corresponding characteristic data; Determine a preset difference range between the characteristic data to be written and the characteristic data; When the difference is within the difference range, it is determined that the characteristic data to be written and the corresponding characteristic data meet a preset condition.
6. The method according to claim 1, characterized in that The configuration word further includes a reserved configuration item field and a newly added configuration flag, wherein the reserved configuration item field is used to record the configuration item to be split, and the newly added configuration flag is used to indicate whether there is a configuration item to be split in the configuration word; The step of modifying the configuration word according to the configuration word to be written, when it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset condition, includes: When it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset condition, obtaining a first value corresponding to the reserved configuration item field of the configuration word to be written and a second value of the flag bit of whether to add a new configuration; Determining whether the configuration word to be written meets a preset writing condition according to the first value and the second value; When it is determined that the configuration word to be written meets the writing condition, the configuration word is modified according to the configuration word to be written.
7. The method according to claim 6, characterized in that The determining, according to the first value and the second value, whether the configuration word to be written meets a preset writing condition includes: In a case where the first value indicates that there is no configuration item to be split, determining whether the second value indicates that there is no configuration item to be split in the configuration word to be written; If the second value indicates that the configuration word to be written does not have any configuration item to be split, determining that the configuration word to be written meets the preset writing condition; In a case where the first value indicates that there is a configuration item to be split, determining whether the second value indicates that there is a configuration item to be split in the configuration word to be written; If the second value indicates that the configuration word to be written has a configuration item to be split, it is determined that the configuration word to be written meets the preset writing condition.
8. The method according to claim 1, characterized in that The configuration word to be written is sent by the cloud server. After the cloud server performs a preset security service authentication with the controller, the cloud server sends the configuration word to be written to the controller according to the configuration word identifier of the configuration word to be written.
9. A vehicle configuration word modification device, characterized in that: Applicable to any controller in a vehicle, the controller corresponds to a configuration word, the configuration word includes multiple configuration items, and the device includes: A first grouping module, configured to group the plurality of configuration items included in the configuration word to obtain a plurality of configuration item sets, wherein each configuration item set includes a preset number of configuration items; A first processing module, configured to process, for each of the configuration item sets, the configuration items included in the configuration item set according to a preset rule to obtain feature data corresponding to the configuration item set; A second grouping module is used for, when receiving a configuration word to be written for modifying the configuration word, grouping the configuration items to be written included in the configuration word to be written according to the plurality of configuration item sets, to obtain a configuration item set to be written corresponding to each configuration item set; A second processing module is used to process the configuration items to be written included in each of the configuration item sets to be written according to the preset rule to obtain the to-be-written characteristic data corresponding to the configuration item set to be written; The modification module is used to modify the configuration word according to the configuration word to be written when it is determined that each of the characteristic data to be written and the corresponding characteristic data meet the preset conditions.
10. A vehicle, characterized in that: The vehicle comprises a processor and a memory, and the processor is used to execute a vehicle configuration word modification program stored in the memory to implement the vehicle configuration word modification method according to any one of claims 1 to 8.