A batch generation method for installation package to be updated in incremental mode

By optimizing task allocation through microservice clusters and decision tree algorithms, the problem of slow processing speed for large batches of vehicle software incremental upgrade packages is solved, improving throughput and resource utilization. It is applicable to the generation of incremental upgrade packages for vehicles and other platforms.

CN115617380BActive Publication Date: 2025-10-21JIANGLING MOTORS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211405116.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2025-10-21
Estimated Expiration
2042-11-10

AI Technical Summary

Technical Problem

In the existing technology, the process of creating incremental upgrade packages for vehicle software cannot achieve large-scale real-time processing, and the existing load balancing algorithm cannot meet the throughput requirements of incremental upgrade package creation, resulting in high resource consumption and slow processing speed.

Method used

By adopting a microservice cluster model, combined with a load balancer and decision tree algorithm, task allocation is optimized and the optimal microservice is selected for processing by constructing microservice status information, resource processing capacity set, and task estimated resource consumption set.

Benefits of technology

It increases the throughput of incremental upgrade packages, makes full use of resources, and is suitable for remote vehicle upgrades and other platforms that require batch generation of incremental upgrade packages, saving costs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_2
    Figure QLYQS_2
Patent Text Reader

Abstract

The application provides a batch generation method for installing a package to update in an incremental manner, and relates to the field of software package upgrading. The specific method comprises two modules. One of the two modules provides services in a micro-service cluster mode to improve resource utilization and throughput. The other module is how to select the optimal micro-service in the cluster as the consumer of the next request. The application can fully utilize resources, improve the throughput of the incremental upgrade package, effectively improve the throughput compared with the prior art, and fully utilize resources. The application method has a wide application range, is suitable for vehicle remote incremental upgrade package upgrading, is suitable for other platforms and systems that need to generate incremental upgrade packages in batches, and can better save costs, improve user experience, reduce driving risks and warranty costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software installation package upgrades, and in particular to a method for batch generating installation packages for updating in an incremental manner. Background Art

[0002] As the Internet of Things (IoT) continues to evolve, the vehicle IoT is also undergoing continuous upgrades. Vehicle components are increasingly becoming programmable and customizable. To fix software issues or vulnerabilities in vehicle components, software package upgrades are necessary. However, due to the long-term instability of vehicle networks, downloading the complete new version installation package takes a significant amount of time, necessitating incremental software package downloads. With the increasing customization of vehicle models, especially high-end models, many owners upgrade certain parts of their vehicles. This means that vehicle software packages are no longer standardized, but rather differentiated. Therefore, each vehicle's incremental upgrade package is unique. Furthermore, due to the varying upgrade frequencies chosen by vehicle owners, multiple versions of vehicle component software may be in use simultaneously. Upgrades require the creation of corresponding incremental software update packages tailored to their specific versions.

[0003] The current software incremental upgrade package production process first downloads the software installation package, and downloads the new and old versions of the software installation packages at the same time. After the download is complete, the new and old file contents are compared, the difference parts and instructions are output, compressed and saved to a file, namely the incremental update installation package, which is uploaded to the file server and can be used for subsequent downloads of incremental update packages. In the process of updating vehicle parts software, since the parts and corresponding software versions of each vehicle may be different, it is necessary to produce customized incremental upgrade packages based on the current parts versions of the vehicle. The incremental upgrade package has a slow processing speed for a single service and cannot be processed in large quantities in real time. The current software incremental upgrade package production process can only produce one software incremental upgrade package at a time, so it cannot cope with the scenario where a large number of vehicles are upgraded at the same time. Solving the large-scale batch production of vehicle incremental upgrade packages is the key problem that the installation package incremental update production method needs to solve.

[0004] In today's technology, the most popular methods for creating incremental software upgrade packages are the bsdiff method proposed by the University of Oxford and the courgette method proposed by Google based on bsdiff.

[0005] BSDIFF uses the suffix sorting method proposed by Manber and Myers to sort strings at a byte-level and identify differences between the new and old files. BSDIFF divides the results of the comparison into three parts: identical strings, different strings, and identical strings after adding an offset. The different strings and identical strings after adding an offset are extracted, and the corresponding commands are added. After bz2 compression, they are compressed into an incremental installation package.

[0006] Microservices are deployed in clusters, and requests are distributed to each microservice through a load balancer. The microservices themselves ensure statelessness, that is, under the same input, each microservice gives the same processing result. The load balancer adopts different request distribution strategies. The existing distribution strategy cannot meet the needs of incremental upgrade package production. During the production process, the incremental upgrade package will occupy a large amount of computing resources. That is, a microservice can handle the production tasks of multiple incremental upgrade packages at the same time, which cannot improve the throughput. Therefore, a method to effectively improve the throughput of incremental upgrade package production is needed.

