Data updating method, device and system, computer equipment and readable storage medium

By determining the applet and its update order when the application starts, and the background update is performed, the problem of the delay of the applet is solved, the applet is updated in a timely manner, and the user waiting time is reduced.

CN119356711APending Publication Date: 2025-01-24BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411688053.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

There is a delay in the update of existing small and medium-sized programs, resulting in poor update timeliness.

Method used

When the application starts, it is determined to be updated and its update sequence, and obtain the update package according to the update sequence, and update the background to ensure that the applet is updated in time without perception of the user.

Benefits of technology

Through the application of the applet directly when the application starts, the update order is determined based on the preset priority list, which reduces the lagging of the applet update, improves the timelyness of the update, and reduces user waiting time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356711A_ABST
    Figure CN119356711A_ABST
Patent Text Reader

Abstract

The invention relates to a data updating method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps that in response to starting of an application program, a to-be-updated applet and an updating sequence corresponding to the to-be-updated applet are determined; updating packages of the to-be-updated applets are obtained in sequence according to the updating sequence, background updating is conducted on the to-be-updated applets in sequence according to the updating packages and the updating sequence, and updated target applets are obtained. By adopting the method, the updating timeliness of the applet can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data version iteration, and in particular to a data updating method, apparatus, system, computer equipment and readable storage medium. Background Art

[0002] With the development of applications, lightweight applications, namely mini-programs, have emerged. Mini-programs can be run directly on the client without the need for users to manually download and install them, nor do they need users to intervene in the update of mini-programs.

[0003] In the conventional technology, the mini-program is published in the application and runs in the target application published by the mini-program. For the update of the mini-program, the terminal responds to the operation of starting the mini-program in the target application, detects whether the version information of the mini-program matches the latest version information of the mini-program published in the server, and if the version information does not match, it indicates that the mini-program in the current terminal needs to be updated, then the terminal downloads the code package for the mini-program update, and updates the mini-program according to the code package.

[0004] However, in current traditional technologies, since mini-program updates have a certain delay, the timeliness of mini-program updates is poor. Summary of the invention

[0005] Based on this, it is necessary to provide a data updating method, apparatus, system, computer device and readable storage medium to address the above technical issues.

[0006] In a first aspect, the present application provides a data updating method, comprising:

[0007] In response to starting the application, determining the mini-programs to be updated and the update order corresponding to the mini-programs to be updated;

[0008] The update packages of the mini-programs to be updated are obtained in sequence according to the update order, and the background updates are performed on the mini-programs to be updated in sequence according to the update packages and the update order to obtain the target mini-programs whose updates are completed.

[0009] In one embodiment, in response to starting the application, determining the mini-program to be updated and the update order corresponding to the mini-program to be updated includes:

[0010] In response to starting the application, obtaining first version information of each candidate mini-program in the application;

[0011] According to the second version information, the first version information and the priority list published by the server for each of the candidate mini-programs, the mini-programs to be updated and the update order are determined among the candidate mini-programs.

[0012] In one embodiment, the obtaining the update packages of the mini-programs to be updated in sequence according to the update order includes:

[0013] Sending update package acquisition requests to the server in sequence according to the update order;

[0014] receiving the update package to be verified fed back by the server, and verifying the update package to be verified according to the third version information of the mini-program to be updated to obtain a verification result;

[0015] If the verification result is that the verification is passed, the update to be verified is determined as an update package of the mini-program to be updated.

[0016] In one embodiment, before obtaining the first version information of each candidate mini-program in the application in response to starting the application, the method further includes:

[0017] In response to the launch of the application, the global applet carrying the imperceptible update identifier is determined as a candidate applet among the global applet published by the application; the imperceptible update identifier is determined by the behavior information of the global user and the target event identifier.

[0018] In one embodiment, determining the mini-programs to be updated and the update order among the candidate mini-programs according to the second version information, the first version information, and the priority list published by the server for each candidate mini-program includes:

[0019] Determine the candidate mini-programs whose first version information does not match the second version information published by the server for each candidate mini-program as mini-programs to be updated;

[0020] Based on the corresponding priority ranking of each of the to-be-updated mini-programs in the priority list, an update order of the to-be-updated mini-programs is determined.

[0021] In one of the embodiments, before determining the mini-programs to be updated and the update order among the candidate mini-programs based on the second version information, the first version information, and the priority list published by the server for each of the candidate mini-programs, the method further includes:

[0022] Determine a priority score of each candidate mini-program based on the usage information, target event identifier, and imperceptible update identifier of each candidate mini-program by the terminal;

[0023] Prioritize each of the candidate applets according to the priority scores, and construct a priority list based on the ranking results.

[0024] In one embodiment, the step of performing background updating on each of the mini-programs to be updated in sequence according to the update package and the update order to obtain a target mini-program whose update is completed includes:

[0025] For each update process of the mini-program to be updated, determine the target thread configuration and the target bandwidth configuration according to the current environment resources of the terminal;

[0026] The to-be-updated applet is updated in the background based on the target thread configuration, the target bandwidth configuration and the update package to obtain an updated target applet.

