An alarm gateway special route switching method, device and computer equipment

By introducing network detection, routing decision, and switching execution modules into the alarm gateway, network connectivity is detected according to the principle of lowest cost, and anti-oscillation logic is executed. This solves the problems of slow routing switching speed and resource waste in traditional alarm gateways, realizes rapid response and cost optimization, and ensures stable transmission of alarm information.

CN122348919APending Publication Date: 2026-07-07HANGZHOU ROOMBANKER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU ROOMBANKER TECH CO LTD
Filing Date
2026-03-25
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Traditional alarm gateways lack dynamic routing switching mechanisms, resulting in poor network connection stability, slow switching speed, and impact on the real-time performance and reliability of alarm information. Furthermore, the automatic switching method cannot be adjusted according to the actual network conditions, which may lead to resource waste and excessive costs.

Method used

The network detection module sequentially probes wired, Wi-Fi, and 4G network connectivity according to the lowest cost principle. The routing decision module analyzes the detection response and processes the data. The switching execution module executes route changes. Through the cooperation of shared state information and event triggering mechanism, anti-oscillation logic is executed to achieve fast response and cost optimization.

Benefits of technology

It enables rapid response and cost optimization of alarm gateway routing, ensures accurate and fast transmission of alarm information, and improves network connection stability and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122348919A_ABST
    Figure CN122348919A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent hardware, and discloses an alarm gateway special-purpose route switching method and device and computer equipment, wherein a network detection module sequentially detects the connectivity of a wired network, a wifi network and a 4G network according to the lowest cost principle, a route decision module analyzes detection responses to perform data and signal processing, a switching execution module executes route change according to the analysis result, and each module shares state information and an event triggering mechanism to achieve the effects of rapid response and cost optimization, and the anti-oscillation logic is executed in the network switching process, frequent switching is avoided, and the stability of network connection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart hardware technology, and in particular to a method, apparatus, and computer device for dedicated route switching for alarm gateways. Background Technology

[0002] Alarm and security gateways are typically equipped with multiple network interfaces, such as wired, WiFi, and 4G. However, traditional operating systems lack dynamic routing switching mechanisms, resulting in slow switching speeds and low accuracy, which affects the real-time performance and reliability of alarm information transmission.

[0003] Data shows that traditional alarm gateway network connections typically employ a single network connection method, such as using only a wired network or relying solely on a Wi-Fi network. When this single network fails or its signal is unstable, the alarm gateway may lose its network connection, resulting in the inability to transmit alarm information in a timely manner. Some systems use manual network switching, requiring manual intervention after a network failure is detected. This method is not only inefficient but may also fail to respond promptly in emergencies. Furthermore, while some systems possess automatic network switching capabilities, they lack effective network detection and decision-making mechanisms, failing to intelligently switch based on the actual network conditions.

[0004] The shortcomings of existing technologies lie in the poor stability of single network connections, which are prone to interruption of alarm information transmission due to network failures. Manual network switching is inefficient and cannot meet real-time requirements. Automatic switching methods, lacking intelligent network detection and decision-making mechanisms, cannot rationally switch based on actual network costs and connectivity, potentially leading to resource waste and excessive costs. Summary of the Invention

[0005] This invention primarily addresses the technical problem that existing technical solutions cannot rationally switch networks based on actual costs and connectivity, resulting in resource waste. It provides a dedicated route switching method, device, and computer equipment for alarm gateways. The network detection module sequentially probes wired, Wi-Fi, and 4G networks according to the lowest cost principle. The route decision module analyzes the detection responses and performs data and signal processing. The switching execution module executes route changes based on the analysis results. All modules share status information and cooperate through event triggering mechanisms, and anti-oscillation logic is implemented during the switching process, achieving rapid response and cost optimization.

[0006] The above-mentioned technical problems of the present invention are mainly solved by the following technical solutions: A method, apparatus, and computer device for dedicated route switching of an alarm gateway, comprising the following steps: S1. Configure gateway routing and initialize network priority list; S2. The network detection module starts a timed detection thread to perform connectivity detection sequentially from wired network, Wi-Fi network, and 4G network according to the principle of lowest cost; S3. The routing decision module analyzes the detection response to perform data processing and signal processing; S4. The switching execution module performs route change based on the analyzed detection response.

[0007] By adopting the above technical solution, gateway routing configuration and network priority list initialization can be completed. The connectivity of wired, Wi-Fi, and 4G networks can be detected with the lowest cost principle. Data and signal processing is performed by the routing decision module, and the routing change is executed by the switching execution module to realize the switching of the dedicated route of the alarm gateway.

[0008] Preferably, after the initialization of step S1 is completed, the network priority list defaults to wired networks.

[0009] By adopting the above technical solution, gateway routing is configured and the network priority list is initialized. After initialization, the network priority list defaults to wired network, which can be used first during route switching. This fully utilizes the advantages of wired network in terms of stability and low cost, providing a foundation for subsequent network connectivity detection and route switching, and ensuring the efficiency and stability of alarm gateway route switching.

[0010] Preferably, following the principle of lowest cost, the connectivity of the network is detected sequentially from wired network, Wi-Fi network, and 4G network, and after the switch is completed, the connectivity of each network interface is continuously detected in the order of wired network, Wi-Fi network, and 4G network.

[0011] Preferably, when a high-priority network is unavailable, it automatically switches to a low-priority network, and vice versa when the high-priority network is restored, in order to achieve fast response and cost optimization.

[0012] By adopting the above technical solution, the connectivity of wired network, Wi-Fi network and 4G network are detected in sequence according to the principle of lowest cost. After the switch is completed, the connectivity of each network interface is continuously detected in a loop, so as to keep track of the status of each network in a timely manner. When a high-priority network is unavailable, it automatically switches to a low-priority network and switches back when the high-priority network is restored, so as to achieve a fast response. At the same time, the low-cost high-priority network is given priority, so as to achieve the effect of cost optimization.

[0013] Preferably, step S3 specifically includes the following: the data processing involves the collection, comparison and decision-making logic of network status data, and the signal processing achieves seamless switching through kernel routing table operations.

[0014] By adopting the above technical solutions, collecting, comparing, and processing network status data, and performing signal processing through kernel routing table operations, seamless switching during alarm gateway routing can be achieved.

[0015] Preferably, the network detection module, routing decision module, and switching execution module share state information and cooperate with an event triggering mechanism, exchanging data through a message queue. The network detection module sends the detection results to the routing decision module, which generates a switching instruction, and the switching execution module modifies the system routing rules.

[0016] By adopting the above technical solution, the network detection module, routing decision module, and switching execution module share status information and cooperate through an event triggering mechanism. They exchange data using a message queue, enabling efficient collaboration among the modules. The network detection module accurately transmits the detection results to the routing decision module, which can generate switching instructions in a timely manner. The switching execution module then modifies the system routing rules to achieve orderly switching of the alarm gateway route.

[0017] Preferably, anti-oscillation logic is executed during the switching process between the wired network, Wi-Fi network, and 4G network. The anti-oscillation logic specifically includes setting a threshold for the number of successful detections based on the current network and the network to be switched to. When switching from the 4G network to the wired network or Wi-Fi network, the target network to be switched to is required to successfully detect n times consecutively. When switching between the wired network and the Wi-Fi network, the target network to be switched to is required to successfully detect 2n times consecutively. When switching from the wired network or Wi-Fi network to the 4G network, a single successful detection is sufficient.

[0018] By adopting the above technical solution, when switching the dedicated route of the alarm gateway, anti-oscillation logic is implemented for the switching between wired network, Wi-Fi network, and 4G network. The threshold of the number of successful detections is set according to the current network and the network to be switched. When switching from 4G network to wired network or Wi-Fi network, the target network to be switched is required to have n consecutive successful detections. When switching between wired network and Wi-Fi network, the target network to be switched is required to have 2n consecutive successful detections. When switching from wired network or Wi-Fi network to 4G network, a single successful detection is sufficient. This can avoid frequent network switching and ensure the stability and reliability of the network.

[0019] A working system for a dedicated routing switching method for alarm gateways includes an intelligent routing switching system. The intelligent routing switching system takes into account the external network status and configures a network priority list. The output of the intelligent routing switching system is connected to the kernel routing table and forwards data packets. The external network status includes reachability feedback.

