A network cross-domain connection system and method based on delay binding in a government affair 5G mobile application scenario

CN122534436APending Publication Date: 2026-08-07黑龙江省司法厅 +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
黑龙江省司法厅
Filing Date
2026-04-29
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0018]本发明的目的是为了解决上述现有技术存在的资源消耗大、启动延迟高、跨层状态感知滞后以及多实例冲突严重问题,进而提供一种政务5G移动应用场景下基于延迟绑定的网络跨域连接系统及方法,在 Flutter 跨平台框架与鸿蒙(HarmonyOS)原生系统混合开发的复杂架构下,通过全链路状态感知、跨语言延迟绑定以及智能冲突仲裁机制,实现政务移动终端安全隧道按需建立、资源动态调度及网络状态精准感知的方法及系统

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122534436A_ABST
    Figure CN122534436A_ABST
Patent Text Reader

Abstract

The application provides a network cross-domain connection system and method based on delay binding in a government affair 5G mobile application scene, and belongs to the technical field of mobile terminal network security and communication. In the system, a Flutter business sensing layer is used for real-time monitoring of business network request states, identification of intranet unreachable abnormalities, triggering of a Hongmeng side VPN service, and management of a request suspension queue to realize automatic recovery of requests; a Hongmeng system execution layer is used for receiving control instructions, managing the life cycle of a VPN extension service, processing system-level network events, solving VPN connection conflicts and feedback. The method comprises the following steps: environment initialization and silent start; business request interception and suspension; atomic start on the Hongmeng side; state synchronization and queue release. The application can realize application second opening and idle zero power consumption; reuse or smooth switching of existing tunnels to avoid violent preemption; and build a full-link abnormal capture and retry mechanism to make network fluctuations transparent to upper-layer businesses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a network cross-domain connection system and method based on delay binding in government 5G mobile application scenarios, belonging to the field of mobile terminal network security and communication technology. Background Technology

[0002] With the deepening of digital government construction, mobile e-government applications have become an important tool for civil servants' daily work. These applications typically need to access core databases deployed on the government's external or internal network. According to cybersecurity regulations and standards, as well as the requirements of the graded protection system, mobile terminals must access the internal network through secure links such as VPNs (Virtual Private Networks) or national cryptographic tunnels. However, in practical application scenarios, the following problems exist:

[0003] (1) The contradiction between security and efficiency in mobile government affairs is as follows:

[0004] 1. Waste of resources due to constant connectivity: Traditional government apps often adopt a crude "connect upon startup" strategy, which forces the establishment of a VPN tunnel as soon as the application starts. Statistics show that users spend 40% of their time browsing locally cached data (such as downloaded official documents and offline legal databases) or accessing publicly available information on the Internet (such as news announcements). Forcing the maintenance of a high-encryption VPN tunnel in this situation is not only unnecessary, but also causes the device's CPU to run at a high frequency continuously, resulting in serious power consumption and overheating problems.

[0005] 2. Startup Blocking Impacts User Experience: Establishing a VPN tunnel involves a complex handshake authentication, key negotiation, and virtual network card initialization process, which typically takes 2-5 seconds. If this process is executed sequentially during app startup, it will cause users to remain on the splash screen for an extended period, resulting in a noticeable feeling of application lag and slow response, severely impacting the user experience.

[0006] (2) The communication barriers under the Flutter and HarmonyOS hybrid architecture are as follows:

[0007] Currently, cross-platform frameworks such as Flutter are widely used to balance development efficiency and consistency across multiple platforms. However, when running Flutter applications on HarmonyOS, there is inherent architectural isolation:

[0008] 1. Thread isolation and state asynchrony: Flutter's Dart virtual machine runs in a separate UI thread, while HarmonyOS's VPN service (VpnExtension) runs in the system's Ability thread or a separate process. The lack of a shared memory mechanism between the two prevents the Flutter layer from obtaining the underlying VPN connection status accurately and in real-time.

