Business execution method, device, storage medium and electronic device
By determining the chip's resource surplus in the edge intelligent server and allocating target services, the problem of low utilization of some functional modules of the chip is solved, and the overall utilization rate is improved.
Patent Information
- Application Number
- CN202111605242.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-24
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-12-24
AI Technical Summary
When performing tasks, the utilization rate of some functional modules of the chip in the edge intelligent server is low, and the existing technology has not yet proposed an effective solution.
By determining the resource remaining amount of the first functional module of each chip in the multiple cascade chips, the second functional module is the module with the largest resource occupancy, and determines the target chip from the multiple cascade chips based on the resource remaining amount, and controls the target chip. The target chip performs target services.
The overall utilization rate of the chip when performing tasks is improved, and the problem of low utilization rate of some functional modules of the chip is solved.
Smart Images

Figure CN114281540B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a method, device, storage medium and electronic device for executing a service. Background Art
[0002] The edge intelligent server adopts a master-slave architecture in hardware. Multiple chips, such as computing power cards, can be dynamically expanded on the PCIE bus. Each computing power card can realize different types of intelligent services, such as compression transcoding, face recognition, perimeter protection, data structuring and other intelligent functions.
[0003] In the related art, there is a problem that the utilization rate of some functional modules of the chip is low when executing tasks.
[0004] With respect to the above-mentioned problems existing in the related technologies, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method, device, storage medium and electronic device for executing a service, so as to at least solve the problem of low utilization rate of some functional modules of a chip when executing a task existing in the related art.
[0006] According to one embodiment of the present invention, a method for executing a service is provided, comprising: determining a first resource remaining amount of a first functional module of each chip included in a plurality of cascaded chips, wherein the first functional module is a module included in each of the chips except a second functional module, the second functional module is a module with the largest resource occupancy when each of the chips executes a specific service corresponding to the chip, the first resource remaining amount is the resource remaining amount of the first functional module when the chip executes the corresponding specific service and the load of the second functional module is the largest; determining a target chip for executing a target service from the plurality of the cascaded chips based on the first resource remaining amount; and controlling the target chip to execute the target service.
[0007] According to another embodiment of the present invention, a service execution device is provided, comprising: a first determination module, used to determine a first resource remaining amount of a first functional module of each chip included in a plurality of cascaded chips, wherein the first functional module is a module included in each of the chips except a second functional module, the second functional module is a module with the largest resource occupancy when each of the chips executes a specific service corresponding to the chip, and the first resource remaining amount is the resource remaining amount of the first functional module when the chip executes the corresponding specific service and the load of the second functional module is the largest; a second determination module, used to determine a target chip for executing a target service from the plurality of the cascaded chips based on the first resource remaining amount; and an execution module, used to control the target chip to execute the target service.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.
[0009] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0010] Through the present invention, the first resource remaining amount of the first functional module of each chip included in a plurality of cascaded chips is determined, wherein the first functional module is a module included in each chip except the second functional module, the second functional module is a module in each chip with the largest resource occupancy rate when executing a specific service corresponding to the chip, and the first resource remaining amount chip is the resource remaining amount of the first functional module when the corresponding specific service is executed and the load of the second functional module is the largest. According to the first resource remaining amount, a target chip for executing a target task is determined from a plurality of cascaded chips, and the target chip is controlled to execute the target task. Since the first resource remaining amount of the first functional module can be determined, the target service is allocated to the target chip according to the first resource remaining amount, so that the target chip can also execute the target service when executing its corresponding specific service. Therefore, the problem of low utilization of some functional modules of the chip when executing a task in the related art can be solved, and the overall utilization of the chip when executing a task is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 It is a hardware structure block diagram of a mobile terminal for executing a service in an embodiment of the present invention;
[0012] Figure 2is a flowchart of a method for executing a service according to an embodiment of the present invention;
[0013] Figure 3 is a schematic diagram of a server structure of a multi-chip cascade architecture according to an exemplary embodiment of the present invention;
[0014] Figure 4 is a schematic block diagram of a chip functional module according to an exemplary embodiment of the present invention;
[0015] Figure 5 Schematic diagram of the remaining resources of each functional module of a chip according to an exemplary embodiment of the present invention Figure 1 ;
[0016] Figure 6 Schematic diagram of the remaining resources of each functional module of a chip according to an exemplary embodiment of the present invention Figure 2 ;
[0017] Figure 7 is a schematic diagram of the structure of a service execution device according to a specific implementation mode of the present invention;
[0018] Figure 8 The following is a flow chart of a method for executing a service according to a specific embodiment of the present invention. Figure 1 ;
[0019] Fig. 9 The following is a flow chart of a method for executing a service according to a specific embodiment of the present invention. Figure 2 ;
[0020] Fig.10 It is a structural block diagram of a device for executing a service according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0023] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal for executing a service in an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0024] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the execution methods of the services in the embodiments of the present invention. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, to implement the above-mentioned methods. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0025] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0026] In this embodiment, a method for executing a service is provided. Figure 2 is a flow chart of a method for executing a service according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0027] Step S202, determining a first resource remaining amount of a first functional module of each chip included in a plurality of cascaded chips, wherein the first functional module is a module included in each of the chips except a second functional module, the second functional module is a module with the largest resource occupancy when each of the chips executes a specific service corresponding to the chip, and the first resource remaining amount is a resource remaining amount of the first functional module when the chip executes the corresponding specific service and the load of the second functional module is the largest;
[0028] Step S204, determining a target chip for executing a target service from the plurality of cascaded chips based on the remaining amount of resources;
[0029] Step S206: controlling the target chip to execute the target service.
[0030] In the above embodiment, each chip in the multiple cascade chips can be an integrated circuit or a processor. The multiple cascade chips can be chips in a server, for example, chips in a server that adopts a multi-chip cascade architecture, such as an edge smart server in a security scenario. The edge smart server adopts a master-slave hardware architecture. The master CPU is mainly used for data storage, device management, and local decoding and display output. The slave CPU is mainly used for intelligent analysis. Among them, the server structure diagram of the multi-chip cascade architecture can be found in the attached Figure 3 ,like Figure 3 As shown in FIG. 1 , smart card 1, smart card 2, ..., smart card N are multiple cascaded chips. A smart card, i.e., a chip, may include multiple functional modules, such as decoding, encoding, intelligent processing unit, DSP, etc. A schematic diagram of the chip functional module block diagram can be found in the attached Figure 4 ,like Figure 4 As shown, the functions of the chip may include a VDEC video decoding module, a VENC video encoding module, a VPSS video processing module, an IVE video analysis processing module, a CPU, an NPU depth engine module, a DSP graphics subsystem, and a JPG decoding module.
[0031] For edge intelligent servers, the loads of different modules of smart computing cards vary greatly according to different customer needs and usage scenarios. For example, when customers need large-capacity centralized storage, they also want to improve storage efficiency and reduce the cost of hard disk storage. In this scenario, the load of the media-related functional modules of the smart computing card is high. The remaining resources of each functional module of the chip are shown in the figure. Figure 1 Please refer to the attached Figure 5 Another example is that customers need to perform real-time face recognition and video structured analysis on the camera code stream connected to the server. In this scenario, smart computing cards use a large number of computing modules such as NPU. The remaining resources of each functional module of the chip are shown in the figure. Figure 2 Please refer to the attached Figure 6 .Depend on Figure 5 , Figure 6 It can be seen that when a chip executes a certain type of business, it will cause a large load on one or several functional modules in the chip, and the utilization of other functional modules will be low, thereby causing low utilization of the chip.
[0032] In the above embodiment, in order to solve the problem of low chip utilization, when the load of executing a certain type of business on each chip is the largest, the first resource remaining amount of the first functional module can be counted, and the target chip to execute the target business can be determined from multiple cascaded chips according to the first resource remaining amount. The first functional module may include one or more modules. The multiple cascaded chips may be intelligent computing cards, computing power cards, etc.
[0033] In the above embodiment, a class of specific services can be assigned to each chip, and different chips can perform the same service or different services. Among them, the specific services may include compression transcoding, video analysis (such as face recognition, video structured analysis), etc. In different chips, the second functional modules may be the same or different. For example, when the specific service performed by the chip is video analysis, the second functional module may be NPU, and when the specific service performed by the chip is compression transcoding, the second functional module may be a media-related module. Accordingly, since different chips can perform different specific services, the first functional modules may be different in different chips. For example, when the specific service of the chip is compression transcoding, the first functional module may be NPU, DSP, CPU, VGS, etc., and when the specific service of the chip is video analysis, the first functional module may be VDEC, VENC, VPSS, IVE, CPU, VGS, etc.
[0034] Optionally, the execution subject of the above steps may be a background processor or an intelligent server, but is not limited thereto.
[0035] Through the present invention, the first resource remaining amount of the first functional module of each chip included in a plurality of cascaded chips is determined, wherein the first functional module is a module included in each chip except the second functional module, the second functional module is a module in each chip with the largest resource occupancy rate when executing the business corresponding to the chip, and the first resource remaining amount is the resource remaining amount of the first functional module when the chip is executing the corresponding specific business and the load of the second functional module is the largest. According to the first resource remaining amount, a target chip for executing a target task is determined from a plurality of cascaded chips, and the target chip is controlled to execute the target task. Since the first resource remaining amount of the first functional module can be determined, the target business is allocated to the target chip according to the first resource remaining amount, so that the target chip can also execute the target business when executing its corresponding specific business. Therefore, the problem of low utilization of some functional modules of the chip when executing tasks in the related art can be solved, and the overall utilization of the chip when executing tasks is improved.
[0036] In an exemplary embodiment, determining a target chip for executing a target service from a plurality of the cascaded chips based on the first resource remaining amount includes: determining a target functional module required for executing the target service; determining a target resource occupancy amount required for the target functional module to execute the target service; and determining the target chip based on the target functional module, the target resource occupancy amount, and the first resource remaining amount. In this embodiment, when determining the target chip, the target functional module required for executing the target service and the target resource occupancy rate required for the target functional module to execute the target service can be determined, and the target chip is determined based on the target functional module, the target resource occupancy rate, and the first resource remaining amount.
[0037] In an exemplary embodiment, determining the target functional module required for executing the target business includes: determining each sub-business included in the target business; determining a third functional module for executing each sub-business; and determining the third functional module as the target functional module. In this embodiment, when determining the target functional module, each sub-business included in the target business may be determined, a third functional module for executing each sub-business may be determined, and the third functional module may be determined as the target functional module. Wherein, the sub-business included in the target business may be multiple or one, and the target functional module may be one or multiple.
[0038] In the above embodiment, the target business can be decomposed to obtain sub-businesses. For example, the analysis task TASK is decomposed into two parts: pre-processing and post-processing, where pre-processing is equivalent to a sub-business and post-processing is equivalent to a sub-business (pre-processing consumes decoding and other resources and a part of public resources, and the public resources consumed by pre-processing and decoding resources must be on the same card; post-processing consumes computing resources and a part of public resources, and the public resources consumed by post-processing and computing resources must be on the same card). Determine the target chip from multiple cascade chips based on the functional modules required for each sub-business and the required target resource occupancy rate.
[0039] In an exemplary embodiment, determining the target chip based on the target functional module, the target resource occupancy, and the first resource remaining amount includes: determining a first chip included in a plurality of the cascaded chips, wherein the first chip is a chip including the target functional module; determining the target resource remaining amount of the target functional module included in the first chip from the first resource remaining amount; and determining a second chip included in the first chip as the target chip, wherein the target resource remaining amount of the second chip is greater than or equal to the target resource occupancy amount. In this embodiment, the first chip including the target functional module in a plurality of the cascaded chips is determined, the target resource remaining amount of the target functional module included in the first chip is determined from the first resource remaining amount, and the second chip whose target resource remaining amount is greater than or equal to the target resource occupancy amount is determined as the target chip.
[0040] In an exemplary embodiment, when the target service includes multiple sub-services, controlling the target chip to execute the target service includes: determining multiple third chips included in the target chip, wherein each of the third chips is used to execute one of the multiple sub-services in the target service; and controlling the multiple third chips to execute the multiple sub-services in sequence according to the execution order of the multiple sub-services. In this embodiment, when the target service includes multiple sub-services, each chip included in the target chip for executing each sub-service can be determined to obtain multiple third chips, and the multiple third chips can be controlled to execute the multiple sub-services in sequence according to the execution order of the multiple sub-services. For example, when the target service includes a pre-processing sub-service and a post-processing sub-service, a chip for executing the pre-processing sub-service and a chip for executing the post-processing sub-service can be determined to obtain two third chips, and the two chips can be controlled to execute the sub-services in the execution order of the pre-processing sub-service and the post-processing sub-service.
[0041] In an exemplary embodiment, determining the first resource remaining amount of the first functional module of each chip included in a plurality of cascaded chips includes: detecting the detection resource remaining amount of each of the first functional modules; and determining the product of the detection resource remaining amount and a predetermined coefficient as the first resource remaining amount. In this embodiment, when determining the first resource remaining amount, the detection resource remaining amount of each first functional module may be detected, and the product of the detection resource remaining amount and a predetermined coefficient may be determined as the first resource remaining amount. For example, each cascaded chip includes three functional modules A, B, and C, where A represents a codec functional module, B represents a common functional module, and C represents a computing power module. The resource remaining amount may be expressed as Where S represents the total amount of resource surplus accumulated by n intelligent computing card A function modules; ω resource conversion depreciation rate, i.e., the predetermined coefficient; A i , B i , C i Indicates the resource margin of the functional module corresponding to the i-th chip. A ={A1*ω,A2*ω,A3*ω,…,A n *ω};L B ={B1*ω,B2*ω,B3*ω,…,B n *ω};L C ={C1*ω,C2*ω,C3*ω,…,C n *ω}, where L represents the linked list management of the resource margin of each smart card function module, which is convenient for traversal during resource matching. ω is the resource conversion depreciation rate.
[0042] In an exemplary embodiment, determining the first resource remaining amount of the first functional module of each chip included in a plurality of cascade chips includes: determining the total resource amount of the second functional module of each chip included in the plurality of cascade chips; configuring a corresponding service corresponding to the type of each chip for each chip included in the plurality of cascade chips, wherein the amount of resources required when executing the corresponding service is equal to the total resource amount; controlling each chip to execute the corresponding service so that the load of the second functional module included in each chip reaches the maximum; determining the first resource remaining amount of the first functional module of each chip included in the plurality of cascade chips. In this embodiment, when determining the first resource remaining amount, the total resource amount of the second functional module of each chip included in the plurality of cascade chips can be determined, the corresponding service corresponding to the type of each chip is configured for each chip included in the plurality of cascade chips, each chip is controlled to execute the corresponding service so that the load of the second functional module included in each chip reaches the maximum, and when the load of the second functional module is the maximum, the first resource remaining amount of the first functional module of each chip is determined. That is, when the service pressure of each chip is the maximum, the occupation of the resource capacity of each functional module is counted, and the margin of each functional module is output statistically.
[0043] The following describes the execution method of the service in conjunction with the specific implementation method:
[0044] Figure 7 is a schematic diagram of the structure of a service execution device according to a specific implementation mode of the present invention, such as Figure 7 As shown, the device includes a resource abstraction module, a resource statistics module, a monitoring module and a resource management module.
[0045] (1) The resource abstraction module can physically abstract the available functional modules of the intelligent computing card (corresponding to the first functional module mentioned above) and quantify the capabilities of each functional module;
[0046] (2) The resource statistics module may be responsible for counting the resource capacity usage of each functional module when the business pressure of the intelligent computing card (i.e., each chip) is the highest, and statistically outputting the margin of each functional module (corresponding to the first resource surplus amount mentioned above);
[0047] (3) The monitoring module is used to dynamically monitor the usage of each smart computing card resource.
[0048] (4) The resource management module is used to manage the resource usage and resource surplus of all intelligent computing cards in the server. It can be combined with the abstraction of single-card resources to calculate the remaining capacity of each functional module of each card. The summary can be used to realize additional intelligent analysis, further improving the utilization rate of intelligent computing cards.
[0049] Figure 8 The following is a flow chart of a method for executing a service according to a specific embodiment of the present invention. Figure 1 ,like Figure 8 As shown, the process includes:
[0050] Step S802: User configuration entry.
[0051] Step S804, configuring the type of the intelligent computing card through the user interface; configuring the corresponding maximum business pressure for different intelligent computing cards according to different types, so that the intelligent computing cards can work at full pressure.
[0052] Step S806: Send the user configuration to different smart computing cards through communication, and the smart computing cards enable corresponding functions according to the configuration.
[0053] Step S808, abstract the hardware of the smart card. Taking the 3559A smart card as an example, the video decoding module capability C_vdec = 22 1080P@30; the video encoding module capability C_venc = 16 1080P@30; the video processing module capability C_vpss = 16 1080P@30; the CPU processing capability is abstracted into the number of components C_cpu = 100; the NPU processing capability is abstracted into the number of components C_npu = 100; the JPG decoding module capability is abstracted into C_jpg = 8 1080P@30, etc.
[0054] Step S810: When the intelligent computing power is running at full pressure, the remaining resources of each module of the card are counted, and the safety threshold loss (corresponding to the above-mentioned predetermined coefficient, represented by the letter ω) is added according to the measured experience value to calculate the remaining resources of each module. (Note: If the intelligent computing card type is configured as a transcoding card, the transcoding is enabled, and the consumption of resources of each module is fixed, which can be obtained through preliminary testing. Similarly, when the full pressure is enabled, the remaining resources of each module can be calculated. If the intelligent computing card type is configured as an intelligent analysis card, the same applies.)
[0055] Step S812: After the intelligent computing power runs stably at full capacity, obtain the resource margin of each intelligent computing card.
[0056] Step S814, the resource management module can perform additional intelligent analysis on the resource margins summarized through systematic management and calculation, thereby further improving the utilization rate of the smart computing card.
[0057] Fig. 9 The following is a flow chart of a method for executing a service according to a specific embodiment of the present invention. Figure 2 ,like Fig. 9 As shown, the process includes:
[0058] Step S902: The user issues a video stream or image stream analysis task.
[0059] Step S904, the analysis task TASK is decomposed into two parts: pre-processing and post-processing (pre-processing consumes decoding resources and some public resources, and the public resources consumed by pre-processing and decoding resources must be on the same card; post-processing consumes computing resources and some public resources, and the public resources consumed by post-processing and computing resources must be on the same card). The resource management module traverses L according to the pre- and post-processing of the analysis task. A , L B , L C .
[0060] Step S906: Analyze whether the resources required for the task are met. If not, proceed to step S912; if so, calculate which card will complete the pre- and post-processing parts of the task respectively. And refresh L A , L B , LC Resource status.
[0061] Step S908: The pre-processing part of the analysis task is sent to the intelligent computing card X for processing, and YUV is obtained after the processing is completed.
[0062] Step S910: The post-processing part of the analysis task is sent to the intelligent computing card Y for processing, and the analysis result is obtained after the processing is completed. Then, the process proceeds to step S912.
[0063] Step S912, the task is completed.
[0064] In the above-mentioned embodiment, the resource margin of each chip is systematically managed, and this part of the resources can realize additional intelligent analysis, etc., further improving the utilization rate of the intelligent computing card. In order to further utilize the surplus resources of the intelligent calculation, the task to be analyzed is divided into two parts: pre-processing and post-processing. Through PCIE communication, the pre-processing and post-processing tasks are assigned to two cards to complete. Under the maximum business pressure, the real-time function can still be guaranteed, and the security and stability are comparable to the original product.
[0065] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0066] In this embodiment, a service execution device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0067] Fig.10 is a structural block diagram of a device for executing a service according to an embodiment of the present invention, such as Fig.10 As shown, the device comprises:
[0068] A first determining module 1002 is used to determine a first resource remaining amount of a first functional module of each chip included in a plurality of cascaded chips, wherein the first functional module is a module included in each chip except a second functional module, the second functional module is a module with the largest resource occupancy when each chip executes a specific service corresponding to the chip, and the first resource remaining amount is a resource remaining amount of the first functional module when the chip executes the corresponding specific service and the load of the second functional module is the largest;
[0069] A second determining module 1004 is used to determine a target chip for executing a target service from the plurality of cascaded chips based on the first remaining amount of resources;
[0070] The execution module 1006 is used to control the target chip to execute the target service.
[0071] Among them, the first determination module 1002 corresponds to the resource abstraction module, resource statistics module, and monitoring module, and the second determination module 1004 and execution module 1006 correspond to the resource management module;
[0072] In an exemplary embodiment, the second determination module 1004 can determine the target chip for executing the target business from the multiple cascade chips based on the first resource remaining amount in the following manner: determine the target functional module required for executing the target business; determine the target resource occupancy required for the target functional module to execute the target business; determine the target chip based on the target functional module, the target resource occupancy and the first resource remaining amount.
[0073] In an exemplary embodiment, the second determination module 1004 can determine the target functional module required for executing the target business in the following manner: determine each sub-business included in the target business; determine a third functional module for executing each of the sub-businesses; and determine the third functional module as the target functional module.
[0074] In an exemplary embodiment, the second determination module 1004 can determine the target chip based on the target functional module, the target resource occupancy and the first resource remaining amount in the following manner: determine the first chip included in the multiple cascade chips, wherein the first chip is a chip including the target functional module; determine the target resource remaining amount of the target functional module included in the first chip from the first resource remaining amount; determine the second chip included in the first chip as the target chip, wherein the target resource remaining amount of the second chip is greater than or equal to the target resource occupancy amount.
[0075] In an exemplary embodiment, the execution module 1006 can control the target chip to execute the target business when the target business includes multiple sub-businesses in the following manner: determine multiple third chips included in the target chip, wherein each of the third chips is used to execute one of the multiple sub-businesses in the target business; control the multiple third chips to execute the multiple sub-businesses in sequence according to the execution order of the multiple sub-businesses.
[0076] In an exemplary embodiment, the first determination module 1002 can determine the first resource remaining amount of the first functional module of each chip included in a plurality of cascaded chips in the following manner: detecting the detection resource remaining amount of each of the first functional modules; and determining the product of the detection resource remaining amount and a predetermined coefficient as the first resource remaining amount.
[0077] In an exemplary embodiment, the first determination module 1002 can determine the first resource remaining amount of the first functional module of each chip included in a plurality of cascaded chips in the following manner: determine the total resource amount of the second functional module of each chip included in the plurality of cascaded chips; configure a corresponding service corresponding to the type of each chip for each chip included in the plurality of cascaded chips, wherein the amount of resources required to execute the corresponding service is equal to the total resource amount; control each chip to execute the corresponding service so that the load of the second functional module included in each chip is maximized; determine the first resource remaining amount of the first functional module of each chip included in the plurality of cascaded chips.
[0078] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0079] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0080] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0081] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0082] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0083] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0084] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for executing a service, characterized in that: include: Determine a first resource remaining amount of a first functional module of each chip included in a plurality of cascaded chips, wherein the first functional module is a module included in each of the chips except a second functional module, the second functional module is a module with the largest resource occupancy when each of the chips executes a specific service corresponding to the chip, and the first resource remaining amount is a resource remaining amount of the first functional module when the chip executes the corresponding specific service and the load of the second functional module is the largest; Determine a target chip for executing a target service from the plurality of cascaded chips based on the first remaining amount of resources; Controlling the target chip to execute the target service; Determining a target chip for executing a target service from a plurality of the cascaded chips based on the first remaining amount of resources comprises: determining a target functional module required for executing the target service; determining a target resource occupancy required for the target functional module to execute the target service; determining the target chip based on the target functional module, the target resource occupancy and the first remaining amount of resources; Determining the target chip based on the target functional module, the target resource occupancy and the first resource remaining amount includes: determining a first chip included in the plurality of cascaded chips, wherein the first chip is a chip including the target functional module; determining the target resource remaining amount of the target functional module included in the first chip from the first resource remaining amount; and determining a second chip included in the first chip as the target chip, wherein the target resource remaining amount of the second chip is greater than or equal to the target resource occupancy amount.
2. The method according to claim 1, characterized in that: Determining the target function modules required for executing the target business includes: Determine each sub-business included in the target business; Determining a third functional module for executing each of the sub-services; The third functional module is determined as the target functional module.
3. The method according to claim 1, characterized in that: In a case where the target service includes a plurality of sub-services, controlling the target chip to execute the target service includes: Determine a plurality of third chips included in the target chip, wherein each of the third chips is used to execute one sub-service among a plurality of sub-services in the target service; The plurality of third chips are controlled to execute the plurality of sub-services in sequence according to the execution order of the plurality of sub-services.
4. The method according to claim 1, characterized in that Determining a first remaining amount of resources of a first functional module of each chip included in the plurality of cascaded chips includes: Detecting a remaining amount of detection resources of each of the first functional modules; The product of the detected resource remaining amount and a predetermined coefficient is determined as the first resource remaining amount.
5. The method according to claim 1, characterized in that Determining a first remaining amount of resources of a first functional module of each chip included in the plurality of cascaded chips includes: Determining the total amount of resources of the second functional module of each chip included in the plurality of cascaded chips; Configuring a corresponding service corresponding to the type of each chip for each chip included in the plurality of cascaded chips, wherein the amount of resources required to execute the corresponding service is equal to the total amount of resources; Controlling each of the chips to execute the corresponding service so that the load of the second functional module included in each of the chips reaches the maximum; The first remaining amount of resources of the first functional module of each chip included in the plurality of cascade chips is determined.
6. A service execution device, characterized in that: include: A first determination module is used to determine a first resource remaining amount of a first functional module of each chip included in a plurality of cascaded chips, wherein the first functional module is a module included in each chip except a second functional module, the second functional module is a module with the largest resource occupancy when each chip executes a specific service corresponding to the chip, and the first resource remaining amount is a resource remaining amount of the first functional module when the chip executes the corresponding specific service and the load of the second functional module is the largest; A second determining module, configured to determine a target chip for executing a target service from the plurality of cascaded chips based on the first remaining amount of resources; An execution module, used for controlling the target chip to execute the target service; The second determination module determines the target chip for executing the target service from the plurality of cascaded chips based on the first resource remaining amount by: determining the target function module required for executing the target service; determining the target resource occupancy required for the target function module to execute the target service; determining the target chip based on the target function module, the target resource occupancy and the first resource remaining amount; The second determination module determines the target chip based on the target functional module, the target resource occupancy and the first resource remaining amount in the following manner: determining a first chip included in the plurality of cascaded chips, wherein the first chip is a chip including the target functional module; determining the target resource remaining amount of the target functional module included in the first chip from the first resource remaining amount; determining a second chip included in the first chip as the target chip, wherein the target resource remaining amount of the second chip is greater than or equal to the target resource occupancy amount.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 5 when executed by a processor.
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Mobile terminal
CN101925203A
Method and system for managing switch chips
CN102035668A