[0020] By adopting the above technical solution, functions such as gateway routing configuration, network connectivity detection, data and signal processing, and route change execution can be realized. The wired network is preferred by default, and the connectivity of each network interface is continuously and cyclically detected according to the principle of lowest cost. Automatic switching between high-priority and low-priority networks is achieved to achieve rapid response and cost optimization. Data processing involves the collection, comparison, and decision-making logic of network status data. Signal processing can achieve seamless switching. Modules cooperate to complete route switching through shared status information, event triggering mechanisms, and message queues. Anti-oscillation logic can also be executed during network switching. At the same time, the working system inputs the external network status and configures the network priority list through the intelligent route switching system. The output end connects to the kernel routing table and forwards data packets, and realizes the route switching function by utilizing the reachability feedback of the external network.

[0021] Preferably, the intelligent routing switching system includes: a network detection module, which receives external network status and publishes network status messages; a routing decision module, which configures a network priority list and outputs subscribed network status messages and published switching instruction messages; a switching execution module, which subscribes to switching instruction messages and updates the kernel routing table; and a message queue / event bus, which receives network messages and instruction messages.

[0022] By adopting the above technical solution, the network detection module receives external network status and publishes messages, enabling timely acquisition of network status; the routing decision module configures a priority list and outputs instructions based on network status messages, allowing for routing decisions based on priority; the switching execution module updates the kernel routing table according to instructions, realizing route switching; and the message queue / event bus receives network and instruction messages, ensuring data exchange between modules and jointly realizing intelligent switching of the dedicated route for the alarm gateway.

[0023] A computer device comprising: One or more processors; memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors.

[0024] By adopting the above technical solution, gateway routing configuration and network priority list initialization can be achieved. Connectivity detection of wired, Wi-Fi, and 4G networks is performed according to the lowest cost principle. The detection response is analyzed to complete data and signal processing, and route changes are executed. The network priority list defaults to wired networks, and after switching, it continuously probes the connectivity of each network interface in a loop. When a high-priority network becomes unavailable, it automatically switches to a low-priority network and switches back upon recovery to achieve rapid response and cost optimization. Data processing involves the collection, comparison, and decision-making logic of network status data, while signal processing achieves seamless switching through kernel routing table operations. The network detection, routing decision, and switching execution modules work together by exchanging data through a message queue. Anti-oscillation logic is executed during network switching, and different thresholds for the number of successful detections are set for different network switching scenarios.

[0025] The beneficial effects of this invention are: 1. Connectivity is sequentially and cyclically probed via wired, Wi-Fi, and 4G networks according to the lowest cost principle, switching between them as needed to optimize pricing. 2. Automatic switching to a low-priority network occurs when a high-priority network is unavailable, and switching back when the high-priority network recovers, achieving rapid response and cost optimization. 3. Data processing involves the collection, comparison, and decision-making logic of network status data. Signal processing achieves seamless switching through kernel routing table operations, ensuring accurate and rapid transmission of alarm information. 4. The network detection, routing decision, and switching execution modules share status information and cooperate with event triggering mechanisms, exchanging data through message queues for efficient route switching. 5. Anti-oscillation logic is executed during network switching to avoid frequent switching and improve network connection stability. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of the connection structure of the present invention.

[0027] Figure 2 This is a flowchart of a loop detection and switching gateway according to the present invention. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this application will be further described in detail below through embodiments and in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only one preferred embodiment of this application and are only used to explain this application. They do not limit the scope of protection of this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0029] The technical solution of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.

[0030] Example 1: A dedicated route switching method for an alarm gateway in this example, such as... Figure 1 , Figure 2 As shown, it includes the following steps: S1. Configure gateway routing and initialize the network priority list. After initialization, the network priority list will preferentially select wired networks by default.

[0031] Configure gateway routing and initialize the network priority list. After initialization, the network priority list will prioritize wired networks by default, allowing wired networks to be used first during route switching. This fully leverages the stability and low cost of wired networks, providing a foundation for subsequent network connectivity detection and route switching, and ensuring the efficiency and stability of alarm gateway route switching.

[0032] S2. The network detection module starts a timed detection thread, and according to the principle of lowest cost, completes the connectivity detection of wired network, Wi-Fi network, and 4G network in sequence. After the switch is completed, it continuously and cyclically detects the connectivity of each network interface in the order of wired network, Wi-Fi network, and 4G network.