[0027] In one embodiment, after performing background updates on each of the to-be-updated mini-programs in sequence according to the update package and the update order, the method further comprises:

[0028] Monitoring the update process of the mini-program to be updated, and when an exception occurs in the update process, determining a preset exception handling strategy based on the exception information;

[0029] The abnormal update is controlled according to the preset abnormality handling strategy, and an abnormality log is generated.

[0030] In a second aspect, the present application further provides a data updating device, comprising:

[0031] An acquisition module, configured to determine, in response to the startup of an application program, the mini-program to be updated and the update order corresponding to the mini-program to be updated;

[0032] The updating module is used to sequentially obtain the update packages of the mini-programs to be updated according to the update order, and sequentially perform background updates on each mini-program to be updated according to the update packages and the update order to obtain a target mini-program whose update is completed.

[0033] In one embodiment, the acquisition module is specifically used to acquire the first version information of each candidate mini-program in the application in response to the startup of the application;

[0034] According to the second version information, the first version information and the priority list published by the server for each of the candidate mini-programs, the mini-programs to be updated and the update order are determined among the candidate mini-programs.

[0035] In one embodiment, the device further comprises:

[0036] The first determination module is used to respond to the launch of an application and, among the global mini-programs released by the application, determine the global mini-program carrying an imperceptible update identifier as a candidate mini-program; the imperceptible update identifier is determined by the behavior information of the global user and the target event identifier.

[0037] In one of the embodiments, the update module is specifically used to send update package acquisition requests to the server in sequence according to the update order;

[0038] receiving the update package to be verified fed back by the server, and verifying the update package to be verified according to the third version information of the mini-program to be updated to obtain a verification result;

[0039] If the verification result is that the verification is passed, the update to be verified is determined as an update package of the mini-program to be updated.

[0040] In one embodiment, the acquisition module is specifically used to determine the candidate mini-programs whose first version information does not match the second version information published by the server for each candidate mini-program as mini-programs to be updated;

[0041] Based on the corresponding priority ranking of each of the to-be-updated mini-programs in the priority list, an update order of the to-be-updated mini-programs is determined.

[0042] In one embodiment, the device further comprises:

[0043] A second determination module, configured to determine a priority score of each candidate mini-program based on the terminal's usage information, target event identifier, and imperceptible update identifier for each candidate mini-program;

[0044] A sorting module is used to prioritize each of the candidate mini-programs according to the priority scores and construct a priority list according to the sorting results.

[0045] In one embodiment, the update module is specifically used to determine the target thread configuration and the target bandwidth configuration according to the current environment resources of the terminal for the update process of each of the mini-programs to be updated;

[0046] The to-be-updated applet is updated in the background based on the target thread configuration, the target bandwidth configuration and the update package to obtain an updated target applet.

[0047] In one embodiment, the device further comprises:

[0048] A monitoring module, used to monitor the update process of the mini-program to be updated, and when an exception occurs in the update process, determine a preset exception handling strategy according to the exception information;

[0049] The log module is used to control the abnormal update according to the preset abnormality handling strategy and generate an abnormality log.

[0050] In a third aspect, the present application further provides a data update system, the system comprising a terminal and a server, the terminal comprising an application, wherein:

[0051] The terminal is used to determine the mini-program to be updated and the update order corresponding to the mini-program to be updated in response to the start of the application; obtain the update packages of the mini-program to be updated in sequence according to the update order, and perform background updates on each mini-program to be updated in sequence according to the update package and the update order to obtain the target mini-program whose update is completed;

[0052] The server is used to send the update package of the mini-program to be updated to the terminal.

[0053] In a fourth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0054] In response to starting the application, determining the mini-programs to be updated and the update order corresponding to the mini-programs to be updated;

[0055] The update packages of the mini-programs to be updated are obtained in sequence according to the update order, and the background updates are performed on the mini-programs to be updated in sequence according to the update packages and the update order to obtain the target mini-programs whose updates are completed.

[0056] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0057] In response to starting the application, determining the mini-programs to be updated and the update order corresponding to the mini-programs to be updated;

[0058] The update packages of the mini-programs to be updated are obtained in sequence according to the update order, and the background updates are performed on the mini-programs to be updated in sequence according to the update packages and the update order to obtain the target mini-programs whose updates are completed.

[0059] In a sixth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0060] In response to starting the application, determining the mini-programs to be updated and the update order corresponding to the mini-programs to be updated;

[0061] The update packages of the mini-programs to be updated are obtained in sequence according to the update order, and the background updates are performed on the mini-programs to be updated in sequence according to the update packages and the update order to obtain the target mini-programs whose updates are completed.

