CN106445841A - A data transmission control method and device - Google Patents
A data transmission control method and device Download PDFInfo
- Publication number
- CN106445841A CN106445841A CN201610860194.1A CN201610860194A CN106445841A CN 106445841 A CN106445841 A CN 106445841A CN 201610860194 A CN201610860194 A CN 201610860194A CN 106445841 A CN106445841 A CN 106445841A
- Authority
- CN
- China
- Prior art keywords
- frequency
- target
- buffer
- upload
- data
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0866—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Description
技术领域technical field
本发明涉及终端技术领域,尤其涉及一种数据传输控制方法和装置。The present invention relates to the technical field of terminals, in particular to a data transmission control method and device.
背景技术Background technique
随着互联网的发展和移动通信网络的发展,同时也伴随着终端的处理能力和存储能力的迅猛发展,海量的应用得到了迅速传播和使用。在半导体元件中往往有多个时钟域,FIFO(First Input First Output,先入先出队列)缓存作为一种有效的方法,被广泛的应用在跨时钟域的数据传输中。With the development of the Internet and mobile communication networks, as well as the rapid development of terminal processing and storage capabilities, a large number of applications have been rapidly spread and used. There are often multiple clock domains in semiconductor components, and FIFO (First Input First Output) buffering, as an effective method, is widely used in data transmission across clock domains.
目前,很多传感器都支持FIFO模式,可以将传感器获取的数据存储到FIFO缓存器中,当FIFO缓存器存满之后,再将数据上传给处理器。然而,不同应用对数据上传频率要求不同,而现有终端中FIFO缓存器的深度是固定的,不随应用场景变化而变化,若要求上传频率较低,而实际上传频率高于所需要的上传频率,则会增加系统负担,导致终端功耗较大。At present, many sensors support FIFO mode, which can store the data acquired by the sensor in the FIFO buffer, and upload the data to the processor when the FIFO buffer is full. However, different applications have different requirements for data upload frequency, and the depth of the FIFO buffer in the existing terminal is fixed and does not change with the application scenario. If the upload frequency is required to be low, the actual upload frequency is higher than the required upload frequency , it will increase the burden on the system, resulting in high power consumption of the terminal.
可知,现有技术中存在终端功耗较大的技术问题。It can be seen that there is a technical problem of high terminal power consumption in the prior art.
发明内容Contents of the invention
本发明实施例提供一种数据传输控制方法和装置,可以解决现有技术中终端功耗较大的技术问题。Embodiments of the present invention provide a data transmission control method and device, which can solve the technical problem of high terminal power consumption in the prior art.
本发明实施例提供一种数据传输控制方法,包括:An embodiment of the present invention provides a data transmission control method, including:
确定当前使能目标传感器的目标应用;Determine the target application that currently enables the target sensor;
根据所述目标应用的频率设置信息,确定所述目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率;According to the frequency setting information of the target application, determine the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor;
判断当前所述缓存器上传数据给所述处理器的上传频率是否等于所述目标上传频率;judging whether the current upload frequency of data uploaded by the buffer to the processor is equal to the target upload frequency;
若否,则调整所述缓存器的深度信息,以使得所述上传频率等于所述目标上传频率。If not, adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency.
相应地,本发明实施例提供了一种数据传输控制装置,包括:Correspondingly, an embodiment of the present invention provides a data transmission control device, including:
应用确定模块,用于确定当前使能目标传感器的目标应用;An application determining module, configured to determine the target application that currently enables the target sensor;
频率确定模块,用于根据所述目标应用的频率设置信息,确定所述目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率;A frequency determination module, configured to determine the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor according to the frequency setting information of the target application;
第一判断模块,用于判断当前所述缓存器上传数据给所述处理器的上传频率是否等于所述目标上传频率;A first judging module, configured to judge whether the current upload frequency of data uploaded by the buffer to the processor is equal to the target upload frequency;
调整模块,用于在第一判断模块判定为否时,调整所述缓存器的深度信息,以使得所述上传频率等于所述目标上传频率。An adjusting module, configured to adjust the depth information of the buffer so that the uploading frequency is equal to the target uploading frequency when the first judging module judges No.
本发明实施例采用确定当前使能目标传感器的目标应用,然后,根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,并判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率,若否,则调整缓存器的深度信息,以使得上传频率等于目标上传频率;该方案可以根据不同应用的频率要求调整缓存器的深度信息,以使得将存储的数据上传至处理器的频率达到该应用的频率要求,相对于现有技术而言,可以有效控制数据传输速率,降低了终端功耗。The embodiment of the present invention determines the target application that currently enables the target sensor, and then, according to the frequency setting information of the target application, determines the target upload frequency that the buffer corresponding to the target sensor needs to upload data to the processor, and judges the current buffer Whether the upload frequency of uploading data to the processor is equal to the target upload frequency, if not, adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency; this solution can adjust the depth information of the buffer according to the frequency requirements of different applications, In order to make the frequency of uploading the stored data to the processor meet the frequency requirement of the application, compared with the prior art, the data transmission rate can be effectively controlled, and the power consumption of the terminal is reduced.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本发明实施例一提供的数据传输控制方法的流程示意图;FIG. 1 is a schematic flowchart of a data transmission control method provided in Embodiment 1 of the present invention;
图2是本发明实施例二提供的数据传输控制方法的流程示意图;FIG. 2 is a schematic flowchart of a data transmission control method provided in Embodiment 2 of the present invention;
图3是本发明实施例三提供的第一种数据传输控制装置的结构示意图;FIG. 3 is a schematic structural diagram of the first data transmission control device provided by Embodiment 3 of the present invention;
图4是本发明实施例三提供的第二种数据传输控制装置的结构示意图;FIG. 4 is a schematic structural diagram of a second data transmission control device provided by Embodiment 3 of the present invention;
图5是本发明实施例三提供的第三种数据传输控制装置的结构示意图;FIG. 5 is a schematic structural diagram of a third data transmission control device provided by Embodiment 3 of the present invention;
图6是本发明实施例四提供的终端的结构示意图。FIG. 6 is a schematic structural diagram of a terminal provided in Embodiment 4 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the protection scope of the present invention.
本发明实施例提供一种数据传输控制方法和装置。以下将分别进行详细说明。Embodiments of the present invention provide a data transmission control method and device. The details will be described respectively below.
实施例一、Embodiment one,
本实施例将从数据传输控制装置的角度进行描述,该数据传输控制装置具体可以集成在终端中,该终端可以为智能手机、平板电脑等设备。This embodiment will be described from the perspective of a data transmission control device. Specifically, the data transmission control device may be integrated into a terminal, and the terminal may be a smart phone, a tablet computer, or other devices.
一种数据传输控制方法,包括:确定当前使能目标传感器的目标应用;根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率;判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率;若否,则调整缓存器的深度信息,以使得上传频率等于目标上传频率。A data transmission control method, comprising: determining the target application that currently enables the target sensor; determining the target upload frequency that the buffer corresponding to the target sensor needs to upload data to the processor according to the frequency setting information of the target application; judging the current cache Whether the upload frequency of data uploaded by the device to the processor is equal to the target upload frequency; if not, the depth information of the buffer is adjusted so that the upload frequency is equal to the target upload frequency.
如图1所示,数据传输控制方法,具体流程可以如下:As shown in Figure 1, the data transmission control method, the specific process can be as follows:
101、确定当前使能目标传感器的目标应用。101. Determine a target application that currently enables a target sensor.
在某些实施方式中,在确定当前使能目标传感器的目标应用之前,可以判断当前终端系统是否处于休眠待机状态,若处于休眠状态,进而确定当前目标传感器是否被使能,也即确定目标传感器是否处于工作状态。若目标传感器处于工作状态,而当前系统又处于休眠状态,为了降低终端功耗,可以减少系统的唤醒次数;比如,可以减少数据传输给处理器的次数以减少唤醒系统的次数。In some implementations, before determining the target application that currently enables the target sensor, it can be determined whether the current terminal system is in a dormant standby state, and if it is in a dormant state, then determine whether the current target sensor is enabled, that is, determine the target sensor Is it in working condition. If the target sensor is in the working state and the current system is in the dormant state, in order to reduce the power consumption of the terminal, the number of system wake-ups can be reduced; for example, the number of data transmissions to the processor can be reduced to reduce the number of wake-ups of the system.
具体地,可以将传感器获取的数据存储在缓存器中,当缓存器满载时再将数据传输至处理器,因此,可以通过调整缓存器的存储参数,如深度信息,将其存储空间调至最大,以减少缓存器上传数据给处理器的上传频率,进而降低终端功耗。比如,计步类应用调用G-sensor(Gravity-sensor,加速度传感器)的数据时,可以设置较大的转存(即设置较大的缓存器存储空间)以减少缓存器输出数据给处理器的次数,进而节省终端功耗。Specifically, the data acquired by the sensor can be stored in the buffer, and the data can be transmitted to the processor when the buffer is full. Therefore, the storage space of the buffer can be adjusted to the maximum by adjusting the storage parameters of the buffer, such as depth information. , so as to reduce the frequency of uploading data from the buffer to the processor, thereby reducing power consumption of the terminal. For example, when a pedometer application calls G-sensor (Gravity-sensor, acceleration sensor) data, it can set a larger dump (that is, set a larger buffer storage space) to reduce the buffer output data to the processor. times, thereby saving terminal power consumption.
在判定当前终端系统不处于休眠状态时,可以确定当前使能目标传感器的目标应用,也即确定当前调用传感器数据的目标应用。When it is determined that the current terminal system is not in the dormant state, the target application that currently enables the target sensor may be determined, that is, the target application that currently invokes sensor data may be determined.
102、根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率。102. According to the frequency setting information of the target application, determine a target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor.
具体地,可以根据目标应用设置的频率要求确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,比如,该频率设置信息可以根据应用本身携带的参数确定。Specifically, the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor can be determined according to the frequency requirement set by the target application. For example, the frequency setting information can be determined according to the parameters carried by the application itself.
其中,频率设置信息可以是应用程序自身携带的数据上传频率等等。终端可以根据该目标应用的频率设置信息,确定缓存器上传数据给处理器需要达到的目标上传频率。Wherein, the frequency setting information may be a data upload frequency carried by the application program itself, and the like. The terminal may determine a target upload frequency that needs to be achieved by the buffer for uploading data to the processor according to the frequency setting information of the target application.
本实施例中,缓存器具体可以为FIFO(First In First Out,先进先出)缓存器,其包含多个重要参数,比如FIFO的深度(THE DEEPTH)、FIFO的宽度(THE WIDTH)、满标志、空标志等。In this embodiment, the buffer may specifically be a FIFO (First In First Out) buffer, which includes multiple important parameters, such as the depth (THE DEEPTH) of the FIFO, the width (THE WIDTH) of the FIFO, and the full flag , empty flags, etc.
在某些实施方式中,可以在某些应用调用传感器数据时,直接将缓存器的深度信息调整为预设值,而无需识别该应用的频率要求,以进一步减少终端功耗。而对于非预设应用,则需进行频率要求的识别操作;也即在确定当前使能目标传感器的目标应用之后,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率之前,该方法还可以包括:In some implementations, when some applications call sensor data, the depth information of the buffer can be directly adjusted to a preset value without identifying the frequency requirement of the application, so as to further reduce power consumption of the terminal. For non-preset applications, it is necessary to identify the frequency requirements; that is, after determining the target application that currently enables the target sensor, before determining the target upload frequency that the buffer corresponding to the target sensor uploads data to the processor. , the method can also include:
判断目标应用是否为预设应用;Determine whether the target application is a default application;
若否,则执行确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率的步骤。If not, a step of determining a target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor is performed.
103判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率;若是,结束流程;若否,执行步骤104。103 Judging whether the uploading frequency of the current buffer to upload data to the processor is equal to the target uploading frequency; if yes, end the process; if not, execute step 104 .
具体地,可以获取当前缓存器上传数据给处理器的上传频率,然后,将当前上传频率与目标上传频率进行比较,以判断当前上传频率是否等于目标上传频率。Specifically, the current upload frequency of data uploaded by the buffer to the processor may be obtained, and then the current upload frequency is compared with the target upload frequency to determine whether the current upload frequency is equal to the target upload frequency.
其中,目标上传频率可以是一个频率区间,比如该频率区间可以是[a HZ,b HZ],若当前上传频率处于该频率区间内,则可以判定当前缓存器上传数据给处理器的上传频率等于目标上传频率,否则判定当前缓存器上传数据给处理器的上传频率不等于目标上传频率。Wherein, the target upload frequency can be a frequency interval, for example, the frequency interval can be [a HZ, b HZ], if the current upload frequency is within this frequency interval, it can be determined that the upload frequency of the current buffer to upload data to the processor is equal to The target upload frequency, otherwise it is determined that the upload frequency of the current buffer to upload data to the processor is not equal to the target upload frequency.
104、调整缓存器的深度信息,以使得上传频率等于目标上传频率。104. Adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency.
具体地,在判定当前缓存器上传数据给处理器的上传频率不等于目标上传频率时,调整缓存器的深度信息,以使得上传频率等于目标上传频率。由于FIFO的宽度一般是固定的,而FIFO的深度可调,因此,可以通过调整FIFO的深度信息,以改变FIFO的存储量,进而调节缓存器上传数据给处理器的上传频率。Specifically, when it is determined that the current upload frequency of data uploaded by the buffer to the processor is not equal to the target upload frequency, the depth information of the buffer is adjusted so that the upload frequency is equal to the target upload frequency. Since the width of the FIFO is generally fixed and the depth of the FIFO is adjustable, the storage capacity of the FIFO can be changed by adjusting the depth information of the FIFO, and then the frequency of uploading data from the buffer to the processor can be adjusted.
在本实施例中,调整缓存器的深度信息的方式可以有多种。可选地,可以根据应用的频率要求划分应用级别,并建立应用级别与FIFO深度之间的对应关系,根据应用级别调整缓存器的深度信息;也即,步骤“调整缓存器的深度信息”具体流程可以如下:In this embodiment, there may be multiple ways to adjust the depth information of the buffer. Optionally, the application level can be divided according to the frequency requirements of the application, and the corresponding relationship between the application level and the FIFO depth can be established, and the depth information of the buffer can be adjusted according to the application level; that is, the step "adjusting the depth information of the buffer" is specific The flow can be as follows:
根据目标上传频率确定目标应用的应用级别;Determine the application level of the target application according to the target upload frequency;
根据应用级别调整缓存器的深度信息。Adjust the depth information of the buffer according to the application level.
具体地,确定目标应用的应用级别的方式可以有多种,比如,可以将目标上传频率处于某一频率区间的目标应用划分为同一等级的应用级别;也即,步骤“根据目标上传频率确定目标应用的应用级别”具体可以包括:Specifically, there are many ways to determine the application level of the target application. For example, the target application with the target upload frequency in a certain frequency range can be divided into the same level of application level; that is, the step "determine the target application according to the target upload frequency "Application level of application" can specifically include:
判断目标上传频率是否处于预设频率区间;Determine whether the target upload frequency is within the preset frequency range;
若是,则获取预设频率区间对应的预设频率级别;If yes, obtain the preset frequency level corresponding to the preset frequency range;
根据预设频率级别确定目标应用的应用级别。The application level of the target application is determined according to the preset frequency level.
另一可选地,由于在缓存器的其他参数一定的情况下,FIFO的深度与缓存器存储量成正比,与上传频率成反比。因此,可以将上传频率与目标上传频率进行比较,根据比较结果调整深度信息。比如,深度信息可以包括深度值;则步骤“调整缓存器的深度信息”具体流程可以如下:Another option is that when other parameters of the buffer are constant, the depth of the FIFO is directly proportional to the storage capacity of the buffer and inversely proportional to the upload frequency. Therefore, the upload frequency can be compared with the target upload frequency, and the depth information can be adjusted according to the comparison result. For example, the depth information may include a depth value; the specific process of the step "adjusting the depth information of the buffer" may be as follows:
判断上传频率是否大于目标上传频率;Determine whether the upload frequency is greater than the target upload frequency;
若是,则增大缓存器的深度值;If so, increase the depth value of the buffer;
若否,则减小缓存器的深度值。If not, decrease the depth value of the buffer.
具体地,在上传频率大于目标上传频率时,通过增大缓存器的深度值,以减小上传频率;在上传频率小于目标上传频率时,通过减小缓存器的深度值,以增大上传频率。Specifically, when the upload frequency is greater than the target upload frequency, the upload frequency is reduced by increasing the depth value of the buffer; when the upload frequency is lower than the target upload frequency, the upload frequency is increased by reducing the depth value of the buffer .
由上可知,本发明实施例提供了一种数据传输控制方法,通过确定当前使能目标传感器的目标应用,然后,根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,并判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率,若否,则调整缓存器的深度信息,以使得上传频率等于目标上传频率;该方案可以根据不同应用的频率要求调整缓存器的深度信息,以使得将存储的数据上传至处理器的频率达到该应用的频率要求,相对于现有技术而言,可以有效控制数据传输速率,降低了终端功耗。It can be seen from the above that the embodiment of the present invention provides a data transmission control method, by determining the target application that currently enables the target sensor, and then, according to the frequency setting information of the target application, determine the buffer corresponding to the target sensor to upload data to the processor The target upload frequency that needs to be achieved, and judge whether the upload frequency of the current buffer uploading data to the processor is equal to the target upload frequency, if not, adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency; this scheme can Adjust the depth information of the buffer according to the frequency requirements of different applications, so that the frequency of uploading the stored data to the processor meets the frequency requirements of the application. Compared with the existing technology, the data transmission rate can be effectively controlled and the terminal power consumption.
实施例二、Embodiment two,
根据实施例一所描述的方法,以下将举例作进一步详细说明。According to the method described in Embodiment 1, an example will be given below for further detailed description.
在本实施例中,将以该数据传输控制装置具体集成在移动终端中为例进行详细描述。In this embodiment, a detailed description will be made by taking the data transmission control apparatus specifically integrated in a mobile terminal as an example.
如图2所示,一种数据传输控制方法,具体流程可以如下:As shown in Figure 2, a data transmission control method, the specific process may be as follows:
201、移动终端确定当前使能目标传感器的目标应用。201. The mobile terminal determines a target application that currently enables a target sensor.
在某些实施方式中,在移动终端确定当前使能目标传感器的目标应用之前,可以判断当前终端系统是否处于休眠待机状态,若处于休眠状态,进而确定当前目标传感器是否被使能,也即确定目标传感器是否处于工作状态。若目标传感器处于工作状态,而当前系统又处于休眠状态,为了降低终端功耗,可以减少系统的唤醒次数;比如,可以减少数据传输给处理器的次数以减少唤醒系统的次数。In some implementations, before the mobile terminal determines the target application that currently enables the target sensor, it can determine whether the current terminal system is in a dormant standby state, and if it is in a dormant state, then determine whether the current target sensor is enabled, that is, determine Whether the target sensor is working. If the target sensor is in the working state and the current system is in the dormant state, in order to reduce the power consumption of the terminal, the number of system wake-ups can be reduced; for example, the number of data transmissions to the processor can be reduced to reduce the number of wake-ups of the system.
具体地,可以将传感器获取的数据存储在缓存器中,当缓存器满载时再将数据传输至处理器,因此,可以通过调整缓存器的存储参数,如深度信息,将其存储空间调至最大,以减少缓存器上传数据给处理器的上传频率,进而降低终端功耗。比如,计步类应用调用G-sensor的数据时,可以设置较大的转存以减少缓存器输出数据给处理器的次数,进而节省移动终端功耗。Specifically, the data acquired by the sensor can be stored in the buffer, and the data can be transmitted to the processor when the buffer is full. Therefore, the storage space of the buffer can be adjusted to the maximum by adjusting the storage parameters of the buffer, such as depth information. , so as to reduce the frequency of uploading data from the buffer to the processor, thereby reducing power consumption of the terminal. For example, when a pedometer application calls the data of the G-sensor, a larger dump can be set to reduce the number of times the buffer outputs data to the processor, thereby saving power consumption of the mobile terminal.
202、移动终端判断目标应用是否为预设应用;若是,执行步骤206;若否,执行步骤203。202. The mobile terminal determines whether the target application is a preset application; if yes, execute step 206; if not, execute step 203.
本实施例中,判断目标应用是否为预设应用的方式可以有多种,比如,可以判断在预设标识集合中是否存在与该目标应用匹配的样本标识;也即,步骤“判断目标应用是否为预设应用”具体可以包括:In this embodiment, there are many ways to judge whether the target application is a preset application. For example, it can be judged whether there is a sample identifier matching the target application in the preset identifier set; that is, the step "judging whether the target application For preset applications" can specifically include:
获取目标应用的应用标识;Obtain the application identifier of the target application;
判断在预设标识集合中是否存在与该目标应用匹配的样本标识;Judging whether there is a sample identifier matching the target application in the preset identifier set;
若存在,则判定目标应用为预设应用;If it exists, it is determined that the target application is a default application;
若不存在,则判定目标应用不为预设应用。If not, it is determined that the target application is not a preset application.
203、移动终端根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率。203. The mobile terminal determines, according to the frequency setting information of the target application, a target upload frequency that needs to be achieved by the buffer corresponding to the target sensor for uploading data to the processor.
具体地,在判定目标应用不为预设应用时,根据目标应用的频率设置信息,确定缓存器上传数据给处理器时需要达到的目标上传频率。Specifically, when it is determined that the target application is not a preset application, a target upload frequency that needs to be achieved when the buffer uploads data to the processor is determined according to the frequency setting information of the target application.
在具体是实施时,可以根据目标应用设置的频率要求确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,比如,该频率设置信息可以根据应用本身携带的参数确定。During specific implementation, the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor can be determined according to the frequency requirements set by the target application. For example, the frequency setting information can be determined according to the parameters carried by the application itself.
其中,频率设置信息可以是应用程序自身携带的数据上传频率等等。终端可以根据该目标应用的频率设置信息,确定缓存器上传数据给处理器需要达到的目标上传频率。Wherein, the frequency setting information may be a data upload frequency carried by the application program itself, and the like. The terminal may determine a target upload frequency that needs to be achieved by the buffer for uploading data to the processor according to the frequency setting information of the target application.
本实施例中,缓存器具体可以为FIFO缓存器,其包含多个重要参数,比如FIFO的深度、FIFO的宽度、满标志、空标志等。In this embodiment, the buffer may specifically be a FIFO buffer, which includes multiple important parameters, such as FIFO depth, FIFO width, full flag, empty flag, and the like.
204、移动终端判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率;若是,结束流程,若否,执行步骤205。204. The mobile terminal judges whether the current upload frequency of data uploaded by the buffer to the processor is equal to the target upload frequency; if yes, end the process; if not, execute step 205.
具体地,可以获取当前缓存器上传数据给处理器的上传频率,然后,将当前上传频率与目标上传频率进行比较,以判断当前上传频率是否等于目标上传频率。Specifically, the current upload frequency of data uploaded by the buffer to the processor may be obtained, and then the current upload frequency is compared with the target upload frequency to determine whether the current upload frequency is equal to the target upload frequency.
其中,目标上传频率可以是一个频率区间,比如该频率区间可以是[a HZ,b HZ],若当前上传频率处于该频率区间内,则可以判定当前缓存器上传数据给处理器的上传频率等于目标上传频率,否则判定当前缓存器上传数据给处理器的上传频率不等于目标上传频率。Wherein, the target upload frequency can be a frequency interval, for example, the frequency interval can be [a HZ, b HZ], if the current upload frequency is within this frequency interval, it can be determined that the upload frequency of the current buffer to upload data to the processor is equal to The target upload frequency, otherwise it is determined that the upload frequency of the current buffer to upload data to the processor is not equal to the target upload frequency.
205、移动终端调整缓存器的深度信息,以使得上传频率等于目标上传频率。205. The mobile terminal adjusts the depth information of the buffer so that the upload frequency is equal to the target upload frequency.
具体地,在判定当前缓存器上传数据给处理器的上传频率不等于目标上传频率时,调整缓存器的深度信息,以使得上传频率等于目标上传频率。Specifically, when it is determined that the current upload frequency of data uploaded by the buffer to the processor is not equal to the target upload frequency, the depth information of the buffer is adjusted so that the upload frequency is equal to the target upload frequency.
在本实施例中,调整缓存器的深度信息的方式可以有多种。可选地,可以根据应用的频率要求划分应用级别,并建立应用级别与FIFO深度之间的对应关系,根据应用级别调整缓存器的深度信息;也即,步骤“调整缓存器的深度信息”具体流程可以如下:In this embodiment, there may be multiple ways to adjust the depth information of the buffer. Optionally, the application level can be divided according to the frequency requirements of the application, and the corresponding relationship between the application level and the FIFO depth can be established, and the depth information of the buffer can be adjusted according to the application level; that is, the step "adjusting the depth information of the buffer" is specific The flow can be as follows:
根据目标上传频率确定目标应用的应用级别;Determine the application level of the target application according to the target upload frequency;
根据应用级别调整缓存器的深度信息。Adjust the depth information of the buffer according to the application level.
具体地,确定目标应用的应用级别的方式可以有多种,比如,可以将目标上传频率处于某一频率区间的目标应用划分为同一等级的应用级别;也即,步骤“根据目标上传频率确定目标应用的应用级别”具体可以包括:Specifically, there are many ways to determine the application level of the target application. For example, the target application with the target upload frequency in a certain frequency range can be divided into the same level of application level; that is, the step "determine the target application according to the target upload frequency "Application level of application" can specifically include:
判断目标上传频率是否处于预设频率区间;Determine whether the target upload frequency is within the preset frequency range;
若是,则获取预设频率区间对应的预设频率级别;If yes, obtain the preset frequency level corresponding to the preset frequency range;
根据预设频率级别确定目标应用的应用级别。The application level of the target application is determined according to the preset frequency level.
另一可选地,由于在缓存器其他参数不变的情况下,FIFO的深度与缓存器存储量成正比,与上传频率成反比。因此,可以将上传频率与目标上传频率进行比较,根据比较结果调整深度信息。比如,深度信息可以包括深度值;则步骤“调整缓存器的深度信息”具体流程可以如下:Another option is that when other parameters of the buffer remain unchanged, the depth of the FIFO is directly proportional to the storage capacity of the buffer and inversely proportional to the upload frequency. Therefore, the upload frequency can be compared with the target upload frequency, and the depth information can be adjusted according to the comparison result. For example, the depth information may include a depth value; the specific process of the step "adjusting the depth information of the buffer" may be as follows:
判断上传频率是否大于目标上传频率;Determine whether the upload frequency is greater than the target upload frequency;
若是,则增大缓存器的深度值;If so, increase the depth value of the buffer;
若否,则减小缓存器的深度值。If not, decrease the depth value of the buffer.
具体地,在上传频率大于目标上传频率时,通过增大缓存器的深度值,以减小上传频率;在上传频率小于目标上传频率时,通过减小缓存器的深度值,以增大上传频率。Specifically, when the upload frequency is greater than the target upload frequency, the upload frequency is reduced by increasing the depth value of the buffer; when the upload frequency is lower than the target upload frequency, the upload frequency is increased by reducing the depth value of the buffer .
206、移动终端将缓存器的深度值调整为最大值。206. The mobile terminal adjusts the depth value of the buffer to the maximum value.
在某些实施方式中,可以在某些应用调用传感器数据时,直接将缓存器的深度值调整为最大值,而无需识别该应用的频率要求,以进一步减少终端功耗。以计步类应用为例,可以直接将G-sensor对应缓存器的深度值调整为最大值,以将缓存器转存空间调至最大,以减少缓存数据输出数据给处理器的频率,进而降低终端功耗。In some implementations, when some application calls sensor data, the depth value of the buffer can be directly adjusted to the maximum value without identifying the frequency requirement of the application, so as to further reduce the power consumption of the terminal. Taking step counting applications as an example, you can directly adjust the depth value of the buffer corresponding to the G-sensor to the maximum value to maximize the buffer dump space, reduce the frequency of outputting data from the cache to the processor, and further reduce the terminal power consumption.
由上可知,本发明实施例提供了一种数据传输控制方法,通过移动终端确定当前使能目标传感器的目标应用,并判断目标应用是否为预设应用,若否,则根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,再判断当前上传频率是否等于目标上传频率,若不等于,则调整缓存器的深度信息,以使得上传频率等于目标上传频率;该方案可以根据不同应用的频率要求调整缓存器的深度信息,以使得将存储的数据上传至处理器的频率达到该应用的频率要求,相对于现有技术而言,可以有效控制数据传输速率,降低了终端功耗。It can be seen from the above that the embodiment of the present invention provides a data transmission control method, which determines the target application that currently enables the target sensor through the mobile terminal, and judges whether the target application is a preset application, and if not, sets the target application according to the frequency of the target application. Information, determine the target upload frequency that the buffer corresponding to the target sensor uploads data to the processor, and then judge whether the current upload frequency is equal to the target upload frequency, if not, adjust the depth information of the buffer so that the upload frequency is equal to Target upload frequency; this solution can adjust the depth information of the buffer according to the frequency requirements of different applications, so that the frequency of uploading the stored data to the processor meets the frequency requirements of the application. Compared with the existing technology, it can be effectively controlled The data transfer rate reduces the terminal power consumption.
实施例三、Embodiment three,
为了更好地实施以上方法,本发明实施例还提供一种数据传输控制装置,该数据传输控制装置可以集成在终端中,该终端具体可以包括手机、平板电脑、笔记本电脑等设备。如图3所示,该数据传输控制装置300可以包括应用确定模块301、频率确定模块302、第一判断模块303和调整模块304,如下:In order to better implement the above method, an embodiment of the present invention further provides a data transmission control device, the data transmission control device can be integrated in a terminal, and the terminal can specifically include mobile phones, tablet computers, notebook computers and other devices. As shown in Figure 3, the data transmission control device 300 may include an application determination module 301, a frequency determination module 302, a first judgment module 303 and an adjustment module 304, as follows:
应用确定模块301,用于确定当前使能目标传感器的目标应用;An application determining module 301, configured to determine the target application that currently enables the target sensor;
频率确定模块302,用于根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率;The frequency determination module 302 is configured to determine the target upload frequency that the buffer corresponding to the target sensor uploads data to the processor according to the frequency setting information of the target application;
第一判断模块303,用于判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率;The first judging module 303 is used to judge whether the upload frequency of the current buffer to upload data to the processor is equal to the target upload frequency;
调整模块304,用于在第一判断模块判定为否时,调整缓存器的深度信息,以使得上传频率等于目标上传频率。The adjustment module 304 is configured to adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency when the first determination module determines no.
在某些实施方式中,如图4所示,调整模块304可以包括:确定子模块3041和调整子模块3042;In some implementations, as shown in FIG. 4 , the adjustment module 304 may include: a determination submodule 3041 and an adjustment submodule 3042;
确定子模块3041,用于根据目标上传频率确定所述目标应用的应用级别;A determining submodule 3041, configured to determine the application level of the target application according to the target upload frequency;
调整子模块3042,用于根据应用级别调整缓存器的深度信息。The adjustment sub-module 3042 is configured to adjust the depth information of the buffer according to the application level.
在某些实施方式中,确定子模块3041,具体可以用于:In some implementation manners, the determining submodule 3041 can specifically be used for:
判断目标上传频率是否处于预设频率区间;Determine whether the target upload frequency is within the preset frequency range;
若是,则获取预设频率区间对应的预设频率级别;If yes, obtain the preset frequency level corresponding to the preset frequency range;
根据预设频率级别确定目标应用的应用级别。The application level of the target application is determined according to the preset frequency level.
在某些实施方式中,该深度信息包括深度值;调整模块304,具体可以用于:In some implementations, the depth information includes a depth value; the adjustment module 304 can specifically be used for:
判断上传频率是否大于目标上传频率;Determine whether the upload frequency is greater than the target upload frequency;
若是,则增大所述缓存器的深度值;If so, increase the depth value of the buffer;
若否,则减小所述缓存器的深度值。If not, decrease the depth value of the buffer.
在某些实施方式中,如图5所示,该数据传输控制装置300还可以包括:第二判断模块305;In some implementations, as shown in FIG. 5 , the data transmission control device 300 may further include: a second judging module 305;
第二判断模块305,用于在确定当前使能目标传感器的目标应用之后,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,之前,判断目标应用是否为预设应用;The second judging module 305 is used to determine the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor after determining the target application that currently enables the target sensor, before judging whether the target application is a preset application ;
频率确定模块302,具体用于在第二判断模块305判定为否时,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率。The frequency determination module 302 is specifically configured to determine the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor when the second determination module 305 determines no.
由上可知,本发明实施例提供了一种数据传输控制装置,通过确定当前使能目标传感器的目标应用,然后,根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,并判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率,若否,则调整缓存器的深度信息,以使得上传频率等于目标上传频率;该方案可以根据不同应用的频率要求调整缓存器的深度信息,以使得将存储的数据上传至处理器的频率达到该应用的频率要求,相对于现有技术而言,可以有效控制数据传输速率,降低了终端功耗。It can be seen from the above that the embodiment of the present invention provides a data transmission control device, by determining the target application that currently enables the target sensor, and then, according to the frequency setting information of the target application, determine the buffer corresponding to the target sensor to upload data to the processor The target upload frequency that needs to be achieved, and judge whether the upload frequency of the current buffer uploading data to the processor is equal to the target upload frequency, if not, adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency; this scheme can Adjust the depth information of the buffer according to the frequency requirements of different applications, so that the frequency of uploading the stored data to the processor meets the frequency requirements of the application. Compared with the existing technology, the data transmission rate can be effectively controlled and the terminal power consumption.
实施例四、Embodiment four,
本实施例提供一种终端,比如,请参考图6,该终端400可以包括射频(RF,RadioFrequency)电路401、包括有一个或一个以上计算机可读存储介质的存储器402、输入单元403、显示单元404、传感器405、音频电路406、无线保真(WiFi,Wireless Fidelity)模块407、包括有一个或者一个以上处理核心的处理器408以及电源409等部件。本领域技术人员可以理解,图6中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。This embodiment provides a terminal. For example, please refer to FIG. 6. The terminal 400 may include a radio frequency (RF, Radio Frequency) circuit 401, a memory 402 including one or more computer-readable storage media, an input unit 403, and a display unit. 404, a sensor 405, an audio circuit 406, a wireless fidelity (WiFi, Wireless Fidelity) module 407, a processor 408 including one or more processing cores, a power supply 409 and other components. Those skilled in the art can understand that the terminal structure shown in FIG. 6 does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine some components, or arrange different components.
射频电路401可用于收发信息,或通话过程中信号的接收和发送,特别地,将基站的下行信息接收后,交由一个或者一个以上处理器408处理;另外,将涉及上行的数据发送给基站。通常,射频电路401包括但不限于天线、至少一个放大器、调谐器、一个或多个振荡器、用户身份模块(SIM,Subscriber Identity Module)卡、收发信机、耦合器、低噪声放大器(LNA,LowNoiseAmplifier)、双工器等。此外,射频电路401还可以通过无线通信与网络和其他设备通信。该无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(GSM,Global System ofMobile communication)、通用分组无线服务(GPRS,GeneralPacket Radio Service)、码分多址(CDMA,Code Division Multiple Access)、宽带码分多址(WCDMA,Wideband Code Division MultipleAccess)、长期演进(LTE,LongTermEvolution)、电子邮件、短消息服务(SMS,Short Messaging Service)等。The radio frequency circuit 401 can be used to send and receive information, or to receive and send signals during a call. In particular, after receiving the downlink information from the base station, it is processed by one or more processors 408; in addition, the uplink data is sent to the base station . Generally, the radio frequency circuit 401 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM, Subscriber Identity Module) card, a transceiver, a coupler, a low noise amplifier (LNA, LowNoiseAmplifier), duplexer, etc. In addition, the radio frequency circuit 401 can also communicate with the network and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM, Global System of Mobile communication), General Packet Radio Service (GPRS, General Packet Radio Service), Code Division Multiple Access (CDMA, Code Division Multiple Access), Wideband Code Division Multiple Access (WCDMA, Wideband Code Division Multiple Access), Long Term Evolution (LTE, Long Term Evolution), email, Short Message Service (SMS, Short Messaging Service), etc.
存储器402可用于存储软件程序以及模块。处理器408通过运行存储在存储器402的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器402可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的目标应用(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器402可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器402还可以包括存储器控制器,以提供处理器408和输入单元403对存储器402的访问。The memory 402 can be used to store software programs as well as modules. The processor 408 executes various functional applications and data processing by running software programs and modules stored in the memory 402 . Memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one target application required by a function (such as a sound playback function, an image playback function, etc.); Data created by the use of the terminal (such as audio data, phonebook, etc.) and the like. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 402 may further include a memory controller to provide the processor 408 and the input unit 403 with access to the memory 402 .
输入单元403可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。具体地,在一个具体的实施例中,输入单元403可包括触敏表面以及其他输入设备。触敏表面,也称为触摸显示屏或者触控板,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触敏表面上或在触敏表面附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触敏表面可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器408,并能接收处理器408发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触敏表面。除了触敏表面,输入单元403还可以包括其他输入设备。具体地,其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆、指纹识别模组等中的一种或多种。The input unit 403 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, in a specific embodiment, the input unit 403 may include a touch-sensitive surface as well as other input devices. A touch-sensitive surface, also known as a touch display or trackpad, collects user touch operations on or near it (for example, the user uses a finger, stylus, etc. any suitable object or accessory on the touch-sensitive surface or on the touch-sensitive Operation near the surface), and drive the corresponding connection device according to the preset program. Optionally, the touch-sensitive surface may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to to the processor 408, and can receive and execute commands sent by the processor 408. In addition, touch-sensitive surfaces can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to touch-sensitive surfaces, the input unit 403 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, fingerprint recognition modules, and the like.
显示单元404可用于显示由用户输入的信息或提供给用户的信息以及终端的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。显示单元404可包括显示面板,可选的,可以采用液晶显示器(LCD,Liquid Crystal Display)、有机发光二极管(OLED,Organic Light-Emitting Diode)等形式来配置显示面板。进一步的,触敏表面可覆盖显示面板,当触敏表面检测到在其上或附近的触摸操作后,传送给处理器408以确定触摸事件的类型,随后处理器408根据触摸事件的类型在显示面板上提供相应的视觉输出。虽然在图6中,触敏表面与显示面板是作为两个独立的部件来实现输入和输入功能,但是在某些实施例中,可以将触敏表面与显示面板集成而实现输入和输出功能。The display unit 404 can be used to display information input by or provided to the user and various graphical user interfaces of the terminal. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. The display unit 404 may include a display panel. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode), and the like. Further, the touch-sensitive surface may cover the display panel, and when the touch-sensitive surface detects a touch operation on or near it, the touch operation is sent to the processor 408 to determine the type of the touch event, and then the processor 408 displays on the display according to the type of the touch event. The corresponding visual output is provided on the panel. Although in FIG. 6, the touch-sensitive surface and the display panel are used as two independent components to realize the input and input functions, in some embodiments, the touch-sensitive surface and the display panel can be integrated to realize the input and output functions.
终端还可包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板的亮度,接近传感器可在终端移动到耳边时,关闭显示面板和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The terminal may also include at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel according to the brightness of the ambient light, and the proximity sensor may turn off the display panel and/or the backlight when the terminal moves to the ear . As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary, and can be used to identify the application of mobile phone attitude (such as horizontal and vertical screen switching, related Games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tap), etc.; as for other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. repeat.
音频电路406可通过扬声器、传声器提供用户与终端之间的音频接口。音频电路406可将接收到的音频数据转换成电信号,传输到扬声器,由扬声器转换为声音信号输出;另一方面,传声器将收集的声音信号转换为电信号,由音频电路406接收后转换为音频数据,再将音频数据输出处理器408处理后,经射频电路401以发送给比如另一终端,或者将音频数据输出至存储器402以便进一步处理。音频电路406还可能包括耳塞插孔,以提供外设耳机与终端的通信。The audio circuit 406 can provide an audio interface between the user and the terminal through a speaker or a microphone. The audio circuit 406 can convert the received audio data into an electrical signal, transmit it to the speaker, and convert it into a sound signal output by the speaker; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is converted into The audio data, after being processed by the audio data output processor 408, is sent to another terminal through the radio frequency circuit 401, or the audio data is output to the memory 402 for further processing. The audio circuit 406 may also include an earplug jack to provide communication between an external earphone and the terminal.
无线保真(WiFi)属于短距离无线传输技术,终端通过无线保真模块407可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了无线保真模块407,但是可以理解的是,其并不属于终端的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。Wireless Fidelity (WiFi) is a short-distance wireless transmission technology. The terminal can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 407. It provides users with wireless broadband Internet access. Although Fig. 6 shows the Wi-Fi module 407, it can be understood that it is not an essential component of the terminal, and can be completely omitted as required without changing the essence of the invention.
处理器408是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器402内的软件程序和/或模块,以及调用存储在存储器402内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器408可包括一个或多个处理核心;优选的,处理器408可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和目标应用等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器408中。The processor 408 is the control center of the terminal. It uses various interfaces and lines to connect various parts of the entire terminal. By running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, execution Various functions and processing data of the terminal, so as to monitor the terminal as a whole. Optionally, the processor 408 may include one or more processing cores; preferably, the processor 408 may integrate an application processor and a modem processor, wherein the application processor mainly processes operating systems, user interfaces, and target applications, etc. , the modem processor mainly handles wireless communications. It can be understood that the foregoing modem processor may not be integrated into the processor 408 .
终端还包括给各个部件供电的电源409(比如电池)。优选的,电源可以通过电源管理系统与处理器408逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源409还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The terminal also includes a power source 409 (such as a battery) for powering various components. Preferably, the power supply can be logically connected to the processor 408 through a power management system, so that functions such as charging, discharging, and power consumption management can be implemented through the power management system. The power supply 409 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
尽管未示出,终端还可以包蓝牙模块、摄像头等,在此不再赘述。Although not shown, the terminal may also include a Bluetooth module, a camera, etc., which will not be described in detail here.
具体在本实施例中,终端中的处理器408会按照如下的指令,将一个或一个以上的目标应用的进程对应的可执行文件加载到存储器402中,并由处理器408来运行存储在存储器402中的目标应用,从而实现各种功能:Specifically, in this embodiment, the processor 408 in the terminal will load one or more executable files corresponding to the process of the target application into the memory 402 according to the following instructions, and the processor 408 will run the executable file stored in the memory. The target application in 402 to achieve various functions:
确定当前使能目标传感器的目标应用,然后,根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,并判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率,若否,则调整缓存器的深度信息,以使得上传频率等于目标上传频率。Determine the target application that currently enables the target sensor, and then, according to the frequency setting information of the target application, determine the target upload frequency required for the buffer corresponding to the target sensor to upload data to the processor, and determine the current buffer to upload data to the processor Whether the upload frequency is equal to the target upload frequency, if not, adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency.
由上可知,本发明实施例提供了一种终端,该终端通过确定当前使能目标传感器的目标应用,然后,根据目标应用的频率设置信息,确定目标传感器对应的缓存器上传数据给处理器所需达到的目标上传频率,并判断当前缓存器上传数据给处理器的上传频率是否等于目标上传频率,若否,则调整缓存器的深度信息,以使得上传频率等于目标上传频率;该方案可以根据不同应用的频率要求调整缓存器的深度信息,以使得将存储的数据上传至处理器的频率达到该应用的频率要求,相对于现有技术而言,可以有效控制数据传输速率,降低了终端功耗。It can be seen from the above that the embodiment of the present invention provides a terminal. The terminal determines the target application that currently enables the target sensor, and then, according to the frequency setting information of the target application, determines the buffer corresponding to the target sensor to upload data to the processor. The target upload frequency that needs to be achieved, and judge whether the upload frequency of the current buffer uploading data to the processor is equal to the target upload frequency, if not, adjust the depth information of the buffer so that the upload frequency is equal to the target upload frequency; the scheme can be based on The frequency requirements of different applications adjust the depth information of the buffer so that the frequency of uploading the stored data to the processor meets the frequency requirements of the application. Compared with the existing technology, the data transmission rate can be effectively controlled and the terminal power is reduced. consumption.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,RandomAccessMemory)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: Read-only memory (ROM, Read Only Memory), random access memory (RAM, RandomAccessMemory), magnetic disk or optical disk, etc.
以上对本发明实施例所提供的一种数据传输控制方法和装置进行了详细介绍,本文中目标应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的技术人员,依据本发明的思想,在具体实施方式及目标应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A data transmission control method and device provided by the embodiment of the present invention has been introduced in detail above. In this paper, the purpose of this article is to use a specific example to illustrate the principle and implementation of the present invention. The description of the above embodiment is only to help understanding The method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and target application range. In summary, the content of this specification should not be construed as a limitation of the invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610860194.1A CN106445841B (en) | 2016-09-27 | 2016-09-27 | Data transmission control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610860194.1A CN106445841B (en) | 2016-09-27 | 2016-09-27 | Data transmission control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106445841A true CN106445841A (en) | 2017-02-22 |
CN106445841B CN106445841B (en) | 2019-08-06 |
Family
ID=58169931
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610860194.1A Active CN106445841B (en) | 2016-09-27 | 2016-09-27 | Data transmission control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106445841B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110830653A (en) * | 2019-11-05 | 2020-02-21 | RealMe重庆移动通信有限公司 | Sensor control method, sensor control device, mobile terminal and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101883046A (en) * | 2010-06-21 | 2010-11-10 | 杭州开鼎科技有限公司 | Data cache architecture applied to EPON terminal system |
CN103064501A (en) * | 2012-12-14 | 2013-04-24 | 华为终端有限公司 | Control method, device and terminal for information input |
CN103973407A (en) * | 2014-05-28 | 2014-08-06 | 北京经纬恒润科技有限公司 | Data transmission rate matching method and device of remote data transmission system |
CN105204665A (en) * | 2015-09-23 | 2015-12-30 | 青岛海信宽带多媒体技术有限公司 | Wireless mouse data processing method and intelligent terminal |
CN105337800A (en) * | 2015-10-30 | 2016-02-17 | 小米科技有限责任公司 | Polling frequency adjustment method and polling frequency adjustment device |
-
2016
- 2016-09-27 CN CN201610860194.1A patent/CN106445841B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101883046A (en) * | 2010-06-21 | 2010-11-10 | 杭州开鼎科技有限公司 | Data cache architecture applied to EPON terminal system |
CN103064501A (en) * | 2012-12-14 | 2013-04-24 | 华为终端有限公司 | Control method, device and terminal for information input |
CN103973407A (en) * | 2014-05-28 | 2014-08-06 | 北京经纬恒润科技有限公司 | Data transmission rate matching method and device of remote data transmission system |
CN105204665A (en) * | 2015-09-23 | 2015-12-30 | 青岛海信宽带多媒体技术有限公司 | Wireless mouse data processing method and intelligent terminal |
CN105337800A (en) * | 2015-10-30 | 2016-02-17 | 小米科技有限责任公司 | Polling frequency adjustment method and polling frequency adjustment device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110830653A (en) * | 2019-11-05 | 2020-02-21 | RealMe重庆移动通信有限公司 | Sensor control method, sensor control device, mobile terminal and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN106445841B (en) | 2019-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104243671B (en) | Volume adjusting method, device and electronic equipment | |
CN106412093B (en) | Method, device and system for uploading data | |
WO2015090248A1 (en) | Server overload protection method and device | |
CN106331359B (en) | A kind of speech signal collection method, device and terminal | |
CN106020987A (en) | Method and device for determining kernel running configuration in processor | |
CN106657251A (en) | A data synchronization method and device | |
CN107040610B (en) | Data synchronization method, device, storage medium, terminal and server | |
CN107172671B (en) | A channel switching method, device, storage medium and terminal | |
CN106982097A (en) | Radio frequency interference elimination method, device, storage medium and terminal | |
CN106357925A (en) | Method, device and terminal for switching screen brightness adjusting modes | |
CN106340925A (en) | A charging control method, device and terminal | |
CN109067981B (en) | Split-screen application switching method, device, storage medium and electronic device | |
CN106936516B (en) | Display state control method, storage medium and terminal | |
CN107231159A (en) | A radio frequency interference processing method, device, storage medium and terminal | |
CN106373531A (en) | Display brightness adjustment method and electronic device | |
CN106453597A (en) | Method, device and system for adjusting data synchronization period | |
CN107219951A (en) | Touch screen control method, device, storage medium and terminal device | |
CN106532876A (en) | Power supply control method and device and computer equipment | |
WO2022183551A1 (en) | Base station control method and apparatus, and mobile terminal | |
CN106066769A (en) | A processing method for a mobile terminal and the mobile terminal | |
CN106454953B (en) | Flow control method, device and terminal | |
CN106374988B (en) | Method, device and terminal for configuring inter-downlink-band carrier aggregation | |
CN106254673A (en) | Terminal fall detection method and device | |
CN106227337A (en) | Method, device and terminal for adjusting screen brightness | |
CN106648205A (en) | Dormancy control method, device and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: OPPO Guangdong Mobile Communications Co., Ltd. Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before: Guangdong OPPO Mobile Communications Co., Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |