Method and system for customizing updates of a vehicle gateway routing configuration table

By calculating the steady-state score of the maintenance environment and generating the routing addressing assembly instruction segment, and utilizing the instruction jump offset array and the compilation source identity feature verification code, the instability problem of routing configuration updates in vehicle data exchange networks is solved, thereby improving the stability and security of updates.

CN122247922APending Publication Date: 2026-06-19XIAMEN AUTOSTAR ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN AUTOSTAR ELECTRONICS CO LTD
Filing Date
2026-04-03
Publication Date
2026-06-19

Smart Images

  • Figure CN122247922A_ABST
    Figure CN122247922A_ABST
Patent Text Reader

Abstract

This invention relates to the field of IoT routing management technology, specifically a customized update method and system for vehicle gateway routing configuration tables. The method includes the following steps: calculating and generating a steady-state score for the maintenance environment based on the set of message identifiers on the CAN bus and Ethernet bus within a set time window of the vehicle data exchange network and the probability values ​​of each message identifier. In this invention, the matching status of the compilation source identity is determined by comparing the authorized feature byte segment with the verification code of the compilation source identity feature. A write operation is performed under the condition of a matching match, ensuring that the routing configuration update has environmental adaptability, structural authenticity, source verifiability, and write controllability. This improves the stability, security, specificity, and consistency of results in the customized update process of the vehicle gateway routing configuration table, reducing the cascading impact of incorrect writes, miswrites, mixed writes, and unauthorized overwriting on the entire vehicle communication link.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) routing management technology, and in particular to a method and system for customizing the updating of vehicle gateway routing configuration tables. Background Technology

[0002] IoT routing management technology mainly revolves around data forwarding, path allocation, communication organization, and access control among various types of terminal devices, edge nodes, gateway devices, and back-end management platforms. Its core task is to ensure that data under different network layers, different communication protocols, and different address systems can be transmitted stably according to predetermined rules.

[0003] Current technologies focus on ensuring that data between different network layers, communication protocols, and address systems can be transmitted according to predetermined rules. However, when vehicle data exchange networks experience dense packet fluctuations, temporary changes in communication relationships, or abnormal link load distribution, they may still maintain a superficially smooth transmission, making it difficult to directly determine whether the current moment is suitable for configuration writing. Once an update is triggered in an unstable state, it may cause partial mismatches in the routing table, disordered packet forwarding order, or prolonged recovery periods. Therefore, improvements are needed. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a customized update method and system for vehicle gateway routing configuration tables.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: a customized update method for the vehicle gateway routing configuration table, comprising the following steps: Based on the set of message identifiers on the CAN bus and Ethernet bus within the time window set by the vehicle data exchange network and the probability value of each message identifier, the steady-state score of the maintenance environment is calculated and generated. If the steady-state score of the maintenance environment is greater than or equal to the environmental access threshold judgment condition, then extract the control flow graph feature data segment where the routing distribution function is located in the hexadecimal file to be updated issued by the customer diagnostic tool, generate the routing addressing assembly instruction segment, perform coordinate positioning and calculation on the conditional jump instruction and the target memory address inside the routing addressing assembly instruction segment, and obtain the instruction jump offset array. Based on the numerical values ​​of each offset distance within the instruction jump offset array, a code compilation hash digest value is generated. The code compilation hash digest value is then appended to the end of the hexadecimal file to be updated to generate a compilation source identity verification code. Based on the authorized feature byte segment in the gateway controller bootloader storage area, the compilation source identity feature verification code is compared with the authorized feature byte segment to obtain the compilation source identity matching status. When the compilation source identity matching status is consistent, the hexadecimal file to be updated is written into the vehicle gateway routing configuration table to obtain the vehicle gateway routing table update status.

[0006] Preferably, the step of obtaining the environmental steady-state score is as follows: Within a set time window of the vehicle data exchange network, the CAN bus message identifier set and the Ethernet bus message identifier set are read. The number of times each message identifier appears within the time window is counted item by item. The number of times the same message identifier appears in the two types of buses is accumulated. Then, the ratio of the number of times each message identifier appears to the total number of times all messages appear within the time window is calculated and the corresponding relationship is recorded to form the probability distribution of message identifier appearance. Based on the probability distribution of the message identifiers, extract the probability values ​​of each message identifier. Perform a natural logarithmic operation on the probability value of each message identifier and multiply it with the original probability value. Sum all the product results and invert them to obtain the network traffic entropy value. Based on the network traffic entropy value, the probability distribution of the packet identifier, the baseline steady-state probability distribution, the packet criticality weight value, the total number of packets appearing in the time window and the total number of packets appearing in the baseline steady-state are obtained, and the steady-state score of the maintenance environment is calculated.

[0007] Preferably, the step of obtaining the routing addressing assembly instruction segment is as follows: When the steady-state score of the maintenance environment is greater than or equal to the environmental access threshold, the byte sequence of the hexadecimal file to be updated issued by the customer diagnostic tool is parsed and the starting address of the routing dispatch function is located. The instruction address mapping table is obtained through continuous disassembly and parsing. Then, the control flow graph feature data segment is constructed based on the relationship between the jump instruction entry and exit and the corresponding assembly instruction sequence is extracted to generate the routing addressing assembly instruction segment.

[0008] Preferably, the step of obtaining the instruction jump offset array is as follows: Based on the routing addressing assembly instruction segment, the absolute byte address of each conditional jump instruction and the absolute byte address of the target memory address are extracted item by item. At the same time, the byte position of the conditional jump instruction in the base block and the byte position of the target memory address in the base block are extracted, and the structured jump feature value is calculated. According to the order of appearance of the conditional jump instructions in the routing addressing assembly instruction segment, each structured jump feature value is sequentially mapped, and each structured jump feature value is written into a continuous offset slot while maintaining a one-to-one correspondence with the original conditional jump instruction position. Each slot records the corresponding jump direction and jump distance information, generating an instruction jump offset array.

[0009] Preferably, the step of obtaining the code compilation hash digest value is as follows: According to the instruction jump offset array index order, each offset distance value item is read one by one, each offset distance value item is converted into an equal-length binary segment, and they are concatenated to form a continuous binary string. Then, the continuous binary string is divided according to the preset segment length. The adjacent segments are subjected to cyclic shift, cross-join, bit-by-bit XOR and last bit write-back processing to extract stable binary digest feature values ​​and generate code compilation hash digest value.

[0010] Preferably, the step of obtaining the source identity verification code is as follows: Locate the starting byte position of the fixed-length byte data segment appended to the end of the hexadecimal file to be updated, read the fixed-length byte sequence in the fixed-length byte data segment appended to the end of the hexadecimal file to be updated byte by byte, convert the code compilation hash digest value into the corresponding byte sequence and write it into the continuous buffer according to the concatenation order, and generate a file check code identifier item; The file verification code identifier item is parsed, including the position of each byte, the value of each byte, and the combination relationship of each continuous byte segment. The byte sequence in the file verification code identifier item is converted into an identity marker character sequence according to a preset encoding mapping rule to generate a source identity feature verification code.