[0062] The above-mentioned data update method, device, computer equipment, computer-readable storage medium and computer program product, in response to the startup of the application, determine the update order corresponding to the mini-program to be updated and the mini-program to be updated; obtain the update packages of the mini-program to be updated in sequence according to the update order, and perform background updates on each mini-program to be updated in sequence according to the update packages and the update order, so as to obtain the target mini-program that has been updated. By adopting this method, after the application is started, the mini-program to be updated that needs to be updated is directly triggered and located in the candidate mini-programs released by the target application, and when the user has not started the target mini-program, the mini-program to be updated is updated more finely without the user's perception, thereby reducing the lag of the mini-program update. Based on the preset priority list, the update order of the mini-program to be updated is determined in priority order. While ensuring that the mini-programs in the application can be updated to the latest version in a timely manner, the update process is optimized through clear priority management, the timeliness of the mini-program update is improved, and the waiting time of the user is reduced, thereby improving the timeliness of the mini-program update. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.

[0064] Figure 1 An application environment diagram of a data updating method in an embodiment;

[0065] Figure 2 is a flow chart of a data updating method in one embodiment;

[0066] Figure 3 A schematic diagram of a process for determining mini-programs to be updated and an update order in one embodiment;

[0067] Figure 4 A schematic diagram of a specific process of determining mini-programs to be updated and the update order in another embodiment;

[0068] Figure 5 A schematic diagram of a process for constructing a priority list in one embodiment;

[0069] Figure 6 A schematic diagram of a process for determining resource configuration used for updating in one embodiment;

[0070] Figure 7 is a structural block diagram of a data updating device in one embodiment;

[0071] Figure 8FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0072] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0073] The data updating method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. In response to the startup of the application, the terminal 102 determines the update order corresponding to the mini-program to be updated and the mini-program to be updated; the terminal 102 obtains the update package of the mini-program to be updated in sequence according to the update order, and performs background updates on each mini-program to be updated in sequence according to the update package and the update order, and obtains the target mini-program whose update is completed. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones and tablets. The server 104 can be an independent physical server, or it can be a server cluster or distributed system composed of multiple physical servers, or it can be a cloud server providing cloud computing services.

[0074] In an exemplary embodiment, Figure 2 As shown, a data updating method is provided, which is applied to Figure 1 The terminal in is taken as an example to illustrate, including the following steps 202 to 204. Among them:

[0075] Step 202: In response to the start of the application program, determine the mini-program to be updated and the update order corresponding to the mini-program to be updated.

[0076] In the embodiment of the present application, an application is downloaded in the terminal, and a mini-program is published in the application (that is, the application is the host application of the mini-program). The mini-program can be an independent functional module in the application, or a mini-program published on the application by other company entities. An application refers to independent software that needs to be installed on an operating system (for example, iOS, Android). The application has an independent installation package, and the user needs to download and install it on the terminal device before it can be used; a mini-program refers to a lightweight application that is embedded in an application so that the mini-program can be used without downloading and installing. For example, in a mobile banking APP (Application), independent functional modules such as financial management and insurance can be published, and the mini-program can be independently iterated, released, put on the shelves and removed from the shelves, and is not affected by the mobile banking APP.

[0077] During the application process of Mini Programs, as the operating system or device is updated, the Mini Programs may not be fully compatible with the new environment, or the developer may continuously expand the functions and services of the Mini Programs based on market demand and user feedback to meet the diverse needs of users. In addition, due to the rules and requirements of the Mini Program publishing platform, the Mini Programs need to be continuously updated to fix bugs, improve performance, enhance security, respond to user needs, and comply with platform rules and legal requirements. Therefore, the Mini Programs in the terminal application also need to be locally updated as the publisher updates the Mini Program.

[0078] When the user clicks to start the terminal application, the application will detect whether the application needs to update the mini program when it starts, so as to ensure that the mini program is the latest version before the user starts to use the mini program. First, the terminal checks the installed mini programs through the database or API (Application Programming Interface) of the application and the server, identifies which mini programs need to be updated, and then obtains a list of mini programs to be updated and the update order corresponding to each mini program to be updated. Among them, the update order of the mini programs can be determined by a pre-set strategy or algorithm, combined with different attribute information of the mini programs, user usage information, etc. For example, according to the version difference of the mini programs, the mini programs with a large version number difference are updated first; according to the mini programs that the user pre-sets in the application that contain certain key functions, these mini programs are updated first to ensure user experience; according to the update frequency of different mini programs, the mini programs with higher update frequency are updated in a limited manner; according to the frequency of use of the mini programs by the user, the mini programs that the user frequently uses are updated first.

[0079] Step 204, obtaining update packages of the mini-programs to be updated in sequence according to the update order, and performing background updates on each mini-program to be updated in sequence according to the update packages and the update order, to obtain a target mini-program whose update is completed.

[0080] In an embodiment of the present application, the terminal requests and receives the update package of each mini-program to be updated from the server in turn according to the determined update order. After receiving the update package, the application performs the update operation in the background, so that the user can continue to use other functions after starting the application without being interrupted by the update process. For the update process of each mini-program, first, the terminal downloads the update package of the current mini-program from the server through the application, and then decompresses and extracts the downloaded update package to obtain the code and resources that need to be updated, and applies the extracted new code and resources to the mini-program, overwriting the content of the old version, completing the update of the current mini-program, and obtaining the updated mini-program. After the update is completed, the application can verify the updated mini-program to ensure that the updated mini-program can run normally.

