Software updating method and device, equipment and medium

By predicting the type of data conflict in the software update process and determining the corresponding solution, and combining data packets to perform software updates, the problem of service interruption and data loss in the existing technology is solved, and an efficient and successful software update process is achieved.

CN119645464APending Publication Date: 2025-03-18SHENZHEN ENVICOOL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411824674.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the prior art, software update methods are prone to problems such as service interruption and data loss, which affects the normal use of users and the efficiency and success rate of software updates.

Method used

By obtaining the data packets of the current version and target version of the software to be updated, predict the data conflict type during the software update process, and determine the corresponding solution based on the predicted data conflict type, and perform software updates in combination with the solution and data packets to reduce the risk of update failure.

Benefits of technology

It effectively improves the efficiency and success rate of software updates, reduces the risk of update failure caused by data conflicts, and automatically adapts to different system states and data changes during the software update process, maintaining the continuity of system states and data consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645464A_ABST
    Figure CN119645464A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of software updating, in particular to a software updating method and device, equipment and a medium, and the method comprises the steps: obtaining a first data packet of a current software version and a second data packet of a target software version of to-be-updated software; predicting a data conflict type in a software updating process; determining a solution corresponding to the data conflict type; and updating the software to be updated according to the solution, the first data packet and the second data packet. According to the method and the device, the running state of the to-be-updated software at the current moment is obtained, and whether the current moment is the updating opportunity or not is determined according to the running state, so that software updating (upgrading or degrading) can be performed on the premise of not influencing service execution, the success rate of software updating can be improved, and the risk in the updating process can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of software updating, and in particular to a software updating method, apparatus, device and medium. Background Art

[0002] As users' expectations for product functionality continue to increase, software developers face huge challenges and must constantly update their products to meet users' diverse needs.

