Communication switching method for automatic adaptation of multi-protocol alarm terminal
By acquiring the operating status information and network environment of the alarm terminal, and combining the protocol mapping engine and adaptive deep policy mechanism, the real-time adaptation problem of communication switching between multi-protocol alarm terminals is solved, realizing the timely delivery of alarm information and energy consumption management, and improving the stability and efficiency of the communication link.
Patent Information
- Application Number
- CN202510891314.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing multi-protocol alarm terminal communication switching technology lacks real-time perception and comprehensive decision-making regarding alarm service priorities, terminal operating status, and dynamic characteristics of the link. This results in communication switching strategies failing to adapt to real-time changes in network conditions, easily leading to frequent switching, resource waste, and a decline in service quality.
By acquiring current protocol and operational status information, and generating a candidate protocol priority list using a protocol mapping engine, a communication switching model is constructed using a two-layer adaptive depth strategy and a gray wolf pack search mechanism. Taking into account timely alarm delivery, terminal energy consumption management, and link stability, intelligent dynamic protocol switching is achieved.
It enables intelligent dynamic decision-making under complex network conditions, timely response to network fluctuations, precise control of protocol switching processes, timely delivery of alarm information, reduction of terminal energy consumption, and improvement of communication link stability and operational efficiency.
Smart Images

