Self-adaptive protocol analysis method and system oriented to city-level heterogeneous elevator access

An adaptive protocol parsing method combining entropy weighting and machine learning was adopted to solve the problems of insufficient protocol identification accuracy and complex gateway configuration in the access of heterogeneous elevators at the city level, thus realizing efficient and unified access and management of elevator IoT.

CN121940475APending Publication Date: 2026-04-28WUHAN ESPECIAL EQUIP SUPERVISE TEST INST +2
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN ESPECIAL EQUIP SUPERVISE TEST INST
Filing Date
2026-03-31
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The lack of unified communication protocols for heterogeneous elevators at the city level, cumbersome access and adaptation, insufficient protocol identification accuracy, and the inability of edge gateways to adaptively configure themselves make it difficult for elevator IoT platforms to achieve unified access and management of all elevators, thus hindering the large-scale development of elevator IoT.

Method used

By combining entropy weighting feature analysis, dynamic threshold matching, and machine learning for identification, an adaptive protocol parsing model is constructed. Combined with cloud template library and edge gateway adaptive configuration, the elevator protocol can be quickly and stably accessed and uniformly parsed.

Benefits of technology

It enables accurate identification and flexible management of heterogeneous elevator protocols from multiple vendors at the city level, improving the compatibility, scalability, and operational efficiency of the elevator IoT system, and ensuring the uniformity and scalability of elevator access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121940475A_ABST
    Figure CN121940475A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive protocol analysis method and system oriented to city-level heterogeneous elevator access and a storage medium. The method comprises the steps that semantic feature extraction is conducted on elevator private protocols of all manufacturers, and an entropy weight method is adopted for weighted calculation to generate standardized feature vectors; a protocol recognition model is constructed through cosine similarity with a dynamic threshold value and a machine learning classification model, protocol feature vectors and analysis logic are packaged into independent analysis templates, and the independent analysis templates are stored in a cloud end to form a template library and an analysis rule set. And the edge gateway calls a model to complete protocol matching according to the elevator identification information, downloads a corresponding rule to realize adaptive configuration, analyzes and standardizes the elevator communication message, and uploads the elevator communication message to a platform. The edge gateway can collect unknown protocol or abnormal message features and report the unknown protocol or abnormal message features to the cloud, and the cloud updates the template library and the rule set according to the unknown protocol or abnormal message features to complete access expansion of the newly-added heterogeneous elevator. And technical support is provided for centralized supervision and intelligent operation and maintenance of urban elevators.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of Internet of Things (IoT) communication and heterogeneous device access technology, and more specifically, relates to an adaptive protocol parsing method and system for city-level heterogeneous elevator access. Background Technology

[0002] With the acceleration of urbanization, elevators, as core special equipment in high-rise buildings, have seen a continuous increase in their number and a wide distribution of manufacturers. Elevators produced by different manufacturers use different proprietary communication protocols, and even different models of elevators from the same manufacturer have different protocols, forming a heterogeneous elevator protocol environment at the city level, which poses a great challenge to the unified access of the elevator Internet of Things.

[0003] Currently, traditional elevator protocol parsing methods mostly use fixed parsing templates, requiring manual development of adaptation programs for each elevator protocol. This adaptation process is cumbersome and inefficient. In scenarios involving large-scale, heterogeneous elevator access in cities, fixed templates cannot quickly adapt to the protocols of newly added manufacturers or models, resulting in poor elevator access scalability. Furthermore, traditional methods often extract protocol features by manually setting feature weights, which is highly subjective, lacks sufficient feature discrimination, and is easily affected by differences in the magnitude of feature values ​​between different manufacturers, leading to low protocol recognition accuracy.

[0004] Existing protocol identification models mostly rely on fixed thresholds for matching and judgment, which cannot adapt to the complexities of city-level scenarios such as fluctuating communication noise and varying elevator access density. They lack robustness and are prone to parsing anomalies. Furthermore, in traditional elevator access processes, edge gateways require manual configuration of parsing rules, a complex and time-consuming process that fails to meet the needs of large-scale, rapid elevator access in city-level environments. Simultaneously, the lack of effective anomaly handling and template iteration mechanisms for unknown protocol messages hinders the rapid expansion of access for newly added heterogeneous elevators. This makes it difficult for city-level elevator IoT platforms to achieve unified access and management of all elevators, thus restricting the large-scale development of elevator IoT. Summary of the Invention

[0005] This invention aims to solve problems such as inconsistent communication protocols among heterogeneous elevators from different manufacturers in city-level scenarios, cumbersome access and adaptation, insufficient protocol identification accuracy, and the inability of edge gateways to adaptively configure themselves. By using entropy weighting feature weighting, dynamic threshold matching and machine learning fusion identification, cloud template library collaborative edge gateway adaptive configuration, and iterative updates of unknown protocols, it achieves rapid and stable access and unified resolution of elevators from different manufacturers, improves the compatibility, scalability and operating efficiency of elevator IoT systems, and provides reliable technical support for centralized supervision and intelligent operation and maintenance of urban elevators.

[0006] To address the aforementioned deficiencies or improvement needs of existing technologies, as a first aspect of this invention, the present invention provides an adaptive protocol parsing method for city-level heterogeneous elevator access, comprising: S1. Extract semantic features from the frame header identifier, function code definition, data field format and verification rules of each manufacturer's elevator proprietary protocol, and use the entropy weight method to perform weighted calculation of semantic features and generate standardized feature vectors; S2. A protocol recognition model is constructed by using cosine similarity with dynamic threshold and machine learning classification model. The feature vector and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and an adaptive parsing rule set. S3. The edge gateway obtains the basic identification information of the elevator to be connected, calls the protocol identification model, matches the protocol features associated with the basic identification of the elevator with the independent parsing templates in the cloud template library, and downloads the corresponding adaptive parsing rules after successful matching to complete the adaptive configuration of the gateway's parsing capabilities. S4. The edge gateway collects the original communication messages of the elevator in real time, parses the messages, maps fields and standardizes data according to the configured parsing rules, and uploads the standardized data to the city-level elevator IoT platform. S5. For unknown protocol messages or parsing anomalies, the edge gateway collects the characteristics of the abnormal messages and reports them to the cloud. The cloud then generates new independent parsing templates based on the abnormal message characteristics, iteratively optimizes the protocol identification model parameters, updates the cloud template library and rule set, and completes the access expansion of the newly added heterogeneous elevators.

[0007] Furthermore, the frame header identifier, function code definition, data field format, and verification rules in S1 are the four core semantic features of the elevator's proprietary protocol: The frame header identifier is a fixed feature field used to distinguish the start of a message; the function code is defined as an identifier field used to distinguish the message type and data meaning; the data field format is a data structure that carries the elevator status and parameters in the message; and the verification rules are verification methods and verification fields used to verify the integrity of the message.

[0008] Furthermore, the process in S1 of using the entropy weighting method to weight semantic features and generate standardized feature vectors is as follows: The frame header identifier, function code definition, data field format, and verification rules are categorized into four core semantic features, forming a feature set. ,in For frame header identification features, Define features for function codes, For data field format characteristics, To verify the rule features, the values ​​of each semantic feature in all manufacturers' elevator proprietary protocols are first normalized to obtain a normalized feature matrix. Its dimensions are , This represents the total number of elevator protocol types to be adapted in city-level scenarios, used to eliminate recognition bias caused by differences in the magnitude of feature values ​​of different protocols. Based on the mathematical principle of information entropy, the information entropy of each semantic feature is calculated: in, For the first Class semantic features in the first The proportion of features in a type of elevator private protocol represents the distribution density of that type of feature in the corresponding protocol; information entropy. Quantitative First The degree of dispersion of class semantic features across all protocols The smaller the value, the more significant the difference between different protocols, and the stronger the ability to distinguish protocol types; Then, the feature discrimination strength is derived based on information entropy. By fusing and mapping the feature discrimination intensity with the normalized features, the feature components are obtained: in, For the first Normalized values ​​of semantic features of class The four types of feature components are combined sequentially to form a standardized feature vector. ,in The fusion component corresponding to the frame header identifier features, The fusion components of the corresponding function code definition features, The fusion components corresponding to the data domain format features, The fusion component of the corresponding verification rule features.

[0009] Furthermore, the process of constructing the protocol identification model in S2 is as follows: With standardized feature vectors This serves as input to construct a protocol identification model; where... , Identify the feature components in the frame header. Define feature components for the function code. For data field format feature components, To verify the feature components of the rules, This is used to uniquely characterize the core features of a single elevator proprietary protocol; it collects the standard feature vectors of all known elevator proprietary protocols to form a set of known protocol feature vectors. ;in, The unique identifier of the known elevator private protocol, with a value range of: to , This represents the total number of known elevator proprietary protocols adapted for city-level scenarios. For the first The standard feature vector of a known elevator private protocol, its vector dimension and Consistent; Based on this set of feature vectors, calculate the cosine similarity between any two known protocol feature vectors. , For the first The standard feature vector of a known elevator private protocol, For the first Standard feature vectors of known elevator private protocols; By calculating the cosine similarity between all pairwise known protocol feature vectors, a feature space similarity matrix of known protocols is constructed. Based on this similarity matrix, spatial clustering of the known protocol features is performed, obtaining the unique cluster center of each protocol type in the feature space. ;in, A unique identifier for a known elevator private protocol type, with a value ranging from 1 to [value missing]. , Given the total number of types of private elevator protocols and Elevator private protocols of the same type share the same core protocol logic; Subsequently, based on the cosine similarity statistical characteristics between the feature vectors of each protocol class and the corresponding cluster centers, a unique identification threshold for each protocol class is dynamically generated. ; The recognition logic based on feature space clustering and dynamic threshold is then fused with the output of the machine learning classifier to form the final protocol recognition model.

[0010] Furthermore, the method for calculating the cosine similarity is as follows: In the formula, For the first The standard feature vector of a known elevator private protocol, For the range of values to integers and ; For the first The standard feature vector of a known elevator private protocol, For the range of values to integers and ; For vectors with vector The dot product; , They are vectors , The 2-norm is used to characterize the magnitude of the corresponding vector; Let be the cosine similarity between the two, with values ​​ranging from 1 to 2. The closer the value is This indicates that the smaller the difference in characteristics between the two protocols, the closer they are. This indicates a greater difference.

[0011] Furthermore, the cluster center The method for determining it is as follows: Cluster Center It is uniquely determined by the mean vector of all known protocol feature vectors of the corresponding type, and the specific calculation formula is as follows: In the formula, For the first Clustering centers of elevator-like private protocols in feature space, vector dimension and Consistent; For the first The number of known protocol samples included in the elevator-type private protocol is a positive integer. The sum of the number of protocol samples of all types equals... ; For the first The set of known protocol sample IDs corresponding to the elevator-like private protocol, where all IDs belong to the range 1 to 2. The range of integers; For the first The standardized feature vectors of a known elevator private protocol, and ,Right now For the first Sample feature vectors of class protocols.

