Micro-application data synchronization method and device, equipment and storage medium

By constructing a sandbox proxy channel and a layered encryption mechanism, the security and efficiency issues between micro-applications were resolved, and secure and efficient data synchronization for cross-domain communication was achieved.

CN121907855APending Publication Date: 2026-04-21CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA CONSTRUCTION BANK
Filing Date
2025-12-29
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, the message channels between micro-applications lack granular security policy control, leading to the leakage of sensitive data and delays in state updates, which affects the security and efficiency of cross-domain communication.

Method used

A sandbox proxy channel is constructed, and a layered encryption mechanism is used to encrypt the differential description. Data synchronization is performed through the event bus center. Combined with a multi-layer architecture and a multi-channel communication mechanism, cross-domain and same-domain message transmission is realized.

Benefits of technology

It improves the security of cross-domain communication and the efficiency of data synchronization, reduces the amount of data transmission and latency, and enhances the system's compatibility and transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121907855A_ABST
    Figure CN121907855A_ABST
Patent Text Reader

Abstract

The invention provides a micro-application data synchronization method which can be applied to the technical field of information security. The micro-application data synchronization method comprises the following steps: constructing a sandbox proxy channel; in response to the detected change of the state of the current micro-application, generating a difference description corresponding to the change, the difference description only recording the content of the change; according to the differential description, a pre-configured hierarchical encryption mechanism is utilized to encrypt the differential description to obtain ciphertext data, and the hierarchical encryption mechanism comprises the steps of encrypting service data in the differential description by using a first encryption model and encrypting packaging metadata corresponding to the differential description by using a second encryption model; and by utilizing the event bus center, broadcasting the ciphertext data to a specified target micro-application through the sandbox proxy channel for data synchronization. The invention further provides a micro-application data synchronization device and equipment and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information security technology, and specifically to a micro-application data synchronization method, apparatus, device, and storage medium. Background Technology

[0002] With the development of front-end microservice architecture, more and more enterprise applications are adopting the micro-frontend or micro-application pattern, breaking down a large system into multiple independently running and deployable sub-applications. Each micro-application typically runs in a different environment or under a different domain, achieving business collaboration by sharing some state or data.

[0003] However, in existing technologies, the message channels between various micro-applications lack fine-grained security policy control, which can easily lead to the leakage of sensitive data and seriously affect the security of cross-domain communication of the system. In addition, in scenarios where multiple applications run in parallel or have high-frequency interaction, there is a significant delay in state updates, resulting in low efficiency in state synchronization and further affecting the system's response performance. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a micro-application data synchronization method, apparatus, device and storage medium.

[0005] According to a first aspect of this disclosure, a micro-application data synchronization method is provided, comprising: constructing a sandbox proxy channel, wherein the sandbox proxy channel is used to establish a cross-domain communication path between different micro-applications; in response to detecting a change in the current state of the micro-application, generating a differential description corresponding to the change, wherein the differential description only records the content of the change; encrypting the differential description using a pre-configured hierarchical encryption mechanism to obtain ciphertext data, wherein the hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model; and broadcasting the ciphertext data to a specified target micro-application through the sandbox proxy channel for data synchronization using an event bus center.

[0006] According to embodiments of this disclosure, the sandbox proxy channel is configured as a multi-layer architecture, wherein the multi-layer architecture includes: an application layer configured with a unified application programming interface (API), wherein the API includes a first interface for sending synchronization data to different micro-applications and a second interface for receiving synchronization data from different micro-applications; a proxy layer configured to encrypt and encapsulate synchronization data according to a preset sandbox proxy script; and a transport layer configured to transmit synchronization data between different micro-applications according to a preset cross-domain communication mechanism.

[0007] According to embodiments of this disclosure, the transport layer is configured with multiple sub-channels, including: a cross-application messaging channel for cross-domain message transmission between different micro-applications; a context broadcast channel for same-domain message transmission between multiple different pages of the same micro-application; and a bridging channel for cross-domain message transmission between the main application and sub-applications.

[0008] According to embodiments of this disclosure, in response to detecting a change in the state of the current micro-application, a differential description corresponding to this change is generated, including: in response to detecting a change in the state of the current micro-application, performing a structured comparison between the state data of the current micro-application and the reference state data before the change; and based on the comparison result, generating a differential description that conforms to the requirements of the differential synchronization protocol in a preset format.

[0009] According to embodiments of this disclosure, based on the differential description, the differential description is encrypted using a pre-configured layered encryption mechanism to obtain ciphertext data, including: encrypting the business data in the differential description using a symmetric encryption algorithm, wherein the symmetric encryption algorithm represents a first encryption model; and encrypting the encapsulated metadata corresponding to the differential description using a streaming encryption algorithm, wherein the streaming encryption algorithm represents a second encryption model.

[0010] According to embodiments of this disclosure, using an event bus center to broadcast encrypted data to a designated target micro-application via a sandbox proxy channel for data synchronization includes: using the event bus center to detect whether the encrypted data matches the subscription topic of each micro-application; and in response to the encrypted data matching the subscription topic, broadcasting the encrypted data to the matching target micro-application via the sandbox proxy channel for data synchronization.

[0011] According to embodiments of this disclosure, the method further includes: detecting screen angle changes of each micro-application using a foldable screen sensor; and switching the corresponding collaboration mode according to the screen angle changes to support multi-screen interaction scenarios.

[0012] According to embodiments of this disclosure, the collaboration mode includes a tiling mode and a split-screen mode; wherein, switching the corresponding collaboration mode to support multi-screen interaction scenarios based on changes in screen angle includes: switching to tiling mode in response to detecting that the screen angle is less than a preset threshold; and switching to split-screen mode in response to detecting that the screen angle is greater than a preset threshold.

[0013] A second aspect of this disclosure provides a micro-application data synchronization device, comprising: a construction module for constructing a sandbox proxy channel, wherein the sandbox proxy channel is used to establish a cross-domain communication path between different micro-applications; a generation module for generating a differential description corresponding to the current change in response to detecting a change in the current state of the micro-application, wherein the differential description only records the content of the current change; an encryption module for encrypting the differential description using a pre-configured hierarchical encryption mechanism to obtain ciphertext data, wherein the hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model; and a broadcast module for broadcasting the ciphertext data to a specified target micro-application through the sandbox proxy channel for data synchronization using an event bus center.

[0014] A third aspect of this disclosure provides an electronic device comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.

[0015] A fourth aspect of this disclosure also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0016] The fifth aspect of this disclosure also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method. Attached Figure Description

[0017] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0018] Figure 1 This diagram illustrates an application scenario of the micro-application data synchronization method according to an embodiment of the present disclosure.

[0019] Figure 2 A flowchart illustrating a micro-application data synchronization method according to an embodiment of the present disclosure is shown schematically.

[0020] Figure 3 This schematically illustrates a multi-layered architecture diagram of a sandbox proxy channel according to an embodiment of the present disclosure;

[0021] Figure 4 The illustration schematically depicts a scenario of multi-screen interaction according to embodiments of the present disclosure;

[0022] Figure 5A schematic diagram illustrating the structure of a micro-application data synchronization device according to an embodiment of the present disclosure is shown; and

[0023] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a micro-application data synchronization method according to an embodiment of the present disclosure. Detailed Implementation

[0024] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0025] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0027] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).

[0028] It should be noted that the micro-application data synchronization method and apparatus disclosed herein can be used in the financial field for micro-application data synchronization, and can also be used in any field other than the financial field for micro-application data synchronization. The application field of the micro-application data synchronization method and apparatus disclosed herein is not limited.

[0029] It should be noted that in the embodiments disclosed herein, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary and are intended only to illustrate the feasibility of implementing the technical solutions disclosed herein. However, they do not mean that the applicant has used or necessarily used such solutions.