[0011] Preferably, the step of obtaining the compilation source identity matching status is as follows: Based on the authorized feature byte segment in the gateway controller bootloader storage area, read all the byte content of the compiled source identity feature verification code, establish a one-to-one bit sequence mapping relationship according to the byte order, compare the binary value of each bit one by one to see if they are consistent, write the comparison result of each bit into the corresponding flag bit, and then summarize the number of consistent bits and inconsistent bits in each group of comparison results according to the byte order to form a status flag. Read the number of consistent bits and the number of inconsistent bits corresponding to each byte position in the status flag, check byte by byte whether there is a byte position with a non-zero number of inconsistent bits, record the first inconsistent byte position and the last inconsistent byte position, count the number of completely consistent bytes in all byte positions, and compare the number of completely consistent bytes with the total number of bytes in the status flag. If the number of completely consistent bytes is equal to the total number of bytes in the status flag, write a consistency flag; if the number of completely consistent bytes is not equal to the total number of bytes in the status flag, write an inconsistency flag to obtain the compilation source identity matching status.

[0012] Preferably, the step of obtaining the vehicle gateway routing table update status is as follows: When the identity matching status of the compiled source is consistent, the old data address range of the gateway controller flash sector corresponding to the vehicle gateway routing configuration table is located. According to the address record and data record order in the hexadecimal file to be updated, the hexadecimal file to be updated is written segment by segment into the address corresponding to the vehicle gateway routing configuration table to form the vehicle gateway routing table update status.

[0013] The present invention also provides a system comprising: The maintenance environment determination module is used to calculate and generate a steady-state score of the maintenance environment based on the set of message identifiers on the CAN bus and Ethernet bus within a set time window of the vehicle data exchange network and the probability value of each message identifier. The routing instruction parsing module is used to extract the control flow graph feature data segment containing the routing distribution function in the hexadecimal file to be updated issued by the customer diagnostic tool if the steady-state score of the maintenance environment is greater than or equal to the environment admission threshold judgment condition, generate a routing addressing assembly instruction segment, perform coordinate positioning and calculation on the conditional jump instruction and the target memory address inside the routing addressing assembly instruction segment, and obtain the instruction jump offset array. The compilation source identity generation module is used to generate a code compilation hash digest value based on the numerical values ​​of each offset distance inside the instruction jump offset array, and to append the code compilation hash digest value to the end of the hexadecimal file to be updated to generate a compilation source identity feature verification code. The update authorization verification module is used to compare the compilation source identity feature verification code with the authorization feature byte segment in the gateway controller bootloader storage area to obtain the compilation source identity matching status. When the compilation source identity matching status is consistent, the hexadecimal file to be updated is written into the vehicle gateway routing configuration table to obtain the vehicle gateway routing table update status.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, a steady-state score for the maintenance environment is extracted by setting the set of message identifiers and their occurrence probability values ​​within a time window of the vehicle data exchange network. This ensures that the routing configuration writing action no longer relies solely on external command triggers but is based on the current communication environment's capacity and acceptability. This reduces the risk of inaccurate configuration writing caused by direct updates under conditions of communication congestion, abnormal jitter, or network disturbance. The routing addressing assembly instruction segment is extracted from the control flow graph feature data segment containing the routing distribution function within the hexadecimal file to be updated. Furthermore, the offset relationship between the conditional jump instruction and the target memory address is calculated, expanding the update verification object from surface file bytes to the routing distribution behavior itself. This not only identifies whether the routing configuration content corresponds to the expected control logic but also enhances the ability to distinguish between disguised files, concatenated files, and partially rewritten files. A code compilation hash digest value is generated based on each offset distance value within the instruction jump offset array. This hash digest is then combined with the appended content at the end of the hexadecimal file to be updated to form a compilation source identity verification code. This ensures that the file identity determination criteria consider both code structure features and fixed-length byte information at the end of the file, improving source identification accuracy and strengthening the correspondence between the update object and the authorized object. The comparison results between the authorized feature byte segment and the compilation source identity feature verification code determine the compilation source identity matching status, and the write action is performed under the condition of matching. This makes the routing configuration update have environmental adaptability, structural authenticity, source verifiability and write controllability, thereby improving the stability, security, targeting and result consistency of the customized update process of the vehicle gateway routing configuration table, and reducing the cascading impact of incorrect writing, miswriting, mixed writing and unauthorized overwriting on the whole vehicle communication link. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the steps of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] Please see Figure 1 This invention provides a technical solution: a method for customizing the update of a vehicle gateway routing configuration table, comprising the following steps: Based on the set of message identifiers on the CAN bus and Ethernet bus within the time window set by the vehicle data exchange network and the probability value of each message identifier, the steady-state score of the maintenance environment is calculated and generated. If the environmental steady-state score is greater than or equal to the environmental access threshold judgment condition, then extract the control flow graph feature data segment where the routing distribution function is located in the hexadecimal file to be updated issued by the customer diagnostic tool, generate the routing addressing assembly instruction segment, locate and calculate the coordinates of the conditional jump instruction and the target memory address inside the routing addressing assembly instruction segment, and obtain the instruction jump offset array. Based on the numerical values ​​of each offset distance within the instruction jump offset array, generate a code compilation hash digest value, append the code compilation hash digest value to the end of the hexadecimal file to be updated, and generate a compilation source identity verification code; Based on the authorized feature byte segment in the gateway controller bootloader storage area, the compilation source identity feature verification code is compared with the authorized feature byte segment to obtain the compilation source identity matching status. When the compilation source identity matching status is consistent, the hexadecimal file to be updated is written into the vehicle gateway routing configuration table to obtain the vehicle gateway routing table update status.

[0018] The steps for obtaining the environmental steady-state score are as follows: Within a set time window of the vehicle data exchange network, the CAN bus message identifier set and the Ethernet bus message identifier set are read. The number of times each message identifier appears within the time window is counted item by item. The number of times the same message identifier appears in the two types of buses is accumulated. Then, the ratio of the number of times each message identifier appears to the total number of times all messages appear within the time window is calculated and the corresponding relationship is recorded to form the probability distribution of message identifier appearance. Based on the probability distribution of message identifier occurrence, extract the probability value of each message identifier occurrence item by item, perform a natural logarithmic operation on the probability value of each message identifier occurrence and multiply it with the original probability value, sum and invert all the product results to obtain the network traffic entropy value. Based on the network traffic entropy value, obtain the packet identifier occurrence probability distribution, baseline steady-state probability distribution, packet criticality weight value, and the total number of packet occurrences within the time window and the baseline steady-state total number of packet occurrences. Calculate the maintenance environment steady-state score using the following formula: ; in, To maintain the environmental steady-state fraction, The baseline steady-state network traffic entropy value is obtained by multiplying the occurrence probability values ​​of each message identifier in the baseline steady-state probability distribution with the natural logarithm value, summing the results, and then inverting the sum. For the current time window The probability value of each message identifier appearing. The first in the baseline steady-state probability distribution The probability value of each message identifier appearing. For the first The critical weight value of each message identifier. The message identifier is arranged in a probability sequence. The message identifier is assigned a probability-based starting sequence number. The termination number is used to assign probabilistic values ​​to message identifiers. This represents the total number of times all messages appear within the current time window. This represents the total number of occurrences of all messages within the baseline steady-state time window. This is the flow rate / volume deviation coefficient.