[0009] 2. Communication latency and packet loss: Traditional Platform Channel communication incurs serialization and deserialization overhead. When network conditions change frequently (such as 5G / WiFi switching), if the underlying state change events cannot be synchronized to the business layer with extremely low latency, the business layer will issue network requests that are destined to fail, causing UI errors.

[0010] (3) The mobile adaptation deficiencies of existing VPN technologies are as follows:

[0011] Existing VPN client technologies are mostly based on PC design principles, exhibiting significant incompatibility with mobile devices:

[0012] 1. Exclusivity Conflict: HarmonyOS's network management mechanism typically allows only one VPN proxy to be active at a time. Government terminals often come pre-installed with multiple security gateway clients such as Sangfor and QiAnXin. When this application attempts to start a VPN, if other VPN connections already exist, the traditional approach is to directly report an error or forcibly disconnect the original connection. This can cause other critical background services (such as ongoing video conferencing or large file transfers) to be unexpectedly interrupted, leading to serious business conflicts.

[0013] 2. Vulnerability in weak network environments: Mobile devices are often in weak network environments such as elevators and basements. Traditional solutions usually require users to manually reconnect or throw a timeout exception after the VPN disconnects, lacking automated "tunnel self-healing" capabilities, resulting in frontline law enforcement officers frequently encountering "network unavailable" interruptions during mobile operations.

[0014] (4) The special challenges of the HarmonyOS system are as follows:

[0015] HarmonyOS introduces a component-based architecture based on Ability and a more stringent permission management mechanism.

[0016] 1. ExtensionAbility Lifecycle Limitations: VPN functionality is implemented through ExtensionAbility, whose lifecycle is managed centrally by the system. If the application goes into the background, the Extension may be suspended or reclaimed by the system. How to quickly restore the VPN context without re-running the full authentication process when the application returns to the foreground is a challenge that current technology has not yet solved.

[0017] 2. Semantic ambiguity of error codes: Error codes returned by the HarmonyOS underlying interface (such as 16000011 Service Busy, 16000050 Extension Already Exists) only represent the system status and cannot directly guide business layer decisions. Existing technologies lack intelligent parsing and policy mapping mechanisms for these error codes. Summary of the Invention

[0018] The purpose of this invention is to address the problems of high resource consumption, high startup latency, lagging cross-layer state awareness, and severe multi-instance conflicts in existing technologies. It provides a network cross-domain connection system and method based on delay binding for 5G mobile applications in government affairs. Under a complex architecture combining the Flutter cross-platform framework and the HarmonyOS native system, it achieves on-demand establishment of secure tunnels for government mobile terminals, dynamic resource scheduling, and accurate network state awareness through end-to-end state awareness, cross-language delay binding, and an intelligent conflict arbitration mechanism. This invention is applicable to application scenarios such as mobile government office work, police enforcement, and financial transactions where data security requirements are extremely high and user experience (e.g., startup speed and power consumption) is strictly controlled. The core objective of this invention is:

[0019] 1. On-Demand Connection: Delays the establishment of the VPN until the moment an internal network service request actually occurs, achieving instant application startup and zero power consumption during idle periods.

[0020] 2. Intelligent Arbitration: In a multi-VPN coexistence environment, through detection and negotiation mechanisms, it enables the reuse or smooth switching of existing tunnels, avoiding brute-force preemption.

[0021] 3. Seamless Self-Healing: Construct an end-to-end anomaly capture and retry mechanism to make network fluctuations transparent to upper-layer services.

[0022] The objective of this invention is achieved through the following technical solution:

[0023] A network cross-domain connection system based on latency binding for government 5G mobile application scenarios includes: a Flutter business perception layer and a HarmonyOS execution layer; the Flutter business perception layer transmits signals to the HarmonyOS execution layer through a method channel, and the HarmonyOS execution layer transmits signals to the Flutter business perception layer through an event channel.

[0024] The Flutter business awareness layer is used to monitor the status of business network requests in real time, identify intranet unreachability anomalies, trigger the start, stop and status query of the HarmonyOS VPN service through method channels, and manage the request suspension queue to achieve automatic request recovery.

