Configuration updating method, device, system and medium

By calculating the configuration difference rate and analyzing client profiles, the configuration update strategy is dynamically determined, which solves the problems of high bandwidth consumption and decompression performance bottleneck in mobile configuration updates, achieves a balance between network transmission and decompression time, and improves update efficiency and user experience.

CN121664652APending Publication Date: 2026-03-13CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

In existing technologies, there are problems such as high bandwidth consumption and decompression performance bottlenecks on low-end devices during mobile configuration updates, especially in full push mode, which leads to wasted traffic and device lag.

Method used

By calculating the difference rate between the target configuration version and the current client version, and combining it with the client profile, the configuration update strategy is dynamically determined, including the configuration distribution mode and decompression mode, to optimize the balance between network transmission and decompression time.

Benefits of technology

It effectively reduces network bandwidth consumption, avoids the decompression performance bottleneck of low-end devices, and improves the efficiency of configuration updates and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664652A_ABST
    Figure CN121664652A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software configuration updating, and discloses a configuration updating method, device and system and a medium, and the method comprises the steps: calculating a difference rate between a target configuration version and a current configuration version in a client; determining a configuration updating strategy according to the difference rate and the client portrait; and generating a target configuration packet based on the configuration updating strategy, and issuing the target configuration packet to the client to update the configuration version of the client. According to the method, the configuration updating strategy is dynamically determined by calculating the configuration difference rate and analyzing the client portrait, so that the problems of high bandwidth consumption and decompression performance bottleneck of low-end equipment are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software configuration update technology, specifically to a configuration update method, apparatus, system, and medium. Background Technology

[0002] In related technologies, application data relies on a configuration center for centralized management and dynamic publishing of configurations. Configurations are then distributed to mobile devices using a full-push model, meaning that regardless of the size of the changes in configuration content, all configuration data is transmitted to the mobile terminal. This results in a large amount of unchanging data being repeatedly transmitted, causing significant data wastage. Although some related technologies introduce data compression to save data, it still involves compressing the entire original data, especially on low-end devices, which not only fails to save much data but also causes device lag. Summary of the Invention

[0003] This invention provides a configuration update method, apparatus, system, and medium, which reduces network bandwidth consumption and dynamically optimizes update strategies based on client performance and network status, thereby improving configuration update efficiency.

[0004] In a first aspect, the present invention provides a configuration update method applied to a server, the method comprising: calculating the difference rate between a target configuration version and the current configuration version in a client; determining a configuration update strategy based on the difference rate and a client profile, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time; generating a target configuration package based on the configuration update strategy, and sending the target configuration package to the client to update the client's configuration version.

[0005] Based on the above technical means, the technical solution in this embodiment dynamically determines the configuration update strategy by calculating the configuration difference rate and analyzing the client profile, thereby solving the problems of high bandwidth consumption and low-end device decompression performance bottleneck in related technologies.

[0006] In an optional implementation, this application further proposes that the client profile includes network information and performance information, and the configuration update strategy includes a configuration delivery mode and a decompression mode. The configuration update strategy is determined based on the difference rate and the client profile, including: when the network information is a first network, setting the configuration delivery mode to full mode and the decompression mode to a first decompression mode, wherein the first network is a network mode without bandwidth cost restrictions, and the first decompression mode uses a compression algorithm with a compression ratio greater than a preset compression ratio threshold, and uses a background asynchronous thread as the decompression thread; when the network information is a second network, determining the configuration delivery mode based on the difference rate and the decompression mode based on the performance information, wherein the second network is a network mode with bandwidth cost restrictions.

[0007] Based on the above technical means, by specifying the components of the client profile (network information and performance information) and the composition of the configuration update strategy (configuration distribution mode and decompression mode), the problem of lack of fine-grained adaptation when balancing network transmission and decompression requirements is solved.

[0008] In an optional implementation, this application also proposes to determine the configuration distribution mode based on the difference rate, including: when the difference rate is greater than a preset threshold, setting the configuration distribution mode to full mode; when the difference rate is less than the preset threshold, setting the configuration distribution mode to differential mode, wherein the differential mode is used to transmit the changed part of the configuration version.

[0009] Based on the aforementioned technical means, the dynamic decision-making mechanism based on the difference rate threshold avoids the bandwidth waste and low transmission efficiency caused by using the full mode when the difference rate is small. Thus, in a network environment with limited bandwidth, a better balance between network transmission time and decompression time is achieved, improving the efficiency of configuration updates and user experience.

[0010] In one optional implementation, this application also proposes that the decompression mode includes a decompression algorithm and a decompression thread. The decompression mode is determined based on performance information, including: if the performance information is at a first level, then the decompression algorithm is set as a first decompression algorithm and the decompression thread is set as the main thread, wherein the compression ratio of the first decompression algorithm is less than a preset compression ratio threshold; if the performance information is at a second level, then the decompression algorithm is set as a second decompression algorithm and the decompression thread is set as a background asynchronous thread, wherein the compression ratio of the second decompression algorithm is greater than the preset compression ratio threshold, and the performance of the second level is higher than that of the first level.

[0011] Based on the aforementioned technical means, by dynamically adjusting the decompression algorithm and decompression thread strategy according to the specific performance information of the client device, an effective balance between network transmission time and decompression time is achieved, which optimizes data transmission efficiency while taking into account the decompression capabilities and user experience of devices with different performance levels.

[0012] In an alternative implementation, this application also proposes that, before calculating the difference rate between the target configuration version and the current configuration version in the client, the method further includes: obtaining heartbeat information reported by the client to obtain a client profile.

[0013] Based on the aforementioned technical methods, the server can proactively obtain the latest heartbeat information reported by the client, thereby accurately and in real-time monitoring of the client's network status and device performance. This ensures the accuracy of subsequent configuration update strategies and avoids policy deviations caused by inaccurate or outdated client profiles.

[0014] In an optional implementation, this application also proposes that the client profile includes network latency, and that a configuration update strategy is determined based on the difference rate and the client profile, further including: when the network latency is greater than a preset latency threshold, setting the decompression algorithm to a second decompression algorithm.

[0015] Based on the above technical means, when the network latency is high, a decompression algorithm with a relatively high compression ratio can be selected, sacrificing some decompression time to obtain a faster network transmission speed.

[0016] In an optional implementation, this application also proposes setting the configuration distribution mode to differential mode when the difference rate is less than a preset threshold, including: when the difference rate is less than the preset threshold, recording the path changes of the structured configuration in the configuration version based on the key-value pair differential algorithm.

