WO2020134551A1 - Terminal task processing method and device, storage medium and electronic device - Google Patents

Terminal task processing method and device, storage medium and electronic device Download PDF

Info

Publication number
WO2020134551A1
WO2020134551A1 PCT/CN2019/114747 CN2019114747W WO2020134551A1 WO 2020134551 A1 WO2020134551 A1 WO 2020134551A1 CN 2019114747 W CN2019114747 W CN 2019114747W WO 2020134551 A1 WO2020134551 A1 WO 2020134551A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
task
external
resources
local
Prior art date
Application number
PCT/CN2019/114747
Other languages
French (fr)
Chinese (zh)
Inventor
陈建江
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020134551A1 publication Critical patent/WO2020134551A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals

Abstract

A terminal task processing method and device, a storage medium and an electronic device. The method comprises: determining whether the usage of local resources in a terminal meets a condition for using external resources (S202); if it is determined that the usage of the local resources in the terminal meets the condition for using external resources, sending a task to be processed in the terminal to an external device capable of processing said task, in order to process said task by using the external resources on the external device (S204); and receiving the processing result of said task based on the external resources returned by the external device (S206).

Description

终端任务的处理方法、装置、存储介质及电子装置Terminal task processing method, device, storage medium and electronic device
相关申请的交叉引用Cross-reference of related applications
本申请基于申请号为201811643721.9、申请日为2018年12月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with an application number of 201811643721.9 and an application date of December 29, 2018, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated by reference.
技术领域Technical field
本发明涉及但不限于通信领域,尤其涉及一种终端任务的处理方法、装置、存储介质及电子装置。The present invention relates to but not limited to the communication field, and in particular, to a terminal task processing method, device, storage medium, and electronic device.
背景技术Background technique
随着技术的发展,终端上能够运行的应用种类越来越多,而随着用户需求的提升,对应用的展示效果、应用的处理速度、应用的响应速度的要求也越来越高。所有这些因素,都对终端的运算能力(包括中央处理单元的能力以及内存能力)提出了更高的要求。With the development of technology, there are more and more types of applications that can be run on the terminal, and with the increase of user needs, the requirements for the application display effect, application processing speed, and application response speed are also increasing. All these factors put forward higher requirements on the computing power of the terminal (including the capacity of the central processing unit and the memory capacity).
除此之外,随着目前多媒体文件的清晰度越来越高,多媒体文件的尺寸也越来越大,对终端的存储空间的要求越来越高,但是,因为终端本身的尺寸限制,其存储空间的扩展往往受限。In addition, as the definition of multimedia files is getting higher and higher, the size of multimedia files is getting bigger and bigger, and the requirements for the storage space of the terminal are getting higher and higher. However, because of the size limitations of the terminal itself, its Storage space expansion is often limited.
综上,面对目前对终端上的运算、存储能力的要求越来越高,而这些能力在终端上的提高往往在硬件上受限的问题,目前暂无有效的解决方法。In summary, in the face of the increasing requirements for computing and storage capabilities on the terminal, and the improvement of these capabilities on the terminal is often limited in hardware, there is currently no effective solution.
发明内容Summary of the invention
本发明实施例提供了一种终端任务的处理方法、装置、存储介质及电子装置,以至少解决相关技术中对终端上的运算、存储能力的要求越来越高,而这些能力在终端上的提高往往在硬件上受限的问题。The embodiments of the present invention provide a terminal task processing method, device, storage medium, and electronic device, to at least solve the related art requirements for computing and storage capabilities on the terminal are getting higher and higher, and these capabilities are on the terminal Improve the problem that is often limited in hardware.
根据本发明的一个实施例,提供了一种终端任务的处理方法,包括:确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;在确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及接收所述外部设备返回的所述外部资源对所述任务的处理结果。According to an embodiment of the present invention, a terminal task processing method is provided, including: determining whether the usage of local resources in a terminal satisfies a condition that requires the use of external resources, wherein the condition that requires the use of external resources includes at least the following One: the usage rate of the local resource in the terminal is higher than the threshold, the local resource in the terminal is used by a predetermined application; when it is determined that the usage of the local resource in the terminal satisfies the condition of using the external resource Next, send the task to be processed in the terminal to an external device capable of processing the task, so as to use external resources on the external device to process the task to be processed; The processing result of the task by the external resource.
根据本发明的另一个实施例,提供了一种终端任务的处理装置,包括:确定模块,设置为确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;传输模块,设置为在所述确定模块确定所述终端中本地 资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及接收所述外部设备返回的所述外部资源对所述任务的处理结果。According to another embodiment of the present invention, there is provided a terminal task processing apparatus, including: a determination module configured to determine whether the use of local resources in a terminal satisfies a condition requiring the use of an external resource, wherein the The condition of the resource includes at least one of the following: the utilization rate of the local resource in the terminal is higher than a threshold, the local resource in the terminal is used by a predetermined application; the transmission module is set to determine that the terminal is local in the determination module When the resource usage condition satisfies the condition that the external resource needs to be used, the task to be processed in the terminal is sent to an external device capable of processing the task, so as to use the external resource on the external device to process the task Describing the task to be processed; and receiving the processing result of the external resource on the task returned by the external device.
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, there is also provided a storage medium in which a computer program is stored, wherein the computer program is configured to execute the steps in any one of the above method embodiments during runtime.
根据本发明的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory and a processor, the memory stores a computer program, the processor is configured to run the computer program to perform any of the above The steps in the method embodiment.
附图说明BRIEF DESCRIPTION
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are used to provide a further understanding of the present invention and form a part of the present application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an undue limitation on the present invention. In the drawings:
图1是本发明实施例的一种终端的硬件结构框图;1 is a block diagram of a hardware structure of a terminal according to an embodiment of the present invention;
图2是根据本发明实施例的终端任务的处理方法的示意图;2 is a schematic diagram of a terminal task processing method according to an embodiment of the present invention;
图3是根据本发明实施例的终端任务的处理装置的结构框图;3 is a structural block diagram of a terminal task processing apparatus according to an embodiment of the present invention;
图4是本发明实施例中应用场景方框图;4 is a block diagram of an application scenario in an embodiment of the present invention;
图5是本发明实施例的终端中的相关处理系统的方框图;5 is a block diagram of a related processing system in a terminal according to an embodiment of the present invention;
图6是根据本发明实施例的终端任务的处理方法的详细方法流程图。6 is a detailed method flowchart of a terminal task processing method according to an embodiment of the present invention.
具体实施方式detailed description
随着技术的发展,目前的应用以及多媒体业务对终端上的运算、存储能力的要求越来越高。以在终端上玩三维(3 Dimension,简称为3D)游戏为例,3D游戏场景有非常好的逼真度,需要终端具备较强数据运算能力,否则游戏就会出现卡顿。除此之外,终端上一些具有虚拟现实(Virtual Reality,简称为VR)的显示效果的应用、以及操作复杂并对实时性要求高的应用,都对终端的运算和存储能力提出了很高的要求。With the development of technology, current applications and multimedia services have increasingly higher requirements on computing and storage capabilities on terminals. Take playing a 3D (3D for short) game on the terminal as an example. The 3D game scene has very good fidelity, and the terminal needs to have strong data computing capabilities, otherwise the game will be stuck. In addition, some applications with virtual reality (Virtual Reality, abbreviated as VR) display effects on the terminal, as well as applications with complex operations and high real-time requirements, have put forward very high computing and storage capabilities for the terminal Claim.
目前为保证终端处理应用任务的流畅性,不得不在增加终端的本地的运算能力,采取中央处理单元(Central Processing Unit,简称为CPU)多核并行方案提升终端运算能力。但随之带来的结果是终端全速运行、发热严重,采取在终端的本地改善运算能力的方式,提升运算能力效果有限。此外,通过增加中央处理单元的数量和单个中央处理单元的处理能力来解决运算需求,会导致终端成本的上升。另外,由于终端尺寸及散热能力的限制,采取在终端本地改善运算能力的方式往往也会受到限制,且提升运算能力的效果有限。除了终端的运算能力之外,终端上的存储能力的提高也存在相类似的问题。At present, in order to ensure the fluency of terminal processing application tasks, the local computing power of the terminal has to be increased, and a central processing unit (Central Processing Unit, abbreviated as CPU) multi-core parallel solution is adopted to improve the terminal computing power. However, the resulting result is that the terminal is running at full speed and the heat is severe. Taking the method of improving the computing power locally at the terminal, the effect of improving the computing power is limited. In addition, solving the computing needs by increasing the number of central processing units and the processing capacity of a single central processing unit will lead to an increase in terminal costs. In addition, due to the limitations of the terminal size and heat dissipation capacity, the way to improve the computing power locally on the terminal is often limited, and the effect of improving the computing power is limited. In addition to the computing power of the terminal, there are similar problems in improving the storage capacity of the terminal.
移动通信技术的发展为重新定义终端带来新的机遇。运用高速移动通信诸如第五代(5th Generation,简称为5G)通信的低时延、高速数据传送特性,以及终端与终端直接通信(可不通过基站,两部或多部终端直接相连),可以将终端中的任务通过移动通信网络进行协调分配,在进行大数据处理时获取终端之外其他运算单元、存储单元的支持。这 样,用户之前使用终端容易产生瓶颈的运算速度,存储容量问题,通过移动通信高速网络资源支持,得到很好解决。终端本身不必刻意追求CPU多核来提高运算速度,多核CPU运行的发热及耗电问题也能得到解决。除此之外,终端上增加存储空间受限、成本增加的问题也能够得到很好的解决。The development of mobile communication technology brings new opportunities for redefining terminals. The use of high-speed mobile communications such as 5th Generation (5G for short) communication with low latency, high-speed data transmission characteristics, and terminal-to-terminal direct communication (without the base station, two or more terminals are directly connected), you can The tasks in the terminal are coordinated and distributed through the mobile communication network, and the support of other computing units and storage units other than the terminal is obtained when performing big data processing. In this way, the problem that the user's previous use of the terminal is prone to bottlenecks in computing speed and storage capacity is well resolved through the support of high-speed mobile communication network resources. The terminal itself does not have to deliberately pursue CPU multi-core to improve the calculation speed, and the heat and power consumption problems of multi-core CPU operation can also be solved. In addition, the problems of limited storage space and increased costs on the terminal can also be solved well.
本发明实施例提出了运用移动通信技术快速、低延迟发送数据能力,在终端本地资源使用率达到某一设定参数、或者终端当前运行了预定应用(一般是会对终端的运算、存储负荷较大的应用)时,自动获取外部网络侧或其他终端侧资源(本申请实施例中称为外部资源,可以包括计算能力、存储能力等),从而极大地扩展了终端的性能。The embodiment of the present invention proposes the use of mobile communication technology to transmit data quickly and with low latency, when the terminal's local resource usage reaches a certain set parameter, or the terminal is currently running a predetermined application (generally, the terminal's computing and storage load is relatively high Large applications), automatically obtain external network side or other terminal side resources (referred to as external resources in the embodiments of this application, which may include computing power, storage capacity, etc.), thereby greatly expanding the performance of the terminal.
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other if there is no conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms “first” and “second” in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence.
本申请实施例一所提供的方法实施例可以在终端中执行。图1是本发明实施例的一种终端的硬件结构框图。如图1所示,终端10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述终端还可以包括用于通信功能的传输设备106、输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述终端的结构造成限定。例如,终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in Embodiment 1 of the present application may be executed in a terminal. FIG. 1 is a block diagram of a hardware structure of a terminal according to an embodiment of the present invention. As shown in FIG. 1, the terminal 10 may include one or more (only one is shown in FIG. 1) 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, etc.) And a memory 104 for storing data, optionally, the above terminal may further include a transmission device 106 and an input and output device 108 for communication functions. A person of ordinary skill in the art may understand that the structure shown in FIG. 1 is merely an illustration, which does not limit the structure of the foregoing terminal. For example, the terminal 10 may further include more or fewer components than those shown in FIG. 1, or have a different configuration from that shown in FIG.
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的终端任务的处理方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,以及将终端上的处理任务发送到网络,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the terminal task processing method in the embodiment of the present invention, and the processor 102 runs the computer program stored in the memory 104, thereby Implementing various functional applications and data processing, and sending the processing tasks on the terminal to the network, that is, implementing the above method. 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 memories remotely provided with respect to the processor 102, and these remote memories may be connected to the terminal 10 through a network. Examples of the aforementioned network include, but are not limited to, the Internet, intranet, local area network, mobile communication network, and combinations thereof.
传输装置106用于经由网络接收或者发送数据。上述的网络具体实例可包括终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通信。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通信。The transmission device 106 is used to receive or transmit data via the network. The specific example of the network described above may include a wireless network provided by the communication provider of the terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC for short), which can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (Radio Frequency, RF for short) module, which is used to communicate with the Internet in a wireless manner.
在本实施例中提供了一种运行于上述终端的任务的处理方法。图2是根据本发明实施例的终端任务的处理方法的示意图,如图2所示,该终端任务的处理方法包括如下步骤:In this embodiment, a method for processing a task running on the terminal is provided. FIG. 2 is a schematic diagram of a terminal task processing method according to an embodiment of the present invention. As shown in FIG. 2, the terminal task processing method includes the following steps:
步骤S202,确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;In step S202, it is determined whether the usage of local resources in the terminal satisfies the conditions for using external resources, wherein the conditions for using external resources include at least one of the following: the usage rate of local resources in the terminal is higher than the threshold. The local resources in the terminal are used by scheduled applications;
步骤S204,在确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及Step S204, when it is determined that the usage of local resources in the terminal satisfies the condition of using external resources, the task to be processed in the terminal is sent to an external device capable of processing the task, so as to utilize the External resources on the external device to process the pending task; and
步骤S206,接收所述外部设备返回的所述外部资源对所述任务的处理结果。Step S206, receiving the processing result of the external resource on the task returned by the external device.
其中,所述外部设备包括除所述终端之外的其他设备,例如网络侧设备、或所述终端周边的终端设备。Wherein, the external device includes other devices than the terminal, such as a network-side device, or terminal devices around the terminal.
可选地,上述步骤的执行主体可以为终端,但不限于此。Optionally, the execution body of the above steps may be a terminal, but it is not limited thereto.
在以上的步骤中,所提及的本地资源、外部资源的类型可以包括但不限于以下至少之一:运算资源(广义来理解可以包含处理器资源和/或内存资源)、存储资源。举例来说,当目前终端中本地处理器/内存的使用率高于阈值,或者预定应用正在使用本地处理器/内存,则可以将需要使用本地处理器/内存的任务发送给外部处理器/内存进行处理。再举例来说,当目前终端中本地存储器的使用率(表现为本地存储器的占用率)高于阈值,或者预定应用正在使用本地存储器(例如进行大量本地存储器读取操作),则可以将需要使用本地存储器的任务(例如高清电影的下载)发送给外部存储器进行处理,也就是下载到外部存储器中。In the above steps, the types of local resources and external resources mentioned may include but are not limited to at least one of the following: computing resources (broadly understood to include processor resources and/or memory resources), storage resources. For example, when the current local processor/memory usage rate in the terminal is higher than the threshold, or the scheduled application is using the local processor/memory, you can send the task that requires the local processor/memory to the external processor/memory Be processed. As another example, when the current local memory usage rate in the terminal (expressed as the local memory occupancy rate) is higher than the threshold, or the predetermined application is using the local memory (for example, a large number of local memory read operations), you can use it The tasks of the local storage (such as downloading high-definition movies) are sent to the external storage for processing, that is, downloaded to the external storage.
通过以上方案,可以自动判定终端内的本地资源使用情况并确定需要触发外部资源协助任务处理,并自动将待处理的任务发送给外部资源进行处理,从而解决相关技术中对终端上的运算、存储能力的要求越来越高,而这些能力在终端上的提高往往在硬件上受限的问题。该方案能够自动实现外部资源的调用,而外部设备可配置的资源可大大高于终端本地资源,这样终端的计算能力、存储能力得到极大地扩展,通过使用外部资源,极大地减轻了终端运行需要大量运算能力应用时对本地运算能力的要求。Through the above solution, you can automatically determine the use of local resources in the terminal and determine the need to trigger external resources to assist in task processing, and automatically send the pending tasks to external resources for processing, thereby solving the calculation and storage on the terminal in related technologies The requirements for capabilities are getting higher and higher, and the improvement of these capabilities on the terminal is often a problem of limited hardware. This solution can automatically call external resources, and the configurable resources of external devices can be much higher than the local resources of the terminal. In this way, the computing power and storage capacity of the terminal are greatly expanded. The use of external resources greatly reduces the need for terminal operation. Requirements for local computing power when a large amount of computing power is applied.
为了获得更快的任务发送、处理速率,作为一个示例性实施例,可以根据任务相关参数对所述任务进行分拆,并将分拆后的所述任务发送给能够处理所述任务的所述外部设备;之后接收所述外部设备返回的所述外部资源对分拆后的所述任务的处理结果,并将分拆后的所述任务的处理结果合成为所述任务的完整处理结果。其中,所述任务相关参数包括以下至少之一:所述任务的类型、所述任务中各个步骤的运算量、所述任务中各个步骤的执行顺序、所述任务中各个步骤之间的关联关系。In order to obtain a faster task sending and processing rate, as an exemplary embodiment, the task may be split according to task-related parameters, and the split task may be sent to the task capable of processing the task An external device; then receiving the processing result of the split task of the external resource returned by the external device, and synthesizing the processing result of the split task into the complete processing result of the task. The task-related parameters include at least one of the following: the type of the task, the calculation amount of each step in the task, the execution order of each step in the task, and the correlation between the steps in the task .
作为一个示例性实施例,将待处理的任务发送给具体哪个或哪几个外部资源,这一决策可以依据多种因素而做出。例如,步骤S204中将所述终端中待处理的任务发送给能够处理所述任务的所述外部设备的过程可以包括:根据预定因素确定能够处理所述任务的所述外部设备,其中,所述预定因素包括以下至少之一:所述终端与所述外部设备之间的网 络质量、所述外部设备中与所述任务相对应的外部资源的使用率、所述外部设备中与所述任务相对应的外部资源的容量或处理能力、所述任务的类型、用户偏好配置;将所述任务发送给确定的能够处理所述任务的所述外部设备。以上预定因素的选择及使用,可以根据用户的设置、终端的出厂设置、智能策略设计等方式来确定,主旨在于根据外部环境、用户偏好、外部资源状态等因素来选择合适的外部资源,提高任务的处理效率。As an exemplary embodiment, the specific task or resources are sent to the task to be processed. This decision can be made based on various factors. For example, the process of sending the task to be processed in the terminal to the external device capable of processing the task in step S204 may include: determining the external device capable of processing the task according to a predetermined factor, wherein the The predetermined factor includes at least one of the following: the network quality between the terminal and the external device, the usage rate of the external resource corresponding to the task in the external device, and the phase of the task in the external device The capacity or processing capacity of the corresponding external resource, the type of the task, and user preference configuration; send the task to the determined external device capable of processing the task. The selection and use of the above predetermined factors can be determined according to user settings, terminal factory settings, intelligent strategy design, etc. The main purpose is to select appropriate external resources based on external environment, user preferences, external resource status and other factors to improve the task Processing efficiency.
在步骤S202中,判断终端中本地资源的使用情况是否满足预定条件的过程,旨在判断所述终端中本地资源的使用率是否高于阈值、所述终端中本地资源是否被预定应用所使用中的至少一个条件,所基于的资源的使用率信息可以是一段时间内的平均使用率信息,从而实现较为平滑的外部资源调用。本领域技术人员应当理解,在实际应用中,可以通过在终端中配置特定的算法,来实现以上预定条件的判断。以下给出不同情况下,终端可以采用的优选算法,但是本领域技术人员应当理解,凡是能够实现以上预定条件的判断的算法都可以应用,而不必限于此处所提出的示例性算法,该示例性算法不应构成不当的范围限定。In step S202, a process of determining whether the usage of local resources in the terminal meets a predetermined condition is to determine whether the usage rate of the local resources in the terminal is higher than a threshold, and whether the local resources in the terminal are being used by a predetermined application At least one condition of the resource usage information based on may be average usage information over a period of time, so as to achieve a smoother external resource call. Those skilled in the art should understand that, in practical applications, a specific algorithm may be configured in the terminal to achieve the judgment of the above predetermined conditions. The preferred algorithms that can be adopted by the terminal in different situations are given below, but those skilled in the art should understand that any algorithm that can achieve the judgment of the above predetermined conditions can be applied, and is not necessarily limited to the exemplary algorithm proposed here. The algorithm should not constitute an inappropriate scope limit.
(1)在所述需要使用外部资源的条件包括所述终端中本地资源的使用率高于所述阈值的情况下,步骤S202确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件可以包括:根据所述终端中正在运行的应用对所述本地资源的使用率以及所述终端中正在运行的应用使用本地资源时对应的权重,确定所述本地资源的第一使用情况指示值T1;当所述本地资源的所述第一使用情况指示值T1高于第一预设阈值t1时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。(1) In the case where the condition requiring the use of external resources includes the utilization rate of local resources in the terminal being higher than the threshold, step S202 determines whether the use of local resources in the terminal satisfies the need to use external resources The resource condition may include: determining the first usage of the local resource according to the usage rate of the local resource by the application running in the terminal and the corresponding weight when the application running in the terminal uses the local resource Indication value T1; when the first usage indication value T1 of the local resource is higher than a first preset threshold t1, it is determined that the usage of the local resource of the terminal meets the condition of using an external resource.
作为一个示例性的实施例,可以通过以下方式来实现步骤S202:As an exemplary embodiment, step S202 may be implemented in the following manner:
对于所述终端中预定类型的本地资源,确定所述预定类型的本地资源的第一使用情况指示值T1=(A1*X1+a1)+(A2*X2+a2)...+(An*Xn+an),其中,A1-An分别为所述终端中正在运行的应用1-n对所述预定类型的本地资源的使用率且其值落入[0,1],X1-Xn分别为所述应用1-n使用所述预定类型的本地资源时对应的权重且其值落入[0,1],a1-an分别为所述应用1-n对应的使用率配置系数且其值落入[0,1],n为正整数;For the predetermined type of local resources in the terminal, determine the first usage indication value of the predetermined type of local resources T1=(A1*X1+a1)+(A2*X2+a2)...+(An* Xn+an), where A1-An are the usage rates of the predetermined type of local resources by the applications 1-n running in the terminal and their values fall into [0,1], X1-Xn are respectively When the applications 1-n use the predetermined type of local resources, the corresponding weights and their values fall into [0,1], and a1-an are the usage configuration coefficients corresponding to the applications 1-n and their values fall Enter [0,1], n is a positive integer;
当所述预定类型的本地资源的所述第一使用情况指示值T1高于第一预设阈值t1时,确定终端的所述预定类型的本地资源的使用情况满足所述需要使用外部资源的条件。When the first usage indication value T1 of the predetermined type of local resource is higher than a first preset threshold t1, it is determined that the usage of the predetermined type of local resource of the terminal meets the condition of using an external resource .
(2)在所述需要使用外部资源的条件包括所述终端中本地资源被预定应用所使用的情况下,步骤S202确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件可以包括:根据所述预定应用对应的使能配置系数以及指示所述预定应用是否正在运行的使能系数,确定所述本地资源的第二使用情况指示值T2;当所述本地资源的所述第二使用情况指示值T2高于第二预设阈值t2时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。(2) In the case where the condition requiring the use of external resources includes the local resources in the terminal being used by a predetermined application, step S202 determines whether the use of local resources in the terminal meets the condition requiring the use of external resources It may include: determining a second usage indication value T2 of the local resource according to an enabling configuration coefficient corresponding to the predetermined application and an enabling coefficient indicating whether the predetermined application is running; when the local resource When the second usage indication value T2 is higher than the second preset threshold t2, it is determined that the usage of the local resource of the terminal satisfies the condition that the external resource needs to be used.
作为一个示例性的实施例,可以通过以下方式来实现步骤S202:As an exemplary embodiment, step S202 may be implemented in the following manner:
对于所述终端中预定类型的本地资源,确定所述预定类型的本地资源的第二使用情况指示值T2=(B1*Y1+B2*Y2...+Bm*Ym),其中,B1-Bm分别为所述预定应用1-m对应的使能配置系数且其值落入[0,1],Y1-Ym分别为所述预定应用1-m是否正在运行的使能系数且其值为0或1,所述使能系数为1表示正在运行,所述使能系数为0表示未在运行,m为正整数;For the predetermined type of local resources in the terminal, determine the second usage indication value of the predetermined type of local resources T2=(B1*Y1+B2*Y2...+Bm*Ym), where B1-Bm Respectively, the enabling configuration coefficients corresponding to the predetermined application 1-m and their values fall into [0,1], and Y1-Ym are respectively the enabling coefficients of whether the predetermined application 1-m is running and its value is 0 Or 1, the enable coefficient of 1 means running, the enable coefficient of 0 means not running, and m is a positive integer;
当所述预定类型的本地资源的所述第二使用情况指示值T2高于第二预设阈值t2时,确定终端的所述预定类型的本地资源的使用情况满足所述需要使用外部资源的条件。When the second usage indication value T2 of the predetermined type of local resource is higher than a second preset threshold t2, it is determined that the usage condition of the predetermined type of local resource of the terminal meets the condition of using an external resource .
(3)在所述需要使用外部资源的条件包括所述终端中本地资源的使用率高于所述阈值和所述终端中本地资源被预定应用所使用的情况下,步骤S202确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件可以包括:根据所述终端中正在运行的全部应用对所述本地资源的使用率、所述终端中正在运行的全部应用使用本地资源时对应的权重、所述预定应用对应的使能配置系数以及指示所述预定应用是否正在运行的使能系数,确定所述本地资源的第三使用情况指示值T3;当所述本地资源的所述第三使用情况指示值T3高于第三预设阈值t3时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。(3) In the case where the condition requiring the use of external resources includes the utilization rate of local resources in the terminal being higher than the threshold and the local resources in the terminal are used by a predetermined application, step S202 determines that the terminal Whether the usage of local resources satisfies the condition of using external resources may include: according to the usage rate of all the applications running in the terminal to the local resources, when all the applications running in the terminal use the local resources A corresponding weight, an enabling configuration coefficient corresponding to the predetermined application, and an enabling coefficient indicating whether the predetermined application is running, determining a third usage indication value T3 of the local resource; when the local resource When the third usage indication value T3 is higher than the third preset threshold t3, it is determined that the usage of the local resources of the terminal satisfies the condition of using external resources.
作为一个示例性的实施例,可以通过以下方式来实现步骤S202:As an exemplary embodiment, step S202 may be implemented in the following manner:
对于所述终端中预定类型的本地资源,确定所述预定类型的本地资源的第三使用情况指示值T3=(A1*X1+a1)+(A2*X2+a2)...+(An*Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym),其中,A1-An分别为所述终端中正在运行的应用1-n对所述预定类型的本地资源的使用率且其值落入[0,1],X1-Xn分别为所述应用1-n使用所述预定类型的本地资源时对应的权重且其值落入[0,1],a1-an分别为所述应用1-n对应的使用率配置系数且其值落入[0,1],B1-Bm分别为所述预定应用1-m对应的使能配置系数且其值落入[0,1],Y1-Ym分别为所述预定应用1-m是否正在运行的使能系数且其值为0或1,所述使能系数为1表示正在运行,所述使能系数为0表示未在运行,n为正整数,m为正整数;For the predetermined type of local resources in the terminal, determine the third usage indication value of the predetermined type of local resources T3=(A1*X1+a1)+(A2*X2+a2)...+(An* Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym), where A1-An is the use of the predetermined type of local resources by the applications 1-n running in the terminal respectively Rate and its value falls into [0,1], X1-Xn are the corresponding weights when the application 1-n uses the predetermined type of local resource and its value falls into [0,1], a1-an respectively The utilization rate configuration coefficient corresponding to the application 1-n and its value fall into [0,1], B1-Bm are the enabling configuration coefficient corresponding to the predetermined application 1-m and their value fall into [0, 1], Y1-Ym are the enable coefficients of whether the predetermined application 1-m is running and its value is 0 or 1, the enable coefficient is 1 means running, and the enable coefficient is 0 means not In operation, n is a positive integer and m is a positive integer;
当所述预定类型的本地资源的所述第三使用情况指示值T3高于第三预设阈值t3时,确定终端的所述预定类型的本地资源的使用情况满足所述需要使用外部资源的条件。When the third usage indication value T3 of the predetermined type of local resource is higher than a third preset threshold t3, it is determined that the usage condition of the predetermined type of local resource of the terminal meets the condition that the external resource needs to be used .
在以上的情况(2)和(3)中,所述预定应用1-m对应的使能配置系数B1-Bm的值可在相应应用安装时由用户手动配置,也可由终端按某种方式对相应应用进行判断后自动配置。作为一个示例性实施方式,所述预定应用1-m对应的使能配置系数B1-Bm的值可以根据所述预定应用1-m在所述终端中运行时对所述终端中所述预定类型的本地资源的使用率而确定。例如,运行某应用1后,CPU使用率大多维持在70%,就可对该应用1的B1值配置为1,若将t2或t3也配置为1,则相当于后续只要运行该应用1就会直接触发外部资源。In the above cases (2) and (3), the value of the enabling configuration coefficient B1-Bm corresponding to the predetermined application 1-m may be manually configured by the user when the corresponding application is installed, or may be controlled by the terminal in some way After the corresponding application is judged, it is automatically configured. As an exemplary embodiment, the value of the enablement configuration coefficient B1-Bm corresponding to the predetermined application 1-m may be determined according to the predetermined type in the terminal when the predetermined application 1-m is running in the terminal The utilization rate of local resources is determined. For example, after running an application 1, the CPU usage rate is mostly maintained at 70%, and the B1 value of the application 1 can be configured as 1, if t2 or t3 is also configured as 1, it is equivalent to running the application 1 in the future. Will directly trigger external resources.
在以上的情况(1)和(3)中,所述应用1-n对所述预定类型的本地资源的使用率为 所述应用1-n在预定时长内对所述预定类型的本地资源的平均使用率。这样做的原因是,因终端本地资源占用测量是瞬时值,为避免过于频繁启动终端外部资源,需要对本地资源占用率进行平滑处理。例如,表达式的A1-An数值,使用的是在一预定时长(例如,200ms)内终端本地资源占用率平均值A1’-An’,则:In the above cases (1) and (3), the usage rate of the application 1-n to the predetermined type of local resource is the application 1-n to the predetermined type of local resource within a predetermined period of time Average usage. The reason for this is that, because the terminal's local resource occupancy measurement is an instantaneous value, in order to avoid starting the terminal's external resources too frequently, it is necessary to smooth the local resource occupancy rate. For example, the A1-An value of the expression uses the average local resource occupancy rate of the terminal A1’-An’ within a predetermined duration (for example, 200 ms), then:
第一使用情况指示值T1=(A1’*X1+a1)+(A2’*X2+a2)...+(An’*Xn+an)First usage indication value T1=(A1’*X1+a1)+(A2’*X2+a2)...+(An’*Xn+an)
第三使用情况指示值T3=(A1’*X1+a1)+(A2’*X2+a2)...+(An’*Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym)。The third usage indication value T3=(A1'*X1+a1)+(A2'*X2+a2)...+(An'*Xn+an)+(B1*Y1+B2*Y2...+ Bm*Ym).
以上的阈值t1、t2和t3均用来判断目前终端中本地资源的使用率是否超出了预定程度,或者本地资源是否正被预定应用所占用,阈值的确定可以由用户指定,也可以由系统预先配置,还可以根据用户提出的使用流畅度要求来确定,本领域技术人员应当理解,以上阈值可以根据需求或具体使用情况来确定,随着阈值的提高,终端自动发起调用外部资源的门槛也会提升,而随着阈值的降低,终端自动发起调用外部资源的门槛也会下降。The above thresholds t1, t2, and t3 are used to determine whether the current utilization rate of local resources in the terminal exceeds a predetermined level, or whether the local resources are being occupied by a predetermined application. The determination of the threshold can be specified by the user or can be pre-determined by the system The configuration can also be determined according to the user's fluency requirements. Those skilled in the art should understand that the above threshold can be determined according to needs or specific usage. As the threshold increases, the threshold for the terminal to automatically initiate calls to external resources will also As the threshold decreases, the threshold for the terminal to automatically initiate calls to external resources will also decrease.
在本发明实施例中,所述终端中待处理的任务可以包括以下至少之一:In the embodiment of the present invention, the task to be processed in the terminal may include at least one of the following:
输入数据包,携带所述待处理任务的输入信息,如触屏输入,语音输入,陀螺仪传感器输入,光线强度输入等各类形式的输入信息;Input data packet, carrying input information of the task to be processed, such as touch screen input, voice input, gyro sensor input, light intensity input and other forms of input information;
应用程序数据包,携带所述待处理任务所对应的应用程序编码段;An application data packet, carrying the application code segment corresponding to the task to be processed;
运算过程暂存数据包,携带所述待处理任务所基于的运算过程的暂存结果。The operation process temporarily stores the data packet, and carries the temporary storage result of the operation process on which the task to be processed is based.
在本发明实施例中,所述外部设备返回的所述外部资源对所述任务的处理结果可以包括:运算结果数据包,携带对所述任务进行处理后获得的输出信息,如屏幕显示,声音,震动等等各类输出形式的输出信息;In the embodiment of the present invention, the processing result of the external resource on the task returned by the external device may include: an operation result data packet, carrying output information obtained after processing the task, such as screen display, sound , Vibration and other output information in various output forms;
接收所述外部设备返回的所述外部资源对所述任务的处理结果之后,该方法还可以包括:所述终端根据所述运算结果数据包中携带的所述输出信息,通过所述终端与所述输出信息对应的输出接口进行结果输出。After receiving the processing result of the external resource returned by the external device for the task, the method may further include: the terminal according to the output information carried in the operation result data packet, through the terminal and all The output interface corresponding to the output information outputs the result.
启用外部资源需要进行无线传输,这也会消耗部分资源。例如,触发启用外部资源,会消耗CPU 20%的使用率的话,每次触发至少需要将CPU消耗大于20%的一个或多个应用转移到外部资源运算,以达到利用外部资源后,CPU的资源消耗是下降的。因此,作为一个优选的实施例,可以设置发送给所述外部设备的所述待处理的任务,在所述终端中对所述本地资源的平均使用率高于用于将所述待处理的任务发送给所述外部设备的无线通信过程对所述本地资源的平均使用率。Enabling external resources requires wireless transmission, which also consumes some resources. For example, if the activation of external resources consumes 20% of the CPU usage rate, each trigger needs to transfer at least one or more applications with CPU consumption greater than 20% to the calculation of external resources to achieve the utilization of external resources. Consumption is declining. Therefore, as a preferred embodiment, the task to be processed sent to the external device may be set, and the average utilization rate of the local resource in the terminal is higher than that for the task to be processed The average usage rate of the local resources by the wireless communication process sent to the external device.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是终端,计算机, 服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware, but in many cases the former is Better implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or part that contributes to the existing technology, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The CD-ROM includes several instructions to enable a terminal (which may be a terminal, computer, server, or network device, etc.) to execute the methods described in the embodiments of the present invention.
在本实施例中还提供了一种终端任务的处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a terminal task processing device is also provided. The device is used to implement the foregoing embodiments and preferred implementation modes, and descriptions that have already been described will not be repeated. As used below, the term "module" may implement a combination of software and/or hardware that performs predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, implementation of hardware or a combination of software and hardware is also possible and conceived.
图3是根据本发明实施例的终端任务的处理装置的结构框图,如图3所示,所述装置可以包括:FIG. 3 is a structural block diagram of a terminal task processing apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus may include:
确定模块30,设置为确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;The determining module 30 is set to determine whether the usage of local resources in the terminal meets the conditions for using external resources, wherein the conditions for using external resources include at least one of the following: the utilization rate of local resources in the terminal is higher than Threshold, local resources in the terminal are used by predetermined applications;
传输模块32,耦合至确定模块30,设置为在所述确定模块30确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及The transmission module 32, coupled to the determination module 30, is configured to, when the determination module 30 determines that the usage of local resources in the terminal satisfies the condition of using external resources, the task to be processed in the terminal Sent to an external device capable of processing the task to use external resources on the external device to process the task to be processed; and
接收模块34,耦合至传输模块32,接收所述外部设备返回的所述外部资源对所述任务的处理结果。The receiving module 34 is coupled to the transmitting module 32, and receives the processing result of the task by the external resource returned by the external device.
可选地,上述终端任务的处理装置可以位于终端中或由终端实现,但不限于此。Optionally, the foregoing terminal task processing device may be located in the terminal or implemented by the terminal, but is not limited thereto.
在以上的实施例中,所提及的本地资源、外部资源的类型可以包括但不限于以下至少之一:运算资源(广义来理解可以包含处理器资源和/或内存资源)、存储资源。举例来说,当目前终端中本地处理器/内存的使用率高于阈值,或者预定应用正在使用本地处理器/内存,则可以将需要使用本地处理器/内存的任务发送给外部处理器/内存进行处理。再举例来说,当目前终端中本地存储器的使用率(表现为本地存储器的占用率)高于阈值,或者预定应用正在使用本地存储器(例如进行大量本地存储器读取操作),则可以将需要使用本地存储器的任务(例如高清电影的下载)发送给外部存储器进行处理,也就是下载到外部存储器中。In the above embodiments, the mentioned types of local resources and external resources may include but are not limited to at least one of the following: computing resources (broadly understood to include processor resources and/or memory resources), storage resources. For example, when the current local processor/memory usage rate in the terminal is higher than the threshold, or the scheduled application is using the local processor/memory, you can send the task that requires the local processor/memory to the external processor/memory Be processed. As another example, when the current local memory usage rate in the terminal (expressed as the local memory occupancy rate) is higher than the threshold, or the predetermined application is using the local memory (for example, a large number of local memory read operations), you can use it The tasks of the local storage (such as downloading high-definition movies) are sent to the external storage for processing, that is, downloaded to the external storage.
通过以上方案,可以自动判定终端内的本地资源使用情况并确定需要触发外部资源协助任务处理,并自动将待处理的任务发送给外部资源进行处理,从而解决相关技术中对终端上的运算、存储能力的要求越来越高,而这些能力在终端上的提高往往在硬件上受限的问题。该方案能够自动实现外部资源的调用,而外部设备可配置的资源可大大高于终端本地资源,这样终端的计算能力、存储能力得到极大地扩展,通过使用外部资源,极大地减轻了终端运行需要大量运算能力应用时对本地运算能力的要求。Through the above solution, you can automatically determine the use of local resources in the terminal and determine the need to trigger external resources to assist in task processing, and automatically send the pending tasks to external resources for processing, thereby solving the calculation and storage on the terminal in related technologies The requirements for capabilities are getting higher and higher, and the improvement of these capabilities on the terminal is often a problem of limited hardware. This solution can automatically call external resources, and the configurable resources of external devices can be much higher than the local resources of the terminal. In this way, the computing power and storage capacity of the terminal are greatly expanded. The use of external resources greatly reduces the need for terminal operation. Requirements for local computing power when a large amount of computing power is applied.
为了获得更快的任务发送、处理速率,作为一个示例性实施例,所述装置还可以包括:分拆模块36以及合并模块38。In order to obtain a faster task sending and processing rate, as an exemplary embodiment, the apparatus may further include: a split module 36 and a merge module 38.
所述分拆模块36耦合至确定模块30和传输模块32,设置为根据任务相关参数对所述 任务进行分拆,其中,所述任务相关参数包括以下至少之一:所述任务的类型、所述任务中各个步骤的运算量、所述任务中各个步骤的执行顺序、所述任务中各个步骤之间的关联关系;The splitting module 36 is coupled to the determining module 30 and the transmission module 32, and is configured to split the task according to a task-related parameter, wherein the task-related parameter includes at least one of the following: the type of the task, The calculation amount of each step in the task, the execution order of each step in the task, and the association relationship between each step in the task;
所述传输模块32可以设置为将分拆后的所述任务发送给能够处理所述任务的所述外部设备;The transmission module 32 may be configured to send the split task to the external device capable of processing the task;
所述传输模块32可以设置为接收所述外部设备返回的所述外部资源对分拆后的所述任务的处理结果;The transmission module 32 may be configured to receive the processing result of the split task by the external resource returned by the external device;
所述合并模块38耦合至传输模块32,设置为将分拆后的所述任务的处理结果合成为所述任务的完整处理结果。The merging module 38 is coupled to the transmission module 32, and is configured to synthesize the processing result of the split task into a complete processing result of the task.
对任务进行拆分以及将拆分后的任务发送给多个外部资源的过程,可以根据任务的类型、任务中各个步骤的运算量、任务中各个步骤的执行顺序以及任务中各个步骤之间的关联关系中的至少一个来确定。The process of splitting the task and sending the split task to multiple external resources can be based on the type of task, the amount of calculation of each step in the task, the execution order of each step in the task, and the Determined by at least one of the association relationships.
作为一个示例性实施例,将待处理的任务发送给具体哪个或哪几个外部资源,这一决策可以依据多种因素而做出。例如,所述装置还可以包括:外部设备确定模块310,耦合至传输模块32,设置为根据预定因素确定能够处理所述任务的所述外部设备,其中,所述预定因素包括以下至少之一:所述终端与所述外部设备之间的网络质量、所述外部设备中与所述任务相对应的外部资源的使用率、所述外部设备中与所述任务相对应的外部资源的容量或处理能力、所述任务的类型、用户偏好配置。以上预定因素的选择及使用,可以根据用户的设置、终端的出厂设置、智能策略设计等方式来确定,主旨在于根据外部环境、用户偏好、外部资源状态等因素来选择合适的外部资源,提高任务的处理效率。所述传输模块32可以设置为将所述任务发送给确定的能够处理所述任务的所述外部设备。As an exemplary embodiment, the specific task or resources are sent to the task to be processed. This decision can be made based on various factors. For example, the apparatus may further include: an external device determination module 310, coupled to the transmission module 32, configured to determine the external device capable of processing the task according to a predetermined factor, wherein the predetermined factor includes at least one of the following: Network quality between the terminal and the external device, utilization rate of external resources corresponding to the task in the external device, capacity or processing of external resources corresponding to the task in the external device Ability, type of task, user preference configuration. The selection and use of the above predetermined factors can be determined according to user settings, terminal factory settings, intelligent strategy design, etc. The main purpose is to select appropriate external resources based on external environment, user preferences, external resource status and other factors to improve the task Processing efficiency. The transmission module 32 may be configured to send the task to the determined external device capable of processing the task.
所述确定模块30判断终端中本地资源的使用情况是否满足预定条件的过程,旨在判断所述终端中本地资源的使用率是否高于阈值、所述终端中本地资源是否被预定应用所使用中的至少一个条件,所基于的资源的使用率信息可以是一段时间内的平均使用率信息,从而实现较为平滑的外部资源调用。本领域技术人员应当理解,在实际应用中,可以通过在终端中配置特定的算法,来实现以上预定条件的判断。以下给出不同情况下,终端可以采用的优选算法,但是本领域技术人员应当理解,凡是能够实现以上预定条件的判断的算法都可以应用,而不必限于此处所提出的示例性算法,该示例性算法不应构成不当的范围限定。The process of determining whether the usage of local resources in the terminal meets a predetermined condition by the determination module 30 is to determine whether the usage rate of the local resources in the terminal is higher than a threshold, and whether the local resources in the terminal are being used by a predetermined application At least one condition of the resource usage information based on may be average usage information over a period of time, so as to achieve a smoother external resource call. Those skilled in the art should understand that, in practical applications, a specific algorithm may be configured in the terminal to achieve the judgment of the above predetermined conditions. The preferred algorithms that can be adopted by the terminal in different situations are given below, but those skilled in the art should understand that any algorithm that can achieve the judgment of the above predetermined conditions can be applied, and is not necessarily limited to the exemplary algorithm proposed here. The algorithm should not constitute an inappropriate scope limit.
(1)在所述需要使用外部资源的条件包括所述终端中本地资源的使用率高于所述阈值的情况下,所述确定模块30可以通过如下方式确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件:根据所述终端中正在运行的应用对所述本地资源的使用率以及所述终端中正在运行的应用使用本地资源时对应的权重,确定所述本地资源的第一使用情况指示值T1;当所述本地资源的所述第一使用情况指示值T1高于第一预设阈 值t1时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。(1) In the case where the condition requiring the use of external resources includes the utilization rate of local resources in the terminal being higher than the threshold, the determination module 30 may determine the use status of local resources in the terminal in the following manner Whether the condition for using an external resource is met: the local resource is determined according to the usage rate of the local resource by the application running in the terminal and the corresponding weight when the application running in the terminal uses the local resource The first usage indication value T1 of the local resource; when the first usage indication value T1 of the local resource is higher than a first preset threshold t1, it is determined that the usage of the local resource of the terminal satisfies the need to use an external Resource conditions.
作为一个示例性的实施例,可以通过以下方式来确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件:As an exemplary embodiment, whether the use of local resources in the terminal satisfies the condition of using external resources may be determined in the following manner:
对于所述终端中预定类型的本地资源,确定所述预定类型的本地资源的第一使用情况指示值T1=(A1*X1+a1)+(A2*X2+a2)...+(An*Xn+an),其中,A1-An分别为所述终端中正在运行的应用1-n对所述预定类型的本地资源的使用率且其值落入[0,1],X1-Xn分别为所述应用1-n使用所述预定类型的本地资源时对应的权重且其值落入[0,1],a1-an分别为所述应用1-n对应的使用率配置系数且其值落入[0,1],n为正整数;For the predetermined type of local resources in the terminal, determine the first usage indication value of the predetermined type of local resources T1=(A1*X1+a1)+(A2*X2+a2)...+(An* Xn+an), where A1-An are the usage rates of the predetermined type of local resources by the applications 1-n running in the terminal and their values fall into [0,1], X1-Xn are respectively When the applications 1-n use the predetermined type of local resources, the corresponding weights and their values fall into [0,1], and a1-an are the usage configuration coefficients corresponding to the applications 1-n and their values fall Enter [0,1], n is a positive integer;
当所述预定类型的本地资源的所述第一使用情况指示值T1高于第一预设阈值t1时,确定终端的所述预定类型的本地资源的使用情况满足所述需要使用外部资源的条件。When the first usage indication value T1 of the predetermined type of local resource is higher than a first preset threshold t1, it is determined that the usage of the predetermined type of local resource of the terminal meets the condition of using an external resource .
(2)在所述需要使用外部资源的条件包括所述终端中本地资源被预定应用所使用的情况下,所述确定模块30可以通过如下方式确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件:根据所述预定应用对应的使能配置系数以及指示所述预定应用是否正在运行的使能系数,确定所述本地资源的第二使用情况指示值T2;当所述本地资源的所述第二使用情况指示值T2高于第二预设阈值t2时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。(2) In the case where the condition requiring the use of external resources includes local resources in the terminal being used by a predetermined application, the determination module 30 may determine whether the use of local resources in the terminal meets The condition for using external resources: according to the enable configuration coefficient corresponding to the predetermined application and the enable coefficient indicating whether the predetermined application is running, determine the second usage indication value T2 of the local resource; when the When the second usage indication value T2 of the local resource is higher than the second preset threshold t2, it is determined that the usage of the local resource of the terminal meets the condition that the external resource needs to be used.
作为一个示例性的实施例,可以通过以下方式来确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件:As an exemplary embodiment, whether the use of local resources in the terminal satisfies the condition of using external resources may be determined in the following manner:
对于所述终端中预定类型的本地资源,确定所述预定类型的本地资源的第二使用情况指示值T2=(B1*Y1+B2*Y2...+Bm*Ym),其中,B1-Bm分别为所述预定应用1-m对应的使能配置系数且其值落入[0,1],Y1-Ym分别为所述预定应用1-m是否正在运行的使能系数且其值为0或1,所述使能系数为1表示正在运行,所述使能系数为0表示未在运行,m为正整数;For the predetermined type of local resources in the terminal, determine the second usage indication value of the predetermined type of local resources T2=(B1*Y1+B2*Y2...+Bm*Ym), where B1-Bm Respectively, the enabling configuration coefficients corresponding to the predetermined application 1-m and their values fall into [0,1], and Y1-Ym are respectively the enabling coefficients of whether the predetermined application 1-m is running and its value is 0 Or 1, the enable coefficient of 1 means running, the enable coefficient of 0 means not running, and m is a positive integer;
当所述预定类型的本地资源的所述第二使用情况指示值T2高于第二预设阈值t2时,确定终端的所述预定类型的本地资源的使用情况满足所述需要使用外部资源的条件。When the second usage indication value T2 of the predetermined type of local resource is higher than a second preset threshold t2, it is determined that the usage condition of the predetermined type of local resource of the terminal meets the condition of using an external resource .
(3)在所述需要使用外部资源的条件包括所述终端中本地资源的使用率高于所述阈值和所述终端中本地资源被预定应用所使用的情况下,所述确定模块30可以通过如下方式确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件:根据所述终端中正在运行的全部应用对所述本地资源的使用率、所述终端中正在运行的全部应用使用本地资源时对应的权重、所述预定应用对应的使能配置系数以及指示所述预定应用是否正在运行的使能系数,确定所述本地资源的第三使用情况指示值T3;当所述本地资源的所述第三使用情况指示值T3高于第三预设阈值t3时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。(3) In the case where the condition requiring the use of external resources includes the utilization rate of local resources in the terminal being higher than the threshold and the local resources in the terminal are used by a predetermined application, the determination module 30 may pass Determine whether the usage of local resources in the terminal satisfies the condition of using external resources as follows: according to the usage rate of all the applications running on the terminal to the local resources, all the running resources in the terminal The weight corresponding to the application using the local resource, the enabling configuration coefficient corresponding to the predetermined application, and the enabling coefficient indicating whether the predetermined application is running, determining the third usage indication value T3 of the local resource; when the When the third usage indication value T3 of the local resource is higher than the third preset threshold t3, it is determined that the usage of the local resource of the terminal meets the condition that the external resource needs to be used.
作为一个示例性的实施例,可以通过以下方式来确定所述终端中本地资源的使用情况 是否满足所述需要使用外部资源的条件:As an exemplary embodiment, whether the use of local resources in the terminal satisfies the conditions for using external resources may be determined in the following manner:
对于所述终端中预定类型的本地资源,确定所述预定类型的本地资源的第三使用情况指示值T3=(A1*X1+a1)+(A2*X2+a2)...+(An*Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym),其中,A1-An分别为所述终端中正在运行的应用1-n对所述预定类型的本地资源的使用率且其值落入[0,1],X1-Xn分别为所述应用1-n使用所述预定类型的本地资源时对应的权重且其值落入[0,1],a1-an分别为所述应用1-n对应的使用率配置系数且其值落入[0,1],B1-Bm分别为所述预定应用1-m对应的使能配置系数且其值落入[0,1],Y1-Ym分别为所述预定应用1-m是否正在运行的使能系数且其值为0或1,所述使能系数为1表示正在运行,所述使能系数为0表示未在运行,n为正整数,m为正整数;For the predetermined type of local resources in the terminal, determine the third usage indication value of the predetermined type of local resources T3=(A1*X1+a1)+(A2*X2+a2)...+(An* Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym), where A1-An is the use of the predetermined type of local resources by the applications 1-n running in the terminal respectively Rate and its value falls into [0,1], X1-Xn are the corresponding weights when the application 1-n uses the predetermined type of local resource and its value falls into [0,1], a1-an respectively The usage configuration coefficient corresponding to the application 1-n and its value fall into [0,1], B1-Bm are the enabling configuration coefficient corresponding to the predetermined application 1-m and their value fall into [0, 1], Y1-Ym are the enable coefficients of whether the predetermined application 1-m is running and its value is 0 or 1, the enable coefficient is 1 means running, and the enable coefficient is 0 means not In operation, n is a positive integer and m is a positive integer;
当所述预定类型的本地资源的所述第三使用情况指示值T3高于第三预设阈值t3时,确定终端的所述预定类型的本地资源的使用情况满足所述需要使用外部资源的条件。When the third usage indication value T3 of the predetermined type of local resource is higher than a third preset threshold t3, it is determined that the usage condition of the predetermined type of local resource of the terminal meets the condition that the external resource needs to be used .
在以上的情况(2)和(3)中,所述预定应用1-m对应的使能配置系数B1-Bm的值可在相应应用安装时由用户手动配置,也可由终端按某种方式对相应应用进行判断后自动配置。作为一个示例性实施方式,所述预定应用1-m对应的使能配置系数B1-Bm的值可以根据所述预定应用1-m在所述终端中运行时对所述终端中所述预定类型的本地资源的使用率而确定。例如,运行某应用1后,CPU使用率大多维持在70%,就可对该应用1的B1值配置为1,若将t2或t3也配置为1,则相当于后续只要运行该应用1就会直接触发外部资源。In the above cases (2) and (3), the value of the enabling configuration coefficient B1-Bm corresponding to the predetermined application 1-m can be manually configured by the user when the corresponding application is installed, or can be controlled by the terminal in some way After the corresponding application is judged, it is automatically configured. As an exemplary embodiment, the value of the enabling configuration coefficient B1-Bm corresponding to the predetermined application 1-m may be used to determine the predetermined type in the terminal when the predetermined application 1-m is running in the terminal The utilization rate of local resources is determined. For example, after running an application 1, the CPU utilization rate is mostly maintained at 70%, and the B1 value of the application 1 can be configured as 1, if t2 or t3 is also configured as 1, it is equivalent to running the application 1 in the future. Will directly trigger external resources.
在以上的情况(1)和(3)中,所述应用1-n对所述预定类型的本地资源的使用率为所述应用1-n在预定时长内对所述预定类型的本地资源的平均使用率。这样做的原因是,因终端本地资源占用测量是瞬时值,为避免过于频繁启动终端外部资源,需要对本地资源占用率进行平滑处理。例如,表达式的A1-An数值,使用的是在一预定时长(例如,200ms)内终端本地资源占用率平均值A1’-An’,则:In the above cases (1) and (3), the usage rate of the application 1-n to the predetermined type of local resource is the application 1-n to the predetermined type of local resource within a predetermined period of time Average usage. The reason for this is that, because the terminal's local resource occupancy measurement is an instantaneous value, in order to avoid starting the terminal's external resources too frequently, it is necessary to smooth the local resource occupancy rate. For example, the A1-An value of the expression uses the average local resource occupancy rate of the terminal A1’-An’ within a predetermined duration (for example, 200 ms), then:
第一使用情况指示值T1=(A1’*X1+a1)+(A2’*X2+a2)...+(An’*Xn+an)First usage indication value T1=(A1’*X1+a1)+(A2’*X2+a2)...+(An’*Xn+an)
第三使用情况指示值T3=(A1’*X1+a1)+(A2’*X2+a2)...+(An’*Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym)。The third usage indication value T3=(A1'*X1+a1)+(A2'*X2+a2)...+(An'*Xn+an)+(B1*Y1+B2*Y2...+ Bm*Ym).
以上的阈值t1、t2和t3均用来判断目前终端中本地资源的使用率是否超出了预定程度,或者本地资源是否正被预定应用所占用,阈值的确定可以由用户指定,也可以由系统预先配置,还可以根据用户提出的使用流畅度要求来确定,本领域技术人员应当理解,以上阈值可以根据需求或具体使用情况来确定,随着阈值的提高,终端自动发起调用外部资源的门槛也会提升,而随着阈值的降低,终端自动发起调用外部资源的门槛也会下降。The above thresholds t1, t2, and t3 are used to determine whether the current utilization rate of local resources in the terminal exceeds a predetermined level, or whether the local resources are being occupied by a predetermined application. The determination of the threshold can be specified by the user or can be pre-determined by the system The configuration can also be determined according to the user's fluency requirements. Those skilled in the art should understand that the above threshold can be determined according to needs or specific usage. As the threshold increases, the threshold for the terminal to automatically initiate calls to external resources will also As the threshold decreases, the threshold for the terminal to automatically initiate calls to external resources will also decrease.
在本发明实施例中,所述终端中待处理的任务可以包括以下至少之一:In the embodiment of the present invention, the task to be processed in the terminal may include at least one of the following:
输入数据包,携带所述待处理任务的输入信息,如触屏输入,语音输入,陀螺仪传感器输入,光线强度输入等各类形式的输入信息;Input data packet, carrying input information of the task to be processed, such as touch screen input, voice input, gyro sensor input, light intensity input and other forms of input information;
应用程序数据包,携带所述待处理任务所对应的应用程序编码段;An application data packet, carrying the application code segment corresponding to the task to be processed;
运算过程暂存数据包,携带所述待处理任务所基于的运算过程的暂存结果。The operation process temporarily stores the data packet, and carries the temporary storage result of the operation process on which the task to be processed is based.
在本发明实施例中,所述外部设备返回的所述外部资源对所述任务的处理结果可以包括:运算结果数据包,携带对所述任务进行处理后获得的输出信息,如屏幕显示,声音,震动等等各类输出形式的输出信息;In the embodiment of the present invention, the processing result of the external resource on the task returned by the external device may include: an operation result data packet, carrying output information obtained after processing the task, such as screen display, sound , Vibration and other output information in various output forms;
所述装置还可以包括:输出模块312,耦合至接收模块34,设置为在所述接收模块34接收所述外部设备返回的所述外部资源对所述任务的处理结果之后,根据所述运算结果数据包中携带的所述输出信息,通过所述终端与所述输出信息对应的输出接口进行结果输出。The apparatus may further include: an output module 312, coupled to the receiving module 34, configured to, after the receiving module 34 receives the processing result of the external resource returned by the external device on the task, according to the calculation result The output information carried in the data packet is output through the output interface corresponding to the output information of the terminal.
启用外部资源需要进行无线传输,这也会消耗部分资源。例如,触发启用外部资源,会消耗CPU 20%的使用率的话,每次触发至少需要将CPU消耗大于20%的一个或多个应用转移到外部资源运算,以达到利用外部资源后,CPU的资源消耗是下降的。因此,作为一个优选的实施例,可以设置发送给所述外部设备的所述待处理的任务,在所述终端中对所述本地资源的平均使用率高于用于将所述待处理的任务发送给所述外部设备的无线通信过程对所述本地资源的平均使用率。Enabling external resources requires wireless transmission, which also consumes some resources. For example, if the activation of external resources consumes 20% of the CPU usage rate, each trigger needs to transfer at least one or more applications with CPU consumption greater than 20% to the calculation of external resources to achieve the utilization of external resources. Consumption is declining. Therefore, as a preferred embodiment, the task to be processed sent to the external device may be set, and the average utilization rate of the local resource in the terminal is higher than that for the task to be processed The average usage rate of the local resources by the wireless communication process sent to the external device.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware, and the latter can be implemented by the following methods, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination The forms are located in different processors.
本发明的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。An embodiment of the present invention further provides a storage medium in which a computer program is stored, wherein the computer program is set to execute any of the steps in the above method embodiments during runtime.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the above storage medium may be set to store a computer program for performing the following steps:
S1,确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;S1. Determine whether the usage of local resources in the terminal meets the conditions for using external resources, where the conditions for using external resources include at least one of the following: the usage rate of local resources in the terminal is higher than a threshold, the Local resources in the terminal are used by scheduled applications;
S2,在确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及S2. When it is determined that the usage of local resources in the terminal satisfies the condition of using external resources, send a task to be processed in the terminal to an external device capable of processing the task to use the External resources on an external device to process the task to be processed; and
S3,接收所述外部设备返回的所述外部资源对所述任务的处理结果。S3. Receive a processing result of the external resource on the task returned by the external device.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the above storage medium may include, but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), Various media that can store computer programs, such as removable hard disks, magnetic disks, or optical disks.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行上述任一项方法实施例中的步骤。An embodiment of the present invention also provides an electronic device, including a memory and a processor, where the computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any one of the foregoing method embodiments.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和 上述处理器连接,该输入输出设备和上述处理器连接。Optionally, 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.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above processor may be configured to perform the following steps through a computer program:
S1,确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;S1. Determine whether the usage of local resources in the terminal meets the conditions for using external resources, where the conditions for using external resources include at least one of the following: the usage rate of local resources in the terminal is higher than a threshold, the Local resources in the terminal are used by scheduled applications;
S2,在确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及S2. When it is determined that the usage of local resources in the terminal satisfies the condition of using external resources, send a task to be processed in the terminal to an external device capable of processing the task to use the External resources on an external device to process the task to be processed; and
S3,接收所述外部设备返回的所述外部资源对所述任务的处理结果。S3. Receive a processing result of the external resource on the task returned by the external device.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not repeated in this embodiment.
以下以资源类型为运算资源中的主要资源形式——CPU资源为例,对本发明实施例的方案进行举例说明。The following uses the resource type as the main resource form of computing resources—CPU resources as an example to illustrate the solution of the embodiment of the present invention.
根据本发明实施例所述的技术,当终端CPU平均使用率达到某一数值(例如,30%),即自动启用用户指定的外部资源(例如,网络侧资源或周边外部设备资源),终端将计算任务进行分拆,通过移动通信网络发送给网络侧资源或周边设备资源,终端外部资源获得分任务并进行计算,并将计算结果返回终端,在终端本地合成,呈现整体运算结果。According to the technology described in the embodiments of the present invention, when the average CPU usage of the terminal reaches a certain value (for example, 30%), that is, the external resources specified by the user (for example, network-side resources or peripheral external device resources) are automatically enabled, the terminal will The computing tasks are split and sent to the network-side resources or peripheral device resources through the mobile communication network. The external resources of the terminal obtain sub-tasks and perform calculations, and return the calculation results to the terminal, where they are synthesized locally and present the overall calculation results.
因移动通信具有高速、低延时的数据传送能力(例如,对于5G移动通信网络,1期传输速度可达每秒Gb级,时延仅为毫秒级),网络侧资源及终端周边资源的存取计算等如同终端本地。作为一个优选的实例,终端向网络侧或周边设备等外部资源发送的可以只是终端玩游戏时的控制信号(例如,用户手指触控屏幕的信号),外部资源返回的是终端显示内容及声音震动等信号,游戏界面场景变换等大量计算任务在外部设备侧完成,终端本地的运算能力主要用于控制协调输入输出数据。因外部设备可配置的资源可大大高于终端本地资源,这样终端的计算能力、存储能力得到极大地扩展。Because mobile communication has high-speed, low-latency data transmission capabilities (for example, for 5G mobile communication networks, the transmission speed of Phase 1 can reach Gb per second, and the delay is only milliseconds), the storage of network-side resources and terminal peripheral resources The calculation is as local as the terminal. As a preferred example, the terminal may send to the external resources such as the network side or peripheral devices only control signals when the terminal plays a game (for example, a signal that the user's finger touches the screen), and the external resources return the terminal display content and sound vibration A large number of calculation tasks such as signal waiting, game interface scene change, etc. are completed on the external device side. The local computing power of the terminal is mainly used to control and coordinate input and output data. Because the configurable resources of external devices can be much higher than the local resources of the terminal, the computing power and storage capacity of the terminal are greatly expanded.
图4是本发明实施例中应用场景方框图,如图4所示,终端达到某种条件(如前述的预定条件)后,可自动触发使用外部资源,扩展终端配置。外部用户指定资源,可以是用户家里的电脑,或用户的另一台或几台终端,或者此时归属用户使用的公共资源。终端和外部资源之间可以通过无线通信技术,例如5G多进多出(Multiple-Input Multiple-Output,简称为MIMO)来实现,其中,MIMO技术的基本出发点是将用户数据分解为多个并行的数据流,在指定的带宽内有多个发射天线同时刻发射,经由无线信道后,由多个天线进行接收,并根据各个并行数据流的空间特性进行解调技术,最终恢复出原始数据。4 is a block diagram of an application scenario in an embodiment of the present invention. As shown in FIG. 4, after the terminal reaches a certain condition (such as the aforementioned predetermined condition), it can automatically trigger the use of external resources to expand the terminal configuration. The resource specified by the external user may be a computer at the user's home, or another terminal or terminals of the user, or a public resource used by the user at this time. The terminal and external resources can be implemented by wireless communication technology, such as 5G Multiple-Input Multiple-Output (referred to as MIMO), where the basic starting point of MIMO technology is to decompose user data into multiple parallel In the data stream, multiple transmitting antennas simultaneously transmit within the specified bandwidth. After passing through the wireless channel, the multiple antennas receive and demodulate the technology according to the spatial characteristics of each parallel data stream, and finally restore the original data.
图5是本发明实施例的终端中的相关处理系统的方框图,以下对终端中所包含的系统的功能进行简要介绍。FIG. 5 is a block diagram of a related processing system in a terminal according to an embodiment of the present invention. The functions of the system included in the terminal are briefly described below.
终端资源管理系统50:监控终端资源使用状况(例如CPU使用率,内存使用率,存储容量使用率等),达到启用外部资源触发条件时(例如,CPU使用率(可以为实际的使用率值,也可以是经过加权的使用率值)到达30%,或者终端运行预定应用),发出启用外部资源指令。Terminal resource management system 50: monitors the terminal resource usage status (such as CPU usage, memory usage, storage capacity usage, etc.), when the trigger condition for enabling external resources is reached (for example, CPU usage (can be the actual usage value, It may also be a weighted usage rate value) reaching 30%, or the terminal running a predetermined application), and issuing an instruction to enable an external resource.
本实施例给出一种优选的判断是否应当启用外部资源的触发表达式T(对应于上述实施例中资源的使用情况指示值)。当T大与阈值时,终端资源管理系统50即启用外部资源。This embodiment provides a preferred trigger expression T (corresponding to the resource usage indication value in the above embodiment) for determining whether an external resource should be enabled. When T is greater than the threshold, the terminal resource management system 50 enables external resources.
T=(A1*X1+a1)+(A2*X2+a2)...+(An*Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym)T=(A1*X1+a1)+(A2*X2+a2)...+(An*Xn+an)+(B1*Y1+B2*Y2...+Bm*Ym)
A1-An为终端运行应用1-n的配置资源使用率,例如A1为运行A1相关应用1时CPU使用率,X1为A1对应(也可以理解为应用1对应)的权重,a1为A1对应(也可以理解为应用1对应)的使用率配置系数。B1-Bm是指定应用1-m的使能配置系数,例如,B1为终端运行与B1相关的应用1的使能配置系数,B1为某常数。Y1-Ym为B1-Bm对应(也可以理解为应用1-m对应)的使能系数。例如,终端运行与B1相关的应用1时,Y1=1,对应地B1*Y1=B1。如该应用停止运行,Y1=0,对应地B1*Y1=0。A1-An is the configured resource usage rate of the terminal running applications 1-n, for example, A1 is the CPU usage rate when running A1 related applications 1, X1 is the weight corresponding to A1 (also can be understood as corresponding to application 1), and a1 is corresponding to A1 ( It can also be understood as the usage configuration coefficient corresponding to application 1). B1-Bm is the enabling configuration coefficient of the specified application 1-m. For example, B1 is the enabling configuration coefficient of the terminal running application 1 related to B1, and B1 is a constant. Y1-Ym is the enable coefficient corresponding to B1-Bm (it can also be understood that 1-m correspondence is applied). For example, when the terminal runs the application 1 related to B1, Y1=1, correspondingly B1*Y1=B1. If the application stops running, Y1=0, correspondingly B1*Y1=0.
为便于理解,对表达式进行举例说明。为简化说明忽略其他因素,就以CPU使用率为例,当T大于等于阈值(本例中该阈值为1)时,终端资源管理系统50发出启用外部资源的触发信号。A1为运行与A1相关的应用1时的CPU使用率,假如当前使用率为60%,X1为应用1的CPU使用率的权重,为0.90,a1为应用1的CPU使用率的使用率配置系数,目前配置为0.70。For ease of understanding, the expression is exemplified. To simplify the description, ignoring other factors, taking the CPU usage as an example, when T is greater than or equal to a threshold (in this example, the threshold is 1), the terminal resource management system 50 issues a trigger signal to enable external resources. A1 is the CPU usage rate when running the application 1 related to A1. If the current usage rate is 60%, X1 is the weight of the CPU usage rate of the application 1, which is 0.90, and a1 is the usage configuration factor of the CPU usage rate of the application 1. , Currently configured to 0.70.
T=(0.60*0.90+0.70)=1.24T=(0.60*0.90+0.70)=1.24
即T≥1,终端资源管理系统50发出启用外部资源的触发信号。That is, T≥1, the terminal resource management system 50 sends out a trigger signal for enabling external resources.
如果此时CPU使用率为20%,此时If the CPU usage is 20% at this time, this time
T=(0.20*0.90+0.70)=0.88T = (0.20*0.90+0.70) = 0.88
即T≤1,终端资源管理系统50不会发出启用外部资源的触发信号。That is, T≤1, the terminal resource management system 50 will not issue a trigger signal for enabling external resources.
对于B1-Bm进行举例说明,B1为某大型3D游戏,使能配置系数为1,即,只要该游戏运行Y1=1,B1*Y1=1,加上其他应用消耗,T必然大于等于1,终端资源管理系统50必然发出启用外部资源的触发信号。当然如该游戏退出运行,Y1=0,B1*Y1=0,T是否大于1,取决于其他应用消耗CPU情况。B1可在该应用安装时由用户手动配置,也可由终端按某种方式对应用进行判断后自动配置,例如,运行该应用后,CPU使用率大多维持在70%,就可对该应用B1配置为1,后续只要运行该应用直接触发外部资源。Take B1-Bm as an example, B1 is a large-scale 3D game, the enablement configuration coefficient is 1, that is, as long as the game runs Y1=1, B1*Y1=1, plus other application consumption, T must be greater than or equal to 1, The terminal resource management system 50 must issue a trigger signal to enable external resources. Of course, if the game quits running, Y1=0, B1*Y1=0, whether T is greater than 1, depends on the CPU consumption of other applications. B1 can be manually configured by the user when the application is installed, or can be automatically configured after the terminal judges the application in a certain way. For example, after running the application, the CPU utilization rate is mostly maintained at 70%, and the application B1 can be configured Is 1, follow-up as long as the application is running directly trigger external resources.
终端资源管理系统50通过对T判断是否大于1,就能决定是否发出启用外部资源的触发信号。The terminal resource management system 50 can determine whether to issue a trigger signal for enabling external resources by determining whether T is greater than 1.
任务分拆与合成系统54:获得启用外部资源指令后,任务分拆与合成系统54将当前计算任务量进行分拆打包(通过移动通信接收与发送系统)发送到网络侧用户指定资源进行计算。通过移动通信接收与发送系统获取网络侧分任务运算结果,合成总任务计算结果, 在终端上呈现。Task splitting and synthesizing system 54: After obtaining the instruction to enable external resources, the task splitting and synthesizing system 54 splits and packs the current calculation task volume (through the mobile communication receiving and sending system) to the network side user-specified resource for calculation. Obtain the network side task calculation results through the mobile communication receiving and sending system, synthesize the total task calculation results, and present them on the terminal.
终端任务分拆与合成系统54,将运算数据分拆为大量的数据包便于发送。数据包结构包括“目的IP地址”、“源IP地址”、“净载数据”等部分。数据包类型包括终端输入数据包(如触屏输入,语音输入,陀螺仪传感器输入,光线强度输入等)数据包,终端当前应用程序数据包(应用程序编码),运算过程暂存数据包。The terminal task splitting and synthesis system 54 splits the operation data into a large number of data packets for easy transmission. The data packet structure includes "destination IP address", "source IP address", "netload data" and other parts. Data packet types include terminal input data packets (such as touch screen input, voice input, gyro sensor input, light intensity input, etc.) data packets, terminal current application data packets (application code), and temporary storage data packets during operation.
通过外部资源运算后,运算结果数据包(屏幕显示,声音,震动)内容,由网络侧运算资源进行分拆,便于无线传送。终端任务分拆与合成系统54将收到的分散的数据包合成为完成的运算输出结果,呈现在终端上。After calculation through external resources, the contents of the calculation result packets (screen display, sound, vibration) are separated by the calculation resources on the network side to facilitate wireless transmission. The terminal task splitting and synthesizing system 54 synthesizes the received scattered data packets into the output of the completed operation and presents them on the terminal.
移动通信发送与接收系统52:快速传送由任务分拆与合成系统54分拆的各分任务到网络侧进行运算,快速返回结果,发送给任务分拆与合成系统54合成总任务运算结果。Mobile communication sending and receiving system 52: Quickly transfer each sub-task split by the task split-and-synthesis system 54 to the network side for operation, quickly return the result, and send it to the task split-and-synthesis system 54 to synthesize the total task operation result.
终端运行处理系统56:根据预定程序,协调各模块之间的工作,承担本地运算任务。Terminal operation processing system 56: Coordinate the work between modules according to a predetermined procedure and undertake local computing tasks.
终端其他配套系统58:包括电源管理,基带处理,存储等支持终端整体运行的必要系统。Other terminal supporting systems 58: including power management, baseband processing, storage and other necessary systems to support the overall operation of the terminal.
因网络侧用户指定资源,是强大的运行能力及内存充分的操作系统,用户使用某需要强大运算能力的应用时,终端任务分拆与合成系统54可以将用户的屏幕触控信息,终端当前状态信息(例如各传感器当前信息)作为任务发送给外部资源,在外部资源进行运算,其运算结果回传终端,例如回传的是应用完成运算的动态画面,音效,马达震动信息,终端本地只需解码显示,播放音效,触发马达震动。这种方式将极大地减轻终端运行需要大量运算能力应用时对本地运算能力的要求。Because the user-specified resources on the network side are a powerful operating system with sufficient memory, when a user uses an application that requires strong computing power, the terminal task splitting and synthesis system 54 can touch the user’s screen touch information and the current state of the terminal. The information (such as the current information of each sensor) is sent as a task to an external resource, and the operation is performed on the external resource, and the calculation result is returned to the terminal. For example, the dynamic picture, sound effect, and motor vibration information that the application completes the calculation are returned. Decode display, play sound effect, trigger motor vibration. This method will greatly alleviate the requirement for local computing power when the terminal operation requires a large amount of computing power.
以下以一些具体的应用对本发明实施例的方法进行举例。The methods of the embodiments of the present invention are exemplified below with some specific applications.
例如,用户处于城市某街道位置,运行该城市的AR导游应用,该应用能实时渲染用户所在位置的街道场景,呈现在终端上。该AR导游应用根据终端位置,视角等逼真地渲染当前位置所见场景,标注标志建筑,景点信息。用户进入景点,如建筑物内部,AR导游应用渲染呈现用户当前视角的建筑细节,并进行介绍。该AR导游运行需要较大的运算能力,运行该应用时,B=1,终端与网络侧用户指定资源通信,启动网络侧AR导游应用,终端任务分拆与合成系统54将终端中的GPS位置信息,陀螺仪角度信息,发送给用户指定的外部资源,外部资源将与此时终端对应信息的,完成渲染的街道画面编码后回传终端,终端本地解码,呈现叠加标注介绍等信息的街道画面。本发明实施例所述技术方案可以很好解决超出终端本地运算能力的,需要大量运算的应用运行问题。For example, the user is in a street location in the city and runs the AR guide application in the city. The application can render the street scene of the user's location in real time and present it on the terminal. The AR tour guide application realistically renders the scene seen at the current location according to the terminal position, perspective, etc., and marks the landmark buildings and scenic spot information. When the user enters a scenic spot, such as inside a building, the AR guide application renders and presents the architectural details of the user's current perspective and introduces it. The operation of the AR guide requires a large amount of computing power. When running the application, B=1, the terminal communicates with the user-specified resources on the network side, starts the AR guide application on the network side, and the terminal task separation and synthesis system 54 converts the GPS position in the terminal Information, gyro angle information, sent to the user specified external resource, the external resource will correspond to the terminal information at this time, after the rendered street picture is encoded, the terminal will be transmitted back to the terminal, the terminal will decode locally, and the street picture with the superimposed introduction and other information will be presented . The technical solution described in the embodiments of the present invention can well solve the problem of application operation that exceeds the local computing capability of the terminal and requires a large amount of computing.
除T>1时终端触发启用外部资源外,如何更有效,更合理地利用外部资源,可以考虑运营外部资源的策略。终端的外部资源包括通过基站获取网络侧用户可用资源,以及与周边其他终端直联获得的可用资源。这样,可根据任务类型,或当前环境,用户习惯等因素来将用户当前终端所需的外部资源自动分配到不同的合适的设备。以下给出一些根据外部因素来确定使用哪个外部资源的例子。Except when the terminal triggers the activation of external resources when T>1, how to use the external resources more effectively and more reasonably can consider the strategy of operating external resources. The external resources of the terminal include the available resources obtained by the network side user through the base station and the available resources obtained by directly connecting with other terminals in the vicinity. In this way, the external resources required by the user's current terminal can be automatically allocated to different suitable devices according to the task type, or the current environment, user habits, and other factors. Here are some examples of determining which external resource to use based on external factors.
例1,用户需终端执行某项任务,该任务执行时出现T>1,终端即需启动外部资源。当前网络信号不佳,但用户还有一个终端在身边,当主设备需要启用外部资源时,即联接用户的另一个移动设备获取资源,而不是获取基站网络侧的运算资源。本举例中涉及终端根据外部环境自动配置外部资源内容。Example 1, the user needs the terminal to perform a certain task. When the task is executed and T>1 appears, the terminal needs to start an external resource. The current network signal is not good, but the user still has a terminal by his side. When the main device needs to enable external resources, that is, another mobile device connected to the user obtains resources instead of obtaining computing resources on the network side of the base station. This example involves the terminal automatically configuring the content of external resources according to the external environment.
例2,用户的另一移动设备(次设备)是移动电源+大存储器+收发系统,无显示屏照相机话筒听筒喇叭传感器等,此时用户在主设备上发出的指令是下载一部高清电影。主设备执行该任务时出现T>1,终端即需启动外部资源。根据用户习惯,主设备对该任务进行分配,将高清电影链接发给次设备,由次设备高清电影大文件下载到次设备本地并存储,次设备将压缩后适合主设备屏播放的电影,发送给主设备。本举例中涉及终端之间的直连,按用户习惯启用适合的外部资源,以及利用主设备之外的存储器等内容。Example 2: The user's other mobile device (secondary device) is a mobile power supply + large memory + transceiver system, no display camera microphone earpiece speaker sensor, etc. At this time, the user's instruction on the main device is to download a high-definition movie. When the master device performs this task, T>1 appears, and the terminal needs to start external resources. According to user habits, the main device allocates the task, sends the high-definition movie link to the secondary device, and downloads the high-definition movie large file from the secondary device to the secondary device locally and stores it. The secondary device will compress the movie suitable for playing on the main device screen and send it. To the master device. This example involves direct connection between terminals, enabling suitable external resources according to user habits, and using memory other than the main device.
以下详细描述本发明实施例的终端任务的处理方法的方法流程。图6是根据本发明实施例的终端任务的处理方法的详细方法流程图,如图6所示,该方法包括以下步骤:The method flow of the terminal task processing method according to an embodiment of the present invention is described in detail below. FIG. 6 is a detailed method flowchart of a terminal task processing method according to an embodiment of the present invention. As shown in FIG. 6, the method includes the following steps:
步骤601:终端初始化。Step 601: Terminal initialization.
步骤602:终端启动终端资源管理系统50。Step 602: The terminal starts the terminal resource management system 50.
步骤603:终端启动终端资源管理系统50监控终端当前资源使用率,包括CPU使用率,内存使用率等指标。Step 603: The terminal starts the terminal resource management system 50 to monitor the current resource usage rate of the terminal, including indicators such as CPU usage rate and memory usage rate.
步骤604:终端终端资源管理系统50判断终端当前资源使用率是否达到预置触发阈值。如达到触发值,终端资源管理系统50发出触发信号,进入步骤605。如未达到触发值,返回步骤603继续监控。Step 604: The terminal terminal resource management system 50 determines whether the current resource usage rate of the terminal reaches a preset trigger threshold. If the trigger value is reached, the terminal resource management system 50 sends a trigger signal and proceeds to step 605. If the trigger value is not reached, return to step 603 to continue monitoring.
步骤605:任务分拆与合成系统54将当前运算任务分拆。Step 605: The task splitting and synthesis system 54 splits the current computing task.
步骤606,:终端运行处理系统56通过移动通信发送与接收系统52将分任务发送给用户指定的网络侧运算资源。Step 606: The terminal operation processing system 56 sends the sub-tasks to the network-side computing resources designated by the user through the mobile communication sending and receiving system 52.
步骤607:网络侧运算资源对分任务进行运算。Step 607: The computing resources on the network side perform operations on the sub-tasks.
步骤608:网络侧运算资源将分任务运算结果回传终端。Step 608: The computing resources on the network side transmit the results of the sub-task operations to the terminal.
步骤609:任务分拆与合成系统54将分任务运算合成总任务运行结果。Step 609: The task splitting and synthesizing system 54 synthesizes the sub-tasks into a total task running result.
应用本发明实施例所述终端自动利用用户指定的网络侧资源及终端周边外部资源,可以极大地提升终端运算能力,实现低配置终端达到高配置终端性能的目的,满足用户对大运算力,大存储量的高端配置需求。应用本发明实施例所述终端自动利用用户指定的网络侧资源及终端周边外部资源,以及终端高速、低延时特性,可实时完成当前终端因资源不足而难以完成的任务。The application of the terminal described in the embodiment of the present invention automatically utilizes the network-side resources specified by the user and external resources around the terminal, which can greatly improve the terminal's computing power, achieve the purpose of low-configuration terminal to achieve high-configuration terminal performance, and satisfy the user's large computing power and large High-end configuration requirements for storage capacity. Using the terminal described in the embodiment of the present invention, the user can automatically use the network-side resources specified by the user and the external resources around the terminal, as well as the high-speed and low-latency characteristics of the terminal, to complete tasks that are currently difficult for the current terminal to complete due to insufficient resources.
通过本发明实施例,在确定终端中本地资源的使用情况满足需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及接收所述外部设备返回的所述外部资源对所述任务的处理结果。通过该方案,可以自动判定终端内的本地资源使用情况并确 定需要触发外部资源协助任务处理,并自动将待处理的任务发送给外部资源进行处理,从而解决相关技术中对终端上的运算、存储能力的要求越来越高,而这些能力在终端上的提高往往在硬件上受限的问题。该方案能够自动实现外部资源的调用,而外部设备可配置的资源可大大高于终端本地资源,这样终端的计算能力、存储能力得到极大地扩展,通过使用外部资源,极大地减轻了终端运行需要大量运算能力应用时对本地运算能力的要求。According to the embodiment of the present invention, when it is determined that the usage of local resources in the terminal satisfies the condition of using external resources, the task to be processed in the terminal is sent to an external device capable of processing the task to utilize the An external resource on an external device to process the task to be processed; and receiving a processing result of the external resource on the task returned by the external device. Through this solution, you can automatically determine the use of local resources in the terminal and determine the need to trigger external resources to assist in task processing, and automatically send the pending tasks to external resources for processing, thereby solving the calculation and storage on the terminal in related technologies The requirements for capabilities are getting higher and higher, and the improvement of these capabilities on the terminal is often a problem of limited hardware. This solution can automatically call external resources, and the configurable resources of external devices can be much higher than the local resources of the terminal. In this way, the computing power and storage capacity of the terminal are greatly expanded. The use of external resources greatly reduces the need for terminal operation. Requirements for local computing power when a large amount of computing power is applied.
显然,本领域的技术人员应该明白,上述的本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明实施例不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the modules or steps of the embodiments of the present invention described above can be implemented by a general-purpose computing device, and they can be concentrated on a single computing device or distributed among multiple computing devices. On the Internet, they can optionally be implemented with program code executable by the computing device, so that they can be stored in the storage device to be executed by the computing device, and in some cases, can be different from here The steps shown or described are executed in the order of, or they are made into individual integrated circuit modules respectively, or multiple modules or steps among them are made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, and improvement made within the principles of the present invention should be included in the protection scope of the present invention.

Claims (15)

  1. 一种终端任务的处理方法,其中,包括:A method for processing terminal tasks, including:
    确定终端中本地资源的使用情况是否满足需要使用外部资源的条件;Determine whether the usage of local resources in the terminal meets the conditions for using external resources;
    在确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及When it is determined that the usage of local resources in the terminal satisfies the condition of using external resources, the task to be processed in the terminal is sent to an external device capable of processing the task to utilize the external device External resources to process the pending tasks; and
    接收所述外部设备返回的所述外部资源对所述任务的处理结果。Receiving the processing result of the external resource on the task returned by the external device.
  2. 根据权利要求1所述的方法,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用。The method according to claim 1, wherein the condition requiring the use of an external resource includes at least one of the following: a usage rate of a local resource in the terminal is higher than a threshold, and a local resource in the terminal is used by a predetermined application.
  3. 根据权利要求1所述的方法,其中,The method according to claim 1, wherein
    将所述终端中待处理的任务发送给能够处理所述任务的外部设备包括:根据任务相关参数对所述任务进行分拆,并将分拆后的所述任务发送给能够处理所述任务的所述外部设备,其中,所述任务相关参数包括以下至少之一:所述任务的类型、所述任务中各个步骤的运算量、所述任务中各个步骤的执行顺序、所述任务中各个步骤之间的关联关系。Sending the task to be processed in the terminal to an external device capable of processing the task includes: splitting the task according to the task-related parameters, and sending the split task to the task capable of processing the task The external device, wherein the task-related parameters include at least one of the following: the type of the task, the calculation amount of each step in the task, the execution order of each step in the task, and each step in the task The relationship between them.
  4. 根据权利要求1-3任一项所述的方法,其中,将所述终端中待处理的任务发送给能够处理所述任务的所述外部设备包括:The method according to any one of claims 1 to 3, wherein sending the task to be processed in the terminal to the external device capable of processing the task includes:
    根据预定因素确定能够处理所述任务的所述外部设备,其中,所述预定因素包括以下至少之一:所述终端与所述外部设备之间的网络质量、所述外部设备中与所述任务相对应的外部资源的使用率、所述外部设备中与所述任务相对应的外部资源的容量或处理能力、所述任务的类型、用户偏好配置;The external device capable of processing the task is determined according to a predetermined factor, wherein the predetermined factor includes at least one of the following: network quality between the terminal and the external device, the external device and the task The usage rate of the corresponding external resource, the capacity or processing capacity of the external resource corresponding to the task in the external device, the type of the task, and user preference configuration;
    将所述任务发送给确定的能够处理所述任务的所述外部设备。Sending the task to the determined external device capable of processing the task.
  5. 根据权利要求2所述的方法,其中,在所述需要使用外部资源的条件包括所述终端中本地资源的使用率高于所述阈值的情况下,确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件包括:The method according to claim 2, wherein, in the case where the condition requiring the use of external resources includes the utilization rate of local resources in the terminal being higher than the threshold, determining whether the utilization of local resources in the terminal is The conditions for satisfying the need to use external resources include:
    根据所述终端中正在运行的应用对所述本地资源的使用率以及所述终端中正在运行的应用使用本地资源时对应的权重,确定所述本地资源的第一使用情况指示值T1;Determine the first usage indication value T1 of the local resource according to the usage rate of the local resource by the application running in the terminal and the corresponding weight when the application running in the terminal uses the local resource;
    当所述本地资源的所述第一使用情况指示值T1高于第一预设阈值t1时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。When the first usage indication value T1 of the local resource is higher than a first preset threshold t1, it is determined that the usage of the local resource of the terminal satisfies the condition that the external resource needs to be used.
  6. 根据权利要求2所述的方法,其中,在所述需要使用外部资源的条件包括所述终端中本地资源被预定应用所使用的情况下,确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件包括:The method according to claim 2, wherein, in the case where the condition requiring the use of external resources includes local resources in the terminal being used by a predetermined application, determining whether the usage of local resources in the terminal satisfies the Conditions that require the use of external resources include:
    根据所述预定应用对应的使能配置系数以及指示所述预定应用是否正在运行的使能系数,确定所述本地资源的第二使用情况指示值T2;Determine the second usage indication value T2 of the local resource according to an enable configuration coefficient corresponding to the predetermined application and an enable coefficient indicating whether the predetermined application is running;
    当所述本地资源的所述第二使用情况指示值T2高于第二预设阈值t2时,确定终端的 所述本地资源的使用情况满足所述需要使用外部资源的条件。When the second usage indication value T2 of the local resource is higher than the second preset threshold t2, it is determined that the usage of the local resource of the terminal satisfies the condition that the external resource needs to be used.
  7. 根据权利要求2所述的方法,其中,在所述需要使用外部资源的条件包括所述终端中本地资源的使用率高于所述阈值和所述终端中本地资源被预定应用所使用的情况下,确定所述终端中本地资源的使用情况是否满足所述需要使用外部资源的条件包括:The method according to claim 2, wherein, in the case where the condition requiring the use of an external resource includes a utilization rate of a local resource in the terminal higher than the threshold and a local resource in the terminal is used by a predetermined application To determine whether the use of local resources in the terminal satisfies the conditions for using external resources includes:
    根据所述终端中正在运行的全部应用对所述本地资源的使用率、所述终端中正在运行的全部应用使用本地资源时对应的权重、所述预定应用对应的使能配置系数以及指示所述预定应用是否正在运行的使能系数,确定所述本地资源的第三使用情况指示值T3;According to the usage rate of all the applications running on the terminal to the local resource, the corresponding weight when all the applications running on the terminal use the local resource, the enabling configuration coefficient corresponding to the predetermined application, and indicating the An enable factor of whether the predetermined application is running, determining the third usage indication value T3 of the local resource;
    当所述本地资源的所述第三使用情况指示值T3高于第三预设阈值t3时,确定终端的所述本地资源的使用情况满足所述需要使用外部资源的条件。When the third usage indication value T3 of the local resource is higher than a third preset threshold t3, it is determined that the usage of the local resource of the terminal meets the condition that the external resource needs to be used.
  8. 根据权利要求6或7所述的方法,其中,所述预定应用对应的使能配置系数的值根据所述预定应用在所述终端中运行时对所述终端中所述本地资源的使用率而确定。The method according to claim 6 or 7, wherein the value of the enablement configuration coefficient corresponding to the predetermined application depends on the utilization rate of the local resource in the terminal when the predetermined application is running in the terminal determine.
  9. 根据权利要求5或7所述的方法,其中,所述应用对所述本地资源的使用率为所述应用在预定时长内对所述本地资源的平均使用率。The method according to claim 5 or 7, wherein the rate of use of the local resource by the application is an average rate of use of the local resource by the application within a predetermined period of time.
  10. 根据权利要求1-9任一项所述的方法,其中,所述终端中待处理的任务包括以下至少之一:The method according to any one of claims 1-9, wherein the tasks to be processed in the terminal include at least one of the following:
    输入数据包,携带所述待处理任务的输入信息;An input data packet, carrying input information of the task to be processed;
    应用程序数据包,携带所述待处理任务所对应的应用程序编码段;An application data packet, carrying the application code segment corresponding to the task to be processed;
    运算过程暂存数据包,携带所述待处理任务所基于的运算过程的暂存结果。The operation process temporarily stores the data packet, and carries the temporary storage result of the operation process on which the task to be processed is based.
  11. 根据权利要求1-10任一项所述的方法,其中,所述外部设备返回的所述外部资源对所述任务的处理结果包括:运算结果数据包,携带对所述任务进行处理后获得的输出信息;The method according to any one of claims 1-10, wherein the processing result of the external resource on the task returned by the external device includes: an operation result data packet carrying a result obtained by processing the task Output information
    接收所述外部设备返回的所述外部资源对所述任务的处理结果之后,还包括:所述终端根据所述运算结果数据包中携带的所述输出信息,通过所述终端与所述输出信息对应的输出接口进行结果输出。After receiving the processing result of the external resource returned by the external device for the task, the method further includes: the terminal according to the output information carried in the operation result data packet, through the terminal and the output information The corresponding output interface outputs the result.
  12. 根据权利要求1-11任一项所述的方法,其中,发送给所述外部设备的所述待处理的任务,在所述终端中对所述本地资源的平均使用率高于用于将所述待处理的任务发送给所述外部设备的无线通信过程对所述本地资源的平均使用率。The method according to any one of claims 1 to 11, wherein the to-be-processed task sent to the external device has an average utilization rate of the local resource in the terminal higher than that used for The average utilization rate of the local resources in the wireless communication process in which the task to be processed is sent to the external device.
  13. 一种终端任务的处理装置,其中,包括:A terminal task processing device, including:
    确定模块,设置为确定终端中本地资源的使用情况是否满足需要使用外部资源的条件,其中,所述需要使用外部资源的条件包括以下至少之一:所述终端中本地资源的使用率高于阈值、所述终端中本地资源被预定应用所使用;The determining module is configured to determine whether the usage of local resources in the terminal meets the conditions for using external resources, wherein the conditions for using external resources include at least one of the following: the utilization rate of local resources in the terminal is higher than a threshold 2. The local resources in the terminal are used by a predetermined application;
    传输模块,设置为在所述确定模块确定所述终端中本地资源的使用情况满足所述需要使用外部资源的条件的情况下,将所述终端中待处理的任务发送给能够处理所述任务的外部设备,以利用所述外部设备上的外部资源来处理所述待处理的任务;以及A transmission module, configured to send a task to be processed in the terminal to a task capable of processing the task when the determination module determines that the use of local resources in the terminal satisfies the condition for using external resources An external device to use external resources on the external device to process the task to be processed; and
    接收模块,设置为接收所述外部设备返回的所述外部资源对所述任务的处理结果。The receiving module is configured to receive the processing result of the external resource on the task returned by the external device.
  14. 一种存储介质,其中,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至12任一项中所述的方法。A storage medium, wherein a computer program is stored in the storage medium, wherein the computer program is configured to execute the method described in any one of claims 1 to 12 when run.
  15. 一种电子装置,包括存储器和处理器,其中,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至12任一项中所述的方法。An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of claims 1 to 12. method.
PCT/CN2019/114747 2018-12-29 2019-10-31 Terminal task processing method and device, storage medium and electronic device WO2020134551A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811643721.9A CN111381960A (en) 2018-12-29 2018-12-29 Terminal task processing method and device, storage medium and electronic device
CN201811643721.9 2018-12-29

Publications (1)

Publication Number Publication Date
WO2020134551A1 true WO2020134551A1 (en) 2020-07-02

Family

ID=71127269

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/114747 WO2020134551A1 (en) 2018-12-29 2019-10-31 Terminal task processing method and device, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN111381960A (en)
WO (1) WO2020134551A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101663647A (en) * 2007-04-25 2010-03-03 高通股份有限公司 Device that determines whether to launch an application locally or remotely as a webapp
CN102170479A (en) * 2011-05-21 2011-08-31 成都市华为赛门铁克科技有限公司 Updating method of Web buffer and updating device of Web buffer
CN103095801A (en) * 2012-12-07 2013-05-08 傲游国际有限公司 Method and device for processing resources automatically with Internet explorer
US20170359415A1 (en) * 2016-06-09 2017-12-14 Apple Inc. Multi-device context store

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548262B (en) * 2015-09-21 2020-11-06 阿里巴巴集团控股有限公司 Scheduling method, device and system for resources for processing tasks
CN105843687A (en) * 2016-03-31 2016-08-10 乐视控股(北京)有限公司 Method and device for quantifying task resource
CN109144714A (en) * 2017-06-19 2019-01-04 中兴通讯股份有限公司 EMS memory management process and device
CN107844374A (en) * 2017-11-02 2018-03-27 上海携程商务有限公司 The task executing method of terminal device, device, electronic equipment, storage medium
CN108170526B (en) * 2017-12-06 2021-04-20 北京像素软件科技股份有限公司 Load capacity optimization method and device, server and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101663647A (en) * 2007-04-25 2010-03-03 高通股份有限公司 Device that determines whether to launch an application locally or remotely as a webapp
CN102170479A (en) * 2011-05-21 2011-08-31 成都市华为赛门铁克科技有限公司 Updating method of Web buffer and updating device of Web buffer
CN103095801A (en) * 2012-12-07 2013-05-08 傲游国际有限公司 Method and device for processing resources automatically with Internet explorer
US20170359415A1 (en) * 2016-06-09 2017-12-14 Apple Inc. Multi-device context store

Also Published As

Publication number Publication date
CN111381960A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
WO2020147627A1 (en) Link selection method and related apparatus
CN108647089B (en) Resource allocation method, device, terminal and storage medium
US11166330B2 (en) Data-stream allocation method for link aggregation and related devices
WO2019042294A1 (en) Resource allocation method and related product
WO2019042171A1 (en) Resource allocation method and product related thereto
US10620697B2 (en) Wireless communication management for virtual reality devices
US11800337B2 (en) Method and apparatus for establishing Bluetooth data channel
US20150350604A1 (en) Method and system for multiparty video conferencing
WO2022143508A1 (en) Method for transmitting data in near field, device and system
CN105472291A (en) Digital video recorder with multiprocessor cluster and realization method of digital video recorder
WO2023174037A1 (en) Resource scheduling method, apparatus and system, device, medium, and program product
WO2014206331A1 (en) Resource access method and computer device
CN114968594A (en) Task processing method and device, electronic equipment and storage medium
WO2020134551A1 (en) Terminal task processing method and device, storage medium and electronic device
WO2023165320A1 (en) Playback parameter configuration method and device
US20160360446A1 (en) Interface shaping for virtual interfaces
WO2023050999A1 (en) Communication processing method and apparatus, electronic device, and storage medium
WO2022110939A1 (en) Device recommendation method and electronic device
US11528678B2 (en) Crowdsourcing and organizing multiple devices to perform an activity
Hong et al. Virtual connection: Selective connection system for energy-efficient wearable consumer electronics
WO2024055328A1 (en) Data stream processing method and apparatus, communication device, and storage medium
US20220374277A1 (en) Methods for Generating Application For Radio-Access-Network Servers with Heterogeneous Accelerators
US20220374262A1 (en) Methods for Offloading A Task From A Processor to Heterogeneous Accelerators
US20230126595A1 (en) Method and apparatus for using local area network as service for edge cloud
CN115994022B (en) Algorithm service calling method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19906389

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 081121)

122 Ep: pct application non-entry in european phase

Ref document number: 19906389

Country of ref document: EP

Kind code of ref document: A1