[0019] Specifically, a 500-millisecond time acquisition window is defined in the vehicle's internal communication network. Within this 500-millisecond duration, all communication data frames are captured through the network interface. The sets of message identifiers appearing in the CAN bus channel and the Ethernet bus channel are extracted. For example, identifier 0x1A2 in the CAN channel and identifiers 0x1001 and 0x1A2 in the Ethernet channel are captured. A global statistical list containing all captured unique message identifiers is established. For each message identifier in this global statistical list, the total number of frames in which it appears within the defined 500-millisecond time window is counted one by one. If a message identifier exists in data frames on both the CAN bus and the Ethernet bus, the counts of its appearance in both physical transmission channels are summed. For example... Identifier 0x1A2 is counted 45 times in the CAN channel and 15 times in the Ethernet channel. After adding them together, the total value of this identifier is updated to 60 times. After merging the counts of all identifiers in the list, the total values ​​of all independent identifiers are added together again to obtain the total number of message frames circulating in the network within this 500-millisecond time window. For example, if the total number of message frames is 1000 times. Then, the total value of each message identifier in the list is divided by the total number of message frames just obtained. For example, the 60 times of identifier 0x1A2 is divided by the total number of frames 1000 times to calculate the occurrence ratio of this identifier as 0.06. The calculated ratio value and the corresponding message identifier are associated with each other in the storage space. The entries are arranged according to the size of the ratio value corresponding to the identifier or the hexadecimal value of the identifier itself to form the probability distribution of message identifier occurrence.

[0020] The system accesses the previously organized message identifier occurrence probability distribution data structure and sequentially reads the occurrence probability values ​​of each message identifier stored in each associated entry. To assess the degree of chaos and uncertainty in data interaction within the current vehicle communication network, for each read message identifier occurrence probability value, a natural logarithm operation with the natural constant e as the base is performed using a mathematical function library. Since the extracted probability values ​​are all decimals greater than 0 and less than 1, the natural logarithm operation will yield a negative floating-point value. For example, if the occurrence probability value of the identifier 0x1A2 is read as 0.06, performing a natural logarithm operation on it yields a result of -2.8134. After completing the logarithmic operation, the negative logarithm result is multiplied by the original occurrence probability value of the message identifier, i.e., 0.06 is multiplied by the original probability value. Multiplying by -2.8134 yields -0.1688. The same natural logarithm and multiplication operation is performed on all message identifiers in the distribution list. All calculated products are placed in a temporary dataset. For example, the product of another identifier with a probability of 0.1 is -0.2303. After all identifiers have been processed, all negative product results are summed within this temporary dataset to obtain a total negative sum. For example, if there are 20 active identifiers in the network, summing these 20 products yields a total of -2.546. The sign of this negative sum is flipped, converting the negative number to a corresponding positive value, transforming -2.546 into 2.546. This processed positive value is used as a characteristic of the network state, yielding the network traffic entropy value.

[0021] In the formula for calculating the steady-state score of the maintenance environment, a steady-state scoring system is constructed by introducing a weighted relative entropy based on key weight adjustment and a logarithmic deviation square term of traffic volume. This system measures the degree to which the current network communication state deviates from the ideal silent maintenance state. The numerator is the baseline entropy value under the ideal state, and the denominator includes penalty terms for the offset of each packet probability distribution and the offset of the overall traffic volume. The closer the current network state is to the baseline steady state, the smaller the deviation penalty, the closer the denominator is to the numerator, and the closer the score is to 1. The parameter acquisition steps are as follows: Under a silent maintenance environment where the vehicle is fault-free and the engine is off, a reference steady-state time window of 500 milliseconds is set. Within this window, messages on the CAN and Ethernet buses are read, and the occurrence probability values ​​corresponding to each message identifier in the reference steady-state probability distribution are statistically calculated. For each probability value, the logarithmic function is called to obtain the natural logarithm value with the natural constant e as the base. Each probability value is multiplied by its corresponding natural logarithm value, and the sum of all products is obtained by removing the negative sign to get the reference steady-state network traffic entropy value. For example, if three message identifiers are captured in the reference environment with occurrence probabilities of 0.50, 0.30, and 0.20, the products are calculated as follows: 0.50 multiplied by -0.6931 equals -0.3465, 0.30 multiplied by -1.2040 equals -0.3612, and 0.20 multiplied by -1.6094 equals -0.3219. The sum is obtained as -1.0296, which is then inverted to get the value. The specific value is 1.0296.

[0022] The steps for obtaining the parameters are as follows: From the previously calculated list of message identifier occurrence probability distributions, read the occurrence probability value of the message identifier at the corresponding position within the currently set 500-millisecond time window, according to the ordered sequence number of the identifiers. This value is calculated by dividing the total number of frames in which the specific identifier appears by the total number of frames in all messages within the current time window. For example, according to the sequence number, read the occurrence probability value of the message identifier in the first position. The specific value is 0.55, which is the probability value of the occurrence of the message identifier in the second position. The specific value is 0.25, which is the probability value of the occurrence of the message identifier in the third position. The specific value is 0.20.

[0023] The steps for obtaining the parameters are as follows: In the previously established and saved list of baseline steady-state probability distributions, following the same arrangement order as the current packet identifier, find the probability value that the packet identifier at the corresponding sequence number should have appeared in the silent maintenance state. This value reflects the proportion of network background traffic composition under the ideal update environment. For example, based on the arranged sequence number, find the baseline steady-state probability value corresponding to the first position. The specific value is 0.50. Find the baseline steady-state probability value corresponding to the second position. The specific value is 0.30. Find the baseline steady-state probability value corresponding to the 3rd position. The specific value is 0.20.

[0024] The parameter acquisition steps are as follows: Based on the vehicle communication matrix design document provided by the OEM, the vehicle safety integrity level attribute specified for each message identifier is mapped to generate message criticality weight values. The weight is set as follows: ASIL-D level = 2.0, ASIL-C level = 1.5, ASIL-B level = 1.2, ASIL-A level = 1.0, and QM level (without special safety requirements) = 0.5. This weighted amplification penalty is applied to message changes that may affect flashing security. For example, if the document indicates that the first message identifier is used for power control and has an ASIL-D level, then... The specific value is 2.0. The second message is used for body control and is of ASIL-B level. The specific value is 1.2. The third message is used for the entertainment system and is of level QM, thus obtaining... The specific value is 0.5.