[0081] After all mini-programs to be updated are updated, the application can mark the mini-programs that have been updated, and clear temporary files, update package backups and other no longer needed resources after marking. Then, the user will use the latest updated version the next time he starts or switches to the target mini-program.

[0082] In the above data update method, after the application is started, the updated mini-program that needs to be updated is triggered and located directly in the candidate mini-programs released by the target application, and when the user has not started the target mini-program yet, the updated mini-program is updated in detail without the user's perception, thereby reducing the lag of the mini-program update, thereby reducing the user's waiting time and improving the timeliness of the mini-program update.

[0083] In an exemplary embodiment, Figure 3 As shown, step 202 includes steps 302 to 304. Among them:

[0084] Step 302: In response to the start of the application, obtain the first version information of each candidate mini-program in the application.

[0085] In an embodiment of the present application, when a user opens an application, the application triggers a startup event, which may be a user clicking on the application icon, the system automatically restoring the application process, or other startup methods. After the startup event is detected, the application enters the startup process, that is, performs a series of preset initialization actions, including obtaining the first version information of the candidate applets, sending an update request to the server, and determining the applets to be updated and the update order. First, the terminal obtains the first version information of all candidate applets in the application, and the candidate applets refer to all applets that have been installed or are currently in use by the application. Specifically, the application scans the applet directory in the local storage, obtains the application ID (Identity document) and the current version number of each candidate applet, and combines the application ID and version number of each scanned applet into a list, namely the first version information list. After obtaining the first version information containing all candidate applets, the application confirms that the first version information has been stored completely and correctly, and prepares for subsequent update checks.

[0086] Step 304 , determining the mini-programs to be updated and the update order among the candidate mini-programs according to the second version information, the first version information and the priority list published by the server for each candidate mini-program.

[0087] In an embodiment of the present application, the application initiates a request to the server to obtain the second version information released on the server for each candidate mini-program. The second version information is the latest version information of the candidate mini-program corresponding to the candidate mini-program stored on the server. Specifically, the application generates a request list based on the candidate mini-program application ID in the first version information list, which is used to request the corresponding latest version information from the server. The application sends the request list to the server via the HTTP / HTTPS protocol. After receiving the request, the server returns the latest version information (i.e., the second version information) of the corresponding candidate mini-program based on the application ID in the request. After receiving the response from the server, the application stores the second version information locally in the terminal and compares it with the first version information to obtain the mini-program to be updated.

[0088] For the comparison between the first version information and the second version information, the application will compare the first version number and the second version number of each candidate applet to determine which candidate applet has a version number lower than the second version number, and the application will generate a to-be-updated list containing all the to-be-updated applet based on the candidate applet with a version number lower than the second version number. The application also pre-sets a priority list for each candidate applet, which contains the update priority of each candidate applet, and the update order of the to-be-updated applet can be determined through the priority list.

[0089] In this embodiment, by obtaining the first version information of each candidate mini-program when the application is started and comparing it with the second version information published on the server, the mini-programs to be updated and their update order are determined, which helps to ensure that the versions of each mini-program within the application are always kept up to date, improve the timeliness of mini-program updates and system stability, and at the same time reasonably arrange the update order through a priority list, optimize resource allocation, avoid resource waste, and thus improve update efficiency.

[0090] In an exemplary embodiment, step 204 sequentially obtains update packages of the mini-programs to be updated in the update order, including:

[0091] Step 2041, sending update package acquisition requests to the server in order of update sequence.

[0092] Step 2042: Receive the update package to be verified fed back by the server, and verify the update package to be verified according to the third version information of the mini-program to be updated to obtain a verification result.

[0093] Step 2043: If the verification result is that the verification is passed, the update to be verified is determined as the update package of the mini-program to be updated.

[0094] In an exemplary embodiment, before step 302, the method further includes:

[0095] In response to the launch of the application, a global applet carrying a non-perceived update identifier is determined as a candidate applet among the global applet published by the application.

[0096] The imperceptible update identifier is determined by the global user's behavior information and the target event identifier.

[0097] In the embodiment of the present application, the imperceptible update identifier is an identifier corresponding to the global applet in the server. The global applet is all the applet published in the server. The global applet can be any type of applet, for example, tools, entertainment, social, etc. The imperceptible update identifier is used to mark the global applet that needs to be updated imperceptibly. Among them, the imperceptible update identifier can be manually set by the administrator in the server, or the server can also score the global applet according to the number of users, usage frequency and other information of each global applet, and determine the imperceptible update identifier based on the scoring result. For example, the imperceptible update identifier can be a simple Boolean value (true or false). Specifically, the server can also score the global applet according to the number of users, usage frequency and other information of each global applet, and automatically generate an imperceptible update identifier. First, the server regularly collects user data of the global applet, including the number of users, usage frequency, user feedback, etc. The server scores each global applet according to a preset scoring algorithm, wherein the scoring algorithm can consider multiple factors, such as the number of users, usage frequency, user satisfaction, etc. Based on the scoring results, the server automatically generates imperceptible update identifiers for those mini-programs with higher scores, and stores the generated imperceptible update identifier list in the database, where the scoring threshold can be pre-set or dynamically adjusted by the administrator.