[0007] In order to increase the throughput of the software incremental upgrade package, the present invention adopts a cluster deployment method and uses a load balancing method to distribute requests to the microservices in the cluster for processing. The most important load balancing algorithms in the cluster are currently the most common polling method, random method, source address hash method, weighted polling method, etc.

[0008] The polling method sends requests to each microservice in the cluster in turn, without considering the carrying capacity and current load of each microservice.

[0009] The random method randomly distributes requests to each microservice in the cluster, randomly selects a microservice in the cluster and sends the request to this microservice for processing, without considering the current microservice carrying capacity and load.

[0010] The source address hashing method is to hash the source address of the request and obtain the hash value after modulo, and then find the corresponding microservice in the cluster. If the IP address of the requester does not change, each request can be forwarded to this microservice for processing.

[0011] The weighted round-robin method sets different weights based on the different carrying capacity of each microservice, and distributes them to the microservice requests in the cluster in turn according to the different weights. This algorithm fully takes into account the different carrying capacity of each microservice. Summary of the Invention

[0012] (1) Technical solution

[0013] To achieve the above objectives, the present invention is implemented through the following technical solutions: a method for batch generating installation packages in an incremental update manner, the specific method comprising two modules, one of which provides services in a microservice cluster mode to improve resource utilization and throughput, and the other module selects the optimal microservice in the cluster to serve as the consumer of the next request, the method for selecting the optimal microservice in the cluster comprising steps S1 to S6;

[0014] S1. The specific process is to construct microservice status information, serviceState = {idle, calculating, downloading, uploading};

[0015] S2, constructing a microservice resource processing capability set microServiceResource = {downloading, calculating, uploading};

[0016] S3. The specific process is to construct a microservice state transition method. The initial state of the microservice is idle. When the microservice is in idle state, the state changes to calculating state after receiving a task request. When the microservice is in calculating state, the calculating state can change to idle, downloading, uploading, and calculating state according to different processing tasks. When the microservice is in downloading state, it changes to calculating state according to subsequent specific processing tasks. When the microservice is in uploading state, it can change to idle state according to specific subsequent processing;

[0017] S4. The specific process is to construct a cluster state set, collectionStateList = {list{idle}, list{calculating}, list{downloading}, list{uploading}};

[0018] S5. The specific process is to construct a task estimated resource consumption set resourceConsume = {downloading, calculating, uploading};

[0019] S6. The specific process is to input the information into the constructed decision tree based on the resources in the above microservice cluster, the current occupied resources of each microservice, and the estimated resource consumption of the new task, and select the corresponding node according to the result of the decision tree;

[0020] The service method provided by the microservice cluster is that the server cluster receives a request for the incremental upgrade package and hands it over to the load balancer for processing. The load balancer evaluates and quantifies the resource consumption of the request, inputs the result into the model of the microservice selection method, obtains the node selection result, and sends the request to the corresponding node.

[0021] Preferably, the decision tree construction method in S6 is to first calculate the information entropy of the proportion of each sample in the selected training set, Where Ent is the information entropy, D is the sample set, k is the k-class sample, pk is the proportion of the k-class, and y is the total number of samples. Secondly, the information gain of each attribute in the sample is calculated. That is, information gain is the difference between information entropy and conditional entropy.

[0022] Furthermore, the State in S1 represents the state of the current microservice, idle means that the current microservice is in an idle state and is not executing any tasks, calculating means that the microservice has a task being processed and it is a computing task, downloading means that the microservice has a task being processed and it is a downloading task, and uploading means that the microservice has a task being processed and it is an uploading task.

[0023] Furthermore, the microServiceResource in S2 is the resource owned by the microservice, downloading is the network downlink resource owned by the microservice, calculating is the computing resource owned by the microservice, and uploading is the network uplink resource owned by the microservice.

[0024] Furthermore, the microservice in S3 can have multiple states at the same time. Except for the idle state, all other states can exist in the same microservice at the same time.

[0025] Furthermore, the collectionStateList in S4 is the status of all microservices in the cluster, and its status changes according to the microservice state transition. list{idle} is the collection of all microservices whose status is idle, list{calculating} is the collection of all microservices whose status is calculating, list{downloading} is the collection of all microservices whose status is downloading, and list{uploading} is the collection of all microservices whose status is uploading.

[0026] Furthermore, resourceConsume in S5 is the price conversion of the resources required for the task. The resources required to execute the incremental package production task are quantified and converted into estimated resources of each category required for the task. Downloading is the estimated resources of the software package that needs to be downloaded during the task execution, including the estimated resources required to download both new and old software packages. Calculating is the estimated computing resources required to produce the incremental upgrade package. Uploading is the estimated resources required to upload the completed incremental upgrade package.