[0025] The HarmonyOS execution layer is used to receive control commands from the Flutter business awareness layer, manage the lifecycle of VPN extended services, handle system-level network events, resolve VPN connection conflicts, and feed back VPN state change events to the Flutter business awareness layer through the event channel.

[0026] Preferably, the Flutter business awareness layer includes: an intelligent traffic interceptor, a traffic feature analysis module, and an exponential backoff scheduler; the signal output terminal of the intelligent traffic interceptor is connected to the signal input terminal of the traffic feature analysis module, and the signal output terminal of the traffic feature analysis module is connected to the signal input terminal of the exponential backoff scheduler.

[0027] The intelligent traffic interceptor is deployed in the network protocol stack layer of the network request framework. It performs deep packet inspection based on feature fingerprints and maintains a request suspension queue to temporarily store business requests that are blocked due to the lack of a VPN.

[0028] The traffic feature analysis module is used to analyze HTTP response headers, status codes, and TCP (Transmission Control Protocol) handshake anomalies in real time, and to distinguish between physical network outages, DNS (Domain Name System) hijacking, certificate errors, and intranet unreachability.

[0029] Exponential backoff scheduler: Used to manage retry strategies and prevent signaling storms caused by frequent retries during network instability.

[0030] Preferably, the network request framework includes, from bottom to top: a network protocol stack layer, a VPN service framework layer, a cross-language communication layer, a business logic layer, and a UI (user interface) presentation layer.

[0031] Preferably, the HarmonyOS execution layer includes: a lifecycle manager, a conflict resolution engine, and a system event bus; the signal input terminal of the lifecycle manager is connected to the signal output terminal of the conflict resolution engine and the system event bus respectively, the signal output terminal of the lifecycle manager is connected to the signal input terminal of the conflict resolution engine, and the signal output terminal of the conflict resolution engine is connected to the signal input terminal of the system event bus.

[0032] The lifecycle manager, residing in the EntryAbility component, is used to manage the startup, shutdown, configuration updates, and memory reclamation of the VPN extension service (VpnExtension). Internally, it maintains a finite state machine with states including: Idle, Starting, Connected, Reusing, and Reconnecting.

[0033] The conflict resolution engine is specifically designed to handle system error codes and has a built-in three-level decision tree of probe-reuse-preemption.

[0034] The system event bus uses public event management tools to monitor physical network changes and broadcasts of system VPN services, and pushes the underlying signals to the upper layer through the event channel after standardizing the underlying signals.

[0035] A connection method for a network cross-domain connection system based on delay binding in a government 5G mobile application scenario includes the following steps:

[0036] Step 1: Environment Initialization and Silent Startup

[0037] Start the Flutter App. The entry capability component completes initialization. At this stage, the VPN service is idle.

[0038] Step 2: Intercepting and Suspending Business Requests

[0039] The Flutter business awareness layer initiates an HTTP GET request to retrieve the list of to-do items. The intelligent traffic interceptor intercepts the request, executes the preset logic, and then sends a VPN start command to the HarmonyOS execution layer.

[0040] Step 3: Atomization startup on the HarmonyOS side

[0041] When the lifecycle manager in the HarmonyOS execution layer receives the VPN start command, it queries the current VPN status. If the status is idle, it starts the VPN extension service. If the status is connected, it directly enters the reuse process. If the start fails, it analyzes the error code through the conflict resolution engine and executes the corresponding recovery strategy.

[0042] Step 4: State synchronization and queue release

[0043] Once the VPN extension service starts successfully and the VPN tunnel is established in step 3, the HarmonyOS client broadcasts the VPN status as connected via the event channel. Then, the HarmonyOS client broadcasts the status change event to the Flutter business awareness layer via the event channel through the system event bus to update the status. Finally, the intelligent traffic interceptor locks the suspended queue and retrieves all temporarily stored requests.

[0044] Preferably, the specific steps for executing the preset logic in step 2 are as follows:

[0045] Step 21: Pre-check: Determine the current VPN service status. If it is idle, allow the request to the network protocol stack. If it is not idle, perform the corresponding operation according to the current status: if it is connected, allow the request directly; if it is starting, add the request to the pending queue to wait for the connection to complete; if it is reconnecting, the exponential backoff scheduler will schedule waiting and retrying at exponentially increasing time intervals to avoid signaling storms caused by frequent requests.