[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: In the prior art, the software update method is prone to service interruption and data loss. During the software update process, once a service interruption occurs, it will not only affect the normal use of the user, but also may cause the loss or damage of user data, reduce the efficiency and success rate of software updates, and require software developers to spend more time and energy to fix the problem. Summary of the invention

[0004] The purpose of this application is to provide a software update method, device, equipment and medium, which can improve the efficiency and success rate of software updates.

[0005] In a first aspect, a software update method is provided, the method comprising:

[0006] Obtain a first data packet of the current software version of the software to be updated and a second data packet of the target software version;

[0007] Predicting data conflict types during software update; and determining solutions corresponding to the data conflict types;

[0008] The software to be updated is updated according to the solution, the first data packet and the second data packet.

[0009] In a preferred example, the present application may be further configured as follows: before updating the software to be updated according to the solution, the first data packet and the second data packet, the method further includes:

[0010] Obtain the current running status of the software to be updated and the running status of the device;

[0011] Determine whether the current time is an update opportunity according to the running status of the software to be updated and the running status of the device;

[0012] If yes, the step of updating the software to be updated is performed according to the solution, the first data packet and the second data packet.

[0013] In a preferred example, the present application may be further configured as follows: updating the software to be updated according to the solution, the first data packet and the second data packet includes:

[0014] According to the solution, a preset data packet corresponding to the solution is modified to obtain a modified preset data packet; wherein the preset data packet is the first data packet and / or the second data packet that needs to be adjusted corresponding to the data conflict type; according to the modified preset data packet, the software to be updated is updated;

[0015] or,

[0016] The software to be updated is updated according to a preset data packet; during the software update process, if a data conflict of the data conflict type occurs, the data conflict is resolved using a solution corresponding to the data conflict type.

[0017] In a preferred example, the present application can be further configured as follows:

[0018] Get the equipment operating status information at the current moment;

[0019] In the process of updating the software to be updated, the electronic device is controlled to operate under the device operating status information at the current moment, and the electronic device is a device on which the software to be updated is deployed.

[0020] In a preferred example, the present application may be further configured to: predict the data conflict type during the software update process, including at least one of the following:

[0021] Inputting difference data between the first data packet and the second data packet into a data conflict classifier to determine the data conflict type, wherein the data conflict classifier is trained by historical update data;

[0022] Determine the data conflict type according to the first data packet and the second data packet using a rule engine, wherein the rule engine defines rules and conditions for data conflicts;

[0023] Statistical analysis is performed based on historical update logs to determine the data conflict type.

[0024] In a preferred example, the present application may be further configured as follows: updating the software to be updated according to the solution, the first data packet and the second data packet includes:

[0025] Determine an update strategy according to difference data between the first data packet and the second data packet, wherein the update strategy includes a data processing prompt during the software update process, wherein the data processing prompt indicates that a user needs to make a processing decision for preset data;

[0026] The software to be updated is updated according to the solution, the first data packet and the second data packet and in accordance with an update strategy.

[0027] In a preferred example, the present application may be further configured as follows: after updating the software to be updated according to the solution, the first data packet and the second data packet, the following further comprises:

[0028] Determining an update result of the software to be updated;

[0029] If the update result is unsuccessful, a prompt message is generated to prompt the user.

[0030] In a second aspect, a software updating device is provided, comprising:

[0031] An acquisition module, used to acquire a first data packet of a current software version of the software to be updated and a second data packet of a target software version;

[0032] A determination module, used to predict the data conflict type during the software update process; and determine the solution corresponding to the data conflict type;

[0033] An updating module is used to update the software to be updated according to the solution, the first data packet and the second data packet.

[0034] In a third aspect, an electronic device is provided, including:

[0035] one or more processors;

[0036] Memory;

[0037] One or more applications, wherein one or more applications are stored in a memory and configured to be executed by one or more processors, and the one or more programs are configured to: perform operations corresponding to the software update method shown in any possible implementation of the first aspect.

[0038] In a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded by a processor and executes the steps of the software update method shown in any possible implementation method of the first aspect.

[0039] In a fifth aspect, a computer program product is provided, including a computer program, which, when executed by a processor, implements operations corresponding to the software update method shown in any possible implementation manner in the first aspect.

[0040] In summary, the software update method provided by this application includes the following beneficial technical effects:

[0041] In the present application, a first data packet of the current version of the software to be updated and a second data packet of the target version are obtained; possible data conflict types of the software are predicted, potential update obstacles are identified in advance, and corresponding solutions are determined based on the predicted data conflict types; and the software is updated in combination with the solution and the two data packets, which greatly reduces the risk of update failure due to data conflicts and effectively improves the efficiency and success rate of software updates.

[0042] In addition, the present application also provides a software update device, equipment and medium, all of which have the above-mentioned beneficial technical effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0044] Figure 1 This is a flowchart of a software update method provided by an embodiment of the present application;

[0045] Figure 2 It is a flowchart of another software updating method provided by an embodiment of the present application;

[0046] Figure 3 It is a structural diagram of a software updating device provided in an embodiment of the present application;

[0047] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] This specific embodiment is merely an explanation of the present application and is not a limitation of the present application. After reading this specification, a person skilled in the art may make non-creative modifications to the present embodiment as needed, but such modifications are protected by the patent law as long as they are within the scope of the present application.

[0049] It should be noted that in the optional embodiments of the present application, the object information and other related data involved, when the embodiments in the present application are applied to specific products or technologies, need to obtain the permission or consent of the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be obtained with the authorization and consent of the object, the authorization and consent of the relevant departments, and in compliance with the relevant laws, regulations and standards of the country and region. If personal information is involved in the embodiments, the acquisition of all personal information needs to obtain the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0052] Existing software update methods may cause service interruption or data loss during the software update process. Although some methods try to solve this problem by creating backup data, they usually lack flexibility and adaptability to handle complex update scenarios.

[0053] In the prior art, software update methods usually do not have the ability of real-time monitoring and adaptive adjustment, resulting in the inability to effectively handle data conflicts and state retention problems during the software update process, thereby affecting system stability and user experience.