[0017] Based on the above technical means, a difference patch package is generated from the modified binary file using a binary file differential comparison algorithm, wherein the preset threshold is determined according to the size of the configured version.

[0018] The technical solution in this embodiment can achieve differential updates of configuration in a more refined and efficient manner. By generating accurate differential patch packages, it reduces the burden of client decompression and application, and improves the overall efficiency of configuration updates.

[0019] Secondly, the present invention provides a configuration update method applied to a client, the method comprising: receiving and parsing the header information of a target configuration packet, obtaining a configuration update strategy, wherein the target configuration version and the configuration update strategy are obtained according to the above configuration update method; and configuring the target configuration version on the client according to the configuration update strategy.

[0020] In an optional implementation, this application also proposes a configuration update strategy that includes a configuration distribution mode. The target configuration version is configured on the client according to the configuration update strategy, including: if the configuration distribution mode is a differential mode, when a preset condition is met, the target configuration version is decompressed based on the decompression thread and decompression algorithm specified by the configuration update strategy, so as to update the configuration information on the client.

[0021] Based on the above technical means, decompression is performed using the decompression thread and decompression algorithm specified by the configuration update strategy, ensuring that the client can use the most suitable decompression method according to its own performance and network conditions, thereby improving update efficiency.

[0022] In an optional implementation, this application also proposes configuring the target configuration version on the client according to the configuration update strategy, further comprising: if the configuration distribution mode is differential mode, sending a full mode request to the server when the preset conditions are not met.

[0023] Based on the above technical means, when differential update cannot be performed smoothly, the client can promptly revert to the full update mechanism, ensuring the reliability and success rate of client configuration updates and avoiding potential client function abnormalities or data inconsistencies caused by differential update failure.

[0024] In an optional implementation, this application also proposes that the preset conditions include at least one of the following: the base version number in the target configuration version is consistent with the version number in the current configuration version, or the base version, differential data and current configuration modification data of the current configuration are abnormally merged, or the data format verification in the target configuration version is abnormal.

[0025] Based on the aforementioned technical means, the introduction of preset conditions enhances the robustness and security of client configuration updates, and reduces the risk of affecting user experience due to update failures, configuration errors, or client anomalies. In an optional implementation, this application also proposes to configure the target configuration version on the client according to the configuration update strategy, which further includes: if the configuration distribution mode is full mode, decompressing the target configuration version based on the decompression thread and decompression algorithm specified by the configuration update strategy, so as to update the configuration information on the client.

[0026] Based on the aforementioned technical means, specific scenarios involving full configuration updates are addressed, compensating for the shortcomings of focusing solely on differential modes.

[0027] Thirdly, the present invention provides a configuration update device applied to a server. The device includes: a calculation module for calculating the difference rate between a target configuration version and the current configuration version of the client; a strategy module for determining a configuration update strategy based on the difference rate and the client profile, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time; and an update module for updating the configuration version of the client based on the configuration update strategy.

[0028] Fourthly, the present invention provides a configuration update apparatus applied to a client. The apparatus includes: a parsing module, used to receive and parse the header information of a target configuration packet to obtain a configuration update strategy, wherein the target configuration packet and the configuration update strategy are obtained according to the above-described configuration update method; and a configuration module, used to configure the target configuration version on the client according to the configuration update strategy.

[0029] Fifthly, the present invention provides a configuration update system, comprising: a server and a client; the server is used to calculate the difference rate between a target configuration version and the current configuration version in the client; the server determines a configuration update strategy based on the difference rate and a client profile, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time; the server generates a target configuration package based on the configuration update strategy and sends the target configuration package to the client; the client is used to receive and parse the header information of the target configuration package to obtain the configuration update strategy; the client configures the target configuration version in itself according to the configuration update strategy.

[0030] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the configuration update method of the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of the present invention, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of the first type of configuration update method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a second process for a configuration update method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the third process of the configuration update method according to an embodiment of the present invention; Figure 4 This is a first structural block diagram of a configuration update device according to an embodiment of the present invention; Figure 5 This is a second structural block diagram of the configuration update method according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the configuration update system according to an embodiment of the present invention.

[0033] Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0035] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0036] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0037] This application proposes a configuration update method, applied to the server side, such as... Figure 1 As shown, the method includes: Step S101: Calculate the difference rate between the target configuration version and the current configuration version in the client.

[0038] The target configuration version refers to the latest set of configuration data that the server plans to update to the client. This version contains all the configuration information required by the client and is the ultimate goal of the client's configuration update. The current configuration version in the client refers to the set of configuration data that the client is currently using. This version represents the client's configuration state before receiving the update and serves as the benchmark for comparing differences with the target configuration version. The difference rate is a quantitative indicator of the content differences between the target configuration version and the current configuration version in the client. This indicator reflects the proportion or degree of inconsistency between the two versions, providing data support for the formulation of subsequent strategies.

[0039] Step S102: Based on the difference rate and the client profile, determine the configuration update strategy, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time.

[0040] The client profile refers to a comprehensive set of information describing the performance and network status of client devices. This profile reflects the client's hardware processing capabilities, memory status, and key parameters such as bandwidth and latency of the current network, forming the basis for personalized update strategies. The configuration update strategy, determined based on the difference rate and client profile, is a specific scheme used to guide the configuration update process. This strategy aims to achieve an effective balance between network transmission and decompression time by optimizing data transmission and decompression methods.

[0041] Step S103 generates a target configuration package based on the configuration update strategy and sends the target configuration package to the client to update the client's configuration version.

[0042] The network transmission time refers to the time required for configuration data to be transmitted from the server to the client. This time is affected by factors such as data packet size, network bandwidth, and network congestion. The decompression time refers to the time required for the client to decompress the compressed configuration data after receiving it. This time is affected by factors such as the complexity of the compression algorithm, data packet size, and client CPU performance. The configuration update method of this application is deployed and executed on the server side. The server side is responsible for managing configuration versions, collecting client information, and formulating update strategies.