[0012] Furthermore, the identification threshold specific to each protocol type The calculation formula is: In the formula, For the first The exclusive identification threshold for elevator-like private protocols has a range of values. Used to determine whether the protocol to be identified belongs to the first category. kind; For the first All known protocol feature vectors of a class and the cluster centers of that class The mean of cosine similarity represents the first... The average fit between class protocol features and cluster centers; The standard deviation of the cosine similarity represents the discrete distribution of the degree of fit. This is the scene adaptation factor, and its value range is... The noise level is uniquely determined by the city-level elevator access density and the on-site communication noise level; the higher the access density, the greater the noise level. The closer the value is to 1, the closer it is to 0.

[0013] Furthermore, the process of fusing the output of the machine learning classifier with the decision-making data is as follows: Let the predicted probability vector output by the machine learning classifier be denoted as ,in The protocol to be identified belongs to the first Predicted probability of class Given the total number of known protocol types; set a probability filtering threshold. , will satisfy The categories constitute the prior category set ,Right now: Only the standardized feature vector of the recognition protocol With sets Cluster centers corresponding to each category Calculate cosine similarity and corresponding threshold Compare; if a unique one exists Make If the predicted probability is found, then that category is determined as the final identification result; if there are multiple categories that meet the conditions, the predicted probability is selected. The largest category is used as the final identification result; if no category meets the criteria, it is determined to be an unknown protocol.

[0014] As a second aspect of the present invention, an adaptive protocol parsing system for city-level heterogeneous elevator access is also provided, comprising: The feature extraction and vector generation unit is used to extract semantic features from the frame header identifier, function code definition, data field format and verification rules of elevator proprietary protocols of various manufacturers. The entropy weight method is used to perform weighted calculation of semantic features and generate standardized feature vectors. The identification model and template construction unit is used to build a protocol identification model by using cosine similarity with dynamic threshold and machine learning classification model. The feature vector and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and adaptive parsing rule set. The gateway protocol matching configuration unit is used by the edge gateway to obtain the basic identification information of the elevator to be accessed, call the protocol identification model, match the protocol features associated with the basic identification of the elevator with the independent parsing template in the cloud template library, and download the corresponding adaptive parsing rules after successful matching to complete the adaptive configuration of the gateway parsing capability. The message parsing and data uploading unit is used by the edge gateway to collect the original communication messages of the elevator in real time, parse the messages, map fields and standardize data according to the configured parsing rules, and upload the standardized data to the city-level elevator IoT platform. The anomaly handling and template update unit is used to handle unknown protocol messages or parsing anomalies. The edge gateway collects the characteristics of the abnormal messages and reports them to the cloud. The cloud then generates new independent parsing templates based on the abnormal message characteristics, iteratively optimizes the protocol identification model parameters, updates the cloud template library and rule set, and completes the access expansion of the newly added heterogeneous elevators.

[0015] As a third aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, which is executed by a processor as described in any one of the claims, an adaptive protocol parsing method for city-level heterogeneous elevator access.

[0016] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: 1. The adaptive protocol parsing method for city-level heterogeneous elevator access of the present invention extracts semantic features from the frame header identifiers, function code definitions, data field formats, and verification rules of elevator proprietary protocols from various manufacturers. It then uses the entropy weighting method to weight these semantic features and generate standardized feature vectors. This technique can accurately extract the core semantic information of elevator protocols. The entropy weighting method objectively quantifies the distinguishing ability of various features, avoiding the subjectivity of manually setting weights. The generated standardized feature vectors effectively eliminate recognition bias caused by differences in the magnitude of feature values ​​across different manufacturers' protocols, achieving a unified representation of the features of city-level multi-manufacturer heterogeneous elevator protocols. This provides high-quality data support for subsequent protocol identification and solves the problems of traditional feature extraction methods being unable to adapt to massive heterogeneous protocols and having insufficient feature distinguishability. 2. The adaptive protocol parsing method for city-level heterogeneous elevator access of the present invention constructs a protocol recognition model through cosine similarity with dynamic thresholds and a machine learning classification model. The feature vectors and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and an adaptive parsing rule set. This technology achieves both accuracy and flexibility in protocol recognition. The dynamic threshold can adapt to the differences in communication noise and protocol distribution in complex city-level scenarios. The setting of independent parsing templates and the cloud template library enables standardized management of protocol parsing logic, facilitating rapid invocation and subsequent expansion. This solves the problems of poor robustness, messy parsing templates, and difficulty in adapting to the large-scale access needs of city-level systems in traditional protocol recognition models.

[0017] 3. The adaptive protocol parsing method for city-level heterogeneous elevator access of the present invention, through the collaborative interaction between the edge gateway and the cloud, completes the matching of elevator protocols to be accessed, adaptive gateway configuration, real-time message parsing and uploading, as well as handling of unknown protocol anomalies and iterative updates of the template library. This technical feature achieves end-to-end adaptive elevator access. The local parsing capability of the edge gateway reduces the computing power pressure on the cloud, real-time parsing and data uploading ensure the timeliness of data on the city-level elevator IoT platform, and the dynamic iteration mechanism for unknown protocols enables rapid access for newly added heterogeneous elevators. It solves the problems of cumbersome gateway configuration, low parsing efficiency, and inability to quickly adapt to unknown protocols in traditional elevator access processes, ensuring the uniformity and scalability of city-level elevator access. Attached Figure Description