[0033] When a high-priority network becomes unavailable, the system automatically switches to a low-priority network; conversely, it switches back when the high-priority network becomes available, thus achieving rapid response and cost optimization.

[0034] Following the principle of lowest cost, the system sequentially probes the connectivity of wired, Wi-Fi, and 4G networks. After a switch is completed, it continuously probes the connectivity of each network interface to keep track of the status of each network in a timely manner. When a high-priority network becomes unavailable, it automatically switches to a low-priority network and switches back when the high-priority network recovers, enabling a rapid response. At the same time, it prioritizes the use of the low-cost high-priority network to achieve the effect of cost optimization.

[0035] S3. The routing decision module analyzes and detects responses to implement data and signal processing. Specifically, data processing involves the collection, comparison, and decision-making logic of network status data, while signal processing achieves seamless switching through kernel routing table operations. By collecting, comparing, and processing network status data, and performing decision-making logic, as well as signal processing through kernel routing table operations, seamless switching can be achieved during alarm gateway routing changes. The network detection module, routing decision module, and handover execution module share status information and cooperate through an event-triggered mechanism. The network detection module sends its detection results to the routing decision module, which generates a handover command. The handover execution module then modifies the system routing rules. By sharing status information and cooperating through an event-triggered mechanism, and using a message queue for data exchange, these modules can collaborate efficiently. The network detection module accurately conveys its detection results to the routing decision module, which promptly generates a handover command. The handover execution module then modifies the system routing rules, achieving an orderly handover of the alarm gateway route.

[0036] S4. The switching execution module performs route changes based on the analysis and detection response.

[0037] During the handover process between wired networks, Wi-Fi networks, and 4G networks, anti-oscillation logic is executed. Specifically, the anti-oscillation logic includes setting a threshold for the number of successful detections based on the current network and the network to be switched to. When switching from a 4G network to a wired network or a Wi-Fi network, the target network to be switched to is required to successfully detect n times consecutively. When switching between a wired network and a Wi-Fi network, the target network to be switched to is required to successfully detect 2n times consecutively. When switching from a wired network or a Wi-Fi network to a 4G network, a successful detection is sufficient.

[0038] When switching dedicated routes in the alarm gateway, anti-oscillation logic is implemented for switching between wired networks, Wi-Fi networks, and 4G networks. A threshold for the number of successful detections is set based on the current network and the network to be switched. When switching from a 4G network to a wired or Wi-Fi network, the target network to be switched requires n consecutive successful detections. When switching between a wired and Wi-Fi network, the target network to be switched requires 2n consecutive successful detections. When switching from a wired or Wi-Fi network to a 4G network, a single successful detection is sufficient. This avoids frequent network switching and ensures network stability and reliability.

[0039] A working system for a dedicated routing switching method for alarm gateways includes an intelligent routing switching system. The intelligent routing switching system takes into account the external network status and configures a network priority list. The output of the intelligent routing switching system is connected to the kernel routing table and forwards data packets. The external network status includes reachability feedback.

[0040] By adopting the above technical solution, functions such as gateway routing configuration, network connectivity detection, data and signal processing, and route change execution can be realized. The wired network is preferred by default, and the connectivity of each network interface is continuously and cyclically detected according to the principle of lowest cost. Automatic switching between high-priority and low-priority networks is achieved to achieve rapid response and cost optimization. Data processing involves the collection, comparison, and decision-making logic of network status data. Signal processing can achieve seamless switching. Modules cooperate to complete route switching through shared status information, event triggering mechanisms, and message queues. Anti-oscillation logic can also be executed during network switching. At the same time, the working system inputs the external network status and configures the network priority list through the intelligent route switching system. The output end connects to the kernel routing table and forwards data packets, and realizes the route switching function by utilizing the reachability feedback of the external network.

[0041] The intelligent routing switching system includes: The network detection module receives external network status information and publishes network status messages. The routing decision module configures a network priority list and outputs subscribed network status messages and publishes switching instruction messages. Switch the execution module, subscribe to the switch instruction message, and update the kernel routing table; The message queue / event bus receives network messages and command messages.