[0030] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user device information, such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, and necessary measures have been taken to ensure that they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.

[0031] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.

[0032] This disclosure provides a micro-application data synchronization method, comprising: constructing a sandbox proxy channel, wherein the sandbox proxy channel is used to establish a cross-domain communication path between different micro-applications; in response to detecting a change in the current state of a micro-application, generating a differential description corresponding to the change, wherein the differential description only records the content of the change; encrypting the differential description using a pre-configured hierarchical encryption mechanism to obtain ciphertext data, wherein the hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model; and broadcasting the ciphertext data to a specified target micro-application through the sandbox proxy channel for data synchronization using an event bus center.

[0033] Figure 1 The illustration shows an application scenario diagram of the micro-application data synchronization method according to an embodiment of the present disclosure.

[0034] like Figure 1 As shown, application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0035] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0036] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0037] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0038] It should be noted that the micro-application data synchronization method provided in this embodiment can generally be executed by server 105. Correspondingly, the micro-application data synchronization device provided in this embodiment can generally be located in server 105. The micro-application data synchronization method provided in this embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the micro-application data synchronization device provided in this embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.

[0039] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0040] The following will be based on Figure 1 The described scene, through Figures 2-4 The micro-application data synchronization method according to the embodiments of this disclosure will be described in detail.

[0041] Figure 2A flowchart illustrating a micro-application data synchronization method according to an embodiment of the present disclosure is shown.

[0042] like Figure 2 As shown, the micro-application data synchronization method of this embodiment includes operations S210 to S240, and the micro-application data synchronization method can be executed by a server.

[0043] In operation S210, a sandbox proxy channel is constructed, which is used to establish cross-domain communication paths between different micro-applications.

[0044] In operation S220, in response to the detection of a change in the current state of the microapplication, a differential description corresponding to this change is generated. The differential description only records the content of the change that occurred this time.

[0045] In operation S230, based on the differential description, the differential description is encrypted using a pre-configured hierarchical encryption mechanism to obtain ciphertext data. The hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model.

[0046] When operating the S240, the event bus center is used to broadcast encrypted data to the specified target micro-application through the sandbox agent channel for data synchronization.

[0047] In this embodiment, a sandbox proxy channel is constructed as a cross-domain data transmission channel. During data transmission, a layered encryption mechanism is used to perform double encryption on the data to ensure security. On this basis, an event bus + differential synchronization protocol is used to synchronize only the parts where the state changes, thereby reducing the amount of data transmission and transmission latency, and improving synchronization efficiency.

[0048] For example, consider a small front-end micro-application developed using the HyperText Markup Language 5.0 (HTML5) technology stack that can run, deploy, and update independently.

[0049] First, a sandbox proxy channel is built as a cross-domain communication path between different micro-applications.

[0050] A sandbox, also known as a sandbox, is a security mechanism in the field of computer security that provides an isolated environment for running programs. The system can establish sandbox proxy channels between multiple micro-applications.

[0051] After the sandbox proxy channel is established, when the system detects a change in the state of a micro-application (e.g., a user changes settings or the interface state), the system compares the current state data of the micro-application with reference state data (which could be the state of the previous version or the initial state). For example, a structured comparison algorithm can be used to extract the differences and generate a differential description. This differential description only records the changed parts, such as modifications to a field value or the addition of new data, greatly reducing the amount of data that needs to be transmitted for synchronization.

[0052] Next, the system encrypts the differential description according to a pre-configured layered encryption mechanism. For example, firstly, a symmetric encryption algorithm can be used to encrypt the business data in the differential description to ensure the security of the business content. Secondly, a streaming encryption algorithm can be used to encrypt the metadata (such as timestamps, message headers, and signatures) in the differential description to enhance data integrity and tamper resistance.