[0018] Figure 1 This is a flowchart of an adaptive protocol parsing method for heterogeneous elevator access at the city level, according to an embodiment of the present invention. Figure 2 This is a framework diagram of the parsing method according to an embodiment of the present invention; Figure 3 This is a system unit diagram of an embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0020] Example 1 Please refer to Figure 1 This embodiment 1 provides an adaptive protocol parsing method for city-level heterogeneous elevator access, including: S1. Extract semantic features from the frame header identifier, function code definition, data field format and verification rules of each manufacturer's elevator proprietary protocol, and use the entropy weight method to perform weighted calculation of semantic features and generate standardized feature vectors; S2. A protocol recognition model is constructed by using cosine similarity with dynamic threshold and machine learning classification model. The feature vector and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and an adaptive parsing rule set. S3. The edge gateway obtains the basic identification information of the elevator to be connected, calls the protocol identification model, matches the protocol features associated with the basic identification of the elevator with the independent parsing templates in the cloud template library, and downloads the corresponding adaptive parsing rules after successful matching to complete the adaptive configuration of the gateway's parsing capabilities. S4. The edge gateway collects the original communication messages of the elevator in real time, parses the messages, maps fields and standardizes data according to the configured parsing rules, and uploads the standardized data to the city-level elevator IoT platform. S5. For unknown protocol messages or parsing anomalies, the edge gateway collects the characteristics of the abnormal messages and reports them to the cloud. The cloud then generates new independent parsing templates based on the abnormal message characteristics, iteratively optimizes the protocol identification model parameters, updates the cloud template library and rule set, and completes the access expansion of the newly added heterogeneous elevators.

[0021] Please refer to Figure 2 This embodiment 1 will further elaborate on the above steps.

[0022] (1) Feature extraction and vector generation During the construction of city-level elevator IoT, elevators from different manufacturers use independent proprietary communication protocols, resulting in significant differences in protocol structure and data definition, directly impacting the efficiency of unified access and parsing. To achieve standardized processing of multi-source heterogeneous protocols, the core semantic features of various elevator proprietary protocols are first extracted. The extracted content includes four key elements: frame header identifier, function code definition, data field format, and verification rules. These serve as the basis for protocol differentiation and identification. Specifically, the frame header identifier is a fixed feature field used to distinguish the start of a message; the function code definition is an identifier field used to distinguish message type and data meaning; the data field format is the data structure carrying elevator status and parameters in the message; and the verification rules are the verification methods and fields used to verify message integrity.

[0023] When extracting semantic features, the original communication messages uploaded by elevators from various manufacturers are used as the processing object. The messages are disassembled segment by segment according to the protocol data structure, and valid information is identified. First, continuously transmitted message data is segmented and divided into header, function instruction, data content, and verification regions according to the data transmission format. In the frame header identification extraction stage, the data at the beginning of the message is compared byte by byte, and field combinations that remain constant in similar protocols are selected as frame header identification features. In the function code definition extraction stage, the instruction field in the middle of the message is located, the field value is read and mapped to the specific message type, differentiating between different functions such as status reporting, control instructions, and fault feedback, forming function code features. In the data field format extraction stage, the length of the data segment, byte order, parameter storage location, and numerical representation method are recorded to determine the structural features of the data field. In the verification rule extraction stage, the verification field at the end of the message is identified, the verification algorithm type is determined, and the position and calculation method of the verification field are recorded to obtain the verification rule features. By breaking down the protocol into regions, identifying each field, and classifying it according to rules, the core semantic features of the protocol are fully extracted, ensuring that the extraction results are stable and repeatable.

[0024] After feature extraction, the entropy weighting method is used to weight the core semantic features to improve the objectivity and accuracy of protocol recognition. Specifically, the frame header identifier, function code definition, data field format, and verification rules are categorized into four core semantic features, forming a feature set. ,in For frame header identification features, Define features for function codes, For data field format characteristics, To verify the rule features, the values ​​of each semantic feature in all manufacturers' elevator proprietary protocols are first normalized to obtain a normalized feature matrix. Its dimensions are , This represents the total number of elevator protocol types to be adapted in city-level scenarios, used to eliminate recognition bias caused by differences in the magnitude of feature values ​​of different protocols. Based on the mathematical principle of information entropy, the information entropy of each semantic feature is calculated: in, For the first Class semantic features in the first The proportion of features in a type of elevator private protocol represents the distribution density of that type of feature in the corresponding protocol; information entropy. Quantitative First The degree of dispersion of class semantic features across all protocols The smaller the value, the more significant the difference between different protocols, and the stronger the ability to distinguish protocol types; Then, the feature discrimination strength is derived based on information entropy. By fusing and mapping the feature discrimination intensity with the normalized features, the feature components are obtained: in, For the first Normalized values ​​of semantic features of class The four types of feature components are combined sequentially to form a standardized feature vector. ,in The fusion component corresponding to the frame header identifier features, The fusion components of the corresponding function code definition features, The fusion components corresponding to the data domain format features, The fusion component of the corresponding verification rule features.