[0042] The network detection module receives external network status and publishes messages, enabling timely acquisition of network status; the routing decision module configures a priority list and outputs instructions based on network status messages, allowing for routing decisions based on priority; the switching execution module updates the kernel routing table according to instructions, achieving route switching; the message queue / event bus receives network and instruction messages, ensuring data exchange between modules and jointly realizing intelligent switching of the dedicated route for the alarm gateway.

[0043] A computer device comprising: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors.

[0044] It can configure gateway routing and initialize network priority lists. It performs connectivity probes on wired, Wi-Fi, and 4G networks according to the lowest cost principle, analyzes the probe responses to complete data and signal processing, and executes route changes. The network priority list defaults to wired networks, and after switching, it continuously probes the connectivity of each network interface in a loop. When a high-priority network becomes unavailable, it automatically switches to a low-priority network and switches back upon recovery to achieve rapid response and cost optimization. Data processing involves the collection, comparison, and decision-making logic of network status data, while signal processing achieves seamless switching through kernel routing table operations. The network probe, routing decision, and switching execution modules work together by exchanging data through a message queue. Anti-oscillation logic is executed during network switching, and different thresholds for the number of successful probes are set for different network switching scenarios. Example

[0045] An intelligent routing switching method, based on the principle of minimum cost, sequentially performs connectivity detection from wired network, Wi-Fi network, and 4G network. Upon detecting a network outage, the high-priority network directly switches to a low-priority network, or vice versa, enabling rapid network detection and stable routing switching, thus improving the network adaptability and communication stability of the alarm gateway.

[0046] A smart routing switching method is proposed. The system consists of a network detection module, a routing decision module, and a switching execution module. The modules exchange data through a message queue.

[0047] The network detection module periodically sends TCP connection requests to the alarm gateway server to detect the current routing status; The routing decision module determines whether to switch routes based on the probe results and network priority; The switching execution module is responsible for updating the actual routing table.

[0048] The working principle involves cyclically probing the connectivity of each network interface. When a high-priority network becomes unavailable, it automatically switches to a low-priority network; conversely, it switches back when the high-priority network recovers, achieving rapid response and cost optimization. Each module works in concert through shared status information and an event-triggered mechanism. The network probing module sends its results to the routing decision module, which generates a switching command. The switching execution module then modifies the system routing rules. The processing flow includes initializing the network priority list, starting a timed probing thread, analyzing the probing response, and executing route changes. Data processing involves the collection, comparison, and decision-making logic of network status data. Signal processing achieves seamless switching through kernel routing table operations. This method minimizes the probing interval and prioritizes performance to ensure low switching latency. Example

[0049] The alarm gateway dedicated route switching method provided in this application includes steps such as gateway route configuration, initializing a network priority list, network detection, route decision-making, and switching execution. Specifically, the network detection module periodically probes network connectivity, the route decision-making module analyzes the detection response, and the switching execution module performs route changes based on the analysis results. This achieves intelligent route switching based on actual network conditions, ensuring stable transmission of alarm information. This is because by periodically probing and analyzing the connectivity of different networks, network faults can be detected promptly, and switching to an available network can be initiated.

[0050] Specifically, the gateway routing configuration and network priority list initialization steps include setting the gateway's routes and determining the priority order of different networks. After initialization, the network priority list defaults to wired networks because wired networks typically offer higher stability and lower cost. Gateway routing configuration can be performed using existing network configuration tools, while network priority list initialization can be implemented through software programming.

[0051] The network detection module initiates a timed detection thread, sequentially probing the connectivity of wired, Wi-Fi, and 4G networks according to the principle of minimum cost. The network detection module can use network detection tools, such as the ping command, to test network connectivity. It can be a standalone hardware device or a software module integrated into the gateway. After a switchover, it will continuously and cyclically probe the connectivity of each network interface in the order of wired, Wi-Fi, and 4G networks to promptly detect changes in network status.

[0052] When performing network connectivity checks using the network detection module, in addition to the ping command, the traceroute command can be used to obtain more detailed information about the network path and latency. The traceroute command can display the routing nodes that data packets pass through from the source host to the destination host, helping us to better analyze the location of network faults. The network detection module can select the appropriate detection command based on different network environments and needs.