[0046] Step 22: Anomaly capture: The anomaly is returned from the network protocol stack layer to the intelligent traffic interceptor;

[0047] Step 23: Fingerprint matching: The intelligent traffic interceptor calls the traffic feature analysis module to analyze the anomaly and confirm that it belongs to the type of intranet unreachable;

[0048] Step 24: Request Freeze: Instead of throwing an exception to the UI layer, the intelligent traffic interceptor creates an asynchronous completer object, encapsulates the current request context, and stores it in the pending queue.

[0049] Step 25: Trigger signal: Send the VPN start command via the method channel.

[0050] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0051] (1) Delayed binding triggering mechanism based on abnormal fingerprints

[0052] Unlike traditional static rules that "activate VPN upon detecting an internal network IP," this invention employs a dynamic triggering mechanism. The activation process is only triggered when a request is actually sent and encounters a specific "blocking fingerprint" (such as "Network unreachable" and the target is an internal network segment, or a specific HTTP 403 / 404 response). This mechanism completely eliminates false positives, ensuring that system resources are only consumed when actual business operations are blocked.

[0053] (2) Optimistic locking VPN resource reuse strategy

[0054] To address the VPN exclusivity feature of the HarmonyOS system, this invention introduces the concept of "optimistic locking." When a "VPN already exists" error is received when requesting to start the VPN, the system assumes that the currently existing VPN may be the one the user needs (e.g., the user has already started the corresponding VPN through other means). At this time, the system immediately initiates a "lightweight connectivity test" (such as an HTTP Header request or ICMP Ping) against the target address on the internal network.

[0055] If the test passes: directly set the internal state to CONNECTED, reuse the existing tunnel, and never perform a Stop operation.

[0056] If the test fails: then an interactive dialog box will pop up for the user, requesting "preemption" permission, and after obtaining authorization, a forced switch of "stop first, then start" will be performed.

[0057] (3) State flow synchronization based on EventChannel

[0058] To address cross-language communication latency, this invention establishes a unidirectional high-speed data channel, namely the EventChannel. The network callback interface on the HarmonyOS side is encapsulated as an Event Source. Once the underlying state machine transitions (e.g., from CONNECTING → CONNECTED), the State Stream is pushed to the Flutter business awareness layer within milliseconds. The Flutter business awareness layer subscribes to this stream using a reactive programming model, automatically driving UI changes and releasing request queues. Attached Figure Description

[0059] Figure 1 This is a schematic diagram of the module structure of a cross-domain connection system for government networks based on cross-language delayed binding, according to the present invention.

[0060] Figure 2 This is a flowchart illustrating a cross-domain connection method for government networks based on cross-language delayed binding, as described in this invention. Detailed Implementation

[0061] The present invention will be further described in detail below with reference to the accompanying drawings: This embodiment is implemented under the premise of the technical solution of the present invention, and detailed implementation methods are given, but the protection scope of the present invention is not limited to the following embodiments.

[0062] like Figure 1 and Figure 2 As shown, the network cross-domain connection system based on latency binding in a government 5G mobile application scenario involved in this embodiment is a dual closed-loop feedback system spanning the Flutter business layer (Client) and the HarmonyOS system layer (Host), including:

[0063] 1. Flutter Business Awareness Layer (Upper Closed Loop):

[0064] The intelligent traffic interceptor (VpnAwareInterceptor) is one of the core components of this invention, deployed at the lowest level of a network request framework (such as Dio). It does not rely on simple network connectivity status, but instead performs deep packet inspection based on "feature fingerprints" (feature fingerprints are unique identifiers generated from a combination of HTTP request header fields, TLS handshake information, and target port, used to identify specific network traffic types). It maintains a "Pending RequestQueue" to temporarily store business requests blocked due to the lack of a VPN.

[0065] Traffic Analyzer: Analyzes HTTP response headers, status codes, and TCP handshake anomalies in real time, distinguishing between "physical network outage," "DNS hijacking," "certificate error," and "internal network unreachable."