[0043] In one example, the difference rate can be calculated in several ways. For instance, the target configuration version can be compared file-by-file or block-by-block with the current configuration version on the client, and the proportion of inconsistent parts relative to the total configuration size can be calculated. Alternatively, the contents of the two configuration versions can be hashed, and if the hash values ​​differ, the degree of difference can be quantified using simple text comparison algorithms (such as line comparison or character comparison). The configuration update strategy can be determined based on a preset set of rules or decision logic. For example, when the difference rate is high, one transmission method may be preferred; when the client's performance or network status exhibits a specific pattern, another transmission method may be preferred. The strategy aims to comprehensively consider multiple factors to achieve the optimal overall update effect. The client profile can include a series of indicators reflecting the client's current operating status. For example, performance aspects may include the client device's CPU load, available memory, and battery level; network status aspects may include the type of network the client is connected to (such as Wi-Fi, cellular network), network bandwidth, and signal strength. This can be obtained through periodic reporting by the client or active probing by the server, providing a basis for the server to formulate personalized update strategies. Balancing network transmission time and decompression time means that when formulating a strategy, it's necessary to weigh the time required for data to travel through the network against the time required for the client to decompress the received data. For example, when network bandwidth is ample but client processing power is limited, the strategy might favor a method that transmits slightly larger amounts of data but has a lighter decompression burden; conversely, when network bandwidth is limited but client processing power is strong, the strategy might favor a method that transmits smaller amounts of data but has a slightly heavier decompression burden. This balance can be achieved by adjusting packet size, compression level, or decompression method.

[0044] After determining the configuration update policy, the server processes the target configuration version according to the policy. For example, if the policy instructs for data compression, the target configuration version is compressed as a whole. The generated target configuration version is a data packet processed by the policy, ready to be sent to the client. The server sends the target configuration version generated according to the above policy to the corresponding client. After receiving the target configuration version, the client updates its own configuration according to the instructions or preset logic contained therein, thereby realizing the iteration of configuration versions.

[0045] It is understood that this application effectively solves the problems of high bandwidth consumption and decompression performance bottlenecks of low-end devices by dynamically determining the configuration update strategy through calculating the configuration difference rate and analyzing client profiles. This method can intelligently balance network transmission time and decompression time, avoiding traffic waste and device lag caused by full push, significantly optimizing the configuration update process and improving user experience. In some embodiments, this application further proposes that the client profile includes network information and performance information, and the configuration update strategy includes a configuration delivery mode and a decompression mode. Based on the difference rate and the client profile, the configuration update strategy is determined, including: Step a1: When the network information is the first network, the configuration distribution mode is set to full mode and the decompression mode is set to the first decompression mode. The first network is a network mode without bandwidth cost restrictions. The first decompression mode adopts a compression algorithm with a compression ratio greater than the preset compression ratio threshold and uses a background asynchronous thread as the decompression thread.

[0046] Step a2: When the network information is the second network, determine the configuration distribution mode based on the difference rate and the decompression mode based on the performance information, wherein the second network is a network mode with limited bandwidth costs.

[0047] In one example, a client profile provides the server with real-time or recent operational environment information about the client, enabling the server to make informed decisions. A client profile is a structured data object, such as JSON, containing multiple fields describing various client characteristics. Specifically, the client profile includes network information and client performance information. Network information describes the client's network environment, such as network type (Wi-Fi, 4G, 5G, etc.), signal strength, network latency, estimated bandwidth, and whether it's a metered network. Performance information describes the client device's hardware capabilities and current resource usage, such as CPU model, number of cores, memory size, current CPU utilization, battery level, and device temperature. This detailed information allows the server to gain a comprehensive understanding of the client's operational status.

[0048] Network information is a component of the client profile, reflecting the client's current connection status and network characteristics. It helps the server determine whether the current network environment is suitable for large-scale data transmission or high-intensity data processing. For example, network information can specify whether the client is currently connected to a Wi-Fi network, a mobile data network (such as 4G or 5G), or a wired network. Furthermore, it may include estimated network bandwidth, network latency, packet loss rate, and other metrics. By analyzing network information, the server can assess the cost and efficiency of network transmission.

[0049] Performance information is another component of the client profile, describing the computing power and resource availability of client devices. It helps the server assess the client device's capacity to handle computationally intensive tasks such as decompression, thus preventing device lag or slow response due to excessive workload. For example, performance information may include the client device's CPU model, number of processor cores, available memory size, current CPU load, and GPU performance metrics. It can help the server categorize client devices into different performance levels, such as high-end, mid-range, or low-end devices, to develop targeted decompression strategies.

[0050] A configuration update strategy is an execution plan devised by the server based on client profiles and difference rates for the current configuration update. It guides the client on how to receive and process the target configuration version, achieving an optimal balance between network transmission time and decompression time. A configuration update strategy can include a configuration delivery mode and a decompression mode. The configuration delivery mode determines how configuration data is transmitted from the server to the client, such as transmitting all configuration data or only the changed parts. The decompression mode determines which algorithm and thread the client should use for decompression after receiving the configuration data.

[0051] Configuration delivery mode is an element of configuration update strategy, used to specify how the server transmits configuration data to the client. It controls the amount of data transmitted over the network, thus affecting network transmission time and bandwidth consumption. Configuration delivery modes can include full mode and differential mode. Full mode means the server transmits the complete and latest target configuration version to the client. Differential mode means the server only transmits the differences between the target configuration version and the client's current configuration version.

[0052] The decompression mode is another element in the configuration update strategy, used to specify the specific method the client uses to decompress the received configuration data. It balances decompression efficiency, resource consumption, and final data size, thus affecting decompression time and client performance. The decompression mode can include the selection of a decompression algorithm and the specification of a decompression thread. Decompression algorithms are those with different compression ratios and decompression speeds, such as Zstd, Gzip, and LZ4. The decompression thread can be the client's main thread or a background asynchronous thread.

[0053] First-class networks refer to a network model where bandwidth costs are not limited. In this network environment, users do not need to worry about data consumption, as network bandwidth is usually sufficient. For example, a first-class network can refer to a Wi-Fi network or a wired local area network to which the client connects. Under this network condition, the server can prioritize transmission efficiency and data integrity without being overly concerned about data volume.

[0054] The first decompression mode is a specific decompression strategy that employs a compression algorithm with a compression ratio greater than a preset threshold and uses a background asynchronous thread as the decompression thread. When network bandwidth is sufficient, it aims to minimize network transmission time through high compression ratios to compensate for decompression time. Simultaneously, placing the computationally intensive decompression task in a background asynchronous thread avoids blocking the client's main thread, thus ensuring a smooth user interface. For example, the Zstd algorithm with a high compression level can be used. The decompression thread can be a separate background worker thread or a thread in a thread pool, separate from the client's main thread, ensuring that the decompression process does not affect the responsiveness of the user interface.

[0055] Secondary networks refer to a network model with limited bandwidth costs. In this network environment, users typically need to monitor data traffic consumption, as network bandwidth may be relatively limited or unstable. For example, a secondary network can refer to a mobile data network (such as 4G or 5G) to which the client connects. Under these network conditions, the server needs to prioritize saving data traffic and flexibly adjust decompression strategies based on client performance.