[0025] The steps for obtaining parameters are as follows: for example, if the identifier 0x100 is in the first position, its sequence number... The specific value is 1, and the identifier 0x1A2 is in the second position, its sequence number The specific value is 2.

[0026] The specific value is fixed at 1.

[0027] The steps for obtaining the parameters are as follows: Perform a length calculation operation on the array containing all deduplicated message identifiers. For example, if the merged and deduplicated array contains a total of 3 different message identifiers, then... The specific value is 3.

[0028] The parameter acquisition steps are as follows: In the previous step of accumulating the number of occurrences of each packet identifier within the current time window, the total number of all data frames circulating in the network within the current 500-millisecond time window is recorded. This value represents the actual data load currently carried by the network. For example, if three packets are captured in the current window, with merge counts of 550, 250, and 200 respectively, they are all added together to obtain the total number of occurrences of all packets within the current time window. The specific value is 1000.

[0029] The steps for obtaining the parameters are as follows: In the preparation stage of constructing the baseline steady-state probability distribution, the total number of all data frames appearing within a 500-millisecond baseline time window under silent maintenance environment is recorded. This value is used as a reference baseline to measure traffic volume deviation. For example, in a silent environment, the combined count values ​​of the same three types of packets are counted as 400, 240, and 160 times, respectively. These three values ​​are added together to obtain the total number of packets appearing within the baseline steady-state time window. The specific value is 800.

[0030] The steps for obtaining the parameters are as follows: Read the historical successful write log records stored internally by the gateway controller; extract the total number of packets occurring in the current time window and the total number of packets occurring in the baseline steady state during the past 50 successful entries into the gateway routing table update mode; calculate the absolute value of the natural logarithm of the ratio of these two counts for each instance; calculate the average of these 50 calculated absolute logarithmic values; then divide the value by 1 to obtain the traffic volume deviation coefficient. For example, if the average of these 50 absolute logarithmic values ​​calculated from historical records is 0.8, then dividing 1 by 0.8 yields... The specific value is 1.25.

[0031] Calculations based on parameters: Substitute each known value into the expression within the summation term and calculate the result for each iteration. When t=1, substituting the corresponding parameters, the calculation is as follows: ; equal ; The result of this step is calculated as follows: ; When t=2, substituting the corresponding parameters, the formula is: ; equal ; The result of this step is calculated as follows: ; When t=3, substituting the corresponding parameters, the calculation is as follows: ; equal ; The result of this step is calculated as follows: ; Add the results of the three loops above together to calculate the total value of the relative entropy summation term; The formula is ; The result of the summation term is ; Substitute the parameters to calculate the flow-volume deviation term in the second half of the calculation; The formula is ; equal ; equal ; equal ; The result of this step is calculated as follows: ; Substitute the combined results of each deviation into the main formula to calculate the sum of the denominators: The formula is ; The calculated denominator result is ; Finally, the final result is obtained by dividing the baseline steady-state network flow entropy value by the denominator. The formula is ; The conclusion is for ; The results indicate that although the current vehicle network environment is in a relatively safe quiet period, the total traffic volume and the specific distribution ratio of various packets deviate from the ideal baseline steady state. After calculation with a penalty term weighted by the security integrity level attribute, the steady state score was reduced to 0.9016. The numerical result of this positive penalty can objectively reflect the network interference situation. By comparing the numerical result with the pre-set environmental access threshold judgment conditions, it is possible to determine whether to allow subsequent hexadecimal file extraction and assembly instruction conversion and other update logic, thus intercepting the potential threat posed by abnormal network load to the firmware flashing process.

[0032] The steps to obtain the routing addressing assembly instruction segment are as follows: When maintaining the environmental steady-state score greater than or equal to the environmental access threshold, the byte sequence of the hexadecimal file to be updated issued by the customer diagnostic tool is analyzed and the starting address of the routing dispatch function is located. The instruction address mapping table is obtained through continuous disassembly and parsing. Then, the control flow graph feature data segment is constructed based on the relationship between the jump instruction entry and exit and the corresponding assembly instruction sequence is extracted to generate the routing addressing assembly instruction segment.

[0033] Specifically, the steady-state score of the maintenance environment calculated in the previous step is obtained and compared with the pre-set environmental access threshold judgment condition. The process of setting the environmental access threshold judgment condition is as follows: collect the historical steady-state scores of the past 100 successful gateway firmware flashing under the conditions of no external electromagnetic interference and stable power supply, calculate the average of these 100 historical steady-state scores to obtain the mean of 0.85, then extract the minimum value of these 100 scores of 0.80, add the mean and the minimum value and divide by 2 to obtain the threshold of 0.825. When the steady-state score of the maintenance environment is greater than or equal to 0.825, receive and read all the data content of the hexadecimal file to be updated sent by the customer diagnostic tool, extract the data record lines of specific format in the file, convert the hexadecimal characters into actual machine code byte sequences, and use the feature word matching method to search for the predefined instruction preamble of the routing distribution function in these byte sequences. For example, match the function preamble of the hexadecimal string 55, and locate the physical offset position of the byte as the starting position of the routing distribution function. Starting from this address, the disassembler is invoked to translate the machine code line by line into the corresponding readable assembly instructions. During translation, the relative offset of the hexadecimal data corresponding to each assembly instruction in the file and the expected load memory address are recorded. The instruction text and memory addresses are combined to form a mapping relationship, thus obtaining an instruction address mapping table. All jump instructions appearing in this mapping table are traversed, and the memory address of each jump instruction is found as the entry node. The operands of the jump instruction are parsed to obtain the target address to jump to as the exit node. When branches and jumps are encountered, the continuous instruction flow is segmented. A continuous block of instructions without jump branches is taken as a basic block, and jump instructions are used as directed edges to connect the basic blocks. These attribute data, containing the address range of the basic blocks and the connection relationship of the jump edges, are stored in a structure to construct a control flow graph feature data segment. Based on this graph structure, the corresponding assembly instruction sequence from the routing table entry to each dispatch node is completely extracted to generate a routing addressing assembly instruction segment.

[0034] The steps to obtain the instruction jump offset array are as follows: Based on the routing addressing assembly instruction segment, extract the absolute byte address of each conditional jump instruction and the absolute byte address of the target memory address. Simultaneously, extract the byte positions of the conditional jump instruction and the target memory address within the base block. Calculate the structured jump feature value using the following formula: ; in, For the first The structured jump feature value corresponding to each conditional jump instruction. This is the sequence number of the conditional jump instruction within the routing addressing assembly instruction segment. For the first The absolute byte address of a conditional jump instruction. For the first Each conditional jump instruction corresponds to the absolute byte address of the target memory address. For the first The byte position of each conditional jump instruction within its base block. For the first Each conditional jump instruction corresponds to the byte position of the target memory address within its corresponding base block. For the first The total byte size of the base block containing each conditional jump instruction. For the first The total size of the base block containing the target memory address for each conditional jump instruction is [number] bytes. This is the structural adjustment coefficient; According to the order of appearance of conditional jump instructions in the routing addressing assembly instruction segment, each structured jump feature value is sequentially mapped, and each structured jump feature value is written into a continuous offset slot while maintaining a one-to-one correspondence with the original conditional jump instruction position. Each slot records the corresponding jump direction and jump distance information, generating an instruction jump offset array.