[0098] At the same time, some global mini-programs are affected by temporary hot events, such as holiday promotions, large-scale events, hot topics, etc. These events usually lead to a significant increase in the frequency of use and number of users of related mini-programs in a short period of time. If there is a high latency requirement within a certain time range (i.e., it needs to respond and update quickly in a short period of time), the global mini-programs related to hot events will be judged as independent types, and the validity of the non-perceived update mark will be maintained before the hot event occurs.

[0099] In response to the launch of the application, the application queries the global applet library stored on the server to obtain a list of all global applet programs, which includes a non-perceived update identifier corresponding to each global applet. For example, if the non-perceived update identifier is true, it means that the global applet carries the non-perceived update identifier. The terminal sends a request to the server to determine the global applet carrying the non-perceived update identifier and sets it as a candidate applet as the basis for subsequent screening of applet programs to be updated.

[0100] In this embodiment, the update strategy of the mini-program is optimized by dynamically generating a non-perceptual update identifier and determining the global mini-programs that need to be non-perceptually updated based on hot activities and user behavior information. Not only does it improve the automation and intelligence level of the update process, but it also ensures that during hot activities or high user demand, the relevant mini-programs can respond and update quickly, thereby improving user experience and system performance. By setting the global mini-programs with non-perceptual update identifiers as candidate mini-programs, the system can more accurately identify and prioritize applications that need to be updated, effectively avoiding resource waste and unnecessary update operations, and improving update efficiency and resource utilization.

[0101] In an exemplary embodiment, Figure 4 As shown, step 304 includes steps 402 to 404. Among them:

[0102] Step 402 , determine the candidate mini-programs whose first version information does not match the second version information published by the server for each candidate mini-program as mini-programs to be updated.

[0103] In the embodiment of the present application, the terminal compares the first version information with the second version information to determine which candidate mini-programs need to be updated. Specifically, the application traverses the first version information and the second version information of each candidate mini-program, and for each candidate mini-program, the application compares whether its first version number is consistent with the second version number; if they are inconsistent, the candidate mini-program is considered to need to be updated, and a list of mini-programs to be updated is generated for the candidate mini-programs whose first version information does not match the second version information.

[0104] Step 404: Determine the update order of the mini-programs to be updated based on the corresponding priority ranking of each mini-program to be updated in the priority list.

[0105] In the embodiment of the present application, the priority list refers to the priority ranking of the mini-programs to be updated in the update order. The application reads the priority list by accessing the local database or file system, and adds each mini-program to be updated to the update order list in the order of priority ranking, that is, the position of each mini-program in the list is its update order.

[0106] In this embodiment, by comparing the first version information of the local candidate mini-program with the second version information released by the server, the candidate mini-programs that need to be updated are determined, and a list of mini-programs to be updated is generated. Then, based on the preset priority list, the update order of the mini-programs to be updated is determined in order of priority, ensuring that the mini-programs in the application can be updated to the latest version in a timely manner. At the same time, through clear priority management, the update process is optimized and the timeliness of mini-program updates is improved.

[0107] In an exemplary embodiment, Figure 5As shown, before step 304, the method further includes steps 502 to 504. Among them:

[0108] Step 502: Determine the priority score of each candidate mini-program based on the terminal's usage information, target event identifier, and imperceptible update identifier for each candidate mini-program.

[0109] In an embodiment of the present application, the application first determines the candidate mini-programs in the global mini-programs based on the imperceptible update identifier, and then determines the priority score of each candidate mini-program based on the usage information and target event identifier of each candidate mini-program.

[0110] The terminal usage information refers to the historical behavior data of the user when using the candidate mini-programs, including the frequency of use, duration of use, number of user interactions, etc. The application obtains the terminal usage information for each candidate mini-program through local logs or server records. Specifically, the application reads the user's historical records of using the candidate mini-programs from the local logs, which can be stored in a local database, file system, or other storage media, and combines the read usage information into a list, which is stored in the memory for subsequent calculation of the priority score.

[0111] The target event identifier refers to the event or operation triggered by the current user, such as launching a mini-program, opening a specific page, searching, etc. This event identifier helps determine which mini-programs have higher priority in the current scenario. Specifically, during the running process, the application monitors the user's operations and event triggers in real time. When the user triggers a specific event, the application generates a corresponding event identifier and stores it in the memory.

[0112] The priority score is a score calculated for each candidate mini program after comprehensively considering the usage information, target event identifier, and imperceptible update identifier. The higher the score, the higher the priority of the candidate mini program and the more priority it needs to be updated. The application calculates the priority score of each candidate mini program based on the preset calculation algorithm, combined with the usage information and target event identifier. The application performs weighted calculations on the usage information and target event identifier according to the preset weights. The weighted scores of each part are combined into a total score as the priority score of the candidate mini program. The application stores the calculated priority score in memory for subsequent sorting. Among them, the weight can be adjusted according to different scenarios and needs.

[0113] Step 504 , prioritize the candidate mini-programs according to the priority scores, and construct a priority list based on the ranking results.