[0056] The server-side, based on the calculated difference rate between the target configuration version and the current configuration version on the client, as well as network and performance information obtained from the client profile, comprehensively judges and determines the specific strategy for this configuration update. The process is dynamic, providing each client with the most suitable update plan for its current environment. Specifically, when the server identifies the client's network as the first network, since bandwidth costs are not a major constraint, the server will set the configuration delivery mode to full mode to ensure the client can obtain the latest configuration completely and quickly. Simultaneously, the decompression mode will be set to the first decompression mode, employing a high compression ratio algorithm for compression and decompression via a background asynchronous thread to avoid impacting user experience. However, when the server identifies the client's network as the second network, considering bandwidth cost limitations, the server will adopt a more refined strategy. In this case, the configuration delivery mode will be determined based on the difference rate to decide whether to transmit the full configuration or only the differing portion to save bandwidth. Simultaneously, the decompression mode will be determined based on the client's performance information to ensure that the decompression process does not place an excessive burden on the client's performance and avoid lag.

[0057] It is understood that, through the technical solution in this embodiment, this application addresses the lack of fine-grained adaptation when balancing network transmission and decompression requirements by specifying the components of the client profile (network information and performance information) and the composition of the configuration update strategy (configuration distribution mode and decompression mode). This enables the configuration update process to be customized and optimized according to the client's actual network conditions and device performance, effectively reducing bandwidth consumption and avoiding performance bottlenecks in the decompression process for low-end devices, thereby significantly improving the efficiency of configuration updates and user experience. In some embodiments, this application further proposes determining the configuration distribution mode based on the difference rate, including: Step b1: When the difference rate is greater than the preset threshold, the configuration distribution mode is set to full mode; when the difference rate is less than the preset threshold, the configuration distribution mode is set to differential mode. The differential mode is used to transmit the changed parts of the configuration version.

[0058] The preset threshold serves as a reference value for determining the magnitude of the difference rate. This threshold can be set based on the actual application scenario, network environment, client type, and the trade-off between bandwidth and transmission efficiency. For example, it can be set as the threshold based on the average value or a certain percentile of the difference rate, based on historical data analysis; or it can be set as an empirical value based on the average size of the configuration file and network transmission costs. This threshold is dynamically adjustable to adapt to different business needs and operating environments.

[0059] The technical solution in this embodiment, when determining the configuration update strategy based on the difference rate and client profile, especially in the second network mode where the client network information is limited by bandwidth costs, can select the configuration delivery mode according to the actual magnitude of the difference rate. Specifically, when the calculated difference rate is greater than a preset threshold, the system determines that the configuration version has changed significantly. In this case, the full delivery mode is adopted to ensure the integrity and reliability of the configuration update and avoid the complexity and potential errors that may be caused by differential merging. When the difference rate is less than the preset threshold, the system determines that the configuration version has changed only slightly. In this case, the differential delivery mode is selected, transmitting only the changed part of the configuration version, reducing the amount of data transmitted over the network, saving bandwidth resources, and reducing transmission costs and transmission time.

[0060] In some embodiments, this application further proposes a decompression mode including a decompression algorithm and a decompression thread, and determines the decompression mode based on performance information, including: Step c1: If the performance information is at the first level, then set the decompression algorithm to the first decompression algorithm and set the decompression thread to the main thread, wherein the compression ratio of the first decompression algorithm is less than the preset compression ratio threshold.

[0061] Step c2: If the performance information is at the second level, then set the decompression algorithm to the second decompression algorithm and set the decompression thread to a background asynchronous thread. The compression ratio of the second decompression algorithm is greater than the preset compression ratio threshold, and the performance of the second level is higher than that of the first level.

[0062] The decompression mode refers to the specific strategy and execution method used by the client to restore the compressed data to the original configuration data after receiving the configuration data. The decompression algorithm is the process used to restore compressed data to its original form. Different decompression algorithms differ in decompression speed, memory consumption, and compatibility with the original compression algorithm. For example, the LZ4 algorithm is known for its extremely fast decompression speed, while the Zstd algorithm provides a good balance between compression ratio and decompression speed. The decompression thread is an independent program that performs the decompression operation. By properly allocating decompression threads, the system resource consumption of decompression tasks can be controlled, thereby improving the responsiveness of the user interface and overall smoothness. The first and second level performance information categorizes client performance information to simplify the decision-making process. For example, devices with fewer than 4 CPU cores and less than 2GB of memory can be classified as first level (low performance), while devices with 4 or more CPU cores and 4 or more GB of memory can be classified as second level (high performance). More specifically, a comprehensive performance score is calculated based on factors such as the client's CPU clock speed (e.g., <2.0GHz is low, ≥3.0GHz is high), number of cores (e.g., <4 cores is low, ≥8 cores is high), and memory size (e.g., <4GB is low, ≥8GB is high). This score is divided into five levels: L1 (low-end): Score < 500; L2 (low-mid-end): 500 ≤ Score < 800; L3 (mid-range): 800 ≤ Score < 1200; L4 (mid-high-end): 1200 ≤ Score < 1500; L5 (high-end): Score ≥ 1500. L1 and L2 represent low performance, while L3, L4, and L5 represent high performance.

[0063] The first decompression algorithm is one with a lower compression ratio, such as the LZ4 algorithm. The preset compression ratio threshold is a pre-defined value used to distinguish decompression algorithms with different compression ratios, serving as a criterion for selecting an algorithm and ensuring that the chosen algorithm meets the expected compression / decompression characteristics. The main thread is the thread in the application responsible for handling user interface updates and main business logic; placing the decompression task on the main thread ensures the immediacy and priority of the decompression operation. The second decompression algorithm is one with a higher compression ratio but faster decompression speed, such as the Zstd algorithm.

[0064] It's understandable that when the client's performance is at level one (i.e., a low-performance device), the system sets the decompression algorithm to the first level, which has a lower compression ratio. Simultaneously, the decompression thread is set as the main thread to ensure that decompression tasks are executed with priority, avoiding delays or interruptions due to resource contention on low-performance devices, thus guaranteeing the reliability of configuration updates. When the client's performance is at level two (i.e., a high-performance device), the system sets the decompression algorithm to the second level, which has a relatively higher compression ratio. The decompression thread is set as a background asynchronous thread, allowing the decompression operation to proceed without affecting the main thread (which typically handles the user interface and interactions), thereby avoiding application lag and slow response issues. In some embodiments, this application further proposes that, before calculating the difference rate between the target configuration version and the current configuration version in the client, the method further includes: Step c1: Obtain the heartbeat information reported by the client to obtain the client profile.