[0035] Specifically, in the structured jump feature value calculation formula, by integrating the relative position ratios of the target and source addresses within their respective basic blocks, and using adjustment coefficients to non-linearly stretch the pure address difference, the spatial arrangement characteristics of the code blocks generated under specific compilation environments and compilation optimization options are reflected, thus serving as a stable feature basis for extracting compilation source fingerprints. The steps to obtain parameters are, for example, to obtain the command that is first in the list. The specific value is 1.

[0036] The steps for obtaining the parameters are as follows: Based on the previously marked conditional jump instruction number, find the corresponding instruction record in the generated instruction address mapping table using the sequence number index; read the hexadecimal memory load address information bound to the assembly text in that record line; convert the hexadecimal address data into a decimal integer format; and this decimal integer is the first instruction with byte dimensions. The absolute byte address of a conditional jump instruction is obtained. For example, if the conditional jump instruction with sequence number 1 is found, its hexadecimal load address recorded in the mapping table is 0x1004. Converting 0x1004 to decimal gives 1 multiplied by 4096, which is then added to 4 to obtain the absolute byte address. The specific value is 4100.

[0037] The steps for obtaining parameters are as follows: locate the instruction address mapping table at the specified position. The text of a conditional jump instruction is parsed to extract the operand portion. This operand indicates the memory location of the code the program branch will jump to. Similarly, the hexadecimal memory address information extracted from this operand is converted to a decimal integer, yielding the second conditional jump instruction, which also has byte dimensions. Each conditional jump instruction corresponds to the absolute byte address of the target memory address. For example, parsing the operand of jump instruction with sequence number 1 yields the target address 0x1020. Converting 0x1020 to decimal, we get 1 multiplied by 4096 and then adding 32 to obtain the target address. The specific value is 4128.

[0038] The steps for obtaining parameters are as follows: Search for the first parameter in the constructed control flow graph feature data segment. The absolute byte address of the conditional jump instruction is compared with all base block address ranges to find the specific base block containing that absolute byte address. The starting memory address of that specific base block is read, and the absolute byte address of the conditional jump instruction is subtracted from the starting memory address of that base block. The difference in bytes obtained by subtracting the two units is used as the value of the conditional jump instruction. The byte position of a conditional jump instruction within its corresponding base block. For example, if the address of conditional jump instruction number 1 is 4100, the starting address of its corresponding base block is found to be 4096. Subtracting 4096 from 4100 yields the result. The specific value is 4.

[0039] The steps for obtaining parameters are as follows: continue to utilize the first step in the control flow graph feature data segment. The absolute byte address of the target memory address corresponding to each conditional jump instruction is used for range searching to find the target base block containing this target address attribute value. The starting memory address assigned to this target base block is extracted, and this starting memory address is subtracted from the absolute byte address of the target memory address to obtain the first jump instruction with byte dimensions. Each conditional jump instruction corresponds to the byte position of the target memory address within its corresponding base block. For example, if the target address obtained earlier is 4128, and the starting address of the target base block is found to be 4124, then a subtraction operation is performed to calculate 4128 minus 4124, yielding the result. The specific value is 4.

[0040] The steps to obtain the parameters are as follows: Refer to the previously locked parameters containing the first... The system retrieves all attribute information of a specific base block for each conditional jump instruction, reads the end and start memory boundary addresses of that base block, and subtracts the start memory boundary address from the end memory boundary address to obtain the byte span of the jump instruction. The total byte size of the base block containing each conditional jump instruction, for example, for the base block containing address 4100, if the end boundary address of its record is read as 4108 and the start boundary address as 4096, then subtracting 4096 from 4108 yields the result. The specific value is 12.

[0041] The steps for obtaining the parameters are as follows: First, review the complete description information of the target base block containing the target memory address of the instruction jump, extract the end and start addresses of this target base block, and subtract the start address from the end address of the target base block to obtain the byte length difference as the parameter. Each conditional jump instruction corresponds to the total byte size of the base block containing the target memory address. For example, in the target base block containing target address 4128, its end address is recorded as 4140 and its start address as 4124. Performing subtraction, 4140 minus 4124, yields the result. The specific value is 16.

[0042] The parameter acquisition steps are as follows: Collect 10 stable binary firmware file samples generated from legitimate older versions of the same type of gateway controller compilation source; extract the relative byte position percentage values ​​of all jump instructions in these samples within their respective base blocks; calculate the overall variance of these dimensionless percentage values; average these values ​​using a fixed dimensionless pure value of 1 and divide the result by this variance to obtain an adjustment benchmark value; use this dimensionless adjustment benchmark value as the structural adjustment coefficient. For example, if the variance of the position percentage data collected from the samples is 4.0, calculate 1 divided by 4.0 to get 0.25. The specific value is 0.25.

[0043] Calculations based on parameters: Substitute the instruction address parameters and coefficients obtained above into the formula for calculating the structured jump feature value; When instruction number z=1, first substitute the parameters related to the location and size of the basic block with byte dimensions to calculate the fractional term; The formula is ; Substitute the parameters as ; Performing addition yields ; The pure numerical result of this step is calculated as follows: ; Multiply it by the dimensionless structural adjustment coefficient and then add it; The formula is ; Multiplication yields ; The result of calculating the dimensionless multiplier factor in this step is as follows: ; Substitute the absolute byte address parameter to calculate the span difference portion with byte dimensions; The formula is ; The result of this step is calculated as follows: ; The final eigenvalue is obtained by multiplying the span difference with bytes by a dimensionless multiplier factor. The formula is ; The conclusion is for ; This result demonstrates that the first conditional jump instruction successfully incorporates the relative spatial distribution structure elements within the code block. Its original physical jump span of only 28 bytes is numerically stretched and expanded according to the internal shape of the underlying block, forming a structured jump feature value with specific amplification. Subsequent calculations using such numerical sequences containing code block features can preserve the subtle arrangement fingerprints generated by the compiler's underlying optimization logic, providing a data foundation containing structural attributes for the final generation of highly discriminative code compilation hash digest values.

