Cross-screen content synchronization and optimization method and system based on distributed storage
Patent Information
- Application Number
- CN202611194629.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-07
- Publication Date
- 2026-11-03
AI Technical Summary
Existing cross-screen content synchronization technologies are inefficient in environments with limited bandwidth and latency, and cannot dynamically adjust according to changes in the network environment, resulting in large differences in synchronization quality and efficiency. Furthermore, they fail to effectively address hierarchical synchronization and storage strategies, and cannot optimize the synchronization efficiency of different types of content and devices.
A cross-screen content synchronization method based on distributed storage is adopted. By dynamically generating synchronization strategies, differentiated processing and hierarchical storage are performed. Combined with incremental synchronization and adaptive display strategies, the synchronization process is optimized according to network bandwidth and device display characteristics.
Achieve rapid synchronization under different network conditions, reduce latency and bandwidth consumption, ensure the accuracy and integrity of content transmission, improve storage efficiency and display adaptability, and realize full-scale content display.
Smart Images

Figure CN123035208A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cross-device synchronization technology, and in particular to a method and system for cross-screen content synchronization and optimization based on distributed storage. Background Technology
[0002] With the rapid development of smart terminal devices, cross-device content synchronization technology has been widely used in various application scenarios. Especially in the fields of smart homes, mobile offices, and entertainment, users often need to synchronize content across multiple devices, and many studies and technologies have achieved real-time synchronization and interaction of content between different devices. However, in environments with limited bandwidth and latency, these traditional synchronization methods often face performance bottlenecks, resulting in low synchronization efficiency. This is particularly pronounced when transmitting high-resolution images, videos, and large amounts of data, where latency and insufficient bandwidth during transmission are especially prominent.
[0003] Current technologies for cross-screen synchronization typically rely on fixed synchronization strategies and transmission mechanisms, failing to dynamically adjust to changes in the actual network environment. This results in significant differences in synchronization efficiency and quality between devices under different network conditions. Existing technologies have certain shortcomings in dynamic bandwidth management, differentiated content processing, and cross-device display characteristic adaptation. Furthermore, existing technologies rarely address the implementation of hierarchical synchronization and storage strategies based on content usage frequency, which cannot effectively improve synchronization efficiency when dealing with different types of content and devices. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a method for cross-screen content synchronization and optimization based on distributed storage, which solves the problems of low synchronization efficiency, high latency and wasted bandwidth resources caused by network bandwidth fluctuations, differences in device display characteristics and frequent content changes during cross-screen content synchronization.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for cross-screen content synchronization and optimization based on distributed storage, comprising, During the cross-screen operation, the first device determines the content to be synchronized with the second device based on the user's operation, collects the current network status parameters, and dynamically generates a synchronization strategy based on the bandwidth adaptive method. Based on the synchronization strategy, the content to be synchronized is processed differently to generate incremental synchronization packages. Based on the frequency of content usage, a hierarchical synchronization and hierarchical storage strategy is implemented on the incremental synchronization packages to generate data distribution tables at all levels. After receiving the incremental synchronization packets corresponding to the data distribution tables at each level, the second device generates a display strategy for the synchronized content based on its own display characteristics, and monitors the content changes of the first and second devices in real time, performing block-level differential monitoring and incremental updates on the changed parts.
[0007] As a preferred embodiment of the cross-screen content synchronization and optimization method based on distributed storage described in this invention, wherein: during the cross-screen operation, the first device determines the content to be synchronized with the second device according to the user's operation, including the following steps: The first device uses specific gestures, shortcut commands, and Bluetooth / LAN pairing performed by the user as cross-screen trigger events, and enters cross-screen synchronization mode after detecting the trigger event. By parsing operation logs and UI layer events, the context information of the current interface is determined. After identifying the context information, the corresponding content data is extracted from the UI activity content to form a set of content identifiers to be synchronized.
[0008] As a preferred embodiment of the cross-screen content synchronization and optimization method based on distributed storage described in this invention, the step of collecting current network status parameters and dynamically generating a synchronization strategy based on a bandwidth adaptive method includes the following steps: The first device monitors and collects current network status information in real time, including network bandwidth, latency, and packet loss rate; By setting thresholds for network bandwidth, network bandwidth is divided into levels, and high-bandwidth, medium-bandwidth, and low-bandwidth strategies are formulated according to different network bandwidth levels. When the network bandwidth is high, the content to be synchronized is not compressed, and full synchronization is performed directly to quickly complete the content transmission. When the network bandwidth is medium, the content to be synchronized is not compressed. Instead, incremental synchronization is used to divide the content block into multiple small blocks for transmission. When network bandwidth is low, the content to be synchronized is compressed and transmitted using incremental synchronization. Set latency and packet loss rate thresholds. When the latency or packet loss rate exceeds the threshold, the waiting time for the first device to receive confirmation after each data transmission will be extended. If a data packet fails to arrive at the second device on time, the first device will resend the data packet. When the number of retransmissions reaches the set limit, if the first device still has not received confirmation, an alarm will be triggered and cross-screen synchronization will be stopped.
[0009] As a preferred embodiment of the cross-screen content synchronization and optimization method based on distributed storage described in this invention, the step of performing differentiated processing on the content to be synchronized according to the synchronization strategy to generate an incremental synchronization package includes the following steps: When using incremental synchronization for transmission, the content to be synchronized in the content identifier set to be synchronized is divided into blocks of fixed size to generate a content block list; A hash algorithm is used to generate a hash value for each content block, and the changed content block is obtained by comparing the hash value of the current interface content block with the hash value of the last synchronized content block. When using a medium bandwidth strategy, the variable content block is divided into two parts according to a fixed size to generate a list of content sub-blocks, and the offset and length information are recorded. When using a low-bandwidth strategy, the changing content blocks are compressed and the compressed content blocks are segmented. At the same time, the compression parameters and decoding information of each compressed segment are recorded. Generate block-level metadata for each changed content block, including content block number, content block offset and length, content block hash value, whether it is split twice, and whether it is compressed. If it is split, it includes the sequence number, offset and length of the content sub-block. If it is compressed, it includes compression parameters and decoding information. Based on the changed content blocks after differential processing, a transmittable data packet containing packet header information, block-level metadata, block data and verification fields is formed as an incremental synchronization packet. The hash values of all content blocks in the incremental synchronization packet are combined into a hash sequence to generate the incremental synchronization packet verification value. The packet header information includes the sequence number and content block number of the incremental synchronization packet, and the block data includes all content blocks.
[0010] As a preferred embodiment of the cross-screen content synchronization and optimization method based on distributed storage described in this invention, the step of implementing a hierarchical synchronization and hierarchical storage strategy for incremental synchronization packages based on content usage frequency to generate data distribution tables at various levels includes the following steps: Based on historical operation records, the usage frequency of each content block in the incremental synchronization package is calculated, and the synchronization priority of the content block is determined based on the usage frequency. Store high-priority content blocks in fast storage media and low-priority content blocks in low-cost storage media. Record the number, usage frequency, synchronization priority and storage location of all content blocks, generate data distribution tables at all levels, and send the corresponding incremental synchronization packets to the synchronization queue.
[0011] As a preferred embodiment of the cross-screen content synchronization and optimization method based on distributed storage described in this invention, the second device, after receiving the incremental synchronization packets corresponding to the data distribution tables at each level, generates a display strategy for the synchronized content based on its own display characteristics, including the following steps: After receiving the incremental synchronization packet from the synchronization queue, the second device judges the value based on the check value. If the check passes, it parses the packet header information and block-level metadata to obtain the secondary splitting / compression identifier, storage location, storage size and synchronization priority of the content block in the incremental synchronization packet, and extracts the content block data according to the synchronization priority. If the verification fails, the packet header information and block-level metadata are parsed, the hash value of the content block in the incremental synchronization packet is verified and judged to determine the content block that has been transmitted incorrectly. Based on the content block identifier, a partial retransmission of the content block is requested from the first device, and the received retransmitted content block is replaced in the incremental synchronization packet, and the verification value is judged again. Based on the detected secondary segmentation / compression flags, the content blocks are reassembled or decompressed to obtain the content to be synchronized. The reorganization of content blocks refers to the process of splicing the content blocks in order according to the sequence number of the content sub-blocks when a secondary segmentation marker is detected, and obtaining the content to be synchronized after splicing. The content block decompression process involves decompressing the compressed segments according to the compression parameters and decoding information when a compression flag is detected, obtaining the content block, and then splicing the content blocks in order according to the sequence number of the content sub-blocks to obtain the content to be synchronized. After the second device obtains the content to be synchronized, it reads its own display characteristics, including screen size, resolution and display ratio, and calculates the device's pixel density based on the display characteristics. The observation scale of the second device is obtained by multiplying the pixel density by the resolution and then dividing by the screen size. Set an observation scale threshold. When the observation scale of the device is greater than or equal to the observation scale threshold, the device type is determined to be a large screen device; otherwise, the device type is determined to be a small screen device. Display strategies are generated based on device type. For large-screen devices, the complete content is retained, and images, charts, and detailed text descriptions are enlarged according to the screen size. For small-screen devices, prioritize displaying content with high synchronization priority, and crop and scale content that occupies a large portion of the screen. When the second device rotates its screen or adjusts its resolution, the pixel density and observation scale of the device are recalculated and the device type is determined. After the device type is determined, the display strategy is regenerated. When the second device adopts the display strategy, it selects the BERT pre-trained language model and trains the language model using labeled training data. During the training process, the difference between the predicted result and the real label is used as the loss function. The gradient descent method is used to adjust the parameters of the language model with the goal of minimizing the loss function, so that the loss function is continuously reduced. When the number of iterations reaches the set upper limit, the trained semantic analysis model is obtained. The content to be synchronized is input into the trained semantic analysis model to obtain the corresponding semantic analysis results. The preset layout rules ensure that the content with the highest synchronization priority is always displayed in the center of the screen. For the remaining display space, the corresponding structure and format are defined for each type of semantic analysis result. The content to be synchronized is then laid out according to the preset layout rules based on the semantic analysis results. During the layout process, the cropping and scaling ratios of the content to be synchronized are calculated, and a cropping and scaling ratio threshold is set. When the cropping and scaling ratios are greater than or equal to the cropping and scaling ratio thresholds, the content to be synchronized is displayed using a collapsing method.
[0012] As a preferred embodiment of the cross-screen content synchronization and optimization method based on distributed storage described in this invention, the step of real-time monitoring of content changes between the first device and the second device, and performing block-level differential monitoring and incremental updates on the changed portions, includes the following steps: The system monitors changes in the data content of the first and second devices in real time. The first device continuously compares the data content of the two ends to accurately identify the specific data blocks that have changed, and only performs incremental updates on the changed parts.
[0013] Secondly, this invention provides a cross-screen content synchronization and optimization system based on distributed storage, including: The content synchronization determination module dynamically determines the content to be synchronized based on user actions when the first device performs a cross-screen operation. The network status detection module collects current network status parameters in real time and supports dynamic adjustment of the bandwidth adaptive synchronization strategy; The synchronization strategy generation module generates dynamic synchronization strategies based on network status and the content to be synchronized. The differentiation processing module identifies the changed parts in the content to be synchronized, performs differentiation processing, and generates an incremental synchronization package. The hierarchical synchronization storage module executes a hierarchical synchronization strategy on incremental synchronization packages based on the frequency of content usage, and adopts different storage strategies for content at different levels. The display adaptation module allows the second device to generate a display strategy for the synchronized content based on its own display characteristics, and use an adaptive layout algorithm to achieve full-scale display of the synchronized content.
[0014] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the cross-screen content synchronization and optimization method based on distributed storage as described in the first aspect of the present invention.
[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the cross-screen content synchronization and optimization method based on distributed storage as described in the first aspect of the present invention.
[0016] The beneficial effects of this invention are as follows: A dynamic bandwidth adaptive strategy automatically generates synchronization strategies under different bandwidth conditions based on real-time network status, ensuring fast synchronization in high-bandwidth environments and employing compression and incremental synchronization in low-bandwidth environments to reduce transmission latency and bandwidth consumption. Incremental synchronization and differentiated processing ensure the transmission accuracy and integrity of content under low-bandwidth or high-latency conditions by dividing the synchronized content into blocks, comparing hash values, and monitoring changes, while optimizing the transmission process. A hierarchical storage and synchronization strategy based on content usage frequency prioritizes content according to its usage frequency, storing high-priority content in fast storage media and low-priority content in low-cost media, improving storage efficiency and access speed. An adaptive display strategy calculates the observation scale and formulates corresponding display strategies based on the display characteristics of the second device, ensuring that small-screen devices prioritize displaying important content and perform cropping and scaling, while large-screen devices retain complete content and optimize image display, achieving full-scale display of synchronized content. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a method for cross-screen content synchronization and optimization based on distributed storage.
[0019] Figure 2 This is a schematic diagram of a cross-screen content synchronization and optimization system based on distributed storage.
[0020] Figure 3 Flowchart for receiving synchronization content for the second device. Detailed Implementation
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0024] Reference Figures 1-3 This is one embodiment of the present invention, which provides a method for cross-screen content synchronization and optimization based on distributed storage, including the following steps: During the cross-screen operation, the first device determines the content to be synchronized with the second device based on the user's operation, collects the current network status parameters, and dynamically generates a synchronization strategy based on the bandwidth adaptive method.
[0025] Specifically, the first device will use specific gestures performed by the user, such as swiping, quick commands, and Bluetooth / LAN pairing, as cross-screen trigger events, and will enter cross-screen synchronization mode after detecting the trigger event; By parsing operation logs and UI layer events, the context information of the current interface is determined. After identifying the context information, the corresponding content data is extracted from the UI activity content to form a set of content identifiers to be synchronized.
[0026] By using specific user gestures such as swipes, shortcut commands, or Bluetooth / LAN pairing as cross-screen trigger events, and entering cross-screen synchronization mode upon detecting these events, intelligent perception of user actions and automatic initiation of cross-device interaction are achieved. By parsing operation logs and UI layer events, the context information of the current interface is determined, thereby identifying and extracting corresponding data from the interface's activity content to form a set of content identifiers to be synchronized. This effectively improves the collaborative efficiency between cross-screen devices, ensuring a smooth user experience and accurate data synchronization between devices.
[0027] Furthermore, the first device monitors and collects current network status information in real time, including network bandwidth, latency, and packet loss rate; By setting thresholds for network bandwidth, network bandwidth is divided into levels, and high-bandwidth, medium-bandwidth, and low-bandwidth strategies are formulated according to different network bandwidth levels. When the network bandwidth is high, the content to be synchronized is not compressed, and full synchronization is performed directly to quickly complete the content transmission. When the network bandwidth is medium, the content to be synchronized is not compressed. Instead, incremental synchronization is used to divide the content block into multiple small blocks for transmission. When network bandwidth is low, the content to be synchronized is compressed and transmitted using incremental synchronization. Set latency and packet loss rate thresholds. When the latency or packet loss rate exceeds the threshold, the waiting time for the first device to receive confirmation after each data transmission will be extended. If a data packet fails to arrive at the second device on time, the first device will resend the data packet. When the number of retransmissions reaches the set limit, if the first device still has not received confirmation, an alarm will be triggered and cross-screen synchronization will be stopped.
[0028] By monitoring and collecting current network status information in real time, comprehensive awareness and dynamic adjustment of network conditions are achieved. Different thresholds are set based on network bandwidth, and corresponding high, medium, and low bandwidth strategies are formulated for different bandwidth levels, optimizing the data transmission process. By setting thresholds for latency and packet loss rate, when the network status is unstable, the confirmation waiting time for data transmission is extended, and data packets are retransmitted when necessary, ensuring the reliability and stability of data transmission. If multiple retransmissions fail to successfully confirm receipt, the system triggers an alarm and stops cross-screen synchronization, avoiding data synchronization errors or loss due to network problems and improving the robustness of cross-device synchronization.
[0029] Based on the synchronization strategy, the content to be synchronized is processed differently to generate incremental synchronization packages. Based on the frequency of content usage, a hierarchical synchronization and storage strategy is implemented on the incremental synchronization packages to generate data distribution tables at all levels.
[0030] Specifically, when using incremental synchronization for transmission, the content to be synchronized in the content identifier set is divided into blocks of fixed size to generate a content block list; A hash algorithm is used to generate a hash value for each content block, and the changed content block is obtained by comparing the hash value of the current interface content block with the hash value of the last synchronized content block. When using a medium bandwidth strategy, the variable content block is divided into two parts according to a fixed size to generate a list of content sub-blocks, and the offset and length information are recorded. When using a low-bandwidth strategy, the changing content blocks are compressed and the compressed content blocks are segmented. At the same time, the compression parameters and decoding information of each compressed segment are recorded. Generate block-level metadata for each changed content block, including content block number, content block offset and length, content block hash value, whether it is split twice, and whether it is compressed. If it is split, it includes the sequence number, offset and length of the content sub-block. If it is compressed, it includes compression parameters and decoding information. Based on the changed content blocks after differential processing, a transmittable data packet containing packet header information, block-level metadata, block data, and verification fields is formed as an incremental synchronization packet. The hash values of all content blocks in the incremental synchronization packet are combined into a hash sequence to generate the incremental synchronization packet verification value.
[0031] By employing incremental synchronization for transmission, the content to be synchronized is divided into fixed-size blocks, and a hash value is generated for each block using a hash algorithm. This effectively identifies the blocks that have changed. Different synchronization strategies are adopted based on network bandwidth policies, ensuring accurate processing of changed content. Furthermore, generating block-level metadata containing necessary identifiers, offsets, and decoding information improves the accuracy and flexibility of data transmission. By generating incremental synchronization packets from the processed content blocks and generating checksums based on the hash values, the reliability, transmission efficiency, and data integrity of incremental synchronization are ensured.
[0032] Furthermore, based on historical operation records, the usage frequency of each content block in the incremental synchronization package is calculated, and the synchronization priority of the content block is determined based on the usage frequency. Store high-priority content blocks in fast storage media and low-priority content blocks in low-cost storage media. Record the number, usage frequency, synchronization priority and storage location of all content blocks, generate data distribution tables at all levels, and send the corresponding incremental synchronization packets to the synchronization queue.
[0033] By statistically analyzing the usage frequency of each content block in the incremental synchronization packet based on historical operation records, intelligent judgment of the synchronization priority of content blocks is achieved, ensuring that frequently used content blocks are synchronized first. High-priority content blocks are stored in high-speed storage media, while infrequently used content blocks are stored in low-cost storage media, effectively optimizing the utilization of storage resources and improving synchronization efficiency. By recording the content block number, usage frequency, synchronization priority, and storage location, a data distribution table is generated, and the incremental synchronization packet is sent to the synchronization queue, improving the accuracy of data synchronization and transmission efficiency.
[0034] After receiving the incremental synchronization packets corresponding to the data distribution tables at each level, the second device generates a display strategy for the synchronized content based on its own display characteristics, and monitors the content changes of the first and second devices in real time, performing block-level differential monitoring and incremental updates on the changed parts.
[0035] Specifically, after receiving the incremental synchronization packet from the synchronization queue, the second device judges the value based on the check value. If the check passes, it parses the packet header information and block-level metadata to obtain the secondary splitting / compression identifier, storage location, storage size and synchronization priority of the content block in the incremental synchronization packet, and extracts the content block data according to the synchronization priority. If the verification fails, the packet header information and block-level metadata are parsed, the hash value of the content block in the incremental synchronization packet is verified and judged to determine the content block that has been transmitted incorrectly. Based on the content block identifier, a partial retransmission of the content block is requested from the first device, and the received retransmitted content block is replaced in the incremental synchronization packet, and the verification value is judged again. Based on the detected secondary segmentation / compression flags, the content blocks are reassembled and decompressed to obtain the content to be synchronized. The reorganization of content blocks refers to the process of splicing the content blocks in order according to the sequence number of the content sub-blocks when a secondary segmentation marker is detected, and obtaining the content to be synchronized after splicing. The content block decompression process involves decompressing the compressed segments according to the compression parameters and decoding information when a compression flag is detected, obtaining the content block, and then splicing the content blocks in order according to the sequence number of the content sub-blocks to obtain the content to be synchronized. After acquiring the content to be synchronized, the second device reads its own display characteristics, including screen size, resolution, and aspect ratio, and calculates the device's pixel density based on these characteristics. The formula is as follows: ; in, For the pixel density of the second device, Width is the resolution. The height of the resolution, This refers to the screen size of the second device.
[0036] The observation scale of the second device is obtained by multiplying the pixel density by the resolution and then dividing by the screen size. Set an observation scale threshold. When the observation scale of the device is greater than or equal to the observation scale threshold, the device type is determined to be a large screen device; otherwise, the device type is determined to be a small screen device. Display strategies are generated based on device type. For large-screen devices, the complete content is retained, and images, charts, and detailed text descriptions are enlarged according to the screen size. For small-screen devices, prioritize displaying content with high synchronization priority, and crop and scale content that occupies a large portion of the screen. When the second device rotates its screen or adjusts its resolution, the pixel density and observation scale of the device are recalculated and the device type is determined. After the device type is determined, the display strategy is regenerated. When the second device adopts the display strategy, it selects the BERT pre-trained language model and trains the language model using labeled training data. During the training process, the difference between the predicted result and the real label is used as the loss function. The gradient descent method is used to adjust the parameters of the language model with the goal of minimizing the loss function, so that the loss function is continuously reduced. When the number of iterations reaches the set upper limit, the trained semantic analysis model is obtained. The content to be synchronized is input into the trained semantic analysis model to obtain the corresponding semantic analysis results. The preset layout rules ensure that the content with the highest synchronization priority is always displayed in the center of the screen. For the remaining display space, the corresponding structure and format are defined for each type of semantic analysis result. The content to be synchronized is then laid out according to the preset layout rules based on the semantic analysis results. During the layout process, the cropping and scaling ratios of the content to be synchronized are calculated, and a cropping and scaling ratio threshold is set. When the cropping and scaling ratios are greater than or equal to the cropping and scaling ratio thresholds, the content to be synchronized is displayed using a collapsing method.
[0037] The second device receives incremental synchronization packets and verifies their checksums to ensure data integrity and accuracy. If the checksum verification fails, the erroneous content block is precisely retrieved based on the hash value, and the first device is requested to resend the erroneous content block. This reduces redundancy in resending data while ensuring data integrity. The second device calculates the observation scale based on its own display characteristics and generates corresponding display strategies according to device type, optimizing content display methods. This achieves precise adaptation and efficient display of synchronized content across devices, ensuring optimal display effects on different devices. By training a semantic analysis model and pre-setting layout rules, efficient content layout is performed based on the synchronization priority of the content and the semantic analysis results. During the layout process, content is cropped and scaled to ensure the adaptability and smoothness of the displayed content.
[0038] Furthermore, the system monitors changes in the data content of the first and second devices in real time. The first device continuously compares the data content of the two ends to accurately identify the specific data blocks that have changed, and only performs incremental updates on the changed parts.
[0039] By monitoring the changes in data content between the first and second devices in real time, and having the first device continuously compare the data content at both ends, the specific data blocks that have changed are accurately identified. Incremental updates are performed only on the changed parts, achieving high efficiency and accuracy in data transmission. This avoids the redundancy and performance loss caused by full data synchronization, and also ensures resource conservation and update efficiency during the data synchronization process.
[0040] This embodiment also provides a cross-screen content synchronization and optimization system based on distributed storage, including: The content synchronization determination module dynamically determines the content to be synchronized based on user actions when the first device performs a cross-screen operation. The network status detection module collects current network status parameters in real time and supports dynamic adjustment of the bandwidth adaptive synchronization strategy; The synchronization strategy generation module generates dynamic synchronization strategies based on network status and the content to be synchronized. The differentiation processing module identifies the changed parts in the content to be synchronized, performs differentiation processing, and generates an incremental synchronization package. The hierarchical synchronization storage module executes a hierarchical synchronization strategy on incremental synchronization packages based on the frequency of content usage, and adopts different storage strategies for content at different levels. The display adaptation module allows the second device to generate a display strategy for the synchronized content based on its own display characteristics, and use an adaptive layout algorithm to achieve full-scale display of the synchronized content.
[0041] This embodiment also provides a computer device applicable to the cross-screen content synchronization and optimization method based on distributed storage, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the cross-screen content synchronization and optimization method based on distributed storage as proposed in the above embodiment.
[0042] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0043] This embodiment also provides a storage medium on which a computer program is stored. When executed by a processor, the program implements the cross-screen content synchronization and optimization method based on distributed storage as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0044] In summary, this invention employs the following strategies: A dynamic bandwidth adaptive strategy automatically generates synchronization strategies under different bandwidth conditions based on real-time network status, ensuring rapid synchronization in high-bandwidth environments and using compression and incremental synchronization in low-bandwidth environments to reduce transmission latency and bandwidth consumption. Incremental synchronization and differentiated processing ensure transmission accuracy and integrity under low-bandwidth or high-latency conditions by dividing the synchronized content into blocks, comparing hash values, and monitoring changes, while optimizing the transmission process. A hierarchical storage and synchronization strategy based on content usage frequency prioritizes content according to its usage frequency, storing high-priority content in fast storage media and low-priority content in low-cost media, improving storage efficiency and access speed. An adaptive display strategy calculates the observation scale based on the display characteristics of the second device and formulates corresponding display strategies, ensuring that small-screen devices prioritize displaying important content and perform cropping and scaling, while large-screen devices retain complete content and optimize image display, achieving full-scale display of synchronized content.
[0045] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method and system for cross-screen content synchronization and optimization based on distributed storage, characterized in that: include, During the cross-screen operation, the first device determines the content to be synchronized with the second device based on the user's operation, collects the current network status parameters, and dynamically generates a synchronization strategy based on the bandwidth adaptive method. Based on the synchronization strategy, the content to be synchronized is processed differently to generate incremental synchronization packages. Based on the frequency of content usage, a hierarchical synchronization and hierarchical storage strategy is implemented on the incremental synchronization packages to generate data distribution tables at all levels. After receiving the incremental synchronization packets corresponding to the data distribution tables at each level, the second device generates a display strategy for the synchronized content based on its own display characteristics, and monitors the content changes of the first and second devices in real time, performing block-level differential monitoring and incremental updates on the changed parts.
2. The cross-screen content synchronization and optimization method based on distributed storage as described in claim 1, characterized in that: During the cross-screen operation, the first device determines the content to be synchronized with the second device based on user input, including the following steps: The first device uses specific gestures, shortcut commands, and Bluetooth / LAN pairing performed by the user as cross-screen trigger events, and enters cross-screen synchronization mode after detecting the trigger event. By parsing operation logs and UI layer events, the context information of the current interface is determined. After identifying the context information, the corresponding content data is extracted from the UI activity content to form a set of content identifiers to be synchronized.
3. The cross-screen content synchronization and optimization method based on distributed storage as described in claim 2, characterized in that: The process of collecting current network status parameters and dynamically generating a synchronization strategy based on a bandwidth adaptive method includes the following steps: The first device monitors and collects current network status information in real time, including network bandwidth, latency, and packet loss rate; By setting thresholds for network bandwidth, network bandwidth is divided into levels, and high-bandwidth, medium-bandwidth, and low-bandwidth strategies are formulated according to different network bandwidth levels. Set latency and packet loss rate thresholds. When the latency or packet loss rate exceeds the threshold, the waiting time for the first device to receive confirmation after each data transmission will be extended. If a data packet fails to arrive at the second device on time, the first device will resend the data packet. When the number of retransmissions reaches the set limit, if the first device still has not received confirmation, an alarm will be triggered and cross-screen synchronization will be stopped.
4. The cross-screen content synchronization and optimization method based on distributed storage as described in claim 3, characterized in that: The generation of the incremental synchronization package includes the following steps: When using incremental synchronization for transmission, the content to be synchronized in the content identifier set is divided into blocks of fixed size to generate a content block list. A hash algorithm is used to generate a hash value for each content block, and the changed content block is obtained by comparing the hash value of the current interface content block with the hash value of the last synchronized content block. When using a medium bandwidth strategy, the changed content block is divided into two parts according to a fixed size to generate a list of content sub-blocks, and the offset and length information are recorded. When using a low-bandwidth strategy, the changing content blocks are compressed and the compressed content blocks are segmented. At the same time, the compression parameters and decoding information of each compressed segment are recorded. Generate block-level metadata for each changed content block, including content block number, content block offset and length, content block hash value, whether it is a secondary split identifier, and whether it is a compression identifier; if a split identifier exists, it includes the sequence number, offset, and length of the content sub-block; if a compression identifier exists, it includes compression parameters and decoding information. Based on the changed content blocks after differential processing, a transmittable data packet containing packet header information, block-level metadata, block data, and verification fields is formed as an incremental synchronization packet. The hash values of all content blocks in the incremental synchronization packet are combined into a hash sequence to generate the incremental synchronization packet verification value.
5. The cross-screen content synchronization and optimization method based on distributed storage as described in claim 4, characterized in that: The steps for generating the data distribution tables at each level include: Based on historical operation records, the usage frequency of each content block in the incremental synchronization package is calculated, and the synchronization priority of the content block is determined based on the usage frequency. Store high-priority content blocks in fast storage media and low-priority content blocks in low-cost storage media. Record the number, usage frequency, synchronization priority and storage location of all content blocks, generate data distribution tables at all levels, and send the corresponding incremental synchronization packets to the synchronization queue.
6. The cross-screen content synchronization and optimization method based on distributed storage as described in claim 5, characterized in that: After receiving the incremental synchronization packets corresponding to the data distribution tables at each level, the second device generates a display strategy for the synchronized content based on its own display characteristics, including the following steps: After receiving the incremental synchronization packet from the synchronization queue, the second device judges the value based on the check value. If the check passes, it parses the packet header information and block-level metadata to obtain the secondary splitting / compression identifier, storage location, storage size and synchronization priority of the content block in the incremental synchronization packet, and extracts the content block data according to the synchronization priority. If the verification fails, the packet header information and block-level metadata are parsed, the hash value of the content block in the incremental synchronization packet is verified and judged to determine the content block that has been transmitted incorrectly. Based on the content block identifier, a partial retransmission of the content block is requested from the first device, and the received retransmitted content block is replaced in the incremental synchronization packet, and the verification value is judged again. Based on the detected secondary segmentation / compression flags, the content blocks are reassembled and decompressed to obtain the content to be synchronized. The reorganization of content blocks refers to the process of splicing the content blocks in order according to the sequence number of the content sub-blocks when a secondary segmentation marker is detected, and obtaining the content to be synchronized after splicing. The content block decompression process involves decompressing the compressed segments according to the compression parameters and decoding information when a compression flag is detected, obtaining the content block, and then splicing the content blocks in order according to the sequence number of the content sub-blocks to obtain the content to be synchronized. After the second device obtains the content to be synchronized, it reads its own display characteristics, including screen size, resolution and display ratio, and calculates the device's pixel density based on the display characteristics. The observation scale of the second device is obtained by multiplying the pixel density by the resolution and then dividing by the screen size. Set an observation scale threshold. When the observation scale of the device is greater than or equal to the observation scale threshold, the device type is determined to be a large screen device; otherwise, the device type is determined to be a small screen device. Display strategies are generated based on device type. For large-screen devices, the complete content is retained, and images, charts, and detailed text descriptions are enlarged according to the screen size. For small-screen devices, prioritize displaying content with high synchronization priority, and crop and scale content that occupies a large portion of the screen. When the second device rotates its screen or adjusts its resolution, the pixel density and observation scale of the device are recalculated and the device type is determined. After the device type is determined, the display strategy is regenerated. When the second device adopts the display strategy, it selects the BERT pre-trained language model and trains the language model using labeled training data. During the training process, the difference between the predicted result and the real label is used as the loss function. The gradient descent method is used to adjust the parameters of the language model with the goal of minimizing the loss function. When the number of iterations reaches the set upper limit, the trained semantic analysis model is obtained. The content to be synchronized is input into the trained semantic analysis model to obtain the corresponding semantic analysis results. The preset layout rules ensure that the content with the highest synchronization priority is always displayed in the center of the screen. For the remaining display space, the corresponding structure and format are defined for each type of semantic analysis result. The content to be synchronized is then laid out according to the preset layout rules based on the semantic analysis results. During the layout process, the cropping and scaling ratios of the content to be synchronized are calculated, and a cropping and scaling ratio threshold is set. When the cropping and scaling ratios are greater than or equal to the cropping and scaling ratio thresholds, the content to be synchronized is displayed using a collapsing method.
7. The cross-screen content synchronization and optimization method based on distributed storage as described in claim 6, characterized in that: The real-time monitoring of content changes between the first and second devices, and the execution of block-level differential monitoring and incremental updates for the changed portions, includes the following steps: The system monitors changes in the data content of the first and second devices in real time. The first device continuously compares the data content of the two ends to accurately identify the specific data blocks that have changed, and only performs incremental updates on the changed parts.
8. A cross-screen content synchronization and optimization system based on distributed storage, based on the file encryption method according to any one of claims 1 to 7, characterized in that: include, The content synchronization determination module dynamically determines the content to be synchronized based on user actions when the first device performs a cross-screen operation. The network status detection module collects current network status parameters in real time and supports dynamic adjustment of the bandwidth adaptive synchronization strategy; The synchronization strategy generation module generates dynamic synchronization strategies based on network status and the content to be synchronized. The differentiation processing module identifies the changed parts in the content to be synchronized, performs differentiation processing, and generates an incremental synchronization package. The hierarchical synchronization storage module executes a hierarchical synchronization strategy on incremental synchronization packages based on the frequency of content usage, and adopts different storage strategies for content at different levels. The display adaptation module allows the second device to generate a display strategy for the synchronized content based on its own display characteristics, and use an adaptive layout algorithm to achieve full-scale display of the synchronized content.
9. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the cross-screen content synchronization and optimization method based on distributed storage as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the cross-screen content synchronization and optimization method based on distributed storage as described in any one of claims 1 to 7.