[0025] (2) Recognition Model and Template Construction After completing semantic feature extraction and standardized feature vector generation, to address the challenges of diverse elevator protocols, complex access environments, and insufficient stability of traditional recognition methods in city-level scenarios, it is necessary to construct a protocol recognition model with high adaptability and accuracy to support subsequent protocol matching and parsing. The protocol recognition model uses standardized feature vectors... This serves as input to construct a protocol identification model; where... , Identify the feature components in the frame header. Define feature components for the function code. For data field format feature components, To verify the feature components of the rules, This is used to uniquely characterize the core features of a single elevator proprietary protocol; it collects the standard feature vectors of all known elevator proprietary protocols to form a set of known protocol feature vectors. ;in, The unique identifier of the known elevator private protocol, with a value range of: to , This represents the total number of known elevator proprietary protocols adapted for city-level scenarios. For the first The standard feature vector of a known elevator private protocol, its vector dimension and Consistent; Based on this set of feature vectors, calculate the cosine similarity between any two known protocol feature vectors. The calculation method is as follows: In the formula, For the first The standard feature vector of a known elevator private protocol, For the range of values to integers and ; For the first The standard feature vector of a known elevator private protocol, For the range of values to integers and ; For vectors with vector The dot product; , They are vectors , The 2-norm is used to characterize the magnitude of the corresponding vector; Let be the cosine similarity between the two, with values ​​ranging from 1 to 2. The closer the value is This indicates that the smaller the difference in characteristics between the two protocols, the closer they are. This indicates a greater difference.

[0026] By calculating the cosine similarity between all pairwise known protocol feature vectors, a feature space similarity matrix of known protocols is constructed. Based on this similarity matrix, spatial clustering of the known protocol features is performed, obtaining the unique cluster center of each protocol type in the feature space. ;in, A unique identifier for a known elevator private protocol type, with a value ranging from 1 to [value missing]. , Given the total number of types of private elevator protocols and Elevator private protocols of the same type share the same core protocol logic; cluster center It is uniquely determined by the mean vector of all known protocol feature vectors of the corresponding type, and the specific calculation formula is as follows: In the formula, For the first Clustering centers of elevator-like private protocols in feature space, vector dimension and Consistent; For the first The number of known protocol samples included in the elevator-type private protocol is a positive integer. The sum of the number of protocol samples of all types equals... ; For the first The set of known protocol sample IDs corresponding to the elevator-like private protocol, where all IDs belong to the range 1 to 2. The range of integers; For the first The standardized feature vectors of a known elevator private protocol, and ,Right now For the first Sample feature vectors of class protocols.

[0027] Subsequently, based on the cosine similarity statistical characteristics between the feature vectors of each protocol class and the corresponding cluster centers, a unique identification threshold for each protocol class is dynamically generated. ; Specific identification thresholds for each protocol type The calculation formula is: In the formula, For the first The exclusive identification threshold for elevator-like private protocols has a range of values. Used to determine whether the protocol to be identified belongs to the first category. kind; For the first All known protocol feature vectors of a class and the cluster centers of that class The mean of cosine similarity represents the first... The average fit between class protocol features and cluster centers; The standard deviation of the cosine similarity represents the discrete distribution of the degree of fit. This is the scene adaptation factor, and its value range is... The noise level is uniquely determined by the city-level elevator access density and the on-site communication noise level; the higher the access density, the greater the noise level. The closer the value is to 1, the closer it is to 0.

[0028] The recognition logic based on feature space clustering and dynamic threshold is then fused with the output of the machine learning classifier to form the final protocol recognition model.

[0029] The fusion decision process is as follows: the predicted probability vector output by the machine learning classifier is denoted as... ,in The protocol to be identified belongs to the first Predicted probability of class Given the total number of known protocol types; set a probability filtering threshold. , will satisfy The categories constitute the prior category set ,Right now: Only the standardized feature vector of the recognition protocol With sets Cluster centers corresponding to each category Calculate cosine similarity and corresponding threshold Compare; if a unique one exists Make If the predicted probability is found, then that category is determined as the final identification result; if there are multiple categories that meet the conditions, the predicted probability is selected. The largest category is used as the final identification result; if no category meets the criteria, it is determined to be an unknown protocol.

[0030] After the protocol identification model is built, for each identified elevator private protocol, the standardized feature vector, protocol identification judgment conditions, message segmentation rules, field definitions, data parsing methods, verification execution processes, and data output formats corresponding to the protocol are bound and integrated, and the protocol is encapsulated in a structured manner to form a unique independent parsing template corresponding to the protocol.

[0031] The cloud server receives all parsing templates, categorizes and archives them according to manufacturer number, protocol type, and device model, and establishes a unified index to form a protocol parsing template library that can be queried and invoked in real time. Simultaneously, the cloud extracts executable configuration items and judgment logic from each parsing template to generate an adaptive parsing rule set that can be directly deployed to the edge gateway. When the edge gateway connects to an elevator, it can directly call the corresponding parsing template and rule set from the cloud based on the protocol identification results, automatically completing parameter loading and logic configuration, enabling plug-and-play access for heterogeneous elevators.

[0032] (3) Gateway protocol matching configuration In city-level scenarios, the edge gateway acts as the communication hub between elevators and the cloud platform, undertaking the core responsibilities of elevator protocol adaptation and data transmission. Since the elevators to be connected are geographically dispersed and involve diverse protocol types, the gateway must quickly adapt its parsing capabilities to achieve effective integration with the city-level elevator IoT platform. After initiating the elevator access process, the edge gateway first obtains the basic identification information of the elevators to be connected through its own interface. This identification information includes core content such as the elevator manufacturer's number, equipment model, and serial number, used to initially associate the elevator with the possible protocol types, providing a basis for subsequent protocol matching.

[0033] After acquiring basic identification information, the edge gateway invokes the pre-built protocol identification model via network communication links. Simultaneously, it transforms the protocol features associated with the elevator identification information to be accessed into standardized feature vectors, which serve as input parameters for the model. Upon receiving the input, the model formally begins protocol matching. During the matching process, the edge gateway first retrieves the standardized feature vectors corresponding to all independent parsing templates from the cloud-based protocol parsing template library. For each template's feature vector retrieved, the cosine similarity between the elevator's feature vector and the template's feature vector is immediately calculated to measure the degree of similarity in protocol features.

