CN112783623B - Process scheduling method and device, electronic device, and storage medium - Google Patents
Process scheduling method and device, electronic device, and storage medium Download PDFInfo
- Publication number
- CN112783623B CN112783623B CN202110057506.6A CN202110057506A CN112783623B CN 112783623 B CN112783623 B CN 112783623B CN 202110057506 A CN202110057506 A CN 202110057506A CN 112783623 B CN112783623 B CN 112783623B
- Authority
- CN
- China
- Prior art keywords
- execution sequence
- network communication
- application
- priority
- communication process
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 130
- 230000008569 process Effects 0.000 title claims abstract description 91
- 230000006854 communication Effects 0.000 claims abstract description 133
- 238000004891 communication Methods 0.000 claims abstract description 58
- 230000003993 interaction Effects 0.000 claims description 6
- 230000002596 correlated effect Effects 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 claims description 4
- 239000000758 substrate Substances 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 230000004044 response Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 3
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 230000009471 action Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
Abstract
本公开是关于一种进程调度方法及装置、电子设备、存储介质。其中,该方法,包括:在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中;在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。该方法可以在应用程序处于前台的情况下,将该应用程序对应的网络通信进程也调度至优先级较高的执行序列中,进而使得用户在前台对应用程序进行操作时,能够快速执行对网络通信要求较高的业务。
The present disclosure relates to a process scheduling method and device, electronic device, and storage medium. The method includes: when the application is in the foreground, scheduling the main process of the application from the default execution sequence to a first execution sequence with a priority higher than the default execution sequence; when the application includes a network communication process, scheduling the network communication process to a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence. The method can schedule the network communication process corresponding to the application to an execution sequence with a higher priority when the application is in the foreground, thereby enabling the user to quickly execute services with higher network communication requirements when operating the application in the foreground.
Description
技术领域Technical Field
本公开涉及计算机领域,尤其涉及一种进程调度方法及装置、电子设备、存储介质。The present disclosure relates to the field of computers, and in particular to a process scheduling method and device, an electronic device, and a storage medium.
背景技术Background Art
电子设备中的大部分应用程序都需要通过联网,与其他设备进行交互。在这些应用程序中通常需要包含有至少一个网络通信进程,以用于完成上述与其他设备进行交互的操作。Most applications in electronic devices need to be connected to the Internet to interact with other devices. These applications usually need to include at least one network communication process to complete the above-mentioned operations of interacting with other devices.
在相关技术中,网络通信进程被视为对执行效率要求相对较低的一类进程,因此被设计成在优先级较低的执行序列中执行。In the related art, the network communication process is regarded as a type of process with relatively low execution efficiency requirements, and is therefore designed to be executed in an execution sequence with a lower priority.
然而,在实际应用中,除了类似发送消息等对网络通信要求不高的业务以外,还存在对网络通信要求较高的业务。例如,对于群组中的红包抢夺业务、或者外卖员的抢夺订单业务而言,毫秒级的延迟就可能导致业务执行失败。However, in actual applications, in addition to services that do not require high network communication, such as sending messages, there are also services that require high network communication. For example, for the red envelope grabbing service in a group or the order grabbing service for takeaway drivers, a millisecond delay may cause the service execution to fail.
发明内容Summary of the invention
本公开提供一种进程调度方法及装置、电子设备、存储介质,能够在应用程序处于前台的情况下,将该应用程序对应的网络通信进程也调度至优先级较高的执行序列中,进而快速执行对网络通信要求较高的业务。The present disclosure provides a process scheduling method and device, an electronic device, and a storage medium, which can schedule the network communication process corresponding to the application to an execution sequence with a higher priority when the application is in the foreground, thereby quickly executing services with higher network communication requirements.
根据本公开的第一方面,提供一种进程调度方法,包括:According to a first aspect of the present disclosure, a process scheduling method is provided, comprising:
在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中;When the application is in the foreground, scheduling the main process of the application from the default execution sequence to a first execution sequence with a priority higher than the default execution sequence;
在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。In the case where the application includes a network communication process, the network communication process is scheduled to a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
根据本公开的第二方面,提供一种进程调度装置,包括:According to a second aspect of the present disclosure, a process scheduling device is provided, comprising:
第一进程调度单元,在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中;A first process scheduling unit, when the application is in the foreground, schedules the main process of the application from the default execution sequence to a first execution sequence with a priority higher than the default execution sequence;
第二进程调度单元,在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。The second process scheduling unit schedules the network communication process to a second execution sequence when the application includes the network communication process; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
根据本公开的第三方面,提供一种电子设备,包括:According to a third aspect of the present disclosure, there is provided an electronic device, including:
处理器;processor;
用于存储处理器可执行指令的存储器;a memory for storing processor-executable instructions;
其中,所述处理器通过运行所述可执行指令以实现如第一方面所述的方法。The processor implements the method as described in the first aspect by running the executable instructions.
根据本公开的第四方面,提供一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如第一方面所述方法的步骤。According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
在本公开的技术方案中,可以基于应用程序当前所处的状态,对应用程序所包含的进程进行调度。具体的,当检测到应用程序处于前台的情况下,除了将该应用程序的主进程调度至优先级较高的执行序列以外,还进一步将该应用程序包含的网络通信进程也调度至优先级不低于主进程所处执行序列的执行序列中。In the technical solution disclosed in the present invention, the processes included in the application can be scheduled based on the current state of the application. Specifically, when it is detected that the application is in the foreground, in addition to scheduling the main process of the application to an execution sequence with a higher priority, the network communication process included in the application is also scheduled to an execution sequence with a priority not lower than the execution sequence where the main process is located.
应当理解的是,在应用程序处于前台的情况下,意味着该应用程序正在被操作或即将被操作,需要使该应用程序能够迅速基于用户的操作做出反应,因此,应用程序的主进程被调度至优先级较高的执行序列中,以满足上述应用程序对用户操作的即时反应。相应的,应用程序正在被操作或即将被操作,意味着用户很可能需要通过该应用程序与其他设备进行交互。此时,将应用程序中的网络通信进程也调度至优先级较高的执行序列中,能够大幅提高与其他设备的交互效率。尤其在用户正在进行抢红包、抢订单等对交互效率具有极高要求的场景下,能够大幅提高用户抢红包或抢订单的成功率。It should be understood that when the application is in the foreground, it means that the application is being operated or is about to be operated, and it is necessary to enable the application to respond quickly based on the user's operation. Therefore, the main process of the application is scheduled to a higher priority execution sequence to meet the instant response of the above application to the user's operation. Correspondingly, the application is being operated or is about to be operated, which means that the user is likely to need to interact with other devices through the application. At this time, scheduling the network communication process in the application to a higher priority execution sequence can greatly improve the efficiency of interaction with other devices. Especially in scenarios where users are grabbing red envelopes, grabbing orders, etc., which have extremely high requirements for interaction efficiency, the success rate of users grabbing red envelopes or grabbing orders can be greatly improved.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
图1是本公开一示例性实施例示出的一种进程调度方法的流程图;FIG1 is a flow chart of a process scheduling method shown in an exemplary embodiment of the present disclosure;
图2是本公开一示例性实施例示出的另一种进程调度方法的流程图;FIG2 is a flow chart of another process scheduling method shown in an exemplary embodiment of the present disclosure;
图3是本公开一示例性实施例示出的一种进程调度装置的框图;FIG3 is a block diagram of a process scheduling device shown in an exemplary embodiment of the present disclosure;
图4是本公开一示例性实施例示出的另一种进程调度装置的框图;FIG4 is a block diagram of another process scheduling device shown in an exemplary embodiment of the present disclosure;
图5是本公开一示例性实施例中一种电子设备的结构示意图。FIG. 5 is a schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure.
具体实施方式DETAILED DESCRIPTION
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and/or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
电子设备中的大部分应用程序都需要通过联网,与其他设备进行交互。在这些应用程序中通常需要包含有至少一个网络通信进程,以用于完成上述与其他设备进行交互的操作。Most applications in electronic devices need to be connected to the Internet to interact with other devices. These applications usually need to include at least one network communication process to complete the above-mentioned operations of interacting with other devices.
在相关技术中,网络通信进程被视为对执行效率要求相对较低的一类进程,因此被设计成在优先级较低的执行序列中执行。In the related art, the network communication process is regarded as a type of process with relatively low execution efficiency requirements, and is therefore designed to be executed in an execution sequence with a lower priority.
然而,在实际应用中,除了类似发送消息等对网络通信要求不高的业务以外,还存在对网络通信要求较高的业务。例如,对于群组中的红包抢夺业务、或者外卖员的抢夺订单业务而言,毫秒级的延迟就可能导致业务执行失败。However, in actual applications, in addition to services that do not require high network communication, such as sending messages, there are also services that require high network communication. For example, for the red envelope grabbing service in a group or the order grabbing service for takeaway drivers, a millisecond delay may cause the service execution to fail.
由此可见,在执行类似抢夺红包、抢夺订单之类的业务时,若仍采用相关技术中的执行方法,很可能由于网络通信进程在优先级较低的执行序列中执行,而导致无法抢夺到红包或订单。It can be seen from this that when executing tasks such as grabbing red envelopes or grabbing orders, if the execution method in the relevant technology is still used, it is very likely that the red envelopes or orders will not be grabbed because the network communication process is executed in a lower priority execution sequence.
为此,本公开提出了一种进程调度方法,以避免相关技术中由于网络通信进程在优先级较低的序列中执行,而导致对网络通信要求较高的业务的执行成功率不高的问题。To this end, the present disclosure proposes a process scheduling method to avoid the problem in the related art that the execution success rate of services with high network communication requirements is low due to the execution of network communication processes in a sequence with lower priority.
图1为本公开一示例性实施例示出的一种进程调度方法。如图1所示,该方法可以包括以下步骤:FIG1 is a process scheduling method shown in an exemplary embodiment of the present disclosure. As shown in FIG1 , the method may include the following steps:
步骤102,在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中。Step 102: When the application is in the foreground, the main process of the application is scheduled from the default execution sequence to a first execution sequence having a higher priority than the default execution sequence.
本公开技术方案的执行主体可以为任一类型的电子设备,例如,该电子设备可以为智能手机、平板电脑等移动终端,也可以为智能电视、PC(个人计算机,PersonalComputer)等固定终端。应当理解的是,只需能够安装包含网络通信进程的应用程序、且使得该应用程序能够处于前台进行展示的电子设备均可作为本公开中的电子设备,具体将哪一种类型的电子设备作为本公开技术方案的执行主体可以由本领域技术人员根据实际需求确定,本公开对此不作限制。The execution subject of the technical solution of the present disclosure may be any type of electronic device, for example, the electronic device may be a mobile terminal such as a smart phone or a tablet computer, or may be a fixed terminal such as a smart TV or a PC (personal computer). It should be understood that any electronic device that can install an application program containing a network communication process and enable the application program to be displayed in the foreground may be used as the electronic device in the present disclosure, and which type of electronic device is used as the execution subject of the technical solution of the present disclosure may be determined by those skilled in the art according to actual needs, and the present disclosure does not limit this.
由上述介绍可知,相关技术中将网络通信进程视为对网络通信要求不高的一类进程,因此通常将其设计成在优先级较低的执行序列中执行。之所以认为网络通信进程对网络通信要求不高,是由于相关技术中仅考虑到网络通信进程用于:类似消息发送、语音沟通等对网络通信要求并不是特别高的业务,应当理解的是,对于消息发送、语音沟通之类的业务存在几毫秒,甚至是几秒的延迟并不会有太大的影响。然而,随着用户业务需求的不断增加,出现了大量对网络通信要求极高的业务,例如,在即时应用程序的群组中常出现的红包抢夺业务,毫秒级的延迟便会影响到红包抢夺的结果;再例如,随着外卖行业的竞争愈发激烈,外卖员需要在应用程序上抢夺订单,才能够获得派单任务,同样是毫秒级的延迟便会影响抢单结果。From the above introduction, it can be seen that in the related technology, the network communication process is regarded as a type of process that does not require high network communication, so it is usually designed to be executed in a lower priority execution sequence. The reason why the network communication process is considered to have low requirements for network communication is that the related technology only considers that the network communication process is used for services such as message sending and voice communication that do not require particularly high network communication. It should be understood that for services such as message sending and voice communication, a delay of several milliseconds or even seconds will not have much impact. However, with the continuous increase in user business needs, a large number of services with extremely high requirements for network communication have emerged. For example, the red envelope snatching business that often appears in the group of instant application programs, a millisecond delay will affect the result of the red envelope snatching; for another example, with the increasingly fierce competition in the food delivery industry, food delivery drivers need to snatch orders on the application program in order to obtain the dispatching task, and the same millisecond delay will affect the result of the order snatching.
步骤104,在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。Step 104: When the application includes a network communication process, the network communication process is scheduled to a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
基于上述原因,本公开不再单纯地将应用程序的网络通信进程放在优先级较低的执行序列中执行,而是会根据应用程序的状况,对网络通信进程所处的执行序列进行调度,以适时地提高网络通信质量,进而提高了上述对网络通信要求较高的业务的执行成功率。Based on the above reasons, the present invention no longer simply places the network communication process of the application in an execution sequence with a lower priority, but schedules the execution sequence of the network communication process according to the status of the application, so as to improve the quality of network communication in a timely manner, thereby improving the execution success rate of the above-mentioned services with higher requirements for network communication.
具体的,本公开可以对应用程序是否处于前台进行监测。在确定应用程序处于前台的情况下,一方面可以将应用程序的主程序由默认执行序列调度至优先级高于该默认执行序列的第一执行序列中;另一方面,若该应用程序中包含网络通信进程,可以进一步将该网络通信进程调至优先级不低于第一执行序列的第二执行序列中。Specifically, the present disclosure can monitor whether an application is in the foreground. When it is determined that the application is in the foreground, on the one hand, the main program of the application can be scheduled from the default execution sequence to a first execution sequence with a priority higher than the default execution sequence; on the other hand, if the application includes a network communication process, the network communication process can be further adjusted to a second execution sequence with a priority not lower than the first execution sequence.
应当理解的是,应用程序在不处于前台的情况下,例如,在后台运行的情况下,意味着用户并未对该应用程序进行操作,应用程序也就无需基于用户的操作进行即时反应,此时,应用程序的主进程在优先级较低的默认执行序列中执行即可。而在应用程序处于前台的情况下,意味着用户需要在该应用程序上进行操作,应用程序需要对用户的操作进行即时反应,此时,即可将该应用程序的主进程由上述默认执行序列调度至优先级高于默认执行序列的第一执行序列中,以提高应用程序的反应速度。不难理解的是,在第一执行序列中执行的主程序能够使应用程序对用户的操作即时进行反应,显然是优先级较高的执行序列。试想,若第一执行序列不为优先级较高的执行序列,必然不可能做到对用户操作进行即时反应,例如,当用户上下滑动某一会话页面时,若第一执行序列优先级不高,会话页面便无法随手指划动而滑动。可见,第一执行序列必然是优先级较高的执行序列(主进程在其中执行时,应用程序对用户操作的反应速度通常是毫秒级的)。在此基础上,本公开进一步将应用程序中包含的网络通信进程调度至优先级不低于第一执行序列的第二执行序列中,意味着网络通信进程所处执行序列的优先级与主进程所处执行序列一致或更高。换言之,网络通信进程在第二序列中执行能够大幅提高网络通信质量,进而使得在红包抢夺等业务中能够提高业务执行的成功率。It should be understood that when the application is not in the foreground, for example, when it is running in the background, it means that the user has not operated the application, and the application does not need to respond immediately based on the user's operation. At this time, the main process of the application can be executed in the default execution sequence with a lower priority. When the application is in the foreground, it means that the user needs to operate on the application, and the application needs to respond immediately to the user's operation. At this time, the main process of the application can be scheduled from the above-mentioned default execution sequence to the first execution sequence with a higher priority than the default execution sequence to improve the response speed of the application. It is not difficult to understand that the main program executed in the first execution sequence can enable the application to respond immediately to the user's operation, which is obviously an execution sequence with a higher priority. Imagine that if the first execution sequence is not an execution sequence with a higher priority, it is impossible to respond immediately to the user's operation. For example, when the user slides up and down a certain session page, if the priority of the first execution sequence is not high, the session page cannot slide with the finger. It can be seen that the first execution sequence must be an execution sequence with a higher priority (when the main process is executed in it, the application's response speed to user operations is usually in milliseconds). On this basis, the present disclosure further schedules the network communication process included in the application to a second execution sequence whose priority is not lower than that of the first execution sequence, which means that the priority of the execution sequence in which the network communication process is located is consistent with or higher than that of the execution sequence in which the main process is located. In other words, the execution of the network communication process in the second sequence can greatly improve the quality of network communication, thereby improving the success rate of business execution in services such as red envelope snatching.
在本公开中,将应用程序中包含的网络通信进程调度至优先级不低于第一执行序列的第二执行序列中可以通过以下方式实现:将网络通信进程的标识符写入到用于存储第二执行序列中的进程的文件节点中。In the present disclosure, scheduling the network communication process included in the application to the second execution sequence having a priority not lower than the first execution sequence can be achieved by writing the identifier of the network communication process into the file node used to store the process in the second execution sequence.
在本公开中,应用程序的主进程用于使该应用程序正常运行,其中最主要用于展示应用程序的交互界面,以根据用户的操作进行即时反应。In the present disclosure, the main process of an application is used to enable the application to run normally, and is mainly used to display the interactive interface of the application to respond instantly according to the user's operation.
在本公开中,可以基于进程的名称确定进程的类型。具体的,可以优先确定应用程序对应的各个进程的名称;再判断各个进程的名称中是否包含与网络通信相关的标识信息,若其中任一进程的名称中包含与网络通信相关的标识信息,则可以将该任一进程确定为该应用程序中包含的网络通信进程。In the present disclosure, the type of a process can be determined based on the name of the process. Specifically, the names of the processes corresponding to the application can be determined first; then it is determined whether the names of the processes contain identification information related to network communication. If the name of any process contains identification information related to network communication, then the process can be determined as a network communication process included in the application.
举例而言,假设某一进程的名称为com.tencent.mm.push,其中包含的push即为与网络通信进程相关的标识信息,此时可以将该进程确定为网络通信进程,进而将其加入上述第二执行序列中。For example, assuming that the name of a process is com.tencent.mm.push, in which push is identification information related to the network communication process, the process can be determined as a network communication process and then added to the second execution sequence.
在本公开中,执行序列的优先级在不同情况下可以由不同的因素决定。In the present disclosure, the priority of the execution sequence may be determined by different factors in different situations.
在一种情况下,执行序列的优先级可以与所调用的处理器核心相关,具体的,优先级相对较高的执行序列调用的处理器核心的性能,优于优先级相对较低的执行序列调用的处理器核心的性能,以上述默认执行序列、第一执行序列和第二执行序列为例(此处举例第二执行序列的优先级高于第一执行序列的优先级),第二执行序列调用的处理器核心的性能,优于第一执行序列调用的处理器核心的性能;而第一执行序列调用的处理器核心的性能,优于第二执行序列调用的处理器核心的性能。In one case, the priority of an execution sequence may be related to the called processor core. Specifically, the performance of a processor core called by an execution sequence with a relatively higher priority is better than the performance of a processor core called by an execution sequence with a relatively lower priority. Taking the above-mentioned default execution sequence, the first execution sequence, and the second execution sequence as examples (here the priority of the second execution sequence is higher than the priority of the first execution sequence), the performance of the processor core called by the second execution sequence is better than the performance of the processor core called by the first execution sequence; and the performance of the processor core called by the first execution sequence is better than the performance of the processor core called by the second execution sequence.
在另一种情况下,执行序列的优先级可以与所包含进程的执行顺序相关,具体的,优先级相对较高的执行序列中的进程,早于优先级相对较低的执行序列中的进程被执行,仍以上述默认执行序列、第一执行序列和第二执行序列为例(此处举例第二执行序列的优先级高于第一执行序列的优先级),当三者中均存在进程时,优先执行第二执行序列中包含的进程,再执行第一执行序列中包含的进程,最后执行默认执行序列中包含的进程。In another case, the priority of the execution sequence may be related to the execution order of the processes included therein. Specifically, a process in an execution sequence with a relatively higher priority is executed earlier than a process in an execution sequence with a relatively lower priority. Taking the above-mentioned default execution sequence, the first execution sequence, and the second execution sequence as an example (here the priority of the second execution sequence is higher than the priority of the first execution sequence), when there are processes in all three, the processes included in the second execution sequence are executed first, followed by the processes included in the first execution sequence, and finally the processes included in the default execution sequence.
在又一种情况下,优先级相对较高的执行序列不仅调用的处理器核心的性能,优于优先级相对较低的执行序列调用的处理器核心的性能,且其包含的进程也早于优先级相对较低的执行序列中的进程被执行。In another case, the relatively higher priority execution sequence not only calls a processor core with better performance than the processor core called by the relatively lower priority execution sequence, but also the processes contained therein are executed earlier than the processes in the relatively lower priority execution sequence.
当然,上述举例仅是示意性的,应当理解的是,执行序列的优先级体现在哪些方面可以由本领域技术人员根据实际情况确定,本公开对此不作限制。Of course, the above examples are only illustrative, and it should be understood that the aspects in which the priority of the execution sequence is reflected can be determined by those skilled in the art according to actual conditions, and the present disclosure does not limit this.
需要声明的是,本公开中执行序列调用的处理器核心的性能优劣,可以取决于该执行序列所调用处理器核心的数量,也可以取决于所调用的单个处理器核心的性能。仍以上述默认执行序列、第一执行序列和第二执行序列为例(此处第二执行序列的优先级高于第一执行序列的优先级)进行举例:若取决于单个处理器核心的性能,那么,第二执行序列调用的处理器核心可以为性能最优的处理器核心,如传统意义上的超大核;第一执行序列调用的处理器核心可以为性能中等的处理器核心,如传统意义上的大核;默认执行序列调用的处理器核心可以为性能较差的处理器核心,如传统意义上的小核;若取决于所调用的处理器核心的数量,那么,在第二执行序列调用的处理器核心为3个时,第一执行序列调用的处理器核心可以为2个,而默认执行序列调用的处理器核心可以为1个。It should be stated that the performance of the processor core called by the execution sequence in the present disclosure may depend on the number of processor cores called by the execution sequence, or on the performance of a single processor core called. Still taking the above-mentioned default execution sequence, the first execution sequence and the second execution sequence as examples (here the priority of the second execution sequence is higher than the priority of the first execution sequence) as examples: if it depends on the performance of a single processor core, then the processor core called by the second execution sequence may be the processor core with the best performance, such as the traditional super-large core; the processor core called by the first execution sequence may be a processor core with medium performance, such as the traditional large core; the processor core called by the default execution sequence may be a processor core with poor performance, such as the traditional small core; if it depends on the number of processor cores called, then when the second execution sequence calls three processor cores, the first execution sequence may call two processor cores, and the default execution sequence may call one processor core.
当然,执行序列调用的处理器核心的性能优劣,也可以与所调用处理器核心的数量、单个处理器核心的性能均相关。例如,在实际应用中,在内存中通常预先构建有top-app执行序列,通常可以调用1个超大核和3个大核;还构建有前台执行序列和后台执行序列,其中,前台执行序列通常可以调用3个大核,而后台执行序列只能调用3个小核。Of course, the performance of the processor core called by the execution sequence can also be related to the number of processor cores called and the performance of a single processor core. For example, in actual applications, a top-app execution sequence is usually pre-built in memory, which can usually call 1 super core and 3 large cores; a foreground execution sequence and a background execution sequence are also built, where the foreground execution sequence can usually call 3 large cores, while the background execution sequence can only call 3 small cores.
在本公开中,当确定应用程序中包含网络通信进程时,还可以通过将处理器或处理器中与第二执行序列相关的核心切换为性能增强模式,以提高网络通信进行的执行效率,进而提高网络通信服务质量。例如,可以通过将存储有处理器频率的节点文件中的与处理器频率有关的数值修改为更高值,来将处理器切换为性能增强模式。类似的方法也适用于处理器中与第二执行序列相关的核心。In the present disclosure, when it is determined that the application includes a network communication process, the execution efficiency of the network communication can be improved by switching the processor or the core in the processor related to the second execution sequence to a performance enhancement mode, thereby improving the quality of network communication services. For example, the processor can be switched to a performance enhancement mode by modifying the value related to the processor frequency in the node file storing the processor frequency to a higher value. A similar method is also applicable to the core in the processor related to the second execution sequence.
由于本公开将网络通信进程调度至第二执行序列中的目的是为了提高网络通信质量,本公开还可以在确定应用程序中包含网络通信进程的情况下,进一步确定该网络通信进程是否用于执行高通信要求业务。当确定网络通信进程用于执行高通信要求业务时,即可将网络通信进程调度至第二执行序列中。其中,该高通信要求业务指的是:对网络通信质量要求较高的业务,其执行成功率通常与网络通信质量呈正相关。例如,该高通信要求业务可以为上述红包抢夺业务、订单抢夺业务。Since the purpose of the present disclosure to schedule the network communication process to the second execution sequence is to improve the quality of network communication, the present disclosure can also further determine whether the network communication process is used to execute a high communication requirement service when it is determined that the network communication process is included in the application. When it is determined that the network communication process is used to execute a high communication requirement service, the network communication process can be scheduled to the second execution sequence. Among them, the high communication requirement service refers to: a service that has high requirements for network communication quality, and its execution success rate is usually positively correlated with the network communication quality. For example, the high communication requirement service can be the above-mentioned red envelope grabbing service and order grabbing service.
本公开中的网络通信质量可以从多个维度进行衡量。例如该网络通信质量可以仅代表网络传输速度,在该情况下,上述高通信要求业务的执行成功率与网络传输速度呈正相关;再例如,在网络传输速度的基础上,该网络通信质量还与网络的稳定性相关。The network communication quality in the present disclosure can be measured from multiple dimensions. For example, the network communication quality can only represent the network transmission speed. In this case, the execution success rate of the above-mentioned high communication requirement services is positively correlated with the network transmission speed; for another example, based on the network transmission speed, the network communication quality is also related to the stability of the network.
应当理解的是,不同的执行序列的优先级通常是不同的。因此,在第二执行序列与第一执行序列的优先级一致时,第二执行序列和第一执行序列可以为同一执行序列。例如,承接上述top-app执行序列的举例,若应用程序的主进程被调度至top-app执行序列中,那么,该应用程序的网络通信进程也可以被调度至top-app执行序列中。It should be understood that different execution sequences usually have different priorities. Therefore, when the second execution sequence has the same priority as the first execution sequence, the second execution sequence and the first execution sequence may be the same execution sequence. For example, following the example of the top-app execution sequence, if the main process of the application is scheduled to the top-app execution sequence, then the network communication process of the application may also be scheduled to the top-app execution sequence.
由上述技术方案可知,本公开可以在应用程序处于前台的情况下,将应用程序的主进程调度至优先级较高的执行序列中,以使应用程序能够对用户的操作进行即时反应。其中,当该应用程序还包括网络通信进程时,还将该网络通信进程进一步调度至优先级不低于主进程所处执行序列的执行序列中,使得网络通信进程也能够处于优先级较高的执行序列中执行。显然,由于网络通信进程处于优先级较高的执行序列中,使得该应用程序的网络通信质量也被大幅提高,当该应用程序中存在高通信要求业务需要被执行时,该高通信要求业务能够快速被执行。例如,在该高通信要求业务为红包抢夺业务时,即可快速向服务器发送抢夺红包的指令,以提高红包抢夺的成功率。It can be seen from the above technical solution that the present disclosure can schedule the main process of the application to an execution sequence with a higher priority when the application is in the foreground, so that the application can respond immediately to the user's operation. Wherein, when the application also includes a network communication process, the network communication process is further scheduled to an execution sequence with a priority not lower than the execution sequence in which the main process is located, so that the network communication process can also be executed in an execution sequence with a higher priority. Obviously, since the network communication process is in an execution sequence with a higher priority, the network communication quality of the application is also greatly improved. When there is a high communication requirement service in the application that needs to be executed, the high communication requirement service can be quickly executed. For example, when the high communication requirement service is a red envelope snatching service, an instruction to snatch the red envelope can be quickly sent to the server to improve the success rate of the red envelope snatching.
进一步的,本公开还可以进一步确认应用程序中的网络通信进程是否用于执行上述高通信要求业务,且仅在确定用于执行高通信要求业务时,才将网络通信进程调度至优先级较高的执行序列中,能够有效避免在网络通信进程未用于执行高通信要求业务时,仍将网络通信进程调度至优先级较高的执行序列中,而占用高性能处理资源的问题。Furthermore, the present disclosure can further confirm whether the network communication process in the application is used to execute the above-mentioned high communication requirement business, and only when it is determined to be used to execute the high communication requirement business, the network communication process will be scheduled to a higher priority execution sequence. This can effectively avoid the problem of scheduling the network communication process to a higher priority execution sequence when the network communication process is not used to execute the high communication requirement business, thereby occupying high-performance processing resources.
下面,通过具体实施例的方式对本公开的技术方案进行介绍。The technical solution of the present disclosure is introduced below by way of specific embodiments.
图2为本公开一示例性实施例示出的另一种进程调度方法的流程图。如图2所示,该方法包括以下步骤:FIG2 is a flow chart of another process scheduling method shown in an exemplary embodiment of the present disclosure. As shown in FIG2, the method includes the following steps:
步骤201,在内存中创建若干执行序列。Step 201, create several execution sequences in the memory.
在本实施例中,可以预先在内存中创建若干执行序列。具体的,可以在电子设备启动时创建这些执行序列。In this embodiment, several execution sequences may be created in the memory in advance. Specifically, these execution sequences may be created when the electronic device is started.
举例而言,可以创建执行序列A、B和C。For example, execution sequences A, B, and C may be created.
步骤202,为若干执行序列设置优先级。Step 202: setting priorities for a number of execution sequences.
在本实施例中,还可以进一步为创建的执行序列设置优先级,例如,可以为执行序列A、B、C的优先级设置为1、2、3。In this embodiment, priorities may be further set for the created execution sequences. For example, the priorities of the execution sequences A, B, and C may be set to 1, 2, and 3.
假设本实施例中的电子设备搭载了一个8核处理器,其中,包含1个超大核、3个大核和4个小核。那么,在该过程中,还需配置各个执行序列所能调度的处理器核心,例如,可以将执行序列A配置为:可以调度1个超大核和2个大核;将执行序列B配置为:可以调度1个大核和2个小核;将执行序列C配置为:可以调度2个小核。显然,在该配置下,执行序列A所能调用的处理器核心的总性能优于执行序列B,而执行序列B所能调用的处理器核心的总性能优于执行序列C。Assume that the electronic device in this embodiment is equipped with an 8-core processor, which includes 1 super-large core, 3 large cores and 4 small cores. Then, in this process, it is also necessary to configure the processor cores that can be scheduled by each execution sequence. For example, execution sequence A can be configured to: schedule 1 super-large core and 2 large cores; execution sequence B can be configured to: schedule 1 large core and 2 small cores; and execution sequence C can be configured to: schedule 2 small cores. Obviously, under this configuration, the total performance of the processor cores that can be called by execution sequence A is better than that of execution sequence B, and the total performance of the processor cores that can be called by execution sequence B is better than that of execution sequence C.
在本步骤中,还可以进一步对任一应用程序在不同状况下,其所包含的进程分别处于哪一执行序列中进行设置。例如,对于即时通信应用Y的主进程,可以设置成:若即时通信应用Y处于前台,那么将其调度至执行序列A中;若即时通信应用Y处于后台,那么将其调度至执行序列B中。In this step, it is also possible to further set the execution sequence of each process contained in any application under different conditions. For example, for the main process of instant messaging application Y, it can be set as follows: if instant messaging application Y is in the foreground, it is scheduled to execution sequence A; if instant messaging application Y is in the background, it is scheduled to execution sequence B.
需要声明的是,步骤201和步骤202可以在应用程序启动之前的任一时刻执行,例如,可以如上所述在电子设备启动时执行;再例如,可以在电子设备出厂之前便已经在内存中创建和配置。It should be noted that step 201 and step 202 can be executed at any time before the application is started, for example, they can be executed when the electronic device is started as described above; for another example, they can be created and configured in the memory before the electronic device leaves the factory.
步骤203,判断应用程序是否处于前台;若是,则执行步骤204,否则,执行步骤206。Step 203, determine whether the application is in the foreground; if so, execute step 204, otherwise, execute step 206.
在本实施例中,任一应用程序在启动之后,可以根据其所处状况,将其主进程调度至不同的执行序列中。In this embodiment, after any application is started, its main process can be scheduled to different execution sequences according to the situation in which it is in.
仍以上述即时通信应用Y为例,若即时通信应用Y当前处于前台,那么可以将其调度至执行序列A中;若即时通信应用Y当前处于后台,那么可以将其调度至执行序列B中。Still taking the instant messaging application Y as an example, if the instant messaging application Y is currently in the foreground, it can be scheduled to the execution sequence A; if the instant messaging application Y is currently in the background, it can be scheduled to the execution sequence B.
步骤204,将应用程序的主进程由默认执行序列调度至第一执行序列。Step 204: Schedule the main process of the application from the default execution sequence to the first execution sequence.
承接上述举例,对于即时通信应用Y而言,执行序列B即为默认执行序列,执行序列A即为第一执行序列。Continuing with the above example, for instant messaging application Y, execution sequence B is the default execution sequence, and execution sequence A is the first execution sequence.
步骤205,将应用程序的网络通信进程由默认执行序列调度至第二执行序列。Step 205: Schedule the network communication process of the application program from the default execution sequence to the second execution sequence.
承接上述举例,由于不存在优先级高于执行序列A的执行序列,因此,可以将即时通信应用Y的网络进程也调度至执行序列A中,该情况即为上文中第一执行序列与第二执行序列的优先级一致的情况,此时,第一执行序列与第二执行序列为同一执行序列。Continuing with the above example, since there is no execution sequence with a higher priority than execution sequence A, the network process of instant messaging application Y can also be scheduled to execution sequence A. This situation is the situation where the priorities of the first execution sequence and the second execution sequence are the same. At this time, the first execution sequence and the second execution sequence are the same execution sequence.
应当理解的是,若当前用户在即时通信应用Y中的任一群组中抢红包,由于即时通信应用Y的网络通信进程处于优先级较高的执行序列中,能够更为快速地与其他设备进行交互,例如,可以更快地根据用户操作向即时通信应用Y的远程服务器发送红包抢夺指令,进而使用户更有可能抢到红包。It should be understood that if the current user grabs a red envelope in any group in instant messaging application Y, since the network communication process of instant messaging application Y is in a higher priority execution sequence, it can interact with other devices more quickly. For example, it can send red envelope grabbing instructions to the remote server of instant messaging application Y more quickly based on user operations, thereby making it more likely for the user to grab a red envelope.
步骤206,将主进程调度至默认执行序列中。Step 206, schedule the main process to the default execution sequence.
由上述技术方案可知,通过本公开的技术方案,能够在应用程序处于前台的情况下,将应用程序的网络通信进程也调度至优先级较高的执行序列中,使得本公开能够更加迅速地与其他设备进行交互,进而提高类似抢红包之类对网络通信质量要求较高的业务的执行成功率。It can be seen from the above technical scheme that through the technical scheme of the present invention, when the application is in the foreground, the network communication process of the application can also be scheduled to an execution sequence with a higher priority, so that the present invention can interact with other devices more quickly, thereby improving the execution success rate of services such as grabbing red envelopes that have high requirements for network communication quality.
图3是本公开一示例性实施例示出的一种进程调度装置的框图。参照图3,该装置包括第一进程调度单元301和第二进程调度单元302。Fig. 3 is a block diagram of a process scheduling device according to an exemplary embodiment of the present disclosure. Referring to Fig. 3 , the device includes a first process scheduling unit 301 and a second process scheduling unit 302 .
第一进程调度单元301,被配置为在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中;The first process scheduling unit 301 is configured to schedule the main process of the application from the default execution sequence to a first execution sequence having a higher priority than the default execution sequence when the application is in the foreground;
第二进程调度单元302,被配置为在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。The second process scheduling unit 302 is configured to schedule the network communication process to a second execution sequence when the application includes the network communication process; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
可选的,所述主进程用于展示所述应用程序的用户交互界面。Optionally, the main process is used to display a user interaction interface of the application.
可选的,所述第二进程执行单元302进一步被配置为:Optionally, the second process execution unit 302 is further configured to:
在确定所述应用程序中包含网络通信进程、且所述网络通信进程用于完成高通信要求业务的情况下,将所述网络通信进程调度至第二执行序列中;When it is determined that the application includes a network communication process and the network communication process is used to complete a service with high communication requirements, scheduling the network communication process to a second execution sequence;
其中,所述高通信要求业务的执行成功率与网络通信质量呈正相关。The execution success rate of the high communication requirement service is positively correlated with the network communication quality.
可选的,所述高通信要求业务包括下述至少之一:Optionally, the high communication requirement service includes at least one of the following:
红包发放业务和订单抢夺业务。Red envelope distribution business and order grabbing business.
可选的,Optional,
优先级相对较高的执行序列调用的处理器核心的性能,优于优先级相对较低的执行序列调用的处理器核心的性能;和/或,The performance of a processor core executing a sequence call with a relatively higher priority is better than the performance of a processor core executing a sequence call with a relatively lower priority; and/or,
优先级相对较高的执行序列中的进程,早于优先级相对较低的执行序列中的进程被执行。Processes in the execution sequence with relatively higher priorities are executed earlier than processes in the execution sequence with relatively lower priorities.
如图4所示,图4是本公开一示例性实施例示出的另一种进程调度装置的框图,该实施例在前述图3所示实施例的基础上,还包括:确定单元303和切换单元304。As shown in FIG. 4 , FIG. 4 is a block diagram of another process scheduling device shown in an exemplary embodiment of the present disclosure. Based on the embodiment shown in FIG. 3 , this embodiment further includes: a determining unit 303 and a switching unit 304 .
可选的,还包括:Optionally, also include:
确定单元303,被配置为确定所述应用程序对应的各个进程的名称;在确定任一进程的名称中包含与网络通信相关的标识信息的情况下,将所述任一进程确定为所述应用程序中包含的网络通信进程。The determining unit 303 is configured to determine the names of each process corresponding to the application; when it is determined that the name of any process contains identification information related to network communication, determine the any process as a network communication process included in the application.
可选的,Optional,
切换单元304,被配置为在确定所述应用程序中包含网络通信进程的情况下,将处理器或处理器中与所述第二执行序列相关的核心切换为性能增强模式。The switching unit 304 is configured to switch the processor or the core in the processor related to the second execution sequence to a performance enhancement mode when it is determined that the application includes a network communication process.
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本公开方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art can understand and implement it without paying any creative work.
相应的,本公开还提供一种进程调度装置,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为实现如上述实施例中任一所述的进程调度方法,比如该方法可以包括:在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中;在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。Accordingly, the present disclosure also provides a process scheduling device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor is configured to implement a process scheduling method as described in any of the above embodiments, for example, the method may include: when the application is in the foreground, scheduling the main process of the application from a default execution sequence to a first execution sequence whose priority is higher than the default execution sequence; when the application includes a network communication process, scheduling the network communication process to a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
相应的,本公开还提供一种电子设备,所述电子设备包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于实现如上述实施例中任一所述的进程调度方法的指令,比如该方法可以包括:在应用程序处于前台的情况下,将所述应用程序的主进程由默认执行序列调度至优先级高于所述默认执行序列的第一执行序列中;在所述应用程序中包含网络通信进程的情况下,将所述网络通信进程调度至第二执行序列中;所述第二执行序列的优先级不低于所述第一执行序列的优先级。Accordingly, the present disclosure also provides an electronic device, which includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for implementing a process scheduling method as described in any of the above embodiments. For example, the method may include: when an application is in the foreground, scheduling the main process of the application from a default execution sequence to a first execution sequence whose priority is higher than the default execution sequence; when the application includes a network communication process, scheduling the network communication process to a second execution sequence; the priority of the second execution sequence is not lower than the priority of the first execution sequence.
图5是根据一示例性实施例示出的一种用于实现进程调度方法的装置500的框图。例如,装置500可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 5 is a block diagram of a device 500 for implementing a process scheduling method according to an exemplary embodiment. For example, the device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
参照图5,装置500可以包括以下一个或多个组件:处理组件502,存储器504,电源组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。5 , the device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input/output (I/O) interface 512 , a sensor component 514 , and a communication component 516 .
处理组件502通常控制装置500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器520来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
存储器504被配置为存储各种类型的数据以支持在装置500的操作。这些数据的示例包括用于在装置500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电源组件506为装置500的各种组件提供电力。电源组件506可以包括电源管理系统,一个或多个电源,及其他与为装置500生成、管理和分配电力相关联的组件。The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.
多媒体组件508包括在所述装置500和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个前置摄像头和/或后置摄像头。当装置500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and/or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当装置500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。The audio component 510 is configured to output and/or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
I/O接口512为处理组件502和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。I/O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
传感器组件514包括一个或多个传感器,用于为装置500提供各个方面的状态评估。例如,传感器组件514可以检测到装置500的打开/关闭状态,组件的相对定位,例如所述组件为装置500的显示器和小键盘,传感器组件514还可以检测装置500或装置500一个组件的位置改变,用户与装置500接触的存在或不存在,装置500方位或加速/减速和装置500的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open/closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration/deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件516被配置为便于装置500和其他设备之间有线或无线方式的通信。装置500可以接入基于通信标准的无线网络,如WiFi,2G或3G,4G LTE、5G NR(New Radio)或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio) or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the apparatus 500 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器504,上述指令可由装置500的处理器520执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
以上所述仅为本公开的较佳实施例而已,并不用以限制本公开,凡在本公开的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本公开保护的范围之内。The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110057506.6A CN112783623B (en) | 2021-01-15 | 2021-01-15 | Process scheduling method and device, electronic device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110057506.6A CN112783623B (en) | 2021-01-15 | 2021-01-15 | Process scheduling method and device, electronic device, and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112783623A CN112783623A (en) | 2021-05-11 |
CN112783623B true CN112783623B (en) | 2024-11-05 |
Family
ID=75757139
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110057506.6A Active CN112783623B (en) | 2021-01-15 | 2021-01-15 | Process scheduling method and device, electronic device, and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112783623B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114912970A (en) * | 2022-03-30 | 2022-08-16 | 南京领行科技股份有限公司 | An order processing method, device, electronic device and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107479954A (en) * | 2017-07-31 | 2017-12-15 | 广东欧珀移动通信有限公司 | process management method, device, storage medium and electronic equipment |
CN111026456A (en) * | 2019-11-29 | 2020-04-17 | 惠州Tcl移动通信有限公司 | Application management method and device, storage medium and electronic equipment |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7774781B2 (en) * | 2005-09-30 | 2010-08-10 | Intel Corporation | Storage subsystem access prioritization by system process and foreground application identification |
GB2444518A (en) * | 2006-12-07 | 2008-06-11 | Symbian Software Ltd | Process priority profiles in a computer system |
CN106502778A (en) * | 2016-10-26 | 2017-03-15 | 深圳市金立通信设备有限公司 | A kind of terminal and its process scheduling optimization method |
-
2021
- 2021-01-15 CN CN202110057506.6A patent/CN112783623B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107479954A (en) * | 2017-07-31 | 2017-12-15 | 广东欧珀移动通信有限公司 | process management method, device, storage medium and electronic equipment |
CN111026456A (en) * | 2019-11-29 | 2020-04-17 | 惠州Tcl移动通信有限公司 | Application management method and device, storage medium and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112783623A (en) | 2021-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10938756B2 (en) | Task management based on instant message | |
US20180035169A1 (en) | Method, apparatus, host terminal and system for processing live broadcasting information | |
CN112947823A (en) | Session processing method, device, equipment and storage medium | |
KR20210134675A (en) | Method and system for learning and executing instructions through user demonstration | |
CN107888965B (en) | Image gift display method and device, terminal, system and storage medium | |
WO2017028424A1 (en) | Method, apparatus and terminal device for game in chat interface | |
WO2022068642A1 (en) | Message display method and electronic device | |
WO2022057393A1 (en) | Event processing method and apparatus, storage medium, mobile terminal, and computer | |
EP3232325B1 (en) | Method and device for starting application interface | |
EP4054198A1 (en) | Live broadcast method and apparatus, electronic device, and storage medium | |
CN112783623B (en) | Process scheduling method and device, electronic device, and storage medium | |
CN113726954B (en) | Control method of Near Field Communication (NFC) function and electronic equipment | |
US20170201479A1 (en) | Group message display method, device and medium | |
CN109960444B (en) | Method, device and equipment for presenting shortcut of application program | |
JP6441385B2 (en) | Information input method, apparatus, program, and recording medium | |
CN109491655A (en) | A kind of incoming event processing method and processing device | |
CN108984294A (en) | Resource regulating method, device and storage medium | |
US20160373504A1 (en) | Method for sharing a digital content during communication | |
CN109889662B (en) | Information forwarding method and device, electronic equipment and computer readable storage medium | |
CN109976549B (en) | Data processing method, device and machine readable medium | |
CN111083570A (en) | Message processing method and device, electronic equipment and storage medium | |
CN111526084A (en) | Information processing method, device, equipment and storage medium | |
CN115033821B (en) | Document display method and device, electronic equipment and storage medium | |
CN112769681B (en) | Session display method and device, electronic equipment and storage medium | |
CN109375959B (en) | Method and device for directionally pulling up application |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |