Configuration updating method and device and storage medium
By dividing the configuration items of the software system into the configuration class and sending only the updated configuration items during configuration updates, the bandwidth waste caused by full updates in the existing technology is solved, and efficient configuration updates are achieved.
Patent Information
- Application Number
- CN202510219411.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
AI Technical Summary
The configuration update solution of existing CS mode software systems usually adopts full updates, which causes the server to send a large amount of configuration data to the client, resulting in wasting client bandwidth.
By dividing the configuration items of the software system into the configuration class, and managing them in the configuration class, the server determines the updated configuration classes and configuration items when configuring and updating, and only sends the updated configuration items to the client.
It effectively reduces the bandwidth usage of clients during configuration updates and improves the efficiency of configuration updates.
Smart Images

Figure CN120066615A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, device, and storage medium for configuration update. Background Art
[0002] The software system of the CS (Client-Server) mode is a software system that is currently widely used. In the software system of the CS mode, there are a client and a server. The various functions executed by the client depend on the instruction decisions and configuration data of the server. Configuration data is crucial for whether the client can execute a certain function. Therefore, the server needs to update the configuration data of the client in a timely manner.
[0003] The current configuration update scheme is usually full update. Specifically, the client sends a configuration update request to the server, and the server sends the full configuration data corresponding to the client to the client, and the client updates the configuration data with updates among them.
[0004] In the above scheme, each time the configuration is updated, the server needs to send the full configuration data to the client. Since the full configuration data usually has a large amount of data, this will cause a large waste of bandwidth for the client. Summary of the Invention
[0005] The embodiments of this application provide a method, device, and storage medium for configuration update, which can save the bandwidth of the client when the configuration is updated. The technical solution is as follows:
[0006] In a first aspect, a method for configuration update is provided. The method is applied to the server of the software system, and the software system further includes a client. The method includes:
[0007] Receiving the configuration update request sent by the client, where the configuration update request carries the client attribute information of each configuration class of the software system in the client. Each configuration class includes at least one configuration item of the software system, and the client attribute information includes the configuration class identification information of the configuration class and the client version information of the configuration class;
[0008] Determining, according to the client attribute information of each configuration class of the software system in the client and the server attribute information of each configuration class of the software system in the server, the updated configuration class in the configuration classes of the software system in the server, and determining the updated configuration items among the configuration items included in the updated configuration class;
[0009] Sending a configuration update response to the client, where the configuration update response carries the relevant information of the updated configuration items.
[0010] In a possible implementation, the method further includes:
[0011] When a first configuration item of the software system is updated, determine a first configuration class to which the first configuration item belongs;
[0012] Update the server version information of the first configuration class.
[0013] In a possible implementation, determining an updated configuration class from the configuration classes of the software system in the client according to the client identification information of each configuration class of the software system in the client and the server identification information of each configuration class of the software system in the client includes:
[0014] If the client version information of a second configuration class with second configuration class identification information is different from the server version information of the second configuration class, determine the second configuration class as the updated configuration class.
[0015] In a possible implementation, determining an updated configuration item from the configuration items included in the updated configuration class includes:
[0016] If the client version information of a first configuration item with first configuration item identification information is different from the server version information of the first configuration item, determine the first configuration item as the updated configuration item;
[0017] If there is a second configuration item with second configuration item identification information in the updated configuration class and the client does not have a second configuration item with the second configuration item identification information, determine the second configuration item as the updated configuration item.
[0018] In a possible implementation, determining an updated configuration class from the configuration classes of the software system in the client according to the client identification information of each configuration class of the software system in the client and the server identification information of each configuration class of the software system in the client includes:
[0019] If the server has a third configuration class with third configuration class identification information and the client does not have a third configuration class with the third configuration class identification information, determine the third configuration class as the updated configuration class.
[0020] In a possible implementation, determining an updated configuration item from the configuration items included in the updated configuration class includes:
[0021] Determine all the configuration items in the updated configuration class as the updated configuration items.
[0022] In a possible implementation, the client version information of the configuration class is the client version number of the configuration class, and the server version information of the configuration class is the server version number of the configuration class; or, the client version information of the configuration class is the summary of all configuration items in the configuration class on the client side, and the server version information of the configuration class is the summary of all configuration items in the configuration class on the server side.
[0023] In a second aspect, a device for configuration update is provided. The device is applied to the server side of a software system, and the software system further includes a client. The device includes:
[0024] A receiving module, configured to receive a configuration update request sent by the client. The configuration update request carries the client attribute information of each configuration class of the software system on the client side. Each configuration class includes at least one configuration item of the software system, and the client attribute information includes the configuration class identification information of the configuration class and the client version information of the configuration class.
[0025] A determining module, configured to determine an updated configuration class in the configuration classes of the software system on the server side according to the client attribute information of each configuration class of the software system on the client side and the server attribute information of each configuration class of the software system on the server side, and determine updated configuration items among the configuration items included in the updated configuration class.
[0026] A sending module, configured to send a configuration update response to the client. The configuration update response carries the server attribute information of the updated configuration class and the configuration data of the updated configuration items.
[0027] In a possible implementation, the device further includes an updating module, configured to:
[0028] When a first configuration item of the software system is updated, determine the first configuration class to which the first configuration item belongs;
[0029] Update the server version information of the first configuration class.
[0030] In a possible implementation, the determining module is configured to:
[0031] If the client version information of a second configuration class with a second configuration class identification information is different from the server version information of the second configuration class, determine the second configuration class as the updated configuration class.
[0032] In a possible implementation, the determining module is configured to:
[0033] If the client version information of the first configuration item with the first configuration item identification information is different from the server version information of the first configuration item, then determine the first configuration item as an updated configuration item;
[0034] If there is a second configuration item with the second configuration item identification information in the updated configuration class, and there is no second configuration item with the second configuration item identification information in the client, then determine the second configuration item as an updated configuration item.
[0035] In a possible implementation, the determining module is configured to:
[0036] If there is a third configuration class with the third configuration class identification information in the server, and there is no third configuration class with the third configuration class identification information in the client, then determine the third configuration class as an updated configuration class.
[0037] In a possible implementation, the determining module is configured to:
[0038] Determine all the configuration items in the updated configuration class as updated configuration items.
[0039] In a possible implementation, the client version information of the configuration class is the client version number of the configuration class, and the server version information of the configuration class is the server version number of the configuration class; or, the client version information of the configuration class is the digest of all the configuration items in the configuration class in the client, and the server version information of the configuration class is the digest of all the configuration items in the configuration class in the server.
[0040] In a third aspect, a computing device is provided, where the computing device includes a processor and a memory, and at least one instruction is stored in the memory, and the instruction is loaded and executed by the processor to implement the operations performed by the configuration update method as described in the first aspect and any possible implementation of the first aspect.
[0041] In a fourth aspect, a computer-readable storage medium is provided, where at least one instruction is stored in the storage medium, and the instruction is loaded and executed by the processor to implement the operations performed by the configuration update method as described in the first aspect and any possible implementation of the first aspect.
[0042] In a fifth aspect, a computer program product is provided, where at least one instruction is stored in the computer program product, and the instruction is loaded and executed by the processor to implement the operations performed by the configuration update method as described in the first aspect and any possible implementation of the first aspect.
[0043] The beneficial effects brought by the technical solution provided in this application are:
[0044] In the technical solution provided by this application, the configuration items of the software system are divided into configuration classes and managed in the way of configuration classes. When the server updates the configuration of the client, it first determines the updated configuration classes with updates, and further determines the updated configuration items with updates in the updated configuration classes. Furthermore, the server only needs to send the updated configuration items to the client, which can effectively reduce the bandwidth occupation of the client during configuration update. Brief Description of the Drawings
[0045] To more clearly illustrate the technical solutions in the embodiments of this application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0046] Figure 1 It is a schematic diagram of a system architecture provided by an embodiment of this application;
[0047] Figure 2 It is a flowchart of a method for configuration update provided by an embodiment of this application;
[0048] Figure 3 It is a schematic diagram of the structure of a device for configuration update provided by an embodiment of this application;
[0049] Figure 4 It is a schematic diagram of the structure of a client provided by an embodiment of this application;
[0050] Figure 5 It is a schematic diagram of the structure of a server provided by an embodiment of this application. Detailed Embodiments
[0051] To make the purpose, technical solutions and advantages of this application clearer, the following will further describe the embodiments of this application in detail with reference to the drawings.
[0052] The embodiments of this application provide a method for configuration update. This method can be applied to a software system, and the software system can be the software system of a music application, the software system of a video application, etc. Refer to Figure 1 , the software system includes a server and a client. Both the server and the client can be computing devices, and the computing devices can be servers, mobile phones, tablet computers, desktop computers, laptop computers, etc.
[0053] The various functions executed by the client depend on the configuration data sent by the server. Therefore, the server needs to update the configuration data of the client in a timely manner. In the related art, the current configuration update scheme is usually a full update. Specifically, the client sends a configuration update request to the server, and the server sends the full configuration data corresponding to the client to the client. Among them, the full configuration data is all configuration items. Then, the client updates the configuration items with updates in the full configuration data sent by the server. In the solution of the related art, each time the configuration is updated, the server needs to send the full configuration data to the client. Since the amount of the full configuration data is usually large, this will cause a large waste of bandwidth for the client.
[0054] The embodiment of the present application provides a method for configuration update. In this method, the configuration items of the software system are divided into configuration classes and managed in the form of configuration classes. When the server updates the configuration of the client, it first determines the updated configuration classes with updates, and further determines the updated configuration items with updates in the updated configuration classes. Furthermore, the server only needs to send the updated configuration items to the client, which can effectively reduce the bandwidth occupation of the client during configuration update.
[0055] The following describes the method for configuration update provided by the embodiment of the present application with reference to the accompanying drawings. Refer to Figure 2 , this method may include the following steps:
[0056] Step 201: The server receives a configuration update request sent by the client.
[0057] Among them, the configuration update request carries the client attribute information of each configuration class of the software system in the client. Each configuration class includes at least one configuration item of the software system. The client attribute information includes the configuration class identifier information of the configuration class and the client version information of the configuration class.
[0058] In implementation, taking the software system as a music application as an example, when the music application has not been installed on the client, the client first sends a download request for the music application to the server. Furthermore, the server sends an installation package of the music application to the client. The installation package includes all configuration items of the music application, the configuration item identifiers of the configuration items, the server version information of the configuration items, and the server attribute information of the configuration classes to which the configuration items belong. The client installs the music application and uses the server version information of the configuration item as the client version information of the configuration item, uses the server attribute information of the configuration class as the attribute information of the configuration class, and uses the server version information of the configuration class as the client version information of the configuration class.
[0059] After installing the software system, the client can periodically send a configuration update request to the server, or send a configuration update request to the server when receiving an update instruction.
[0060] In a possible implementation, when the client periodically sends a configuration update request to the server, the heartbeat message can be reused as the configuration update request. Specifically, the process can be as follows:
[0061] A communication connection is established between the client and the server, such as a TCP (Transmission Control Protocol) long connection. Then, the client starts a keep-alive heartbeat timer. When the keep-alive heartbeat timer reaches the specified timing condition, the client sends a heartbeat message to the server, and this heartbeat message can be used as the configuration update request, which carries the client attribute information of each configuration class of the software system in the client.
[0062] In another possible implementation, the heartbeat message can be reused as the configuration update request every N heartbeat messages. For example, the first heartbeat message is used as the configuration update request, the (N + 2)-th heartbeat message is used as the configuration update request, the (2N + 2)-th heartbeat message is used as the configuration update request, and so on. Among them, the value of N can be configured by relevant personnel according to requirements, such as N = 5.
[0063] In a possible implementation, the client version information and the server version information of the above configuration class can be version numbers, or can be the digest of each configuration item in the configuration class. The specific digest calculation can use content digest algorithms such as CRC (Cyclic Redundancy Check), MD5 (Message-Digest Algorithm 5), SHA256 (Secure Hash Algorithm 256), etc.
[0064] In a possible implementation, the server can store configured server cookies, and the client can store configured client cookies. The following uses an example to illustrate cookies. Table 1 below shows the corresponding relationship between a configuration class identification information and the server version information of the configuration class.
[0065] Table 1
[0066] Configuration class identification information Server version information of the configuration class section1 1001 section2 2001 section3 3001 …… ……
[0067] The method for generating the configured server cookies can be to sort the configuration class identification information in lexicographical order, obtain the server version information of each configuration class, and splice them into a string to obtain the server cookies. Taking Table 1 above as an example, the server cookies are: section1=1001§ion2=2001§ion3=3001….
[0068] Correspondingly, the configured server cookies can be carried in the installation package of the software system sent by the server to the client, and the client can use the server cookies as the client cookies. The client attribute information of each configuration class of the software system in the client carried in the configuration update request sent by the client to the server can be the configured client cookies.
[0069] In a possible implementation, the client can store the configuration items in the format of configuration class, key of the configuration item, and value of the configuration item, as shown in Table 2 below:
[0070] Table 2
[0071] Configuration class identification information Key of the configuration item Value of the configuration item section1 key1 value1 section1 key2 value2 Section2 key6 value6 …… …… ……
[0072] Among them, the key of the configuration item can be the above-mentioned configuration item identification information.
[0073] Correspondingly, when a module needs to read the configuration, it can call the configuration reading interface. The input parameters of the configuration reading interface include the configuration class identification information and the key of the configuration item. Furthermore, the value of the configuration item can be obtained.
[0074] Step 202: The server determines the updated configuration class in the configuration classes of the software system in the server according to the client attribute information of each configuration class of the software system in the client and the server attribute information of each configuration class of the software system in the server, and determines the updated configuration items in the configuration items included in the updated configuration class.
[0075] In implementation, the configuration update includes three cases: value update of the configuration item, addition of a new configuration item, and deletion of a configuration item.
[0076] The following is an explanation of these three cases:
[0077] Case 1: Value update of the configuration item
[0078] When the value of a configuration item is updated, the server version information of the configuration item is also updated. For example, the version information of a configuration item is an incrementing numerical value. If the server version information of a certain configuration item is 10, when the value of this configuration item is updated, the server version information of this configuration item is updated to 11.
[0079] In addition, when the value of a configuration item is updated, it is also necessary to update the server version information of the configuration class to which the configuration item belongs. For example, the version information of a configuration class is an incrementing numerical value. If the server version information of a certain configuration class is 1001, when the value of a certain configuration item in this configuration class is updated, the server version information of this configuration class is updated to 1002. Another example is that the version information of a configuration class is the digest of each configuration item in the configuration class. When the value of a certain configuration item in this configuration class is updated, the digest of each configuration item in the configuration class is recalculated, and the server version information of this configuration class is updated to the recalculated digest.
[0080] Case 2: Adding a new configuration item
[0081] When adding a new configuration item, determine the configuration class to which the new configuration item belongs, add the new configuration item to the configuration class to which it belongs. If the configuration class to which it belongs is an existing configuration class, update the server version information of the configuration class to which it belongs.
[0082] There are multiple methods to divide configuration items into configuration classes. Several of them are exemplified below for illustration.
[0083] Method 1:
[0084] In the stage of developing a software system, it is preset that the maximum number of configuration items included in a configuration class is M. First, create a configuration class, assign configuration class identification information to it, and randomly assign existing configuration items to this configuration class. When all configuration items have been assigned, but the number of configuration items included in this configuration class has not yet reached M, determine the server identification information of this configuration class; when the number of configuration items included in this configuration class reaches M and there are still configuration items not assigned, determine the server identification information of this configuration class, and create the next configuration class, assign configuration class identification information to it, and randomly assign the remaining configuration items to the newly created configuration class. When all configuration items have been assigned, but the number of configuration items included in this configuration class has not yet reached M, determine the server identification information of this configuration class; when the number of configuration items included in this configuration class reaches M and there are still configuration items not assigned, determine the server identification information of this configuration class, and create the next configuration class, and so on until all configuration items are assigned to configuration classes.
[0085] After the software system is launched, if there are new configuration items, it is determined whether there is a configuration class that currently includes configuration items that do not reach M. If so, it is determined that the configuration class is the configuration class to which the new configuration item belongs. If not, a new configuration class is created, configuration class identification information is assigned to it, the newly created configuration class is determined to be the configuration class to which the new configuration item belongs, and the server version information of the newly created configuration class is determined.
[0086] Method 2:
[0087] During the software system development phase, X configuration classes are created in advance. For each configuration item, the hash value of its configuration item identification information is calculated, and the hash value is divided by X to obtain the remainder. The configuration class corresponding to the remainder is used as the configuration class to which the configuration item belongs.
[0088] After the software system is launched, if there is a new configuration item, the hash value of the configuration item identification information of the new configuration item is calculated, and the remainder is obtained by dividing the hash value by X. The configuration class corresponding to the remainder is used as the configuration class to which the configuration item belongs, and the server version information of the configuration class is updated.
[0089] Method 3:
[0090] Configuration classes are divided according to the type of configuration items, for example, switch class, URL (Uniform Resource Locator) address class, display text class, etc. Each type corresponds to a configuration class.
[0091] After the software system is launched, if there is a new configuration item, the type of the new configuration item is determined, the configuration class corresponding to the type is used as the configuration class to which the configuration item belongs, and the server version information of the configuration class is updated.
[0092] Case 3: Deleting configuration items
[0093] When deleting a configuration item, determine the configuration class to which the configuration item belongs, delete the configuration item in the configuration class to which it belongs, and update the server version information of the configuration class to which it belongs.
[0094] Regardless of the above situations, when the configuration is updated, the configuration class will definitely change, which may be a new configuration class or an update of the server version information of the configuration class. On this basis, after receiving the configuration update request sent by the client, the server first determines whether the client attribute information of each configuration class in the client of the software system and the server attribute information of each configuration class in the server of the software system are consistent. If they are consistent, it means that there is no configuration update, and the update response can be directly returned. If they are inconsistent, it is further determined to update the configuration class.
[0095] The method for determining the updated configuration class will be described as follows in different cases:
[0096] Case 1: The server does not have a newly added configuration class
[0097] If the client version information of the first configuration class with the first configuration class identification information is different from the server version information of the first configuration class, it indicates that there is a configuration item update in the first configuration class. Then, the first configuration class is determined as the updated configuration class.
[0098] For example, if the client version information of configuration class section1 is 1001 and the server version information of configuration class section1 is 1002, it indicates that there is a configuration item update in configuration class section1. Then, configuration class section1 is determined as the updated configuration class.
[0099] Case 2: The server has a newly added configuration class
[0100] If the server has a second configuration class with the second configuration class identification information, and the configuration update request does not carry the second configuration class identification information (that is, the second configuration class does not exist in the client), it indicates that the second configuration class is a newly added configuration class. Then, the second configuration class is determined as the updated configuration class.
[0101] For example, if the server has a configuration class with the configuration class identification information section22, and the configuration update request does not carry section22, it indicates that the configuration class with the configuration class identification information section22 is a newly added configuration class. Then, the configuration class with the configuration class identification information section22 is determined as the updated configuration class.
[0102] After determining the updated configuration class, the server determines the updated configuration items in the updated configuration class.
[0103] In the case where the updated configuration class is not a newly added configuration class, the server obtains the client version information of the configuration items included in the updated configuration class. Specifically, when the updated configuration class is determined and it is not a newly added configuration class, a request can be sent to the client to obtain the client version information of the configuration items included in the updated configuration class. Or, the configuration item identification information and the client version information of each configuration item can be carried in the configuration update request sent by the client to the server.
[0104] If the client version information of the first configuration item with the first configuration item identification information is different from the server version information of the first configuration item, the first configuration item is determined as the updated configuration item.
[0105] For example, if the client version information of configuration item con1 is 11 and the server version information of configuration item con1 is 12, it indicates that the value of configuration item con1 has been updated. Then, configuration item con1 is determined as an updated configuration item.
[0106] In addition, the configuration item identifier information, server version information, and value of the updated configuration item can be added to the update list and marked as updated. In a possible implementation, the configuration class identifier information and server version information of the updated configuration class can also be added to the update list.
[0107] If there is a second configuration item with the second configuration item identifier information in the updated configuration class and there is no second configuration item with the second configuration item identifier information on the client side, then the second configuration item is determined as an updated configuration item.
[0108] For example, if there is a configuration item with the configuration item identifier information con23 in the updated configuration class and there is no configuration item with the configuration item identifier information con23 on the client side, it indicates that the configuration item with the configuration item identifier information con23 is a newly added configuration item. Then, the configuration item with the configuration item identifier information con23 is determined as an updated configuration item.
[0109] In addition, the configuration item identifier information, server version information, and value of the updated configuration item can be added to the update list and marked as newly added. In a possible implementation, the configuration class identifier information and server version information of the updated configuration class can also be added to the update list.
[0110] If there is no second configuration item with the third configuration item identifier information in the updated configuration class and there is a third configuration item with the third configuration item identifier information on the client side, it indicates that the third configuration item has been deleted. Then, the third configuration item is determined as an updated configuration item.
[0111] For example, if there is no configuration item with the configuration item identifier information con51 in the updated configuration class on the server side and there is a configuration item with the configuration item identifier information con51 on the client side, it indicates that the configuration item with the configuration item identifier information con51 is a deleted configuration item. Then, the configuration item with the configuration item identifier information con51 is determined as an updated configuration item.
[0112] In addition, the configuration item identifier information of the updated configuration item can be added to the update list and marked as deleted. In a possible implementation, the configuration class identifier information and server version information of the updated configuration class can also be added to the update list.
[0113] In the case where the updated configuration class is a newly added configuration class, all configuration items in the updated configuration class are determined as updated configuration items.
[0114] In addition, the configuration item identification information, server version information, and value of the updated configuration item can be added to the update list and marked as new. In a possible implementation, the configuration class identification information and server version information of the update configuration class can also be added to the update list.
[0115] Step 203, the server sends a configuration update response to the client.
[0116] Among them, the relevant information of the updated configuration item is carried in the configuration update response. In the case where the updated configuration item is a newly added configuration item or a configuration item with an updated value, the relevant information may include the updated configuration item identification information, server version information, and value; in the case where the updated configuration item is a deleted configuration item, the relevant information may include the updated configuration item identification information.
[0117] In implementation, the server can carry the above update list in the configuration update response and return it to the client. In addition, the server can also calculate the server cookies of the configuration and carry them in the configuration update response and return them to the client together.
[0118] After receiving the configuration update response, the client updates the local configuration items according to the update list carried therein. In addition, in the case where the server cookies of the configuration are carried in the configuration update response, the client can update the client cookies of the local configuration to the server cookies.
[0119] In addition, after receiving the server version information of the updated configuration class and the server version information of the updated configuration item, the client can update the client version information of the updated configuration class to the server version information of the updated configuration class, and update the client version information of the updated configuration item to the server version information of the updated configuration item.
[0120] All the above optional technical solutions can be combined arbitrarily to form alternative embodiments of the present disclosure, which will not be elaborated herein one by one.
[0121] In the technical solution provided by the embodiments of the present application, the configuration items of the software system are divided into configuration classes and managed in the form of configuration classes. When the server updates the configuration of the client, it first determines the updated configuration classes with updates, and further determines the updated configuration items with updates in the updated configuration classes. Furthermore, the server only needs to send the updated configuration items to the client, which can effectively reduce the bandwidth occupation of the client during configuration update.
[0122] Based on the same technical concept, an embodiment of the present application further provides a device for configuration update. The device is applied to the server side of a software system, and the software system further includes a client side, as Figure 3 shown. The device includes a receiving module 510, a determining module 520, and a sending module 530, where:
[0123] The receiving module 510 is configured to receive a configuration update request sent by the client side. The configuration update request carries client attribute information of each configuration class of the software system in the client side. Each configuration class includes at least one configuration item of the software system, and the client attribute information includes configuration class identification information of the configuration class and client version information of the configuration class;
[0124] The determining module 520 is configured to determine an updated configuration class in the configuration classes of the software system in the server side according to the client attribute information of each configuration class of the software system in the client side and the server attribute information of each configuration class of the software system in the server side, and determine updated configuration items among the configuration items included in the updated configuration class;
[0125] The sending module 530 is configured to send a configuration update response to the client side. The configuration update response carries server attribute information of the updated configuration class and configuration data of the updated configuration items.
[0126] In a possible implementation, the device further includes an update module, configured to:
[0127] When a first configuration item of the software system is updated, determine the first configuration class to which the first configuration item belongs;
[0128] Update the server version information of the first configuration class.
[0129] In a possible implementation, the determining module 520 is configured to:
[0130] If the client version information of a second configuration class with second configuration class identification information is different from the server version information of the second configuration class, determine the second configuration class as the updated configuration class.
[0131] In a possible implementation, the determining module 520 is configured to:
[0132] If the client version information of a first configuration item with first configuration item identification information is different from the server version information of the first configuration item, determine the first configuration item as the updated configuration item;
[0133] If there is a second configuration item with second configuration item identification information in the update configuration class, and the client does not have a second configuration item with the second configuration item identification information, then the second configuration item is determined as the update configuration item.
[0134] In a possible implementation, the determining module 520 is configured to:
[0135] If there is a third configuration class with third configuration class identification information in the server, and the client does not have a third configuration class with the third configuration class identification information, then the third configuration class is determined as the update configuration class.
[0136] In a possible implementation, the determining module 520 is configured to:
[0137] All configuration items in the update configuration class are determined as update configuration items.
[0138] In a possible implementation, the client version information of the configuration class is the client version number of the configuration class, and the server version information of the configuration class is the server version number of the configuration class; or, the client version information of the configuration class is the summary of all configuration items in the configuration class in the client, and the server version information of the configuration class is the summary of all configuration items in the configuration class in the server.
[0139] In the technical solution provided in the embodiments of the present application, the configuration items of the software system are divided into configuration classes and managed in the form of configuration classes. When the server updates the configuration of the client, it first determines the update configuration classes with updates, and further determines the update configuration items with updates in the update configuration classes. Furthermore, the server only needs to send the update configuration items to the client, which can effectively reduce the bandwidth occupation of the client during configuration update.
[0140] It should be noted that: when the configuration update device provided in the above embodiments performs configuration update, only the above-mentioned division of each functional module is used for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the computing device is divided into different functional modules to complete all or part of the functions described above. In addition, the configuration update device provided in the above embodiments and the method embodiments of configuration update belong to the same concept, and the specific implementation process is detailed in the method embodiments and will not be repeated here.
[0141] Figure 4The structural block diagram of a client 600 provided by an exemplary embodiment of the present application is shown. The client 600 may be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer or a desktop computer. The client 600 may also be referred to by other names such as a user device, a portable terminal, a laptop terminal, a desktop terminal, etc.
[0142] Generally, the client 600 includes: a processor 601 and a memory 602.
[0143] The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor 601 may also include a main processor and a co-processor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the co-processor is a low-power processor for processing data in the standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 601 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.
[0144] The memory 602 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices.
[0145] In some embodiments, the client 600 may further optionally include: a peripheral device interface 603 and at least one peripheral device. The processor 601, the memory 602, and the peripheral device interface 603 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 603 through a bus, signal lines, or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 604, a display screen 605, a camera assembly 606, an audio circuit 607, a positioning assembly 608, and a power supply 609.
[0146] The peripheral device interface 603 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, the memory 602, and the peripheral device interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral device interface 603 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.
[0147] The radio frequency circuit 604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 604 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 604 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 604 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 604 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.
[0148] The display screen 605 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to collect touch signals on or above the surface of the display screen 605. The touch signals can be input as control signals to the processor 601 for processing. At this time, the display screen 605 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 605, which is arranged on the front panel of the client 600; in other embodiments, there can be at least two display screens 605, which are respectively arranged on different surfaces of the client 600 or are in a folded design; in other embodiments, the display screen 605 can be a flexible display screen, which is arranged on the curved surface or the folding surface of the client 600. Even more, the display screen 605 can also be set to an irregular non-rectangular shape, that is, an irregular-shaped screen. The display screen 605 can be prepared using materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0149] The camera module 606 is used to capture images or videos. Optionally, the camera module 606 includes a front camera and a rear camera. Generally, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which can be any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, so as to realize the function of background blurring by fusing the main camera and the depth-of-field camera, the function of panoramic shooting by fusing the main camera and the wide-angle camera, and the VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera module 606 can also include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. A two-color-temperature flash refers to the combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.
[0150] The audio circuit 607 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 601 for processing, or input to the radio frequency circuit 604 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the client 600. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 601 or the radio frequency circuit 604 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 607 may also include a headphone jack.
[0151] The positioning component 608 is used to locate the current geographical location of the client 600 to achieve navigation or LBS (Location Based Service). The positioning component 608 may be a positioning component based on GPS (Global Positioning System), Beidou system or Galileo system.
[0152] The power supply 609 is used to supply power to each component in the client 600. The power supply 609 may be alternating current, direct current, a disposable battery or a rechargeable battery. When the power supply 609 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0153] In some embodiments, the client 600 further includes one or more sensors 610. The one or more sensors 610 include but are not limited to: an acceleration sensor 611, a gyroscope sensor 612, a pressure sensor 613, a fingerprint sensor 614, an optical sensor 615, and a proximity sensor 616.
[0154] The acceleration sensor 611 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the client 600. For example, the acceleration sensor 611 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 601 can control the display screen 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 can also be used for collecting game or user's motion data.
[0155] The gyroscope sensor 612 can detect the body orientation and rotation angle of the client 600. The gyroscope sensor 612 can cooperate with the acceleration sensor 611 to collect the 3D actions of the user on the client 600. Based on the data collected by the gyroscope sensor 612, the processor 601 can implement the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation.
[0156] The pressure sensor 613 can be disposed on the side frame of the client 600 and / or the lower layer of the display screen 605. When the pressure sensor 613 is disposed on the side frame of the client 600, it can detect the holding signal of the user on the client 600, and the processor 601 can identify the left or right hand or perform a quick operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed on the lower layer of the display screen 605, the processor 601 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 605. The operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0157] The fingerprint sensor 614 is used to collect the fingerprint of the user. The processor 601 can identify the user's identity according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 can identify the user's identity according to the collected fingerprint. When the identified user identity is a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations, and the sensitive operations include unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings, etc. The fingerprint sensor 614 can be disposed on the front, back, or side of the client 600. When there are physical buttons or a manufacturer logo on the client 600, the fingerprint sensor 614 can be integrated with the physical buttons or the manufacturer logo.
[0158] The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, the processor 601 can control the display brightness of the display screen 605 according to the ambient light intensity collected by the optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the display screen 605 is increased; when the ambient light intensity is low, the display brightness of the display screen 605 is decreased. In another embodiment, the processor 601 can also dynamically adjust the shooting parameters of the camera module 606 according to the ambient light intensity collected by the optical sensor 615.
[0159] A proximity sensor 616, also known as a distance sensor, is typically disposed on the front panel of the client 600. The proximity sensor 616 is used to collect the distance between the user and the front of the client 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front of the client 600 is gradually decreasing, the processor 601 controls the display screen 605 to switch from the lit state to the off state; when the proximity sensor 616 detects that the distance between the user and the front of the client 600 is gradually increasing, the processor 601 controls the display screen 605 to switch from the off state to the lit state.
[0160] Those skilled in the art can understand that Figure 4 the structure shown in does not constitute a limitation on the client 600, and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0161] Figure 5 is a schematic structural diagram of a server provided by an embodiment of the present application. The server 1000 may vary greatly due to different configurations or performances, and may include one or more processors (central processing units, CPUs) 1001 and one or more memories 1002. Among them, at least one instruction is stored in the memory 1002, and the at least one instruction is loaded and executed by the processor 1001 to implement the methods provided by the above various method embodiments. Of course, the computing device may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input / output. The computing device may also include other components for implementing the functions of the device, which will not be elaborated here.
[0162] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, and the above instructions can be executed by a processor in the terminal to complete the method of configuration update in the above embodiments. The computer-readable storage medium may be non-transitory. For example, the computer-readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0163] It should be noted that the information involved in this application (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.), and signals (including but not limited to signals transmitted between the user terminal and other devices, etc.) are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions. For example, the relevant information about the configurations involved in this application is obtained under full authorization.
[0164] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk, an optical disc, or the like.
[0165] The above are only optional embodiments of the present application, and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A configuration update method, characterized in that: The method is applied to the server side of a software system, the software system also includes a client side, and the method includes: receiving a configuration update request sent by the client, wherein the configuration update request carries client attribute information of each configuration class of the software system in the client, wherein each configuration class includes at least one configuration item of the software system, and the client attribute information includes configuration class identification information of the configuration class and client version information of the configuration class; According to the client attribute information of each configuration class of the software system in the client and the server attribute information of each configuration class of the software system in the server, the software system determines an update configuration class in the configuration class in the server, and determines an update configuration item in the configuration items included in the update configuration class; Sending a configuration update response to the client, wherein the configuration update response carries relevant information of the updated configuration item.
2. The method according to claim 1, characterized in that The method further comprises: When a first configuration item of the software system is updated, determining a first configuration class to which the first configuration item belongs; Update the server version information of the first configuration class.
3. The method according to claim 2, characterized in that The step of determining, in the configuration class in the client of the software system, to update the configuration class according to the client identification information of each configuration class in the client of the software system and the server identification information of each configuration class in the client of the software system comprises: If the client version information of the second configuration class having the second configuration class identification information is different from the server version information of the second configuration class, the second configuration class is determined as an updated configuration class.
4. The method according to claim 3, characterized in that Determining the update configuration item among the configuration items included in the update configuration class includes: If the client version information of the first configuration item having the first configuration item identification information is different from the server version information of the first configuration item, determining the first configuration item as an updated configuration item; If the update configuration class contains a second configuration item with second configuration item identification information, and the client does not contain the second configuration item with the second configuration item identification information, the second configuration item is determined as an update configuration item.
5. The method according to claim 2, characterized in that: The step of determining, in the configuration class in the client of the software system, to update the configuration class according to the client identification information of each configuration class in the client of the software system and the server identification information of each configuration class in the client of the software system comprises: If the server has a third configuration class with third configuration class identification information, and the client does not have a third configuration class with the third configuration class identification information, the third configuration class is determined as an updated configuration class.
6. The method according to claim 5, characterized in that Determining the update configuration item among the configuration items included in the update configuration class includes: All configuration items in the update configuration class are determined as update configuration items.
7. The method according to any one of claims 1 to 6, characterized in that The client version information of the configuration class is the client version number of the configuration class, and the server version information of the configuration class is the server version number of the configuration class; or, The client version information of the configuration class is a summary of all configuration items in the configuration class in the client, and the server version information of the configuration class is a summary of all configuration items in the configuration class in the server.
8. A computing device, characterized in that The computing device includes a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the operation performed by the configuration update method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, which is loaded and executed by the processor to implement the operation performed by the configuration update method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product stores at least one instruction, which is loaded and executed by a processor to implement the operations performed by the configuration update method according to any one of claims 1 to 7.