[0034] Each protocol's independent parsing template corresponds to a unique dynamic identification threshold. This threshold is preset by the cloud based on the protocol type, the city's elevator access density, and the on-site communication noise level. The dynamic thresholds differ for different protocol templates to ensure the accuracy of the comparison process. After each similarity calculation, the edge gateway compares the result with the dynamic threshold corresponding to the currently retrieved template in real time to determine if the similarity meets the threshold requirement. If the feature vector of a template matches or exceeds the feature vector of the elevator to be accessed, the subsequent comparison process is paused, and the template is determined to be a successfully matched parsing template. If the threshold is not met, the next template is retrieved, and the similarity calculation and threshold comparison steps are repeated until all independent parsing templates in the template library are traversed and a successfully matched template is found.

[0035] After a successful match, the edge gateway sends a rule download request to the cloud. The cloud then issues the adaptive parsing rules corresponding to the template based on the matching results. After receiving the parsing rules, the edge gateway automatically loads and configures the local parsing parameters, ultimately achieving adaptive adaptation of its own parsing capabilities to ensure accurate parsing of all subsequent communication messages transmitted by the elevator.

[0036] (4) Message parsing and data upload After completing the protocol adaptive configuration, the edge gateway enters the stable operation phase, undertaking the critical task of real-time data acquisition and processing for elevators. In the city-level elevator IoT operation system, elevators continuously send raw communication messages containing operating status, fault information, control commands, etc. These messages use vendor-proprietary protocol formats, which cannot be directly recognized and used by the upper-layer platform. They must undergo local parsing and standardization processing to achieve effective uploading.

[0037] The edge gateway collects raw communication messages sent by the elevator in real time through the communication interface according to a preset period, performs integrity verification on the messages, and filters out abnormal and invalid data generated during transmission. After confirming the validity of the message, the edge gateway parses the raw message segment by segment according to the parsing rules previously downloaded and loaded from the cloud. It first locates the start position of the message and the valid data range, and then breaks down the message into structural units such as function code, data field, and check bit.

[0038] After message parsing is completed, the edge gateway performs field mapping operations according to established rules, mapping the original private fields in the message to standard fields uniformly defined by the IoT platform, clarifying the physical meaning of each data segment. Subsequently, the data format, units, and numerical ranges are standardized to ensure a unified representation of elevator data from different manufacturers and using different protocols. The standardized data is then stably uploaded to the city-level elevator IoT platform via network channels, providing reliable data support for the platform to achieve centralized elevator monitoring, fault early warning, operational statistics, and remote management.

[0039] (5) Exception handling and template update In city-level heterogeneous elevator access scenarios, with the iteration of elevator manufacturers, the addition of new elevators, and fluctuations in the on-site communication environment, edge gateways inevitably encounter unknown protocol messages or parsing anomalies during real-time message parsing. Unknown protocol messages mainly come from newly added elevators from new manufacturers or new elevator models that have not been pre-adapted, and their protocol characteristics are not included in the cloud template library. Parsing anomalies are mostly caused by noise interference during message transmission, minor iterations of protocol versions, or deviations between the gateway's parsing rules and the actual message format, causing the gateway to be unable to complete message disassembly and data extraction according to the existing parsing rules. If not handled in time, such elevators will be unable to connect to the platform normally, affecting the full coverage of city-level elevator IoT.

[0040] When the edge gateway detects unknown protocol messages or parsing anomalies, it immediately initiates anomaly handling procedures. Instead of continuously attempting invalid parsing, it prioritizes collecting the core features of the abnormal message. The collected abnormal message features are consistent with those extracted in the previous protocol semantic feature extraction, specifically including the frame header identifier field, function code field, data field structure, checksum field, and checksum method. It also records auxiliary information such as the message's transmission frequency and data length to ensure the collected features are complete and usable for generating subsequent protocol parsing templates. After collection, the edge gateway packages all abnormal message features and reports them to the cloud platform via a stable network link, along with the elevator's basic identification information, facilitating cloud-based location of the elevator's scenario and device type.

[0041] After receiving abnormal message features reported by the edge gateway, the cloud platform categorizes, organizes, and verifies these features, eliminating invalid features generated during transmission and retaining the core semantic features that uniquely characterize the unknown protocol. Subsequently, based on these core features, the cloud platform generates new independent parsing templates according to the encapsulation specifications of the previous parsing templates, clarifying the message parsing rules, field mapping relationships, and data standardization methods for the unknown protocol. Simultaneously, the newly extracted protocol features are added to the known protocol feature vector set, and the parameters of the protocol recognition model are iteratively optimized, adjusting feature weights and dynamic thresholds to improve the model's ability to recognize this type of new protocol. After optimization, the cloud platform stores the newly generated independent parsing templates in the protocol parsing template library and synchronously updates the adaptive parsing rule set, completing the version update of the template library and rule set.

[0042] When the newly added heterogeneous elevator is connected again, the edge gateway calls the updated protocol identification model to quickly identify its protocol type, match the newly added parsing template in the cloud, download the corresponding parsing rules and complete the adaptive configuration, and finally realize the rapid access expansion of the newly added heterogeneous elevator, ensuring that the city-level elevator IoT platform can continuously cover various types of elevator equipment and improve the system's scalability and adaptability.