[0065] Specifically, to obtain heartbeat information reported by the client, the client can periodically (e.g., every 30 seconds or 1 minute) send a UDP or TCP heartbeat packet to the server containing information such as its network type (e.g., Wi-Fi, 4G, 5G), network signal strength, CPU usage, memory usage, and battery level. Furthermore, the client can also immediately trigger heartbeat reporting when it detects a significant change in its own state (e.g., switching from Wi-Fi to mobile data, or a sustained increase in CPU load), ensuring that the server can promptly detect changes in the client's environment. Heartbeat information is a data packet containing the client's current state, sent periodically or triggered by a specific event. It is used to proactively collect client operational status data in real time, providing a data source for generating accurate client profiles.

[0066] After receiving a heartbeat message, the server can integrate and analyze data such as network type, network latency, CPU load, and memory availability from the heartbeat message according to preset rules or machine learning models to generate a client profile that includes network information (e.g., first network, second network) and performance information (e.g., first level, second level). Alternatively, the server can maintain a client profile database, update the corresponding client profile record each time a heartbeat message is received, and evaluate the client's current state based on the updated profile.

[0067] It is understood that, in this embodiment, before calculating the difference rate between the target configuration version and the current configuration version on the client, the server can proactively obtain the latest heartbeat information reported by the client, thereby accurately and in real time understanding the client's network status and device performance. This ensures the subsequent configuration update strategy and avoids policy deviations caused by inaccurate or outdated client profiles. In some embodiments, this application further proposes that the client profile also include network latency. When determining the configuration update strategy based on the difference rate and the client profile, the following is also included: Step d1: When the network latency is greater than the preset latency threshold, the decompression algorithm is set to the second decompression algorithm.

[0068] Including network latency in the client profile aims to provide a more comprehensive picture of the client's network status, enabling the server to formulate configuration update strategies based on more refined network awareness. A preset latency threshold defines a boundary; when the client's network latency exceeds this threshold, the system considers the current network condition to be poor.

[0069] When network latency exceeds a preset latency threshold, the decompression algorithm is set to a second decompression algorithm. The compression ratio of this second decompression algorithm is greater than the preset compression ratio threshold. For example, the second decompression algorithm could be a fast decompression algorithm such as Zstd. This algorithm typically has a higher compression ratio.

[0070] This is understandable. Including network latency as part of the client profile expands the dimensions of the profile information, allowing configuration update strategies to more comprehensively reflect the client's network status. When network latency is high, a second decompression algorithm with a relatively high compression ratio is selected, sacrificing some decompression time for faster network transmission speeds.

[0071] In some embodiments, this application further proposes setting the configuration distribution mode to differential mode when the difference rate is less than a preset threshold, specifically including: Step f1: When the difference rate is less than a preset threshold, the path changes of the structured configuration in the configuration version are recorded based on the key-value pair difference algorithm, and the difference patch package is generated from the binary file with changes based on the binary file difference comparison algorithm. The preset threshold is determined according to the size of the configuration version.

[0072] The key-value pair difference algorithm is specifically designed to compare two sets of key-value pairs and identify their differences. It can efficiently detect the addition, deletion, and modification of keys in configuration data, as well as changes in their corresponding values. The binary file difference comparison algorithm, on the other hand, is used to compare two binary files and generate a compact difference patch. This algorithm does not rely on the readability of the file content but compares directly at the byte level, thus handling various file types such as images, compiled programs, or compressed packages. Generating the difference patch package involves encapsulating all the difference information identified by the key-value pair difference algorithm and the binary file difference comparison algorithm into a data package that can be used by client applications. The preset threshold is determined based on the size of the configuration version, meaning that the threshold is not fixed but dynamically adjusted according to the overall size of the current configuration file.

[0073] In one example, a custom Key-Value Diff algorithm based on JsonDiffPatch is used for structured configurations (JSON / YAML) to record path-level additions, deletions, and modifications; the Bsdiff block-based difference algorithm (binary file difference comparison algorithm) is used for unstructured configurations (binary files) to generate difference patch packages (patch size ≤ 30% of the original file). A preset threshold of 40% is used when the configuration file is < 100KB, and a preset threshold of 60% is used when the configuration file is ≥ 1MB, to avoid the overhead of managing small file difference packages.

[0074] It is understandable that this application can achieve differential updates of configuration in a more refined and efficient manner when the difference rate is small. This not only optimizes bandwidth utilization and reduces client traffic consumption, but also reduces the client's decompression and application burden by generating accurate difference patch packages, thereby improving the overall efficiency of configuration updates.

[0075] This application also proposes a configuration update method for application on the client side. For example... Figure 2 As shown, the method includes: Step S201: Receive and parse the header information of the target configuration packet to obtain the configuration update strategy. The target configuration packet and the configuration update strategy are obtained based on the server-side configuration update method.

[0076] The client receives a target configuration packet from the server, and the header information embeds the configuration update strategy. The client extracts this strategy by parsing the header. The configuration update strategy is dynamically generated by the server based on the difference rate between the target configuration version and the client's current configuration version, as well as the client profile. The client profile includes device performance parameters and network status indicators, used to personalize the strategy. Since the difference rate reflects the quantification of configuration data changes, and the client profile characterizes device processing capabilities and network conditions, the server can comprehensively balance network transmission time and decompression time to generate the optimal strategy.

[0077] Step S202: Configure the target configuration version on the client according to the configuration update policy.

[0078] Specifically, the client executes configuration operations based on the acquired configuration update policy. When the policy indicates differential update mode, the client only processes the changed parts of the configuration data, avoiding full data transmission; when the policy indicates full update mode, the client uses a high-compression decompression algorithm and a background asynchronous thread for decompression. This dynamic adaptation mechanism allows the configuration update process to adapt to different scenarios.

[0079] In some embodiments, this application further proposes a configuration update strategy including a configuration distribution mode, wherein the target configuration version is configured on the client according to the configuration update strategy, including: Step d1: If the configuration distribution mode is differential mode, when the preset conditions are met, the target configuration version is decompressed based on the decompression thread and decompression algorithm specified by the configuration update strategy, so as to update the configuration information of the client.

