Cloud mobile phone flashing method and device, electronic equipment, storage medium and program product
By setting priority and resource configuration strategies for the cloud phone flashing task pipeline, parallel execution of the task pipeline is achieved, solving the problem of insufficient resource utilization in existing technologies and improving processing efficiency and resource utilization.
Patent Information
- Application Number
- CN202511017198.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-10-17
AI Technical Summary
In existing cloud phone flashing operations, the task pipeline is executed sequentially, resulting in insufficient resource utilization and affecting processing efficiency.
By determining the task priorities of the task pipeline, configuring resource requirements, and configuring available resources for task channels based on available resources, the resource allocation can be dynamically adjusted to achieve parallel execution of the task pipeline.
It improves the processing efficiency of cloud phone flashing tasks, avoids low-priority tasks blocking the execution of high-priority tasks, optimizes resource utilization, and reduces resource waste.
Smart Images

Figure CN120806535A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computers, in particular to the field of cloud computing such as cloud services, cloud phones and smart clouds, and more particularly to a cloud phone flashing method, a cloud phone flashing device, an electronic device, a computer readable storage medium and a computer program product. BACKGROUND
[0002] Currently, when performing a flashing operation on a cloud phone, each task pipeline for cloud phone flashing is executed in series according to the order of arrangement, and the configuration and optimization of the cloud phone system are completed. SUMMARY
[0003] Embodiments of the present disclosure provide a cloud phone flashing method and device, an electronic device, a storage medium and a program product, which can comprehensively utilize available resource amounts to accelerate the processing of task pipelines.
[0004] In a first aspect, embodiments of the present disclosure provide a cloud phone flashing method, which includes: determining a task priority of a task pipeline for cloud phone flashing; determining a resource requirement amount of the task priority based on a to-be-executed task pipeline corresponding to the task priority; configuring an available resource amount for a task channel corresponding to the task priority based on a total amount of available resources, a level of the task priority and the resource requirement amount; and executing the to-be-executed task pipeline through the task channel based on the available resource amount.
[0005] In a second aspect, embodiments of the present disclosure provide a cloud phone flashing device, which includes: a priority determination module configured to determine a task priority of a task pipeline for cloud phone flashing; a resource requirement determination module configured to determine a resource requirement amount of the task priority based on a to-be-executed task pipeline corresponding to the task priority; a resource configuration module configured to configure an available resource amount for a task channel corresponding to the task priority based on a total amount of available resources, a level of the task priority and the resource requirement amount; and a task execution module configured to execute the to-be-executed task pipeline through the task channel based on the available resource amount.
[0006] In a third aspect, embodiments of the present disclosure provide an electronic device, which includes: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any implementation manner of the first aspect.
[0007] In a fourth aspect, the embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions, which, when executed by a computer, enable the computer to implement the method described in any implementation manner of the first aspect.
[0008] In a fifth aspect, the embodiments of the present disclosure provide a computer program product comprising a computer program, which, when executed by a processor, enables the method described in any implementation manner of the first aspect.
[0009] It should be understood that the contents described in this section are not intended to identify key or important features of the embodiments of the present disclosure, nor are they used to limit the scope of the present disclosure. Other features of the present disclosure will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS
[0010] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings: Figure 1 is an exemplary system architecture diagram to which the present disclosure can be applied; Figure 2 is a flowchart of a cloud phone flashing method provided by an embodiment of the present disclosure; Figure 3 is a flowchart of configuring an available resource amount for a task channel by some embodiments of the present disclosure; Figure 4 is a flowchart of executing a task pipeline to be executed by a task channel by some embodiments of the present disclosure; Figure 5 is a flowchart of one specific application scenario of the cloud phone flashing method of the present disclosure; Figure 6 is a timing diagram of one specific application scenario of the cloud phone flashing method of the present disclosure; Figure 7 is a structural block diagram of a cloud phone flashing device provided by an embodiment of the present disclosure; Figure 8 is a structural schematic diagram of an electronic device suitable for the cloud phone flashing method provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0011] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are meant to be exemplary in nature, and include various details intended to facilitate understanding of the present disclosure. However, those skilled in the art will realize that the embodiments described herein are not the only embodiments that can be contemplated. Accordingly, various changes and modifications can be made to the embodiments described and illustrated herein, without departing from the scope and spirit of the present disclosure. Also, for the purpose of clarity and a concise description, descriptions of well-known functions and constructions are omitted herein. It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0012] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information comply with relevant laws and regulations and do not violate public order and good customs.
[0013] Figure 1 An exemplary system architecture 100 of an embodiment of the cloud phone flashing method and device, electronic device, storage medium and program product to which the present disclosure can be applied is shown.
[0014] As shown in Figure 1 The system architecture 100 can include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0015] A user can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. The terminal devices 101, 102, 103 and the server 105 can be installed with various applications for realizing information communication between them, such as operation and maintenance management applications, instant messaging applications, etc.
[0016] The terminal devices 101, 102, 103 and the server 105 can be hardware or software. When the terminal devices 101, 102, 103 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc. When the terminal devices 101, 102, 103 are software, they can be installed in the above-mentioned electronic devices, and can be implemented as multiple software or software modules, or as a single software or software module, which is not specifically limited herein. When the server 105 is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or as a single server. When the server 105 is software, it can be implemented as multiple software or software modules, or as a single software or software module, which is not specifically limited herein.
[0017] The server 105 can provide various services through various applications built-in. Taking an operation and maintenance application for providing operation and maintenance management services as an example. A user can send a cloud phone flashing request to the server 105 through the operation and maintenance application of the terminal device 101, 102, 103. The server 105 can receive the request and run the operation and maintenance application to process it. The server 105 can determine the task priority of the task pipeline for cloud phone flashing, determine the resource demand of the task priority based on the task pipeline to be executed corresponding to the task priority, configure the available resource amount for the task channel corresponding to the task priority based on the total amount of available resources, the level and resource demand of the task priority, and execute the task pipeline to be executed through the task channel based on the available resource amount. The server 105 can also send the execution result of the task pipeline to the terminal device 101, 102, 103. The terminal device 101, 102, 103 can receive the execution result and run the operation and maintenance application to display the execution result to the user.
[0018] It should be understood that Figure 1 The number of terminal devices, networks and servers in the above embodiments is only illustrative. Any number of terminal devices, networks and servers can be provided according to the needs of implementation.
[0019] Please refer to Figure 2 , Figure 2 A flowchart of a cloud phone flashing method according to an embodiment of the present disclosure is provided. The flowchart 200 can include the following steps: Step 201: determining the task priority of the task pipeline for cloud phone flashing.
[0020] This step is intended to determine the task priority of the task pipeline for cloud phone flashing by the execution subject of the cloud phone flashing method (for example, the server 105 as shown in Figure 1 The execution subject can receive a cloud phone flashing request from the terminal device 101, 102, 103 as shown in Figure 1 , obtain the task pipeline for cloud phone flashing according to the cloud phone flashing request, and determine the task priority of the task pipeline.
[0021] In an embodiment of the present disclosure, the task pipeline may include a plurality of pre-arranged task cards, and a task card may be created based on a flashing step. Based on the various flashing steps for flashing the cloud phone, task cards corresponding to the various flashing steps may be created in advance, and the various flashing steps may be standardized. Optionally, each standardized task card may be obtained by encapsulating each flashing step separately. For example, the existing code encapsulation method may be used to encapsulate each flashing step, which is not limited in the embodiment of the present disclosure. In an optional example, the flashing steps for flashing the cloud phone may include but are not limited to logical volume reset, agent program update, image package update, function package update, network isolation, etc. The task cards created according to the various flashing steps may include but are not limited to logical volume reset task cards, agent program update task cards, image package update task cards, function package update task cards, network isolation task cards, etc.
[0022] The operation and maintenance personnel can Figure 1 The terminal devices 101, 102, and 103 shown arrange each task card to obtain a task pipeline for flashing the cloud phone. Among them, the arrangement order of the task cards in the task pipeline can be consistent with the order of the corresponding flashing steps in the flashing operation on the cloud phone. In an optional example, the order of the flashing steps for flashing the cloud phone is logical volume reset, agent program update, image package update, function package update and network isolation, and the arrangement order of the task cards in the task pipeline is logical volume reset task card, agent program update task card, image package update task card, function package update task card and network isolation task card.
[0023] In the embodiments of the present disclosure, the execution subject can Figure 1 The network 104 shown obtains the task pipeline for flashing the cloud phone from the terminal device, and the execution entity can also obtain the task pipeline for flashing the cloud phone from the local memory. The implementation method of the present disclosure is not limited to this.
[0024] In the embodiment of the present disclosure, the task priority can be pre-set in the server 105, and the execution subject can determine the task priority of the task pipeline for flashing the cloud phone according to the pre-set task priority. For example, three task priorities of high priority, medium priority and low priority can be pre-set. For another example, five task priorities of 1st priority, 2nd priority, 3rd priority, 4th priority and 5th priority can be pre-set. The level and form of the pre-set task priority can be determined according to actual needs, and the embodiment of the present disclosure does not limit this.
[0025] Optionally, the operation and maintenance personnel can set the task priority for the arranged task pipeline according to the pre-set task priority when arranging the task pipeline, the execution subject can obtain the task priority set by the operation and maintenance personnel when obtaining the task pipeline, and the execution subject can determine the task priority set by the operation and maintenance personnel as the task priority of the task pipeline. Optionally, the execution subject can obtain the information of the task pipeline when obtaining the task pipeline, and the execution subject can determine the task priority of the task pipeline from the pre-set task priority according to the information of the task pipeline. The embodiments of the present disclosure do not limit the manner in which the execution subject determines the task priority of the task pipeline according to the pre-set task priority.
[0026] In an optional example, step 201 of determining the task priority of the task pipeline for cloud phone flashing can include: determining the task priority of the task pipeline based on the information of the task pipeline for cloud phone flashing, wherein the information of the task pipeline includes at least one of a task type, a task purpose, and a delivery time. The task type can include a business task, a non-business task, etc., the task purpose can include device shelving, device upgrading, etc., and the delivery time can include immediate delivery, periodic delivery, etc. For example, the flashing operation performed by the task pipeline on the cloud phone flashing can be a business task, and the network isolation operation performed on the cloud phone alone is a non-business task. Determining the task priority of the task pipeline according to the information of the task pipeline can more accurately determine the task priority of the task pipeline, and can effectively avoid misjudgment.
[0027] Step 202: determining the resource demand of the task priority based on the to-be-executed task pipeline corresponding to the task priority.
[0028] On the basis of step 201, this step aims to determine the resource demand of the task priority by the above-mentioned execution subject based on the to-be-executed task pipeline corresponding to the task priority. After determining the task priority of the task pipeline for cloud phone flashing, the execution subject can take the task pipelines with the same task priority as the to-be-executed task pipeline corresponding to the task priority, and the execution subject can determine the resource demand of the corresponding task priority according to the resource demand of the to-be-executed task pipeline.
[0029] In an embodiment of the present disclosure, the resource requirement of the task pipeline can be the number and type of resources required to complete the task pipeline. The type of resources can include, but is not limited to, computing resources, storage resources, network resources, etc., and the number of resources can be determined according to the number of task cards included in the task pipeline, the number of cloud phones concurrently executing the flashing operation of the task pipeline, etc. When the task priority corresponds to only one task pipeline, the resource requirement of the task priority is the resource requirement of the task pipeline. When the task priority corresponds to at least two task pipelines, the resource requirement of the task priority is the sum of the resource requirements of each task pipeline in the task pipeline corresponding to the task priority.
[0030] Step 203: based on the total amount of available resources, the level of the task priority, and the resource requirement, configuring the available resource amount for the task channel corresponding to the task priority.
[0031] On the basis of step 202, this step aims to configure the available resource amount for the task channel corresponding to the task priority by the above-mentioned execution subject based on the total amount of available resources, the level of the task priority, and the resource requirement. After determining the resource requirement of the task priority, the execution subject can obtain the current total amount of available resources, determine the available resource amount of the task priority according to the current total amount of available resources, the level of the task priority, and the resource requirement, and configure the available resource amount for the task channel corresponding to the task priority.
[0032] In an embodiment of the present disclosure, the task channel can be a mutually independent channel for executing the task pipeline established according to the pre-set task priority. For example, three task channels can be established according to the high priority, the medium priority, and the low priority, respectively, and the three task channels can be used to execute the high priority task pipeline, the medium priority task pipeline, and the low priority task pipeline, respectively. For another example, five task channels can be established according to the first priority, the second priority, the third priority, the fourth priority, and the fifth priority, respectively, and the five task channels can be used to execute the first priority task pipeline, the second priority task pipeline, the third priority task pipeline, the fourth priority task pipeline, and the fifth priority task pipeline, respectively. The embodiment of the present disclosure does not limit the method of establishing the task channel according to the task priority, and for example, the existing method can be used to establish the task channel.
[0033] In the embodiments of the present disclosure, according to the correspondence between the task channel and the task priority, the resource requirement of the task channel can be determined according to the resource requirement of the task priority. Optionally, the execution subject can determine the available resource amount of each task channel according to the total available resource amount, the level of the task priority and the resource requirement, and configure the available resource amount of each task channel by using a pre-set resource configuration strategy, for example, the resource configuration strategy can be a resource proportion strategy. Optionally, the execution subject can determine the available resource amount of each task channel according to the total available resource amount, the level of the task priority and the resource requirement, and configure the available resource amount of each task channel by using a pre-set resource configuration model, for example, the resource configuration model can be a neural network model. The embodiments of the present disclosure do not limit the implementation of the available resource amount of the task channel.
[0034] Step 204: executing the to-be-executed task pipeline through the task channel based on the available resource amount.
[0035] On the basis of step 203, this step aims to execute the to-be-executed task pipeline through the task channel by the above-mentioned execution subject based on the available resource amount. After the execution subject configures the available resource amount of the task channel corresponding to the task priority, the execution subject can execute the corresponding to-be-executed task pipeline through each task channel according to the available resource amount configured for each task channel.
[0036] In the embodiments of the present disclosure, the available resource amount of the task channel can be the number and type of resources that can be used by the task channel, and the available resource amount of the task channel is part of the total available resource amount, which can be the total number and type of resources that can be used at present. When the to-be-executed task pipeline includes at least two task pipelines, the execution subject can execute each task pipeline through the task channel according to the execution order of each task pipeline in the to-be-executed task pipeline.
[0037] The flashing method of the cloud phone provided by the embodiments of the present disclosure sets the task priority for the task pipeline for flashing the cloud phone, and according to the correspondence between the task priority and the task channel, the task pipelines with different task priorities can be executed through different task channels, which can avoid the low-priority task pipeline from occupying the available resources and blocking the execution of the high-priority task pipeline, and the task pipelines with different task priorities do not need to be executed in different time periods. In addition, the resource requirement of the task priority is determined according to the correspondence between the task priority and the task pipeline, and the available resource amount of each task channel is configured, which can realize the dynamic borrowing of the available resource amount among the task channels, increase the available resource amount of the busy task channel, improve the processing capacity of the busy task channel, reduce the available resource amount of the idle task channel, avoid the waste of resources of the idle task channel, and comprehensively utilize the available resource amount to accelerate the processing of the task pipeline.
[0038] Please refer to Figure 3 , Figure 3 A flowchart of configuring available resources for a task channel according to some embodiments of the present disclosure may include the following steps: Step 301: Determine resource allocation ratios for the multiple task priorities based on the priority levels and resource requirements of the multiple tasks.
[0039] This step is intended to be performed by the cloud phone's flashing method execution subject (such as Figure 1 The server 105 shown) determines the resource allocation ratio of multiple task priorities based on the levels and resource requirements of multiple task priorities. After determining the resource requirements of the task priorities, the execution entity can determine the resource allocation ratio of the multiple task priorities based on the levels and resource requirements of the multiple task priorities. Among them, the multiple task priorities are pre-set task priorities, which can include task priorities determined according to the task pipeline, and can also include task priorities not determined according to the task pipeline. For the source demand of the task priority determined according to the task pipeline, it is determined according to the task pipeline to be executed corresponding to the task priority. For the source demand of the task priority not determined according to the task pipeline, its resource demand can be set to a preset value, for example, its resource demand can be set to 0.
[0040] Optionally, the execution entity can directly calculate the resource allocation ratio of multiple task priorities based on the level of each task priority and the amount of resource required, wherein for the task priority with a resource requirement of 0, its value in the resource allocation ratio can be set to a very small preset value. Optionally, the execution entity can also determine the resource allocation ratio of multiple task priorities through a resource allocation strategy based on the level of each task priority and the amount of resource required. Among them, the resource allocation strategy can determine whether each task priority has resource requirements based on the level of each task priority and the amount of resource required, and determine the resource allocation ratio of multiple task priorities based on the information whether each task priority has resource requirements. The embodiment of the present disclosure does not limit the implementation method of determining the resource allocation ratio of multiple task priorities based on the level of multiple task priorities and the amount of resource required.
[0041] In some optional examples, task channel A can be established based on high priority to execute a high-priority task pipeline, task channel B can be established based on medium priority to execute a medium-priority task pipeline, and task channel C can be established based on low priority to execute a low-priority task pipeline. Based on information about whether task channel A, task channel B, and task channel C have resource requirements, a resource allocation ratio for each of the three task priorities / task channels can be set to obtain a resource allocation strategy. The resource allocation strategy is shown in Table 1.
[0042] Table 1 is a resource configuration table for dynamic adjustment of channel resource proportion
[0043] In the case where three task channels have resource requirements, for example, have task pipelines to be executed, the resource configuration proportion of task channel A, task channel B and task channel C is 3.5:5.5:1. In the case where two task channels have resource requirements, for example, have task pipelines to be executed, and one task channel has no resource requirement, for example, has no task pipeline to be executed, the resource configuration proportion of task channel A, task channel B and task channel C is 6.5:0.5:3, 3.5:6:0.5, 3:5.5:1.5. In the case where two task channels have no resource requirement, for example, have no task pipeline to be executed, and only one task channel has resource requirement, for example, has task pipeline to be executed, the resource configuration proportion of task channel A, task channel B and task channel C is 3:6.5:0.5, 3:0.5:6.5, 9:0.5:0.5.
[0044] Step 302: Based on the resource configuration proportion and the total amount of available resources, the available resource amount of each task channel corresponding to each task priority is configured.
[0045] On the basis of step 301, this step aims to configure the available resource amount of each task channel corresponding to each task priority by the above-mentioned execution subject based on the resource configuration proportion and the total amount of available resources. After determining the resource configuration proportion of multiple task priorities, the execution subject can determine the available resource amount of each task channel corresponding to each task priority according to the resource configuration proportion and the total amount of available resources, and configure the available resource amount of each task channel. For example, the total amount of available resources is the resource amount for concurrently performing flashing operation on 1000 cloud phones, and the resource configuration proportion of task channel A, task channel B and task channel C is 3.5:5.5:1. The available resource amount of task channel A can be obtained as the resource amount for concurrently performing flashing operation on 350 cloud phones, the available resource amount of task channel B can be obtained as the resource amount for concurrently performing flashing operation on 550 cloud phones, and the available resource amount of task channel C can be obtained as the resource amount for concurrently performing flashing operation on 100 cloud phones.
[0046] Optionally, the resource configuration strategy can further include a range of available resource quantity for each task priority, and the resource configuration ratio needs to meet the range of available resource quantity for each task priority. Step 303 of determining the resource configuration ratio of the plurality of task priorities based on the levels of the plurality of task priorities and the resource demand quantity can include: determining the range of available resource quantity for each task priority; and determining the resource configuration ratio of the plurality of task priorities based on the levels of the plurality of task priorities, the resource demand quantity, and the range of available resource quantity. For example, as shown in Table 1, the resource configuration strategy sets the minimum value of the resource configuration ratio for task channel A, task channel B, and task channel C, the minimum value of task channel A is 3, the minimum value of task channel B is 0.5, and the minimum value of task channel C is 0.5. Even if there is no resource demand in the corresponding task channel, for example, there is no task pipeline to be executed, the resource configuration strategy will still reserve a certain amount of available resource quantity for each task channel, so that the available resource quantity of the task channel cannot be borrowed by other task channels. The setting of the range of available resource quantity is beneficial to ensure the stability of the system and improve the resistance of the system to risks such as system jitter.
[0047] In this embodiment, by determining the resource configuration ratio of the plurality of task priorities, the available resource quantity is configured for each task channel according to the resource configuration ratio of the plurality of task priorities, the most suitable available resource quantity of each task channel can be obtained, the resource configuration method is simple, and the configuration of the available resource quantity of the task channel and the processing of the task pipeline can be accelerated.
[0048] Please refer to Figure 4 , Figure 4 For some embodiments of the present disclosure, the flowchart of executing the task pipeline to be executed by the task channel can include the following steps: Step 401: determining the maximum concurrent resource quantity of executing the target task pipeline concurrently by the task channel based on the available resource quantity of the task channel and the preset concurrent resource threshold, wherein the target task pipeline is the task pipeline to be executed in the first execution order in the task pipeline to be executed.
[0049] This step is intended to be executed by the execution subject of the flashing method of the cloud phone (for example Figure 1The server 105) determines the maximum concurrent resource amount for concurrently executing the target task pipeline through the task channel based on the available resource amount of the task channel and the preset concurrent resource threshold, wherein the target task pipeline is a task pipeline that is arranged in the first execution order in the to-be-executed task pipeline. After the execution subject configures the available resource amount for the task channel corresponding to the task priority, the execution subject can determine the maximum concurrent resource amount for concurrently executing the task pipeline through the task channel according to the available resource amount of the task channel and the preset concurrent resource threshold. The preset concurrent resource threshold can be a preset concurrent resource threshold for each task channel in the server 105. According to the preset concurrent resource threshold and the available resource amount of the corresponding task channel, the maximum concurrent resource amount of a task pipeline in the corresponding task channel can be determined. For example, the available resource amount of a task channel is the resource amount for concurrently performing the flashing operation on 350 cloud phones, and the preset concurrent resource threshold is 50%. The maximum concurrent resource amount of the task channel is the resource amount for concurrently performing the flashing operation on 175 cloud phones. The preset concurrent resource thresholds of different task channels can be the same or different, and the embodiments of the present disclosure do not limit this.
[0050] Optionally, the preset concurrent resource threshold can be set by the operation and maintenance personnel through the terminal device, and the preset concurrent resource threshold can also be determined based on a preset algorithm. For example, the preset concurrent resource threshold can be determined according to the available resource amount of the task channel, the number of to-be-executed task pipelines, and the like. The embodiments of the present disclosure do not limit the acquisition manner of the preset concurrent resource threshold.
[0051] Optionally, the to-be-executed task pipeline corresponding to the task priority can include only one task pipeline or at least two task pipelines. The embodiments of the present disclosure do not limit the number of task pipelines in the to-be-executed task pipeline corresponding to the task priority. When the to-be-executed task pipeline corresponding to the task priority includes at least two task pipelines, the task pipelines can be sorted, and the execution order of the task pipelines can be determined according to the sorting of the task pipelines. For example, the task pipelines can be sorted according to the time of arranging the task pipelines, and the embodiments of the present disclosure do not limit this.
[0052] Step 402: Determine the remaining concurrent resource amount based on the available resource amount and the maximum concurrent resource amount of the task channel.
[0053] On the basis of step 401, the present step aims to determine the residual concurrent resource amount by the above-mentioned execution subject based on the available resource amount and the maximum concurrent resource amount of the task channel. After determining the maximum concurrent resource amount of the target task pipeline executed concurrently through the task channel, the execution subject can determine the residual concurrent resource amount according to the available resource amount and the maximum concurrent resource amount of the task channel. Alternatively, the execution subject can determine the residual concurrent resource amount according to the available resource amount of the task channel minus the maximum concurrent resource amount. For example, the available resource amount of a task channel is the resource amount of performing the flashing operation on 100 cloud phones concurrently, the preset concurrent resource threshold is 80%, the maximum concurrent resource amount of the task channel is the resource amount of performing the flashing operation on 80 cloud phones concurrently, and the residual concurrent resource amount is the resource amount of performing the flashing operation on 20 cloud phones concurrently.
[0054] Alternatively, the execution subject can also determine the number of task pipelines executed based on the maximum concurrent resource amount of the task channel according to the available resource amount and the maximum concurrent resource amount of the task channel, and then determine the residual concurrent resource amount according to the available resource amount, the maximum concurrent resource amount and the number of task pipelines executed based on the maximum concurrent resource amount of the task channel. For example, the available resource amount of a task channel is the resource amount of performing the flashing operation on 1000 cloud phones concurrently, the preset concurrent resource threshold is 30%, the maximum concurrent resource amount of the task channel is the resource amount of performing the flashing operation on 300 cloud phones concurrently, the task channel can allow 3 task pipelines to be executed in parallel at the maximum concurrent resource amount, and the residual concurrent resource amount is 100. The embodiments of the present disclosure do not limit the implementation manner of determining the residual concurrent resource amount according to the available resource amount and the maximum concurrent resource amount of the task channel.
[0055] Step 403: based on the maximum concurrent resource amount and the residual concurrent resource amount, respectively executing the target task pipeline and other task pipelines except the target task pipeline in the to-be-executed task pipelines.
[0056] On the basis of step 403, the present step aims to execute the target task pipeline and other task pipelines in the to-be-executed task pipelines except the target task pipeline by the above-mentioned execution subject based on the maximum concurrent resource quantity and the remaining concurrent resource quantity. After determining the remaining concurrent resource quantity, the execution subject can execute the target task pipeline and other task pipelines in the to-be-executed task pipelines except the target task pipeline based on the maximum concurrent resource quantity and the remaining concurrent resource quantity. When the task channel allows one task pipeline to be executed based on the maximum concurrent resource quantity, for example, when the preset concurrent resource threshold is 50%, the execution subject will execute the target task pipeline based on the maximum concurrent resource quantity, and execute the task pipeline in the to-be-executed task pipelines which is in the second execution order based on the remaining concurrent resource quantity. When the concurrent resource demand quantity of the target task pipeline is greater than the maximum concurrent resource quantity, the execution subject will execute the target task pipeline in batches in response to the concurrent resource demand quantity of the target task pipeline being greater than the maximum concurrent resource quantity. For example, the maximum concurrent resource quantity of the task channel is the resource quantity for concurrently executing the flashing operation on 300 cloud phones, and the concurrent resource demand quantity of the target task pipeline is the resource demand quantity for concurrently executing the flashing operation on 500 cloud phones. The execution subject divides the target task pipeline into two batches, the first batch is to concurrently execute the flashing operation on 300 cloud phones, and the second batch is to concurrently execute the flashing operation on 200 cloud phones.
[0057] By setting the preset concurrent resource threshold, the present embodiment can adjust the proportion of the available resource quantity occupied by the task pipelines executed in the task channel, can avoid the available resource quantity of one task channel being occupied by one task pipeline, can realize the parallel execution of multiple task pipelines in one task channel, and can meet the needs of different cloud phone flashing task scenarios.
[0058] For a better understanding, the present disclosure also gives a specific implementation scheme in combination with one specific application scenario, please refer to Figure 5 and Figure 6 as shown. Figure 5 FIG. 2 is a flowchart of one specific application scenario of the cloud phone flashing method of the present disclosure, Figure 6 FIG. 3 is a timing diagram of one specific application scenario of the cloud phone flashing method of the present disclosure.
[0059] As Figure 5As shown, according to high priority, medium priority and low priority, three task channels of service channel A, engineering channel B and idle time channel C are established respectively. Among them, the service channel A is used to execute the high priority task pipeline, such as cloud mobile phone flashing tasks of device on-shelf and the like. The engineering channel B is used to execute the medium priority task pipeline, such as cloud mobile phone flashing tasks of large batch device upgrade and the like. The idle time channel C is used to execute the low priority task pipeline, and can also be used to execute non-service tasks, such as monitoring scanning scripts, network isolation engineering and the like.
[0060] Step 501: Scanning data from the database to obtain the task pipeline to be executed. Step 502: Determining the task priority of the task pipeline, and determining the resource demand of the corresponding task channel according to the resource demand of the task pipeline. In this embodiment, the three task channels all have task pipelines to be executed, so the three task channels all have resource demands.
[0061] Step 503a: According to the total amount of available resources and the resource demand of the service channel, querying the pre-set resource proportion strategy to configure the available resource amount for the service channel. Step 503b: According to the total amount of available resources and the resource demand of the engineering channel, querying the pre-set resource proportion strategy to configure the available resource amount for the engineering channel. Step 503c: According to the total amount of available resources and the resource demand of the idle time channel, querying the pre-set resource proportion strategy to configure the available resource amount for the idle time channel.
[0062] Step 504a: According to the available resource amount of the service channel and the preset concurrent resource threshold, calculating the maximum concurrent resource amount of the service channel. Step 504b: According to the available resource amount of the engineering channel and the preset concurrent resource threshold, calculating the maximum concurrent resource amount of the engineering channel. Step 504c: According to the available resource amount of the idle time channel and the preset concurrent resource threshold, calculating the maximum concurrent resource amount of the idle time channel.
[0063] Step 505a: According to the available resource amount and the maximum concurrent resource amount of the service channel, calculating the remaining concurrent resource amount of the service channel. Step 505b: According to the available resource amount and the maximum concurrent resource amount of the engineering channel, calculating the remaining concurrent resource amount of the engineering channel. Step 505c: According to the available resource amount and the maximum concurrent resource amount of the idle time channel, calculating the remaining concurrent resource amount of the idle time channel.
[0064] Step 506a: Judging whether the maximum concurrent resource amount and the remaining concurrent resource amount of the current service channel are greater than zero. Step 506b: Judging whether the maximum concurrent resource amount and the remaining concurrent resource amount of the current engineering channel are greater than zero. Step 506c: Judging whether the maximum concurrent resource amount and the remaining concurrent resource amount of the current idle time channel are greater than zero.
[0065] Step 507a: According to the maximum concurrent resource quantity and the remaining concurrent resource quantity of the business channel, respectively execute the task pipeline to be executed of the business channel. Step 507b: According to the maximum concurrent resource quantity and the remaining concurrent resource quantity of the engineering channel, respectively execute the task pipeline to be executed of the engineering channel. Step 507c: According to the maximum concurrent resource quantity and the remaining concurrent resource quantity of the idle time channel, respectively execute the task pipeline to be executed of the idle time channel.
[0066] As shown in Figure 6 , the "creating task" includes the following steps: Step 1, a user creates a task pipeline of cloud mobile phone flashing through a user interface; Step 2, according to the task pipeline created in the user interface, a task channel of the task pipeline, i.e., a task priority, is selected through a flow controller, wherein the task channel includes a business channel, an engineering channel and an idle time channel; Step 3, the task pipeline created in Step 1 and the task channel selected in Step 2 are saved to a flow database; Step 4, the flow database returns a saving result of the task pipeline and the task channel to the flow controller; Step 5, the flow controller displays the saving result returned by the flow database through the user interface; Step 6, the user acquires the saving result of the flow database through the user interface.
[0067] The "orchestrating task" includes the following steps: Step 7, a flow driver sends a cloud mobile phone flashing instruction to a flow engine; Step 8, the flow engine scans the flow database according to a task description in the instruction; Step 9, the flow engine acquires a task pipeline to be executed and a corresponding task channel from the flow database; Step 10, the flow engine calculates a remaining resource quantity of each task channel according to an execution condition of each task channel, wherein the calculation includes: configuring an available resource quantity for each task channel according to a total available resource quantity and a resource demand quantity of each task channel; calculating a maximum concurrent resource quantity of each task channel according to the available resource quantity of each task channel and a preset concurrent resource threshold; calculating a remaining concurrent resource quantity of each task channel according to the available resource quantity of each task channel and the maximum concurrent resource quantity of each task channel; Step 11, the flow engine respectively executes the task pipeline to be executed according to the maximum concurrent resource quantity and the remaining concurrent resource quantity of each task channel, and sends an execution result of the task pipeline to a flow server, wherein the task pipeline to be executed is executed according to the maximum concurrent resource quantity, which indicates that the maximum concurrent resource quantity is occupied, so the maximum concurrent resource quantity is zero, and the task pipeline to be executed is executed according to the remaining concurrent resource quantity, which indicates that the remaining concurrent resource quantity is occupied, so the remaining concurrent resource quantity is zero; Step 12, the flow server returns the execution result of the task pipeline to the flow engine.
[0068] Further referring to Figure 7 , as an implementation of the method shown in Figure 2 , the embodiment of the present disclosure provides a cloud mobile phone flashing device. As shown in Figure 7As shown, the cloud phone flashing device 700 of the embodiment can include a priority determination module 701, a resource requirement determination module 702, a resource configuration module 703, and a task execution module 704.
[0069] The priority determination module 701 is configured to determine the task priority of the task pipeline for cloud phone flashing. The resource requirement determination module 702 is configured to determine the resource requirement amount of the task priority based on the task pipeline to be executed corresponding to the task priority. The resource configuration module 703 is configured to configure the available resource amount for the task channel corresponding to the task priority based on the total amount of available resources, the level of the task priority, and the resource requirement amount. The task execution module 704 is configured to execute the task pipeline to be executed through the task channel based on the available resource amount.
[0070] In the embodiment, the specific processing of the priority determination module 701, the resource requirement determination module 702, the resource configuration module 703, and the task execution module 704 in the cloud phone flashing device 700 and the technical effects brought by the same can be respectively referred to the related descriptions of steps 201-204 in the corresponding embodiments, which will not be repeated here. Figure 2 The related descriptions of steps 201-204 in the corresponding embodiments, which will not be repeated here.
[0071] In some optional implementations of the embodiment, the resource configuration module 703 includes: a proportion determination unit configured to determine the resource configuration proportions of the multiple task priorities based on the levels and the resource requirement amounts of the multiple task priorities; a resource configuration unit configured to respectively configure the available resource amounts for the task channels corresponding to the task priorities based on the resource configuration proportions and the total amount of available resources.
[0072] In some optional implementations of the embodiment, the proportion determination unit is further configured to determine the available resource amount ranges of the multiple task priorities; determine the resource configuration proportions of the multiple task priorities based on the levels and the resource requirement amounts of the multiple task priorities, and the available resource amount ranges.
[0073] In some optional implementations of the embodiment, the task execution module 704 includes: a maximum resource amount determination unit configured to determine the maximum concurrent resource amount for concurrently executing a target task pipeline through the task channel based on the available resource amount of the task channel and a preset concurrent resource threshold, wherein the target task pipeline is a task pipeline with the first execution order in the task pipelines to be executed; a residual resource amount determination unit configured to determine the residual concurrent resource amount based on the available resource amount of the task channel and the maximum concurrent resource amount; The task execution unit is configured to execute the target task pipeline and other task pipelines in the to-be-executed task pipelines except the target task pipeline based on the maximum concurrent resource quantity and the remaining concurrent resource quantity, respectively.
[0074] In some optional implementations of the present embodiment, the task execution unit is further configured to execute a task pipeline in the to-be-executed task pipelines which is in the second execution order based on the remaining concurrent resource quantity.
[0075] In some optional implementations of the present embodiment, the task execution unit is further configured to execute the target task pipeline in batches in response to the concurrent resource requirement quantity of the target task pipeline being greater than the maximum concurrent resource quantity.
[0076] In some optional implementations of the present embodiment, the priority determination module 701 is further configured to determine the task priority of the task pipeline for cloud phone flashing based on information of the task pipeline, wherein the information of the task pipeline comprises at least one of a task type, a task purpose, and a delivery time.
[0077] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to implement the cloud phone flashing method described in any of the above embodiments when executed.
[0078] According to the embodiments of the present disclosure, the present disclosure further provides a readable storage medium storing computer instructions for enabling a computer to implement the cloud phone flashing method described in any of the above embodiments when executed.
[0079] According to the embodiments of the present disclosure, the present disclosure further provides a computer program product, which, when executed by a processor, can implement the cloud phone flashing method described in any of the above embodiments.
[0080] Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0081] like Figure 8 As shown, device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. RAM 803 may also store various programs and data required for the operation of device 800. Computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to bus 804.
[0082] Various components in device 800 are connected to I / O interface 805, including an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a magnetic disk, optical disk, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0083] The computing unit 801 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above, such as the rooting method of the cloud phone. For example, in some embodiments, the rooting method of the cloud phone can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the rooting method of the cloud phone described above can be performed. Alternatively, in other embodiments, the computing unit 801 can be configured to perform the rooting method of the cloud phone by any other suitable means, such as by means of firmware.
[0084] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0085] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowcharts and / or block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.
[0086] In the context of this disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0087] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0088] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0089] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of large management difficulty and weak business scalability in traditional physical host and virtual private server (VPS, Virtual Private Server) services.
[0090] It should be understood that the various forms of flow shown above can be used to reorder, add or delete steps. For example, the steps described in the present disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions of the present disclosure can be achieved, which are not limited herein.
[0091] The above detailed description does not constitute a limitation on the protection scope of the present disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements and improvements within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.
Claims
1. A flashing method for a cloud phone, comprising: Determine the task priority of the task pipeline for flashing cloud phones; Determining the resource requirement of the task priority based on the pipeline of tasks to be executed corresponding to the task priority; Based on the total available resources, the level of the task priority and the resource demand, allocating available resources for the task channel corresponding to the task priority; Based on the available resource amount, the pipeline of tasks to be executed is executed through the task channel.
2. The method according to claim 1, wherein The configuring of available resources for the task channel corresponding to the task priority based on the total available resources, the level of the task priority and the resource demand includes: Determine the resource allocation ratio of multiple task priorities based on the priority levels and resource requirements of multiple tasks; Based on the resource configuration ratio and the total amount of available resources, the available resource amount is respectively configured for the task channel corresponding to each task priority.
3. The method according to claim 2, wherein: Determining the resource allocation ratios of the multiple task priorities based on the levels of the multiple task priorities and the resource requirements includes: Determine the range of available resources to prioritize multiple tasks; Based on the priority levels and resource requirements of the multiple tasks and the range of available resources, the resource allocation ratios of the multiple task priorities are determined.
4. The method according to claim 1, wherein The executing the to-be-executed task pipeline through the task channel based on the available resource amount includes: Based on the available resources of the task channel and a preset concurrent resource threshold, determining the maximum concurrent resource amount for concurrently executing a target task pipeline through the task channel, wherein the target task pipeline is the task pipeline that ranks first in the execution order among the task pipelines to be executed; Determining the remaining concurrent resources based on the available resources of the task channel and the maximum concurrent resources; Based on the maximum concurrent resource amount and the remaining concurrent resource amount, the target task pipeline and other task pipelines in the task pipelines to be executed except the target task pipeline are executed respectively.
5. The method according to claim 4, wherein executing other task pipelines in the to-be-executed task pipelines except the target task pipeline based on the remaining concurrent resource amount comprises: Based on the remaining concurrent resource amount, the task pipeline that ranks second in execution order among the task pipelines to be executed is executed.
6. The method according to claim 4, wherein: The executing the target task pipeline based on the maximum concurrent resource amount includes: In response to the concurrent resource requirement of the target task pipeline being greater than the maximum concurrent resource amount, the target task pipeline is executed in batches.
7. The method according to any one of claims 1 to 6, wherein Determining the task priority of the task pipeline for flashing the cloud phone includes: Based on information of a task pipeline for flashing a cloud phone, a task priority of the task pipeline is determined, wherein the information of the task pipeline includes at least one of a task type, a task purpose, and a delivery time.
8. A flashing device for a cloud phone, comprising: a priority determination module configured to determine the task priority of the task pipeline for flashing the cloud phone; a resource requirement determination module configured to determine the resource requirement of the task priority based on the pipeline of tasks to be executed corresponding to the task priority; A resource configuration module is configured to configure available resources for the task channel corresponding to the task priority based on the total available resources, the level of the task priority and the resource demand; The task execution module is configured to execute the to-be-executed task pipeline through the task channel based on the available resource amount.
9. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the flashing method of the cloud phone according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the cloud phone flashing method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the flashing method of a cloud phone according to any one of claims 1 to 7.