[0043] Example 2 Please refer to Figure 3 This embodiment 2 provides an adaptive protocol parsing system for city-level heterogeneous elevator access, including: The feature extraction and vector generation unit is used to extract semantic features from the frame header identifier, function code definition, data field format and verification rules of elevator proprietary protocols of various manufacturers. The entropy weight method is used to perform weighted calculation of semantic features and generate standardized feature vectors. The identification model and template construction unit is used to build a protocol identification model by using cosine similarity with dynamic threshold and machine learning classification model. The feature vector and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and adaptive parsing rule set. The gateway protocol matching configuration unit is used by the edge gateway to obtain the basic identification information of the elevator to be accessed, call the protocol identification model, match the protocol features associated with the basic identification of the elevator with the independent parsing template in the cloud template library, and download the corresponding adaptive parsing rules after successful matching to complete the adaptive configuration of the gateway parsing capability. The message parsing and data uploading unit is used by the edge gateway to collect the original communication messages of the elevator in real time, parse the messages, map fields and standardize data according to the configured parsing rules, and upload the standardized data to the city-level elevator IoT platform. The anomaly handling and template update unit is used to handle unknown protocol messages or parsing anomalies. The edge gateway collects the characteristics of the abnormal messages and reports them to the cloud. The cloud then generates new independent parsing templates based on the abnormal message characteristics, iteratively optimizes the protocol identification model parameters, updates the cloud template library and rule set, and completes the access expansion of the newly added heterogeneous elevators.

[0044] Example 3 This embodiment 3 also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement any step of an adaptive protocol parsing method for access to heterogeneous elevators at the city level.

[0045] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0046] For a description of the computer-readable storage medium provided in this application, please refer to the above method embodiments; further details will not be repeated here.

[0047] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An adaptive protocol parsing method for heterogeneous elevator access at the city level, characterized in that, include: S1. Extract semantic features from the frame header identifier, function code definition, data field format and verification rules of each manufacturer's elevator proprietary protocol, and use the entropy weight method to perform weighted calculation of semantic features and generate standardized feature vectors; S2. A protocol recognition model is constructed using cosine similarity with dynamic threshold and machine learning classification model. The feature vector and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and an adaptive parsing rule set. S3. The edge gateway obtains the basic identification information of the elevator to be connected, calls the protocol identification model, matches the protocol features associated with the elevator's basic identification with the independent parsing templates in the cloud template library, and downloads the corresponding adaptive parsing rules after a successful match to complete the adaptive configuration of the gateway's parsing capabilities. S4. The edge gateway collects the original communication messages of the elevator in real time, parses the messages, maps fields and standardizes data according to the configured parsing rules, and uploads the standardized data to the city-level elevator IoT platform. S5. In case of unknown protocol messages or parsing anomalies, the edge gateway collects the characteristics of the abnormal messages and reports them to the cloud. The cloud then generates new independent parsing templates based on the abnormal message characteristics, iteratively optimizes the protocol identification model parameters, updates the cloud template library and rule set, and completes the access expansion of the newly added heterogeneous elevators.

2. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 1, characterized in that, The frame header identifier, function code definition, data field format, and verification rules in S1 are the four core semantic features of the elevator's proprietary protocol. The frame header identifier is a fixed feature field used to distinguish the start of a message; the function code is defined as an identifier field used to distinguish the message type and data meaning; the data field format is a data structure that carries the elevator status and parameters in the message; and the verification rules are verification methods and verification fields used to verify the integrity of the message.

3. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 1, characterized in that, The process in S1 of using the entropy weighting method to weight semantic features and generate standardized feature vectors is as follows: The frame header identifier, function code definition, data field format, and verification rules are categorized into four core semantic features, forming a feature set. ,in For frame header identification features, Define features for function codes, For data field format characteristics, To verify the rule features, the values ​​of each semantic feature in all manufacturers' elevator proprietary protocols are first normalized to obtain a normalized feature matrix. Its dimensions are , This represents the total number of elevator protocol types to be adapted in city-level scenarios, used to eliminate recognition bias caused by differences in the magnitude of feature values ​​of different protocols. Based on the mathematical principle of information entropy, the information entropy of each semantic feature is calculated: in, For the first Class semantic features in the first The proportion of features in a type of elevator private protocol represents the distribution density of that type of feature in the corresponding protocol; information entropy. Quantitative First The degree of dispersion of class semantic features across all protocols The smaller the value, the more significant the difference between different protocols, and the stronger the ability to distinguish protocol types; Then, the feature discrimination strength is derived based on information entropy. By fusing and mapping the feature discrimination intensity with the normalized features, the feature components are obtained: in, For the first Normalized values ​​of semantic features of class The four types of feature components are combined sequentially to form a standardized feature vector. ,in The fusion component corresponding to the frame header identifier features, The fusion components of the corresponding function code definition features, The fusion components corresponding to the data domain format features, The fusion component of the corresponding verification rule features.

4. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 1, characterized in that, The process of constructing the protocol identification model in S2 is as follows: With standardized feature vectors This serves as input to construct a protocol identification model; where... , Identify the feature components in the frame header. Define feature components for the function code. For data field format feature components, To verify the feature components of the rules, This is used to uniquely characterize the core features of a single elevator proprietary protocol; it collects the standard feature vectors of all known elevator proprietary protocols to form a set of known protocol feature vectors. ;in, The unique identifier of the known elevator private protocol, with a value range of: to , This represents the total number of known elevator proprietary protocols adapted for city-level scenarios. For the first The standard feature vector of a known elevator private protocol, its vector dimension and Consistent; Based on this set of feature vectors, calculate the cosine similarity between any two known protocol feature vectors. , For the first The standard feature vector of a known elevator private protocol, For the first Standard feature vectors of known elevator private protocols; By calculating the cosine similarity between all pairwise known protocol feature vectors, a feature space similarity matrix of known protocols is constructed. Based on this similarity matrix, spatial clustering of the known protocol features is performed, obtaining the unique cluster center of each protocol type in the feature space. ;in, A unique identifier for a known elevator private protocol type, with a value ranging from 1 to [value missing]. , Given the total number of types of private elevator protocols and Elevator private protocols of the same type share the same core protocol logic; Subsequently, based on the cosine similarity statistical characteristics between the feature vectors of each protocol class and the corresponding cluster centers, a unique identification threshold for each protocol class is dynamically generated. ; The recognition logic based on feature space clustering and dynamic threshold is then fused with the output of the machine learning classifier to form the final protocol recognition model.

5. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 4, characterized in that, The method for calculating the cosine similarity is as follows: In the formula, For the first The standard feature vector of a known elevator private protocol, For the range of values to integers and ; For the first The standard feature vector of a known elevator private protocol, For the range of values to integers and ; For vectors with vector The dot product; , They are vectors , The 2-norm is used to characterize the magnitude of the corresponding vector; Let be the cosine similarity between the two, with values ​​ranging from 1 to 2. The closer the value is This indicates that the smaller the difference in characteristics between the two protocols, the closer they are. This indicates a greater difference.

6. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 4, characterized in that, The cluster center The method for determining it is as follows: Cluster Center It is uniquely determined by the mean vector of all known protocol feature vectors of the corresponding type, and the specific calculation formula is as follows: In the formula, For the first Clustering centers of elevator-like private protocols in feature space, vector dimension and Consistent; For the first The number of known protocol samples included in the elevator-type private protocol is a positive integer. The sum of the number of protocol samples of all types equals... ; For the first The set of known protocol sample IDs corresponding to the elevator-like private protocol, where all IDs belong to the range 1 to 2. The range of integers; For the first The standardized feature vectors of a known elevator private protocol, and ,Right now For the first Sample feature vectors of class protocols.

7. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 4, characterized in that, The identification threshold specific to each protocol type The calculation formula is: In the formula, For the first The exclusive identification threshold for elevator-like private protocols has a range of values. Used to determine whether the protocol to be identified belongs to the first category. kind; For the first All known protocol feature vectors of a class and the cluster centers of that class The mean of cosine similarity represents the first... The average fit between class protocol features and cluster centers; The standard deviation of the cosine similarity represents the discrete distribution of the degree of fit. This is the scene adaptation factor, and its value range is... The noise level is uniquely determined by the city-level elevator access density and the on-site communication noise level; the higher the access density, the greater the noise level. The closer the value is to 1, the closer it is to 0.

8. The adaptive protocol parsing method for heterogeneous elevator access at the city level according to claim 4, characterized in that, The process of fusing the output of the machine learning classifier with the decision-making process is as follows: Let the predicted probability vector output by the machine learning classifier be denoted as ,in The protocol to be identified belongs to the first Predicted probability of class The total number of known protocol types; Set probability filtering threshold , will satisfy The categories constitute the prior category set ,Right now: Only the standardized feature vector of the recognition protocol With sets Cluster centers corresponding to each category Calculate cosine similarity and the corresponding threshold Compare; if a unique one exists Make If the criteria are met, then that category is determined as the final identification result; if there are multiple categories that meet the criteria, the predicted probability is selected. The largest category is used as the final identification result; if no category meets the criteria, it is determined to be an unknown protocol.

9. An adaptive protocol parsing system for heterogeneous elevator access in urban areas, characterized in that, include: The feature extraction and vector generation unit is used to extract semantic features from the frame header identifier, function code definition, data field format and verification rules of elevator proprietary protocols of various manufacturers. The entropy weight method is used to perform weighted calculation of semantic features and generate standardized feature vectors. The identification model and template construction unit is used to build a protocol identification model by using cosine similarity with dynamic threshold and machine learning classification model. The feature vector and parsing logic corresponding to each elevator protocol are encapsulated into independent parsing templates and stored in the cloud to form a protocol parsing template library and adaptive parsing rule set. The gateway protocol matching configuration unit is used by the edge gateway to obtain the basic identification information of the elevator to be accessed, call the protocol identification model, match the protocol features associated with the basic identification of the elevator with the independent parsing template in the cloud template library, and download the corresponding adaptive parsing rules after successful matching to complete the adaptive configuration of the gateway parsing capability. The message parsing and data uploading unit is used by the edge gateway to collect the original communication messages of the elevator in real time, parse the messages, map fields and standardize data according to the configured parsing rules, and upload the standardized data to the city-level elevator IoT platform. The anomaly handling and template update unit is used to handle unknown protocol messages or parsing anomalies. The edge gateway collects the characteristics of the abnormal messages and reports them to the cloud. The cloud then generates new independent parsing templates based on the abnormal message characteristics, iteratively optimizes the protocol identification model parameters, updates the cloud template library and rule set, and completes the access expansion of the newly added heterogeneous elevators.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor as described in any one of claims 1-8: an adaptive protocol parsing method for accessing heterogeneous elevators at the city level.

Citation Information

Patent Citations

  • Unknown network protocol identification method, system and device based on deep clustering and storage medium

    CN115037805A

  • Multimedia equipment control method and system based on adaptive protocol matching

    CN120416229A

  • Industrial multi-protocol adaptive conversion intelligent gateway data processing method

    CN120856800A

  • System for protocol adaptation and unified access of multi-source heterogeneous industrial equipment

    CN121691487A

  • Method for identifying and parsing industrial control protocol based on industrial gateway

    US20220206473A1