[0080] Specifically, the configuration distribution mode refers to the configuration data transmission method determined by the server based on the client profile and the difference rate. After receiving this mode, the client will determine the subsequent data processing flow based on its type (e.g., differential mode or full mode). After receiving the differential data, the client needs to merge it with the local baseline configuration to generate the complete latest configuration. Preset conditions refer to a series of conditions that the client needs to meet before performing the actual configuration decompression and update operations. These aim to ensure the security, reliability, and data consistency of the configuration update process. For example, this may include data integrity verification of the received target configuration version (e.g., checksum, hash value comparison), or resource availability checks of the client's current operating environment (e.g., memory, storage space, CPU load). The decompression thread refers to the computation thread used to perform the configuration data decompression operation. Its selection aims to balance decompression efficiency and client resource consumption. For example, a separate background worker thread can be used to avoid blocking the main user interface thread, or multi-threaded parallel decompression can be used to accelerate processing when resources are sufficient. The decompression algorithm refers to the specific algorithm used to restore the compressed configuration data. Its selection is usually based on a comprehensive consideration of compression ratio, decompression speed, and resource consumption. For example, in addition to high compression ratio and low compression ratio algorithms, general compression algorithms such as Gzip and Deflate can be selected based on data characteristics. Decompressing the target configuration version means that the client uses a specified decompression algorithm and decompression thread to restore the received compressed data to the original configuration data. Updating the client's configuration information means applying the decompressed configuration data to the client's runtime environment to ensure its configuration state is consistent with the target configuration version.

[0081] It is understood that the technical solution in this embodiment ensures the reliability of update operations and the adaptability of device performance in differential mode by introducing a preset condition check mechanism. When the configuration distribution mode is differential mode, the client will first check whether the preset conditions are met before decompression and update. This check mechanism can effectively avoid update failures or client anomalies caused by problems such as inconsistent version bases, abnormal data merging, or abnormal data format verification. For example, by checking the integrity of the received differential packet or its consistency with the local base version, potential problems can be detected in advance, thereby avoiding decompression and merging operations on insecure or incomplete data, reducing resource waste and the risk of device lag. At the same time, decompression is performed based on the decompression thread and decompression algorithm specified by the configuration update strategy, ensuring that the client can use the most suitable decompression method according to its own performance and network conditions, further improving update efficiency and user experience. The differential update mechanism with preset condition checks makes the client's configuration information update more robust and efficient. In some embodiments, this application further proposes that configuring the target configuration version on the client according to the configuration update policy, and also includes: Step e1: If the distribution mode is configured as differential mode, a full mode request will be sent to the server if the preset conditions are not met.

[0082] Specifically, when a client receives a target configuration version from the server, and this version is specified as differential mode, the client first checks a series of preset conditions to ensure the validity and security of the differential update. Failure to meet preset conditions means that the client finds that the preconditions for a safe and effective update cannot be met before attempting to apply the differential update. For example, preset conditions may include: the base version number in the target configuration version is inconsistent with the version number in the client's current configuration version, indicating that the client's base configuration does not match the base configuration used by the server to generate the differential package, in which case the differential update cannot be applied correctly; or, an anomaly occurs during the merging process of the current configuration's base version, differential data, and current configuration modification data, such as data conflicts, file corruption, or logical errors, resulting in the inability to generate a valid final configuration; or, the data format validation in the target configuration version is abnormal, such as file integrity checks failing, data structures not conforming to expectations, or the presence of illegal characters, indicating that the received data may be corrupted or invalid. When any of the above situations occur, the client will determine that the differential update cannot be executed safely and reliably.

[0083] At this point, the client will proactively send a full-mode request to the server. Sending a full-mode request to the server means that the client initiates a request to the server to obtain complete configuration data through a communication mechanism. For example, the client can send an HTTP or HTTPS request to a specific API interface of the server, with the request body containing the client identifier, current configuration version information, and a full update request type identifier. After receiving the request, the server will generate and return the latest full configuration data based on the client identifier and request type. Alternatively, in scenarios using a custom protocol, the client can construct a protocol packet with a specific format, containing instructions for requesting full configuration and related parameters, and send it to the server. After parsing the protocol packet, the server responds with the full configuration data. In this way, even if the differential update fails, the client can still obtain the latest configuration through a full update.

[0084] It is understood that the technical solution in this embodiment effectively solves the problem of configuration update failure caused by the failure to meet preset conditions in differential mode. When differential update cannot proceed smoothly, the client can promptly revert to the full update mechanism, ensuring the reliability and success rate of client configuration updates and avoiding potential client functional abnormalities or data inconsistencies caused by differential update failure. While maintaining the bandwidth-saving advantage of differential update, it provides strong fault tolerance capabilities, significantly improving the robustness of the entire configuration update system. In some embodiments, this application further proposes preset conditions including at least one of the following: the base version number in the target configuration version is consistent with the version number in the current configuration version, or the base version, differential data and current configuration modification data of the current configuration are abnormally merged, or the data format verification in the target configuration version is abnormal.

[0085] Preconditions refer to a series of prerequisites or checks that must be met before a client performs a configuration update operation (especially a differential update). They aim to ensure the correctness, security, and reliability of the update process, preventing update failures or configuration errors due to potential data problems. Preconditions can be represented as a combination of logical expression judgments, allowing subsequent configuration update steps to proceed only if all judgments are true; alternatively, preconditions can serve as a state checkpoint in the client's configuration update process, allowing the system to transition from the current state to the next update state only when the system state meets specific requirements.

[0086] The base version number in the target configuration version must match the version number in the current configuration version to ensure that when the client applies a differential update, its local current configuration version completely matches the base version used by the server to generate the differential package. If the base versions do not match, directly applying the differential package may lead to configuration data corruption or update failure. Specifically, after receiving the target configuration version (usually containing differential data) from the server, the client first parses the base version number information carried in the target configuration version. Simultaneously, the client queries and retrieves its own currently active configuration version number. Subsequently, the client performs a precise comparison of the two version numbers, for example, through string comparison or numerical comparison. Only when the two are completely identical is this preset condition considered met, allowing the differential update operation to continue.

[0087] The "Merge Anomaly" feature, which detects anomalies in the current configuration's base version, differential data, and current configuration modification data, aims to identify any errors or inconsistencies that occur during the process of a client applying received differential data to its local base version of the current configuration and merging it with any existing local modification data. This ensures the integrity and correctness of the merge operation. Specifically, the client can employ a transactional processing mechanism when performing the merge operation. Before the merge begins, the system creates a snapshot or backup of the current configuration. If any anomalies are detected during the merge process, such as file conflicts, corrupted data structures, a mismatch between the merged configuration checksum and expectations, or an error returned by the merge logic, the system immediately rolls back to the snapshot state before the merge and marks the merge as an anomaly.