[0053] The implementation principle is as follows: by adding the traceroute command for network detection, a more comprehensive understanding of the network status can be obtained, providing more accurate information for routing decisions, further improving the accuracy and stability of network switching, and enhancing the adaptability of the alarm gateway to different network environments.

[0054] The routing decision module analyzes probe responses to perform data and signal processing. Data processing involves collecting, comparing, and making decisions about network status data, such as collecting connectivity and signal strength data from various networks, comparing them, and then deciding whether to switch networks based on preset rules. Signal processing achieves seamless switching through kernel routing table operations. When a network switch is needed, the routing decision module modifies the kernel routing table accordingly to ensure that data packets can be correctly transmitted through the new network. The routing decision module can be a chip or software program with data processing and analysis capabilities. The switching execution module executes route changes based on the analyzed probe responses. When the routing decision module determines that a network switch is needed, the switching execution module modifies the system routing rules according to instructions, switching the data packet transmission path to the new network. The switching execution module can implement route changes by interacting with the kernel routing table.

[0055] The network detection module, routing decision module, and handover execution module share state information and cooperate through an event triggering mechanism, exchanging data via a message queue. The network detection module sends its detection results to the routing decision module, which generates a handover command, and the handover execution module modifies the system routing rules. This cooperative approach improves the system's response speed and stability, ensuring timely and accurate information transmission between modules.

[0056] When a high-priority network becomes unavailable, the system automatically switches to a low-priority network; conversely, it switches back to the high-priority network when it becomes available again, achieving rapid response and cost optimization. For example, when a wired network fails, the system automatically switches to a Wi-Fi or 4G network; when the wired network is restored, the system automatically switches back to the wired network. This ensures timely transmission of alarm information while avoiding the use of high-cost networks.

[0057] Anti-oscillation logic is implemented during handover between wired, Wi-Fi, and 4G networks. A threshold for the number of successful detections is set based on the current network and the network to be switched to. When switching from a 4G network to a wired or Wi-Fi network, the target network is required to successfully detect the network n times consecutively. When switching between a wired and Wi-Fi network, the target network is required to successfully detect the network 2n times consecutively. When switching from a wired or Wi-Fi network to a 4G network, a single successful detection is sufficient. This anti-oscillation logic avoids frequent network switching within a short period, improving system stability.

[0058] The implementation principle of this embodiment is as follows: This method periodically detects and analyzes the connectivity of different networks, and intelligently switches routes according to the actual network conditions, avoiding the instability of a single network connection method and the inefficiency of manually switching networks. Simultaneously, through reasonable network priority settings and anti-oscillation logic, it achieves rapid response and cost optimization, improves the stability and reliability of the alarm gateway network connection, and ensures the timely transmission of alarm information.

[0059] A working system for a dedicated routing switching method for alarm gateways includes an intelligent routing switching system. This system takes as input the external network status and a configured network priority list. Its output connects to the kernel routing table and forwards data packets. The external network status includes reachability feedback. In this way, the system can intelligently switch routes based on the actual conditions of the external network, ensuring stable data packet transmission.

[0060] Specifically, the intelligent routing switching system includes a network detection module, a routing decision module, a switching execution module, and a message queue / event bus. The network detection module receives external network status information and publishes network status messages. It can monitor the connectivity, signal strength, and other status information of the external network in real time and publish this information through the message queue / event bus. The network detection module can be implemented using sensors, network monitoring software, and other devices.

[0061] The routing decision module configures a network priority list and outputs subscribed network status messages and publishes switching command messages. It analyzes and makes decisions based on the preset network priority list and received network status messages, and publishes a switching command message when a network switch is needed. The routing decision module can be a software program with data analysis and decision-making capabilities.

[0062] The switching execution module subscribes to switching instruction messages and updates the kernel routing table. When it receives a switching instruction message, it updates the kernel routing table according to the instruction, switching the transmission path of data packets to the new network. The switching execution module can implement route changes by interacting with the kernel routing table.

[0063] The message queue / event bus receives network messages and command messages. It acts as a bridge for information exchange between modules, ensuring timely and accurate information transmission between the network detection module, routing decision module, and switchover execution module. The message queue / event bus can be implemented using existing message queue software.

[0064] The implementation principle of this embodiment is as follows: This working system achieves intelligent route switching through the collaborative operation of its various modules, based on the external network status and the configured network priority list. The modules exchange information via message queues / event buses, improving the system's response speed and stability, and ensuring the efficient and stable network connection of the alarm gateway.