[0114] In an embodiment of the present application, the terminal sorts each candidate mini-program according to the priority score of each candidate mini-program, and the sorted result will determine the update order of the candidate mini-programs. Specifically, the mini-program with a higher priority score has a higher priority, and the mini-program with a higher priority is ranked higher, that is, the candidate mini-program is ranked higher. Furthermore, the application uses a preset sorting algorithm (for example, quick sort, merge sort, etc.) to sort the priority scores of the candidate mini-programs, and sorts the candidate mini-programs according to the priority scores to generate an ordered list of candidate mini-programs. In addition, in some cases, the sorting results can be fine-tuned according to business needs to ensure that the priorities of certain special mini-programs are adjusted.

[0115] The priority list is an ordered list built based on the sorting results, which contains candidate applets sorted by priority scores. The application combines the sorted candidate applets list into a priority list for use in subsequent update processes. First, the application generates a priority list from the sorted candidate applets list and stores it in memory or a local file. Then, the application writes the generated priority list to local storage to ensure persistent data storage for use in subsequent update processes.

[0116] In this embodiment, by comprehensively considering user usage information, target event identifiers, and imperceptible update identifiers, priority scores are calculated for each candidate mini-program, and these scores are sorted to establish an ordered priority list, which not only ensures that the mini-program updates can closely match the user's current usage needs and the platform's target strategy, but also optimizes resource allocation and improves update efficiency through an intelligent priority management system. In addition, dynamic adjustments based on user behavior and instant events enable the system to flexibly respond to different usage scenarios and user needs, further improving the timeliness of mini-program updates.

[0117] In an exemplary embodiment, Figure 6 As shown, step 204 includes steps 602 to 604. Among them:

[0118] Step 602: for the update process of each mini-program to be updated, determine the target thread configuration and the target bandwidth configuration according to the current environment resources of the terminal.

[0119] In an embodiment of the present application, the terminal obtains resource information such as CPU usage, memory occupancy, network bandwidth, etc. through a system API or a custom monitoring mechanism. Target thread configuration refers to determining the number of threads and thread priorities to be used in the update process based on the current environmental resources. Reasonable thread configuration can improve update efficiency and avoid resource competition and system jams. Among them, the application evaluates the current CPU usage and memory usage. If the CPU usage is high, the number of threads is reduced to avoid excessive CPU resource occupation; if the memory occupancy is high, the number of threads is reduced to avoid system jams caused by insufficient memory. In addition, the terminal can also dynamically adjust the number of threads and thread priorities according to the evaluation results of the CPU usage and memory occupancy. For example, when the CPU usage is low, the number of threads can be increased to increase the update speed; when the memory occupancy is high, the number of threads can be reduced to avoid insufficient memory.

[0120] Target bandwidth configuration refers to determining the network bandwidth that should be used during the update process based on the current environment resources. Reasonable bandwidth configuration can ensure the reasonable allocation of network resources during the update process to avoid affecting the normal use of the network by users. The application evaluates the bandwidth of the current network. If the network bandwidth is low, the download bandwidth is reduced to avoid occupying too many network resources. In addition, the application can also synchronously evaluate the current battery power. If the battery power is low, the use of network bandwidth is reduced or suspended to avoid exhausting the battery power. The application can dynamically adjust the download bandwidth based on the evaluation results of network bandwidth and battery power. For example, when the network bandwidth is low, the download speed can be reduced to save bandwidth; when the battery power is low, the use of network bandwidth can be suspended or reduced to save power.

[0121] Step 604: Perform background update on the to-be-updated applet based on the target thread configuration, the target bandwidth configuration and the update package to obtain the updated target applet.

[0122] Among them, background update means that the system automatically updates the mini-program to be updated without the user's knowledge.

[0123] In an embodiment of the present application, in the background thread, the application starts downloading the update package of the mini program to be updated according to the target bandwidth configuration. The download process involves technologies such as block downloading and breakpoint resumption to ensure that the download process is stable and reliable. After the download is complete, the application performs an installation operation in the background thread to install the update package to the local storage. The installation process includes operations such as decompressing files and overwriting old version files. After the installation is complete, the application performs a restart operation in the background thread to ensure that the new version of the mini program to be updated takes effect. The restart process may involve operations such as reloading the mini program and restoring the user session.

[0124] In this embodiment, by intelligently monitoring and dynamically adjusting the current environmental resources of the terminal, the target thread configuration and the target bandwidth configuration are optimized to achieve efficient and imperceptible background mini-program updates, so that the update process can run in the best state, reduce interference with normal user operations, and improve system stability and performance.

[0125] In one embodiment, after step 204 performs background updates on each mini-program to be updated in sequence according to the update package and the update order, the method further includes:

[0126] Monitor the update process of the mini-program to be updated. If there is an exception in the update process, determine the preset exception handling strategy based on the exception information.

[0127] Control abnormal updates according to the preset exception handling strategy and generate exception logs.

