Address automatic recognition method and system
Patent Information
- Application Number
- CN202611203186.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]当前现有系统地址自动识别技术虽已初步实现地址自动采集与匹配,但在实际应用中仍存在诸多亟待解决的问题,严重影响识别精度、效率与系统适配性
[0019] Compared with existing technologies, this invention has the following advantages: The ID acquisition unit uses a standardized signal conversion strategy to convert the connection status of the ID terminal pin into a unique basic ID. Combined with a binary-to-decimal conversion algorithm and uniqueness verification, it ensures that each individual module has a unique initial identifier. At the same time, through a coordinate conversion strategy, the three-dimensional coordinates are encoded into physical location IDs. With a dual verification mechanism, it ensures that the location identifier corresponds one-to-one with the actual physical location, laying a solid data foundation for subsequent address identification and completely solving the interface matching error problem caused by ID duplication and coordinate deviation in traditional acquisition methods.
Smart Images

Figure CN122933601A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of system management technology, and in particular to an automatic address identification method and system. Background Technology
[0002] In fields such as industrial automation, intelligent equipment management and control, and modular system integration, address identification of individual modules is a core prerequisite for ensuring stable system operation and achieving module positioning and interface matching. With the continuous improvement of system integration, the number and types of individual modules have surged, and scenarios such as location changes and module replacements may occur during operation. Traditional methods relying on manual address configuration and manual entry of identifiers can no longer meet the real-time address identification requirements, leading to the development of automatic system address identification technology. This technology automatically collects individual module identifier signals, converts codes, and matches mappings to achieve automatic module address identification and interface adaptation, significantly reducing manual intervention costs, improving system operating efficiency and stability, and is widely used in various modular control systems.
[0003] While current automatic address recognition technology has achieved initial success in address acquisition and matching, several problems remain to be solved in practical applications, severely impacting recognition accuracy, efficiency, and system adaptability. Firstly, the generation of basic IDs lacks a standardized strategy. Existing technologies suffer from inconsistent encoding rules for ID terminal connection signals, non-standard binary mapping of pin on / off states, and the absence of an effective uniqueness verification mechanism. This easily leads to duplicate basic IDs, causing address conflicts and resulting in interface matching errors and module location failures. Secondly, the coordinate transformation of physical location IDs lacks an encoding strategy. The absence of reasonable encoding levels and correction mechanisms for each component of the three-dimensional coordinates easily leads to encoding deviations, making it impossible to achieve a true correspondence between physical location and ID.
[0004] Secondly, the accuracy of module type determination is insufficient. Existing technologies mostly employ single feature extraction algorithms, which cannot comprehensively capture the core features of individual modules, such as communication protocols, serial numbers, and data packet structures. Furthermore, they lack hierarchical determination logic, making it difficult to distinguish between different types of individual modules and prone to misjudgments and omissions. For special types of modules, such as those with immutable IDs or difficult-to-parse data packets, suitable identification strategies cannot be matched, further reducing the adaptability of address identification. In addition, the module feature fusion process does not consider the magnitude differences between different features and lacks standardized processing, resulting in significant deviations in the fusion results. This fails to accurately reflect the compatibility between module features and mapping algorithms, affecting the rationality of calling the optimal mapping algorithm.
[0005] Furthermore, the mapping invocation mechanism is imperfect. Existing technologies do not set corresponding relevance threshold ranges and weight allocation schemes based on module types. Calling the mapping algorithm even when the relevance is below the threshold can easily lead to incorrect ID mapping relationships. Moreover, the lack of flexible weight fine-tuning strategies means that when the relevance deviates from the threshold range, it cannot be quickly calibrated, affecting the consistency of address recognition. Simultaneously, the ID replacement process lacks standardized encrypted transmission and legality verification mechanisms, making instructions susceptible to tampering and leakage, posing data security risks.
[0006] Finally, existing technologies lack a robust time-series tracing mechanism, failing to store ID mapping relationships across different time points, making it difficult to trace the historical location of individual modules and troubleshoot anomalies. Furthermore, the absence of a unified cloud-based data storage and update platform means local and cloud data cannot be synchronized in real time, resulting in low parameter update efficiency, poor consistency, and a lack of access control, which can easily lead to data leakage or tampering. These combined problems mean that the accuracy, efficiency, adaptability, and security of existing automatic address recognition technologies cannot meet the application requirements of highly integrated and diverse scenarios, necessitating a more comprehensive technical solution. Summary of the Invention
[0007] To achieve the above objectives, one technical solution adopted by the present invention is: an automatic address identification method, which includes: The ID acquisition unit in the single module acquires the connection signal of the ID terminal in real time, and converts the connection signal into a basic ID through a signal conversion strategy; The ID acquisition unit acquires the three-dimensional coordinates of the ID terminal in real time and converts them into physical location IDs through a coordinate transformation strategy; The module type is determined by a module identification strategy, and the corresponding module features are extracted. The module features are fused using a feature fusion strategy to obtain the relevance. Based on the single-module type and prioritizing the relevance comparison through the calling strategy, the optimal mapping algorithm is called from the preset mapping parsing library to obtain the real-time mapping relationship between the basic ID and the physical location ID. Based on the real-time mapping relationship, the basic ID is replaced with the physical location ID and sent to the system controller to complete the interface matching; A time-series library is constructed that stores a mapping table of different time nodes using timestamps as indexes. When traceability data needs to be sent, the index reverse-engineering strategy is triggered based on the timestamp corresponding to the traceability data, and the current physical location ID of the individual module is located and the traceability data is sent.
[0008] Furthermore, the signal conversion strategy includes: defining each pin of the ID terminal as having a binary 0 when connected to the ground bus and a binary 1 when disconnected from the ground bus; based on the number of pins of the ID terminal... ,Will The connection signals of each pin are combined in a preset order. A binary number; using a binary-to-decimal conversion algorithm, ... The binary number is converted into a decimal number, and the decimal number is the unique basic ID corresponding to the ID terminal; The coordinate transformation strategy is to transform three-dimensional coordinates... , , Encode each of the three values according to a preset level, and sum the three values to obtain a decimal coordinate number, which is the physical location ID.
[0009] Furthermore, the module's judgment strategy includes: The communication protocol feature code, sequence number, data packet length, and ID offset of the individual module are extracted using protocol parsing algorithm, sequence number parsing algorithm, and data packet parsing algorithm, respectively. The module characteristics are determined sequentially through protocol characteristic determination, permission characteristic determination, and data packet characteristic determination to determine the module type of a single module; Among them, the protocol feature determination is to compare the communication protocol feature code with the preset feature code library. If the feature code matches the preset difficult-to-parse protocol feature set, then the single module is determined to be a module type whose module ID cannot be modified and whose data packets are difficult to parse. Otherwise, the permission feature determination is performed. The permission feature determination is to compare the serial number of the single module with the preset permission list through the permission verification algorithm. If the serial number is in the permission list and the basic ID can be modified, the single module is determined to be a module whose basic ID can be dynamically modified. Otherwise, the data packet feature determination is performed. The data packet characteristic is determined as follows: if the data packet length is greater than the preset number of bytes and the offset of the ID field is a fixed value, then the single module is determined to be a simple data packet replacement module.
[0010] Furthermore, the feature fusion strategy includes: A standardization algorithm is used to standardize the module features, eliminating fusion bias caused by differences in the magnitude of different features; Based on the determined individual module type, the preset initial weights of each module feature are called, and the relevance of the individual module is calculated through a weighted fusion algorithm.
[0011] Furthermore, the invocation strategy includes: Based on the determined single-module type, retrieve the preset relevance threshold range corresponding to that type of module from the mapping parsing library; The algorithm determines whether the relevance falls within a preset relevance threshold range. If so, the optimal mapping algorithm corresponding to the module type is called. If not, the weight fine-tuning strategy is triggered to fine-tune the feature weights of the preset initial weights and regenerate new relevance. Among them, the optimal mapping algorithm is a fusion algorithm of packet parsing and basic ID replacement, a dynamic modification algorithm of basic ID, and a bit replacement algorithm of basic ID field.
[0012] Furthermore, the weight fine-tuning strategy includes: Based on the type of individual modules, the fine-tuning priority of each module's features is determined by sorting them by weight priority; The deviation and adjustment range between the current relevance and the preset relevance threshold range are calculated using a deviation calculation algorithm. The direction and magnitude of fine-tuning are determined by the deviation value. If the current relevance is lower than the lower limit of the preset relevance threshold range, it is determined to be a negative deviation. Then, the preset initial weights of each feature are increased sequentially from high to low based on the adjustment range. If the current relevance is higher than the upper limit of the preset relevance threshold range, it is determined to be a positive deviation. Then, the preset initial weights of each feature are decreased sequentially from high to low based on the adjustment range. After fine-tuning, the sum of the weights of all features is always 1.
[0013] Furthermore, the index reverse strategy includes: locating the storage node corresponding to the timestamp in the time series library using a binary search algorithm, and retrieving the historical mapping table of the basic ID and physical location ID of that time node; if the historical mapping table of the corresponding timestamp is not found by the binary search algorithm, then triggering the nearest timestamp interpolation algorithm, retrieving the historical mapping tables of the two most recent valid time nodes before and after the timestamp, and calculating the approximate historical mapping table corresponding to the timestamp through linear interpolation. Extract the physical location ID from the source data, and use a hash reverse matching algorithm to find the base ID corresponding to the physical location ID in the historical mapping table; call the real-time mapping relationship of the single module to determine the physical location ID currently corresponding to the base ID, and the physical location ID is the current physical location of the single module.
[0014] Furthermore, the method also includes, after the single module is matched with the corresponding interface, the system controller retrieves the parameters of the current single module, encodes the parameters uniformly through the instruction encoding algorithm, and generates the instruction code for the retrieval instruction. The parameters include the single module type, basic ID, physical location ID and interface matching timestamp. The retrieval command is encrypted using the AES encryption algorithm and sent to the ID acquisition unit. After receiving the retrieval command, the ID acquisition unit decrypts the command using a decryption algorithm and verifies its legality. If it is legal, it sends a command confirmation signal. After receiving the confirmation signal, the system controller determines that the retrieval command was successfully sent and waits for the ID acquisition unit to upload the cached data.
[0015] Furthermore, the method also includes unified cloud storage of standard-related data for individual modules via a cloud server. When it is necessary to update the acquisition strategy, acquisition content, and data sequence order of an individual module, the cloud server retrieves the parameters to be updated. An update instruction encoding algorithm is used to uniformly encode the parameters to be updated to generate an instruction code for the update instruction. The parameters to be updated include the update type, update version number, updated parameter content, update effective time, and verification code. The update command is encrypted using the AES encryption algorithm and sent to the ID acquisition unit. After receiving the update command, the ID acquisition unit decrypts the command using a decryption algorithm and verifies its legality. If the command is legal, the update operation is executed.
[0016] Another technical solution adopted by this invention is an automatic address identification system. This system is applicable to the above-mentioned automatic address identification method and includes: an ID acquisition unit, a wiring harness configuration unit, a module judgment unit, a feature fusion unit, a mapping and calling unit, an ID replacement unit, a timing tracing unit, a system controller, and a cloud server. The ID acquisition unit is located inside each individual module and establishes a communication connection with the wiring harness configuration unit; the ID acquisition unit integrates signal conversion strategy, coordinate conversion strategy and decryption algorithm; The wiring harness configuration unit serves as the signal acquisition carrier for the ID acquisition unit, corresponding one-to-one with the ID acquisition unit of each individual module. The wiring harness configuration unit includes a wiring harness assembly, ID terminals, and a ground bus. Each branch of the wiring harness assembly corresponds to an ID terminal of an individual module, ensuring the stability of signal transmission. The ID terminal has multiple pins, each selectively connected to the ground bus to generate different connection signals, providing a signal source for the generation of the basic ID. The ground bus is shared by all ID terminals, providing a unified grounding reference to ensure the consistency and accuracy of the connection signals of each pin.
[0017] The module judgment unit is communicatively connected to the ID acquisition unit and the feature fusion unit; the module judgment unit carries the module judgment strategy. The feature fusion unit communicates with the module judgment unit and the mapping call unit. The feature fusion unit carries a feature fusion strategy and a weight fine-tuning strategy. The mapping and calling unit communicates with the feature fusion unit, ID replacement unit, and time-series tracing unit. The mapping and calling unit is equipped with a preset mapping parsing library, preset relevance threshold ranges for each module type, preset initial weights for each module feature, and calling strategies. The ID replacement unit communicates with the mapping call unit and the system controller. The ID replacement unit is used to receive the real-time mapping relationship transmitted by the mapping call unit, extract the basic ID from the data packet sent by the single module, replace the basic ID with the corresponding physical location ID based on the real-time mapping relationship, and send the replaced data packet to the system controller to assist the system controller in completing the interface matching with the single module. The time-series tracing unit communicates with the mapping and calling unit and the system controller. The time-series tracing unit is used to build and maintain the time-series library. The time-series library uses timestamps as unique indexes and adopts a red-black tree storage structure. It stores the historical mapping table of basic IDs and physical location IDs of different time nodes in ascending order of timestamps. The system controller is communicatively connected to the ID replacement unit, ID acquisition unit, and timing traceability unit. The system controller is used to receive data packets carrying physical location IDs sent by the ID replacement unit and complete interface matching with the individual modules. After successful interface matching, the system controller generates instruction codes for retrieval instructions, sends them to the ID acquisition unit, and receives cached data uploaded by the ID acquisition unit.
[0018] The cloud server communicates with the system controller and all ID acquisition units; the cloud server is used for unified cloud storage, management and updating of standard related data of individual modules; when it is necessary to update the acquisition strategy, acquisition content and data sequence order of an individual module, the cloud server generates an update instruction code and sends it to all ID acquisition units.
[0019] Compared with existing technologies, this invention has the following advantages: The ID acquisition unit uses a standardized signal conversion strategy to convert the connection status of the ID terminal pin into a unique basic ID. Combined with a binary-to-decimal conversion algorithm and uniqueness verification, it ensures that each individual module has a unique initial identifier. At the same time, through a coordinate conversion strategy, the three-dimensional coordinates are encoded into physical location IDs. With a dual verification mechanism, it ensures that the location identifier corresponds one-to-one with the actual physical location, laying a solid data foundation for subsequent address identification and completely solving the interface matching error problem caused by ID duplication and coordinate deviation in traditional acquisition methods.
[0020] The module judgment unit uses three dedicated parsing algorithms to extract core module features such as communication protocol signatures and sequence numbers. Combined with hierarchical judgment logic, it progressively filters from protocol features and permission features to data packet features, distinguishing three types of individual modules. Simultaneously, it can promptly identify module type anomalies and trigger fault handling, avoiding the risk of misjudgment. This hierarchical judgment mode adapts to the structural characteristics of different modules, providing a reliable basis for subsequent optimal mapping algorithm calls and improving the system's adaptability to diverse individual modules.
[0021] The feature fusion unit eliminates the magnitude differences between different features through targeted preprocessing and Z-Score standardization algorithm. It generates a relevance index by combining preset weights for module type matching and a linear weighted fusion algorithm. The mapping and invocation unit ensures that the optimal mapping algorithm is invoked only when the relevance meets the standard through interval comparison and weight fine-tuning strategy. The algorithm and module type correspond one-to-one, effectively avoiding mapping errors caused by improper algorithm adaptation. This realizes the mapping between basic ID and physical location ID, providing reliable support for interface matching.
[0022] The time-series tracing unit constructs a time-series library that uses high-precision timestamps as indexes to synchronously store the mapping relationships and auxiliary fields of each time node. Combined with binary search and nearest-neighbor timestamp interpolation algorithms, it can quickly locate the historical mapping table corresponding to the target timestamp and generate an approximate mapping table when the target timestamp is not found, ensuring the tracing process is uninterrupted. Through hash reverse matching and key-value pair matching algorithms, the current physical location of a single module can be located, providing comprehensive data support for fault diagnosis and process tracing.
[0023] Each unit of the system performs its function and communicates smoothly, forming a complete address identification closed loop. The system controller and cloud server coordinate and manage the system, ensuring secure command transmission through AES encryption and multi-dimensional verification mechanisms to ensure command legitimacy and prevent parameter leakage and command tampering. The distributed storage and real-time synchronization mechanism of the cloud server enables unified data management and backup, while access control and parameter update functions enhance the convenience and standardization of system operation and maintenance, ensuring that the data collection standards and algorithm parameters of all individual modules remain consistent. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating the address automatic identification method of the present invention.
[0025] Figure 2 This is a flowchart of Example 2.
[0026] Figure 3 This is a flowchart illustrating Example 3; Figure 4 This is a block diagram showing the connections between the various units of the automatic address identification system.
[0027] Figure 5 This diagram shows the connection of the wiring harness assembly, ID terminals, and ground bus in the wiring harness configuration unit. Detailed Implementation
[0028] The technical solutions of the address automatic identification method and system provided by the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0029] Example 1 like Figure 1 As shown, the address automatic identification method includes: the ID acquisition unit in the single module acquires the connection signal of the ID terminal in real time, and converts the connection signal into a basic ID through a signal conversion strategy.
[0030] Furthermore, the signal conversion strategy includes: defining each pin of the ID terminal as having a binary 0 when connected to the ground bus and a binary 1 when disconnected from the ground bus; combining the connection signals of the n pins into an n-bit binary number according to a preset order based on the number of pins n of the ID terminal; and converting the n-bit binary number into a decimal number using a binary-to-decimal algorithm, wherein the decimal number is the unique basic ID corresponding to the ID terminal.
[0031] Specifically, firstly, based on the number of pins on the ID terminal... ,Will The pins are sorted in a preset order, and the binary value corresponding to the connection signal of each pin is extracted and combined to form... A binary number, denoted as ,in, for The combination of signals connected to each pin forms a A binary number is the intermediate encoding form of the basic ID; The binary value corresponding to the first pin is 0 or 1, which corresponds to the on or off state of the ground bus; The binary value corresponding to the second pin is 0 or 1; For the first Each pin corresponds to a binary value of 0 or 1; This represents the total number of pins on the ID terminal, a preset fixed value determined by the ID terminal hardware specifications.
[0032] Secondly, combine the resulting n-bit binary number The number is converted to a decimal number using a number system conversion algorithm. This decimal number is the unique basic ID corresponding to the ID terminal, denoted as [ID symbol]. This ensures that each ID terminal corresponds to a unique base ID, avoiding address conflicts. The formula for converting binary to decimal is: , in, The final generated base ID is a positive decimal integer and serves as the unique initial identifier for the individual module. This is the pin number identifier, with a value ranging from 1 to... ; For the first Each pin corresponds to a binary value of 0 or 1; For the first The binary bit weights corresponding to each pin, among which This represents the total number of pins.
[0033] After the number system conversion is complete, perform a basic ID uniqueness check and generate the ID. The system compares the ID with its default base ID database. If the ID already exists in the database... If the ID is determined to be conflicting, a re-encoding process is triggered; if the ID is not found in the database... If the result is positive, it is determined to be a valid basic ID and is cached in the ID collection unit.
[0034] In this embodiment, by clearly defining the on and off states of the ID terminal pin as corresponding to binary 0 and 1 respectively, and combining this with a fixed pin sorting rule, the standardization of connection signal encoding is ensured. With the addition of a standardized binary-to-decimal algorithm, a unique basic ID can be generated, thus avoiding address conflicts at the source. This provides a unique initial identifier for automatic system address identification and ensures the accuracy of interface matching and module positioning.
[0035] The method also includes: the ID acquisition unit acquires the three-dimensional coordinates of the ID terminal in real time, and converts them into physical location IDs through a coordinate transformation strategy; The coordinate transformation strategy is to transform three-dimensional coordinates... , , Encode each of the three values according to a preset level, and sum the three values to obtain a decimal coordinate number, which is the physical location ID.
[0036] Specifically, firstly, regarding three-dimensional coordinates... , , The three components are each assigned a corresponding preset encoding level. The encoding level is preset based on the system's coordinate accuracy requirements and the actual application scenario, and is denoted as [missing information]. , , The meaning is the actual physical distance corresponding to each coded unit; the encoding process adopts a linear encoding algorithm to convert the actual value of the collected three-dimensional coordinates into the corresponding decimal coded value, ensuring that the coded value and the actual coordinate value have a linear correspondence and avoiding encoding deviation.
[0037] The encoding formulas for each component of the three-dimensional coordinates are as follows: , , , in, Three-dimensional coordinates The decimal value after component encoding is a non-negative integer; Three-dimensional coordinates The decimal value after component encoding is a non-negative integer; Three-dimensional coordinates The decimal value after component encoding is a non-negative integer; For the three-dimensional coordinates of the ID terminal The actual sampled value is in units of 1. , is a non-negative real number; For the three-dimensional coordinates of the ID terminal The actual sampled value is in units of 1. , is a non-negative real number; For the three-dimensional coordinates of the ID terminal The actual sampled value is in units of 1. , is a non-negative real number; for The preset encoding level of the component, in units of It is determined by the system's accuracy requirements; for The preset coding level of the component, in units of ; for The preset encoding level of the component, in units of ; 0.5 is the floor sign; 0.5 is the correction factor.
[0038] Secondly, , , The decimal value after three component encodings , , The summation operation yields the physical location ID, calculated using the following formula: , in, The final generated physical location ID is a unique identifier for the physical location of a single module.
[0039] Finally, after the physical location ID is generated, a dual check for uniqueness and validity is performed to ensure the reliability of the ID; the first check is for uniqueness, which involves verifying the generated ID's uniqueness. The system compares the data with its pre-set physical location ID database. If the ID already exists in the database... The system first determines that there is a location ID conflict, triggering a re-acquisition and encoding process for the coordinates. After fine-tuning the preset encoding level, the coordinates are recalculated. The second step is validity verification, comparing... If the ID exceeds the system's preset valid range for physical location IDs, it is considered an invalid ID, and the encoding process is re-executed; after successful verification, it will be... Cache to ID collection unit and synchronize with base ID Associated storage.
[0040] In this embodiment, by using three-dimensional coordinates , , Each component is set with a preset encoding level. , , By combining linear coding algorithms and correction coefficients, the actual coordinate values are converted into coded values, effectively avoiding coding deviations. Then, a physical location ID is generated through summation operations to ensure that the ID corresponds one-to-one with the actual physical location of the individual module, providing a location basis for address identification.
[0041] The method also includes: determining the type of a single module through a module judgment strategy and extracting the corresponding module features.
[0042] Furthermore, the module judgment strategy includes: extracting module features such as communication protocol feature code, sequence number, data packet length, and ID offset of a single module through protocol parsing algorithm, sequence number parsing algorithm, and data packet parsing algorithm, respectively.
[0043] Specifically, a protocol frame parsing algorithm is used to parse the communication protocol frames sent by the individual module and extract the communication protocol feature code. The communication protocol frame adopts a fixed format: frame header, protocol feature code, data segment, and checksum. First, the start position of the protocol frame is located using a frame header recognition algorithm to eliminate interference from invalid frames; then, the protocol frame is truncated... The protocol signature field is converted into a hexadecimal string and denoted as . As a communication protocol feature code of a single module, it is used for protocol feature determination.
[0044] The formula for extracting protocol signatures is: ; in, For communication protocol signature, The 4-digit hexadecimal string converted from a binary number is the unique identifier of the communication protocol; This is a binary-to-hexadecimal conversion function used to convert... Convert a binary number to its corresponding hexadecimal string; For the first frame in the communication protocol To the The fields, total This refers to the binary field corresponding to the protocol signature.
[0045] A string parsing algorithm is used to extract and standardize the device serial number of a single module. The serial number of a single module is stored in the data segment of the communication data, using a fixed format of letter prefix, numeric sequence, and checksum. The serial number field is located from the communication data segment, invalid characters are removed, and the extracted serial number is standardized to ensure consistency, which is then used for access control determination.
[0046] The serial number standardization formula is: , in, This is the standardized serial number of the individual module, a 12-character string; This is a function for converting strings to uppercase. This is the original sequence number extracted from the communication data segment.
[0047] A data packet frame structure parsing algorithm is employed to extract two core features: the data packet length and the ID field offset. First, the total length of the data packet is located using the frame length field, denoted as... Then, by parsing the ID field, the starting position of the ID field in the data packet is located, and the offset of the ID field relative to the starting address of the data packet is calculated and denoted as . This ensures the accuracy of the extraction of the two features.
[0048] The formula for extracting the data packet length is: , in, The total length of the data packet is a non-negative integer in bytes. This is a binary-to-decimal conversion function; For the first frame in the communication protocol To the The fields, total , which is the binary value corresponding to the length of the data packet.
[0049] The formula for extracting the ID offset is: , in, The total length of the data packet is a non-negative integer in bytes. The offset of the ID field in the data packet is a non-negative integer in bytes. For the first frame in the communication protocol To the The fields, total This corresponds to the binary value of the offset in the ID field.
[0050] The module determination strategy also includes: the module characteristics are sequentially determined by protocol characteristics, permission characteristics, and data packet characteristics to determine the module type of a single module.
[0051] Among them, the protocol feature determination is to compare the communication protocol feature code with the preset feature code library. If the feature code matches the preset difficult-to-parse protocol feature set, then the single module is determined to be a module type whose module ID cannot be modified and whose data packets are difficult to parse. Otherwise, the permission feature determination is performed. The permission feature determination is to compare the serial number of the single module with the preset permission list through the permission verification algorithm. If the serial number is in the permission list and the basic ID can be modified, the single module is determined to be a module whose basic ID can be dynamically modified. Otherwise, the data packet feature determination is performed. The data packet characteristic is determined as follows: if the data packet length is greater than the preset number of bytes and the offset of the ID field is a fixed value, then the single module is determined to be a simple data packet replacement module.
[0052] Specifically, protocol feature determination (first-level determination): based on communication protocol feature codes. Using the core judgment criterion, a feature code comparison algorithm is employed to extract the... The feature set is compared with the system's preset feature code library; the preset feature code library contains two types of feature sets: hard-to-parse protocol feature sets. and conventional protocol feature sets ,in Store the signatures of all difficult-to-parse communication protocols. It stores the feature codes of all common communication protocols, and the two feature sets have no overlap.
[0053] The formula for the signature comparison algorithm is as follows: , in, This is a feature code matching and determination function that returns a value of 1 or 0, where 1 indicates a match and 0 indicates a no match. The extracted communication protocol feature code of the single module; This is a pre-defined set of features for difficult-to-parse protocols, consisting of a collection of multiple 4-digit hexadecimal strings; This indicates that the extracted feature code belongs to the feature set of difficult-to-parse protocols; This indicates that the extracted feature code does not belong to the feature set of difficult-to-parse protocols.
[0054] If the Match function returns 1, the single module is directly determined to be a module type whose module ID cannot be modified and whose data packets are difficult to parse. The determination result is recorded and the module type and features are synchronously transmitted to the feature fusion unit. If the return value is 0, the next level of permission feature determination is entered.
[0055] Permission feature determination is based on serial number Using the modifiable identifier of the basic ID as the core criterion, and employing an access control algorithm, the standardized serial number is first... With the system's default permission list A comparison is performed, and a preset permission list stores the serial numbers of all individual modules with basic ID modification permissions and their corresponding modifiable identifiers; if the serial number is not in... Within this range, it directly proceeds to the next layer of data packet feature determination; if the sequence number is within... Within this, further obtain the basic ID that can be modified corresponding to the serial number. , This indicates that it can be modified. This indicates that it cannot be modified.
[0056] The authorization verification algorithm formula is: , in, This is the permission verification function; This refers to the standardized serial number of the individual module. This is a modifiable identifier for the basic ID, with a value of 1 or 0, where 1 corresponds to modifiability and 0 corresponds to immutability. This is a list of preset permissions, consisting of key-value pairs of serial number and modifiable identifier.
[0057] If the Auth function returns 1, the module is determined to be a module with a dynamically modifiable base ID. The determination result is recorded and synchronously transmitted to the feature fusion unit. If the return value is 0, the next layer of data packet feature determination is performed.
[0058] Data packet feature determination is based on data packet length and ID offset Using threshold comparison and fixed value verification algorithms as the core judgment criteria, a system-preset byte threshold is first set. Comparison and Size; simultaneously verify ID offset. Is it a system-preset fixed offset? .
[0059] The formula for determining data packet characteristics is: , in, Data packet feature determination function; The length of the extracted data packet, in bytes; The offset of the extracted ID field is in bytes; The preset data packet length threshold for the system is a non-negative integer in bytes. The system-preset fixed offset for the ID field is a non-negative integer in bytes.
[0060] If the DataCheck function returns 1, the single module is determined to be a simple data packet replacement module; if the return value is 0, the module type is determined to be abnormal, a type determination fault message is sent, the fault log is recorded and the process is paused, and the module determination strategy is re-executed after the fault is investigated.
[0061] After type determination is completed, the final single-module type, all extracted module features, and the base ID are compared. Physical location ID The data is associated with storage and synchronously transmitted to the feature fusion unit.
[0062] In this embodiment, three dedicated parsing algorithms are used to specifically extract communication protocol feature codes, sequence numbers, data packet lengths, and ID offsets. Combined with standardized processing and explicit formulas, the accuracy and consistency of feature extraction are ensured, while invalid interference is eliminated, providing reliable data support for module type determination. Furthermore, a hierarchical determination logic is employed, progressively filtering from protocol features and permission features to data packet features. Combined with explicit algorithmic formulas and determination rules, three types of individual module types are distinguished, avoiding misjudgments and enabling timely identification of module type anomalies, thus improving the reliability of the determination.
[0063] The method also includes fusing module features using a feature fusion strategy to obtain relevance.
[0064] Furthermore, the feature fusion strategy includes: using a standardization algorithm to standardize the module features to eliminate fusion bias caused by differences in the magnitude of different features.
[0065] Specifically, firstly, since the four types of extracted module features are of different types, they cannot be directly fused and calculated. Therefore, the features of each type of module are preprocessed and converted into unified numerical features.
[0066] For communication protocol signatures Preprocessing is performed. The 4-digit hexadecimal string format is then processed. Convert to decimal integer, denoted as The conversion formula is: ,in, This is a hexadecimal to binary conversion function. This is a binary-to-decimal conversion function that ensures the converted data uniquely corresponds to the original signature. For serial number Preprocessing is performed. The 12-character normalized string format is then processed. Perform ASCII code conversion, sum the ASCII code values of each character, and denot it as . The conversion formula is: ,in For serial number The One character, This is an ASCII code conversion function that ensures the uniqueness of the serial number is represented in numerical form. For packet length and ID offset Preprocessing is performed. Since both are numerical features, their original values are directly retained and denoted as follows: , No additional conversion is required; only the numerical range is checked to ensure that it meets the system's preset requirements, thus ensuring the data is valid.
[0067] Secondly, the Z-Score normalization algorithm is used to normalize the four types of numerical features after preprocessing. , , , Standardization is performed to convert various features into standardized features with a mean of 0 and a standard deviation of 1, eliminating the magnitude differences between different features and avoiding fusion bias. The general formula for the standardization algorithm is: , in, For the first The standardized values of class module features typically range from [-3, 3]. For the first The original values after preprocessing of class module features. correspond , correspond , correspond , correspond ; For the first The global mean of the module features is a system-preset fixed value, calculated statistically from historically collected feature data of the same type of modules, using the following formula: , This represents the total number of feature samples of the same module collected historically. For the first The first sample Numerical values after preprocessing of class module features; For the first The global standard deviation of a class of module features is a preset fixed value used by the system to reflect the dispersion of that class of features. The formula is as follows: The meanings of the parameters are consistent with those in the mean formula.
[0068] After standardization, four types of standardized features are obtained, denoted as follows: , , , , used for weighted fusion calculation.
[0069] The feature fusion strategy further includes: based on the determined individual module type, calling the preset initial weights of each module feature, and calculating the relevance of the individual module through a weighted fusion algorithm.
[0070] Specifically, the feature fusion unit retrieves the preset initial weights of the four types of module features corresponding to the determined single module type from the weight database built into the mapping call unit. In the weight database, different module types correspond to different weight allocation schemes, and the sum of the weights of the four types of features for each module type is 1, ensuring the rationality of weighted fusion.
[0071] Let the preset initial weights of the four types of module features be the communication protocol feature weights. Serial number feature weight Data packet length feature weight ID offset feature weight The constraints are satisfied: ,in .
[0072] A linear weighted fusion algorithm is used to sum the four standardized features with their corresponding preset initial weights to obtain the relevance of a single module, denoted as . The relevance value ranges from [0,1]. The closer the value is to 1, the stronger the fit between the module features and the corresponding mapping algorithm; the closer the value is to 0, the weaker the fit.
[0073] The weighted fusion calculation formula is as follows: , in, This represents the final relevance of a single module, with a value range of [0,1]. Preset initial weights for the four types of module features, satisfying ; The normalized value after standardization of communication protocol characteristics, that is... The mapping formula from the range [-3,3] to the range [0,1] is as follows: ; , , These are the normalized values of the sequence number, data packet length, and ID offset features, respectively, and the mapping formula is... Consistent.
[0074] In this embodiment, to address the issue of significant differences in feature types among the four module types, targeted preprocessing is used to uniformly convert different feature types into numerical values. Then, the Z-Score standardization algorithm is employed to eliminate the magnitude differences among various features. Coupled with clearly defined rules for calculating the mean and standard deviation, this avoids a single high-magnitude feature dominating the fusion result, ensuring the rationality and effectiveness of the fusion process. Based on the individual module type, corresponding preset initial weights are retrieved. The weight allocation aligns with the core features of different modules. A linear weighted fusion algorithm combined with normalization is used to generate a correlation coefficient with a clear value range, reflecting the degree of fit between module features and the mapping algorithm, thus supporting the invocation of the optimal mapping algorithm.
[0075] The method also includes: prioritizing the relevance based on the single module type and through the calling strategy, calling the optimal mapping algorithm from the preset mapping parsing library, and obtaining the real-time mapping relationship between the basic ID and the physical location ID; Furthermore, the invocation strategy includes: retrieving a preset relevance threshold range corresponding to the type of module from the mapping parsing library based on the determined single-module type.
[0076] Specifically, based on the determined unit module type, a library indexing algorithm is used to retrieve the preset relevance threshold range corresponding to that type of module from the mapping parsing library. In the mapping parsing library, each unit module type corresponds to a unique preset relevance threshold range, which is determined by the system based on historical mapping data statistics and used to determine relevance. Whether the optimal mapping algorithm calling conditions are met is denoted as... 。
[0077] The formula for the library indexing algorithm is: , in, This is a preset relevance threshold range for the corresponding single module type, i.e. ; For the already determined single-unit module type; This is a library indexing function used to resolve libraries from a mapping based on the monolithic module type (Type). Retrieve the corresponding threshold range; It is a pre-defined mapping parsing library that stores the threshold ranges, optimal mapping algorithms, and weight fine-tuning parameters corresponding to various module types. This is the lower limit of the preset relevance threshold range, with a value range of (0,1). The upper limit of the preset relevance threshold interval is dimensionless, takes values in the range (0,1), and satisfies the following conditions: .
[0078] The invocation strategy includes: determining whether the relevance is within a preset relevance threshold range through an interval comparison algorithm; if so, invoking the optimal mapping algorithm corresponding to the module type; if not, triggering a weight fine-tuning strategy to fine-tune the feature weights of the preset initial weights and regenerating new relevance; wherein, the optimal mapping algorithm is a data packet parsing and basic ID replacement fusion algorithm, a basic ID dynamic modification algorithm, and a basic ID field bit replacement algorithm.
[0079] Specifically, the relevance is obtained by fusing features through interval comparison algorithms. The preset relevance threshold range The system compares the results to determine whether the relevance falls within the specified range, and then decides whether to invoke the optimal mapping algorithm or trigger a weight fine-tuning strategy.
[0080] The formula for the interval comparison algorithm is: , in, This is a range comparison judgment function that returns a value of 1 or 0, where 1 indicates that the relevance is within the threshold range and 0 indicates that it is not within the range. The relevance of a single module obtained by feature fusion, with a value range of [0,1]. , These are the lower and upper limits of the preset relevance threshold range, respectively.
[0081] If the RangeCheck function returns 1, the optimal mapping algorithm corresponding to the module type is directly called. The algorithm calculates the real-time mapping relationship between the basic ID and the physical location ID, and transmits it synchronously to the ID replacement unit and the time-series tracing unit to enter the ID replacement process. If the RangeCheck function returns 0, the weight fine-tuning strategy is triggered to fine-tune the feature weights of the preset initial weights. After the fine-tuning is completed, the results are fed back to the feature fusion unit to regenerate new relevance. The interval comparison process is then executed again until the relevance falls into the preset threshold range, and then the optimal mapping algorithm is called.
[0082] The optimal mapping algorithm corresponds one-to-one with the single-unit module type, and is preset by the mapping parsing library to ensure the adaptability of the algorithm to the module type. The optimal mapping algorithms for the three types of module types are as follows: For modules with unmodifiable IDs and difficult-to-parse data packets, a data packet parsing and basic ID replacement fusion algorithm is invoked. The basic ID field in the data packet is extracted through the data packet parsing algorithm, and combined with the association rules between the basic ID and the physical location ID, the replacement and mapping of the basic ID and the physical location ID are realized. This is suitable for scenarios with complex data packet structures and unmodifiable IDs.
[0083] For base IDs that can be dynamically modified, the base ID dynamic modification algorithm is called to dynamically adjust the value of the base ID according to the change of the physical location ID, ensuring that the base ID and the physical location ID always maintain a one-to-one mapping relationship. This is suitable for scenarios where the base ID has modification permissions. For simple data packet replacement, the basic ID field bit replacement algorithm is called to directly replace the field bit corresponding to the basic ID in the data packet, replacing the basic ID with the corresponding physical location ID. This is suitable for scenarios with simple data packet structure and fixed ID field bits.
[0084] After the algorithm is invoked, a real-time mapping relationship between the base ID and the physical location ID is generated through algorithmic calculation, denoted as... The mapping relationship is in the form of key-value pairs, that is, the base ID is the key and the physical location ID is the value, ensuring that a base ID corresponds to a unique physical location ID.
[0085] Furthermore, the weight fine-tuning strategy includes: determining the fine-tuning priority of each module feature by sorting the weights according to the individual module type.
[0086] Specifically, based on the type of individual module, the fine-tuning priority of communication protocol features, sequence number features, data packet length features, and ID offset features is determined by a weight priority sorting algorithm. The higher the priority of a feature, the greater the adjustment range during weight fine-tuning, ensuring the rationality of the weights of key features and maintaining consistency with the weight allocation logic of the module type.
[0087] The formula for the weighted priority sorting algorithm is: ; in, The feature fine-tuning priority sequence is for the corresponding single-unit module type, and the sorting result is for the four types of features; For the already determined single-unit module type; This is a descending sorting function used to sort the data according to preset initial weights of four types of features. Sort by weight from largest to smallest; the larger the weight, the higher the priority of fine-tuning. These are the preset initial weights for communication protocol features, sequence number features, data packet length features, and ID offset features, respectively.
[0088] For modules with unmodifiable IDs and difficult-to-parse data packets, the priority levels 1-4 are as follows: communication protocol characteristics, sequence number characteristics, data packet length characteristics, and ID offset characteristics. For dynamically modifiable basic IDs, the priorities 1-4 are as follows: serial number feature, communication protocol feature, data packet length feature, and ID offset feature; For the simple data packet replacement type, the priorities 1-4 are as follows: data packet length feature, ID offset feature, communication protocol feature, and sequence number feature.
[0089] The weight fine-tuning strategy further includes: calculating the deviation value and adjustment range between the current relevance and the preset relevance threshold range using a deviation calculation algorithm; determining the fine-tuning direction and adjustment range based on the deviation value; if the current relevance is lower than the lower limit of the preset relevance threshold range, it is determined to be a negative deviation, and the preset initial weights of each feature are sequentially increased from high to low based on the adjustment range; if the current relevance is higher than the upper limit of the preset relevance threshold range, it is determined to be a positive deviation, and the preset initial weights of each feature are sequentially decreased from high to low based on the adjustment range; after fine-tuning, the sum of the weights of all features is always 1.
[0090] Specifically, the over-bias calculation algorithm calculates the current relevance. With respect to the preset correlation threshold range The deviation value and adjustment range provide a quantitative basis for the direction and magnitude of weight fine-tuning, ensuring the accuracy of the fine-tuning.
[0091] Deviation calculation is divided into two scenarios, each with a different calculation formula: Negative bias scenario, meaning the current relevance is below the lower limit of the threshold interval. Deviation value ; Positive deviation scenario, meaning the current relevance is higher than the upper limit of the threshold interval. Deviation value .
[0092] The general formula for calculating the adjustment range is: ; in, The negative deviation value, ranging from (0,1), represents the difference between the current relevance and the lower limit of the threshold. This is a positive deviation value, ranging from (0,1), representing the difference between the current relevance and the upper limit of the threshold; This is a general deviation value; for negative deviation scenarios, take... Positive deviation scenario ; This represents the weight adjustment range for a single-class feature, with a value range of (0, 0.1]. For the first The current preset initial weights of class features; The sum of the weights of the four features is always equal to 1, therefore the adjustment magnitude formula can be simplified to: .
[0093] When a negative bias is identified, the relevance needs to be increased, based on feature priority from high to low, according to the adjustment magnitude. The preset initial weights of each feature are increased sequentially; the higher the priority of a feature, the greater the adjustment. At the same time, the weight of the lowest priority feature is reduced to compensate for the increased weights and ensure that the total weights are equal to 1.
[0094] If the deviation is determined to be positive, the relevance needs to be reduced, based on feature priority from high to low, according to the adjustment magnitude. The preset initial weights of each feature are reduced sequentially; the higher the priority of the feature, the greater the adjustment. At the same time, the weight of the lowest priority feature is increased to compensate for the reduced weights and ensure that the total weight sums to 1.
[0095] The formula for fine-tuning negative deviation is: , , , , The formula for positive deviation fine-tuning is: , , , , in, After fine-tuning the weights of the features of the four modules respectively, the following conditions are met: And the values are all in the range of [0,1]; These are the preset initial weights for the features of the first four types of modules, respectively, for fine-tuning. The weight adjustment ranges for features of priority 1, 2, and 3 are respectively, according to... The calculation shows that the higher the priority, the greater the adjustment range; the weight of the feature with priority 4. This is a compensation term used to ensure that the total weight sums to 1, thus preventing anomalies in the total weight after weight adjustments.
[0096] After the weight fine-tuning is completed, the fine-tuned weights will be... The feedback is sent to the feature fusion unit, which re-executes the weighted fusion calculation based on the new weights to generate new relevance scores. The mapping call unit receives the new relevance. Then, the interval comparison algorithm is executed again. If If the value falls within the preset threshold range, the optimal mapping algorithm will be invoked.
[0097] In this embodiment, based on the type of individual module, the corresponding relevance threshold range is retrieved using a library indexing algorithm. Adaptability is then determined using a range comparison algorithm, ensuring that the optimal mapping algorithm is only invoked when the relevance meets the standard. Furthermore, the algorithm corresponds one-to-one with the module type, fitting the scenario characteristics of different modules and effectively avoiding mapping errors caused by improper algorithm adaptation. This ensures the uniqueness and accuracy of real-time mapping relationships, providing a reliable basis for ID replacement. Feature fine-tuning priorities are determined based on the module type. The deviation value and adjustment magnitude are quantified using a deviation calculation algorithm. Through a clear positive and negative deviation fine-tuning formula, the weights of core features are adjusted first, while the feature with the lowest priority is used as a compensation term to ensure that the weight sum remains constant after fine-tuning. This quickly calibrates the relevance to a reasonable range, ensuring the continuity of feature fusion and mapping invocation.
[0098] The method also includes: replacing the base ID with the physical location ID based on the real-time mapping relationship and sending it to the system's controller to complete the interface matching.
[0099] Specifically, based on real-time mapping relationships Using a key-value pair matching algorithm, the extracted basic IDs are... Replace with the corresponding physical location ID This ensures that the replaced physical location ID matches the actual physical location of the individual module, thus meeting the interface identification requirements of the system controller.
[0100] The formula for the ID replacement algorithm is: , in, The physical location ID obtained after the replacement is a decimal integer; This is a key-value pair matching function used for real-time mapping relationships. In the middle, the extracted base ID Use the key to find the corresponding physical location ID as the value. If no matching key is found, return a match failure flag. It represents the real-time mapping relationship between base IDs and physical location IDs, and is a set of key-value pairs, where the base ID is the key and the physical location ID is the value. The base ID is extracted from the data packet, and the matching key is used.
[0101] After the ID replacement is completed, a data packet reconstruction algorithm is used to reconstruct the physical location ID. Replace the base ID field in the original data packet to reconstruct the complete data packet, ensuring that the data packet format is consistent with the system communication protocol. The reconstructed valid data packet is sent to the system controller via an encrypted communication link. After receiving the data packet, the system controller first decrypts the data packet using a decryption algorithm to extract the physical location ID. An interface matching algorithm is used to compare the physical location ID with the system's preset list of interface addresses to locate the corresponding system interface.
[0102] In this embodiment, a library indexing algorithm is used to retrieve the relevance threshold range for the corresponding module type. Combined with a range comparison algorithm, the relevance suitability is determined, ensuring that the optimal mapping algorithm is only invoked when the conditions are met. Furthermore, the optimal mapping algorithm corresponds one-to-one with the module type, fitting the scenario characteristics of different modules and effectively avoiding mapping errors caused by improper algorithm adaptation, thus guaranteeing the uniqueness and accuracy of real-time mapping relationships. Feature fine-tuning priorities are determined based on module type. A deviation calculation algorithm quantifies the deviation value and adjustment magnitude. Through a clear positive and negative deviation fine-tuning formula, the weights of core features are adjusted first, while the feature with the lowest priority is used as a compensation term to ensure that the weight sum remains constant after fine-tuning. This quickly calibrates the relevance to a reasonable range, improving the coherence of fusion and mapping.
[0103] The method also includes: constructing a time-series library that stores a mapping table of different time nodes using timestamps as indexes; when traceability data needs to be sent, triggering an index reverse-engineering strategy based on the timestamp corresponding to the traceability data, locating the current physical location ID of the individual module, and sending the traceability data.
[0104] Specifically, the time-series library is built and maintained by the time-series tracing unit. Upon startup, it first executes an initialization process, verifying the communication links with the mapping call unit and ID replacement unit to ensure real-time synchronization of mapping relationship data. The time-series library uses a key-value pair storage structure of timestamps and historical mapping tables, with timestamps as unique indexes. Each index corresponds to a historical mapping table of a time node's basic ID and physical location ID, denoted as... ,in This corresponds to the timestamp.
[0105] The system uses a unified high-precision timestamp, formatted as a Unix timestamp, in milliseconds, denoted as . This ensures the uniqueness of each time point; the storage period of the time series database is preset by the system, and historical mapping tables that exceed the storage period are automatically archived and backed up to avoid redundancy in the time series database; the storage frequency is consistent with the ID replacement frequency, that is, every time an ID replacement is completed, the mapping relationship is stored synchronously to ensure the continuity of time series data.
[0106] Historical mapping table for each time point Consistent with the real-time mapping relationship structure, it is a set of key-value pairs of basic ID and physical location ID. In addition, three auxiliary fields are added: timestamp field, mapping algorithm identifier, and weight parameter, which are used for algorithm tracing and anomaly investigation during the tracing process.
[0107] Furthermore, the index reverse strategy includes: locating the storage node corresponding to the timestamp in the time series library through the binary search algorithm, and retrieving the historical mapping table of the basic ID and physical location ID of the time node; Specifically, all timestamps in the time series database are arranged in ascending order to form a timestamp sequence. ,in , Let be the total number of timestamps stored in the time series database; let the target timestamp corresponding to the source data be . Using the binary search algorithm in the sequence Mid-positioning The corresponding index position is then used to retrieve the corresponding historical mapping table. .
[0108] The formula for the binary search algorithm is: , in, This is a binary search function that returns the index position. or logo ; This is a time-series library containing timestamps arranged in ascending order, where each element is a Unix timestamp for each time point, in milliseconds. This is the target timestamp corresponding to the source data. It is a Unix timestamp in milliseconds, consistent with the timestamp format of the time series library. target timestamp In sequence The index position in the range is: The corresponding historical mapping table can be directly retrieved through this index; The total number of timestamps stored in the time series library, which is a non-negative integer; To match the failure flag, indicating the target timestamp If it does not exist in the time series library, the nearest timestamp interpolation algorithm needs to be triggered.
[0109] The search logic is to initialize the search range as follows: Calculate intermediate index ,Will and Compare Yes; if Return intermediate index ;like Adjust the search interval to ;like Adjust the search interval to Repeat the above steps until the target timestamp is found or the search range is determined to be empty, ensuring search efficiency.
[0110] The index reverse strategy also includes: if the historical mapping table corresponding to the timestamp is not found by the binary search algorithm, the nearest timestamp interpolation algorithm is triggered to retrieve the historical mapping tables of the two most recent valid time nodes before and after the timestamp, and the approximate historical mapping table corresponding to the timestamp is obtained by linear interpolation.
[0111] Specifically, when the binary search algorithm returns -1, meaning the target timestamp is not found, the nearest timestamp interpolation algorithm is triggered. This retrieves the historical mapping table of the two most recent valid time nodes before and after the target timestamp and calculates the result through linear interpolation. Corresponding approximate history mapping table This ensures that the traceability process remains uninterrupted.
[0112] First, in the timestamp sequence In the middle, the positioning is smaller than Maximum timestamp And greater than Minimum timestamp The corresponding historical mapping tables are as follows: and ;like If the value is less than all timestamps, then the mapping table corresponding to the smallest timestamp is used as an approximation; if... If the value is greater than all timestamps, the mapping table corresponding to the largest timestamp is used as an approximation. Nearest-neighbor timestamp location formula: , .
[0113] Secondly, for each base ID in the historical mapping table To obtain their respective in and Corresponding physical location ID and The base ID is calculated using a linear interpolation formula. Corresponding approximate physical location ID .
[0114] The linear interpolation formula is: , in, target timestamp The corresponding approximate physical location ID is a decimal integer; For the previous nearest timestamp The corresponding physical location ID is a decimal integer; For the next nearest timestamp The corresponding physical location ID is a decimal integer; For the target timestamp; The previous nearest timestamp is the one smaller than and closest in the time series database. timestamp; The next nearest timestamp is the one in the time series database that is greater than and closest to the nearest timestamp. timestamp; The interpolation weights range from [0,1] and are used to measure the influence of two neighboring timestamps on the approximate value. The closer the target timestamp is to a neighboring timestamp, the greater the weight of that neighboring timestamp.
[0115] Finally, all the approximate physical location IDs corresponding to the base IDs. Combine to generate an approximate historical mapping table corresponding to the target timestamp. Add an interpolation identifier field and mark it as an approximate mapping.
[0116] The index reverse tracing strategy also includes: extracting the physical location ID from the source data, searching for the base ID corresponding to the physical location ID in the historical mapping table using a hash reverse matching algorithm; calling the real-time mapping relationship of the single module to determine the physical location ID currently corresponding to the base ID, and the physical location ID is the current physical location of the single module.
[0117] Specifically, firstly, after receiving the tracing data request, the time-series tracing unit parses the tracing data and extracts the target physical location ID contained therein, denoted as... .
[0118] Secondly, the historical mapping table uses a hash table storage structure, which facilitates fast reverse matching; for extraction... For the target value, the underlying ID corresponding to the physical location ID is found in the historical mapping table using a reverse hash matching algorithm, denoted as . This enables the reverse mapping from physical location ID to base ID.
[0119] The formula for the hash reverse matching algorithm is: , in, This is the base ID corresponding to the source node, which is a decimal integer; This is a hash reverse matching function used to look up the corresponding base ID in the historical mapping table of the hash table structure, using the physical location ID as the value; A historical mapping table corresponding to the target timestamp; is the target physical location ID extracted from the source data, and is the target value for reverse matching.
[0120] Reverse the key-value pairs in the historical mapping table to generate a temporary reverse hash table; calculate... The hash value is used to locate the corresponding position in the temporary hash table. If a matching key is found, the corresponding underlying ID is returned. If no matching key is found, the reverse matching is considered a failure.
[0121] Again, reverse matching yields... Subsequently, the timing tracing unit calls the real-time mapping relationship transmitted by the mapping unit. Using a key-value pair matching algorithm, search The current corresponding physical location ID is denoted as This ID is the current physical location ID of the individual module, used for tracing data transmission.
[0122] The formula for matching the current position is: , in, This is the current physical location ID of the individual module, a decimal integer, and is the core location result of the traceability data; This is a key-value pair matching function used to find the corresponding physical location ID using the base ID as the key; This is a real-time mapping relationship between the base ID and the physical location ID; The base ID is the one corresponding to the source node, and the matching key is the matching key.
[0123] Finally, determine the current physical location ID of the individual module. Then, the time-series tracing unit associates and encapsulates the ID with the tracing data, and sends it to the system controller or the designated tracing terminal through an encrypted communication link.
[0124] In this embodiment, the time-series database uses high-precision timestamps as unique indexes, employs a key-value pair storage structure, synchronously stores mapping relationships and auxiliary fields, and maintains a storage frequency consistent with the ID replacement frequency to ensure the continuity and integrity of time-series data. Simultaneously, through storage cycle management and archiving backups, data redundancy is avoided, providing comprehensive and reliable historical data support for traceability, facilitating algorithm tracing and anomaly investigation. A binary search algorithm is used to quickly locate the historical mapping table corresponding to the target timestamp, significantly improving search efficiency. For scenarios where the target timestamp is not found, a neighboring timestamp interpolation algorithm is triggered to generate an approximate mapping table through linear interpolation, ensuring uninterrupted traceability and balancing traceability accuracy with process continuity. Relying on a hash table storage structure and a hash reverse matching algorithm, fast reverse matching from physical location ID to basic ID is achieved. Combined with a key-value pair matching algorithm, real-time mapping relationships are retrieved to locate the current physical location of individual modules, ensuring the accuracy of traceability data transmission.
[0125] Example 2 like Figure 2 As shown, based on the method described in Example 1, the method further includes, after the unit module and the corresponding interface are matched, the system controller retrieves the parameters of the current unit module, encodes the parameters uniformly through the instruction encoding algorithm, and generates the instruction code for the retrieval instruction. The parameters include the unit module type, basic ID, physical location ID, and interface matching timestamp.
[0126] The retrieval command is encrypted using the AES encryption algorithm and sent to the ID acquisition unit. After receiving the retrieval command, the ID acquisition unit decrypts the command using a decryption algorithm and verifies its legality. If it is legal, it sends a command confirmation signal. After receiving the confirmation signal, the system controller determines that the retrieval command was successfully sent and waits for the ID acquisition unit to upload the cached data.
[0127] Specifically, after matching with the corresponding interface, the system controller first retrieves the core parameters of the current unit module to ensure the integrity and real-time performance of the parameters. The retrieved parameters include the unit module type. Basic ID Physical location ID and interface matching timestamp The interface matching timestamp is used to record the precise time of interface matching, providing a time basis for instruction validity verification and timing tracing.
[0128] After the parameters are retrieved, the four types of parameters are uniformly encoded using an instruction encoding algorithm to generate the instruction code for the retrieval instruction. The instruction encoding algorithm employs a multi-parameter fusion encoding mechanism to convert parameters of different types and magnitudes into instruction codes of a unified format, ensuring the uniqueness and resolvability of the instruction codes. The encoding formula is as follows:
[0129] in, The generated call instruction code is a hexadecimal string and serves as the core identifier of the call instruction, ensuring its uniqueness. This is an instruction encoding function used to fuse and encode four types of parameters into an instruction code. For single-module types, enumeration encoding is used, and the three module types are respectively assigned to fixed binary values; , These are the base ID and the physical location ID, respectively, which are converted to 32-bit binary numbers during encoding. Match the timestamp to the interface; it is a Unix timestamp in milliseconds and is converted to a 64-bit binary number during encoding. This is a decimal to binary conversion function used to convert various parameters into fixed-length binary numbers; This function concatenates strings to form a unified binary instruction string. This is a binary-to-hexadecimal function used to convert a concatenated binary instruction string into a hexadecimal string, which serves as the final instruction code. This facilitates encrypted transmission and parsing.
[0130] To ensure the security of the retrieval command during transmission and prevent parameter leakage and command tampering, the AES-256 encryption algorithm is used to encrypt the retrieval command (including the command code). The plaintext parameters are encrypted to generate an encrypted retrieval command. The encryption process strictly follows the AES encryption standard and adopts ECB mode to ensure encryption efficiency and security.
[0131] The core formula of the AES-256 encryption algorithm is: , in, The encrypted retrieval command is a binary data stream; AES-256 encryption function; This is the retrieval instruction before encryption, containing instruction codes. The four types of parameters are plaintext, which are binary data streams; This is the AES encryption key, a 256-bit binary key. For encryption mode, ECB mode is adopted. This mode is simple to operate, has high encryption efficiency, is suitable for encrypted transmission of short instructions, and meets the real-time requirements of the system.
[0132] After encryption, the system controller sends the encrypted retrieval command to the ID acquisition unit via a preset communication link, and simultaneously records the command sending timestamp. .
[0133] The ID acquisition unit receives the encrypted retrieval command. Then, the AES decryption algorithm is immediately activated, using the same encryption key as the system controller to decrypt the encrypted command and restore the original retrieval command (including the command code). (and four types of plaintext parameters), the decryption formula is: , in, This is the AES-256 decryption function, corresponding to the encryption function, used to restore the original retrieval command; Other parameters have the same meaning as in the encryption formula to ensure the accuracy of the decryption process. If decryption fails, the instruction is deemed invalid, no confirmation signal is sent, and a decryption failure log is recorded. The system controller triggers a resend process after a timeout.
[0134] After decryption, the ID acquisition unit verifies the legitimacy of the original retrieval command using a multi-dimensional verification algorithm to ensure that the command originates from a legitimate system controller and that the parameters match the current unit module. The specific verification content and algorithm are as follows: Command code verification: Compare the decrypted command code. The parameters of the current single module cached by the ID acquisition unit are compared with the cached parameters by extracting the parameters contained in the instruction code through the instruction code decoding algorithm. If they are inconsistent, the instruction is determined to be illegal. Timestamp verification: Extract the interface matching timestamp contained in the command. The timestamp of the interface recorded by the ID collection unit is compared with the timestamp of the ID collection unit. If the time difference exceeds 1000ms, it is determined that the instruction has timed out and is considered an illegal instruction. Command format verification: Verify whether the format of the decrypted command conforms to the system's preset format, including command code length, parameter integrity, etc. If the format is abnormal, it is determined to be an illegal command.
[0135] The formula for the validity check algorithm is: , in, This is a function to determine the validity of instructions; 1 indicates that the instruction is valid, and 0 indicates that the instruction is invalid. The result of the instruction code verification is 1, indicating that the verification passed and 0 indicates that the verification failed. This represents the timestamp verification result, where 1 indicates successful verification and 0 indicates failed verification. This is the result of the instruction format verification; 1 indicates that the verification passed, and 0 indicates that the verification failed. It is a logical AND operator; the instruction is considered valid only when all three check results are 1.
[0136] If the verification result is 1, the ID acquisition unit immediately generates a command to receive a confirmation signal. The confirmation signal uses a fixed format and is sent to the system controller through the same communication link; if the verification result is 0, no confirmation signal is sent, and an illegal command log is recorded. The system controller will trigger a resend process after a timeout.
[0137] Meanwhile, the cached data of the ID acquisition unit is a hybrid dataset of real-time acquisition and temporary storage, denoted as... Its composition includes four types of structured data, namely the basic ID dataset. Physical Location ID Dataset Module feature dataset Interface matching time series dataset .
[0138] The total cached data expression is: , in, , For the first The base ID for this collection For the first Secondary basic ID collection timestamp; , For the first The physical location ID collected this time. For the first Secondary physical location ID collection timestamp; and The structure is the same as above, consisting of a set of key-value pairs of data and timestamps, ensuring that the source of each cached data can be traced through the timestamp.
[0139] Secondly, a structured data splitting process is executed, employing a splitting strategy of fixed frame headers, type identifiers, fixed-length segments, and checksums. This is achieved through a fixed-length frame splitting algorithm. The four types of data are split into independent data segments to ensure that the system controller can automatically parse them. The splitting logic is consistent with the original instruction encoding and encryption logic. The specific algorithm and process are as follows: First, each segment of data adopts a unified structured format, and the structure expression for a single segment is as follows: , in, These are the split, single-class data segments; This is a fixed frame header with a value of 0xAA55, used by the system controller to identify the start position of the data segment; This is a data type identifier used to distinguish data types, where 0x01 corresponds to the basic ID dataset. 0x02 corresponds to the physical location ID dataset 0x03 corresponds to the module feature dataset 0x04 corresponds to the interface matching time series dataset ; For data body length, record Number of bytes; For the data body, store the corresponding type of valid cached data; This is a check bit used to verify whether the data segment has been tampered with during transmission.
[0140] Secondly, the check bit is obtained by summing and modulo-taking the sum of all bytes in the data body, using the following formula: , in, For data body The Byte data; For data body Total number of bytes; To perform the modulo operation, ensure that the check digit is 8 bits, consistent with the data segment format.
[0141] Finally, read the cleaned and valid cached dataset. Total length First, confirm data integrity; then, extract data sequentially according to a fixed order: basic ID segment, physical location ID segment, module feature segment, and time-series data segment. , , , Four types of data; for each type of data, add a frame header in sequence. Type identifier Data length Check bit Generate four independent data segment base ID segments Physical location ID segment Module feature segment Time series data segment Finally, the four data segments are concatenated to generate the final upload data packet. The splicing formula is: , Then, the cached data upload process is executed, and the security and reliability of the data upload are ensured through timing control, encryption processing and response confirmation mechanisms.
[0142] First, data upload is triggered only when three conditions are met: redundancy filtering is complete, data splitting is complete, and AES encryption preparation is complete. The determination formula is as follows: , in, This is the upload enable / disable function. A return value of 1 indicates that uploading is allowed, and 0 indicates that uploading is prohibited. Redundancy filtering complete; This serves as a marker indicating that the data splitting is complete. A complete preparation flag for AES encryption.
[0143] Secondly, the AES-256 encryption algorithm is used to encrypt the uploaded data packets. Encryption is performed to generate an encrypted upload data packet. The encryption formula is: , in, AES-256 encryption function; It is a 256-bit binary encryption key, which is consistent with the decryption key of the system controller and ID acquisition unit; For encryption mode, ECB mode is used to ensure encryption efficiency and real-time performance, and to adapt to the rapid transmission of short data packets.
[0144] After encryption is complete, the ID acquisition unit will transmit the data through a preset communication link. Send to the system controller and record the data upload timestamp. After receiving the data packet, the system controller uses the AES-256 decryption algorithm to reconstruct the data packet and verifies the checksum of each data segment. If the verification passes, a data reception confirmation signal will be sent. If the verification fails, no confirmation signal is sent. The ID acquisition unit initiates a timeout retransmission determination, and the algorithm formula is as follows: , in, This is the retransmission decision function. This is the current system timestamp; For data upload timestamps; The retransmission timeout threshold is set to 2000ms. A confirmation signal is sent to receive data from the system controller. If If the transmission fails, a retransmission process will be triggered, with a maximum of 3 retransmissions. If no acknowledgment signal is received after 3 retransmissions, an upload failure log will be recorded and synchronously fed back to the system controller.
[0145] When the ID acquisition unit receives the data sent by the system controller... And if it is confirmed that all data segments have been successfully transmitted, the upload is considered complete. The determination formula is: , in, This is a data segment checksum matching identifier; only... The upload process will only terminate and the upload of cached data will be completed when the specified time is reached; otherwise... If the failure occurs, the retransmission process will continue or a failure log will be recorded.
[0146] In this embodiment, after interface matching, the system controller retrieves four core parameters: the unit module type, basic ID, physical location ID, and interface matching timestamp. This ensures the real-time nature and integrity of the parameters. The timestamp provides a reliable time basis for instruction verification and timing traceability, laying a solid foundation for instruction encoding and legality verification. A multi-parameter fusion encoding mechanism is adopted, using standardized formulas to convert parameters of different types and magnitudes into unified hexadecimal instruction codes. This ensures that the instruction codes are unique and resolvable, balancing transmission convenience with unique identification, and avoiding instruction confusion or parsing errors. The AES-256 encryption algorithm is used to encrypt the retrieved instructions, combined with a unified key and ECB mode, effectively preventing parameter leakage and instruction tampering, ensuring the security of the transmission process. Furthermore, the decryption algorithm strictly corresponds to the encryption algorithm, ensuring instruction restoration.
[0147] Example 3 like Figure 3As shown, based on the descriptions in Embodiments 1 and 2, the method further includes unified cloud storage of standard-related data for individual modules via a cloud server. When it is necessary to update the acquisition strategy, acquisition content, and data sequence order of an individual module, the cloud server retrieves the parameters to be updated; an update instruction encoding algorithm is used to uniformly encode the parameters to be updated to generate an instruction code for the update instruction; the parameters to be updated include the update type, update version number, updated parameter content, update effective time, and verification code; the update instruction is encrypted using the AES encryption algorithm and sent to the ID acquisition unit. After receiving the update instruction, the ID acquisition unit decrypts the instruction using a decryption algorithm and verifies the legality of the update instruction. If it is legal, the update operation is executed.
[0148] Specifically, a distributed data storage cluster is built on the cloud server, dedicated to storing standard-related data for individual modules. This enables data classification management, real-time backup and retrieval, providing data support for parameter updates. Cloud-stored data is divided into four main categories: basic standard data, process log data, parameter configuration data, and anomaly record data. These categories are stored in association, linked by a basic ID. Use it as a reference key to ensure that the data is traceable and can be linked.
[0149] The cloud server establishes a real-time communication link with the ID collection unit of each individual module, and adopts a data synchronization algorithm to achieve real-time synchronization between local data and cloud data, ensuring consistency between cloud data and local data; a hierarchical storage strategy is adopted, with frequently used data stored in a high-speed cache area to improve retrieval speed, and historical data stored in a general storage area, which is regularly compressed and backed up; at the same time, data access permission control is set, and only authorized terminals can access the corresponding data to prevent data leakage or tampering.
[0150] The data synchronization algorithm formula is: , in, for The data synchronization determination result at any given moment: 1 indicates that synchronization is required, and 0 indicates that synchronization is not required. The timestamp used for data synchronization is in seconds; for The target data stored locally in the single-unit module ID acquisition unit at any given time; for The target data of the corresponding individual module is stored on the cloud server at all times.
[0151] when When a data synchronization command is triggered, the ID collection unit uploads local data to the cloud server, or the cloud server sends the latest data to the ID collection unit, ensuring that the data is consistent between the two.
[0152] When it is necessary to update the collection strategy, collection content, and data sequence order of a single module, the cloud server initiates a parameter retrieval process. Through a data indexing algorithm, it retrieves the relevant parameters of the single module to be updated, ensuring that the retrieved parameters are complete and accurate.
[0153] The system management terminal sends a parameter update request, the request information including the base ID of the unit module to be updated. Update trigger flag , This indicates that an update has been triggered. This indicates cancellation of the update or cancellation of the operator's permission verification code. After receiving the request, the cloud server first verifies the validity of the operator's permission verification code. If the verification fails, the update request is rejected and an insufficient permission message is displayed. If the verification passes, the process of retrieving the parameters to be updated begins.
[0154] The cloud server uses a data indexing algorithm to determine the update method based on the base ID of the individual module to be updated. The system retrieves the parameters to be updated from the parameter configuration data storage area. These parameters are organized strictly according to the system's preset format to ensure their integrity and standardization. The update type... The value is a decimal integer, ranging from [1, 3], where 1 represents a data acquisition strategy update, 2 represents a data acquisition content update, and 3 represents a data sequence order update; the update version number is also included. The value is a decimal integer, ranging from [1, 999]. The version number increments to ensure the uniqueness and traceability of the update command; the updated parameter content... Depending on the update type, the parameter content varies and is stored in key-value pairs; update effective time. : Timestamp format, with values either the current timestamp or a future timestamp, ensuring the controllability of update operations; Verification code The parameters to be updated are generated through a verification algorithm to ensure that the parameters have not been tampered with.
[0155] After the updated parameters pass the verification, the same update instruction encoding algorithm as described in Example 2 is used to uniformly encode the parameters to be updated, converting the scattered parameters into standardized instruction codes. And using the same encryption algorithm as described in Example 2, the decimal instruction code... Encryption is performed to generate encrypted ciphertext. After encryption is complete, the cloud server transmits the encrypted ciphertext via a secure TCP / IP communication link. Send to the ID collection unit of the unit module to be updated.
[0156] The ID acquisition unit uses the same AES decryption algorithm as the cloud server, with a preset encryption key. With this as the core, the encrypted ciphertext Decrypt and restore to decimal instruction code. After successful decryption, the ID acquisition unit processes the decimal instruction code. After validating the update command, the ID collection unit performs a validity check. Once the update command is valid, the ID collection unit updates the data based on the effective time of the update. Then execute the corresponding update operation.
[0157] In this embodiment, a distributed storage cluster is built in the cloud to classify and store four categories of standard related data for individual modules, using a basic ID as the association key to ensure data traceability. Combined with real-time synchronization algorithms, hierarchical storage strategies, and access control, data consistency between local and cloud environments is achieved, improving data retrieval efficiency while preventing data leakage and tampering, providing secure and reliable data support for parameter updates. Before parameter updates, permission verification controls the legality of the operation, and then a data indexing algorithm retrieves the parameters to be updated, clarifying the parameter type, value range, and format requirements to ensure parameter completeness and standardization. Setting parameters such as update version number and effective time further ensures the uniqueness, traceability, and controllability of update instructions. Using the same encoding and AES encryption algorithm as in Embodiment 2, standardized encoding and secure encryption of the parameters to be updated are implemented to ensure that the instructions are not tampered with or leaked during transmission. The decryption algorithm strictly corresponds to the encryption algorithm to ensure instruction restoration, balancing transmission security and process continuity. Example 4 like Figures 4-5 As shown, the address automatic identification system is applicable to the address automatic identification methods of Embodiments 1-3 above. The system includes: an ID acquisition unit, a harness configuration unit, a module judgment unit, a feature fusion unit, a mapping call unit, an ID replacement unit, a timing traceability unit, a system controller, and a cloud server.
[0158] The ID acquisition unit is located inside each individual module and establishes a communication connection with the wiring harness configuration unit; the ID acquisition unit incorporates signal conversion strategy, coordinate conversion strategy and decryption algorithm.
[0159] Specifically, the ID acquisition unit converts the connection signal into a unique basic ID and the three-dimensional coordinates into a physical location ID by executing signal conversion and coordinate conversion strategies. It also incorporates a signal filtering module and a location acquisition module. The signal filtering module filters out noise in the connection signal, while the location acquisition module acquires the three-dimensional physical coordinates of the ID terminal to ensure the accuracy of the acquired data. Furthermore, this unit caches various data and exception logs during the acquisition process, receives encrypted retrieval commands from the system controller, decrypts the commands using a decryption algorithm, verifies their validity, and if valid, sends a confirmation signal and uploads the cached data. Simultaneously, it receives encrypted update commands from the cloud server to synchronize the update of the acquisition strategy, acquisition content, and data sequence order, and sends an update confirmation signal to the cloud server after the update is complete.
[0160] The wiring harness configuration unit serves as the signal acquisition carrier for the ID acquisition unit, corresponding one-to-one with the ID acquisition unit of each individual module. The wiring harness configuration unit includes a wiring harness assembly, ID terminals, and a ground bus. Each branch of the wiring harness assembly corresponds to an ID terminal of an individual module, ensuring the stability of signal transmission. The ID terminal has multiple pins, each selectively connected to the ground bus to generate different connection signals, providing a signal source for the generation of the basic ID. The ground bus is shared by all ID terminals, providing a unified grounding reference to ensure the consistency and accuracy of the connection signals of each pin.
[0161] The module judgment unit is communicatively connected to the ID acquisition unit and the feature fusion unit; the module judgment unit carries the module judgment strategy.
[0162] Specifically, the module judgment unit executes the module judgment strategy, receives the relevant data of the individual module transmitted by the ID acquisition unit, and extracts the module features such as communication protocol feature code, sequence number, data packet length and ID offset of the individual module through protocol parsing algorithm, sequence number parsing algorithm and data packet parsing algorithm respectively. The extracted module features are then subjected to protocol feature judgment, permission feature judgment and data packet feature judgment in sequence to determine the type of the individual module. The determined module type and the extracted module features are then synchronously transmitted to the feature fusion unit to provide basic data for feature fusion and weight fine-tuning.
[0163] The feature fusion unit communicates with the module judgment unit and the mapping call unit. The feature fusion unit carries a feature fusion strategy and a weight fine-tuning strategy.
[0164] Specifically, the feature fusion unit executes the feature fusion strategy and the weight fine-tuning strategy; the receiving module determines the module type and module features transmitted by the judgment unit, and uses a standardization algorithm to standardize the module features to eliminate fusion bias caused by differences in the magnitude of different features; according to the module type, it retrieves the preset initial weights of each module feature, calculates the relevance of the individual module through a weighted fusion algorithm, and transmits the relevance to the mapping call unit; when the mapping call unit determines that the relevance does not fall within the preset threshold range, it receives a trigger signal, executes the weight fine-tuning strategy, determines the fine-tuning priority of each feature through weight priority sorting, determines the fine-tuning direction and magnitude in combination with the deviation calculation algorithm, fine-tunes the preset initial weights to ensure that the sum of all feature weights after fine-tuning is 1, and recalculates the relevance until the relevance falls within the preset threshold range.
[0165] The mapping and calling unit communicates with the feature fusion unit, ID replacement unit, and time-series tracing unit. The mapping and calling unit is equipped with a preset mapping parsing library, preset relevance threshold ranges for each module type, preset initial weights for each module feature, and calling strategies.
[0166] Specifically, the mapping invocation unit executes the invocation strategy, receives the relevance and module type transmitted by the feature fusion unit, retrieves the preset relevance threshold range corresponding to the module type from the mapping parsing library, and determines whether the relevance falls within the threshold range through an interval comparison algorithm. If it falls within the threshold range, the optimal mapping algorithm corresponding to the module type (data packet parsing and basic ID replacement fusion algorithm, basic ID dynamic modification algorithm, or basic ID field bit replacement algorithm) is invoked. The algorithm calculates the real-time mapping relationship between the basic ID and the physical location ID, and transmits it synchronously to the ID replacement unit and the time-series tracing unit. If it does not fall within the threshold range, the feature fusion unit is triggered to execute the weight fine-tuning strategy until a relevance that meets the requirements is generated and an effective real-time mapping relationship is obtained. The ID replacement unit communicates with the mapping call unit and the system controller. The ID replacement unit receives the real-time mapping relationship transmitted by the mapping call unit, extracts the basic ID from the data packet sent by the single module, replaces the basic ID with the corresponding physical location ID based on the real-time mapping relationship, and sends the replaced data packet to the system controller to assist the system controller in completing the interface matching with the single module.
[0167] The time-series tracing unit communicates with the mapping and calling unit and the system controller. The time-series tracing unit is used to build and maintain the time-series library. The time-series library uses timestamps as unique indexes and adopts a red-black tree storage structure to store historical mapping tables of basic IDs and physical location IDs of different time nodes in ascending order of timestamps.
[0168] Specifically, when the system needs to send traceability data, it receives an index-backward strategy instruction triggered by the system controller. Using a binary search algorithm, it locates the storage node corresponding to the timestamp of the traceability data in the time-series database and retrieves the corresponding historical mapping table. If no historical mapping table for the corresponding timestamp is found, it triggers a nearby timestamp interpolation algorithm to retrieve the historical mapping tables of the two most recent valid time nodes. An approximate historical mapping table is then calculated using linear interpolation. Subsequently, the physical location ID is extracted from the traceability data, and the corresponding basic ID is found using a hash-backward matching algorithm. The real-time mapping relationship transmitted by the mapping call unit is invoked to determine the physical location ID currently corresponding to the basic ID. The location result is then fed back to the system controller to assist the system controller in sending the traceability data.
[0169] The system controller is communicatively connected to the ID replacement unit, ID acquisition unit, and timing traceability unit. The system controller is used to receive data packets carrying physical location IDs sent by the ID replacement unit and complete interface matching with the individual modules. After successful interface matching, the system controller generates instruction codes for retrieval instructions, sends them to the ID acquisition unit, and receives cached data uploaded by the ID acquisition unit.
[0170] Specifically, after successful interface matching, the parameters of the current single module are retrieved, and the parameters are uniformly encoded using an instruction encoding algorithm to generate an instruction code for the retrieval instruction. The retrieval instruction is then encrypted using the AES encryption algorithm and sent to the ID acquisition unit. The instruction reception confirmation signal is received from the ID acquisition unit, and the cached data uploaded by the ID acquisition unit is waited for and received. At the same time, it is responsible for triggering the traceability data sending instruction, receiving the current physical location ID of the single module from the time-series traceability unit, encapsulating the traceability data into an adapted data packet, and sending it to the target single module. The cloud server communicates with the system controller and all ID acquisition units; the cloud server is used for unified cloud storage, management and updating of standard related data of individual modules; when it is necessary to update the acquisition strategy, acquisition content and data sequence order of an individual module, the cloud server generates an update instruction code and sends it to all ID acquisition units.
[0171] Specifically, when it is necessary to update the acquisition strategy, acquisition content, and data sequence order of a single module, the parameters to be updated are retrieved, and the parameters are uniformly encoded using the update instruction encoding algorithm to generate the instruction code of the update instruction. The update instruction is then encrypted using the AES encryption algorithm and sent to all ID acquisition units. The update completion confirmation signal from each ID acquisition unit is received, and the update log is recorded to ensure that the acquisition standards and algorithm parameters of all ID acquisition units are consistent.
[0172] In this embodiment, each unit performs its specific function and communicates smoothly. The ID acquisition unit ensures basic data collection, the module judgment and feature fusion unit enables module adaptation, the mapping and ID replacement unit completes ID mapping and replacement, the time-series tracing unit supports historical and current location tracking, and the system controller and cloud server coordinate and manage, forming a complete address identification closed loop. The cloud server enables unified data storage, synchronization, and updates, and with access control and encrypted transmission, ensures data security. Parameter updates and command transmissions all use standardized encoding and encryption algorithms, ensuring strong adaptability. The system can adapt to different types of individual modules and, through flexible invocation of optimal mapping algorithms and weight fine-tuning, adapt to different scenario requirements.
[0173] The foregoing detailed one embodiment of the present invention, but this is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the present invention should still fall within the patent coverage of the present invention.
Claims
1. An automatic address identification method, characterized in that, The method includes: The ID acquisition unit in the single module acquires the connection signal of the ID terminal in real time, and converts the connection signal into a basic ID through a signal conversion strategy; The ID acquisition unit acquires the three-dimensional coordinates of the ID terminal in real time and converts them into physical location IDs through a coordinate transformation strategy; The module type is determined by a module identification strategy, and the corresponding module features are extracted. The module features are fused using a feature fusion strategy to obtain the relevance. Based on the single-module type and prioritizing the relevance comparison through the calling strategy, the optimal mapping algorithm is called from the preset mapping parsing library to obtain the real-time mapping relationship between the basic ID and the physical location ID. Based on the real-time mapping relationship, the basic ID is replaced with the physical location ID and sent to the system controller to complete the interface matching; A time-series library is constructed that stores a mapping table of different time nodes using timestamps as indexes. When traceability data needs to be sent, the index reverse-engineering strategy is triggered based on the timestamp corresponding to the traceability data, and the current physical location ID of the individual module is located and the traceability data is sent.
2. The automatic address identification method according to claim 1, characterized in that, The signal conversion strategy includes: defining each pin of the ID terminal as 0 when connected to the ground bus and 1 when disconnected from the ground bus; combining the connection signals of the n pins into an n-bit binary number according to a preset order based on the number of pins n of the ID terminal; converting the n-bit binary number into a decimal number using a binary-to-decimal algorithm, where the decimal number is the unique basic ID corresponding to the ID terminal. The coordinate transformation strategy involves encoding the X, Y, and Z coordinates of the three dimensions according to a preset order of magnitude, summing the three to obtain a decimal coordinate number, which is then the physical location ID.
3. The automatic address identification method according to claim 2, characterized in that, The module's judgment strategy includes: The communication protocol feature code, sequence number, data packet length, and ID offset of the individual module are extracted using protocol parsing algorithm, sequence number parsing algorithm, and data packet parsing algorithm, respectively. The module characteristics are determined sequentially through protocol characteristic determination, permission characteristic determination, and data packet characteristic determination to determine the module type of a single module; Among them, the protocol feature determination is to compare the communication protocol feature code with the preset feature code library. If the feature code matches the preset difficult-to-parse protocol feature set, then the single module is determined to be a module type whose module ID cannot be modified and whose data packets are difficult to parse. Otherwise, the permission feature determination is performed. Permission feature determination is achieved by comparing the serial number of a single module with the preset permission list through a permission verification algorithm. If the serial number is in the permission list and the basic ID is marked as modifiable, the single module is determined to be a module whose basic ID can be dynamically modified; otherwise, data packet feature determination is performed. The data packet characteristic is determined as follows: if the data packet length is greater than the preset number of bytes and the offset of the ID field is a fixed value, then the single module is determined to be a simple data packet replacement module.
4. The automatic address identification method according to claim 3, characterized in that, The feature fusion strategy includes: A standardization algorithm is used to standardize the module features, eliminating fusion bias caused by differences in the magnitude of different features; Based on the determined individual module type, the preset initial weights of each module feature are called, and the relevance of the individual module is calculated through a weighted fusion algorithm.
5. The address automatic identification method according to claim 4, characterized in that, The invocation strategy includes: Based on the determined single-module type, retrieve the preset relevance threshold range corresponding to that type of module from the mapping parsing library; The algorithm determines whether the relevance falls within a preset relevance threshold range. If so, the optimal mapping algorithm corresponding to the module type is called. If not, the weight fine-tuning strategy is triggered to fine-tune the feature weights of the preset initial weights and regenerate new relevance. Among them, the optimal mapping algorithm is a fusion algorithm of packet parsing and basic ID replacement, a dynamic modification algorithm of basic ID, and a bit replacement algorithm of basic ID field.
6. The automatic address identification method according to claim 5, characterized in that, The weight fine-tuning strategy includes: Based on the type of individual modules, the fine-tuning priority of each module's features is determined by sorting them by weight priority; The deviation and adjustment range between the current relevance and the preset relevance threshold range are calculated using a deviation calculation algorithm. The direction and magnitude of fine-tuning are determined by the deviation value. If the current relevance is lower than the lower limit of the preset relevance threshold range, it is determined to be a negative deviation. Then, the preset initial weights of each feature are increased sequentially from high to low based on the adjustment range. If the current relevance is higher than the upper limit of the preset relevance threshold range, it is determined to be a positive deviation. Then, the preset initial weights of each feature are decreased sequentially from high to low based on the adjustment range. After fine-tuning, the sum of the weights of all features is always 1.
7. The automatic address identification method according to claim 5, characterized in that, The index reverse strategy includes: locating the storage node corresponding to the timestamp in the time series database using a binary search algorithm, and retrieving the historical mapping table of the basic ID and physical location ID of the timestamp; if the historical mapping table of the corresponding timestamp is not found by the binary search algorithm, the nearest timestamp interpolation algorithm is triggered to retrieve the historical mapping tables of the two most recent valid timestamps before and after the timestamp, and an approximate historical mapping table corresponding to the timestamp is obtained by linear interpolation. Extract the physical location ID from the source data, and use a hash reverse matching algorithm to find the base ID corresponding to the physical location ID in the historical mapping table; call the real-time mapping relationship of the single module to determine the physical location ID currently corresponding to the base ID, and the physical location ID is the current physical location of the single module.
8. The address automatic identification method according to claim 7, characterized in that, The method also includes, after the unit module is matched with the corresponding interface, the system controller retrieves the parameters of the current unit module, encodes the parameters uniformly through the instruction encoding algorithm, and generates the instruction code for the retrieval instruction. The parameters include the unit module type, basic ID, physical location ID and interface matching timestamp. The retrieval command is encrypted using an encryption algorithm and sent to the ID acquisition unit. After receiving the retrieval command, the ID acquisition unit decrypts the command using a decryption algorithm and verifies its legality. If it is legal, it sends a confirmation signal. After receiving the confirmation signal, the system controller determines that the retrieval command was successfully sent and waits for the ID acquisition unit to upload the cached data.
9. The address automatic identification method according to claim 8, characterized in that, The method also includes unified cloud storage of standard-related data for individual modules via a cloud server. When it is necessary to update the acquisition strategy, acquisition content, and data sequence order of an individual module, the cloud server retrieves the parameters to be updated. An update instruction encoding algorithm is used to uniformly encode the parameters to be updated to generate the instruction code for the update instruction. The parameters to be updated include the update type, update version number, updated parameter content, update effective time, and verification code. The update command is encrypted using an encryption algorithm and sent to the ID acquisition unit. After receiving the update command, the ID acquisition unit decrypts the command using a decryption algorithm and verifies its legality. If the command is legal, the update operation is executed.
10. An automatic address identification system, characterized in that, This system is applicable to any of the address automatic identification methods described in claims 1-9. The system includes: an ID acquisition unit, a harness configuration unit, a module judgment unit, a feature fusion unit, a mapping call unit, an ID replacement unit, a timing traceability unit, a system controller, and a cloud server. The ID acquisition unit is located inside each individual module and establishes a communication connection with the wiring harness configuration unit; the ID acquisition unit integrates signal conversion strategy, coordinate conversion strategy and decryption algorithm; The wiring harness configuration unit serves as the signal acquisition carrier for the ID acquisition unit, corresponding one-to-one with the ID acquisition unit of each individual module. The wiring harness configuration unit includes a wiring harness assembly, ID terminals, and a ground bus. Each branch of the wiring harness assembly corresponds to an ID terminal of an individual module, ensuring the stability of signal transmission. Each ID terminal has multiple pins, each selectively connected to the ground bus to generate different connection signals, providing a signal source for the generation of the basic ID. The ground bus is shared by all ID terminals, providing a unified grounding reference to ensure the consistency and accuracy of the connection signals of each pin. The module judgment unit is communicatively connected to the ID acquisition unit and the feature fusion unit; the module judgment unit carries the module judgment strategy. The feature fusion unit communicates with the module judgment unit and the mapping call unit. The feature fusion unit carries a feature fusion strategy and a weight fine-tuning strategy. The mapping and calling unit communicates with the feature fusion unit, ID replacement unit, and time-series tracing unit. The mapping and calling unit is equipped with a preset mapping parsing library, preset relevance threshold ranges for each module type, preset initial weights for each module feature, and calling strategies. The ID replacement unit communicates with the mapping call unit and the system controller. The ID replacement unit is used to receive the real-time mapping relationship transmitted by the mapping call unit, extract the basic ID from the data packet sent by the single module, replace the basic ID with the corresponding physical location ID based on the real-time mapping relationship, and send the replaced data packet to the system controller to assist the system controller in completing the interface matching with the single module. The time-series tracing unit communicates with the mapping and calling unit and the system controller. The time-series tracing unit is used to build and maintain the time-series library. The time-series library uses timestamps as unique indexes and adopts a red-black tree storage structure. It stores the historical mapping table of basic IDs and physical location IDs of different time nodes in ascending order of timestamps. The system controller is communicatively connected to the ID replacement unit, ID acquisition unit, and timing traceability unit. The system controller is used to receive data packets carrying physical location IDs sent by the ID replacement unit and complete interface matching with the individual modules. After successful interface matching, the system controller generates instruction codes for retrieval instructions, sends them to the ID acquisition unit, and receives cached data uploaded by the ID acquisition unit. The cloud server communicates with the system controller and all ID acquisition units; the cloud server is used for unified cloud storage, management and updating of standard related data of individual modules; when it is necessary to update the acquisition strategy, acquisition content and data sequence order of an individual module, the cloud server generates an update instruction code and sends it to all ID acquisition units.