[0054] Based on this, the present application relates to the field of software update technology, and in particular to an adaptive software update method and a state synchronization system thereof, which are used in embedded systems or network devices to obtain a first data packet of the current version of the software to be updated and a second data packet of the target version; predict possible data conflict types of the software, identify potential update obstacles in advance, and determine corresponding solutions based on the predicted data conflict types; combine the solution and the two data packets to perform software updates, greatly reducing the risk of update failure due to data conflicts, and effectively improving the efficiency and success rate of software updates; further, it can also automatically adapt to different system states and data changes during the software update process, and adjust strategies to maintain the continuity of the system state before and after the update and the consistency of the data.

[0055] Specifically, the present application embodiment provides a software update method, such as Figure 1 As shown, the method provided in the embodiment of the present application can be executed by an electronic device, and the electronic device is a smart phone, a tablet computer, a laptop computer, a desktop computer, an embedded device, etc., but is not limited thereto. The method includes:

[0056] S101, obtaining a first data packet of the current software version of the software to be updated and a second data packet of the target software version;

[0057] The software to be updated represents a software application that needs to be updated. The first data packet represents a file set containing the current software version information. The first data packet contains the software code, resource files, configuration files, etc., which enable the software to run normally. The target software version is the updated version that is desired to be achieved, which may be an upgraded version or a downgraded version, which is not limited in the embodiments of the present application. The second data packet is a data packet corresponding to the target software version.

[0058] In some embodiments, the electronic device may periodically connect to the software update server, detect the current software version, and download the corresponding target software version data package. Alternatively, when triggered by the user, the electronic device may automatically connect to the software update server and download the corresponding target software version data package from the software update server according to the target software version specified by the user or the default latest software version.

[0059] S102, predicting the data conflict type during the software update process; and determining the solution corresponding to the data conflict type;

[0060] Before the update process begins, various types of data conflicts that may occur are predicted through analysis and evaluation so that corresponding solutions can be taken in advance. The number of data conflict types is not limited in the embodiment of the present application, and can be one or more, which is specifically determined according to the actual scenario. Among them, the data conflict type refers to the various types of data conflicts that may occur during the update process due to changes in the content of the data packet when switching between different versions. The data conflict types include but are not limited to: data format change conflicts, dependency conflicts, and concurrent access conflicts. Data format change conflicts indicate that the data format has changed in the new version, resulting in the inability to correctly parse the old data; the corresponding solution is: automatically converting the data format of the current software version to the data format of the target software version, or providing a data migration tool. Dependency conflicts indicate that the target software version depends on an external system or component that has not been updated; the corresponding solution is: giving priority to updating (upgrading or downgrading) dependent components, or adding dependency checking steps during the update process. Concurrent access conflicts indicate that during the software update process, multiple processes attempt to access the same data resource at the same time; the corresponding solution is: implementing a lock mechanism or an optimistic concurrency control strategy to ensure data consistency. Of course, data conflict types also include: version compatibility conflicts. Version compatibility conflict means that two versions of software are incompatible. The corresponding solution is: adjust the update strategy, introduce intermediate software versions as a transition, and gradually migrate data. For example, first update the version to the intermediate version, and then update the intermediate version to the target version.

[0061] In an embodiment of the present application, correspondences between multiple data conflict types and multiple solutions are preset. After the data conflict type is determined, the corresponding solution can be determined through the correspondence. It can be understood that each solution corresponds to a problem-solving component, through which the corresponding data conflict type can be effectively resolved.

[0062] S103: Update the software to be updated according to the solution, the first data packet and the second data packet.

[0063] In an embodiment of the present application, software updates can be performed based on data packets before and after the version update and solutions corresponding to the predicted conflict types, so that update conflicts can be quickly resolved based on the solutions, and the software update process can be effectively completed to keep it synchronized with the latest version.