[0053] Finally, the system utilizes the event bus center to broadcast the encrypted data to the designated target micro-application based on its subscribed topics. Upon receiving the encrypted data, the target micro-application decrypts and updates the data through the sandbox proxy channel.

[0054] According to embodiments of this disclosure, since the sandbox proxy channel can provide a secure isolation environment, and the transmitted data is further encrypted in layers, this isolation + encryption measure can effectively prevent cross-domain data leakage and greatly improve the security of cross-domain communication of the system. In addition, the event bus + differential synchronization protocol only synchronizes the changed data, which reduces the amount of data transmission and transmission latency compared to the traditional full data synchronization, and greatly improves the synchronization efficiency.

[0055] In this embodiment of the disclosure, the sandbox proxy channel is configured as a multi-layer architecture, which may include, for example:

[0056] The application layer is configured with a unified application programming interface (API), which includes a first interface for sending synchronization data to different micro-applications and a second interface for receiving synchronization data from different micro-applications. The proxy layer is configured to encrypt and encapsulate synchronization data according to a preset sandbox proxy script. The transport layer is configured to transmit synchronization data between different micro-applications according to a preset cross-domain communication mechanism.

[0057] In this embodiment, a three-layer separation architecture is introduced to decouple micro-applications from the underlying communication mechanism, enabling the application layer to securely transmit data through a unified interface. See details... Figure 3 As shown.

[0058] Figure 3 A schematic diagram of a multi-layer architecture of a sandbox proxy channel according to an embodiment of the present disclosure is shown.

[0059] like Figure 3 As shown in this embodiment, the sandbox proxy channel adopts a three-layer architecture, namely the application layer, the proxy layer, and the transport layer. The functions of each layer are as follows:

[0060] The application layer provides a unified Application Programming Interface (API) for micro-applications. This API includes two main functions:

[0061] Send function: Used to send synchronization data. The parameters passed in include the target micro-application identifier, the synchronization data, and the operation type. When this API is called, the system passes the data to the proxy layer for encryption and encapsulation.

[0062] Receive function: Used to receive synchronized data from other micro-applications. The system will automatically decrypt the data and pass it to the application layer for processing.

[0063] The proxy layer is responsible for encrypting, signing, and encapsulating data according to the sandbox proxy script. In addition to performing data encryption, the proxy layer also performs whitelist verification on each synchronized data message to ensure the message source is trustworthy. If the message source is not on the whitelist, the message will be discarded.

[0064] The transport layer provides different cross-domain communication mechanisms and supports multiple communication protocols. Depending on the deployment environment of the micro-application, the system can select a suitable transport channel.

[0065] According to embodiments of this disclosure, this three-tier architecture design decouples the application layer from the underlying communication mechanism, allowing the system to flexibly select different communication methods while ensuring data security and transmission efficiency.

[0066] In this embodiment of the disclosure, the transport layer is configured with a plurality of sub-channels, which may include, for example:

[0067] Cross-application messaging channels are used for cross-domain message transmission between different micro-applications; context broadcast channels are used for same-domain message transmission between multiple different pages within the same micro-application; and bridging channels are used for cross-domain message transmission between the main application and its sub-applications.

[0068] In this embodiment of the disclosure, a multi-channel hybrid communication mechanism is integrated to meet the multi-layer communication needs under cross-domain, same-domain, and master-slave relationships through the collaboration of different channels.

[0069] For example, you can choose to use cross-application messaging channels to enable cross-domain message transmission between different micro-applications.

[0070] Each micro-application specifies a target domain during registration and sends encrypted messages to micro-applications on that domain via a cross-application messaging channel. Message sending and receiving are encrypted and verified through a sandboxed proxy channel to ensure data security.

[0071] Alternatively, a context broadcast channel can be used to transmit synchronized data between multiple pages from the same origin. Each page acts as an independent context, and this channel can be used to broadcast and synchronize messages. This channel is suitable for rapid collaboration and data synchronization between micro-applications from the same origin, offering low latency and high efficiency.

[0072] A bridging channel can also be used to enable cross-domain message transmission between the main application and sub-applications. The main application loads the sub-application through an embedded bridging function and transmits encrypted data to the sub-application via a cross-application messaging channel. Upon receiving the data, the sub-application decrypts it and updates its state. This approach is suitable for embedded micro-application collaboration scenarios.

[0073] The system can automatically select the most suitable sub-channel based on the actual communication scenario to optimize data transmission performance.

[0074] According to embodiments of this disclosure, by flexibly selecting sub-channels, efficient transmission and isolation of cross-domain and same-domain messages can be achieved, significantly improving the system's compatibility, transmission performance, and security.

[0075] In this embodiment of the disclosure, operation S220, in response to detecting a change in the current state of the micro-application, generates a differential description corresponding to this change, which may include, for example:

[0076] In response to the detection of a change in the current state of the micro-application, the current state data of the micro-application is compared in a structured manner with the reference state data before the change; based on the comparison results, a differential description conforming to the requirements of the differential synchronization protocol is generated in a preset format.

[0077] In this embodiment of the disclosure, a structured comparison algorithm is introduced to automatically generate differential descriptions, ensuring that the transmission of synchronous data is minimized.

[0078] For example, when a change in the state of a micro-application is detected, the system first performs a structured comparison between the current state data of the micro-application and the reference state data. For instance, the system first loads the current state data of the micro-application (such as UI state, configuration files, etc.) and compares it with the previously saved reference state. During the comparison process, the system uses a structured difference algorithm (such as JSON Diff) to compare the differences between the two.

[0079] Then, based on the comparison results, the system extracts only the changed data and generates a differential description according to a preset format (such as JSONPatch format). This differential description includes the changed fields, the operation type (add, modify, delete), and the changed value. The generated differential description conforms to the requirements of the differential synchronization protocol, ensuring minimal and efficient data synchronization.

[0080] The synchronization protocol standardizes the format and transmission method of each change operation, ensuring that data can be correctly synchronized between different micro-applications.

[0081] According to embodiments of this disclosure, compared to traditional full data synchronization, this method only synchronizes the changed parts, effectively reducing transmission overhead, improving efficiency, and supporting real-time synchronization scenarios for large-scale micro-applications.

[0082] In this embodiment of the disclosure, operation S230 encrypts the differential description using a pre-configured hierarchical encryption mechanism to obtain ciphertext data, which may include, for example:

[0083] The business data in the differential description is encrypted using a symmetric encryption algorithm, where the symmetric encryption algorithm represents the first encryption model; the encapsulated metadata corresponding to the differential description is encrypted using a streaming encryption algorithm, where the streaming encryption algorithm represents the second encryption model.

[0084] In this embodiment, an innovative layered encryption mechanism is proposed to encrypt business data and metadata separately, thereby improving the security and integrity of data transmission.

[0085] For example, after the differential description is generated, the system performs layered encryption to ensure high data security during transmission.

[0086] First, the primary encryption model, namely a symmetric encryption algorithm (such as the Block Cipher Standard or the Advanced Encryption Standard), is used to symmetrically encrypt the business data in the differential description. Symmetric encryption algorithms ensure the efficiency of the encryption and decryption process and are suitable for encrypting large amounts of business data.

[0087] Then, a second encryption model, namely streaming encryption, is used to stream-encrypt the encapsulated metadata (such as timestamps, message headers, signatures, etc.) in the differential description. Streaming encryption offers higher security and ensures the integrity and tamper-proof capability of the encryption process.

[0088] Finally, the system generates a complete encrypted data packet, which includes encrypted business data and metadata. The encrypted data packet is then sent to the target micro-application via a sandboxed proxy channel.

[0089] According to embodiments of this disclosure, the layered encryption mechanism provides dual protection for both data content and encapsulated information, preventing both the leakage of business data and the tampering of message packets, thereby improving the overall communication security level.

[0090] In this embodiment of the disclosure, operation S240 utilizes the event bus center to broadcast encrypted data to a designated target micro-application via a sandbox proxy channel for data synchronization. This may include, for example:

[0091] Using the event bus center, it detects whether the encrypted data matches the subscribed topics of each micro-application; in response to the encrypted data matching the subscribed topics, it broadcasts the encrypted data to the matching target micro-application through the sandbox proxy channel for data synchronization.

[0092] In this embodiment of the disclosure, an encrypted data broadcasting mechanism based on topic matching is introduced at the event bus center.

[0093] The event bus center maintains a table of subscribed topics for all microapplications. For example, when a sandbox proxy channel receives encrypted data, the event bus center matches the topic field of the encrypted data to see if any microapplication has subscribed to that topic. Each microapplication declares the types of topics it subscribes to when it registers.

[0094] If the topic of the encrypted data matches the subscription topic of a microapplication, the event bus center will broadcast the encrypted data to the target microapplication through the sandbox proxy channel. Upon receiving the data, the target microapplication will automatically decrypt it and perform the corresponding status update.

[0095] According to embodiments of this disclosure, the mechanism enables precise broadcasting, sending messages only to micro-applications with subscription relationships, avoiding redundant transmission, and improving message distribution efficiency and system security.

[0096] In this embodiment of the disclosure, the micro-application data synchronization method may further include, for example:

[0097] The foldable screen sensor detects changes in the screen angle of each micro-application; based on the changes in screen angle, the corresponding collaboration mode is switched to support multi-screen interaction scenarios.

[0098] In this embodiment, device sensor information (folding angle) is dynamically bound to a micro-application collaboration mode to achieve adaptive interaction, as detailed below. Figure 4 As shown.

[0099] Figure 4 The illustration depicts a scenario of multi-screen interaction according to an embodiment of the present disclosure.

[0100] like Figure 4As shown in this embodiment of the disclosure, in the foldable screen device, the system detects changes in screen angle in real time through a foldable screen sensor. For example, the foldable screen device has a built-in sensor that monitors the hinge angle of the screen in real time.

[0101] When a change in screen state is detected (such as from unfolded to folded or half-folded), the sensor will transmit angle data.

[0102] Based on the changing angle of the foldable screen, the system can dynamically switch the collaboration mode of micro-applications, for example:

[0103] Expanded mode: When the screen angle approaches 180°, the system switches to multi-window collaboration mode, where multiple micro-applications are displayed side by side, supporting efficient multitasking.

[0104] Half-fold mode: When the screen angle is close to 90°, the system switches to a split-screen mode, with the upper screen displaying the main content and the lower screen displaying auxiliary functions or the operation interface.

[0105] Folding mode: When the screen angle is close to 0°, the system switches to single application focus mode, displaying only the main micro-application interface to reduce background interference.

[0106] According to embodiments of this disclosure, the system can automatically adjust its display and interaction logic based on the device form, maintaining optimal display and interaction effects in different states such as folded, unfolded, and split-screen, thereby enhancing the system's intelligence and adaptability.

[0107] In this embodiment of the disclosure, the corresponding collaboration mode is switched according to the change of screen angle to support multi-screen interaction scenarios, which may include, for example:

[0108] In response to detecting that the screen angle is less than a preset threshold, switch to tile mode; in response to detecting that the screen angle is greater than a preset threshold, switch to split-screen mode.

[0109] In this embodiment of the disclosure, a collaborative interface adaptive mechanism for multiple micro-applications is realized by dynamically switching between tiling / split-screen modes based on the screen angle.

[0110] For example, taking an HTML5 micro-application as an example, as a preferred embodiment, this disclosure combines the characteristics of the micro-application and designs two collaboration modes: tiling mode and split-screen mode.

[0111] Tiling mode:

[0112] When the screen angle is less than a preset threshold (such as 60°), the system determines that the screen is close to a folded state, and the mini-apps automatically switch to tile mode. At this time, all mini-apps are arranged compactly above the main app, supporting simple single-task interaction.

[0113] Split-screen mode:

[0114] When the screen angle exceeds a preset threshold (e.g., 100°), the system automatically switches to split-screen mode. At this time, the screen is divided into two parts: the upper screen displays the main application, and the lower screen displays auxiliary functions or other micro-applications, which is suitable for collaborative processing of multiple tasks.

[0115] According to embodiments of this disclosure, the layout and interaction logic can be automatically optimized on foldable screen devices to avoid interface stretching or occlusion issues, thereby improving the multi-screen collaboration experience and the flexibility of system human-computer interaction.

[0116] Based on the above-described micro-application data synchronization method, this disclosure also provides a micro-application data synchronization device. The following will be combined with... Figure 5 The device is described in detail.

[0117] Figure 5 A schematic block diagram of a micro-application data synchronization device according to an embodiment of the present disclosure is shown.

[0118] like Figure 5 As shown, the micro-application data synchronization device 500 of this embodiment includes: a construction module 510, a generation module 520, an encryption module 530, and a broadcast module 540.

[0119] The construction module 510 is used to construct a sandbox proxy channel, which is used to establish cross-domain communication paths between different micro-applications. In one embodiment, the construction module 510 can be used to perform the operation S210 described above, which will not be repeated here.

[0120] The generation module 520 is used to generate a differential description corresponding to the current change in the state of the microapplication in response to the detection of such a change. The differential description only records the content of the change. In one embodiment, the generation module 520 can be used to perform the operation S220 described above, which will not be repeated here.

[0121] The encryption module 530 is used to encrypt the differential description using a pre-configured hierarchical encryption mechanism to obtain ciphertext data. The hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model. In one embodiment, the encryption module 530 can be used to perform the operation S230 described above, which will not be repeated here.

[0122] The broadcast module 540 is used to broadcast encrypted data to a designated target microapplication via a sandbox proxy channel for data synchronization, utilizing the event bus center. In one embodiment, the broadcast module 540 can be used to perform the operation S240 described above, which will not be repeated here.

[0123] According to embodiments of this disclosure, any plurality of modules among the construction module 510, generation module 520, encryption module 530, and broadcast module 540 may be combined into one module, or any one of these modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the construction module 510, generation module 520, encryption module 530, and broadcast module 540 may be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the construction module 510, generation module 520, encryption module 530, and broadcast module 540 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0124] Figure 6 A block diagram schematically illustrates an electronic device suitable for implementing a micro-application data synchronization method according to an embodiment of the present disclosure.

[0125] like Figure 6 As shown, an electronic device 600 according to an embodiment of this disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage portion 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this disclosure.

[0126] RAM 603 stores various programs and data required for the operation of electronic device 600. Processor 601, ROM 602, and RAM 603 are interconnected via bus 604. Processor 601 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 602 and / or RAM 603. It should be noted that the programs may also be stored in one or more memories other than ROM 602 and RAM 603. Processor 601 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0127] According to embodiments of this disclosure, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to a bus 604. The electronic device 600 may also include one or more of the following components connected to the input / output (I / O) interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.

[0128] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0129] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 602 and / or RAM 603 and / or one or more memories other than ROM 602 and RAM 603 described above.

[0130] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to cause the computer system to implement the methods provided in the embodiments of this disclosure.

[0131] When the computer program is executed by the processor 601, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0132] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and / or installed from the removable medium 611. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0133] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0134] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on a user's computing device, partially on a user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0136] Those skilled in the art will understand that the features described in the various embodiments of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments of this disclosure can be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0137] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A micro-application data synchronization method, characterized in that, The method includes: Construct a sandbox proxy channel, wherein the sandbox proxy channel is used to establish cross-domain communication paths between different micro-applications; In response to the detection of a change in the current state of the micro-application, a differential description corresponding to this change is generated, wherein the differential description only records the content of the change that occurred in this instance; Based on the differential description, the differential description is encrypted using a pre-configured hierarchical encryption mechanism to obtain ciphertext data. The hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model. Using the event bus center, the encrypted data is broadcast to the designated target micro-application through the sandbox proxy channel for data synchronization.

2. The method according to claim 1, characterized in that, The sandbox proxy channel is configured as a multi-layer architecture, wherein the multi-layer architecture includes: The application layer is configured with a unified application programming interface, which includes a first interface for sending synchronization data to different micro-applications and a second interface for receiving synchronization data from different micro-applications. The proxy layer is configured to encrypt and encapsulate the synchronization data according to a preset sandbox proxy script; The transport layer is configured to transmit synchronized data between different micro-applications according to a preset cross-domain communication mechanism.

3. The method according to claim 2, characterized in that, The transport layer is configured with multiple sub-channels, wherein the multiple sub-channels include: Cross-application messaging channels are used for cross-domain message transmission between different micro-applications; Context broadcast channel is used for same-domain message transmission between multiple different pages of the same microapplication; A bridging channel is used for cross-domain message transmission between the main application and its sub-applications.

4. The method according to claim 1, characterized in that, The response to detecting a change in the current state of the micro-application generates a differential description corresponding to this change, including: In response to the detection of a change in the current state of the micro-application, the current state data of the micro-application is compared in a structured manner with the reference state data before the change; Based on the comparison results, a differential description conforming to the requirements of the differential synchronization protocol is generated according to a preset format.

5. The method according to claim 1, characterized in that, The step of encrypting the differential description using a pre-configured layered encryption mechanism to obtain ciphertext data includes: The business data in the differential description is encrypted using a symmetric encryption algorithm, wherein the symmetric encryption algorithm represents a first encryption model; The encapsulated metadata corresponding to the differential description is encrypted using a streaming encryption algorithm, wherein the streaming encryption algorithm represents a second encryption model.

6. The method according to claim 1, characterized in that, The step of using the event bus center to broadcast the encrypted data to the designated target micro-application through the sandbox proxy channel for data synchronization includes: Using the event bus center, it is detected whether the encrypted data matches the subscription topics of each micro-application; In response to the encrypted data matching the subscribed topic, the encrypted data is broadcast to the matching target micro-application through the sandbox proxy channel for data synchronization.

7. The method according to claim 1, characterized in that, The method further includes: The screen angle changes of each micro-application are detected by the foldable screen sensor; Based on the change in screen angle, switch the corresponding collaboration mode to support multi-screen interaction scenarios.

8. The method according to claim 7, characterized in that, The collaboration modes include tiling mode and split-screen mode; The step of switching the corresponding collaboration mode according to the change of screen angle to support multi-screen interaction scenarios includes: In response to detecting that the screen angle is less than a preset threshold, switch to the tiling mode; In response to detecting that the screen angle is greater than a preset threshold, the system switches to the split-screen mode.

9. A micro-application data synchronization device, characterized in that, The device includes: A building module is used to build a sandbox proxy channel, wherein the sandbox proxy channel is used to establish cross-domain communication paths between different micro-applications; The generation module is used to generate a differential description corresponding to the current change in response to the detection of a change in the current state of the micro-application. The differential description only records the content of the current change. An encryption module is used to encrypt the differential description using a pre-configured hierarchical encryption mechanism to obtain ciphertext data, wherein the hierarchical encryption mechanism includes encrypting the business data in the differential description using a first encryption model and encrypting the encapsulated metadata corresponding to the differential description using a second encryption model. The broadcast module is used to broadcast the encrypted data to a designated target microapplication through the sandbox proxy channel for data synchronization, utilizing the event bus center.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 8.