Figure CN120812147A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication technology and intelligent control of alarm terminal equipment, and particularly relates to a communication switching method for automatic adaptation of a multi-protocol alarm terminal. BACKGROUND
[0002] In recent years, with the rapid development of Internet of Things technology, wireless communication technology and intelligent terminal technology, various alarm terminals are widely used in industrial monitoring, security and emergency command fields. Alarm terminal equipment is usually deployed in complex environments and large network fluctuations. A single communication protocol cannot adapt to changing network conditions stably. Therefore, alarm terminals with multi-protocol communication capabilities have gradually become a trend of technological development.
[0003] At present, in order to realize the stable operation of multi-protocol terminals in network fluctuations, the existing technology generally adopts a hot standby switching method based on fixed rules or a simple threshold judgment switching method. For example, CN120034422A discloses a mine multi-protocol gateway bus communication switching method based on dual hot standby. This method mainly adopts a master-slave hot standby method and realizes the switching of master-slave machines through a watchdog monitoring signal mechanism. However, it is essentially a static and fixed fault-tolerant mechanism that relies only on master-slave redundant hardware devices to ensure reliability, lacking the ability to actively adapt to dynamic network environment changes. In addition, CN117546526A discloses a communication switching method based on reference signal quality. Although this method can dynamically switch according to the signal quality measured by the terminal in real time, it simply switches the communication method according to the priority order and fixed quality threshold, lacking comprehensive analysis of multi-dimensional information such as terminal operating state and network environment, which can easily lead to frequent communication method switching and high terminal energy consumption.
[0004] The above-mentioned existing technology has two deficiencies: first, it lacks real-time perception and comprehensive decision-making mechanism for the priority of alarm services, terminal operating state and link dynamic characteristics, which leads to the inability of communication switching strategy to adapt to real-time changing network conditions, making it difficult to ensure the timely delivery of alarm information; second, the existing protocol switching judgment standard and decision-making method is relatively simple, and does not fully consider the energy consumption management of terminal equipment and the stability optimization of long-term link operation, which can easily cause frequent switching, resource waste and degradation of service quality.
[0005] Therefore, the existing multi-protocol alarm terminal communication switching technology has the problems of insufficient real-time delivery of alarm information and inaccurate protocol switching decision. The present application generates a candidate protocol priority list by combining protocol mapping engine with current protocol and operating state information, and dynamically realizes intelligent switching of protocols by considering alarm timely delivery, terminal energy consumption management and link stability through a communication switching model. SUMMARY
[0006] This section is intended to summarize some aspects of the embodiments of the present application and briefly introduce some preferred embodiments, and some simplifications or omissions may be made in this section and the abstract and title of the specification of the present application to avoid obscuring the purpose of this section, the abstract and the title, and such simplifications or omissions cannot be used to limit the scope of the present application.
[0007] In view of the above existing problems, the present application is proposed.
[0008] To solve the above technical problems, the present application provides the following technical solutions: the alarm terminal starts a multi-protocol identification module, automatically parses the signaling characteristics of the access network, obtains the protocol identifier currently used, simultaneously collects link delay, packet loss rate, bandwidth utilization, jitter value and terminal remaining power, and outputs running state information;
[0009] The protocol mapping engine is called, the protocol identifier is compared with a target protocol set according to the established protocol attribute mapping table, a candidate protocol priority list is obtained, and the default port, message format and encryption method of each candidate protocol are recorded;
[0010] The running state information and the candidate protocol priority list are input into a communication switching model constructed based on a double-layer adaptive deep strategy and fused with a gray wolf group search mechanism, the communication switching model takes the priorities of timely arrival of the alarm, low energy consumption and optimal link stability as targets, and outputs a target protocol and a corresponding decision confidence; wherein:
[0011] When the decision confidence is greater than a preset threshold and the target protocol is different from the currently used protocol, the alarm terminal performs handshake verification, establishes a secure encryption channel and enables double-channel mirror sending according to the priority order, and completes the protocol switching without interrupting the service;
[0012] When the decision confidence is less than or equal to the preset threshold, the alarm terminal maintains the currently used protocol to continue message transmission, and starts a sliding window counter to monitor the confidence, if the confidence monitored in the last 5 times still does not exceed the preset threshold, the alarm terminal selects the next protocol according to the candidate protocol priority list, re-calls the communication switching model for calculation and decides whether to perform seamless switching according to the calculation result.
[0013] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the output running state information comprises:
[0014] Real-time link statistical data are obtained at the network interface layer of the alarm terminal, and round-trip delay, packet loss rate, bandwidth utilization and jitter value are recorded respectively;
[0015] Reading the residual power at the alarm terminal power management unit and converting it into percentage form;
[0016] Writing the round-trip delay, packet loss rate, bandwidth utilization, jitter value and residual power into the state buffer according to a uniform timestamp and marking the sliding time window sequence number;
[0017] When the sliding time window ends, integrating the data in the state buffer into a complete running state information and sending it to the protocol mapping engine.
[0018] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the current used protocol identifier is obtained, specifically including:
[0019] Listening to the handshake sequence of the access network, analyzing the protocol field in the initial packet header;
[0020] Comparing the default port of the packet with the preset port list to preliminarily determine the protocol type;
[0021] Extracting the encryption negotiation information and combining the protocol characteristic bytes for secondary confirmation;
[0022] When the protocol characteristics are not clear, sending a tentative handshake packet and comparing the return code to finally determine the current used protocol identifier.
[0023] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the candidate protocol priority list is obtained, including:
[0024] Taking the current protocol identifier as a retrieval key, calling the target protocol set compatible with it from the protocol attribute mapping table;
[0025] Detecting the protocol compatibility, authentication consistency and encryption algorithm availability of the target protocol set one by one, and eliminating the protocols that do not meet the conditions;
[0026] Reading the historical reliability, handshake average delay, energy consumption overhead and link stability statistical values of the remaining protocols respectively, and assigning weight labels in turn;
[0027] According to the comprehensive weight from high to low, the remaining protocols are sorted to form a candidate protocol priority list;
[0028] And the sorting result is attached with the default port, packet format and available encryption method field of each protocol, and written into the priority buffer area for communication switching model calling.
[0029] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the protocol attribute mapping table includes:
[0030] Extract the protocol name, communication level, default port, message structure description and supported encryption algorithm;
[0031] Measure the average handshake delay, maximum payload, energy consumption overhead and link jitter tolerance by packet capture, and record the measurement results;
[0032] Write the extracted information and measurement results in the form of key-value pairs into the local database, and each record is associated with a unique protocol number;
[0033] Multi-level index is established for the local database to support fast query with protocol name and port number as retrieval keys;
[0034] Define a periodic synchronization mechanism to obtain newly added protocol packet description files from the alarm management platform every week, incrementally update the mapping table and generate a version number.
[0035] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the output target protocol and the corresponding decision confidence include:
[0036] Feature encoding is performed on the running state information using the communication switching model, and protocol attribute encoding is performed on the candidate protocol list;
[0037] The score vector of each candidate protocol is calculated by a double-layer adaptive deep policy network, and the long-term return is evaluated by a value network;
[0038] The score vector and the long-term return are weighted and fused to determine the protocol with the highest score as the target protocol;
[0039] According to the score difference of the candidate protocol and the historical decision stability, the decision confidence corresponding to the target protocol is output.
[0040] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the construction method of the communication switching model includes:
[0041] Collect triplets containing state, action and result as training samples and write them into an offline sample library in chronological order;
[0042] An offline pre-training is performed using a double-layer adaptive deep policy network to learn the mapping relationship between state and protocol selection;
[0043] The exploration rate and learning step of the policy network are dynamically adjusted by introducing a grey wolf colony search mechanism to improve the global search ability of the communication switching model;
[0044] The pre-trained model is loaded on the alarm terminal side, and online incremental learning is enabled to update the model parameters in real time in the experience cache priority sampling mode.
[0045] As a preferred scheme of the communication switching method for automatic adaptation of a multi-protocol alarm terminal, the preset threshold value specifically comprises:
[0046] The communication service level is divided into three levels of emergency alarm, high importance and general information, and the corresponding threshold values are set to 0.9, 0.85 and 0.8 respectively;
[0047] The threshold value parameter is saved in a configuration file that can be remotely updated, and the alarm terminal loads and takes effect in real time when starting;
[0048] The alarm terminal daily statistics communication switching model decision accuracy and alarm message on time delivery rate, if the decision accuracy is lower than the target value, the corresponding threshold value is automatically adjusted by 2 percentage points, if the on time delivery rate is lower than the target value, the corresponding threshold value is automatically adjusted by 2 percentage points;
[0049] The upper and lower limit interval of the threshold value is defined as 0.7 to 0.95, when the dynamic adjustment causes the threshold value to exceed the upper and lower limit interval, the alarm terminal stops automatic adjustment and sends a threshold value abnormal alarm to the management platform.
[0050] The beneficial effects of the present application: the present application realizes intelligent dynamic decision of multi-protocol communication switching based on double-layer adaptive deep strategy and grey wolf group search mechanism by intelligently sensing the terminal running state and network environment, can timely respond to network fluctuations, accurately control the protocol switching process, effectively guarantee the on time delivery of alarm information, reduce the terminal energy consumption and improve the communication link stability, thereby comprehensively improving the automatic adaptation capability and overall operation efficiency of the multi-protocol alarm terminal under complex network conditions. BRIEF DESCRIPTION OF DRAWINGS
[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. Among them:
[0052] Figure 1 The flowchart of the communication switching method for automatic adaptation of a multi-protocol alarm terminal. DETAILED DESCRIPTION
[0053] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present application, not all embodiments.
[0054] All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative labor shall fall within the scope of protection of the present application.
[0055] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application, but the present application can also be implemented in other manners different from those described herein, and those of ordinary skill in the art can make similar generalizations without departing from the spirit and scope of the present application, and therefore the present application is not limited to the specific embodiments disclosed below.
[0056] According to the embodiments of the present application, in combination with Figure 1 The flowchart shown is a communication switching method for automatic adaptation of a multi-protocol alarm terminal, which specifically comprises the following steps:
[0057] S1, the alarm terminal starts a multi-protocol identification module, automatically parses the signaling characteristics of the access network, obtains the protocol identifier currently used, simultaneously collects the link delay, packet loss rate, bandwidth utilization, jitter value and terminal residual power, and outputs the running state information. It should be noted that in this step:
[0058] Real-time link statistical data are obtained at the network interface layer of the alarm terminal, and the round-trip delay, packet loss rate, bandwidth utilization and jitter value are recorded respectively;
[0059] The residual power is read at the power management unit of the alarm terminal and converted into a percentage form;
[0060] The round-trip delay, packet loss rate, bandwidth utilization, jitter value and residual power are written into the state buffer according to a unified time stamp, and the sliding time window serial number is marked;
[0061] When the sliding time window ends, the data in the state buffer are integrated into a complete running state information and sent to the protocol mapping engine.
[0062] It should be noted that the integration method of the running state information specifically comprises:
[0063] All buffer entries in the current time window are read, and the sliding average method is used to calculate the window average value for the round-trip delay, packet loss rate, bandwidth utilization and jitter value;
[0064] The latest sampling value is used as the window representative value for the power field, and the low power identifier is retained;
[0065] The protocol field is de-duplicated, and if multiple protocol identifiers appear in the window, the one with the most occurrences is taken as the window protocol identifier and the switching times are recorded;
[0066] The running state information object containing the average link index, real-time power, window protocol identifier and abnormal marker is generated.
[0067] In an optional embodiment, the protocol identifier currently used is acquired, specifically comprising:
[0068] The handshake sequence of the access network is listened to, and the protocol field in the initial message header is analyzed;
[0069] The default port of the message is compared with the preset port list, and the protocol type is preliminarily determined;
[0070] The encryption negotiation information is extracted, and the protocol characteristic byte is combined for secondary confirmation;
[0071] When the protocol characteristics are not clear, a tentative handshake message is sent, and the return code is compared to finally determine the protocol identifier currently used.
[0072] As an example, the protocol field analysis method in the initial message header comprises:
[0073] The basic filtering is completed at the link layer, and only the first frame of the handshake stage data packet is reserved;
[0074] The first data segment (SEQ=0) of the TCP connection is listened to, and the first application layer data segment of the UDP is listened to;
[0075] The network layer: the IPv4 / IPv6 header is parsed, and the source address, destination address and protocol number are extracted;
[0076] The transport layer: the TCP / UDP header is read, and the destination port, flag bit and window size are extracted;
[0077] The application layer: for the TCP data segment, the first 32 bytes are read, and if there is an identifiable text starting symbol such as "GET / ", "INVITE sip:", "CONNECT", it is immediately marked as HTTP, SIP, MQTT candidate;
[0078] For the UDP data segment, the first byte token is checked, such as the "version-type-code" three fields of CoAP, the identification and flag bit of DNS, and the transaction identification code of Modbus;
[0079] The key starting symbol and protocol version byte obtained by parsing are the "protocol field", and a high-confidence label is generated locally.
[0080] As an example, the method for preliminarily determining the protocol type comprises:
[0081] The destination port is taken as a retrieval key to query the local port-protocol mapping table:
[0082] 5683→CoAP, 1883→MQTT, 5060 / 5061→SIP, 502→Modbus-TCP, 80→HTTP, 443→TLS encapsulation protocol (to be confirmed twice);
[0083] If the port is mapped to a unique protocol, generate the preliminary protocol type directly;
[0084] If the port is mapped to multiple protocols (e.g. 443 corresponds to HTTPS, MQTT over TLS, AMQP over TLS), set the multi-candidate flag;
[0085] By way of example, the protocol type list includes:
[0086] Explicit ports: CoAP, MQTT, SIP, Modbus-TCP, HTTP, DNS, FTP, and SNMP;
[0087] Multi-candidate ports: TLS (e.g. 443), custom IoT ports (e.g. 8883);
[0088] These ports will enter the secondary confirmation stage.
[0089] By way of example, the method of secondary confirmation in combination with protocol characteristic bytes includes:
[0090] Parsing the extension field of the TLS ClientHello data segment:
[0091] Reading the ALPN negotiation value, if the “mqtt”, “coap”, “amqp” string appears, it can be accurately confirmed;
[0092] Reading the host name rule in the SNI field, such as “iot.” “broker.” can prompt the actual protocol service;
[0093] For non-TLS custom encryption, parse the first frame fixed byte sequence, for example, the 0xABCD beginning identifier of some private UDP;
[0094] Compare the extracted application layer first field with the protocol feature library piece by piece:
[0095] The first byte of the MQTT CONNECT control message is 0x10;
[0096] The version number in the first 2 bytes of CoAP must be 1 and the code field must be less than 32;
[0097] The beginning of the SIP text is “REGISTER”, “INVITE”, “ACK”;
[0098] If the comparison is successful, only the matching protocol is retained as the unique candidate.
[0099] By way of example, the method of finally determining the current protocol identification includes:
[0100] When the secondary confirmation still exists ambiguity, the protocol-minimum load detection frame is sent from the alarm terminal to the destination host:
[0101] Send MQTT PINGREQ;
[0102] Send CoAP empty confirmation frame;
[0103] Send SIP OPTIONS;
[0104] Send Modbus-TCP diagnosis sub-function request;
[0105] Set a timeout timer and wait for a return:
[0106] If a legal response corresponding to the protocol (such as MQTT PINGRESP, CoAP ACK, SIP 200OK, Modbus diagnosis response) is received, the protocol is locked;
[0107] If there is no legal response, it is determined that it is a TLS-encapsulated private protocol, the final attribution is made according to the server certificate subject name, and the confirmation result is written into the state buffer protocol field.
[0108] Preferably, this step can timely and accurately master the current network status and terminal state through comprehensive real-time sensing and analysis of the terminal itself and the network environment, facilitate accurate formulation of subsequent switching decision, and thus improve the real-time and reliability of communication switching decision.
[0109] S2, call the protocol mapping engine, compare the protocol identifier with the target protocol set according to the established protocol attribute mapping table, obtain a candidate protocol priority list, and record the default port, message format and encryption method of each candidate protocol. It should be noted that this step is:
[0110] Take the current protocol identifier as a retrieval key, and call the compatible target protocol set from the protocol attribute mapping table;
[0111] Detect the protocol compatibility, authentication consistency and encryption algorithm availability of the target protocol set one by one, and eliminate the protocols that do not meet the conditions;
[0112] Read the historical reliability, handshake average delay, energy consumption overhead and link stability statistical values of the remaining protocols respectively, and assign weight labels in turn;
[0113] According to the comprehensive weight from high to low, the remaining protocols are sorted to form a candidate protocol priority list;
[0114] And the sorting result is attached with the default port, message format and available encryption method field of each protocol, and written into the priority buffer area for communication switching model to call.
[0115] In an optional embodiment, the protocol attribute mapping table comprises:
[0116] extracting the protocol name, communication level, default port, message structure description and supported encryption algorithm;
[0117] measuring the average handshake delay, maximum payload, energy consumption overhead and link jitter tolerance by packet capture, and recording the measurement results;
[0118] writing the extracted information and measurement results in the form of key-value pairs into the local database, and each record is associated with a unique protocol number;
[0119] establishing a multi-level index on the local database to support fast query with protocol name and port number as retrieval keys;
[0120] Defining a periodic synchronization mechanism to obtain newly added protocol packet description files from the alarm management platform every week, incrementally updating the mapping table and generating a version number.
[0121] Preferably, this step can accurately filter and sort candidate protocols, so that the terminal can clearly understand the performance differences and application scenarios of each protocol, thereby more efficiently selecting the best communication method, effectively avoiding the blindness of communication protocol selection, and improving protocol switching adaptability and execution efficiency.
[0122] S3, input the running state information and candidate protocol priority list into the communication switching model based on the double-layer adaptive deep strategy and combined with the gray wolf group search mechanism, the communication switching model takes alarm on-time delivery as the priority, energy consumption as the second priority, and link stability as the optimal target, and outputs the target protocol and the corresponding decision confidence. Among them, it needs to be explained that:
[0123] S3.1, when the decision confidence is greater than the preset threshold and the target protocol is different from the currently used protocol, the alarm terminal performs handshake verification, establishes a secure encryption channel, and enables double-channel mirror sending according to the priority order, completes the protocol switching without interrupting the business;
[0124] S3.2, when the decision confidence is less than or equal to the preset threshold, the alarm terminal maintains the currently used protocol for message transmission, and starts a sliding window counter to monitor the confidence. If the confidence monitored in the last 5 times still does not exceed the preset threshold, the alarm terminal selects the next protocol according to the candidate protocol priority list, re-calls the communication switching model for calculation, and decides whether to perform seamless switching according to the calculation result.
[0125] It should be noted that the output target protocol and the corresponding decision confidence include:
[0126] Using the communication switching model to encode the running state information and encode the protocol attributes of the candidate protocol list;
[0127] The score vector of each candidate protocol is calculated by a double-layer adaptive deep policy network, and the long-term return is evaluated by a value network;
[0128] The score vector and the long-term return are weighted and fused to determine the target protocol with the highest score;
[0129] According to the score gap of the candidate protocol and the historical decision stability, the decision confidence corresponding to the target protocol is output.
[0130] Further, the method for constructing the communication switching model comprises:
[0131] Collecting triplets containing states, actions and results as training samples and writing them into an offline sample library in chronological order;
[0132] Using a double-layer adaptive deep policy network for offline pre-training to learn the mapping relationship between states and protocol selection;
[0133] Introducing a grey wolf colony search mechanism to dynamically adjust the exploration rate and learning step of the policy network, thereby improving the global search ability of the communication switching model;
[0134] Loading the pre-trained model on the alarm terminal side and enabling online incremental learning to update the model parameters in real time in the experience cache priority sampling manner.
[0135] Further, the preset threshold value specifically comprises:
[0136] The communication service level is divided into three levels of emergency alarm, high importance and general information, and the corresponding threshold values are set to 0.9, 0.85 and 0.8;
[0137] The threshold parameter is saved in a configuration file that can be remotely updated, and the alarm terminal loads and takes effect in real time when starting;
[0138] The alarm terminal daily statistics communication switching model decision accuracy and alarm message on time delivery rate, if the decision accuracy is lower than the target value, then automatically reduce the corresponding threshold value by 2 percentage points, if the on time delivery rate is lower than the target value, then automatically increase the corresponding threshold value by 2 percentage points;
[0139] The upper and lower limit interval of the threshold value is defined as 0.7 to 0.95, and when the dynamic adjustment causes the threshold value to exceed the upper and lower limit interval, the alarm terminal stops automatic adjustment and sends a threshold value abnormal alarm to the management platform.
[0140] As an example, the communication switching model constructed in the embodiment is used to output the decision confidence corresponding to the target protocol, and by comparing with the preset threshold value, the corresponding process steps are executed, and the mathematical expression formula is as follows:
[0141]
[0142] Θ(B) = 0.90ω {B=E} + 0.85ω {B=H} + 0.80ω {B=G}
[0143]
[0144] where s(t) is the state vector at time t, containing the delay, packet loss rate, bandwidth utilization, jitter value and remaining power, p j is the jth candidate protocol attribute vector, containing the default port, message format, encryption method and historical reliability, σ k (s(t)) is the adaptive regularization weight of the kth state feature, η jk (p j ) is the mapping coefficient of the jth protocol in the kth attribute, λ is the time reduction factor, β k is the grey wolf search self-updating coefficient, τ is the decision window length, K is the state attribute coupling dimension, N is the number of candidate protocols, i ★ is the index of the protocol with the highest comprehensive score, i.e. the target protocol, Γ is the target protocol decision confidence, B is the communication service level label, containing emergency alarm E, high importance H and general information G, ω {·} is the indicator function, taking 1 if the condition is met and 0 otherwise, Θ(B) is the threshold dynamically mapped with the service level, corresponding to 0.90 for emergency alarm, 0.85 for high importance and 0.80 for general information.
[0145] When Γ > Θ(B), seamless switching is triggered (step S3.1), otherwise the current used protocol continues to be monitored (step S3.2).
[0146] It is not difficult to understand that through step S3.1, the rapid response and reliable guarantee of the protocol switching process are achieved, significantly reducing the risk of service interruption caused by switching, ensuring the continuous and reliable transmission of alarm information, and improving the stability and real-time security of the protocol switching process;
[0147] Through step S3.2, strict control and conditional execution of protocol switching decision are achieved, avoiding the problem of frequent protocol switching caused by blind switching at low confidence, effectively improving the stability and resource utilization efficiency of system operation, and improving the prudence and accuracy of protocol switching decision.
[0148] Preferably, the method provided by the embodiment has the advantages that the method is capable of outputting a target protocol and a corresponding decision confidence by inputting running state information and a candidate protocol priority list into a communication switching model, with the goal of timely delivery of alarm information, low energy consumption, and optimal link stability, and realizes intelligent dynamic decision of protocol selection, combines real-time data and historical experience, takes into account the timeliness requirement of alarm services and the energy consumption management requirement of the terminal itself, effectively improves the stability of the communication link, and achieves the beneficial effects of multi-objective comprehensive optimization decision.
[0149] The foregoing method about handshake verification, secure encrypted channel establishment, and enabling dual-channel mirror transmission can be implemented by means in the prior art, and will not be described in detail in the present embodiment.
[0150] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and all of them should be covered in the scope of the claims of the present application.
Claims
1. A communication switching method for automatic adaptation of a multi-protocol alarm terminal, characterized in that: include: The alarm terminal activates the multi-protocol identification module, automatically analyzes the signaling characteristics of the access network, obtains the currently used protocol identifier, and simultaneously collects link delay, packet loss rate, bandwidth utilization, jitter value and terminal remaining power, and outputs operating status information; Calling the protocol mapping engine, comparing the protocol identifier with the target protocol set according to the established protocol attribute mapping table, obtaining a priority list of candidate protocols, and recording the default port, message format, and encryption method of each candidate protocol; The operation status information and the candidate protocol priority list are input into a communication switching model based on a two-layer adaptive depth strategy and integrated with a gray wolf group search mechanism. The communication switching model prioritizes timely alarm delivery, low energy consumption, and optimal link stability, and outputs a target protocol and a corresponding decision confidence; wherein: When the decision confidence is greater than a preset threshold and the target protocol is different from the currently used protocol, the alarm terminal performs handshake verification, establishes a secure encryption channel, and enables dual-channel mirroring according to the priority order to complete the protocol switch without service interruption; When the decision confidence is ≤ the preset threshold, the alarm terminal maintains the currently used protocol to continue message transmission and starts the sliding window counter to monitor the confidence. If the confidence monitored within 5 consecutive times still does not exceed the preset threshold, the alarm terminal selects the next protocol according to the candidate protocol priority list, re-calls the communication switching model for calculation and decides whether to perform seamless switching based on the calculation results.
2. The communication switching method for automatic adaptation of a multi-protocol alarm terminal according to claim 1, characterized in that: The output operation status information includes: Obtain real-time link statistics at the alarm terminal network interface layer, recording round-trip delay, packet loss rate, bandwidth utilization, and jitter values; The power management unit of the alarm terminal reads the remaining power and converts it into percentage; The round-trip delay, packet loss rate, bandwidth utilization, jitter value and remaining power are written into the status buffer according to a unified timestamp and marked with a sliding time window number; When the sliding time window ends, the data in the status buffer is integrated into a complete operation status information and sent to the protocol mapping engine.
3. The communication switching method for automatic adaptation of a multi-protocol alarm terminal according to claim 1 or 2, characterized in that: Get the currently used protocol identifier, including: Monitor the handshake sequence of the access network and analyze the protocol field in the initial message header; Compare the default port of the message with the preset port list to preliminarily determine the protocol type; Extract the encrypted negotiation information and perform secondary confirmation based on the protocol feature bytes; When the protocol characteristics are unclear, a tentative handshake message is sent and the return code is compared to finally determine the currently used protocol identifier.
4. The communication switching method for automatic adaptation of a multi-protocol alarm terminal according to claim 1 or 2, characterized in that: The obtained candidate protocol priority list includes: Using the current protocol identifier as the search key, retrieve the target protocol set compatible with it from the protocol attribute mapping table; Check the protocol compatibility, authentication method consistency and encryption algorithm availability of the target protocol set one by one, and eliminate the protocols that do not meet the conditions; For the remaining protocols, the historical reliability, average handshake delay, energy consumption, and link stability statistics are read respectively, and weight labels are assigned in turn; Sort the remaining protocols from high to low according to their comprehensive weights to form a priority list of candidate protocols; The default port, message format and available encryption method fields of each protocol are added to the sorting results, and written into the priority buffer for the communication switching model to call.
5. The communication switching method for automatic adaptation of multi-protocol alarm terminals according to claim 4, characterized in that: The protocol attribute mapping table includes: Extract the protocol name, communication layer, default port, message structure description and supported encryption algorithms; Measure the average handshake delay, maximum payload, energy consumption, and link jitter tolerance by capturing packets, and record the measurement results. The extracted information and measurement results are written to the local database in the form of key-value pairs, with each record associated with a unique protocol number; Establishing a multi-level index for the local database to support quick query using protocol name and port number as search keys; Define a periodic synchronization mechanism to obtain newly added protocol data packet description files from the alarm management platform on a weekly basis, incrementally update the mapping table and generate a version number.
6. The communication switching method for automatic adaptation of multi-protocol alarm terminals according to claim 1, characterized in that: The output target protocol and the corresponding decision confidence include: Using the communication switching model to perform feature encoding on the operation status information, and performing protocol attribute encoding on the candidate protocol list; The scoring vector of each candidate protocol is calculated through a two-layer adaptive deep strategy network, and the long-term benefits are evaluated by the value network; The scoring vector is weightedly integrated with the long-term benefits to determine the protocol with the highest score as the target protocol; Then, based on the score gap between the candidate protocols and the historical decision stability, the decision confidence corresponding to the target protocol is output.
7. The communication switching method for automatic adaptation of a multi-protocol alarm terminal according to claim 1 or 6, characterized in that: The method for constructing the communication switching model includes: Collect triplets containing state, action, and result as training samples and write them into the offline sample library in chronological order; A two-layer adaptive deep policy network is used for offline pre-training to learn the mapping relationship between state and protocol selection; A gray wolf group search mechanism is introduced to dynamically adjust the exploration rate and learning step size of the strategy network, improving the global search capability of the communication switching model; The pre-trained model is loaded on the alarm terminal side, and online incremental learning is enabled to update the model parameters in real time using the experience cache priority sampling method.
8. The communication switching method for automatic adaptation of multi-protocol alarm terminals according to claim 1, characterized in that: The preset threshold specifically includes: The communication service level is divided into three levels: emergency alarm, high-level important and general information, and the corresponding thresholds are set at 0.9, 0.85 and 0.8 respectively; The threshold parameters are saved in a remotely updateable configuration file, which is loaded when the alarm terminal is started and takes effect in real time; The alarm terminal collects statistics on the decision accuracy of the communication switching model and the on-time delivery rate of the alarm message every day. If the decision accuracy is lower than the target value, the corresponding threshold is automatically lowered by 2 percentage points. If the on-time delivery rate is lower than the target value, the corresponding threshold is automatically raised by 2 percentage points. The upper and lower limits of the threshold are defined as 0.7 to 0.
95. When the dynamic adjustment causes the threshold to exceed the upper and lower limits, the alarm terminal stops automatic adjustment and sends a threshold abnormality alarm to the management platform.
Citation Information
Patent Citations
Industrial communication protocol test case priority ranking method based on multiple targets
CN114448911A
Automatic network switching method and system for terminal
CN118158750A
A communication protocol intelligent switching method and system for omni-channel contact center
CN119788751A
Lightweight Internet of Things management system based on star flash protocol stack
CN120223503A
System and method for cyber exploitation path analysis and response using federated networks
WO2025024615A2
Cited By
Primary and secondary fusion type pole-mounted switch intelligent terminal
CN121395719A
Fire fighting system intelligent management method and device based on intelligent property management
CN121456283A
Memory synchronous storage management method and device, equipment and storage medium
CN121901239A
An internet of things platform system supporting multi-protocol adaptation
CN122420426A