[0088] The data format verification check for the target configuration version aims to verify whether the data structure and content of the target configuration version (whether a full configuration package or a differential patch package) received by the client conforms to the expected format specifications. This helps prevent the client from correctly parsing and applying the configuration due to data corruption, transmission errors, or server-side generation errors. Specifically, content-level verification is performed on the received configuration data, such as calculating the Cyclic Redundancy Check (CRC) code or MD5 hash value of the data and comparing it with the verification information carried in the header of the target configuration version packet. If the verification results are inconsistent, it indicates that the data may have been corrupted during transmission or storage, thus determining that the data format is abnormal.

[0089] Understandably, the technical solution in this embodiment introduces a multi-preset condition check mechanism when the client performs configuration updates, especially in differential mode. These preset conditions control the update process from three dimensions: version consistency, data merging integrity, and data format correctness. The introduction of these preset conditions enhances the robustness and security of client configuration updates, significantly reducing the risk of impacting user experience due to update failures, configuration errors, or client anomalies. In some embodiments, this application further proposes configuring the target configuration version on the client according to a configuration update policy, and also includes: Step f1: If the configuration distribution mode is full mode, the target configuration version is decompressed based on the decompression thread and decompression algorithm specified by the configuration update strategy, in order to update the configuration information on the client.

[0090] Specifically, when the configuration distribution mode is set to full mode, it means the server decides to distribute the complete and latest configuration version to the client. This mode is typically suitable when configuration version differences are too large to be effectively differentiated, or when the network environment is good and bandwidth is sufficient. In this mode, the client will receive the entire target configuration version data packet.

[0091] Specifically, by determining whether the configuration distribution mode is full mode, this approach addresses the specific scenario of full configuration updates, overcoming the shortcomings of previous solutions that only focused on differential modes. Based on the decompression thread and algorithm specified by the configuration update strategy, this solution utilizes dynamically determined decompression parameters in the strategy to select the optimal decompression method according to client performance and network conditions.

[0092] The following example provides a more detailed explanation of the above technical solution. Figure 3 As shown, the technical solution process includes: In a configuration management system, the server is responsible for maintaining and updating the configuration information of a large number of client devices. These client devices are distributed across different network environments and have varying hardware capabilities. This example will demonstrate a configuration update performed by the server on a device named "Client A".

[0093] First, client A periodically sends heartbeat messages to the server. These heartbeats contain client A's current configuration version number, its network status (e.g., currently connected to a 4G mobile network with moderate latency), and its device performance information (e.g., the device is of medium performance level, possessing adequate CPU processing power and memory resources). The server receives and parses the heartbeat messages to build or update client A's profile. This step ensures the server can monitor client A's operating environment in real time, providing a basis for subsequent strategy formulation.

[0094] Client A's client profile includes network latency information. If the network latency exceeds a preset latency threshold, the server will confirm and set the decompression algorithm as the first decompression algorithm (Zstd decompression algorithm). Simultaneously, decompression will be performed using a background asynchronous thread.

[0095] Next, the server will compare version X with the configuration version currently held by client A and calculate the difference rate between the two. Let's assume that the calculation shows the difference rate between version X and client A's current configuration version is low, for example, 5%.

[0096] Subsequently, based on the 5% difference rate and client profile of client A, the server began determining the configuration update strategy. Client A's client profile showed its network information as a 4G network, identified as a second network mode with limited bandwidth costs. Simultaneously, client A's performance information was at a medium performance level, identified as a second-tier performance level. Based on this, the server performed the strategy judgment: Since client A is in the second network mode, the server determines the configuration delivery mode based on the difference rate. Because the difference rate (5%) is less than a preset threshold (e.g., this threshold is determined to be 50% based on the size of the configuration version), the server sets the configuration delivery mode to differential mode. In differential mode, the server records directory changes of the configuration version based on a key-value pair differential algorithm and generates a compact difference patch package based on a binary file differential comparison algorithm. This method avoids transmitting the entire configuration, significantly reducing network bandwidth consumption and solving the bandwidth waste problem caused by full push in related technologies.

[0097] Meanwhile, the server determines the decompression mode based on client A's performance information. Since client A's performance is at the second level, the server sets the decompression algorithm to the first decompression algorithm (whose compression ratio is greater than a preset compression ratio threshold) and sets the decompression thread to a background asynchronous thread.

[0098] After determining the differential mode, the first decompression algorithm, and the strategy for the background asynchronous thread, the server generates a target configuration package based on this strategy. This package contains the differential patch package and strategy information. The server then sends the optimized update package to client A.

[0099] After receiving the update package, client A first parses the header information to obtain the configuration update strategy customized for it by the server. Since the strategy is specified as differential mode, client A checks a series of preset conditions, such as whether the base version number in the target configuration version matches the version number in the current configuration version, and whether there are any anomalies in merging the base version, differential data, and current configuration modification data, or data format validation anomalies in the target configuration version. If all conditions are met, client A will decompress the differential patch package using the background asynchronous thread and the second decompression algorithm specified by the strategy, and merge the decompressed differential data with its local current configuration to complete the configuration update. If the preset conditions are not met (e.g., the base version number does not match), client A will send a full mode request to the server to ensure the integrity and correctness of the configuration update.

[0100] It is understood that the technical solution in this application can dynamically select the most suitable delivery mode (full or differential) and decompression mode (including decompression algorithm and thread) based on the client's specific network conditions, device performance, and configuration differences, thereby achieving a balance between network transmission time and client decompression time. This adaptive strategy significantly reduces bandwidth consumption and optimizes the performance burden on client devices, especially on resource-constrained mobile terminals, effectively solving the problems of high bandwidth consumption and decompression performance bottlenecks on low-end devices.

[0101] This embodiment also provides a configuration update device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0102] This embodiment provides a configuration update device applied to a server, such as... Figure 4 As shown, it includes: Calculation module 401 is used to calculate the difference rate between the target configuration version and the current configuration version of the client; The strategy module 402 is used to determine the configuration update strategy based on the difference rate and the client profile. The client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance the network transmission time and decompression time. Update module 403 is used to update the configuration version of the client based on the configuration update strategy.

[0103] This embodiment provides a configuration update device applied to a client, such as... Figure 5 As shown, it includes: The parsing module 501 is used to receive and parse the header information of the target configuration packet to obtain the configuration update strategy. The target configuration packet and the configuration update strategy are obtained according to the above configuration update method. Configuration module 502 is used to configure the target configuration version on the client according to the configuration update policy.