[0064] Furthermore, in the update process, data migration is involved. In the embodiment of the present application, an incremental data synchronization method is used to implement data migration, and only the data that has changed since the last backup is synchronized. When performing incremental data synchronization, the data synchronization technology used is not limited in this embodiment, such as block-based synchronization or file-based synchronization.

[0065] It can be seen that in the embodiment of the present application, the first data packet of the current version of the software to be updated and the second data packet of the target version are obtained; the possible data conflict types of the software are predicted, potential update obstacles are identified in advance, and the corresponding solutions are determined based on the predicted data conflict types; the software is updated by combining the solution and the two data packets, which greatly reduces the risk of update failure due to data conflicts and effectively improves the efficiency and success rate of software updates.

[0066] Before the software is updated, choosing a suitable time to update can ensure the smooth operation of the system to a certain extent. Therefore, a possible implementation method of the embodiment of the present application is that S103 updates the software to be updated according to the solution, the first data packet and the second data packet, and also includes: obtaining the running status of the software to be updated and the running status of the device at the current moment; determining whether the current moment is the update opportunity according to the running status of the software to be updated and the running status of the device; if so, executing the step of updating the software to be updated according to the solution, the first data packet and the second data packet.

[0067] Among them, the electronic device can monitor the running status of the software and the running status of the device in real time through the built-in monitoring module. Furthermore, the changes of key data can also be monitored. Among them, key data refers to data that you want to retain, such as the equipment working condition information of the controlled device corresponding to the software. Taking the air conditioner as an example, the equipment working condition information is the running status of the air conditioner, so that the running status can be maintained after the update and during the software update process.

[0068] The status that the monitoring module focuses on is the running status before the update, the running status of the software to be updated, and the running status of the device, including but not limited to: determining whether sensitive functions are executed, whether important functions are executed, whether the memory is insufficient, and whether the power is insufficient; if the running status is good, it may be judged as a suitable time for the update; if any of the above situations exists, it is determined that this is not the best time for the update and the update time may need to be postponed until there is an update opportunity.

[0069] It can be seen that in the embodiment of the present application, by obtaining the running status of the software to be updated and the running status of the device at the current moment, and determining whether the current moment is the update time based on the running status, it can ensure that the software update (upgrade or downgrade) is carried out without affecting the business execution, which helps to improve the success rate of the software update and reduce the risk during the update process.

[0070] When updating software, it often involves a large number of changes to codes, configuration files, and data structures. Various conflicts may occur during the update process. These conflicts may cause the update to fail, or even worse, cause the loss of user data. Therefore, in order to further improve the success rate of the update, the update conflicts are predicted in advance in the embodiments of the present application, so that potential problems can be discovered in time, and the software update process can be guaranteed to proceed smoothly to a certain extent. The embodiments of the present application are no longer limited to the method of predicting the data conflict type, and the data conflict type can be predicted based on at least one method of a classifier, a rule engine, or analysis of historical update logs. It is understandable that if the data conflict type is predicted based on multiple methods, the set of data conflict types determined by the multiple methods is determined as the final data conflict type.

[0071] Therefore, with respect to the classifier method, a possible implementation method of the embodiment of the present application predicts the type of data conflict during the software update process, including: inputting the difference data between the first data packet and the second data packet into the data conflict classifier to determine the type of data conflict, and the data conflict classifier is obtained through training of historical update data. Among them, the difference data refers to the different data between the first data packet and the second data packet, involving aspects such as program code, configuration files, and resource files. The data conflict classifier is a classification model trained by machine learning, which is used to identify the type of data conflict. By inputting the difference data between the first data packet and the second data packet into the data conflict classifier, the key features such as software version differences and system status changes are extracted by the data conflict classifier, and classified according to the key features to facilitate the prediction of the data conflict type.