[0065] The computer device provided in this embodiment includes one or more processors, a memory, and one or more application programs. The one or more application programs are stored in the memory and configured to be executed by the one or more processors. The one or more programs are configured to perform dedicated route switching for alarm gateways. Specifically, the processor is responsible for executing instructions in the application programs to process and analyze data. It can be a central processing unit (CPU), a graphics processing unit (GPU), etc. The memory is used to store the application programs and related data; it can be random access memory (RAM), read-only memory (ROM), etc. The application program is a software program that implements the dedicated route switching method for alarm gateways. It includes functional modules such as gateway route configuration, network detection, route decision-making, and switching execution. The implementation principle of this embodiment is that the computer device executes the application programs stored in the memory through the processor, thereby implementing the dedicated route switching method for alarm gateways. This method can utilize the powerful computing and storage capabilities of the computer device to improve the efficiency and accuracy of route switching and ensure the stable transmission of alarm information.

[0066] The specific embodiments described herein are merely illustrative examples illustrating the spirit of the invention. The above embodiments only express several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of protection of this application. It should be noted that those skilled in the art to which this application pertains can make various modifications or additions to the described specific embodiments or use similar methods to replace them, but without departing from the spirit of this application or exceeding the scope defined by the appended claims. For those skilled in the art, multiple variations and improvements can be made without departing from the concept of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. A method for switching dedicated routes for an alarm gateway, characterized in that, Includes the following steps: S1. Configure gateway routing and initialize the network priority list; S2. The network detection module starts a timed detection thread, and completes the connectivity detection of wired network, Wi-Fi network and 4G network in sequence according to the principle of lowest cost. After the switch is completed, it continuously and cyclically detects the connectivity of each network interface in the order of wired network, Wi-Fi network and 4G network. S3. The routing decision module analyzes the detection response to achieve data and signal processing; S4. The switching execution module performs route changes based on the analysis and detection response. When a high-priority network is unavailable, it automatically switches to a low-priority network, and vice versa when the high-priority network is restored, in order to achieve fast response and cost optimization. Specifically, during the switching process between the wired network, Wi-Fi network, and 4G network, anti-oscillation logic is executed. The anti-oscillation logic includes setting a threshold for the number of successful detections based on the current network and the network to be switched to. When switching from the 4G network to the wired network or Wi-Fi network, the target network to be switched to is required to successfully detect n times consecutively. When switching between the wired network and the Wi-Fi network, the target network to be switched to is required to successfully detect 2n times consecutively. When switching from the wired network or Wi-Fi network to the 4G network, a successful detection is sufficient.

2. The method for switching dedicated routes for an alarm gateway according to claim 1, characterized in that, After the initialization of step S1 is completed, the network priority list will default to wired networks.

3. The method for switching dedicated routes for an alarm gateway according to claim 1, characterized in that, Step S3 specifically includes the following: the data processing involves the collection, comparison and decision-making logic of network status data; and the signal processing achieves seamless switching through kernel routing table operations.

4. The method for switching dedicated routes for an alarm gateway according to claim 1, characterized in that, The network detection module, routing decision module, and switching execution module share state information and cooperate with an event triggering mechanism. The network detection module sends the detection results to the routing decision module, which generates a switching instruction, and the switching execution module modifies the system routing rules.

5. A working system suitable for a dedicated routing switching method for alarm gateways, applicable to the technical solutions described in claims 1 to 4, characterized in that, It includes an intelligent routing switching system, which takes into account the external network status and a configured network priority list. The output of the intelligent routing switching system is connected to the kernel routing table and forwards data packets. The external network status includes reachability feedback.

6. The method for switching dedicated routes for an alarm gateway according to claim 5, characterized in that, The intelligent routing switching system includes: The network detection module receives external network status information and publishes network status messages. The routing decision module configures a network priority list and outputs subscribed network status messages and publishes switching instruction messages. Switch the execution module, subscribe to the switch instruction message, and update the kernel routing table; The message queue / event bus receives network messages and command messages.

7. A computer device, characterized in that, It includes: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to: execute the technical solution according to any one of claims 1 to 7.