[0104] The configuration update apparatus provided in this embodiment of the invention can execute the configuration update method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.

[0105] Figure 6 This is a schematic diagram of a configuration update system provided in an embodiment of the present invention. It includes a server and a client, wherein the server and client are respectively used to execute the methods corresponding to the aforementioned method embodiments.

[0106] The following is a detailed reference. Figure 7 This diagram illustrates a suitable structural design for implementing electronic devices (servers and clients) according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 701, which can perform various appropriate actions and processes based on a program stored in read-only memory (ROM) 702 or a program loaded from memory 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0107] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0108] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In this embodiment, the computer program can be downloaded and installed from a network via a communication device 709, or installed from a memory 708, or installed from a ROM 702. When the computer program is executed by the processor 701, it performs the functions defined in the configuration update method of the embodiments of the present invention.

[0109] Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present invention.

[0110] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded via a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the configuration update method shown in the above embodiments is implemented.

[0111] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0112] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A configuration update method, characterized in that, Applied to the server side, the method includes: Calculate the difference rate between the target configuration version and the current configuration version in the client; Based on the difference rate and the client profile, a configuration update strategy is determined, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time. A target configuration package is generated based on the configuration update strategy, and the target configuration package is sent to the client to update the client's configuration version.

2. The method according to claim 1, characterized in that, The client profile includes network information and performance information; the configuration update strategy includes configuration distribution mode and decompression mode; and determining the configuration update strategy based on the difference rate and the client profile includes: When the network information is the first network, the configuration distribution mode is set to full mode and the decompression mode is set to the first decompression mode. The first network is a network mode without bandwidth cost restrictions. The first decompression mode adopts a compression algorithm with a compression ratio greater than a preset compression ratio threshold and uses a background asynchronous thread as the decompression thread. When the network information is a second network, the configuration distribution mode is determined based on the difference rate, and the decompression mode is determined based on the performance information, wherein the second network is a network mode with limited bandwidth costs.

3. The method according to claim 2, characterized in that, Determining the configuration delivery mode based on the difference rate includes: When the difference rate is greater than a preset threshold, the configuration distribution mode is set to the full distribution mode. When the difference rate is less than a preset threshold, the configuration distribution mode is set to differential mode, wherein the differential mode is used to transmit the changed parts of the configuration version.

4. The method according to claim 3, characterized in that, The decompression mode includes a decompression algorithm and a decompression thread. Determining the decompression mode based on the performance information includes: If the performance information is at the first level, then the decompression algorithm is set as the first decompression algorithm, and the decompression thread is set as the main thread, wherein the compression ratio of the first decompression algorithm is less than a preset compression ratio threshold; If the performance information is at the second level, then the decompression algorithm is set to the second decompression algorithm, and the decompression thread is set to the background asynchronous thread. The compression ratio of the second decompression algorithm is greater than the preset compression ratio threshold, and the performance of the second level is higher than that of the first level.

5. The method according to any one of claims 1-4, characterized in that, Before calculating the difference rate between the target configuration version and the current configuration version in the client, the method further includes: Obtain the heartbeat information reported by the client to obtain the client profile.

6. The method according to claim 4, characterized in that, The client profile also includes network latency, and the step of determining the configuration update strategy based on the difference rate and the client profile further includes: When the network latency is greater than a preset latency threshold, the decompression algorithm is set to the second decompression algorithm.

7. The method according to claim 3, characterized in that, The step of setting the configuration distribution mode to differential mode when the difference rate is less than a preset threshold includes: When the difference rate is less than a preset threshold, the path changes of the structured configuration in the configuration version are recorded based on the key-value pair difference algorithm, and the binary file difference comparison algorithm is used to generate a difference patch package for the changed binary file, wherein the preset threshold is determined according to the size of the configuration version.

8. A configuration update method, characterized in that, Applied to a client, the method includes: Receive and parse the header information of the target configuration packet to obtain the configuration update strategy, wherein the target configuration packet and the configuration update strategy are obtained by any of the configuration update methods according to claims 1-7; Configure the target configuration version on the client according to the configuration update strategy.

9. The method according to claim 8, characterized in that, The configuration update strategy includes a configuration distribution mode, and configuring the target configuration version on the client according to the configuration update strategy includes: If the configuration distribution mode is differential mode, when the preset conditions are met, the target configuration version is decompressed based on the decompression thread and decompression algorithm specified by the configuration update strategy, so as to update the configuration information of the client.

10. The method according to claim 9, characterized in that, The step of configuring the target configuration version on the client according to the configuration update strategy further includes: If the configuration distribution mode is differential mode, a full mode request will be sent to the server if the preset conditions are not met.

11. The method according to claim 9 or 10, characterized in that, The preset conditions include at least one of the following: The base version number in the target configuration version is consistent with the version number in the current configuration version, or the base version, differential data and modified data of the current configuration are merged abnormally, or the data format verification in the target configuration version is abnormal.

12. The method according to claim 9, characterized in that, The step of configuring the target configuration version on the client according to the configuration update strategy further includes: If the configuration distribution mode is full mode, the target configuration version is decompressed based on the decompression thread and decompression algorithm specified by the configuration update strategy, so as to update the configuration information of the client.

13. A configuration update device, characterized in that, The device, applied to the server side, includes: The calculation module is used to calculate the difference rate between the target configuration version and the client's current configuration version; The strategy module is used to determine a configuration update strategy based on the difference rate and the client profile, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time. The update module is used to update the configuration version of the client based on the configuration update strategy.

14. A configuration update device, characterized in that, Applied to a client, the device includes: A parsing module is used to receive and parse the header information of a target configuration packet to obtain a configuration update strategy, wherein the target configuration packet and the configuration update strategy are obtained by any of the configuration update methods according to claims 1-7; The configuration module is used to configure the target configuration version on the client according to the configuration update strategy.

15. A configuration update system, characterized in that, include: Server and client, The server is used to calculate the difference rate between the target configuration version and the current configuration version in the client; The server determines a configuration update strategy based on the difference rate and the client profile, wherein the client profile is used to characterize the client's performance and network status, and the configuration update strategy is used to balance network transmission time and decompression time; the server generates a target configuration package based on the configuration update strategy and sends the target configuration package to the client. The client is used to receive and parse the header information of the target configuration package to obtain the configuration update strategy; the client configures the target configuration version on itself according to the configuration update strategy.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the configuration update method of any one of claims 1 to 7, or the configuration update method of any one of claims 8 to 12.