[0027] Furthermore, in S6, a represents each attribute in the sample. When the value of a is v, it is represented by dv. Gain represents the degree of uncertainty reduction when the value of a is known. Based on the information gain value of each attribute, the maximum attribute is used as the root node. After removing the maximum attribute, the information gain value of each attribute in the training set is recalculated, and this process is repeated in sequence to construct a complete information tree.

[0028] (2) Beneficial effects

[0029] The present invention provides a method for batch-generating incremental installation package updates. This method has the following beneficial effects: Through clustering and more precise task allocation, it can fully utilize resources and improve the throughput of incremental upgrade packages. Compared with existing methods, this method significantly improves throughput and fully utilizes resources. The method has a wide range of applications, not only for remote incremental upgrade packages for vehicles, but also for other platforms and systems requiring batch generation of incremental upgrade packages. It also offers significant cost savings, improves user experience, and reduces driving risks and warranty costs. DETAILED DESCRIPTION

[0030] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0031] Example 1:

[0032] The embodiment of the present invention provides a method for batch-generating installation packages in an incremental update manner. The main technical problem solved by the present invention is to maximize the throughput of incremental upgrade packages while fully utilizing resources, thereby solving the problem that different terminals require specific incremental upgrade packages.

[0033] This method includes two modules. One module provides services in the form of a microservice cluster to improve resource utilization and throughput. The other module is how to select the optimal microservice in the cluster as the consumer of the next request.

[0034] The method of providing services with a microservice cluster has the following steps:

[0035] The server cluster receives a request for incremental upgrade package creation and passes it to the load balancer for processing. The load balancer evaluates and quantifies the resource consumption of the request, inputs the results into the microservice selection model, obtains the node selection result, and sends the request to the corresponding node. If the node does not select a valid node, it means that there are no available resources. The number of microservices needs to be dynamically increased to increase the load of the microservice cluster. If there are no free resources to increase, the request needs to wait. After the previous task is completed, the above process is repeated and resources are allocated. When resource utilization is too low, the number of microservice nodes is dynamically reduced, and the resources of microservices without tasks are reduced. The microservice node is removed from the load balancer, and subsequent requests are no longer sent to the removed node.

[0036] The following steps are involved in selecting the best microservice approach in a cluster:

[0037] First, construct the microservice status information, serviceState = {idle, calculating, downloading, uploading}, where State represents the current state of the microservice, idle means the current microservice is in an idle state and is not executing any tasks, calculating means the microservice has a task being processed and it is a computing task, downloading means the microservice has a task being processed and it is a downloading task, and uploading means the microservice has a task being processed and it is an uploading task.

[0038] After the above steps are completed, construct the resource processing capability set of the microservice microServiceResource = {downloading, calculating, uploading}, where microServiceResource is the resource owned by the microservice, downloading is the network downlink resource owned by the microservice, calculating is the computing resource owned by the microservice, and uploading is the network uplink resource owned by the microservice.

[0039] Then construct the microservice state transition method. The initial state of the microservice is idle. When the microservice is in idle state, the state changes to calculating state after receiving a task request. When the microservice is in calculating state, the calculating state can change to idle, downloading, uploading, and calculating state according to different processing tasks. When the microservice is in downloading state, it changes to calculating state according to subsequent specific processing tasks. When the microservice is in uploading state, it can change to idle state according to specific subsequent processing. Microservices can have multiple states at the same time. Except for idle state, all other states can exist in the same microservice at the same time.

[0040] And by constructing a cluster state set, collectionStateList = {list{idle}, list{calculating}, list{downloading}, list{uploading}}, where collectionStateList is the state of all microservices in the cluster, and its state change changes according to the microservice state transition, list{idle} is the set of all microservices in the idle state, list{calculating} is the set of all microservices in the calculating state, list{downloading} is the set of all microservices in the downloading state, and list{uploading} is the set of all microservices in the uploading state.

[0041] Secondly, during the computation generation process, a task estimated resource consumption set resourceConsume = {downloading, calculating, uploading} is constructed, where resourceConsume is the price conversion of the resources required for the task. The resources required to execute the incremental package creation task are quantified and converted into the estimated resources for each category required for the task. Downloading is the estimated resources required to download the software package during task execution, including the estimated resources required to download both the old and new software packages. Calculating is the estimated computing resources required to create the incremental upgrade package. Uploading is the estimated resources required to upload the completed incremental upgrade package.

[0042] Finally, based on the resources in the above microservice cluster, the current resources occupied by each microservice, and the estimated resource consumption of the new task, the information is input into the constructed decision tree, and the corresponding node is selected according to the result of the decision tree. The construction method of the decision tree is to first calculate the information entropy of the proportion of each sample in the selected training set, Where Ent is information entropy, D is the sample set, k is the k-class sample, pk is the proportion of the k-class, and y is the total number of samples. Next, calculate the information gain of each attribute in the sample, That is, information gain is the difference between information entropy and conditional entropy, where a is each attribute in the sample. When the value of a is v, it is represented by dv. Gain represents the degree of reduction of uncertainty when the value of a is known. According to the size of the information gain value of each attribute, the maximum value attribute is used as the root node. After removing the maximum value attribute, the information gain value of each attribute in the training set is recalculated, and the process is repeated in sequence to construct a complete information tree.