[0066] Exponential Backoff Scheduler: Responsible for managing retry strategies to prevent "signaling storms" caused by frequent retries during network instability.

[0067] 2. HarmonyOS Execution Layer (Lower-layer Closed Loop):

[0068] The VpnLifecycleManager resides in `EntryAbility` and is responsible for managing the startup, shutdown, configuration updates, and memory reclamation of VpnExtensions. Internally, it maintains a finite state machine (FSM) with the following states: IDLE, STARTING, CONNECTED, REUSING, and RECONNECTING.

[0069] ConflictResolver: Specifically designed to handle system error codes (such as 16000050), it has a built-in three-level decision tree of "probe-reuse-preemption".

[0070] System Event Bus (SystemEventHub): Utilizes `CommonEventManager` (a public event management tool provided by HarmonyOS) to monitor changes in the physical network (WiFi / Cellular) and broadcasts of the system VPN service. After standardizing the underlying signals, it pushes them to the upper layer through EventChannel.

[0071] Example 1: On-demand loading process in a cold start scenario

[0072] This example demonstrates the complete process when a user opens the application for the first time and accesses the intranet module. The steps are as follows:

[0073] Step 1: Environment Initialization and Silent Startup

[0074] The user clicks the icon to launch the Flutter App. At this point, `EntryAbility` completes initialization, but `VpnExtension.startVpnExtensionAbility` is not called. The Flutter engine loads the UI, and the homepage displays a list of public news items that do not require authentication. During this stage, the VPN service is in an IDLE state, with extremely low memory usage; the application startup time is only the UI rendering time.

[0075] Step 2: Intercepting and Suspending Business Requests

[0076] When a user clicks the "Office Portal" icon, the Flutter business awareness layer initiates an HTTP GET request to retrieve the list of to-do items.

[0077] The `VpnAwareInterceptor` (intelligent traffic interceptor) intercepts the request and executes the following logic:

[0078] 1. Pre-check: Determine the current state of `VpnManager`. If it is idle, allow the request to the network protocol stack; if it is not idle, perform the corresponding operation according to the current state: if it is connected, allow the request directly; if it is starting, add the request to the pending queue to wait for the connection to complete; if it is reconnecting, the exponential backoff scheduler will schedule waiting and retries at exponentially increasing time intervals (e.g., 1 second, 2 seconds, 4 seconds, 8 seconds) to avoid signaling storms caused by frequent requests;

[0079] 2. Exception handling: The network protocol stack layer returns the intelligent traffic interceptor `SocketException: OS Error: Network is unreachable`.

[0080] 3. Fingerprint matching: The intelligent traffic interceptor calls the traffic feature analysis module to analyze the anomaly and confirm that it belongs to the "intranet unreachable" type.

[0081] 4. Request Freeze: Instead of throwing exceptions to the UI layer, the intelligent traffic interceptor creates a `Completer` object, encapsulates the current request context (URL, Headers, Body) and stores it in a `PendingRequestQueue` (suspended queue).

[0082] 5. Trigger signal: Send the `START_VPN` command via MethodChannel.

[0083] Step 3: Atomization startup on the HarmonyOS side

[0084] The HarmonyOS client's `VpnLifecycleManager` received the `START_VPN` command:

[0085] 1. Set the internal state machine to `STARTING`.

[0086] 2. Read the encrypted VPN configuration (address, certificate, routing table).

[0087] 3. Construct a `Want` object and call the system API to start the extension.

[0088] 4. If startup is successful, listen for the `onConnectionStateChanged` callback.

[0089] 5. If the status is connected, proceed directly to the reuse process; if startup fails, analyze the error code through the conflict resolution engine and execute the corresponding recovery strategy.

[0090] Step 4: State synchronization and queue release

[0091] Once the VPN tunnel is established:

[0092] 1. The HarmonyOS device broadcasts `{"status": "CONNECTED"}` via the system event bus through the EventChannel.

[0093] 2. When the Flutter client detects this event, `VpnManager` updates its state to CONNECTED.

[0094] 3. Upon receiving the notification, `VpnAwareInterceptor` locks the pending queue and retrieves all temporarily stored requests.

[0095] 4. Request replay: Resend the previously failed HTTP request using the new network context (ensuring the routing table update takes effect).

[0096] 5. Upon successful request and return of data, the UI renders the to-do list.

[0097] From the user's perspective: The user only noticed that the loading screen took 1-2 seconds longer after clicking, and then the content was displayed normally. There were no errors or pop-up interruptions throughout the process.

[0098] Example 2: Intelligent Conflict Arbitration and Reuse in a Multi-VPN Environment

[0099] This example demonstrates the handling strategy when a VPN from another vendor is already running on the device.

[0100] Scenario description: The user is a staff member of a certain department, and the VPN plugin of "Mobile Office Platform" is always running on the device.

[0101] Step 1: Conflict Detection

[0102] This application failed to access the intranet and sent the `START_VPN` command.

[0103] The HarmonyOS system layer called the startup interface and captured a `BusinessError` with error code `16000050`.

[0104] The `ConflictResolver` (conflict resolution engine) intervenes to handle the situation:

[0105] 1. Prevent failure exceptions from being returned to the Flutter layer.

[0106] 2. Log the following: `Wait for conflict resolution strategy`.

[0107] Step 2: Connectivity Target Test

[0108] The system immediately executes `ConnectivityTester.check(targetUrl)`.

[0109] `targetUrl` is a pre-configured, very small internal static resource (such as ` / favicon.ico`).

[0110] The test is set with a very short timeout (e.g., 1000ms).

[0111] Step 3: Branch Decision

[0112] Branch A (Reuse Successful): The test request returned HTTP 200 OK. This indicates that the current third-party VPN has actually established a connection to the required network segment (which could be a different client from the same vendor, or a full-traffic proxy).

[0113] The system layer returns `SUCCESS` to Flutter, along with the metadata `{"strategy": "REUSE"}`.

[0114] The application runs normally and coexists harmoniously with third-party VPNs.

[0115] Branch B (Reuse Failure): The test request timed out or returned a 403 / 404. This indicates that the current VPN tunnel is unavailable.

[0116] The system layer returns a specific error `CONFLICT_REQUIRED_USER_ACTION` to Flutter.

[0117] A modal dialog box pops up in the Flutter UI layer: "VPN tunnel conflict detected. Do you want to switch to the application's dedicated line?"

[0118] After the user clicks "Switch", the `FORCE_START` command is sent.

[0119] The HarmonyOS layer first calls `stopVpnExtensionAbility`, waits 500ms to release resources, and then calls `start` to complete the forced switch.

[0120] Example 3: Seamless Self-Healing Mechanism under Complex Network Jitter

[0121] This example demonstrates the recovery process after a VPN disconnection caused by physical network instability.

[0122] Scenario description: The user is using the VPN on a high-speed train, and the network frequently switches between 4G and 5G. The change of IP address causes the VPN tunnel to fail.

[0123] Step 1: Link Status Awareness

[0124] The HarmonyOS system's `NetworkCallback` captures a physical link change (LinkPropertiesChanged).

[0125] The VPN Extension triggers `onConnectStateChanged(DISCONNECTED)` because the underlying socket is disconnected.

[0126] Step 2: Silent Reconnection Loop

[0127] On the HarmonyOS device, `VpnLifecycleManager` (lifecycle manager) enters the `RECONNECTING` state.

[0128] 1. Instead of immediately destroying the extension, the exponential backoff scheduler schedules Re-Handshake attempts at exponentially increasing time intervals (e.g., 1s, 2s, 4s) to avoid signaling storms caused by frequent retries during network instability periods.

[0129] 2. At the same time, the Flutter layer is notified of the state change to `RECONNECTING` via the system event bus through EventChannel.

[0130] Step 3: Degraded Display at the Business Layer

[0131] Flutter received the `RECONNECTING` status:

[0132] 1. An orange sticky notification bar (non-blocking) appears at the top of the UI that says "Network connection in progress..."

