Data updating method, device, equipment and storage medium
By updating the policy incremental table and sending incremental data on the cloud desktop server side, the problems of system complexity and maintenance cost in cloud desktop policy updates are solved, efficient incremental lazy updates are achieved, and system complexity and server pressure are reduced.
Patent Information
- Application Number
- CN202211571861.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-12-08
AI Technical Summary
When updating cloud desktop policies, existing technologies require incremental data updates through third-party components such as Kafka, which increases system complexity and maintenance costs.
A data update method is provided, which obtains the policy adjustment message of the terminal device through the cloud desktop server, updates the policy increment table based on the target value, generates incremental data, and sends the incremental data to the service site to adjust the desktop policy of the terminal device. It adopts a global configuration management mode and avoids the use of third-party components.
It reduces system complexity and maintenance costs, reduces the number of invalid resource updates, alleviates server pressure, and achieves incremental lazy updates.
Smart Images

Figure CN116257280B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a data updating method, apparatus, device, and storage medium. Background Art
[0002] Cloud desktops are a desktop virtualization application that virtualizes the terminal desktop by running the system on clustered servers in a data center. Driven by technological evolution and market demand, cloud desktops have become a mainstream information technology (IT) infrastructure, serving various work and learning scenarios in companies, schools, and other places.
[0003] Currently, when updating the policy corresponding to the terminal's cloud desktop, it is necessary to use a third-party component (such as Kafka) to update the data increment, which increases the complexity of the system. Summary of the Invention
[0004] This application provides a data update method, apparatus, device, and storage medium to reduce system complexity. The technical solution of this application is as follows:
[0005] According to the first aspect of the present application, a data update method is provided, which is applied to a cloud desktop server, and the method includes: obtaining a policy adjustment message sent by a terminal device; the policy adjustment message includes a target value of a desktop policy parameter of the terminal device and a cloud desktop identifier of the terminal device. Based on the target value of the desktop policy parameter of the terminal device, the current value of the desktop policy parameter of the terminal device in the policy incremental table is updated to obtain an updated policy incremental table; the policy incremental table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier. When preset conditions are met, incremental data is generated based on the cloud desktop identifier of the terminal device and the updated policy incremental table; the incremental data is used to indicate the current value of the desktop policy parameter of the terminal device in the updated policy incremental table. The incremental data is sent to a service site corresponding to the terminal device; the service site is used to adjust the desktop policy of the terminal device based on the incremental data.
[0006] In a possible implementation, the policy adjustment message also includes interface parameters; the above-mentioned "based on the target value of the terminal device desktop policy parameter, updating the current value of the terminal device desktop policy parameter in the policy incremental table to obtain an updated policy incremental table" includes: based on the target value of the terminal device desktop policy parameter and the interface parameter, updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table to obtain an updated policy incremental table.
[0007] In one possible embodiment, the policy increment table is a dictionary table, each dictionary including a key-value pair consisting of a cloud desktop identifier of a terminal device and at least one terminal device desktop policy parameter. The at least one terminal device desktop policy parameter is sorted sequentially according to a preset index value. The aforementioned "updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy increment table based on the target value of the terminal device desktop policy parameter corresponding to the interface parameter to obtain an updated policy increment table" includes: determining the target index value corresponding to the interface parameter based on the interface parameter and a preset index mapping table; the index mapping table includes the interface parameter and the index value, and the index value is used to indicate the position of the desktop policy parameter corresponding to the interface parameter in the policy increment table. Based on the target value and target index value of the terminal device desktop policy parameter, generating an updated parameter dictionary; the updated parameter dictionary includes a key-value pair consisting of the cloud desktop identifier of the terminal device and the target value of the terminal device desktop policy parameter. Obtaining the target dictionary corresponding to the cloud desktop identifier of the terminal device in the policy increment table, and updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy increment table based on the updated parameter dictionary, the target dictionary, and a preset incremental algorithm, to obtain an updated policy increment table.
[0008] In a possible implementation, each dictionary further includes a global update parameter; the global update parameter is used to indicate whether the desktop policy parameters of the terminal device are updated.
[0009] In one possible implementation, the above-mentioned "updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table based on the update parameter dictionary, the target dictionary, and the preset incremental algorithm to obtain an updated policy incremental table" includes: if the global update parameter in the target dictionary is a first string, then calculating the update parameter dictionary and the target dictionary according to the preset algorithm to obtain a first value and a second value, and if the first value and the second value are different, updating the target dictionary based on the value in the update parameter dictionary, and updating the global update parameter in the target dictionary based on the third value to obtain an updated policy incremental table; the first string is used to indicate that the terminal device desktop policy parameter has not been updated; the third value is generated based on the desktop policy parameter in the updated policy incremental table and the preset algorithm; if the global update parameter in the target dictionary is a second string, then calculating the update parameter dictionary according to the preset algorithm to obtain a fourth value, and if the fourth value is different from the global update parameter in the target dictionary, updating the target dictionary based on the value in the update parameter dictionary, and updating the global update parameter in the target dictionary based on the fifth value to obtain an updated policy incremental table; the second string is used to indicate that the terminal device desktop policy parameter has been updated; and the fifth value is generated based on the desktop policy parameter in the updated policy incremental table and the preset algorithm.
[0010] In a possible implementation, the preset condition is that the terminal device is powered on or restarted.
[0011] In a possible implementation, the preset algorithm is the MD5 algorithm.
[0012] In a second aspect, a data updating device is provided, which is applied to a cloud desktop server, and the device includes: an acquisition unit, an update unit, a generation unit, and a sending unit. The acquisition unit is used to acquire a policy adjustment message sent by a terminal device; the policy adjustment message includes a target value of the terminal device desktop policy parameter and a cloud desktop identifier of the terminal device. The update unit is used to update the current value of the terminal device desktop policy parameter in the policy incremental table based on the target value of the terminal device desktop policy parameter to obtain an updated policy incremental table; the policy incremental table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier. The generation unit is used to generate incremental data based on the cloud desktop identifier of the terminal device and the updated policy incremental table when a preset condition is met; the incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table. The sending unit is used to send incremental data to a service site corresponding to the terminal device; the service site is used to adjust the desktop policy of the terminal device based on the incremental data.
[0013] In one possible implementation, the policy adjustment message also includes interface parameters; an update unit is specifically used to update the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table based on the target value of the terminal device desktop policy parameter and the interface parameter, to obtain an updated policy incremental table.
[0014] In one possible embodiment, the type of the policy incremental table is a dictionary table, and each dictionary includes a key-value pair consisting of a cloud desktop identifier of a terminal device and at least one terminal device desktop policy parameter. The at least one terminal device desktop policy parameter is sorted in sequence according to a preset index value. The update unit is further specifically used to: determine the target index value corresponding to the interface parameter based on the interface parameter and a preset index mapping table; the index mapping table includes the interface parameter and the index value, and the index value is used to indicate the position of the desktop policy parameter corresponding to the interface parameter. Based on the target value and target index value of the terminal device desktop policy parameter, an update parameter dictionary is generated; the update parameter dictionary includes a key-value pair consisting of a cloud desktop identifier of the terminal device and a target value of the terminal device desktop policy parameter. Obtain the target dictionary corresponding to the cloud desktop identifier of the terminal device in the policy incremental table, and based on the update parameter dictionary, the target dictionary and the preset incremental algorithm, update the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table to obtain an updated policy incremental table.
[0015] In a possible implementation, each dictionary further includes a global update parameter. The global update parameter is used to indicate whether the desktop policy parameters of the terminal device are updated.
[0016] In one possible embodiment, the update unit is further specifically used to: if the global update parameter in the target dictionary is a first string, then the update parameter dictionary and the target dictionary are respectively calculated according to a preset algorithm to obtain a first value and a second value, and when the first value and the second value are different, the target dictionary is updated based on the value in the update parameter dictionary, and the global update parameter in the target dictionary is updated based on the third value to obtain an updated policy incremental table; the first string is used to indicate that the desktop policy parameter of the terminal device has not been updated; the third value is generated based on the desktop policy parameter in the updated policy incremental table and the preset algorithm; if the global update parameter in the target dictionary is a second string, then the update parameter dictionary is calculated according to the preset algorithm to obtain a fourth value, and when the fourth value and the global update parameter in the target dictionary are different, the target dictionary is updated based on the value in the update parameter dictionary, and the global update parameter in the target dictionary is updated based on the fifth value to obtain an updated policy incremental table; the second string is used to indicate that the desktop policy parameter of the terminal device has been updated; the fifth value is generated based on the desktop policy parameter in the updated policy incremental table and the preset algorithm.
[0017] In a possible implementation, the preset condition is that the terminal device is powered on or restarted.
[0018] In a possible implementation, the preset algorithm is the MD5 algorithm.
[0019] In a third aspect, a server is provided, comprising: a processor and a communication interface; the communication interface and the processor are coupled, and the processor is used to run a computer program or instruction to implement the data update method of the first aspect.
[0020] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium. When a computer executes the instructions, the computer executes the data updating method of the first aspect.
[0021] In a fifth aspect, the present application also provides a computer program product for downlink data transmission. When the computer program product is run on a computer, the computer executes the data update method as in the first aspect.
[0022] The present application provides a data update method, which brings the following beneficial effects: applied to a cloud desktop server, the method includes: obtaining a policy adjustment message sent by a terminal device; the policy adjustment message includes the target value of the terminal device desktop policy parameter and the cloud desktop identifier of the terminal device. Based on the target value of the terminal device desktop policy parameter, the current value of the terminal device desktop policy parameter in the policy incremental table is updated to obtain an updated policy incremental table; the policy incremental table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier. When the preset conditions are met, incremental data is generated based on the cloud desktop identifier of the terminal device and the updated policy incremental table; the incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table. The incremental data is sent to the service site corresponding to the terminal device; the service site is used to adjust the desktop policy of the terminal device based on the incremental data. In this way, the technical solution of the present application provides a policy synchronization solution under the global configuration management mode, which is applied to the cloud desktop server. In this way, there is no need to use third-party components, the complexity of the system is reduced, and the system maintenance cost is reduced. In addition, based on the policy incremental table, each time the terminal device adjusts the policy parameters, the policy incremental table is updated. Furthermore, when the preset conditions are met, incremental data is sent to the service site corresponding to the terminal device to achieve incremental lazy updates, which can reduce the number of invalid resource updates and reduce the pressure on the server.
[0023] It should be noted that the technical effects brought about by any implementation method in the second to fifth aspects can refer to the technical effects brought about by the corresponding implementation method in the first aspect, and will not be repeated here.
[0024] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0026] Figure 1 A flowchart of incremental data update based on a third-party component provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of the structure of a data update system provided in an embodiment of the present application;
[0028] Figure 3 One of the flow charts of a data updating method provided in an embodiment of the present application;
[0029] Figure 4This is a second flow chart of a data updating method provided in an embodiment of the present application;
[0030] Figure 5 Flowchart 3 of a data updating method provided in an embodiment of the present application;
[0031] Figure 6 Flowchart 4 of a data updating method provided in an embodiment of the present application;
[0032] Figure 7 A schematic diagram of the structure of a data updating device provided in an embodiment of the present application;
[0033] Figure 8 A schematic diagram of the structure of the server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to enable ordinary people in the art to better understand the technical solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0035] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0036] Before giving a detailed introduction to the data updating method provided by this application, a brief introduction to the relevant elements, application scenarios, and implementation environment involved in this application is first given.
[0037] First, a brief introduction to the relevant elements involved in this application is given.
[0038] A dictionary is a mutable container model that can store objects of any type. Each key-value pair in a dictionary is separated by a colon ( : ), and each key-value pair is separated by a comma ( ,). The entire dictionary is enclosed in curly braces {}.
[0039] A data warehouse (DW or DWH) is a strategic collection of all types of data to support decision-making processes at all levels of an enterprise. It is a single data store created for analytical reporting and decision support. It provides businesses with business intelligence to guide business process improvements, monitor time, cost, quality, and control.
[0040] Flume is a highly available, highly reliable, distributed system for massive log collection, aggregation, and transmission. Flume supports the customization of various data senders in the log system for data collection. At the same time, Flume provides the ability to perform simple data processing and write to various data receivers (customizable).
[0041] JavaScript Object Notation (JSON) is a lightweight data exchange format. Based on a subset of the European Computer Manufacturers Association (ECMAScript) specification, it uses a text format that is completely independent of the programming language to store and represent data. Its simplicity and clear hierarchical structure make JSON an ideal data exchange language. It is easy for humans to read and write, as well as for machines to parse and generate, and significantly improves network transmission efficiency.
[0042] The Hadoop Distributed File System (HDFS) is a distributed file system designed to run on commodity hardware. It shares many similarities with existing distributed file systems, but also differs significantly from them. HDFS is a highly fault-tolerant system suitable for deployment on inexpensive machines. It provides high-throughput data access, making it ideal for applications with large datasets. HDFS relaxes some POSIX constraints to enable streaming access to file system data.
[0043] Desktop cloud allows access to cross-platform applications, including the entire client desktop, through thin clients or any other network-connected device. Desktop cloud and cloud desktop are different approaches to the same concept. Compared to traditional PCs, the large mainframe is replaced with smaller boxes that serve as cloud terminals, into which you plug your mouse, keyboard, monitor, and network cable.
[0044] Currently, there are four typical architectures for virtual cloud desktops: virtual desktop infrastructure (VDI), remote desktop services (RDS), intelligent desktop virtualization (IDV), and virtual operating system infrastructure (VOI).
[0045] Secondly, a brief introduction to the application scenarios involved in this application is given.
[0046] Cloud desktops are a desktop virtualization application that virtualizes the terminal desktop by running the system on clustered servers in a data center. Driven by technological evolution and market demand, cloud desktops have become a mainstream information technology (IT) infrastructure, serving various work and learning scenarios in companies, schools, and other places.
[0047] Currently, when updating the policy corresponding to the terminal's cloud desktop, incremental data updates need to be performed through third-party components (such as Kafka). This increases the complexity of the system and the maintenance costs due to the need to maintain additional third-party components.
[0048] Take Kafka as an example. Figure 1 The figure shows a flowchart for updating desktop policy data based on Kafka. After adjusting the desktop policy, the terminal device sends the desktop policy data to Kafka.
[0049] Correspondingly, S1 and Kafka receive the desktop policy data sent by the terminal device and obtain the data queue according to the order in which the desktop policy data is received.
[0050] S2. Kafka configures the desktop policy data in the data queue. Specifically, the first Flume data is configured with the date of the desktop policy data itself as the partition, and the second Flume data is configured with the date of desktop policy data collection as the partition.
[0051] S3. Kafka writes the desktop policy data written by the first Flume data into the first operational data store (ODS) data, and writes the desktop policy data written by the second Flume data into the second operational data store (ODS) data.
[0052] S4. Kafka initializes the DW data and selects the partition that meets the screening conditions from the first ODS data as the latest DW partition.
[0053] S5. Kafka uses the second ODS data up to the current time as the latest written data.
[0054] S6. Merge the latest DW partition and the latest written data and mark them.
[0055] S7. Kafka performs update determination in the DW containing the merged data, and if it determines that an update exists, it synchronizes the marked data to the database for incremental update.
[0056] For example, taking Tag>0 as an update indicator, in the case of Tag>0, the data with the tag is synchronized to the database for incremental update.
[0057] As can be seen, when updating data through Kafka, there are operations such as data merging, tagging, writing back, and aggregation logic. This increases development costs and makes system code maintenance more difficult.
[0058] In response to the above problems, the present application provides a data update method, which brings the following beneficial effects: applied to a cloud desktop server, the method includes: obtaining a policy adjustment message sent by a terminal device; the policy adjustment message includes the target value of the terminal device desktop policy parameter and the cloud desktop identifier of the terminal device. Based on the target value of the terminal device desktop policy parameter, the current value of the terminal device desktop policy parameter in the policy incremental table is updated to obtain an updated policy incremental table; the policy incremental table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier. When the preset conditions are met, incremental data is generated based on the cloud desktop identifier of the terminal device and the updated policy incremental table; the incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table. The incremental data is sent to the service site corresponding to the terminal device; the service site is used to adjust the desktop policy of the terminal device based on the incremental data. In this way, the technical solution of the present application provides a policy synchronization solution under the global configuration management mode, which is applied to a cloud desktop server. In this way, there is no need to use third-party components, the complexity of the system is reduced, and the system maintenance cost is reduced. In addition, based on the policy incremental table, each time the terminal device adjusts the policy parameters, the policy incremental table is updated. Furthermore, when the preset conditions are met, incremental data is sent to the service site corresponding to the terminal device to achieve incremental lazy updates, which can reduce the number of invalid resource updates and reduce the pressure on the server.
[0059] Finally, a brief introduction is given to the implementation environment (implementation architecture) involved in the method provided in this application.
[0060] Figure 2 This is an implementation architecture diagram of a data update system of this application. Figure 2 FIG. 1 shows a schematic diagram of a data updating system provided in an embodiment of the present application. Figure 2 As shown, the data update system 10 includes a cloud desktop server 11, multiple service sites ( Figure 2 The service site 1, service site 2 and service site 3 are shown as examples. In actual applications, there may be more or fewer service sites) and multiple terminal devices ( Figure 2 Terminal device 1, terminal device 2, terminal device 3, terminal device 4, terminal device 5 and terminal device 6 are shown as examples. In actual applications, there may be more or fewer terminal devices.
[0061] The cloud desktop server 11 is connected to multiple service sites. Each service site is connected to a corresponding terminal device ( Figure 2 The diagram shows that service site 1 is connected to terminal device 1 and terminal device 2, respectively; service site 2 is connected to terminal device 3 and terminal device 4, respectively; and service site 3 is connected to terminal device 5 and terminal device 6, respectively. The cloud desktop server 11 and the service sites can be connected by wire or wirelessly. The service sites and terminal devices can be connected by wire or wirelessly.
[0062] The cloud desktop server 11 can be a single server, multiple servers, or a server cluster, which is not specifically limited in the embodiments of the present application.
[0063] In some embodiments, the cloud desktop server 11 includes a database (DB) for storing desktop policy parameters of terminal devices.
[0064] In other embodiments, the cloud desktop server 11 is connected to the DB server.
[0065] The cloud desktop server 11 is used to generate a policy increment table based on the number of cloud desktops and the number of fixed update interfaces, and initialize the policy increment table when it is started. Subsequently, the cloud desktop server 11 stores the initialized policy increment table in the memory.
[0066] The cloud desktop server 11 is further configured to receive a policy adjustment message sent by a terminal device and update the policy increment table based on the desktop policy parameters in the policy adjustment message to obtain an updated policy increment table.
[0067] The cloud desktop server 11 is further configured to receive a policy adjustment message sent by a terminal device, and update the full policy data of the terminal device based on the policy adjustment message.
[0068] The cloud desktop server 11 is also used to query the cloud desktop incremental data of the terminal device from the updated policy incremental table based on the cloud desktop identifier of the terminal device when the cloud desktop of the terminal device is restarted or turned on, and send the cloud desktop incremental data of the terminal device to the service site corresponding to the terminal device.
[0069] The cloud desktop server 11 is further configured to create a complete set of desktop policies and send the policies to the service site so that the service site configures the cloud desktop for the terminal device.
[0070] The terminal device may be a mobile phone, tablet computer, laptop computer, personal computer (PC), smart watch or smart TV, etc., which is not limited here.
[0071] When adjusting desktop policy parameters, the terminal device updates the cloud desktop policy by calling a target update application programming interface (API), and sends a policy adjustment message to the cloud desktop server 11 if the desktop policy is updated successfully.
[0072] It should be noted that the number of update APIs called by the terminal device is fixed within a preset time period. The terminal device can select an update API parameter from multiple update API parameters as a target update API parameter according to demand.
[0073] It is understandable that the terminal device is a virtual machine (VM). One terminal device can correspond to one cloud desktop, or multiple cloud desktops. One cloud desktop corresponds to one desktop policy.
[0074] The service site is used to receive the complete desktop policy sent by the cloud desktop server 11 and configure the corresponding terminal device based on the complete desktop policy.
[0075] The service site is used to receive and store the incremental data sent by the cloud desktop server 11. Furthermore, the service site updates the complete desktop policy based on the incremental data and configures the cloud desktop of the corresponding terminal device.
[0076] For example, if the complete desktop policy is base, the service site receives incremental data each time the terminal device's cloud desktop is updated. Incremental data can be represented by change, where change1 represents the first incremental data and changeN represents the Nth incremental data.
[0077] After the service site obtains N incremental data of the cloud desktop of the terminal device, base=Merge(Merge(base, change1), ... (base, changeN)). The Merge operation represents an update operation.
[0078] It should be noted that the cloud desktop server 11 communicates with the service site through the cloud network. Each service site deploys an agent service. The agent service receives the cloud desktop policy data sent by the cloud desktop server 11 and configures the corresponding device based on the cloud desktop policy data.
[0079] Figure 3 This is a flow chart of a data update method according to some exemplary embodiments. In order to reduce system complexity, the data update method provided in the embodiment of the present application is applied to a cloud desktop server, such as Figure 3 As shown, including: S201-S204.
[0080] S201. The cloud desktop server obtains a policy adjustment message sent by a terminal device.
[0081] The policy adjustment message includes the target value of the terminal device desktop policy parameter and the cloud desktop identifier of the terminal device.
[0082] As a possible implementation method, the cloud desktop server receives the policy adjustment message sent by the terminal device through the service site.
[0083] Specifically, after the terminal device starts the cloud desktop through the service site, it adjusts the cloud desktop policy and sends a policy adjustment message to the cloud desktop server after the adjustment is successful.
[0084] Correspondingly, the cloud desktop server receives the policy adjustment message sent by the terminal device through the service site.
[0085] In another case, the terminal device adjusts the cloud desktop policy by requesting a target update API parameter, and after the adjustment is successful, sends a policy adjustment message to the cloud desktop server, wherein the policy adjustment message also includes the target update API parameter.
[0086] Correspondingly, the cloud desktop server receives the policy adjustment message sent by the terminal device through the service site.
[0087] In this way, the cloud desktop server can determine which update API parameter is used by the cloud desktop of the terminal device to adjust the cloud desktop policy.
[0088] It is understandable that the update API parameters are fixed. Before adjusting the cloud desktop policy, the terminal device determines the target update API parameters from the multiple update API parameters and requests to adjust the cloud desktop policy through the target update API parameters.
[0089] In some embodiments, one service site serves one administrative region. Thus, one service site serves all terminal devices in one administrative region.
[0090] For example, service site 1 serves city A and provides services for thin terminal devices in city A.
[0091] S202: The cloud desktop server updates the current value of the terminal device desktop policy parameter in the policy increment table based on the target value of the terminal device desktop policy parameter to obtain an updated policy increment table.
[0092] The policy increment table includes at least one cloud desktop identifier and a desktop policy parameter corresponding to each cloud desktop identifier.
[0093] As one possible implementation, after receiving a policy adjustment message from a terminal device, the cloud desktop server parses the message to obtain the target value of the terminal device's desktop policy parameter and the terminal device's cloud desktop identifier. Furthermore, based on the terminal device's cloud desktop identifier, the cloud desktop server updates the desktop policy parameter corresponding to the terminal device's cloud desktop identifier in the database to the target value.
[0094] Subsequently, the cloud desktop server updates the policy increment table based on the desktop policy parameters corresponding to the cloud desktop identifier of the terminal device in the DB, the policy increment table in the memory, and the preset increment algorithm to obtain an updated policy increment table.
[0095] In some embodiments, the policy adjustment message also includes an identifier of a target update API. After receiving the policy adjustment message from the terminal device, the cloud desktop server parses the policy adjustment message to obtain a target value of the terminal device's desktop policy parameter, the identifier of the target update API, and the cloud desktop identifier of the terminal device. Based on the identifier of the target update API and a preset index mapping table, the cloud desktop server determines a target index value corresponding to the identifier of the target update API.
[0096] Furthermore, the cloud desktop server constructs an update parameter dictionary based on the target index value and the target value, and searches the policy increment table for the corresponding target array based on the terminal device's cloud desktop identifier. Subsequently, the cloud desktop server updates the policy increment table based on the target array, the update parameter dictionary, and a preset incremental algorithm, resulting in an updated policy increment table. The target update API is called by the terminal device when adjusting the desktop policy parameters to the target value.
[0097] This specific implementation method can refer to the subsequent steps and will not be described in detail here.
[0098] In some instances, the preset index mapping table is pre-set. In actual applications, the number of update API parameters is fixed. For example, the update API parameters include N.
[0099] Exemplarily, the update API parameters include 10 parameters, namely A, B, C, D, E, F, G, H, I and J. The preset index mapping table is Table 1.
[0100] Table 1 Index mapping table
[0101] parameter Index value A 1 B 2 C 3 D 4 E 5 F 6 G 7 H 8 I 9 J 10
[0102] As another possible implementation, after receiving the policy adjustment message from the terminal device, the cloud desktop server parses the policy adjustment message to obtain a target value for the terminal device's desktop policy parameter and the terminal device's cloud desktop identifier. Furthermore, the cloud desktop server updates the policy increment table based on the target value for the terminal device's desktop policy parameter and the terminal device's cloud desktop identifier, thereby obtaining an updated policy increment table.
[0103] It should be noted that the target value of the terminal device desktop policy parameter is the desktop policy parameter after the terminal device successfully adjusts the desktop policy. The preset incremental algorithm and the preset index mapping table are pre-set in the cloud desktop server by the operation and maintenance personnel.
[0104] S203: When preset conditions are met, the cloud desktop server generates incremental data based on the cloud desktop identifier of the terminal device and the updated policy incremental table.
[0105] The incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table.
[0106] As a possible implementation method, when the terminal device is turned on or restarted, the cloud desktop server obtains the target array corresponding to the cloud desktop identifier of the terminal device from the updated policy incremental table based on the cloud desktop identifier of the terminal device, and matches the target array with the JSON field to generate incremental data.
[0107] As another possible implementation method, when the cloud desktop of the terminal device is turned on or restarted, the cloud desktop server obtains the cloud desktop identifier of the terminal device and obtains the target array corresponding to the cloud desktop identifier of the terminal device from the updated policy increment table. Furthermore, the cloud desktop server obtains the global update parameter in the target array and determines whether the global update parameter is the first string. If the global update parameter is the first string, the incremental service is not sent to the service site corresponding to the terminal device, and the update process ends. If the global update parameter is the second string, the cloud desktop server obtains the target string in the target array that is not empty, matches the target string to the JSON field, and generates incremental data.
[0108] For example, consider terminal device 1, service site 1 corresponding to terminal device 1, and cloud desktop 1 for terminal device 1. The cloud desktop server determines that cloud desktop 1 for terminal device 1 has been restarted, obtains identifier 122 for cloud desktop 1, and retrieves the target array String[N]{"MD5 value","value1",""...} from the updated policy increment table 2 described below. Furthermore, the cloud desktop server matches value1 with a JSON field to obtain incremental data.
[0109] The updated strategy increment table 2 is as follows:
[0110] {
[0111] "desktop_id_121":String[N]{"","",""...},
[0112] “desktop_id_122”:String[N]{“MD5 value”,“value1”,“”...},
[0113] "desktop_id_123":String[N]{"MD5 value","value2","value2"...},
[0114] }.
[0115] S204: The cloud desktop server sends incremental data to the service site corresponding to the terminal device.
[0116] The service site is used to adjust the desktop policy of the terminal device based on incremental data.
[0117] As a possible implementation method, after generating incremental data, the cloud desktop server determines the service site corresponding to the terminal device based on the cloud desktop identifier of the terminal device, and sends the incremental data to the service site corresponding to the terminal device.
[0118] In some embodiments, the incremental data may include a cloud desktop identifier and desktop policy parameters of the terminal device.
[0119] Subsequently, after receiving the incremental data sent by the cloud desktop server, the service site parses the incremental data to obtain the cloud desktop identifier and desktop policy parameters of the terminal device. Further, the service site configures the cloud desktop policy of the terminal device based on the desktop policy parameters and the cloud desktop identifier of the terminal device.
[0120] The present application provides a data update method, which brings the following beneficial effects: The technical solution of the present application provides a policy synchronization solution under the global configuration management mode, which is applied to the cloud desktop server. In this way, there is no need to use third-party components, which reduces the complexity of the system and reduces the system maintenance cost. In addition, based on the policy incremental table, each time the terminal device adjusts the policy parameters and updates the policy incremental table, further, when the preset conditions are met, the incremental data is sent to the service site corresponding to the terminal device to realize incremental lazy update, which can reduce the number of invalid resource updates and reduce the pressure on the server.
[0121] Currently, the communication performance between cloud desktop servers and service sites via the cloud network is poorer than that between service sites and terminal devices. Therefore, there is a need to improve the communication performance between cloud desktop servers and service sites. Furthermore, due to the large number of service sites connected to cloud desktop servers, higher API performance requirements are required.
[0122] In one design, in order to alleviate the communication pressure between the cloud desktop service and the service site and reduce the requirements for API performance, the policy adjustment message also includes interface parameters, such as Figure 4 As shown, S202 provided in the embodiment of the present application specifically includes: S2021.
[0123] S2021. The cloud desktop server updates the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy increment table based on the target value of the terminal device desktop policy parameter and the interface parameter, and obtains an updated policy increment table.
[0124] As one possible implementation, after receiving the policy adjustment message, the cloud desktop server parses the measurement adjustment message to obtain the updated API parameters, the target values of the terminal device desktop policy parameters, and the cloud desktop identifier of the terminal device. Furthermore, based on the updated API parameters, the cloud desktop server determines the current values of the terminal device desktop policy parameters corresponding to the updated API parameters in the policy increment table. Based on the target values, the cloud desktop server updates the current values of the terminal device desktop policy parameters corresponding to the updated API parameters in the policy increment table, thereby obtaining an updated policy increment table.
[0125] For example, the update API parameter is A, the current value in the policy increment table is value1, the target value is value2, and the cloud desktop identifier of the terminal device is 123.
[0126] The policy increment table is as follows:
[0127] {
[0128] "desktop_id_121":String[N]{"","",""...},
[0129] “desktop_id_122”:String[N]{“MD5 value”,“value1”,“”...},
[0130] "desktop_id_123":String[N]{"MD5 value","value1","value3"...},
[0131] }.
[0132] The cloud desktop server obtains the current value of A corresponding to desktop_id_123 as "value1" and updates the current value of A to the target value value2, obtaining the following updated policy increment table:
[0133] {
[0134] "desktop_id_121":String[N]{"","",""...},
[0135] “desktop_id_122”:String[N]{“MD5 value”,“value1”,“”...},
[0136] "desktop_id_123":String[N]{"MD5 value","value2","value3"...},
[0137] }.
[0138] As a possible implementation method, after receiving the policy adjustment message, the cloud desktop server parses the measurement adjustment message to obtain the target values of the updated API parameters, the terminal device desktop policy parameters, and the cloud desktop identifier of the terminal device. Furthermore, the cloud desktop server determines the target index value corresponding to the updated API parameter based on the updated API parameter and the preset index mapping table. Subsequently, the cloud desktop server determines the current value of the terminal device desktop policy parameter corresponding to the updated API parameter in the policy increment table based on the target index value, and updates the current value of the terminal device desktop policy parameter corresponding to the updated API parameter in the policy increment table based on the target value, thereby obtaining an updated policy increment table.
[0139] It should be noted that the multiple values corresponding to the cloud desktop identifier are sorted in a preset order.
[0140] It is understandable that when the terminal device adjusts the cloud desktop policy through the update API, it obtains the update API specific parameters and sends the update API specific parameters to the cloud desktop server. This relieves the communication pressure between the cloud desktop service and the service site and reduces the requirements for API performance.
[0141] In one design, in order to ensure that the desktop policy parameters in the policy increment table are the latest desktop policy parameters adjusted by the terminal device, the policy increment table is a dictionary table, each dictionary includes a key-value pair consisting of a cloud desktop identifier of a terminal device and at least one desktop policy parameter of the terminal device; at least one desktop policy parameter of the terminal device is sorted in sequence according to a preset index value. Figure 5 As shown, S2021 provided in the embodiment of the present application specifically includes: S301-S303.
[0142] S301. The cloud desktop server determines a target index value corresponding to the interface parameter based on the interface parameter and a preset index mapping table.
[0143] The index mapping table includes interface parameters and index values, and the index values are used to indicate the position of the desktop policy parameters corresponding to the interface parameters in the policy increment table.
[0144] As a possible implementation method, after obtaining the updated API parameters, the cloud desktop server searches a preset index mapping table based on the updated API parameters and updates the target index value of the API parameters.
[0145] For example, in combination with the above Table 1, the update API parameter is shown as A. The cloud desktop server determines that the target index value is 1.
[0146] S302: The cloud desktop server generates an update parameter dictionary based on the target value and target index value of the terminal device desktop policy parameter.
[0147] The update parameter dictionary includes a key-value pair consisting of a cloud desktop identifier of the terminal device and a target value of a desktop policy parameter of the terminal device.
[0148] As a possible implementation method, after determining the target index value, the cloud desktop server determines the position of the target value in the update parameter dictionary, and generates an update parameter dictionary based on the cloud desktop identifier of the terminal device, the position of the target value in the update parameter dictionary, and the target value.
[0149] For example, the cloud desktop ID of the terminal device is 1, the target value is value1, and the position of value1 in the update parameter dictionary is the second. The cloud desktop server generates the update parameter dictionary:
[0150] {
[0151] "desktop_id_1":String[N]{"","value1",""...},
[0152] }.
[0153] As can be understood, the update parameter dictionary includes key values of type array, with the array value type being string, of length N+1, and indexes 1 through N corresponding one-to-one to the update API parameters. Thus, the cloud desktop server assigns the key value corresponding to the target update API parameter and assigns an empty string to the key values corresponding to the update API parameters other than the target update API parameter.
[0154] S303. The cloud desktop server obtains the target dictionary corresponding to the cloud desktop identifier of the terminal device in the policy incremental table, and based on the updated parameter dictionary, the target dictionary and the preset incremental algorithm, updates the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table to obtain an updated policy incremental table.
[0155] As one possible implementation, the cloud desktop server searches the policy increment table for a target dictionary corresponding to the terminal device's cloud desktop identifier based on the terminal device's cloud desktop identifier. Furthermore, the cloud desktop server performs a differential check on the updated parameter dictionary and the target dictionary. If there is a discrepancy between the updated parameter dictionary and the target dictionary, the server updates the target dictionary in the policy increment table based on the new parameter dictionary, resulting in an updated policy increment table.
[0156] This step can be specifically referred to the following steps, which will not be repeated here.
[0157] In one design, in order to quickly determine whether desktop policy parameters have been updated, the data update method provided in the embodiment of the present application further includes a global update parameter for each dictionary. The global update parameter is used to indicate whether the desktop policy parameters of the terminal device have been updated.
[0158] Specifically, within a preset timeframe, the number of update API parameters is fixed. For example, if there are N update API parameters, each is assigned a unique index value, 1, 2, ..., N. A global update parameter with an index value of 0 is configured for each terminal device's cloud desktop. If the global update parameter is an empty string, it indicates that the terminal device's cloud desktop policy has not been adjusted; if the global update parameter is a non-empty string, it indicates that the terminal device's cloud desktop policy has been adjusted.
[0159] When the cloud desktop server is started, the policy incremental table is initialized to obtain the initialized policy incremental table, where the type of the initialized policy incremental table is a dictionary {key: value}, the key uses the primary key identifier of the cloud desktop (identity document, ID), the value is the configuration table of the cloud desktop, the type is an array, the array value type is a string String, the length is N+1, indexes 1, 2...N correspond one-to-one to multiple update API parameters, the initialization value is an empty string, and the empty string indicates that the configuration corresponding to the cloud desktop has not changed (a non-empty string represents a change in the configuration), and index 0 is initialized to an empty string, indicating that all configurations of the cloud desktop have not changed (a non-empty string represents a change in the configuration).
[0160] For example, the initialized policy increment table can be expressed as:
[0161] {
[0162] "desktop_id_1":String[N]{"","",""...},
[0163] "desktop_id_2":String[N]{"","",""...},
[0164] "desktop_id_3":String[N]{"","",""...},
[0165] }
[0166] It can be understood that after obtaining the parameters of the desktop policy adjustment of the terminal device, the cloud desktop server updates the key value at the corresponding position in the policy increment table, and assigns the global update parameter corresponding to the primary key identifier of the cloud desktop to indicate that the desktop policy of the cloud desktop has changed.
[0167] In one design, in order to ensure that the desktop policy parameters in the policy increment table are the latest desktop policy parameters adjusted by the terminal device. Figure 6 As shown, S303 provided in the embodiment of the present application specifically includes: S3031-S3034.
[0168] S3031. If the global update parameter in the target dictionary is the first character string, the cloud desktop server will update the parameter dictionary and the target dictionary according to a preset algorithm to obtain a first value and a second value.
[0169] The first character string is used to indicate that the desktop policy parameters of the terminal device have not been updated.
[0170] As a possible implementation method, when the global update parameter in the target dictionary is the first string, the cloud desktop server will operate the update parameter dictionary and the target dictionary according to a preset algorithm to obtain the first value corresponding to the update parameter dictionary and the second value corresponding to the target dictionary.
[0171] The preset algorithm may be MD5 Message-Digest Algorithm (MD5 for short) or Secure Hash Algorithm 1 (SHA-1).
[0172] For example, if the first string is an empty string and the preset algorithm is MD5, when the cloud desktop server determines that the value corresponding to index 0 of the target dictionary is an empty string, it will perform a pre-MD5 operation on the updated parameter dictionary and the target dictionary, respectively, and update the first value corresponding to the parameter dictionary and the second value corresponding to the target dictionary.
[0173] S3032. When the first value and the second value are different, the cloud desktop server updates the target dictionary based on the value in the update parameter dictionary, and updates the global update parameter in the target dictionary based on the third value to obtain an updated policy increment table.
[0174] The third value is generated based on the desktop policy parameters in the updated policy increment table and a preset algorithm.
[0175] Specifically, if the first value and the second value are different, the cloud desktop server overwrites the value of the update parameter dictionary with the target dictionary in the policy increment table and generates an MD5 value corresponding to the value of the update parameter dictionary. Further, the cloud desktop server updates the global update parameters in the target dictionary based on the MD5 value. Subsequently, the cloud desktop server deletes the update parameter dictionary.
[0176] In another case, when the first value and the second value are the same, the cloud desktop server does not update the value of the target dictionary in the policy increment table and ends the process.
[0177] S3033. If the global update parameter in the target dictionary is the second character string, the cloud desktop server updates the parameter dictionary according to a preset algorithm to obtain a fourth value.
[0178] The second character string is used to indicate that the desktop policy parameters of the terminal device have been updated.
[0179] For example, taking the first string as a non-empty string and the preset algorithm as MD5, the cloud desktop server performs an MD5 operation on the updated parameter dictionary upon determining that the value corresponding to index 0 of the target dictionary is a non-empty string to obtain a fourth value.
[0180] S3034. When the fourth value is different from the global update parameter in the target dictionary, the cloud desktop server updates the target dictionary based on the value in the update parameter dictionary, and updates the global update parameter in the target dictionary based on the fifth value to obtain an updated policy increment table.
[0181] The fifth value is generated based on the desktop policy parameters in the updated policy increment table and a preset algorithm.
[0182] As one possible implementation, the cloud desktop server obtains the global update parameters in the target dictionary and determines whether the fourth value and the global update parameters are identical. Furthermore, if the fourth value and the global update parameters in the target dictionary are different, the cloud desktop server overwrites the value in the update parameter dictionary with the target dictionary in the policy increment table and generates an MD5 value corresponding to the value in the update parameter dictionary. Furthermore, the cloud desktop server updates the global update parameters in the target dictionary based on the MD5 value. Subsequently, the cloud desktop server deletes the update parameter dictionary.
[0183] For example, after a series of update requests, the updated policy increment table is as follows:
[0184] {
[0185] "desktop_id_1":String[N]{"","",""...},
[0186] “desktop_id_2”:String[N]{“MD5 value”,“value1”,“”...},
[0187] "desktop_id_3":String[N]{"MD5 value","value2","value2"...},
[0188] }.
[0189] In another case, when the fourth value is the same as the global update parameter in the target dictionary, the cloud desktop server does not update the value of the target dictionary in the policy increment table and ends the process.
[0190] Subsequently, in some embodiments, when the cloud desktop server determines that the cloud desktop of the terminal device is restarted or powered on, it obtains the full amount of cloud desktop policy data of the terminal device (i.e., the full amount of cloud desktop policy JSON data of the terminal device) from the database based on the cloud desktop identifier of the terminal device, and obtains the incremental array corresponding to the cloud desktop identifier of the terminal device from the updated policy incremental table. Furthermore, the cloud desktop server determines whether the full update parameter in the incremental array is an empty string. If the full update parameter is a non-empty string, the cloud desktop server obtains the update value corresponding to the index value that is not an empty string, and constructs the update value into the latest incremental JSON data. Subsequently, the cloud desktop server calls the update API and sends the latest incremental JSON data to the service site corresponding to the terminal device. If the full update parameter is an empty string, the cloud desktop server stops executing the process of updating the cloud desktop of the terminal device.
[0191] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, the transaction device or electronic device includes a hardware structure and / or software module corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0192] In the embodiment of the present application, the data updating device or electronic device can be divided into functional modules according to the above method. For example, the data updating device or electronic device can include various functional modules corresponding to the functional divisions, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation.
[0193] For example, an embodiment of the present application also provides a data updating device.
[0194] The embodiment of the present application provides a data updating device 40, which is applied to a cloud desktop server. Figure 7 As shown, the data updating device 40 includes: an acquiring unit 401 , an updating unit 402 , a generating unit 403 and a sending unit 404 .
[0195] The acquisition unit 401 is configured to acquire a policy adjustment message sent by a terminal device; the policy adjustment message includes a target value of a desktop policy parameter of the terminal device and a cloud desktop identifier of the terminal device.
[0196] The updating unit 402 is configured to update the current value of the terminal device desktop policy parameter in the policy increment table based on the target value of the terminal device desktop policy parameter to obtain an updated policy increment table. The policy increment table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier.
[0197] The generating unit 403 is used to generate incremental data based on the cloud desktop identifier of the terminal device and the updated policy incremental table when the preset conditions are met; the incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table.
[0198] The sending unit 404 is configured to send the incremental data to the service site corresponding to the terminal device; the service site is configured to adjust the desktop policy of the terminal device based on the incremental data.
[0199] Optionally, the policy adjustment message also includes interface parameters; the update unit 402 is specifically used to update the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy increment table based on the target value of the terminal device desktop policy parameter and the interface parameter, and obtain an updated policy increment table.
[0200] Optionally, the type of the policy incremental table is a dictionary table, and each dictionary includes a key-value pair consisting of a cloud desktop identifier of a terminal device and at least one terminal device desktop policy parameter. The at least one terminal device desktop policy parameter is sorted in sequence according to a preset index value. The update unit 402 is further specifically used to: determine the target index value corresponding to the interface parameter based on the interface parameter and the preset index mapping table; the index mapping table includes the interface parameter and the index value, and the index value is used to indicate the position of the desktop policy parameter corresponding to the interface parameter. Based on the target value and the target index value of the terminal device desktop policy parameter, an update parameter dictionary is generated; the update parameter dictionary includes a key-value pair consisting of a cloud desktop identifier of the terminal device and a target value of the terminal device desktop policy parameter. Obtain the target dictionary corresponding to the cloud desktop identifier of the terminal device in the policy incremental table, and based on the update parameter dictionary, the target dictionary and the preset incremental algorithm, update the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table to obtain an updated policy incremental table.
[0201] Optionally, each dictionary also includes a global update parameter. The global update parameter is used to indicate whether the desktop policy parameters of the terminal device are updated.
[0202] Optionally, the update unit 402 is further specifically used to: if the global update parameter in the target dictionary is a first string, the update parameter dictionary and the target dictionary are respectively operated according to a preset algorithm to obtain a first value and a second value, and when the first value and the second value are different, the target dictionary is updated based on the value in the update parameter dictionary, and the global update parameter in the target dictionary is updated based on the third value to obtain an updated policy incremental table; the first string is used to indicate that the desktop policy parameter of the terminal device has not been updated; the third value is generated based on the desktop policy parameter in the updated policy incremental table and the preset algorithm; if the global update parameter in the target dictionary is a second string, the update parameter dictionary is operated according to the preset algorithm to obtain a fourth value, and when the fourth value and the global update parameter in the target dictionary are different, the target dictionary is updated based on the value in the update parameter dictionary, and the global update parameter in the target dictionary is updated based on the fifth value to obtain an updated policy incremental table; the second string is used to indicate that the desktop policy parameter of the terminal device has been updated; the fifth value is generated based on the desktop policy parameter in the updated policy incremental table and the preset algorithm.
[0203] Optionally, the preset condition is that the terminal device is powered on or restarted.
[0204] Optionally, the default algorithm is the MD5 algorithm.
[0205] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiment of the present application provides a possible structural diagram of the server involved in the above-mentioned embodiment. Figure 8 As shown, the server 50 includes a processor 501, a memory 502 and a bus 503. The processor 501 and the memory 502 may be connected via the bus 503.
[0206] Processor 501 is the control center of the communication device and can be a single processor or a collective term for multiple processing elements. For example, processor 501 can be a general-purpose central processing unit (CPU) or other general-purpose processor. The general-purpose processor can be a microprocessor or any conventional processor.
[0207] As an embodiment, the processor 501 may include one or more CPUs, such as Figure 8 CPU 0 and CPU 1 are shown in Figure 1.
[0208] The memory 502 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0209] As a possible implementation, memory 502 can exist independently of processor 501 and can be connected to processor 501 via bus 503 to store instructions or program code. When processor 501 calls and executes the instructions or program code stored in memory 502, the sensor determination method provided in the embodiments of the present application can be implemented.
[0210] In another possible implementation, the memory 502 may also be integrated with the processor 501 .
[0211] Bus 503 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0212] It should be pointed out that Figure 8 The structure shown does not constitute a limitation on the server 50. Figure 8 In addition to the components shown, the server 50 may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0213] Optionally, the server 50 provided in the embodiment of the present application may further include a communication interface 504 .
[0214] The communication interface 504 is used to connect to other devices via a communication network. The communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc. The communication interface 504 can include a receiving unit for receiving data and a sending unit for sending data.
[0215] In one design, in the server 50 provided in the embodiment of the present application, the communication interface can also be integrated into the processor.
[0216] In another hardware structure of a server provided in an embodiment of the present application, the server may include a processor and a communication interface. The processor is coupled to the communication interface.
[0217] The functions of the processor can refer to the description of the above processor. In addition, the processor also has a storage function, which can refer to the function of the above memory.
[0218] The communication interface is used to provide data to the processor. The communication interface can be an internal interface of the communication device or an external interface of the communication device.
[0219] It should be noted that the aforementioned another hardware structure does not constitute a limitation on the server. In addition to the aforementioned another hardware component, the server may include more or fewer components, or a combination of certain components, or different component arrangements.
[0220] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the structural diagram of the middleware involved in the above-mentioned embodiments provided in the embodiments of the present application can refer to the structural diagram of the above-mentioned execution machine.
[0221] An embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When a computer executes the instructions, the computer executes each step in the data updating method process shown in the above method embodiment.
[0222] An embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the data updating method in the above method embodiment.
[0223] Among them, the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk. Random Access Memory (RAM), Read-Only Memory (ROM), Erasable Programmable Read Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any other form of computer-readable storage medium in a suitable combination of the above, or a numerical value in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0224] Since the server, user equipment, computer-readable storage medium, and computer program product in the embodiments of the present application can be applied to the above method, the technical effects that can be obtained can also refer to the above method embodiments, and the embodiments of the present application will not be repeated here.
[0225] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed in the present application should be included in the protection scope of the present application.
Claims
1. A data updating method, characterized in that: Applied to a cloud desktop server, the method includes: Obtaining a policy adjustment message sent by a terminal device; the policy adjustment message includes a target value of a desktop policy parameter of the terminal device, an interface parameter, and a cloud desktop identifier of the terminal device; Based on the interface parameters and a preset index mapping table, a target index value corresponding to the interface parameters is determined; the index mapping table includes interface parameters and index values; the index value is used to indicate the position of the desktop policy parameter corresponding to the interface parameter in the policy increment table; the policy increment table is a dictionary table, each dictionary including a key-value pair consisting of a cloud desktop identifier of a terminal device and at least one desktop policy parameter of the terminal device; the at least one desktop policy parameter of the terminal device is sorted in sequence according to the preset index value; the policy increment table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier; Based on the target value of the terminal device desktop policy parameter and the target index value, an update parameter dictionary is generated; the update parameter dictionary includes a key-value pair consisting of the cloud desktop identifier of the terminal device and the target value of the terminal device desktop policy parameter; Obtaining a target dictionary corresponding to the cloud desktop identifier of the terminal device in the policy incremental table, and updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table based on the update parameter dictionary, the target dictionary, and a preset incremental algorithm, to obtain an updated policy incremental table; When a preset condition is met, generating incremental data based on the cloud desktop identifier of the terminal device and the updated policy incremental table; the incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table; The incremental data is sent to a service site corresponding to the terminal device; the service site is used to adjust the desktop policy of the terminal device based on the incremental data.
2. The data updating method according to claim 1, wherein: Each dictionary also includes a global update parameter; the global update parameter is used to indicate whether the desktop policy parameter of the terminal device is updated.
3. The data updating method according to claim 2, wherein: Based on the update parameter dictionary, the target dictionary, and a preset incremental algorithm, updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table to obtain an updated policy incremental table, including: If the global update parameter in the target dictionary is a first string, the update parameter dictionary and the target dictionary are respectively operated according to a preset algorithm to obtain a first value and a second value; the first string is used to indicate that the desktop policy parameter of the terminal device has not been updated; When the first value and the second value are different, updating the target dictionary based on the value in the update parameter dictionary, and updating the global update parameter in the target dictionary based on a third value, to obtain an updated policy increment table; the third value is generated based on the desktop policy parameter in the updated policy increment table and the preset algorithm; If the global update parameter in the target dictionary is a second character string, the update parameter dictionary is operated according to a preset algorithm to obtain a fourth value; the second character string is used to indicate that the desktop policy parameter of the terminal device has been updated; When the fourth value is different from the global update parameter in the target dictionary, the target dictionary is updated based on the value in the update parameter dictionary, and the global update parameter in the target dictionary is updated based on the fifth value to obtain an updated policy increment table; the fifth value is generated based on the desktop policy parameter in the updated policy increment table and the preset algorithm.
4. The data updating method according to claim 3, wherein: The preset algorithm is the MD5 algorithm.
5. The data updating method according to any one of claims 1 to 4, characterized in that: The preset condition is that the terminal device is powered on or restarted.
6. A data updating device, characterized in that: Applied to a cloud desktop server, the device comprises: an acquisition unit, an update unit, a generation unit, and a sending unit; The acquisition unit is configured to acquire a policy adjustment message sent by a terminal device; the policy adjustment message includes a target value of a desktop policy parameter of the terminal device, an interface parameter, and a cloud desktop identifier of the terminal device; The updating unit is configured to: Based on the interface parameters and a preset index mapping table, a target index value corresponding to the interface parameters is determined; the index mapping table includes interface parameters and index values; the index value is used to indicate the position of the desktop policy parameter corresponding to the interface parameter in the policy increment table; the policy increment table is a dictionary table, each dictionary including a key-value pair consisting of a cloud desktop identifier of a terminal device and at least one desktop policy parameter of the terminal device; the at least one desktop policy parameter of the terminal device is sorted in sequence according to the preset index value; the policy increment table includes at least one cloud desktop identifier and the desktop policy parameter corresponding to each cloud desktop identifier; Based on the target value of the terminal device desktop policy parameter and the target index value, an update parameter dictionary is generated; the update parameter dictionary includes a key-value pair consisting of the cloud desktop identifier of the terminal device and the target value of the terminal device desktop policy parameter; Obtaining a target dictionary corresponding to the cloud desktop identifier of the terminal device in the policy incremental table, and updating the current value of the terminal device desktop policy parameter corresponding to the interface parameter in the policy incremental table based on the update parameter dictionary, the target dictionary, and a preset incremental algorithm, to obtain an updated policy incremental table; The generating unit is configured to generate incremental data based on the cloud desktop identifier of the terminal device and the updated policy incremental table when a preset condition is met; the incremental data is used to indicate the current value of the terminal device desktop policy parameter in the updated policy incremental table; The sending unit is used to send the incremental data to the service site corresponding to the terminal device; the service site is used to adjust the desktop policy of the terminal device based on the incremental data.
7. A server, characterized in that: include: A processor and a communication interface; the communication interface is coupled to the processor, and the processor is used to run a computer program or instruction to implement the data updating method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing instructions, characterized in that: When a computer executes the instruction, the computer executes the data updating method according to any one of claims 1 to 5.