[0043] The above methods such as clustering and more precise task allocation can make full use of resources and improve the throughput of incremental upgrade packages. Compared with the existing technology, the throughput is effectively improved and resources can be fully utilized. The method of the present invention has a wide range of applications. It is not only suitable for remote incremental upgrade package upgrades of vehicles, but also suitable for other platforms and systems that require batch generation of incremental upgrade packages.

[0044] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for batch generation of installation packages in an incremental update manner, the specific method includes two modules, characterized in that: One of the two modules provides services in a microservice cluster mode to improve resource utilization and throughput, and the other module selects the best microservice in the cluster and serves as the consumer of the next request. The method of selecting the best microservice in the cluster is steps S1 to S6. S1. The specific process is to construct microservice status information, "serviceState = {idle, calculating, downloading, uploading}"; S2. The specific process is to construct a microservice resource processing capability set microServiceResource = {downloading, calculating, uploading}; S3. The specific process is to construct a microservice state transition method. The initial state of the microservice is idle. When the microservice is in idle state, the state changes to calculating state after receiving a task request. When the microservice is in calculating state, the calculating state changes to idle, downloading, uploading, and calculating state according to different processing tasks. When the microservice is in downloading state, it changes to calculating state according to subsequent specific processing tasks. When the microservice is in uploading state, it changes to idle state according to specific subsequent processing; S4. The specific process is to construct a cluster state set, collectionStateList = {list{idle}, list{calculating}, list{downloading}, list{uploading}}, where collectionStateList is the state of all microservices in the cluster, and its state changes according to the microservice state transition, list{idle} is the set of all microservices in the idle state, list{calculating} is the set of all microservices in the calculating state, list{downloading} is the set of all microservices in the downloading state, and list{uploading} is the set of all microservices in the uploading state; S5. The specific process is to construct a task estimated resource consumption set resourceConsume = {downloading, calculating, uploading}, where resourceConsume is the price conversion of the resources required for the task. The resources required to execute the incremental package creation task are quantified and converted into the estimated resources of each category required for the task. Downloading is the estimated resources of the software package that needs to be downloaded during the task execution, including the estimated resources required to download both the new and old software packages. Calculating is the estimated computing resources required to create the incremental upgrade package. Uploading is the estimated resources required to upload the completed incremental upgrade package. S6. The specific process is to input the information into the constructed decision tree based on the resources in the above-mentioned microservice cluster, the resources currently occupied by each microservice, and the estimated resource consumption of the new task, select the corresponding node according to the result of the decision tree, and use the method of providing services by the microservice cluster to receive the request for the incremental upgrade package from the server cluster, and hand it over to the load balancer for processing. The load balancer will evaluate and quantify the resource consumption of the request, input the result into the model of the microservice selection method, obtain the node selection result, and send the request to the corresponding node.

2. The method according to claim 1, wherein: The construction method of the decision tree in S6 is to first calculate the information entropy of the proportion of each sample in the selected training set, Where Ent is information entropy, D is the sample set, k is the k-type sample, p k is the proportion of k classes, y is the total number of samples, and secondly, the information gain of each attribute in the sample is calculated. That is, information gain is the difference between information entropy and conditional entropy, where a is each attribute in the sample, and when a is v, Gain represents the degree of uncertainty reduction when the value of a is known. According to the size of the information gain value of each attribute, the maximum value attribute is used as the root node. After removing the maximum value attribute, the information gain value of each attribute in the training set is recalculated, and the process is repeated in sequence to construct a complete information tree.

3. The method according to claim 2, wherein: In S1 to S6, State indicates the status of the current microservice. Idle indicates that the current microservice is in an idle state and is not executing any tasks. Calculating indicates that the microservice has a task being processed and it is a computing task. Downloading indicates that the microservice has a task being processed and it is a downloading task. Uploading indicates that the microservice has a task being processed and it is an uploading task.

4. The method according to claim 1, wherein: In S2, microServiceResource refers to the resources owned by the microservice, downloading refers to the network downlink resources owned by the microservice, calculating refers to the computing resources owned by the microservice, and uploading refers to the network uplink resources owned by the microservice.

5. The method according to claim 1, wherein: The microservice in S3 has multiple states at the same time. Except for the idle state, all other states exist in the same microservice at the same time.

Citation Information

Patent Citations

  • Self-adaptive task scheduler and method

    CN110764912A

  • Self-adaptive weighted polling load balancing system for K8S micro-service framework

    CN113946450A