[0133] 2. The interceptor queues all new requests generated during this period and activates a 15-second countdown circuit breaker.

[0134] Step 4: Restoration and Replay

[0135] Scenario A (Fast Recovery): The VPN reconnects successfully within 5 seconds. The status changes to CONNECTED, the notification bar disappears, and requests in the queue are automatically resent, almost imperceptibly to the user.

[0136] Scenario B (Circuit Breaker as a Last Resort): All Re-Handshake attempts scheduled by the exponential backoff scheduler fail within 15 seconds. The intelligent traffic interceptor triggers the circuit breaker, rejecting all requests in the queue and throwing a VpnConnectionTimeout exception. The UI displays an empty status page saying "Network connection failed, click retry," guiding the user to intervene manually.

[0137] Example 4: Construction and Matching Algorithm of Anomaly Fingerprint Database

[0138] To achieve accurate interception, this invention constructs a configurable anomaly fingerprint database.

[0139] Fingerprint data structure:

[0140] json

[0141] {

[0142] "rules": [

[0143] {

[0144] "type": "SocketException",

[0145] "pattern": "Network is unreachable",

[0146] "target_scope": ["10.0.0.0 / 8", "172.16.0.0 / 12"],

[0147] "action": "TRIGGER_VPN

[0148] },

[0149] {

[0150] "type": "HandshakeException",

[0151] "pattern": "CERTIFICATE_VERIFY_FAILED",

[0152] "action": "IGNORE" / / Certificate errors usually mean the connection is established but the configuration is incorrect; the startup should not be triggered repeatedly.

[0153] },

[0154] {

[0155] "type": "HttpException",

[0156] "http_code": 403,

[0157] "headers_contain": {"X-Gateway-Error": "Auth-Required"},

[0158] "action": "TRIGGER_VPN

[0159] } ]

[0161] }