[0072] Furthermore, the training process of the data conflict classifier is further elaborated. Obtain historical update data; historical update data is data collected during past software updates, including upgrade or downgrade processes, and of course, can also include user feedback and error logs for each update; label the collected historical update data to clarify the type of each data conflict. The labeling can be done by technical personnel to ensure the accuracy of the labeling. Use the labeled historical update data as the training set, and select the initial machine learning model such as random forest or support vector machine (SVM) to train the data conflict classifier; use the validation set to evaluate the performance of the data conflict classifier (such as accuracy, recall, F1 score), and tune the classifier based on the evaluation results until the classifier reaches the required performance level.

[0073] It can be seen that in the embodiment of the present application, by inputting the difference data into the data conflict classifier to determine the data conflict type, potential problems can be warned before the software is updated, thereby avoiding errors and failures that may occur during the update process.

[0074] Regarding the rule engine, a possible implementation method of the embodiment of the present application predicts the type of data conflict during the software update process, including: using the rule engine according to the first data packet and the second data packet to determine the type of data conflict, and defining the rules and conditions of the data conflict in the rule engine. Among them, the rule engine is built based on an expert system, and defines the rules and conditions of data conflicts; so that after the first data packet and the second data packet are captured by the real-time monitoring module, the rule engine is triggered, so that the rule engine will match and judge the difference data according to the data conflict rule library to determine whether there is a data conflict, and predict the corresponding data conflict type. It can be seen that in the embodiment of the present application, the difference data is processed by the rule engine to determine the type of data conflict, which can improve the accuracy and efficiency of data conflict identification.

[0075] Regarding the way of analyzing the historical update log, a possible implementation method of the embodiment of the present application predicts the data conflict type in the software update process, including: performing statistical analysis according to the historical update log to determine the data conflict type. It can be understood that, in general, there is often a certain logic for the software upgrade / downgrade of the device, and the functional logic of some devices is adjusted and optimized to a certain extent, while for other functions, most upgrades are often not adjusted. Taking the software update of air-conditioning equipment as an example, the logic of the software upgrade is generally to optimize the functions of several devices such as the fan and compressor, and the logic of the upgrade is only to adjust the part of the related devices, and no adjustment is made to some other systematic contents. Therefore, the target function that is upgraded more can be determined through the upgrade situation in the historical upgrade, that is, the historical update log, and the data conflict type is predicted in combination with the target function. In the embodiment of the present application, the historical update log is statistically analyzed to identify the pattern and trend of the data conflict (that is, the data conflict type that appears more frequently in the upgrade), that is, the time series analysis is used to predict the data conflict type that may occur in the future upgrade. It can be seen that in the embodiment of the present application, the possible data conflict type is identified by statistically analyzing the historical update log.

[0076] After predicting the possible data conflict types, in order to ensure stable software updates, the data can be adjusted in advance to reduce the occurrence of problems during the actual update process; or during the update process, once a data conflict type that matches the prediction occurs, a predetermined solution can be immediately used to solve the problem; no matter which method is used, the present embodiment is no longer limited. Of course, it is also possible to first resolve conflicts in a static mode before the update, and re-monitor and resolve conflicts in a dynamic mode during the update process; no matter which method is used, the present application embodiment is no longer limited.

[0077] Therefore, a possible implementation of the embodiment of the present application, S103, updating the software to be updated according to the solution, the first data packet and the second data packet, includes:

[0078] The preset data packet corresponding to the solution is modified according to the solution to obtain a modified preset data packet; wherein the preset data packet is the first data packet and / or the second data packet that needs to be adjusted corresponding to the data conflict type; and the software to be updated is updated according to the modified preset data packet.

[0079] Specifically, according to the type of data conflict and the specific requirements of the solution, determine the first data packet and / or the second data packet that needs to be adjusted. According to the solution, these data packets are corrected one by one to solve the data conflict problem. The correction process may include adjusting the data format in the data packet, and adding some additional tools to the data packet to handle additional matters (such as tools for priority updating of dependent components, tools for transition update processes, tools for access mechanisms, etc.) data deletion, addition, modification and other operations. After the correction is completed, a corrected preset data packet is obtained. Finally, this corrected preset data packet is used to update the software to be updated to ensure that the software can run normally. Furthermore, after the correction, the correction results can also be manually reviewed. If any problems or non-compliance are found, manual adjustments can be made.