[0044] The pre-access phase obtains a set of structured jump feature values, including the sequence numbers of all conditional jump instructions and calculated from the formula. A contiguous block of physical memory is allocated within the gateway controller's internal storage. This contiguous memory block is divided into consecutive independent data storage units of a fixed length, serving as offset slots. For example, each data storage unit occupies 4 bytes of space. The structured jump feature value of the first conditional jump instruction with sequence number 1 in the set is read. The sign of the feature value is determined: a value greater than 0 indicates a backward jump towards a higher memory address, while a value less than 0 indicates a forward jump towards a lower memory address. The absolute value of the feature value is extracted as the jump distance information, representing the jump direction. The symbolic data is encoded into the leftmost independent data bit of the data storage unit. For example, positive numbers are encoded as 0 and negative numbers as 1. The absolute value of the jump distance information is converted into a binary string of the corresponding length and filled into the remaining available bit segment of the data storage unit. After the first data is recorded, it is stored in the first offset slot of the allocated contiguous memory area. Then, the structured jump feature value corresponding to the instruction with sequence number 2 is read in sequence. The above sign judgment, absolute value extraction and binary format conversion process are repeated and written into the closely connected second offset slot. This process is repeated until the feature values ​​of all instructions are formatted and placed into the corresponding slot space one by one according to the original sequence number, forming a data sequence with closely connected physical locations and completely mapped order, generating the instruction jump offset array.

[0045] The steps to obtain the code compilation hash digest value are as follows: Read each offset distance value item sequentially according to the index of the instruction jump offset array, convert each offset distance value item into an equal-length binary segment, and concatenate them sequentially to form a continuous binary string. Then, divide the continuous binary string according to the preset segment length, and perform cyclic shift, cross-join, bit-by-bit XOR and last bit write-back processing on adjacent segments to extract stable binary digest feature values ​​and generate code compilation hash digest values.

[0046] Specifically, the system reads each offset distance value item sequentially according to the index order of the instruction jump offset array. It reads the offset distance value recorded in each slot one by one. For each decimal offset distance value read, it converts it into a fixed-length binary segment using binary conversion rules. For example, the decimal distance value 30 is converted into a 16-bit binary sequence 0000000000011110. This ensures that all offset distances, regardless of size, occupy the same number of bits of storage space. These converted equal-length binary segments are then arranged according to their original order of appearance in the array. The data is concatenated sequentially, end to end, to form a continuous long binary data stream. Next, the preset segment length is determined by collecting the average offset distance and total binary length of 10 common gateway firmware samples. The average of these total lengths is calculated to be 2048 bits. To match common digest output specifications, this average is divided by the number of digest blocks, 16, resulting in 128 bits. This 128-bit value is used as the specific setting for the preset segment length. Based on this 128-bit length standard, the previously concatenated continuous binary data stream is evenly divided into multiple independent data blocks. The data is segmented, for example, into segments 1, 2, up to 16. Adjacent segments, such as segments 1 and 2, are then combined. First, the 128 bits in segment 1 are circularly shifted 3 bits to the left, meaning the leftmost 3 bits are moved to the right to fill the remaining space. Next, the shifted segment 1 and the original segment 2 are interleaved and merged, meaning the odd-numbered bits from segment 1 and the even-numbered bits from segment 2 are interleaved and recombined to form a new 128-bit data segment. This is then recombined to obtain... The new data segment is aligned bit-by-bit with the original second segment. A logical XOR operation is performed bit-by-bit. When two corresponding bit values ​​are the same, 0 is output; otherwise, 1 is output, resulting in a 128-bit XOR result. The last 8 bits of this XOR result are extracted and written back to the first 8 positions of the next segment to be processed, completing the last bit write-back. After processing all the segments in this adjacent pairing manner, the binary feature combination value that has been scrambled and recombined multiple times is extracted from the memory to generate the code compilation hash digest value.

[0047] The steps to obtain the source identity verification code are as follows: Locate the starting byte position of the fixed-length byte data segment appended to the end of the hexadecimal file to be updated, read the fixed-length byte sequence in the fixed-length byte data segment appended to the end of the hexadecimal file to be updated byte by byte, convert the code compilation hash digest value into the corresponding byte sequence and write it into the contiguous buffer according to the concatenation order, and generate the file check code identifier item; The file verification code identifier is parsed, including the position of each byte, the value of each byte, and the combination relationship of each continuous byte segment. The byte sequence in the file verification code identifier is converted into an identity marker character sequence according to the preset encoding mapping rules, and the compiled source identity feature verification code is generated.

[0048] Specifically, the starting byte position of the fixed-length byte data segment appended to the end of the hexadecimal file to be updated is located. The process of setting the fixed length and fixed-length byte sequence involves consulting the security manual of the main control chip on the gateway controller, extracting the minimum input byte size required for standard encryption verification as specified in the manual, and collecting data from 30 previously successfully verified legitimate hexadecimal firmware files. The average number of bytes in the reserved signature area at the end of these files is calculated, resulting in a minimum input size of 32 bytes and an average reserved size of 64 bytes. The larger of these two values ​​is taken and aligned to a multiple of 8. Finally, the fixed length of this appended data segment is set to 64 bytes, corresponding to a fixed-length byte sequence of 64 bytes. By reading the overall file size of the hexadecimal file to be updated, and subtracting this 64-byte length from the total file size backwards, an accurate relative addressing offset is calculated. This calculated offset addressing coordinate is used as the starting cursor position, controlling the read pointer to move backwards from this position, physically... The code reads the entire 64-bit fixed-length byte sequence from the end of the hexadecimal file to be updated, storing it in a temporarily allocated memory space. It then splits the previously obtained code hash digest into standard single-byte hexadecimal numbers, grouped into sets of 8 bits. This transforms the original binary digest into a regular byte sequence, such as converting a binary digest into bytes like 0x4A and 0xB3. A contiguous, unused buffer is allocated in memory. The original 64-byte appended sequence read from the end of the file is placed in the first half of this buffer. The newly derived byte sequence is then appended to the end of the original sequence. Following this fixed order of concatenating one data segment with the next, the two are written together into the buffer, forming a merged data body containing the file's own characteristics and the newly calculated offset. This generates the file checksum identifier.

