Configuration data updating method and device, equipment and storage medium
By automatically comparing and merging the version difference data of configuration files, the problem of difficulty in manually maintaining incremental tables in the existing technology is solved, and automatic update of configuration data is realized, which simplifies the process and reduces costs.
Patent Information
- Application Number
- CN202311449262.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-05-06
AI Technical Summary
When the configuration file version iteration, the thermal update of the configuration file is realized by manually maintaining the incremental table. As the redundancy of configuration data increases, manual maintenance becomes difficult, and manual intervention is required to lead to high costs and error-prone.
By detecting the version update of the configuration file, comparing the second version data and the first version data, determining the first version difference data, and combining it with the version information of the historical update data to obtain the third version difference data. According to the third version of the difference data and the second version of the configuration file, the difference data is determined and the difference data is sent to the second device to realize automatic update of the configuration data.
Automatic differential data determination of configuration data is realized, avoiding the need for manual maintenance of incremental tables, simplifying the update process of configuration data, reducing costs, and improving update efficiency.
Smart Images

Figure CN119938085A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, apparatus, device and storage medium for updating configuration data. Background Art
[0002] During the online operation of an application, it is often necessary to frequently update the corresponding configuration files to publish new content or fix configuration bugs (errors).
[0003] At present, considering the user experience, the client configuration files are mostly updated by non-perceptual update (i.e. hot update). That is, only the configuration file patch package on the server side is released, and the updated configuration file is synchronized to the client in real time without the user's perception through the server's resource distribution.
[0004] In the related art, a manually maintained incremental table is stored on the server side, and the incremental table is used to record the configuration data that are different in the configuration file before and after the update. In addition, the hot update of the configuration file is realized by sending the incremental table to the user terminal. However, with the iteration of the configuration file version, the redundancy of the configuration data gradually increases, and it will become increasingly difficult to manually maintain the incremental table. Summary of the invention
[0005] The embodiment of the present application provides a configuration data updating method, device, equipment and storage medium. The technical solution provided by the embodiment of the present application is as follows:
[0006] According to one aspect of an embodiment of the present application, a method for updating configuration data is provided, the method comprising:
[0007] In the case of detecting that a configuration file of a first application stored in a first device is updated from a first version to a second version, comparing the second version data with the first version data to determine first version difference data; wherein the configuration file includes at least one configuration data, the second version data is version data corresponding to the configuration file of the second version, the first version data is version data corresponding to the configuration file of the first version, the version data includes version information of each configuration data included in the configuration file, and the first version difference data is used to indicate version information of configuration data that is different from the configuration file of the first version;
[0008] Merging the first version difference data and the second version difference data to obtain third version difference data; wherein the second version difference data is used to indicate version information of historical update data, the historical update data refers to configuration data updated in the process of updating the configuration file from the third version to the first version, and the third version refers to the minimum version of the configuration file when the first application can log in;
[0009] Determine difference data according to the third version difference data and the second version configuration file, wherein the difference data is used to indicate configuration data updated during the process of updating the configuration file from the third version to the second version;
[0010] The difference data is sent to the second device.
[0011] According to another aspect of an embodiment of the present application, a method for updating configuration data is provided, the method comprising:
[0012] Receive difference data determined according to the third version difference data and a configuration file of the second version of the first application; wherein the configuration file includes at least one configuration data, the difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version, the third version refers to the lowest version of the configuration file when the first application can log in, the third version difference data is obtained by merging the first version difference data and the second version difference data, the first version difference data is used to indicate version information of the configuration data in which the configuration file of the second version is different from the configuration file of the first version, the first version difference data is determined by comparing the second version data with the first version data when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes the version information of each of the configuration data included in the configuration file, the second version difference data is used to indicate the version information of the historical update data, the historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version;
[0013] According to the difference data, the configuration file of the first application stored in the second device is updated to the configuration file of the second version.
[0014] According to one aspect of an embodiment of the present application, a device for updating configuration data is provided, the device comprising:
[0015] A comparison module, when detecting that a configuration file of a first application stored in a first device is updated from a first version to a second version, compares the second version data with the first version data to determine first version difference data; wherein the configuration file includes at least one configuration data, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes version information of each configuration data included in the configuration file, and the first version difference data is used to indicate version information of configuration data that is different from the configuration file of the first version;
[0016] a merging module, configured to merge the first version difference data and the second version difference data to obtain third version difference data; wherein the second version difference data is used to indicate version information of historical update data, the historical update data refers to configuration data updated in the process of updating the configuration file from the third version to the first version, and the third version refers to the minimum version of the configuration file when the first application can log in;
[0017] a determination module, configured to determine difference data according to the third version difference data and the second version configuration file, wherein the difference data is used to indicate configuration data updated during the process of updating the configuration file from the third version to the second version;
[0018] A sending module is used to send the difference data to the second device.
[0019] According to another aspect of an embodiment of the present application, a device for updating configuration data is provided, the device comprising:
[0020] a receiving module, receiving difference data determined according to the third version difference data and a configuration file of the second version of the first application; wherein the configuration file includes at least one configuration data, the difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version, the third version refers to the lowest version of the configuration file when the first application can log in, the third version difference data is obtained by merging the first version difference data and the second version difference data, the first version difference data is used to indicate the version information of the configuration data in which the configuration file of the second version is different from the configuration file of the first version, the first version difference data is determined by comparing the second version data with the first version data when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes the version information of each of the configuration data included in the configuration file, the second version difference data is used to indicate the version information of the historical update data, the historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version;
[0021] An updating module is used to update the configuration file of the first application stored in the second device to the configuration file of the second version according to the difference data.
[0022] According to one aspect of an embodiment of the present application, a computer device is provided, the computer device comprising a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the above-mentioned configuration data updating method.
[0023] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned configuration data updating method.
[0024] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the above-mentioned configuration data updating method.
[0025] The technical solution provided by the embodiments of the present application includes at least the following beneficial effects:
[0026] By comparing the second version data with the first version data when it is detected that the configuration file stored in the first device has been updated, the first version difference data is determined, and the first version difference data is used to indicate the version information of the configuration data that is different from the configuration file of the second version compared to the configuration file of the first version. Then, the first version difference data and the second version difference data used to indicate the version information of the configuration data updated in the process of updating the configuration file from the third version to the first version are merged to obtain the third version difference data. Then, based on the third version difference data and the second version configuration file, the difference data used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version is determined. Finally, the above difference data is sent to the second device. In the process of updating the configuration data, the difference data is automatically determined, and there is no need to manually maintain the incremental table, which simplifies the update process of the configuration data. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 is a schematic diagram of a full update solution provided by an embodiment of the present application;
[0028] Figure 2 is a schematic diagram of an incremental update solution provided by an embodiment of the present application;
[0029] Figure 3 is a schematic diagram of a configuration update solution provided by an embodiment of the present application;
[0030] Figure 4 It is a schematic diagram of an implementation environment of a solution provided by an embodiment of the present application;
[0031] Figure 5 is a flowchart of a method for updating configuration data provided by an embodiment of the present application;
[0032] Figure 6 is a schematic diagram of a table conversion process provided by an embodiment of the present application;
[0033] Figure 7 is a flowchart of a process for generating version data provided by an embodiment of the present application;
[0034] Figure 8 is a schematic diagram of sorting configuration item names provided by an embodiment of the present application;
[0035] Fig. 9 is a schematic diagram of sorting a configuration item set provided by an embodiment of the present application;
[0036] Fig.10 It is a schematic diagram of a process for generating a version number of configuration data provided by an embodiment of the present application;
[0037] Fig.11It is a schematic diagram of a process for generating a version number of a configuration file provided by an embodiment of the present application;
[0038] Fig.12 is a schematic diagram of a comparison process of second version data and first version data provided by an embodiment of the present application;
[0039] Fig.13 is a schematic diagram of an update process of a first list and a second list provided by an embodiment of the present application;
[0040] Fig.14 is a schematic diagram of an updating process of a first list and a second list provided by another embodiment of the present application;
[0041] Fig.15 is a flowchart of a configuration data update process after the first list and the second list are updated, provided by an embodiment of the present application;
[0042] Fig.16 It is a schematic diagram of a process for acquiring cumulative newly added data and cumulative modified data provided by an embodiment of the present application;
[0043] Fig.17 is a flow chart of a process for determining difference data provided by an embodiment of the present application;
[0044] Fig.18 is a schematic diagram of a configuration data update solution provided by an embodiment of the present application;
[0045] Fig.19 is a flowchart of a method for updating configuration data provided by another embodiment of the present application;
[0046] Fig. 20 is a schematic diagram of a configuration file update process provided by an embodiment of the present application;
[0047] Fig.21 is a block diagram of a configuration data updating device provided by an embodiment of the present application;
[0048] Fig. 22 is a block diagram of a configuration data updating device provided by another embodiment of the present application;
[0049] Fig.23 It is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0051] In actual applications, many configuration data need to be able to be updated in real time, such as product configuration, lottery configuration, event configuration, etc. in game applications.
[0052] Next, two configuration data hot update solutions provided by related technologies are introduced.
[0053] Please refer to Figure 1 , which shows a schematic diagram of a full update solution provided by an embodiment of the present application, the solution includes the following steps:
[0054] 1. Update the configuration file based on version V1.0 (for example, fix bugs in the configuration file and release new content).
[0055] 2. Create a patch package for the server and update the server configuration file from V1.0 to V2.0.
[0056] 3. The client uses version number V1.0 to pull updates from the server.
[0057] 4. The server compares version number V2.0 with version number V1.0 passed in by the client, and sends the V2.0 configuration file and version number V2.0 to the client.
[0058] 5. The client directly overwrites the V1.0 configuration file with the V2.0 configuration file and updates the version number of the configuration file to V2.0.
[0059] Please refer to Figure 2 , which shows a schematic diagram of an incremental update solution provided by an embodiment of the present application, the solution includes the following steps:
[0060] 1. Update the configuration file based on version V1.0, and add the changed configuration data to the incremental table.
[0061] 2. Prepare a patch package for the server, update the server configuration file from version V1.0 to version V2.0, and use the incremental table with the newly added configuration data to overwrite the original incremental table on the server side.
[0062] 3. The client uses version number V1.0 to pull updates from the server.
[0063] 4. The server compares version number V2.0 with version number V1.0 passed in by the client, and sends the incremental table and version number V2.0 to the client.
[0064] 5. The client merges the configuration data in the incremental table into the V1.0 configuration file to obtain the V2.0 configuration file, and updates the version number of the configuration file to V2.0.
[0065] Both of the above solutions can achieve the purpose of hot updating configuration data, but both have their own disadvantages. In the above full update solution, the complete configuration file will be sent, and some of the configuration data may not be changed, which causes a waste of traffic. In the above incremental update solution, only the incremental table is sent, which avoids traffic waste, but the incremental table requires manual maintenance, which is costly and error-prone.
[0066] To solve the above problems, please refer to Figure 3 , which shows a schematic diagram of a configuration update solution provided by an embodiment of the present application.
[0067] 1. Update based on the configuration file of version V1.0.
[0068] 2. Create a patch package for the server and update the server configuration file from V1.0 to V2.0.
[0069] 3. Compare the configuration differences between the configuration files of version V1.0 and version V2.0 to generate difference data.
[0070] 4. The client uses version number V1.0 to pull updates from the server.
[0071] 5. The server compares version number V2.0 with version number V1.0 passed in by the client, and sends the difference data and version number V2.0 to the client.
[0072] 6. The client updates the configuration file of version V1.0 according to the difference data, obtains the configuration file of version V2.0, and updates the version number of the configuration file to V2.0.
[0073] It can be seen that in this solution, the difference in configuration data between the previous and the next versions of the configuration file is compared to generate difference data, and when the client requests to pull the update, the difference data is sent. In this process, the difference data is obtained through automatic comparison without manual intervention, and the maintenance cost is low. In addition, only the difference data is sent, and the traffic consumption is low.
[0074] It should be noted that in Figure 3 In the example, comparing the two versions of the configuration files to obtain the difference data is only an exemplary description. For the specific method of generating the difference data, please refer to the following embodiment.
[0075] Please refer to Figure 4 , which shows a schematic diagram of a solution implementation environment provided by an embodiment of the present application, and the solution implementation environment may include: a terminal device 10 and a server 20.
[0076] The terminal device 10 may be an electronic device such as a mobile phone, a tablet computer, a PC (Personal Computer), a vehicle-mounted terminal, a smart home appliance, a multimedia player, etc. The terminal device 10 may be installed with a client for running a target application, which may be a game application, a shopping application, a video application, etc., which is not limited in this application.
[0077] The server 20 can be used to provide background services for the client of the target application (such as a game application) in the terminal device 10. For example, the server 20 can be the background server of the above-mentioned target application (such as a game application), and the server 20 can update the configuration file of the target application (such as a game application) by sending resources. The server 20 can be a single server, or a server cluster composed of multiple servers, or a cloud computing service center.
[0078] The terminal device 10 and the server 20 may communicate via a network, such as a wireless or wired network.
[0079] In addition, in the embodiments of the present application, there is no limitation on the implementation form of the target application. For example, it may be an application that needs to be downloaded and installed, a small program that does not need to be installed, a web application, etc.
[0080] Please refer to Figure 5 , which shows a flow chart of a configuration data updating method provided by an embodiment of the present application. The execution subject of each step of the method is a first device, and the first device may be a computer device, for example, the first device may be the server 20 in the above embodiment. The method may include at least one of the following steps 510 to 540.
[0081] Step 510 , when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version, the second version data is compared with the first version data to determine the first version difference data.
[0082] The configuration file includes at least one configuration data, the second version data is the version data corresponding to the second version of the configuration file, the first version data is the version data corresponding to the first version of the configuration file, the version data includes version information of each configuration data included in the configuration file, and the first version difference data is used to indicate the version information of the configuration data that is different from the first version of the configuration file.
[0083] In some embodiments, the second version may be the latest version of the configuration file, that is, the second version of the configuration file is the latest version of the configuration file.
[0084] In some embodiments, the first version may be a historical version of the configuration file (ie, a version updated before the latest version), that is, the first version of the configuration file is a historical version of the configuration file.
[0085] In some embodiments, the second version and the first version may be any version of the configuration file. There are differences in the configuration data in different versions of the configuration files.
[0086] The first application may be any application, such as the target application in the above embodiment, and this application does not limit this.
[0087] In some embodiments, the configuration file may be a complete configuration file of the first application, that is, the configuration file includes all configuration data of the first application. In some embodiments, the configuration file may be a configuration file of a portion of the functions of the application, that is, the configuration file includes configuration data corresponding to the portion of the functions of the application.
[0088] Exemplarily, if the first application is a game application, and the game application has a lottery function and a shopping function, the above-mentioned configuration file may include all configuration data of the game application, or may only include configuration data of each prize corresponding to the above-mentioned lottery function, or may only include configuration data of each commodity corresponding to the above-mentioned shopping function.
[0089] Configuration data is used to configure the parameters of the application. One piece of configuration data can configure one parameter or multiple parameters. In some embodiments, one piece of configuration data has multiple associated configuration items, and each configuration item configures one parameter respectively. In some embodiments, the structure of each configuration item is a "key-value pair", that is, "key = value", "key" corresponds to the field name (that is, the name of the configuration item), and "value" corresponds to the corresponding field value (that is, the value of the configuration item). In the following embodiments, this will be introduced with specific examples.
[0090] In some embodiments, the configuration data in the form of an excel file can be converted into a table using a table conversion tool to obtain the configuration file in the embodiment of the present application. In some embodiments, the configuration file is a lua file.
[0091] For example, please refer to Figure 6 For the product with ID (Identifier) "30001", it has corresponding parameters such as "name", "paging", "classification", "icon", "payment type", "required currency type", "listing time", and "delisting time" that need to be configured. In the configuration file obtained after the table conversion, the configuration data corresponding to "Starter Pack 1" will have configuration items corresponding to the above parameters. For example, in Figure 6In the example, name = "Newbie Package 1" is a configuration item for configuring the parameter of the above "name", "name" is the name of the configuration item, and "Newbie Package 1" is the value of the configuration item.
[0092] In some embodiments, the second version of the configuration file is the latest version of the configuration file, and the first device only stores the latest version of the configuration file, and does not store the configuration file of the historical version. In this case, the configuration file stored in the first device needs to be continuously updated to keep the configuration file at the latest version (i.e., the second version).
[0093] In some embodiments, the configuration file stored in the first device can be modified directly through the first device to update the configuration file stored in the first device. In some embodiments, the configuration file stored in the first device can also be updated by publishing a patch package to the first device after the configuration file is modified using the developer terminal, and this application does not limit this.
[0094] The version information of the configuration data is used to indicate the version of the configuration data.
[0095] In some embodiments, the version information of the configuration data includes: identification information of the configuration data and a version number of the configuration data, the identification information of the configuration data is used to distinguish different configuration data, and the version number of the configuration data is used to distinguish different versions of the configuration data. For example, the identification information of the configuration data can be the ID in the above embodiment, for example, Figure 6 "30001" and "30002" in the table.
[0096] In some embodiments, please refer to Figure 6 For a piece of configuration data, it can be expressed in the form of "identification information = configuration item set", and the configuration item set includes the configuration items corresponding to the configuration data.
[0097] In some embodiments, the version data also includes a version number of the configuration file, and the version number of the configuration file is used to distinguish different versions of the configuration file.
[0098] In some embodiments, the version number of the second version of the configuration file is detected at a first frequency to see if it is the same as the version number of the first version of the configuration file. In this case, the second version is the version of the configuration file of the first application currently stored by the first device, and the first version is the version of the configuration file of the first application stored by the first device after the last determination of the difference data. For the determination process of the above-mentioned difference data, please refer to the embodiment below, which will not be described in detail here.
[0099] The above-mentioned first frequency can be set by the technician as needed, for example, once every 10 minutes, once every half hour (or every 1 hour, every 12 hours, every day, every week), and this application does not limit this.
[0100] In some embodiments, when the version number of the second version of the configuration file is different from the version number of the first version of the configuration file, the second version data is compared with the first version data to determine the first version difference data.
[0101] The above method can timely detect whether the configuration file of the first application stored in the first device is updated, thereby determining the first version difference data in real time, and then automatically determining the difference data after the version is updated to complete the hot update of the client.
[0102] In some embodiments, please refer to Figure 7 After the configuration file is generated by converting the table, the version data corresponding to the configuration file can be further generated according to the configuration file. The following is an exemplary description of the generation process of the second version data, which includes at least one of the following steps:
[0103] 1. For the first configuration data in the second version of the configuration file, sort the configuration items in the first configuration data according to a set order.
[0104] The first configuration data is any configuration data in the configuration file of the second version. The above setting order is set by the technician as needed, such as the alphabetical order of the names of the various configuration items, which is not limited in this application.
[0105] In some embodiments, running the configuration file may process the configuration data in the configuration file.
[0106] In some embodiments, please refer to Figure 8 , you can first take out the names of each configuration item in the configuration item set ("name", "page", "category", "icon", "pay_type", "currency_type", "sales_begin_time", "sales_end_time"), generate an array, and then sort the names of the configuration items in the array in alphabetical order of A, B, ..., Z. For further information, please refer to Fig. 9 , the configuration item set can be sorted according to the arrangement order of the configuration item names in the above array to obtain a sorted configuration item set.
[0107] 2. Use an information digest algorithm to process the sorted configuration items to obtain a version number of the first configuration data.
[0108] In some embodiments, please refer to Fig.10 , the MD5 (Message-Digest Algorithm 5) algorithm can be used to convert the sorted configuration items into a hash value, and the hash value is used as the version number of the configuration data. In some embodiments, information digest algorithms such as SHA (Security Hash Algorithm) and HMAC (Hash Message Authentication Codes) can also be used. This application only uses the MD5 algorithm as an example.
[0109] 3. Determine the identification information of the first configuration data and the version number of the first configuration data as the version information of the first configuration data, the identification information of the configuration data is used to distinguish different configuration data, and the version number of the configuration data is used to distinguish different versions of the configuration data.
[0110] In some embodiments, for a piece of version information of configuration data, it can be expressed in the form of "identification information = version number of the configuration data". For example, please refer to Fig.10 , the version information can be expressed in the form of "identification information = hash value" (
[30001] = "hash value 1",
[30002] = "hash value 2"). The above hash value can be in the form of "d41d8cd98f00b204e9800998ecf8427e", which is not limited in this application.
[0111] 4. Concatenate the version information of each configuration data in the second version of the configuration file to obtain the first sequence.
[0112] For example, please refer to Fig.11 , concatenate
[30001] =“hash value 1” and
[30002] =“hash value 2”, and obtain “
[30001] =hash value 1,
[30002] =hash value 2” as the first sequence.
[0113] 5. Use the information digest algorithm to process the first sequence and obtain the version number of the second version of the configuration file.
[0114] For example, please refer to Fig.11 , the MD5 algorithm will be used to process the first sequence "
[30001] = hash value 1,
[30002] = hash value 2", and the obtained "hash value A" will be used as the version number of the configuration file.
[0115] The above method generates version data corresponding to the configuration file (including the version number of the configuration file and the version number of the configuration data in the configuration file) based on the configuration file. In the process of generating version data, there is no need to introduce additional data, the data redundancy is low, and there is no need to manually set the version number of the above configuration file and the version number of the above configuration data, so the cost is low.
[0116] In some embodiments, step 510 includes at least one of the following sub-steps 512 - 516 .
[0117] Sub-step 512, based on the identification information of the configuration data, filter the version information of the configuration data belonging to the second version data but not to the first version data, and obtain the version information of the first newly added data, where the first newly added data refers to the configuration data newly added to the second version configuration file compared to the first version configuration file.
[0118] For example, please refer to Fig.12 , the version information of the configuration data with identification information
[30002] and
[30005] belongs to the second version data, not the first version data, so "
[30002] = hash value 2" and "
[30005] = hash value 5" can be determined as the version information of the first newly added data.
[0119] Sub-step 514, based on the identification information of the configuration data, filter the version information of the configuration data that belongs to the first version data but not to the second version data, and obtain the version information of the first deleted data, where the first deleted data refers to the configuration data deleted from the second version configuration file compared to the first version configuration file.
[0120] For example, please refer to Fig.12 , the version information of the configuration data with identification information
[30001] and
[30003] belongs to the first version data, not the second version data, so "
[30001] = hash value 1" and "
[30003] = hash value 3" can be determined as the version information of the first deleted data.
[0121] Sub-step 516, filtering the version information of the configuration data in the second version data that has the same identification information and a different version number as the first version data, to obtain the version information of the first modified data, where the first modified data refers to the configuration data modified by the second version configuration file compared to the first version configuration file.
[0122] For example, please refer to Fig.12 In the second version data, "
[30004] =Hash value 4" and "
[30004] =Hash value 6" in the first version data have the same identification information and different version numbers, so "
[30004] =Hash value 4" can be determined as the version information of the first modified data.
[0123] In some embodiments, the first version difference data includes: the first newly added data, the first deleted data, and the first modified data.
[0124] The above method compares the second version data with the first version data by using the identification information of the configuration data and the version number of the configuration data, and can efficiently and accurately determine the first version difference data.
[0125] Step 520, merging the first version difference data and the second version difference data to obtain third version difference data;
[0126] The second version difference data is used to indicate version information of historical update data, where the historical update data refers to configuration data updated during the process of updating the configuration file from the third version to the first version, and the third version refers to the lowest version of the configuration file when the first application can log in.
[0127] Being able to log into an application means being able to enter the application or use the functions of the application.
[0128] The third version refers to the minimum version of the configuration file when the first application (client) can log in. In other words, when the configuration file of the first application is lower than the third version, the first application cannot be logged in.
[0129] The third version difference data refers to the version information of the configuration data updated in the process of updating the configuration file from the third version to the second version.
[0130] In some embodiments, the historical update data includes at least one of the following: historical added data, historical modified data, and historical deleted data.
[0131] Historically added data refers to configuration data that is added but not deleted during the process of updating the configuration file from the third version to the first version.
[0132] Historical modification data refers to configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the first version.
[0133] Historically deleted data refers to configuration data that is deleted but not added during the process of updating the configuration file from the third version to the first version.
[0134] It should be noted that in the process of updating the configuration file from the third version to the first version, it may experience multiple version updates, and different data will be added, modified or deleted in each update. The historical update data can be regarded as the cumulative result of the above multiple version updates. For example, if the first application is updated from the third version V1.0 to the first version V3.0, it has experienced two updates from V1.0 to V2.0 and from V2.0 to V3.0. If in the first update, the configuration data "x=1" and "y=2" are added, and the configuration data "z=3" is deleted; in the second update, the configuration data "y=2" is deleted, and the configuration data "m=1" is changed to "m=2", then the corresponding historical update data includes: historical added data "x=1", historical deleted data "y=2", "z=3" and historical modified data "m=2".
[0135] It should also be noted that in order to ensure that there is no duplicate configuration data in the above historical update data and reduce data redundancy. The above historical newly added data can be the configuration data that has not been modified and deleted after being added during the process of updating the configuration file from the third version to the first version; the above historical modified data can be the configuration data that has not been modified again and has not been deleted after being modified during the process of updating the configuration file from the third version to the first version. Exemplarily, if in the above example, in the second update, the configuration data "x=1" is also changed to "x=2", then the final historical update data may only retain "x=2" but not "x=1".
[0136] In some embodiments, step 520 includes at least one of sub-steps 522 - 528 .
[0137] Sub-step 522, deleting the version information of the first deleted data in the first list; wherein the first list records the version information of the historically added data and the version information of the historically modified data.
[0138] In some embodiments, during the process of updating the first list and the second list, the version information of the first newly added data and the version information of the first modified data can be temporarily stored in the third list, and the version information of the first deleted data can be temporarily stored in the fourth list.
[0139] For example, please refer to Fig.13 , the first list includes version information of two configuration data, "
[30003] =Hash value 3" and "
[30004] =Hash value 6", and the fourth list includes "
[30001] =Hash value 1" and "
[30003] =Hash value 3", then "
[30003] =Hash value 3" in the first list should be deleted. At this time, the first list only includes "
[30004] =Hash value 6".
[0140] Sub-step 524, deleting the version information of the first newly added data and the version information of the first modified data in the second list; wherein the second list records the version information of the historically deleted data.
[0141] For example, please refer to Fig.13 , the second list includes the version information of the configuration data "
[30002] = Hash value 2", and the third list includes "
[30002] = Hash value 2", "
[30004] = Hash value 4" and "
[30005] = Hash value 5", then "
[30002] = Hash value 2" in the first list should be deleted. At this time, the second list is an empty list.
[0142] Sub-step 526, overwrite the version information of the first newly added data and the version information of the first modified data into the first list to obtain an updated first list.
[0143] The updated first list records the version information of the cumulative newly added data and the version information of the cumulative modified data. The cumulative newly added data refers to the configuration data that has been added but not deleted during the process of updating the configuration file from the third version to the second version. The cumulative modified data refers to the configuration data that has been modified but not deleted during the process of updating the configuration file from the third version to the second version.
[0144] It should be noted that, with reference to the above embodiments, the cumulative newly added data may also be the configuration data that has not been modified or deleted after being added during the process of updating the configuration file from the third version to the second version; the cumulative modified data may also be the configuration data that has not been modified again or deleted after being modified during the process of updating the configuration file from the third version to the second version.
[0145] In addition, it should be explained that overwriting the version information of the first newly added data and the version information of the first modified data into the first list means that while adding the version information of the first newly added data and the version information of the first modified data to the first list, the version information of the configuration data in the first list that is the same as the first newly added data and the first modified data (configuration data with the same identification information as the first newly added data and the first modified data) is overwritten (that is, for the same configuration data, the version information of the old version is overwritten with the version information of the new version).
[0146] For example, please refer to Fig.13, overwrite "
[30002] =Hash value 2", "
[30004] =Hash value 4", and "
[30005] =Hash value 5" in the third list to the first list that only includes "
[30004] =Hash value 6", that is, add "
[30002] =Hash value 2" and "
[30005] =Hash value 5" to the first list, and overwrite "
[30004] =Hash value 4" with "
[30004] =Hash value 6", to obtain the updated first list including "
[30002] =Hash value 2", "
[30004] =Hash value 4", and "
[30005] =Hash value 5".
[0147] Sub-step 528, adding the version information of the first deleted data to the second list to obtain an updated second list;
[0148] The updated second list records version information of the accumulated deleted data, where the accumulated deleted data refers to version information of configuration data that is not newly added after being deleted during the process of updating the configuration file from the third version to the second version.
[0149] For example, please refer to Fig.13 , add "
[30001] =hash value 1" and "
[30003] =hash value 3" in the fourth list to the first list which is an empty list, and obtain an updated first list including "
[30001] =hash value 1" and "
[30003] =hash value 3".
[0150] In some embodiments, the first version is equal to the third version, there is no second version difference data, and the first list and the second list are empty lists (for example, after a mandatory update, or when the first device is started for the first time). In this case, please refer to Fig.14 , the version information of the first newly added data and the version information of the first modified data obtained by comparison can be directly added to the first list to obtain an updated first list, and the version information of the first deleted data can be added to the second list to obtain an updated second list.
[0151] By updating the first list and the second list through the above method, the updated first list and the updated second list can only record the version information of the configuration data required to update the configuration file to the second version, so that the difference data is kept concise and can be used to update the configuration file from any version from the third version to the first version to the second version.
[0152] In some embodiments, the third version difference data includes version information of the cumulative newly added data and the cumulative modified data recorded in the updated first list, and version information of the cumulative deleted data recorded in the updated second list.
[0153] In some embodiments, the first version is the version of the configuration file of the first application stored by the first device after the difference data is most recently determined. Therefore, after obtaining the third version difference data mentioned above, or after determining the difference data, the difference data is determined again after the next update of the configuration file for convenience. The first version data can be replaced by the second version data. That is to say, the version information of each configuration data included in the second version configuration file is used to replace the version information of each configuration data included in the first version configuration file, and the version number of the second version configuration file is used to replace the version number of the first version configuration file.
[0154] Step 530: Determine the difference data according to the third version difference data and the second version configuration file.
[0155] The difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version.
[0156] In some embodiments, please refer to Fig.15 , after updating the first list and the second list, it is necessary to first obtain the cumulative new data and the cumulative modified data, and then send the difference data.
[0157] In some embodiments, the accumulated newly added data and the accumulated modified data are obtained from the configuration file of the second version according to the updated first list.
[0158] For example, please refer to Fig.16 , the updated first list includes "
[30002] =Hash value 2", "
[30004] =Hash value 4" and "
[30005] =Hash value 5", so the cumulative newly added data and cumulative modified data such as "
[30002] =Configuration item set 2", "
[30004] =Configuration item set 4" and "
[30005] =Configuration item set 5" can be selected from the second version of the configuration file.
[0159] By searching the second version of the configuration file according to the updated first list through the above method, the cumulative newly added data and the cumulative modified data can be quickly determined, and since the above two types of data are to be sent together, it is not necessary to distinguish them at this time.
[0160] In some embodiments, the difference data includes at least one of the following: version information of cumulative newly added data, cumulative modified data, and cumulative deleted data.
[0161] By setting the difference data according to the above method and replacing the cumulative deleted data with the version information of the cumulative deleted data, the data volume sent to the first device can be reduced, thereby saving user traffic, and the difference data can be used to update the configuration file of any version from the third version to the first version to the second version.
[0162] In some embodiments, please refer to Fig.17 In the process of updating the version of the configuration file and determining the difference data, it is necessary to determine whether the forced update of the configuration file of the first application is enabled, and if the forced update is enabled, clear the first list and the second list.
[0163] Forced update refers to forcibly updating the configuration file of the first application stored in the user device to a certain version, and prohibiting the first application with a configuration file lower than the version from logging in. Forced update is generally implemented by non-hot update, that is, the user needs to re-login to the first application, or the user needs to independently download or install the corresponding patch package. This application does not limit the specific implementation method of forced update.
[0164] In some embodiments, since the third version refers to the minimum version of the configuration file when the first application can log in, when the version number of the third version of the configuration file changes, it can be regarded as enabling forced update of the configuration file of the first application.
[0165] In some embodiments, when the version number of the third version of the configuration file changes, the first list and the second list are cleared.
[0166] It can be seen from the above embodiments that the first list and the second list will be updated accordingly each time the configuration file is updated and the difference data is determined. In other words, the version information in the first list and the second list is cumulatively merged. Therefore, if the first list and the second list are not cleaned up regularly, it is easy to cause data redundancy and device abnormalities. If the first list and the second list are cleaned up, the device storing the old version of the configuration file will not be able to pull the corresponding difference data. Therefore, it is necessary to ensure that the version of the configuration file stored in all other devices is consistent with the version of the configuration file stored in the first device (or, the configuration files stored in all other devices are updated to the latest version), and then clear the first list and the second list. Therefore, the above method realizes the cleaning of the first list and the second list at an appropriate time, and will not affect the hot update process of the configuration data.
[0167] Step 540: Send the difference data to the second device.
[0168] The second device is different from the first device. The second device may be a computer device, for example, the second device may be the terminal device 10 in the above embodiment.
[0169] In some embodiments, an update request sent by a second device is received, where the update request includes a version number of a configuration file of the first application stored in the second device.
[0170] In some embodiments, when the version number of the configuration file of the first application stored in the second device is different from the version number of the configuration file of the second version (latest version), difference data is sent to the second device.
[0171] In some embodiments, the difference data and a version number of the second version of the configuration file are sent to the second device.
[0172] The above method can enable the first device to determine whether the configuration file of the first application stored in the second device needs to be updated by sending and receiving the version number of the configuration file, thereby avoiding sending invalid data.
[0173] For example, please refer to Fig.18 , which shows a schematic diagram of a configuration data update scheme provided by an embodiment of the present application. In this scheme, after the configuration file stored in the first device is updated from the first version V1.0 to the second version V2.0 through a patch, difference data such as the version information of the cumulative newly added data, the cumulative modified data, and the cumulative deleted data will be determined. After the second device uses the version number V1.0 of the first version of the configuration file stored in itself to pull the difference data from the first device, the first device will send the difference data and the version number V2.0 of the second version of the configuration file to the second device.
[0174] The technical solution provided by the embodiment of the present application determines the first version difference data by comparing the second version data with the first version data when it is detected that the configuration file stored in the first device is updated. The first version difference data is used to indicate the version information of the configuration data that is different from the configuration file of the second version compared to the configuration file of the first version. Then, the first version difference data and the second version difference data used to indicate the version information of the configuration data updated in the process of updating the configuration file from the third version to the first version are merged to obtain the third version difference data. Then, based on the third version difference data and the second version configuration file, the difference data used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version is determined. Finally, the above difference data is sent to the second device. In the process of updating the configuration data, the automatic determination of the difference data is realized, and the manual maintenance of the incremental table is no longer required, which simplifies the update process of the configuration data.
[0175] Furthermore, since the third version difference data is obtained by merging the second version difference data and the first version difference data, the above difference data can not only be used to update the configuration file from the first version to the second version, but also can be used to update the configuration file from any version from the third version to the first version to the second version, and it is highly versatile.
[0176] Please refer to Fig.19 , which shows a flow chart of a configuration data updating method provided by another embodiment of the present application. The execution subject of each step of the method is a second device, and the second device may be a computer device, for example, the second device may be the terminal device 10 in the above embodiment. The method may include at least one of the following steps 1910 to 1920.
[0177] Step 1910: receiving difference data determined based on the third version difference data and the configuration file of the second version of the first application.
[0178] Among them, the configuration file includes at least one configuration data, and the difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version. The third version refers to the lowest version of the configuration file when the first application can log in. The third version difference data is obtained by merging the first version difference data and the second version difference data. The first version difference data is used to indicate the version information of the configuration data in which the second version of the configuration file is different from the first version of the configuration file. The first version difference data is determined by comparing the second version data and the first version data when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version. The second version data is the version data corresponding to the second version of the configuration file, and the first version data is the version data corresponding to the first version of the configuration file. The version data includes version information of each configuration data included in the configuration file. The second version difference data is used to indicate the version information of the historical update data. The historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version.
[0179] Step 1920: Update the configuration file of the first application stored in the second device to the configuration file of the second version based on the difference data.
[0180] In some embodiments, the difference data includes at least one of the following: version information of cumulative newly added data, cumulative modified data, and cumulative deleted data.
[0181] The cumulative newly added data refers to the configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version.
[0182] The accumulated modified data refers to the configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version.
[0183] Version information of the cumulatively deleted data. The cumulatively deleted data refers to the configuration data that has not been added after being deleted during the process of updating the configuration file from the third version to the second version.
[0184] By setting the difference data according to the above method and replacing the cumulative deletion data with the version information of the cumulative deletion data, the data volume of the difference data received by the second device can be reduced, thereby saving user traffic, and the difference data can be used to update the configuration file of any version from the third version to the first version to the second version.
[0185] In some embodiments, step 1920 includes at least one of the following sub-steps 1922 to 1924.
[0186] Sub-step 1922, deleting corresponding configuration data in the configuration file of the first application stored in the second device according to the version information of the accumulated deleted data.
[0187] For example, please refer to Fig. 20 The configuration file of the first application stored in the second device includes five configuration data, namely, "
[30000] =Configuration Item Set 0", "
[30001] =Configuration Item Set 1", "
[30003] =Configuration Item Set 3" and "
[30004] =Configuration Item Set 6". According to the version information of the cumulatively deleted data "
[30001] =Hash value 1" and "
[30003] =Hash value 3", "
[30001] =Configuration Item Set 1" and "
[30003] =Configuration Item Set 3" among the above five configuration data can be deleted to obtain a configuration file including only "
[30000] =Configuration Item Set 0" and "
[30004] =Configuration Item Set 6".
[0188] Sub-step 1924, overwriting the accumulated newly added data and the accumulated modified data into the configuration file of the first application stored in the first device to obtain a second version of the configuration file.
[0189] It should be noted that overwriting the cumulative new data and the cumulative modified data into the configuration file of the first application stored in the first device means that while adding the cumulative new data and the cumulative modified data to the above-mentioned configuration file, the configuration data in the above-mentioned configuration file that is identical to the cumulative new data and the cumulative modified data (configuration data having the same identification information as the cumulative new data and the cumulative modified data) is overwritten, that is, for the same configuration data, the new version is used to overwrite the old version.
[0190] For example, please refer to Fig. 20, overwrite the cumulative newly added data and the cumulative modified data such as "
[30002] =Configuration Item Set 2", "
[30004] =Configuration Item Set 4", and "
[30005] =Configuration Item Set 5" into the configuration files including "
[30000] =Configuration Item Set 0" and "
[30004] =Configuration Item Set 6", and obtain the second version of the configuration file including the configuration data such as "
[30000] =Configuration Item Set 0", "
[30002] =Configuration Item Set 2", "
[30004] =Configuration Item Set 4", and "
[30005] =Configuration Item Set 5".
[0191] By using the above method, the difference data and the local data are merged, that is, the configuration file of the first application stored in the first device is updated to the second version, so that the first device and the second device can store the same version of the configuration file.
[0192] In some embodiments, before step 1910, an update request is sent to the first device, and the update request includes a version number of a configuration file of the first application stored in the second device.
[0193] In some embodiments, when logging into the first application, an update request is sent to the first device; in some embodiments, when entering certain interfaces of the first application (such as entering a mall interface of a game application), an update request is sent to the first device. This application does not limit the specific triggering method of the update request.
[0194] The above method can enable the first device to determine whether the configuration file of the first application stored in the second device needs to be updated by sending the version number of the configuration file, thereby avoiding sending invalid data.
[0195] In some embodiments, step 1910 includes receiving difference data and a version number of the second version of the configuration file.
[0196] In some embodiments, the version number of the configuration file of the first application stored in the first device is updated to the version number of the configuration file of the second version.
[0197] By using the above method, the version number is updated so that the second device can always use the correct version number to request a configuration update from the first device.
[0198] The above method realizes the automatic determination of difference data during the configuration data update process, eliminates the need for manual maintenance of incremental tables, and simplifies the configuration data update process.
[0199] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0200] Please refer to Fig.21 , which shows a block diagram of a configuration data updating device provided by an embodiment of the present application. The device has the function of implementing the above configuration data updating method, and the function can be implemented by hardware, or by hardware executing corresponding software. The device can be a first device, or it can be set in the first device. The device 2100 may include: a comparison module 2110, a merging module 2120, a determination module 2130 and a sending module 2140.
[0201] The comparison module 2110, when detecting that the configuration file of the first application stored in the first device is updated from the first version to the second version, compares the second version data with the first version data to determine the first version difference data; wherein the configuration file includes at least one configuration data, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes the version information of each configuration data included in the configuration file, and the first version difference data is used to indicate the version information of the configuration data that is different from the configuration file of the first version.
[0202] The merging module 2120 is used to merge the first version difference data and the second version difference data to obtain the third version difference data; wherein the second version difference data is used to indicate the version information of the historical update data, and the historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version, and the third version refers to the minimum version of the configuration file when the first application can log in.
[0203] The determination module 2130 is used to determine difference data according to the third version difference data and the second version configuration file, wherein the difference data is used to indicate configuration data updated when the configuration file is updated from the third version to the second version.
[0204] The sending module 2140 is configured to send the difference data to the second device.
[0205] In some embodiments, the difference data includes at least one of the following: cumulative newly added data, the cumulative newly added data refers to configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version; cumulative modified data, the cumulative modified data refers to configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version; version information of cumulative deleted data, the cumulative deleted data refers to configuration data that is deleted but not added during the process of updating the configuration file from the third version to the second version.
[0206] In some embodiments, the version information of the configuration data includes: identification information of the configuration data and a version number of the configuration data, wherein the identification information of the configuration data is used to distinguish different configuration data, and the version number of the configuration data is used to distinguish different versions of the configuration data.
[0207] The comparison module 2110 is used to filter the version information of the configuration data belonging to the second version data but not belonging to the first version data according to the identification information of the configuration data, and obtain the version information of the first newly added data, where the first newly added data refers to the configuration data newly added to the configuration file of the second version compared with the configuration file of the first version; filter the version information of the configuration data belonging to the first version data but not belonging to the second version data according to the identification information of the configuration data, and obtain the version information of the first deleted data, where the first deleted data refers to the configuration data deleted from the configuration file of the second version compared with the configuration file of the first version; filter the version information of the configuration data in the second version data that has the same identification information and a different version number as the first version data, and obtain the version information of the first modified data, where the first modified data refers to the configuration data modified in the configuration file of the second version compared with the configuration file of the first version; wherein the first version difference data includes: the first newly added data, the first deleted data and the first modified data.
[0208] In some embodiments, the historical update data includes at least one of the following: historical newly added data, which refers to configuration data that was added but not deleted during the process of updating the configuration file from the third version to the first version; historical modified data, which refers to configuration data that was modified but not deleted during the process of updating the configuration file from the third version to the first version; historical deleted data, which refers to configuration data that was deleted but not added during the process of updating the configuration file from the third version to the first version.
[0209] The merging module 2120 is used to delete the version information of the first deleted data in the first list; wherein the first list records the version information of the historically added data and the version information of the historically modified data; delete the version information of the first added data and the version information of the first modified data in the second list; wherein the second list records the version information of the historically deleted data; overwrite the version information of the first added data and the version information of the first modified data into the first list to obtain an updated first list; wherein the updated first list records the version information of the cumulatively added data and the version information of the cumulatively modified data, wherein the cumulatively added data refers to the configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version, and the cumulatively modified data refers to the configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version. Add the version information of the first deleted data to the second list to obtain an updated second list; wherein the updated second list records the version information of the cumulatively deleted data, wherein the cumulatively deleted data refers to the version information of the configuration data that is deleted but not added during the process of updating the configuration file from the third version to the second version.
[0210] In some embodiments, the determination module 2130 is used to obtain the cumulative new data and the cumulative modified data from the configuration file of the second version according to the updated first list; wherein the difference data includes: version information of the cumulative deleted data, the cumulative new data and the cumulative modified data.
[0211] In some embodiments, the merging module 2120 is further configured to clear the first list and the second list when the version number of the configuration file of the third version changes, and the version number of the configuration file is used to distinguish different versions of the configuration file.
[0212] In some embodiments, the comparison module 2110 is configured to compare the second version data with the first version data to determine the first version difference data when the version number of the second version configuration file is different from the version number of the first version configuration file.
[0213] In some embodiments, the merging module 2120 is further configured to replace the first version data with the second version data.
[0214] In some embodiments, the apparatus 2100 further includes: a receiving module ( Fig.21 not shown).
[0215] The receiving module is used to receive an update request sent by the second device, where the update request includes a version number of a configuration file of the first application stored in the second device.
[0216] The sending module 2140 is configured to send the difference data and the version number of the second version of the configuration file to the second device.
[0217] In some embodiments, the apparatus 2100 further includes: a processing module ( Fig.21 not shown).
[0218] a processing module, configured to sort each configuration item in the first configuration data in the second version of the configuration file in a set order; use an information digest algorithm to process the sorted configuration items to obtain a version number of the first configuration data; determine the identification information of the first configuration data and the version number of the first configuration data as the version information of the first configuration data, the identification information of the configuration data is used to distinguish different configuration data, and the version number of the configuration data is used to distinguish different versions of the configuration data; splice the version information of each configuration data in the second version of the configuration file to obtain a first sequence; use the information digest algorithm to process the first sequence to obtain the version number of the second version of the configuration file.
[0219] Please refer to Fig. 22 , which shows a block diagram of a configuration data updating device provided by another embodiment of the present application. The device has the function of implementing the above configuration data updating method, and the function can be implemented by hardware, or by hardware executing corresponding software. The device can be a second device, or can be set in a second device. The device 2200 may include: a receiving module 2210 and an updating module 2220.
[0220] The receiving module 2210 is used to receive difference data determined according to the third version difference data and the second version configuration file of the first application; wherein the configuration file includes at least one configuration data, the difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version, the third version refers to the lowest version of the configuration file when the first application can log in, the third version difference data is obtained by merging the first version difference data and the second version difference data, the first version difference data is used to indicate the version information of the configuration data in which the configuration file of the second version is different from the configuration file of the first version, the first version difference data is determined by comparing the second version data with the first version data when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes the version information of each of the configuration data included in the configuration file, and the second version difference data is used to indicate the version information of the historical update data, and the historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version.
[0221] The updating module 2220 is used to update the configuration file of the first application stored in the second device to the configuration file of the second version according to the difference data.
[0222] In some embodiments, the difference data includes at least one of the following: cumulative newly added data, the cumulative newly added data refers to configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version; cumulative modified data, the cumulative modified data refers to configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version; version information of cumulative deleted data, the cumulative deleted data refers to configuration data that is deleted but not added during the process of updating the configuration file from the third version to the second version.
[0223] In some embodiments, the update module 2220 is used to delete the corresponding configuration data in the configuration file of the first application stored in the second device according to the version information of the accumulated deleted data; and overwrite the accumulated new data and the accumulated modified data into the configuration file of the first application stored in the first device to obtain the second version of the configuration file.
[0224] In some embodiments, the apparatus 2200 further includes: a sending module ( Fig. 22 not shown).
[0225] A sending module is used to send an update request to the first device, where the update request includes a version number of a configuration file of the first application stored in the second device.
[0226] In some embodiments, the receiving module 2210 is further configured to receive the difference data and a version number of the second version of the configuration file.
[0227] In some embodiments, the update module 2220 is further used to update the version number of the configuration file of the first application stored in the first device to the version number of the configuration file of the second version.
[0228] It should be noted that the device provided in the above embodiment, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0229] Please refer to Fig.23 , which exemplarily shows a structural block diagram of a computer device provided by an embodiment of the present application.
[0230] Typically, the computer device 2300 includes: a processor 2301 and a memory 2302 .
[0231] The processor 2301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 2301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 2301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2301 may also include an AI processor, which is used to process computing operations related to machine learning.
[0232] The memory 2302 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 2302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2302 stores a computer program, which is loaded and executed by the processor 2301 to implement the above-mentioned method for updating the configuration data on the first device side, or to implement the above-mentioned method for updating the configuration data on the second device side.
[0233] Those skilled in the art will understand that Fig.23 The structure shown in the figure does not constitute a limitation on the computer device 2300, and the computer device 2300 may include more or fewer components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0234] In some embodiments, a computer-readable storage medium is also provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned method for updating configuration data on the first device side, or to implement the above-mentioned method for updating configuration data on the second device side.
[0235] Optionally, the computer readable storage medium may include: ROM (Read-Only Memory), RAM (Random-Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).
[0236] In some embodiments, a computer program product is also provided, which includes a computer program, the computer program is stored in a computer-readable storage medium, and the processor reads and executes the computer program from the computer-readable storage medium to implement the above-mentioned method for updating configuration data on the first device side, or implements the above-mentioned method for updating configuration data on the second device side.
[0237] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0238] The above are merely exemplary embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for updating configuration data, characterized in that: The method comprises: In the case of detecting that a configuration file of a first application stored in a first device is updated from a first version to a second version, comparing the second version data with the first version data to determine first version difference data; wherein the configuration file includes at least one configuration data, the second version data is version data corresponding to the configuration file of the second version, the first version data is version data corresponding to the configuration file of the first version, the version data includes version information of each configuration data included in the configuration file, and the first version difference data is used to indicate version information of configuration data that is different from the configuration file of the first version; Merging the first version difference data and the second version difference data to obtain third version difference data; wherein the second version difference data is used to indicate version information of historical update data, the historical update data refers to configuration data updated in the process of updating the configuration file from the third version to the first version, and the third version refers to the minimum version of the configuration file when the first application can log in; Determine difference data according to the third version difference data and the second version configuration file, wherein the difference data is used to indicate configuration data updated during the process of updating the configuration file from the third version to the second version; The difference data is sent to the second device.
2. The method according to claim 1, characterized in that The difference data includes at least one of the following: The accumulated newly added data refers to configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version; The accumulated modified data refers to configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version; The version information of the accumulated deleted data refers to the configuration data that is deleted but not newly added during the process of updating the configuration file from the third version to the second version.
3. The method according to claim 1, characterized in that The version information of the configuration data includes: identification information of the configuration data and a version number of the configuration data, wherein the identification information of the configuration data is used to distinguish different configuration data, and the version number of the configuration data is used to distinguish different versions of the configuration data; The comparing the second version data with the first version data to determine the first version difference data includes: According to the identification information of the configuration data, version information of the configuration data belonging to the second version data but not belonging to the first version data is filtered to obtain version information of the first newly added data, where the first newly added data refers to configuration data newly added to the configuration file of the second version compared with the configuration file of the first version; According to the identification information of the configuration data, version information of the configuration data belonging to the first version data but not belonging to the second version data is filtered to obtain version information of first deleted data, where the first deleted data refers to configuration data deleted from the configuration file of the second version compared with the configuration file of the first version; Filtering the second version data for version information of configuration data having the same identification information and a different version number as the first version data, to obtain version information of first modified data, where the first modified data refers to configuration data modified by the second version configuration file compared to the first version configuration file; The first version difference data includes: the first newly added data, the first deleted data and the first modified data.
4. The method according to claim 3, characterized in that: The historical update data includes at least one of the following: Historically newly added data, wherein the historically newly added data refers to configuration data that is newly added but not deleted during the process of updating the configuration file from the third version to the first version; Historical modification data, wherein the historical modification data refers to configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the first version; Historically deleted data, wherein the historically deleted data refers to configuration data that is deleted and not newly added during the process of updating the configuration file from the third version to the first version; The step of merging the first version difference data and the second version difference data to obtain the third version difference data comprises: Delete the version information of the first deleted data in the first list; wherein the first list records the version information of the historically added data and the version information of the historically modified data; Delete the version information of the first newly added data and the version information of the first modified data in the second list; wherein the second list records the version information of the historically deleted data; Overwriting the version information of the first newly added data and the version information of the first modified data into the first list to obtain an updated first list; wherein the updated first list records the version information of the cumulative newly added data and the version information of the cumulative modified data, the cumulative newly added data refers to the configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version, and the cumulative modified data refers to the configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version; The version information of the first deleted data is added to the second list to obtain an updated second list; wherein the updated second list records the version information of the cumulative deleted data, and the cumulative deleted data refers to the version information of the configuration data that is not newly added after the deletion during the process of updating the configuration file from the third version to the second version.
5. The method according to claim 4, characterized in that The determining of difference data according to the third version difference data and the second version configuration file includes: According to the updated first list, acquiring the accumulated newly added data and the accumulated modified data from the configuration file of the second version; The difference data includes: version information of the accumulated deleted data, the accumulated newly added data and the accumulated modified data.
6. The method according to claim 4, characterized in that The method further comprises: When the version number of the third version of the configuration file changes, the first list and the second list are cleared, and the version number of the configuration file is used to distinguish different versions of the configuration file.
7. The method according to claim 1, characterized in that The method of comparing the second version data with the first version data to determine the first version difference data when detecting that the configuration file of an application stored in the first device is updated from the first version to the second version includes: When the version number of the second version of the configuration file is different from the version number of the first version of the configuration file, the second version data is compared with the first version data to determine the first version difference data.
8. The method according to claim 1, characterized in that After the first version difference data and the second version difference data are merged to obtain the third version difference data, the method further includes: The first version data is replaced with the second version data.
9. The method according to claim 1, characterized in that: The method further comprises: receiving an update request sent by the second device, wherein the update request includes a version number of a configuration file of the first application stored in the second device; The sending the difference data to the second device includes: The difference data and the version number of the second version of the configuration file are sent to the second device.
10. The method according to claim 1, characterized in that The method further comprises: For the first configuration data in the configuration file of the second version, sorting each configuration item in the first configuration data according to a set order; Using an information digest algorithm, processing the sorted configuration items to obtain a version number of the first configuration data; Determine the identification information of the first configuration data and the version number of the first configuration data as the version information of the first configuration data, wherein the identification information of the configuration data is used to distinguish different configuration data, and the version number of the configuration data is used to distinguish different versions of the configuration data; Concatenate the version information of each piece of the configuration data in the configuration file of the second version to obtain a first sequence; The first sequence is processed using the information digest algorithm to obtain a version number of the second version of the configuration file.
11. A method for updating configuration data, characterized in that: The method comprises: Receive difference data determined according to the third version difference data and a configuration file of the second version of the first application; wherein the configuration file includes at least one configuration data, the difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version, the third version refers to the lowest version of the configuration file when the first application can log in, the third version difference data is obtained by merging the first version difference data and the second version difference data, the first version difference data is used to indicate version information of the configuration data in which the configuration file of the second version is different from the configuration file of the first version, the first version difference data is determined by comparing the second version data with the first version data when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes the version information of each of the configuration data included in the configuration file, the second version difference data is used to indicate the version information of the historical update data, the historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version; According to the difference data, the configuration file of the first application stored in the second device is updated to the configuration file of the second version.
12. The method according to claim 11, characterized in that The difference data includes at least one of the following: The accumulated newly added data refers to configuration data that is added but not deleted during the process of updating the configuration file from the third version to the second version; The accumulated modified data refers to configuration data that is modified but not deleted during the process of updating the configuration file from the third version to the second version; The version information of the accumulated deleted data refers to the configuration data that is deleted but not newly added during the process of updating the configuration file from the third version to the second version.
13. The method according to claim 12, characterized in that The updating, according to the difference data, of the configuration file of the first application stored in the second device to the configuration file of the second version includes: Deleting corresponding configuration data in the configuration file of the first application stored in the second device according to the version information of the accumulated deleted data; The accumulated newly added data and the accumulated modified data are overwritten into the configuration file of the first application stored in the first device to obtain the configuration file of the second version.
14. The method according to claim 11, characterized in that Before receiving the difference data determined according to the third version difference data and the configuration file of the second version of the first application, the method further includes: An update request is sent to the first device, where the update request includes a version number of a configuration file of the first application stored in the second device.
15. The method according to claim 11, characterized in that The receiving of difference data determined according to the third version difference data and the configuration file of the second version of the first application program includes: Receiving the difference data and a version number of the second version of the configuration file; The method further comprises: The version number of the configuration file of the first application stored in the first device is updated to the version number of the configuration file of the second version.
16. A configuration data updating device, characterized in that: The device comprises: A comparison module, when detecting that a configuration file of a first application stored in a first device is updated from a first version to a second version, compares the second version data with the first version data to determine first version difference data; wherein the configuration file includes at least one configuration data, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes version information of each configuration data included in the configuration file, and the first version difference data is used to indicate version information of configuration data that is different from the configuration file of the first version; a merging module, configured to merge the first version difference data and the second version difference data to obtain third version difference data; wherein the second version difference data is used to indicate version information of historical update data, the historical update data refers to configuration data updated in the process of updating the configuration file from the third version to the first version, and the third version refers to the minimum version of the configuration file when the first application can log in; a determination module, configured to determine difference data according to the third version difference data and the second version configuration file, wherein the difference data is used to indicate configuration data updated during the process of updating the configuration file from the third version to the second version; A sending module is used to send the difference data to the second device.
17. A device for updating configuration data, characterized in that: The device comprises: a receiving module, receiving difference data determined according to the third version difference data and a configuration file of the second version of the first application; wherein the configuration file includes at least one configuration data, the difference data is used to indicate the configuration data updated in the process of updating the configuration file from the third version to the second version, the third version refers to the lowest version of the configuration file when the first application can log in, the third version difference data is obtained by merging the first version difference data and the second version difference data, the first version difference data is used to indicate the version information of the configuration data in which the configuration file of the second version is different from the configuration file of the first version, the first version difference data is determined by comparing the second version data with the first version data when it is detected that the configuration file of the first application stored in the first device is updated from the first version to the second version, the second version data is the version data corresponding to the configuration file of the second version, the first version data is the version data corresponding to the configuration file of the first version, the version data includes the version information of each of the configuration data included in the configuration file, the second version difference data is used to indicate the version information of the historical update data, the historical update data refers to the configuration data updated in the process of updating the configuration file from the third version to the first version; An updating module is used to update the configuration file of the first application stored in the second device to the configuration file of the second version according to the difference data.
18. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method as claimed in any one of claims 1 to 10 above, or to implement the method as claimed in any one of claims 11 to 15.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 10, or to implement the method according to any one of claims 11 to 15.
20. A computer program product, characterized in that The computer program product comprises a computer program, which is stored in a computer-readable storage medium. A processor reads and executes the computer program from the computer-readable storage medium to implement the method according to any one of claims 1 to 10, or implements the method according to any one of claims 11 to 15.