[0080] Another possible implementation of the embodiment of the present application, S103 updates the software to be updated according to the solution, the first data packet and the second data packet, including: updating the software to be updated according to the preset data packet; during the software update process, if a data conflict of the data conflict type occurs, using the solution corresponding to the data conflict type to resolve the data conflict. During the software update process, if a data conflict of the data conflict type occurs, the solution corresponding to the data conflict type is used to resolve the data conflict, thereby completing the software update.

[0081] During the software update process, some data requires users to make decisions, such as user-personalized data and user-critical data. Among them, user-personalized data includes interface layout, scene-related data, shortcut keys and other data, and user-critical data includes: user permissions and encryption keys, etc. When updating, the user needs to make a decision whether to retain. However, for non-critical data and automatically updated data, the system can process it without any sense. Therefore, a possible implementation method of an embodiment of the present application, S103 updates the software to be updated according to the solution, the first data packet and the second data packet, including: determining the update strategy according to the difference data between the first data packet and the second data packet, the update strategy includes data processing prompts during the software update process, and the data processing prompts indicate that the user needs to make processing decisions for the preset data; according to the solution, the first data packet and the second data packet, according to the update strategy, the software to be updated is updated.

[0082] Among them, the preset data can be data from multiple categories of data that are pre-set and require the user to make a decision. The present embodiment does not limit the determination method of the update decision, and the user can set it according to actual needs. For example, strategy generation based on a decision tree: build a decision tree model and dynamically generate an update strategy based on the system state. Specifically, it is necessary to collect historical update data and data labels of marked user decisions; use a machine learning algorithm to train the decision tree model. After the training is completed, the model can dynamically generate an update strategy based on the difference data between the first data packet and the second data packet; the update strategy includes data that needs to be automatically confirmed by the system and an update strategy for preset data that requires user decision. For another example, considering multiple goals such as update efficiency, data consistency, and service interruption time, a multi-objective optimization algorithm is used to generate a strategy. For another example, after obtaining the difference data, it is possible to match the difference data and the data in multiple categories of data to obtain the preset data, so that after updating to the preset data, a prompt message can be generated to display to the user, so that the user can make corresponding processing.

[0083] It can be seen that in the embodiment of the present application, by comparing and analyzing the difference data between the first data packet and the second data packet, an update strategy is adaptively formulated to improve the flexibility and adaptability of the update.

[0084] Under normal circumstances, when the device is updated, the operation of the device stops. This method makes the user experience poor. Therefore, a possible implementation method of the embodiment of the present application can perform state synchronization operations between the old and new versions of the software. Specifically, the method also includes: obtaining the device operating condition information at the current moment; in the process of updating the software to be updated, controlling the electronic device to operate under the device operating condition information at the current moment, and the electronic device is a device deployed with the software to be updated. Exemplarily, taking the air conditioner fan as an example, the device operating condition information at the current moment includes the fan speed 1, and the fan speed 1 is recorded so that it can continue to run at the fan speed 1 during the software update process and after the software update is completed.

[0085] A possible implementation method of the embodiment of the present application is that after updating the software to be updated according to the solution, the first data packet and the second data packet, S103 also includes: determining the update result of the software to be updated; if the update result is that the update is not successful, generating a prompt message to prompt the user.

[0086] The update result refers to whether the software has been successfully updated to a new version after the software update operation. If the update result is not successful, the updated software interface is directly displayed; if the update result is not successful, a prompt message is generated to prompt the user so that the user can know the update status in time.

[0087] Furthermore, the embodiment of the present application also has user interaction feedback, provides a user interaction interface, and provides real-time feedback on update progress and results.