[0162] ```

[0163] Matching algorithm:

[0164] When an anomaly occurs, the intelligent traffic interceptor traverses the anomaly fingerprint database:

[0165] 1. First, match the exception type (Type).

[0166] 2. Next, use regular expressions to match error messages (Pattern).

[0167] 3. Double-check whether the target IP of the request is within the controlled network segment (Target Scope).

[0168] 4. Finally, the Action determines whether to throw an exception directly or proceed with the VPN startup process.

[0169] This configuration-based strategy allows the system to flexibly adapt to the specific error reporting behaviors of different government gateways (such as Sangfor, Topsec, and QiAnxin), exhibiting strong compatibility.

[0170] The above description is merely a preferred embodiment of the present invention. These specific embodiments are different implementations based on the overall concept of the present invention, and the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A network cross-domain connection system based on delay binding in a government 5G mobile application scenario, characterized in that, include: The Flutter business awareness layer and the HarmonyOS execution layer; the Flutter business awareness layer transmits signals to the HarmonyOS execution layer through method channels, and the HarmonyOS execution layer transmits signals to the Flutter business awareness layer through event channels; The Flutter business awareness layer is used to monitor the status of business network requests in real time, identify intranet unreachability anomalies, trigger the start, stop and status query of the HarmonyOS VPN service through method channels, and manage the request suspension queue to achieve automatic request recovery. The HarmonyOS execution layer is used to receive control commands from the Flutter business awareness layer, manage the lifecycle of VPN extended services, handle system-level network events, resolve VPN connection conflicts, and feed back VPN state change events to the Flutter business awareness layer through the event channel.

2. The network cross-domain connection system based on delay binding in a government 5G mobile application scenario according to claim 1, characterized in that, The Flutter business awareness layer includes: an intelligent traffic interceptor, a traffic feature analysis module, and an exponential backoff scheduler; the signal output terminal of the intelligent traffic interceptor is connected to the signal input terminal of the traffic feature analysis module, and the signal output terminal of the traffic feature analysis module is connected to the signal input terminal of the exponential backoff scheduler. The intelligent traffic interceptor is deployed in the network protocol stack layer of the network request framework. It performs deep packet inspection based on feature fingerprints and maintains a request suspension queue to temporarily store business requests that are blocked due to the lack of a VPN. The traffic feature analysis module is used to analyze HTTP response headers, status codes, and TCP handshake anomalies in real time, and to distinguish between physical network outages, DNS hijacking, certificate errors, and intranet unreachability. Exponential backoff scheduler: Used to manage retry strategies and prevent signaling storms caused by frequent retries during network instability.

3. A network cross-domain connection system based on delay binding in a government 5G mobile application scenario according to claim 2, characterized in that, The network request framework, from bottom to top, includes: a network protocol stack layer, a VPN service framework layer, a cross-language communication layer, a business logic layer, and a UI presentation layer.

4. A network cross-domain connection system based on delay binding in a government 5G mobile application scenario according to claim 1, characterized in that, The HarmonyOS execution layer includes: a lifecycle manager, a conflict resolution engine, and a system event bus; the signal input terminal of the lifecycle manager is connected to the signal output terminal of the conflict resolution engine and the system event bus respectively, the signal output terminal of the lifecycle manager is connected to the signal input terminal of the conflict resolution engine, and the signal output terminal of the conflict resolution engine is connected to the signal input terminal of the system event bus. The lifecycle manager, residing in the entry capability component, is used to manage the startup, shutdown, configuration updates, and memory reclamation of VPN extended services. Internally, it maintains a finite state machine with states including: idle, startup, connected, reused, and reconnecting. The conflict resolution engine is specifically designed to handle system error codes and has a built-in three-level decision tree of probe-reuse-preemption. The system event bus uses public event management tools to monitor physical network changes and broadcasts of system VPN services, and pushes the underlying signals to the upper layer through the event channel after standardizing the underlying signals.

5. A connection method for a network cross-domain connection system based on delay binding in a government 5G mobile application scenario, as described in any one of claims 1-4, characterized in that... Includes the following steps: Step 1: Environment Initialization and Silent Startup Start the Flutter App. The entry capability component completes initialization. At this stage, the VPN service is idle. Step 2: Intercepting and Suspending Business Requests The Flutter business awareness layer initiates an HTTP GET request to retrieve the list of to-do items. The intelligent traffic interceptor intercepts the request, executes the preset logic, and then sends a VPN start command to the HarmonyOS execution layer. Step 3: Atomization startup on the HarmonyOS side When the lifecycle manager in the HarmonyOS execution layer receives the VPN start command, it queries the current VPN status. If the status is idle, it starts the VPN extension service. If the status is connected, it directly enters the reuse process. If the start fails, it analyzes the error code through the conflict resolution engine and executes the corresponding recovery strategy. Step 4: State synchronization and queue release Once the VPN extension service starts successfully and the VPN tunnel is established in step 3, the HarmonyOS client broadcasts the VPN status as connected via the event channel. Then, the HarmonyOS client broadcasts the status change event to the Flutter business awareness layer via the event channel through the system event bus to update the status. Finally, the intelligent traffic interceptor locks the suspended queue and retrieves all temporarily stored requests.

6. The connection method according to claim 5, characterized in that, The specific steps for executing the preset logic in step 2 are as follows: Step 21: Pre-check: Determine the current VPN service status. If it is idle, allow the request to the network protocol stack. If it is not idle, perform the corresponding operation according to the current status: if it is connected, allow the request directly; if it is starting, add the request to the pending queue to wait for the connection to complete; if it is reconnecting, the exponential backoff scheduler will schedule waiting and retrying at exponentially increasing time intervals to avoid signaling storms caused by frequent requests. Step 22: Anomaly capture: The anomaly is returned from the network protocol stack layer to the intelligent traffic interceptor; Step 23: Fingerprint matching: The intelligent traffic interceptor calls the traffic feature analysis module to analyze the anomaly and confirm that it belongs to the type of intranet unreachable; Step 24: Request Freeze: Instead of throwing an exception to the UI layer, the intelligent traffic interceptor creates an asynchronous completer object, encapsulates the current request context, and stores it in the pending queue. Step 25: Trigger signal: Send the VPN start command via the method channel.