[0049] The process analyzes the position, value, and combination of each byte in the file checksum identifier. For the file checksum identifier stored in the contiguous buffer, a comprehensive scan and analysis of its internal byte arrangement details is performed. First, the sequence number coordinates of each independent byte within the combined data body from left to right are read as its byte position (e.g., whether it's the 15th or 16th position). Then, the actual hexadecimal value stored at that position is extracted as the byte value at that location. For example, if the value read at the 15th position is 0x3F... Observe the consecutive byte combinations formed by concatenating two or three adjacent bytes. For example, if 0x3F is followed by 0x4A, forming a two-byte combination, prepare a preset encoding mapping rule. The process of formulating this preset encoding mapping rule involves selecting ten numeric characters from 0 to 9 and twenty-six uppercase English letters from A to Z from the standard ASCII character set. To prevent visual confusion during subsequent review or screen display, easily misread numbers 0 and 1, as well as uppercase letters O and I, are manually removed from this pool of thirty-six characters. The remaining thirty-two clear characters are rearranged according to their original ASCII numerical order, and assigned index numbers from 0 to 31, forming a custom mapping table containing the thirty-two basic characters. This custom mapping table is then retrieved, and each single-byte value from the previously parsed file checksum identifier is taken. This byte value is then moduloed by the decimal number 32, and the remainder is used as the index coordinate to find the corresponding character in the mapping table. For example, if the byte value is 0x3F, which is 63 in decimal, 63 is divided by... The remainder of 32 is 31. Looking up the index 31 in the lookup table, we find the corresponding character is the uppercase letter Z. When encountering consecutive two-byte combinations parsed earlier, we add the values ​​of the two bytes together and then take the remainder of 32 to find the corresponding mapping character. Following this method of converting numbers to characters, we iterate through all the bytes in the identifier, piecing together the replaced characters one by one according to their original position order. This completely transforms the original hexadecimal byte sequence into an identity marker character sequence composed of plain text letters and numbers, generating the compiled source identity feature verification code.

[0050] The steps to obtain the source identity matching status are as follows: Based on the authorized feature byte segment in the gateway controller bootloader storage area, read all the byte content of the compiled source identity feature verification code, establish a one-to-one bit sequence mapping relationship according to the byte order, compare the binary value of each bit one by one to see if they are consistent, write the comparison result of each bit into the corresponding flag bit, and then summarize the number of consistent bits and inconsistent bits in each group of comparison results according to the byte order to form a status flag. Read the number of consistent bits and inconsistent bits corresponding to each byte position in the status flag, check byte by byte for the existence of a byte position where the number of inconsistent bits is not zero, record the first inconsistent byte position and the last inconsistent byte position, count the number of completely consistent bytes in all byte positions, compare the number of completely consistent bytes with the total number of bytes in the status flag, write a consistency flag when the number of completely consistent bytes is equal to the total number of bytes in the status flag, and write an inconsistent flag when the number of completely consistent bytes is not equal to the total number of bytes in the status flag, thus obtaining the compilation source identity matching status.

[0051] Specifically, based on the authorized feature byte segment within the gateway controller's bootloader storage area, the compiled source identity feature verification code output from the previous stage is retrieved. All bytes of this verification code are read sequentially into the memory buffer. For example, if a complete verification code of 64 bytes is read, the authorized feature byte segment pre-stored in the controller is retrieved. Following the order from the first byte to the last byte, the verification code byte sequence is aligned with the authorized segment byte sequence. Each individual byte is expanded into an 8-bit binary sequence. The 0th bit of the verification code byte in the first position is bound to the 0th bit of the authorized segment byte, establishing a one-to-one bit sequence mapping. Each pair of binary values ​​is checked against this binding relationship. For example, if two bits are all 1 or all 0, it is considered a match; if one bit is... If one bit is 1 and the other is 0, it is considered inconsistent. An empty record array is created in the background, and the result of each check is written into the corresponding flag bit. When a consistent bit is encountered, the number 1 is filled in, and when an inconsistent bit is encountered, the number 0 is filled in. After processing all 512 bit sequences, we return to the granularity of bytes. The 8 record flags corresponding to each byte are treated as a statistical group. The values ​​in these 8 flag bits are accumulated to calculate the number of consistent bits. The number of inconsistent bits is obtained by subtracting the number of consistent bits from 8. For example, if the comparison group of a certain byte is all 1s, the number of consistent bits is 8 and the number of inconsistent bits is 0. If there are two 0s, the number of consistent bits is 6 and the number of inconsistent bits is 2. Following the original byte sequence, the number of consistent bits and the number of inconsistent bits calculated by each of these 64 groups are arranged in order to form a status flag.

[0052] The system reads the number of consistent and inconsistent bits corresponding to each byte position in the status flag. It examines these two numbers sequentially for each byte position, checking from the first byte at the beginning of the sequence to the 64th byte at the end. It checks byte by byte whether the number of inconsistent bits at the current coordinate is non-zero. This record is compared to a pre-defined valid range, such as comparing the number of inconsistent bits to the zero range (0 to 0). Coordinates outside this range are considered non-zero abnormal coordinates. Throughout the entire investigation process, the system extracts the sequence number of the first byte with a non-zero number of inconsistent bits and records it as the first inconsistent byte position (e.g., sequence number 8). Continuing along the sequence, it saves the sequence number of the last inconsistent byte position (e.g., sequence number 51). In addition to recording these boundaries, it also records the number of inconsistent bits. Bytes with a value of 0 and a consistency bit count of 8 or more are selected separately. The total number of these error-free bytes is accumulated to calculate the total number of completely consistent bytes across all byte positions. The total number of status flag bytes mentioned earlier, which is a fixed value of 64, is extracted. The calculated number of completely consistent bytes is compared with the total number of status flag bytes. In other words, each statistical record is compared with a pre-defined valid range. For example, if the number of completely consistent bytes equals the total number of status flag bytes (which is 64), a string of consistent flag code representing security, such as 0xFF, is written to a fixed memory address. If the number of completely consistent bytes does not equal the total number of status flag bytes, a string of inconsistent flag code representing interception, such as 0x00, is written to the same address to obtain the compilation source identity matching status.

[0053] The steps for obtaining the vehicle gateway routing table update status are as follows: When the source identity matching status is consistent, locate the old data address range of the gateway controller flash sector corresponding to the vehicle gateway routing configuration table, and write the hexadecimal file to be updated segment by segment into the address corresponding to the vehicle gateway routing configuration table according to the address record and data record order in the hexadecimal file to be updated, thus forming the vehicle gateway routing table update status.

[0054] Specifically, when the source identity matching status is consistent, it indicates that the firmware delivery source verification in the preceding process has passed successfully. The gateway controller's memory distribution mapping table is retrieved. Based on this mapping table, the old data address range of the gateway controller flash sector corresponding to the vehicle gateway routing configuration table is located. For example, if the area where the routing table configuration was originally stored is the physical sector range from flash address 0x08000000 to 0x08003FFF, the hardware flash erase command is called to clear all the old routing network mapping information contained in this old data address range. The hexadecimal file containing the latest routing forwarding rules to be updated is opened, and the data lines attached to this file are extracted line by line. These file lines are parsed, and the target write address records marked inside and the following actual hexadecimal data records are extracted. Based on these parsed... The order of the output address and data records is as follows: First, the erased flash memory cursor is moved to the first target address indicated in the hexadecimal file, for example, to 0x08000000. The 16 bytes of hexadecimal data attached to that line are then filled into it. Next, following the address increment direction recorded in the file, the hexadecimal file to be updated is written segment by segment into the flash memory space corresponding to the address in the vehicle gateway routing configuration table. For example, the next segment of data is written to 0x08000010. In this progressive manner, all routing distribution content in the entire file, except for the end verification code, is moved and overwritten into the hardware storage chip. After the last line of data with the target address in the file is written and the total data size is verified to be correct, the status value of a flag register is changed, for example, the write progress flag is changed from 0 to 1, forming the vehicle gateway routing table update status.

[0055] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for customizing the update of a vehicle gateway routing configuration table, characterized in that, Includes the following steps: Based on the set of message identifiers on the CAN bus and Ethernet bus within the time window set by the vehicle data exchange network and the probability value of each message identifier, the steady-state score of the maintenance environment is calculated and generated. If the steady-state score of the maintenance environment is greater than or equal to the environmental access threshold judgment condition, then extract the control flow graph feature data segment where the routing distribution function is located in the hexadecimal file to be updated issued by the customer diagnostic tool, generate the routing addressing assembly instruction segment, perform coordinate positioning and calculation on the conditional jump instruction and the target memory address inside the routing addressing assembly instruction segment, and obtain the instruction jump offset array. Based on the numerical values ​​of each offset distance within the instruction jump offset array, a code compilation hash digest value is generated. The code compilation hash digest value is then appended to the end of the hexadecimal file to be updated to generate a compilation source identity verification code. Based on the authorized feature byte segment in the gateway controller bootloader storage area, the compilation source identity feature verification code is compared with the authorized feature byte segment to obtain the compilation source identity matching status. When the compilation source identity matching status is consistent, the hexadecimal file to be updated is written into the vehicle gateway routing configuration table to obtain the vehicle gateway routing table update status.

2. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the steady-state score of the maintenance environment are as follows: Within a set time window of the vehicle data exchange network, the CAN bus message identifier set and the Ethernet bus message identifier set are read. The number of times each message identifier appears within the time window is counted item by item. The number of times the same message identifier appears in the two types of buses is accumulated. Then, the ratio of the number of times each message identifier appears to the total number of times all messages appear within the time window is calculated and the corresponding relationship is recorded to form the probability distribution of message identifier appearance. Based on the probability distribution of the message identifiers, extract the probability values ​​of each message identifier. Perform a natural logarithmic operation on the probability value of each message identifier and multiply it with the original probability value. Sum all the product results and invert them to obtain the network traffic entropy value. Based on the network traffic entropy value, the probability distribution of the packet identifier, the baseline steady-state probability distribution, the packet criticality weight value, the total number of packets appearing in the time window and the total number of packets appearing in the baseline steady-state are obtained, and the steady-state score of the maintenance environment is calculated.

3. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the routing addressing assembly instruction segment are as follows: When the steady-state score of the maintenance environment is greater than or equal to the environmental access threshold, the byte sequence of the hexadecimal file to be updated issued by the customer diagnostic tool is parsed and the starting address of the routing dispatch function is located. The instruction address mapping table is obtained through continuous disassembly and parsing. Then, the control flow graph feature data segment is constructed based on the relationship between the jump instruction entry and exit and the corresponding assembly instruction sequence is extracted to generate the routing addressing assembly instruction segment.

4. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the instruction jump offset array are as follows: Based on the routing addressing assembly instruction segment, the absolute byte address of each conditional jump instruction and the absolute byte address of the target memory address are extracted item by item. At the same time, the byte position of the conditional jump instruction in the base block and the byte position of the target memory address in the base block are extracted, and the structured jump feature value is calculated. According to the order of appearance of the conditional jump instructions in the routing addressing assembly instruction segment, each structured jump feature value is sequentially mapped, and each structured jump feature value is written into a continuous offset slot while maintaining a one-to-one correspondence with the original conditional jump instruction position. Each slot records the corresponding jump direction and jump distance information, generating an instruction jump offset array.

5. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the code compilation hash digest value are as follows: According to the instruction jump offset array index order, each offset distance value item is read one by one, each offset distance value item is converted into an equal-length binary segment, and they are concatenated to form a continuous binary string. Then, the continuous binary string is divided according to the preset segment length. The adjacent segments are subjected to cyclic shift, cross-join, bit-by-bit XOR and last bit write-back processing to extract stable binary digest feature values ​​and generate code compilation hash digest value.

6. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the source identity verification code are as follows: Locate the starting byte position of the fixed-length byte data segment appended to the end of the hexadecimal file to be updated, read the fixed-length byte sequence in the fixed-length byte data segment appended to the end of the hexadecimal file to be updated byte by byte, convert the code compilation hash digest value into the corresponding byte sequence and write it into the continuous buffer according to the concatenation order, and generate a file check code identifier item; The file verification code identifier item is parsed, including the position of each byte, the value of each byte, and the combination relationship of each continuous byte segment. The byte sequence in the file verification code identifier item is converted into an identity marker character sequence according to a preset encoding mapping rule to generate a source identity feature verification code.

7. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the source identity matching status are as follows: Based on the authorized feature byte segment in the gateway controller bootloader storage area, read all the byte content of the compiled source identity feature verification code, establish a one-to-one bit sequence mapping relationship according to the byte order, compare the binary value of each bit one by one to see if they are consistent, write the comparison result of each bit into the corresponding flag bit, and then summarize the number of consistent bits and inconsistent bits in each group of comparison results according to the byte order to form a status flag. Read the number of consistent bits and the number of inconsistent bits corresponding to each byte position in the status flag, check byte by byte whether there is a byte position with a non-zero number of inconsistent bits, record the first inconsistent byte position and the last inconsistent byte position, count the number of completely consistent bytes in all byte positions, and compare the number of completely consistent bytes with the total number of bytes in the status flag. If the number of completely consistent bytes is equal to the total number of bytes in the status flag, write a consistency flag; if the number of completely consistent bytes is not equal to the total number of bytes in the status flag, write an inconsistency flag to obtain the compilation source identity matching status.

8. The customized update method for the vehicle gateway routing configuration table according to claim 1, characterized in that, The steps for obtaining the vehicle gateway routing table update status are as follows: When the identity matching status of the compiled source is consistent, the old data address range of the gateway controller flash sector corresponding to the vehicle gateway routing configuration table is located. According to the address record and data record order in the hexadecimal file to be updated, the hexadecimal file to be updated is written segment by segment into the address corresponding to the vehicle gateway routing configuration table to form the vehicle gateway routing table update status.

9. The system for the customized update method of the vehicle gateway routing configuration table according to any one of claims 1-8, characterized in that, include: The maintenance environment determination module is used to calculate and generate a steady-state score of the maintenance environment based on the set of message identifiers on the CAN bus and Ethernet bus within a set time window of the vehicle data exchange network and the probability value of each message identifier. The routing instruction parsing module is used to extract the control flow graph feature data segment containing the routing distribution function in the hexadecimal file to be updated issued by the customer diagnostic tool if the steady-state score of the maintenance environment is greater than or equal to the environment admission threshold judgment condition, generate a routing addressing assembly instruction segment, perform coordinate positioning and calculation on the conditional jump instruction and the target memory address inside the routing addressing assembly instruction segment, and obtain the instruction jump offset array. The compilation source identity generation module is used to generate a code compilation hash digest value based on the numerical values ​​of each offset distance inside the instruction jump offset array, and to append the code compilation hash digest value to the end of the hexadecimal file to be updated to generate a compilation source identity feature verification code. The update authorization verification module is used to compare the compilation source identity feature verification code with the authorization feature byte segment in the gateway controller bootloader storage area to obtain the compilation source identity matching status. When the compilation source identity matching status is consistent, the hexadecimal file to be updated is written into the vehicle gateway routing configuration table to obtain the vehicle gateway routing table update status.