[0088] The embodiments of the present application relate to the technical field of software update (upgrade or downgrade), and in particular, to an adaptive software update method and a state synchronization system thereof, which are used in embedded systems or network devices and can automatically adjust policies during the software update process to maintain the continuity of the system state and the consistency of the data.

[0089] The purpose of the present invention is to provide an adaptive software upgrade method and a state synchronization system thereof, which can automatically adapt to different system states and data changes during the software upgrade process. Taking the upgrade as an example, for details, see Figure 2, including real-time status monitoring, difference analysis, adaptive upgrade strategy generation, incremental data synchronization, status synchronization execution, conflict resolution, upgrade result verification and user interaction feedback, to ensure the continuity of system status and data consistency before and after the upgrade. Among them, starting from real-time status monitoring, the system will analyze the differences between the current software version and the new version, and generate an adaptive upgrade strategy based on these differences. The system only synchronizes the data that has changed since the last backup, performs status synchronization operations, and resolves data conflicts during the software upgrade process. After the upgrade is completed, the system will verify the running status and data consistency of the new version of the software, and provide real-time feedback on the upgrade progress and results through the user interaction interface.

[0090] It can be seen that the present application can monitor the software running status and data changes in real time, and provide accurate data support for updates; it can analyze software version differences and predict potential data conflicts; it can automatically generate update strategies based on the analysis results, reducing service interruptions during the software update process and improving the flexibility and adaptability of the update; the system only synchronizes the changed data, reducing the amount of data transmission and improving the update efficiency; it can resolve data conflicts during the software update process and ensure data consistency.

[0091] A software updating device provided in an embodiment of the present application is introduced below. The software updating device described below and the software updating method described above can be referred to each other. The software updating device of this embodiment is set in an electronic device. Figure 3 , Figure 3 It is a structural block diagram of a device of one embodiment of the present application, comprising:

[0092] An acquisition module 210 is used to acquire a first data packet of a current software version of the software to be updated and a second data packet of a target software version;

[0093] A determination module 220 is used to predict the data conflict type during the software update process; and determine a solution corresponding to the data conflict type;

[0094] The updating module 230 is used to update the software to be updated according to the solution, the first data packet and the second data packet.

[0095] In an achievable manner, the acquisition module 210 is further used to acquire the running status of the software to be updated and the running status of the device at the current moment;

[0096] The device also includes:

[0097] The timing determination module is used to determine whether the current moment is an update opportunity according to the running status of the software to be updated and the running status of the device; if so, trigger the update module 230.

[0098] In one practicable manner, the update module 230 is used to:

[0099] According to the solution, a preset data packet corresponding to the solution is modified to obtain a modified preset data packet; wherein the preset data packet is a first data packet and / or a second data packet that needs to be adjusted corresponding to the data conflict type; according to the modified preset data packet, the software to be updated is updated;

[0100] or,

[0101] The software to be updated is updated according to the preset data package; during the software update process, if a data conflict of a data conflict type occurs, the data conflict is resolved using a solution corresponding to the data conflict type.

[0102] In an achievable manner, the acquisition module 210 is further used to acquire the equipment operating condition information at the current moment;

[0103] The device also includes: a control module, which is used to control the electronic device to operate under the device working condition information at the current moment during the process of updating the software to be updated, and the electronic device is a device deployed with the software to be updated.

[0104] In one achievable manner, the determination module 220 is configured to:

[0105] Inputting difference data between the first data packet and the second data packet into a data conflict classifier to determine the data conflict type, wherein the data conflict classifier is trained by historical update data;

[0106] Determine the data conflict type based on the first data packet and the second data packet using a rule engine, wherein the rule engine defines rules and conditions for the data conflict;

[0107] Perform statistical analysis based on historical update logs to determine the type of data conflict.

[0108] In one practicable manner, the update module 230 is used to:

[0109] Determine an update strategy according to the difference data between the first data packet and the second data packet, the update strategy including a data processing prompt during the software update process, the data processing prompt indicating that the user needs to make a processing decision for the preset data;