[0128] In an embodiment of the present application, various abnormal situations may be encountered during the background update process, such as network interruption, download failure, installation error, etc. The application has different handling methods for abnormal situations to ensure the stability and reliability of the update process. When the application executes the background update task, it monitors the status of the task in real time. When the update task encounters an exception, the application captures the exception information. The exception information may include network errors, file errors, permission errors, etc. For recoverable exceptions (such as network interruption), the application can try to retry the update task. For unrecoverable exceptions (such as file corruption), the application can skip the update of the applet and continue to process the next applet. The application records the exception log, including information such as the exception type, occurrence time, and affected applet. The exception log can be used for subsequent problem analysis and troubleshooting.

[0129] After the update is complete, the application checks whether the installation files of the update package are complete to ensure that the files are not damaged, and checks whether the version information of the new version is correct to ensure that the version information of the update package is consistent with the server record.

[0130] In an exemplary embodiment, a data updating system is provided, the system comprising a terminal and a server, the terminal comprising an application program, wherein:

[0131] The terminal is used to determine the update order corresponding to the mini-program to be updated and the mini-program to be updated in response to the start of the application; obtain the update packages of the mini-program to be updated in sequence according to the update order, and perform background updates on each mini-program to be updated in sequence according to the update packages and the update order to obtain the target mini-program whose update is completed;

[0132] The server is used to send the update package of the mini-program to be updated to the terminal.

[0133] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0134] Based on the same inventive concept, the embodiment of the present application also provides a data updating device for implementing the data updating method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data updating device embodiments provided below can refer to the limitations on the data updating method above, and will not be repeated here.

[0135] In an exemplary embodiment, Figure 7 As shown, a data updating device 700 is provided, comprising: an acquisition module 701 and an update module 702, wherein:

[0136] An acquisition module 701 is used for obtaining a module for determining the mini-program to be updated and the update order corresponding to the mini-program to be updated in response to the startup of the application program;

[0137] The updating module 702 is used to sequentially obtain the update packages of the mini-programs to be updated according to the update order, and sequentially perform background updates on each mini-program to be updated according to the update packages and the update order to obtain the updated target mini-program.

[0138] In one embodiment, the acquisition module 701 is specifically used to obtain the first version information of each candidate mini-program in the application in response to the startup of the application;

[0139] According to the second version information, the first version information and the priority list published by the server for each candidate mini-program, the mini-programs to be updated and the update order are determined among the candidate mini-programs.

[0140] In one embodiment, the update module 702 is specifically used to send update package acquisition requests to the server in sequence according to the update order;

[0141] Receive the update package to be verified fed back by the server, and verify the update package to be verified according to the third version information of the mini program to be updated to obtain a verification result;

[0142] If the verification result is that the verification is passed, the update to be verified is determined as the update package of the mini program to be updated.

[0143] In one embodiment, the apparatus 700 further includes:

[0144] The first determination module is used to respond to the launch of the application and determine, among the global applets released by the application, a global applet carrying an imperceptible update identifier as a candidate applet; the imperceptible update identifier is determined by the behavior information of the global user and the target event identifier.

[0145] In one embodiment, the acquisition module 701 is specifically used to determine the candidate mini-programs whose first version information does not match the second version information released by the server for each candidate mini-program as mini-programs to be updated;

[0146] Based on the corresponding priority ranking of each mini-program to be updated in the priority list, the update order of the mini-program to be updated is determined.

[0147] In one embodiment, the apparatus 700 further includes:

[0148] A second determination module is used to determine the priority score of each candidate mini-program based on the terminal's usage information, target event identifier, and imperceptible update identifier for each candidate mini-program;

[0149] The sorting module is used to prioritize each candidate mini-program according to the priority score and build a priority list based on the sorting results.

[0150] In one embodiment, the update module 702 is specifically used to determine the target thread configuration and the target bandwidth configuration according to the current environment resources of the terminal for the update process of each mini program to be updated;

[0151] The mini-program to be updated is updated in the background based on the target thread configuration, the target bandwidth configuration and the update package to obtain the updated target mini-program.

[0152] In one embodiment, the apparatus 700 further includes:

[0153] A monitoring module is used to monitor the update process of the mini-program to be updated. When an exception occurs during the update process, a preset exception handling strategy is determined based on the exception information.

[0154] The log module is used to control the exception update according to the preset exception handling strategy and generate the exception log.

[0155] Each module in the above data updating device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0156] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store update package data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data update method is implemented.

[0157] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0158] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0159] In response to starting the application, determining the mini-programs to be updated and the update order corresponding to the mini-programs to be updated;

[0160] The update packages of the mini-programs to be updated are obtained in sequence according to the update order, and the background updates are performed on the mini-programs to be updated in sequence according to the update packages and the update order to obtain the target mini-programs whose updates are completed.

[0161] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0162] In response to starting the application, obtaining first version information of each candidate mini-program in the application;

[0163] According to the second version information, the first version information and the priority list published by the server for each of the candidate mini-programs, the mini-programs to be updated and the update order are determined among the candidate mini-programs.

[0164] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0165] In response to the launch of the application, the global applet carrying the imperceptible update identifier is determined as a candidate applet among the global applet published by the application; the imperceptible update identifier is determined by the behavior information of the global user and the target event identifier.

