Multi-tab state synchronization system
The multi-tab state synchronization system solves the problems of performance loss and resource waste in existing multi-tab state synchronization technologies, achieves real-time and reliable cross-page state synchronization, reduces server dependence and network overhead, and improves user experience.
Patent Information
- Application Number
- CN202511773905.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-27
AI Technical Summary
Existing multi-tab state synchronization solutions suffer from performance degradation, resource waste, and inconsistent cross-page experiences. Especially in complex interactive applications, traditional data synchronization solutions rely on polling, event bubbling, or centralized servers, resulting in insufficient real-time performance and reliability.
A multi-tab state synchronization system is adopted, including a message broadcasting and event normalization module, a state persistence and version management module, a synchronization engine and lifecycle management module. Cross-page state synchronization is achieved through cross-page communication channel management, state update broadcasting, version vector detection and merging, and adaptive strategy optimization.
It improves the real-time performance and reliability of multi-tab state synchronization, reduces server dependence and network overhead, enhances user experience, and ensures efficient system operation on different devices.
Smart Images

Figure CN121579237A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of multi-tab synchronization, and in particular to a multi-tab state synchronization system. BACKGROUND
[0002] With the increasing complexity of web applications and the growing demand for multitasking, modern browser environments often run multiple tab instances simultaneously, such as online document editing, viewing list data, etc. These applications need to share and synchronize state data (such as user operation records, form inputs, real-time data) between tabs to provide a consistent user experience. However, the default isolation mechanism of the browser causes the state to be independent between tabs, and traditional data synchronization solutions have limitations: the local storage time listening range is limited, the server push solution introduces delay and network overhead, and the native cross-page communication API has limited functionality.
[0003] Although HTML5 introduces BroadcastChannel for cross-page message broadcasting, it only provides basic communication capabilities and lacks state persistence and conflict management; IndexedDB supports client-side large data storage, but concurrent writing by multiple tabs may cause data race and consistency problems. In complex interactive applications, state synchronization needs to ensure real-time, reliability, and data integrity, but existing implementations rely heavily on polling, event bubbling, or centralized servers, resulting in performance loss, resource waste, and inconsistent cross-tab experience. SUMMARY
[0004] The present application provides a multi-tab state synchronization system to solve the technical problem of existing multi-tab concurrent writing relying heavily on polling, event bubbling, or centralized servers, resulting in performance loss, resource waste, and inconsistent cross-tab experience.
[0005] The present application provides a multi-tab state synchronization system, comprising:
[0006] a message broadcasting and event normalization module, a state persistence and version management module, a synchronization engine and a lifecycle management module;
[0007] The message broadcasting and event normalization module is configured to generate broadcast information when a tab state update or a new tab is detected, and send the broadcast information to shared tabs;
[0008] The state persistence and version management module is configured to store update data and version vectors generated by state updates, perform potential conflict detection based on the version vectors, and perform operation merging based on the conflict detection results;
[0009] The synchronization engine and lifecycle management module are configured to manage and synchronize the lifecycle of each tab operation behavior.
[0010] Optionally, the message broadcast and event normalization module comprises a cross-tab communication channel manager, a context builder, and a message filter and transmission optimizer;
[0011] The cross-tab communication channel manager is configured to generate a state update broadcast when a tab page changes in state, and broadcast the state update broadcast to shared tab pages;
[0012] The context builder is configured to trigger the cross-tab communication channel manager to send a full-amount synchronization process to obtain a latest state snapshot through broadcast request when a new tab page is detected to join;
[0013] The message filter and transmission optimizer is configured to filter and optimize the broadcast information.
[0014] Optionally, the cross-tab communication channel manager comprises an instance initialization unit, a lifecycle event listening unit, a broadcast unit, an integrated acknowledgement retransmission and sequence number allocation unit, and a priority allocation unit;
[0015] The instance initialization unit is configured to automatically create a broadcast channel when an application is started, and generate a unique identifier of the broadcast channel as a channel name;
[0016] The lifecycle event listening unit is configured to listen to lifecycle events of all tab pages, and maintain a list of active tab pages; the lifecycle events comprise a connection event and a disconnection event;
[0017] The broadcast unit is configured to, when a state update of any tab page is detected, encapsulate an update operation of the state update as a standard message object, and broadcast the standard message object to shared tab pages through the broadcast channel;
[0018] The integrated acknowledgement retransmission and sequence number allocation unit is configured to allocate a unique sequence number to each standard message object, and retransmit based on an exponential backoff strategy when an acknowledgement mark of a receiver is not received;
[0019] The priority allocation unit is configured to allocate a priority to different standard message objects.
[0020] Optionally, the context builder is further configured to maintain a cross-tab page shared context, the cross-tab page shared context comprising a global state version number, a tab page session registration table, and a state hash snapshot.
[0021] Optionally, the message filter and transmission optimizer comprises a source identification adding unit, an operation merging unit, and a difference transmission unit;
[0022] The source identification appending unit is configured to append a source identification to the broadcast information, and the source identification is used for filtering messages sent by the receiver itself;
[0023] The operation merging unit is configured to merge a plurality of update operations in a preset time into a single broadcast information;
[0024] The difference transmission unit is configured to calculate a difference field of a large volume of state changes, and compress the payload data of the difference field.
[0025] Optionally, the operation merging unit is further configured to identify a non-critical state update, and adopt a delayed batch sending strategy for the non-critical state update.
[0026] Optionally, the state persistence and version management module comprises a data storage and index manager, a version control and operation log tracker, and a conflict detection and merging resolver.
[0027] The data storage and index manager is configured to construct a unified state library, and the unified state library adopts a namespace and path hierarchical structure to manage update data generated by state updates.
[0028] The version control and operation log tracker is configured to maintain a version vector for each state item, record a last update version of each tab page and an operation log of the last update version, and compare version vectors of concurrent operations to identify potential conflicts.
[0029] The conflict detection and merging resolver is configured to perform potential conflict detection according to the version vectors, and perform operation merging according to a conflict detection result.
[0030] Optionally, the conflict detection and merging resolver is specifically configured to compare a first operation corresponding to the version vector with a second operation that has not been synchronized locally, judge whether the first operation and the second operation act on a same data object, if yes, judge whether the data object is basic data, if the data object is basic data, adopt an operation with a latest operation time as a target operation for broadcasting, if the data object is not basic data, generate a new operation by adjusting the first operation and the second operation, and adopt the new operation as the target operation for broadcasting.
[0031] Optionally, the synchronization engine and lifecycle management module comprises a state synchronization pipeline and scheduler, a lifecycle and resource manager, and a performance monitoring and adaptive policy maker.
[0032] The state synchronization pipeline and scheduler is configured to dynamically allocate resources according to priorities.
[0033] A life cycle and resource manager is configured to listen to life cycle events of the tab pages, pause synchronization when a tab page is hidden, resume synchronization when a tab page is re-displayed, and perform final state synchronization when a page is closed.
[0034] A performance monitoring and adaptive policy manager is configured to track key indicators, including message latency, conflict occurrence rate and storage performance, and dynamically adjust operating parameters based on the key indicators.
[0035] Optionally, the life cycle and resource manager is further configured to automatically clean up invalid listeners through a weak reference mechanism.
[0036] As can be seen from the above technical solutions, the present application has the following advantages: The present application discloses a multi-tab page state synchronization system, and specifically discloses a message broadcasting and event normalization module, a state persistence and version management module, a synchronization engine and a life cycle management module.
[0037] The present application eliminates the problem of inconsistent states of multiple tab pages through a unified synchronization layer and conflict resolution mechanism, improves data reliability and user experience, and is based on a lightweight implementation of native technology, reduces server dependence on network overhead, and reduces deployment costs. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor based on these drawings.
[0039] Figure 1 A structural block diagram of a multi-tab page state synchronization system according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0040] The embodiment of the present application provides a multi-tab page state synchronization system, which is used for solving the technical problems of the existing multi-tab page concurrent writing, multi-dependence polling, event bubbling or centralization server, performance loss, resource waste and cross-page experience inconsistency.
[0041] In order to make the technical problems, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the following described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0042] Please refer to Figure 1 , Figure 1 The structural block diagram of the multi-tab page state synchronization system provided by the embodiment of the present application is shown in the figure.
[0043] The multi-tab page state synchronization system provided by the present application can specifically include: a message broadcast and event normalization module 11, a state persistence and version management module 12, a synchronization engine and a life cycle management module 13.
[0044] The message broadcast and event normalization module 11 is used for generating broadcast information when a tab page state update or a new tab page is joined is listened to, and sending the broadcast information to a shared tab page.
[0045] In the embodiment of the present application, the message broadcast and event normalization module 11 includes a cross-page communication channel manager 111, a context builder 112 and a message filter and transmission optimizer 113.
[0046] The cross-page communication channel manager 111 is used for generating a state update broadcast when a tab page state changes, and broadcasting the state update broadcast to a shared tab page.
[0047] In one example, the cross-page communication channel manager 111 includes an instance initialization unit, a life cycle event listening unit, a broadcast unit, an integrated acknowledgement retransmission and sequence number allocation unit and a priority allocation unit.
[0048] The instance initialization unit is used for automatically creating a broadcast channel when an application is started, and generating a unique identifier of the broadcast channel as a channel name.
[0049] In a specific implementation, the instance initialization unit can automatically create a broadcast channel BroadcastChannel instance at the application startup, and use the application unique identifier as the channel name in the format of "app_[application ID]_sync_channel". This naming convention ensures the channel isolation between different applications.
[0050] The lifecycle event listening unit is configured to listen to lifecycle events of all the tab pages and maintain an active tab page list, wherein the lifecycle events include connection events and disconnection events.
[0051] In a specific implementation, the lifecycle event listening unit can listen to lifecycle events of all the tab pages, including connection events or disconnection events, so as to determine the active tab page according to the lifecycle events and maintain the active tab page list.
[0052] The broadcast unit is configured to, when listening to a state update of any tab page, encapsulate an update operation of the state update into a standard message object and broadcast the standard message object to the shared tab pages through a broadcast channel.
[0053] In the embodiment of the application, the state update can include the following changes of shared state data:
[0054] 1. User operation records (such as clicks and inputs).
[0055] 2. Form input values (such as text box contents and selected items).
[0056] 3. Real-time data (such as dynamic data obtained from a server).
[0057] 4. Interface states (such as panel expansion / folding and selected states). These states are encapsulated in the standard message object, including the fields of operation type (such as "update" and "delete"), data path (path in the state tree, such as "user.profile.name"), new value, timestamp and source identifier (identifying the tab page initiating the update).
[0058] In a specific implementation, when the state update occurs, the broadcast unit encapsulates the update operation into a standard message object, including the operation type, data path, new value, timestamp and source identifier, and sends it to all other shared tab pages in real time through the broadcast channel.
[0059] The integrated acknowledgement retransmission and sequence number allocation unit is configured to allocate a unique sequence number to each standard message object and retransmit based on an exponential backoff strategy when an acknowledgement mark of a receiver is not received.
[0060] In a specific implementation, the integrated acknowledgement retransmission and sequence number allocation unit allocates a unique sequence number for each message, and marks the message as processed after the receiver acknowledges; if no acknowledgement is received, the sender retransmits based on an exponential backoff strategy to ensure reliable delivery of the message.
[0061] The priority allocation unit is configured to allocate priorities to different standard message objects.
[0062] In a specific implementation, different standard message objects can be assigned priorities, and high-priority messages (such as user form submission and payment completion) are placed in a dedicated queue and sent immediately, while low-priority messages (such as the display state of interface elements) are placed in a general queue. The sender always processes the high-priority queue first to ensure that critical user operations are responded to immediately. At the same time, the manager limits the sending frequency of low-priority messages to prevent them from occupying too many channel resources.
[0063] The context builder 112 is configured to trigger the cross-page communication channel manager to send a full synchronization process when a new tab page is detected, and obtain the latest state snapshot through a broadcast request.
[0064] In a specific implementation, when the context builder detects the addition of a new tab page, it automatically triggers the cross-page communication channel manager to send a full synchronization process and obtain the latest state snapshot through a broadcast request, quickly integrating into the synchronization network.
[0065] In the embodiment of the application, the context builder is further configured to maintain a shared context across tab pages, and the shared context across tab pages includes a global state version number, a tab page session registration table (recording active instances and their state versions), and a state hash snapshot.
[0066] The message filter and transmission optimizer 113 is configured to filter and optimize broadcast information.
[0067] In one example, the message filter and transmission optimizer 113 includes a source identification adding unit, an operation merging unit, and a differential transmission unit.
[0068] The source identification adding unit is configured to add a source identification to the broadcast information, and the source identification is used by the receiver to filter messages sent by itself.
[0069] In a specific implementation, the source identification adding unit can add a source identification to all broadcast information. The receiver filters and discards messages sent by itself based on the source identification, completely avoiding circular processing and resource waste.
[0070] The operation merging unit is configured to merge multiple update operations within a preset time into a single broadcast information.
[0071] In a specific implementation, for high-frequency operations (such as continuous input), the operation merging unit merges multiple operations in a short time into a single broadcast message.
[0072] The operation merging unit is also configured to identify non-critical state updates, and adopt a delayed batch sending strategy for the non-critical state updates.
[0073] In a specific implementation, for non-critical state updates, the delayed batch sending strategy is adopted, which significantly reduces the number of low-priority messages.
[0074] The difference transmission unit is configured to calculate a difference field of a large-volume state change, and compress the payload data of the difference field.
[0075] In a specific implementation, for a large-volume state change whose payload data of the state change exceeds 10 KB, the difference transmission unit only calculates and sends the difference field, rather than the complete state. Meanwhile, the payload data is compressed, which effectively reduces the network transmission load.
[0076] The state persistence and version management module 12 is configured to store update data generated by state updates and a version vector, perform potential conflict detection according to the version vector, and perform operation merging according to a conflict detection result.
[0077] In an embodiment of the present application, the state persistence and version management module 12 includes a data storage and index manager 121, a version control and operation log tracker 122, and a conflict detection and merging resolver 123.
[0078] The data storage and index manager 121 is configured to construct a unified state library, and the unified state library adopts a namespace and path hierarchical structure to manage update data generated by state updates.
[0079] In a specific implementation, the data storage and index manager 121 constructs a unified state library, and adopts a namespace and path hierarchical structure to manage data. An atomic transaction is encapsulated through a storage manager to ensure read-write consistency. To improve performance, a lazy persistence strategy is adopted: a state change is first updated in a memory cache, and then written into a database asynchronously. The system automatically cleans up expired states to prevent storage expansion.
[0080] In an example, the atomic transaction includes:
[0081] 1. Read-write operation of state data: any modification of shared states stored in IndexedDB;
[0082] 2. Update of version vector: when a state change occurs, the corresponding version vector is updated simultaneously;
[0083] 3. Writing of operation log: recording operation history (operation type, path, new and old values, timestamp, source identifier).
[0084] 4. Tab session registry: state version information of active tab.
[0085] Version control and operation log tracker 122 is configured to maintain version vectors for each state item, record the last update version of each tab and the operation log of the last update version, and compare the version vectors of concurrent operations to identify potential conflicts.
[0086] In a specific implementation, the version control and operation log tracker 122 can maintain version vectors for each state item, and record the last update version of each tab. When the state changes, the system records detailed operation logs (operation type, path, new and old values, timestamp, source identifier). Based on the vector clock algorithm, conflicts are detected by comparing the version vectors of concurrent operations to identify potential conflicts. The operation log supports state replay and rollback, ensuring system recoverability.
[0087] Conflict detection and merging resolver 123 is configured to detect potential conflicts based on version vectors, and perform operation merging based on conflict detection results.
[0088] In a specific implementation, the conflict detection and merging resolver 123 is specifically configured to compare a first operation corresponding to the version vector with a second operation that has not been synchronized locally, determine whether the first operation and the second operation act on the same data object, if so, determine whether the data object is basic data, if so, adopt the operation with the latest time as the target operation for broadcasting, if the data object is not basic data, adjust to generate a new operation from the first operation and the second operation, and take the new operation as the target operation for broadcasting.
[0089] The new operation is obtained by calling a conversion function to adjust the execution order of the conflicting first operation and second operation.
[0090] Further, for conflicts that cannot be automatically resolved, a user intervention process can be triggered to display a conflict resolution interface for manual selection by the user.
[0091] Synchronization engine and lifecycle management module 13 is configured to perform lifecycle management and synchronization of tab operation behaviors.
[0092] In one example, the synchronization engine and lifecycle management module 13 includes a state synchronization pipeline and scheduler 131, a lifecycle and resource manager 132, and a performance monitoring and adaptive policy maker 133.
[0093] The state synchronization pipeline and scheduler 131 is configured to dynamically allocate resources according to priority.
[0094] In a specific implementation, the state synchronization pipeline and the scheduler 131 can sequentially process the stages of message receiving, conflict detection, merge execution, and persistence. Resources are dynamically allocated according to operation priority to ensure that high-priority operations are executed first. The system supports two synchronization modes: full synchronization when the page is first loaded to recover the complete state from the local database; and incremental synchronization at runtime to only process changed data. When the system load is too high, non-critical synchronization tasks are automatically suspended.
[0095] The lifecycle and resource manager 132 is used to listen to the lifecycle events of the tab page, and when the tab page is hidden, the synchronization is paused; when the tab page is displayed again, the synchronization is resumed; and when the tab page is closed, the final state synchronization is performed before the tab page is closed.
[0096] In a specific implementation, the lifecycle and resource manager 132 is used to listen to the lifecycle events of the tab page, and when the tab page is hidden, the synchronization is automatically paused to save resources; and when the tab page is displayed again, the synchronization is immediately resumed. Before the tab page is closed, the final state synchronization is automatically performed to ensure that the data is saved in time.
[0097] In one example, the lifecycle and resource manager 132 is also used to automatically clean up invalid listeners through a weak reference mechanism.
[0098] In a specific implementation, the lifecycle and resource manager 132 can automatically clean up invalid listeners through a weak reference mechanism to prevent memory leaks. After the page is refreshed, the latest state is automatically recovered from the local database and re-joined in the synchronization network.
[0099] The performance monitoring and adaptive policy manager 133 is used to track key indicators and dynamically adjust running parameters according to the key indicators, and the key indicators include message delay, conflict occurrence rate, and storage performance.
[0100] In a specific implementation, the performance monitoring and adaptive policy manager 133 can track key indicators in real time, such as message delay, conflict occurrence rate, and storage performance. Based on the tracked key indicators, the system dynamically adjusts the running parameters: reduces the synchronization frequency when the network is congested, and reduces the number of historical versions retained when the device memory is insufficient. The built-in adaptive policy engine automatically degrades non-core functions when resources are scarce.
[0101] The present application eliminates the problem of inconsistent states of multiple tab pages through unified synchronization layers and conflict resolution mechanisms, improves data reliability and user experience, and is based on the lightweight implementation of native technology, reduces server dependence on network overhead, and reduces deployment costs. The present application also ensures smooth operation of the system on high and low performance devices through adaptive performance optimization and resource management.
[0102] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0103] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts between the embodiments can be referred to each other.
[0104] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device or computer program product. Therefore, the embodiments of the present application can adopt a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer usable program codes.
[0105] The embodiments of the present application are described with reference to flowcharts and / or block diagrams according to the method, terminal device (system) and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in one or more flows and / or blocks.
[0106] These computer program instructions can also be stored in a computer readable memory capable of guiding a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer readable memory produce a product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in one or more flows and / or blocks.
[0107] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operation steps are performed on the computer or other programmable terminal device to produce a computer implemented process, so that the instructions executed on the computer or other programmable terminal device provide a process for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1steps of a function specified in one or more blocks.
[0108] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments described and illustrated herein, by those of skill in the art, once aware of the basic inventive concepts. Therefore, the appended claims are intended to encompass within their scope all such variations and modifications as are included within the scope of the application.
[0109] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0110] Finally, it should be noted that in this document, the terms such as first and second are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations have any such actual relationship or order. Also, the terms "comprises", "comprising", or any other variations thereof are intended to cover a non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or terminal device. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article, or terminal device including the element.
[0111] The above-described and above-embodied embodiments are merely used to illustrate the technical solutions of the present application, rather than limit the same; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some technical features; and such modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A multi-tab status synchronization system, characterized in that, include: Message broadcasting and event normalization module, state persistence and version management module, synchronization engine and lifecycle management module; The message broadcasting and event normalization module is used to generate broadcast information and send the broadcast information to the shared tab when it detects that the tab status has been updated or a new tab has been added. The state persistence and version management module is used to store the update data and version vector generated by state updates, perform potential conflict detection based on the version vector, and perform operation merging based on the conflict detection results. The synchronization engine and lifecycle management module are used to manage and synchronize the lifecycle of operations on each tab.
2. The multi-tab status synchronization system according to claim 1, characterized in that, The message broadcasting and event normalization module includes a cross-page communication channel manager, a context builder, and a message filter and transmission optimizer. The cross-page communication channel manager is used to generate a status update broadcast when the tab changes state, and broadcast the status update broadcast to the shared tab. The context builder is used to trigger the cross-page communication channel manager to send a full synchronization process when a new tab is detected, and obtain the latest state snapshot through a broadcast request; The message filter and transmission optimizer are used to filter and optimize the broadcast information.
3. The multi-tab status synchronization system according to claim 2, characterized in that, The cross-page communication channel manager includes an instance initialization unit, a lifecycle event listening unit, a broadcast unit, an integrated acknowledgment retransmission and sequence number allocation unit, and a priority allocation unit; The instance initialization unit is used to automatically create a broadcast channel when the application starts and generate a unique identifier for the broadcast channel as the channel name; The lifecycle event listening unit is used to listen to the lifecycle events of all tabs and maintain a list of active tabs; the lifecycle events include connection events and disconnection events. The broadcast unit is used to encapsulate the status update operation into a standard message object when it detects a status update of any tab, and broadcast the standard message object to the shared tab through the broadcast channel. The integrated acknowledgment retransmission and sequence number allocation unit is used to assign a unique sequence number to each standard message object and retransmit based on an exponential backoff strategy when no acknowledgment flag is received from the receiver. The priority allocation unit is used to assign priorities to different standard message objects.
4. The multi-tab status synchronization system according to claim 2, characterized in that, The context builder is also used to maintain a shared context across tabs, which includes: a global state version number, a tab session registry, and a state hash snapshot.
5. The multi-tab status synchronization system according to claim 2, characterized in that, The message filter and transmission optimizer includes a source identifier appending unit, an operation merging unit, and a difference transmission unit; The source identifier appending unit is used to append a source identifier to the broadcast information, and the source identifier is used by the receiver to filter the messages it sends. An operation merging unit is used to merge multiple update operations into a single broadcast message within a preset time period; The difference transmission unit is used to calculate the difference field of large volume state changes and compress the payload data of the difference field.
6. The multi-tab status synchronization system according to claim 5, characterized in that, The operation merging unit is also used to identify non-critical status updates and to adopt a delayed batch sending strategy for the non-critical status updates.
7. The multi-tab status synchronization system according to claim 1, characterized in that, The state persistence and version management module includes a data storage and index manager, a version control and operation log tracker, and a conflict detection and merging parser. The data storage and index manager is used to build a unified state library, which uses a namespace and path hierarchical structure to manage the update data generated by state updates. The version control and operation log tracker is used to maintain a version vector for each status item, record the last updated version of each tab and the operation log of the last updated version, and also to compare the version vectors of concurrent operations to identify potential conflicts. A conflict detection and merging parser is used to perform potential conflict detection based on the version vector and to perform operation merging based on the conflict detection results.
8. The multi-tab status synchronization system according to claim 7, characterized in that, The conflict detection and merging parser is specifically used to compare the first operation corresponding to the version vector with the second operation that has not yet been synchronized locally, determine whether the first operation and the second operation apply to the same data object, if so, determine whether the data object is basic data, if it is basic data, then use the operation with the last operation time as the target operation for broadcasting, if the data object is not basic data, then adjust and use the first operation and the second operation to generate a new operation, and broadcast the new operation as the target operation.
9. The multi-tab status synchronization system according to claim 1, characterized in that, The synchronization engine and lifecycle management module include a state synchronization pipeline and scheduler, a lifecycle and resource manager, and a performance monitoring and adaptive strategy unit. The state synchronization pipeline and scheduler are used to dynamically allocate resources according to priority; Lifecycle and resource manager are used to listen for tab lifecycle events, and pause synchronization when a tab is detected as hidden; Resume synchronization when the tab is detected to be redisplayed. Perform final state synchronization when the page is detected to be closed. A performance monitoring and adaptive strategy is used to track key metrics and dynamically adjust operating parameters based on these metrics, including message latency, conflict rate, and storage performance.
10. The multi-tab status synchronization system according to claim 9, characterized in that, The lifecycle and resource manager are also used to automatically clean up invalid listeners through a weak reference mechanism.