[0110] The software to be updated is updated according to the solution, the first data packet and the second data packet and in accordance with the update strategy.

[0111] In one achievable manner, the device further includes:

[0112] A result determination module is used to determine the update result of the software to be updated; if the update result is that the update is not successful, the prompt module is triggered;

[0113] The prompt module is used to generate prompt information to prompt the user.

[0114] An electronic device is provided in an embodiment of the present application, such as Figure 4 As shown, Figure 4 The electronic device 300 shown includes: a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.

[0115] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0116] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 302 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0117] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0118] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.

[0119] Figure 4 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0120] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment.

[0121] An embodiment of the present application provides a computer program product, including a computer program, which implements the corresponding contents of the aforementioned method embodiment when the computer program is executed by a processor.

[0122] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0123] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A software updating method, characterized in that: The method comprises: Obtain a first data packet of the current software version of the software to be updated and a second data packet of the target software version; Predicting data conflict types during software update; and determining solutions corresponding to the data conflict types; The software to be updated is updated according to the solution, the first data packet and the second data packet.

2. The software updating method according to claim 1, characterized in that: Before updating the software to be updated according to the solution, the first data packet and the second data packet, the method further includes: Obtain the current running status of the software to be updated and the running status of the device; Determine whether the current time is an update opportunity according to the running status of the software to be updated and the running status of the device; If yes, the step of updating the software to be updated is performed according to the solution, the first data packet and the second data packet.

3. The software updating method according to claim 1, characterized in that: The updating of the software to be updated according to the solution, the first data packet and the second data packet includes: According to the solution, a preset data packet corresponding to the solution is modified to obtain a modified preset data packet; wherein the preset data packet is the first data packet and / or the second data packet that needs to be adjusted corresponding to the data conflict type; according to the modified preset data packet, the software to be updated is updated; or, The software to be updated is updated according to a preset data packet; during the software update process, if a data conflict of the data conflict type occurs, the data conflict is resolved using a solution corresponding to the data conflict type.

4. The software updating method according to claim 1, characterized in that: Also includes: Get the equipment operating status information at the current moment; In the process of updating the software to be updated, the electronic device is controlled to operate under the device operating condition information at the current moment, and the electronic device is a device on which the software to be updated is deployed.

5. The software updating method according to any one of claims 1 to 4, characterized in that: Predict the type of data conflict during the software update process, including at least one of the following: Inputting difference data between the first data packet and the second data packet into a data conflict classifier to determine the data conflict type, wherein the data conflict classifier is trained by historical update data; Determine the data conflict type according to the first data packet and the second data packet using a rule engine, wherein the rule engine defines rules and conditions for data conflicts; Statistical analysis is performed based on historical update logs to determine the data conflict type.

6. The software updating method according to any one of claims 1 to 4, characterized in that: The updating of the software to be updated according to the solution, the first data packet and the second data packet includes: Determine an update strategy according to difference data between the first data packet and the second data packet, wherein the update strategy includes a data processing prompt during the software update process, wherein the data processing prompt indicates that a user needs to make a processing decision for preset data; The software to be updated is updated according to the solution, the first data packet and the second data packet and in accordance with an update strategy.

7. The software updating method according to claim 1, characterized in that: After updating the software to be updated according to the solution, the first data packet and the second data packet, the method further includes: Determining an update result of the software to be updated; If the update result is unsuccessful, a prompt message is generated to prompt the user.

8. A software updating device, characterized in that: include: An acquisition module, used to acquire a first data packet of a current software version of the software to be updated and a second data packet of a target software version; A determination module for predicting the type of data conflict during the software update process; and determining a solution corresponding to the data conflict type; An updating module is used to update the software to be updated according to the solution, the first data packet and the second data packet.

9. An electronic device, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to: execute the steps of the software update method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded by the processor and executes the steps of the software updating method according to any one of claims 1 to 7.