[0166] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0167] Determine the candidate mini-programs whose first version information does not match the second version information published by the server for each candidate mini-program as mini-programs to be updated;

[0168] Based on the corresponding priority ranking of each of the to-be-updated mini-programs in the priority list, an update order of the to-be-updated mini-programs is determined.

[0169] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0170] Determine a priority score of each candidate mini-program based on the usage information, target event identifier, and imperceptible update identifier of each candidate mini-program by the terminal;

[0171] Prioritize each of the candidate applets according to the priority scores, and construct a priority list based on the ranking results.

[0172] In one embodiment, when the processor executes the computer program, the following steps are also implemented:

[0173] For each update process of the mini-program to be updated, determine the target thread configuration and the target bandwidth configuration according to the current environment resources of the terminal;

[0174] The to-be-updated applet is updated in the background based on the target thread configuration, the target bandwidth configuration and the update package to obtain an updated target applet.

[0175] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0176] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0178] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0179] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0180] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data updating method, characterized in that: The method comprises: In response to starting the application, determining the mini-programs to be updated and the update order corresponding to the mini-programs to be updated; The update packages of the mini-programs to be updated are obtained in sequence according to the update order, and the background updates are performed on the mini-programs to be updated in sequence according to the update packages and the update order to obtain the target mini-programs whose updates are completed.

2. The method according to claim 1, characterized in that: The step of determining, in response to the startup of the application, the mini-program to be updated and the update order corresponding to the mini-program to be updated includes: In response to starting the application, obtaining first version information of each candidate mini-program in the application; According to the second version information, the first version information and the priority list published by the server for each of the candidate mini-programs, the mini-programs to be updated and the update order are determined among the candidate mini-programs.

3. The method according to claim 2, characterized in that The step of sequentially obtaining the update packages of the mini-programs to be updated in the update order includes: Sending update package acquisition requests to the server in sequence according to the update order; receiving the update package to be verified fed back by the server, and verifying the update package to be verified according to the third version information of the mini-program to be updated to obtain a verification result; If the verification result is that the verification is passed, the update to be verified is determined as an update package of the mini-program to be updated.

4. The method according to claim 2, characterized in that: Before obtaining the first version information of each candidate mini-program in the application in response to starting the application, the method further includes: In response to the launch of the application, the global applet carrying the imperceptible update identifier is determined as a candidate applet among the global applet published by the application; the imperceptible update identifier is determined by the behavior information of the global user and the target event identifier.

5. The method according to claim 2, characterized in that: The step of determining the mini-programs to be updated and the update order among the candidate mini-programs according to the second version information, the first version information and the priority list published by the server for each of the candidate mini-programs includes: Determine the candidate mini-programs whose first version information does not match the second version information published by the server for each candidate mini-program as mini-programs to be updated; Based on the corresponding priority ranking of each of the to-be-updated mini-programs in the priority list, an update order of the to-be-updated mini-programs is determined.

6. The method according to claim 2 or 5, characterized in that: Before determining the mini-programs to be updated and the update order among the candidate mini-programs according to the second version information, the first version information and the priority list published by the server for each candidate mini-program, the method further includes: Determine a priority score of each candidate mini-program based on the usage information, target event identifier, and imperceptible update identifier of each candidate mini-program by the terminal; Prioritize each of the candidate applets according to the priority scores, and construct a priority list based on the ranking results.

7. The method according to claim 1, characterized in that The step of performing background updating on each of the mini-programs to be updated in sequence according to the update package and the update order to obtain a target mini-program whose update is completed includes: For each update process of the mini-program to be updated, determine the target thread configuration and the target bandwidth configuration according to the current environment resources of the terminal; The to-be-updated applet is updated in the background based on the target thread configuration, the target bandwidth configuration and the update package to obtain an updated target applet.

8. The method according to claim 1, characterized in that After performing background updating on each of the to-be-updated mini-programs in sequence according to the update package and the update order, the method further comprises: Monitoring the update process of the mini-program to be updated, and when an exception occurs in the update process, determining a preset exception handling strategy based on the exception information; The abnormal update is controlled according to the preset abnormality handling strategy, and an abnormality log is generated.

9. A data updating system, characterized in that: The system includes a terminal and a server, wherein the terminal includes an application program, wherein: The terminal is used to determine the mini-program to be updated and the update order corresponding to the mini-program to be updated in response to the start of the application; obtain the update packages of the mini-program to be updated in sequence according to the update order, and perform background updates on each mini-program to be updated in sequence according to the update package and the update order to obtain the target mini-program whose update is completed; The server is used to send the update package of the mini-program to be updated to the terminal.

10. A data updating device, characterized in that: The device comprises: An acquisition module, configured to determine, in response to the startup of an application program, the mini-program to be updated and the update order corresponding to the mini-program to be updated; The updating module is used to sequentially obtain the update packages of the mini-programs to be updated according to the update order, and sequentially perform background updates on each mini-program to be updated according to the update packages and the update order to obtain a target mini-program whose update is completed.

Citation Information

Cited By

  • Directional application silent updating method and system based on user group characteristics

    CN120122973A