WO2015110047A1 - 一种用于终端应用的数据处理方法和装置 - Google Patents

一种用于终端应用的数据处理方法和装置 Download PDF

Info

Publication number
WO2015110047A1
WO2015110047A1 PCT/CN2015/071349 CN2015071349W WO2015110047A1 WO 2015110047 A1 WO2015110047 A1 WO 2015110047A1 CN 2015071349 W CN2015071349 W CN 2015071349W WO 2015110047 A1 WO2015110047 A1 WO 2015110047A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
server
time
transmission
sent
Prior art date
Application number
PCT/CN2015/071349
Other languages
English (en)
French (fr)
Inventor
袁家权
卢世伟
Original Assignee
北京京东尚科信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京京东尚科信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京京东尚科信息技术有限公司
Priority to US15/113,496 priority Critical patent/US10044833B2/en
Priority to RU2016133990A priority patent/RU2632420C1/ru
Publication of WO2015110047A1 publication Critical patent/WO2015110047A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/62Establishing a time schedule for servicing the requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data processing method and apparatus for a terminal application.
  • the present invention provides a data processing method and apparatus for a terminal application, which dynamically adjusts the amount of transmitted data according to the speed of the terminal network in stages, and considers the characteristics of the terminal and its use scenario, and implements data uploading. Between real-time and the smoothness of APP running balance.
  • the present invention provides a data processing method for a terminal application, including: an information acquisition step of acquiring basic transmission parameter configuration information from a server, where the basic transmission parameter configuration information includes sending data to the server in a single time when the terminal uploads data to the server.
  • the number of the data sent by the secondary server to the server is determined as the minimum number of the basic transmission parameter configuration information, and each transmission after the second time the data is sent to the server is determined according to the previous two network transmission speeds.
  • the number of times the secondary network sends data to the server wherein the network sending speed is a ratio of the number of sent data to the time of sending when the data is sent to the server in a single time.
  • the maximum number of strips is set as the number of strips.
  • the transmission is abandoned, and the next transmission is regarded as the first time data is transmitted to the server.
  • the next transmission is performed after the maximum time interval.
  • the information acquisition step and the transmission number determination step are performed in a child thread of the application.
  • the present invention also provides a data processing apparatus for a terminal application, comprising: an information acquisition module, configured to acquire basic transmission parameter configuration information from a server, where the basic transmission parameter configuration information includes a single time when the terminal uploads data to the server The minimum number and maximum number of data sent by the server, and the minimum time interval and maximum time interval between two transmissions when continuously transmitting data; the sending number determining module is configured to send data to the server for the first time and the second time, Determining, for the first time and the second time, the number of data sent to the server as the minimum number of the basic transmission parameter configuration information, and for each transmission after the second time sending data to the server, according to the previous two times
  • the network sending speed determines that the data is sent to the server this time.
  • the number of the network transmission speed is a ratio of the number of transmitted data to the time of transmission when the data is sent to the server in a single time.
  • the invention has the beneficial effects that the dynamic adjustment mechanism of the number of APP data transmissions is designed, which can avoid the fluency of the APP running due to excessive transmission of data in the case of insufficient network resources.
  • the APP data transmission processing by using the invention can reasonably use the network resources to complete the APP data uploading task, and avoid the APP data loss, and is particularly suitable for occasions where a large amount of APP user behavior data needs to be uploaded.
  • FIG. 1 is a schematic diagram of a network connection structure between a mobile phone client and a server.
  • FIG. 2 is a flow chart of a data processing method for a terminal application according to an embodiment of the present invention.
  • FIG. 3 and FIG. 4 are flowcharts of data transmission after the first and second startup of the APP after the user installs the APP.
  • FIG. 5 is a schematic structural diagram of a data processing apparatus for a terminal application according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a data processing apparatus for a terminal application according to another embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a data processing apparatus for a terminal application according to still another embodiment of the present invention.
  • FIG. 1 is a schematic diagram showing a common network connection structure between a mobile phone client and a server.
  • the user activates the mobile APP, requests the server 1 to verify the APP, and obtains the basic transmission parameter configuration information from the server 1; Then, when the APP data is to be transmitted, the parameter configuration information is transmitted based on the basis, and the APP data is uploaded to the server 2.
  • the startup, verification, data upload, data storage, and the like of the APP are performed every time the APP is started.
  • FIG. 2 is a flowchart of a data processing method for the terminal application according to the embodiment of the present invention, including:
  • the information obtaining step is: acquiring basic sending parameter configuration information from a server, where the basic sending parameter configuration information includes a minimum number and a maximum number of times when the terminal sends data to the server, and two consecutive times when the data is continuously sent to the server. The minimum time interval and maximum time interval between transmissions.
  • the sending number determining step is: sending data to the server for the first time and the second time, determining the number of data sent to the server for the first time and the second time as the minimum number of the basic sending parameter configuration information; Each time after sending data to the secondary server, the number of data sent to the server is determined according to the previous two network sending speeds; wherein the network sending speed is the number of data sent when sending data to the server in a single time. The ratio of time to transmission.
  • the smart phone is still taken as an example.
  • the APP obtains the “basic sending parameter configuration information” from the server, that is, the basic sending policy, which specifies that the server side configuration is used.
  • the APP sends the minimum number of threads and the maximum number of threads sent by the thread each time; it also specifies that when the amount of APP data is large and the sending thread needs to send multiple times in succession, in order to release and recycle the CPU, memory and network resources of the mobile phone, Ensure that the mobile phone resources are not occupied for a long time, set the minimum interval between two consecutive transmissions, and the maximum waiting time interval for sending thread polling when the APP has no data to upload.
  • step S102 the embodiment of the present invention dynamically adjusts the amount of transmission of APP data.
  • the number of transmission data of the current time may be determined according to the rate of change of the network transmission speed of the previous two transmission data.
  • the relevant variables and calculation methods are as follows:
  • 1) and 2) are part of the basic transmission parameter configuration information obtained from the server side.
  • the above describes the method of determining the number of transmitted data according to the rate of change of the network transmission speed.
  • the rate of change that is, the rate of increase P, is calculated based on the previous two network transmission speeds.
  • the greater the growth rate the better the current network condition can be sent.
  • the more data the less fluency of APP operation; on the contrary, the smaller the growth rate, or even the negative number, indicates that the current network is in poor condition and the network resources are small.
  • the calculation formula in the above item 13) determines the number of transmissions.
  • Table 1 lists related data records for uploading APP data to a server using the preferred embodiment of the present invention, including the number of data transmissions, the time of transmission, and the network from the first to the thirteenth transmission process. Send speed and growth rate.
  • the minimum number of the first and second transmissions is the server-based transmission parameter configuration, which is 10 pieces.
  • the 11th growth rate P 11 0.81
  • the number of transmissions for the 13th time is greatly reduced from 30 to 4. It can be seen that the data processing according to the present invention can automatically adjust the data transmission amount according to the network condition, so that the two tend to be dynamically balanced, and the data uploading service is completed in time under the condition of limited network resources, thereby avoiding data loss and facilitating continuous execution of new data. Collection and upload.
  • the control may cause network congestion due to excessive data transmission.
  • the transmission process waits for the arrival of the next transmission period, for example, after the basic transmission.
  • the sending thread polls to the next cycle, and restarts determining the number of transmissions, that is, the next transmission is sent as the first transmission, and the number of subsequent transmissions is still in accordance with step S102 of the embodiment of FIG. 2 of the present invention. Make sure to upload the APP data dynamically.
  • FIG. 3 and FIG. 4 respectively show a data transmission flowchart after the APP is started, as an example after the user starts the APP for the first time and the second time.
  • the APP startup and data processing services are performed in the APP main thread, and the APP verification and the basic transmission parameter configuration request are performed.
  • the data transmission is performed in the APP sub-thread, and the processing executed in the sub-thread does not occupy the main thread.
  • the APP verification and the basic sending parameter configuration request sub-thread are started, and the following processing is performed in the sub-thread: requesting the server to verify the APP, requesting the server to send the basic sending parameter configuration.
  • the server writes the cache policy file to determine whether the APP passes the verification.
  • the APP data is sent to the sub-thread, otherwise the process ends.
  • the server does not receive the information, the current child thread is directly exited, and the process ends.
  • the APP data sending sub-thread after the child thread starts, it detects whether there is data to be sent.
  • the server configuration determines whether the server configuration is forcibly used. If not, it waits for the next sending period to arrive (the waiting time is the maximum time interval).
  • the data is sent according to the server configuration, that is, the minimum number of data is sent each time; if the system does not specify the mandatory use of the server configuration, according to the solution provided by the present invention
  • Data transmission that is, the number of transmitted data is dynamically adjusted until all the data to be transmitted is uploaded, waiting for the next transmission cycle to arrive (the waiting time is the minimum time interval).
  • the APP data processing service main thread is also started, and the following processing is performed in the main thread: processing and compression processing of the APP data, and the judgment is performed. If the number of data is less than the minimum number, if the minimum number is not reached, continue to collect and compress the data. After reaching the minimum number, determine whether the APP data sending sub-thread is in the state to be awake. If yes, send the APP data. The child thread wakes up, collects the compressed data as the data to be sent, and enters the APP data sending sub-thread to send the data.
  • FIG. 4 is a flow chart of data transmission after the second startup of the APP. Similar to the processing after the first startup of FIG. 3, the request server verifies the APP, requests the server to send the basic transmission parameter configuration information, and starts the APP data transmission sub-thread after the verification is passed. The processing is performed in the APP verification and basic transmission parameter configuration request sub-threads, and the data transmission is performed in the APP data transmission sub-thread.
  • the system when the APP data transmission number dynamic adjustment mechanism of the present invention is not needed, the system can be set to “force the server-side configuration”, and in the APP data transmission sub-thread, each time the data is sent is followed.
  • the basic send parameter configuration is performed.
  • the system is set to "do not force server-side configuration”
  • the number of transmissions will be determined in the APP data transmission sub-thread according to the dynamic adjustment mechanism of the present invention.
  • the user can set the transmission mode according to the specific application.
  • FIG. 5 shows a structural block diagram of the apparatus, including:
  • the information obtaining module 11 is configured to obtain basic sending parameter configuration information from a server, where the basic sending parameter configuration information includes a minimum number and a maximum number of times when the terminal sends data to the server, and continuously sends the data to the server.
  • the sending number determining module 12 is configured to send, to the server for the first time and the second time, the number of data sent to the server for the first time and the second time as the minimum number of the basic sending parameter configuration information, Each time after sending data to the server twice, the number of data sent to the server is determined according to the previous two network transmission speeds; wherein the network transmission speed is a single time when the data is sent to the server, the data is sent. The ratio of the number to the time it takes to send.
  • the data processing apparatus of the embodiment of FIG. 5 may further include a first transmission number setting module 13, as shown in FIG. 6, for the Mth time server determined by the transmission number determining module.
  • a first transmission number setting module 13 for the Mth time server determined by the transmission number determining module.
  • the data processing apparatus of the embodiment of FIG. 5 may further include a second transmission number setting module 14, as shown in FIG. 7, for the strip for transmitting data to the server for the Mth time determined by the transmission number determining module.
  • a second transmission number setting module 14 for the strip for transmitting data to the server for the Mth time determined by the transmission number determining module.
  • the Mth transmission is discarded, and the M+1th transmission is regarded as the first time to send data to the server.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种用于终端应用的数据处理方法,包括:信息获取步骤,从服务器获取基础发送参数配置信息,所述基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据时的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔;发送条数确定步骤,对于首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的所述最小条数,对于第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据的条数。本发明还公开了一种用于终端应用的数据处理装置。利用本发明可合理使用网络资源进行APP数据动态上传。

Description

一种用于终端应用的数据处理方法和装置 技术领域
本发明涉及通信技术领域,具体涉及一种用于终端应用的数据处理方法和装置。
背景技术
在通信技术领域,智能手机、平板电脑、可穿戴设备等移动终端的广泛使用,各种用于智能终端的APP(Application的简写)应用应运而生,围绕APP应用涌现出了大量解决方案,其中大多数需要通过网络向服务器上传本地数据,记录更新终端用户信息。
当前,由于网络和硬件等因素限制,智能终端APP上传数据时大多采用C/S(Client/Server,客户/服务器模)模式、HTTP(Hypertext transfer protocol,超文本转移协议)模式或WIFI模式的上传方式,这些方式并不考虑终端及网络流量的特殊性,也不考虑资源占用的情况,容易导致上传数据失败。以某游戏APP为例,玩家点击APP图标后该APP应用启动,一方面开始与玩家游戏互动,一方面在后台采集玩家信息上传给服务器,由于上传数据需占用网络资源,当网络拥挤时,上传数据的动作不可避免地影响前台游戏进程,造成游戏画面不流畅,影响用户体验,遇到APP应用非正常关闭的情形时,上传中的数据无法及时完成上传,容易发生数据丢失。显然,这对于需要收集用户APP使用行为数据的APP应用影响较大。
发明内容
有鉴于此,本发明提供了一种用于终端应用的数据处理方法和装置,分阶段地根据终端网络速度动态调整发送数据量,考虑了终端及其使用场景的特性,实现了在数据上传的实时性和APP运行的流畅性之间达到 平衡。
本发明提供一种用于终端应用的数据处理方法,包括:信息获取步骤,从服务器获取基础发送参数配置信息,所述基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔;发送条数确定步骤,对于首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的所述最小条数,对于第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据的条数;其中,所述网络发送速度为单次向服务器发送数据时,发送数据的条数与发送耗时的比值。
优选地,基于第N-2次和第N-1次的网络发送速度,确定出的第N次向服务器发送数据的条数QN为:QN=QN-1(1+PN-1),其中PN-1=(SN-1-SN-2)/SN-2,N为正整数,且N>2,其中SN-2和SN-1分别为第N-2次和第N-1次向服务器发送数据时的网络发送速度。
优选地,如果所确定的发送条数大于所述最大条数,将所述最大条数设置为发送条数。
优选地,如果所确定的发送条数小于或等于0时,放弃发送,并且将下一次发送视为首次向服务器发送数据。
优选地,放弃发送之后,经过最大时间间隔进行下一次发送。
优选地,信息获取步骤和发送条数确定步骤在应用的子线程中进行。
本发明还提供一种用于终端应用的数据处理装置,包括:信息获取模块,用于从服务器获取基础发送参数配置信息,所述基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔;发送条数确定模块,用于对于首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的所述最小条数,对于第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据 的条数;其中,所述网络发送速度为单次向服务器发送数据时,发送数据的条数与发送耗时的比值。
本发明的有益效果:本发明设计了对APP数据发送条数的动态调整机制,能够避免在网络资源不足的情况下,因发送数据过多损失APP运行流畅性。利用本发明进行APP数据发送处理可合理使用网络资源完成APP数据上传任务,避免APP数据丢失,尤其适合需要大量上传APP用户行为数据的场合。
附图说明
图1是手机用户端和服务器端的网络连接结构示意图。
图2是本发明实施例的用于终端应用的数据处理方法流程图。
图3和图4分别是用户安装APP后首次和第二次启动APP后的数据发送流程图。
图5是本发明实施例的用于终端应用的数据处理装置结构示意图。
图6是本发明另一实施例的用于终端应用的数据处理装置结构示意图。
图7是本发明再一实施例的用于终端应用的数据处理装置结构示意图。
具体实施方式
以下结合附图并举实施例,对本发明的技术方案进行详细描述。
图1以智能手机为例示出了一种常见的手机用户端和服务器端的网络连接结构示意图,用户启动手机APP,向服务器1请求验证APP,并从服务器1获取基础发送参数配置信息;APP验证通过后,当有待发送APP数据时,基于该基础发送参数配置信息,向服务器2上传APP数据。通常,对于智能终端安装的APP,在每一次启动APP时,都将进行APP的启动、验证、数据上传、数据存储等处理。
本发明围绕APP数据的上传处理流程提出处理方案,图2是本发明实施例的用于终端应用的数据处理方法的流程图,包括:
S101,信息获取步骤:从服务器获取基础发送参数配置信息,基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据时的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔。
S102,发送条数确定步骤:针对首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的最小条数;针对第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据的条数;其中,网络发送速度为单次向服务器发送数据时,发送数据的条数与发送耗时的比值。
在实际应用场景中,仍以智能手机为例,对于步骤S101,手机用户启动APP后,APP从服务器端获取“基础发送参数配置信息”,也即基础发送策略,其规定了在使用服务器端配置时,允许APP发送线程每次发送的最小条数和最大条数;还规定了当APP数据量很大、发送线程需多次连续发送时,为了使手机释放和回收CPU、内存和网络资源,保证手机资源不被长期占用,设定两次连续发送之间的最小间隔时间,以及APP无待上传数据时,发送线程轮询的最大等待时间间隔。
对于步骤S102,本发明实施例动态地调整APP数据的发送量。在对APP数据进行压缩处理后上传服务器,其中,首次和第二次向服务器发送数据的条数按照步骤S101中获得的“基础发送参数配置信息”规定的最小条数执行,即如果最小条数为10条,则前两次向服务器发送10条APP数据;然后,从第三次发送开始,不再规定必须发送10条,而是每一次都根据前两次的网络发送速度动态地确定本次向服务器的发送条数。
利用本发明进行APP数据发送处理,避免了在网络拥挤的情况下发送数据过多而影响APP使用流畅性,合理使用网络资源快速完成APP数据上传任务,避免APP数据丢失。
在本发明的优选实施例中,可根据前两次发送数据的网络发送速度的变化率,确定本次的发送数据条数。具体来看,相关变量和计算方式如下:
1)基础发送最小条数:MinNQ,例如MinNQ=10;
2)基础发送最大条数:MaxNQ,例如MaxNQ=50;
其中,1)和2)即从服务器端获得的部分基础发送参数配置信息。
3)首次的发送条数规定为最小条数,即Q1=MinNQ;
4)首次的网络发送速度为:S1=Q1/本次发送耗时ST1;
5)第二次的发送条数也规定为最小条数,即Q2=MinNQ;
6)第二次的网络发送速度为:S2=Q2/本次发送耗时ST2;
7)计算相对于首次的发送速度,第二次的发送速度的增长率为:P2=(S2-S1)/S1;
8)计算确定第三次的发送条数为:Q3=Q2*(1+P2);
9)第三次的网络发送速度为:S3=Q3/本次发送耗时ST3;
同理,依次类推可得:
10)第(N-2)次的网络发送速度为:SN_2=本次发送条数QN_2/本次发送耗时STN_2;
11)第(N-1)次的网络发送速度为:SN_1=本次发送条数QN_1/本次发送耗时STN_1;
12)则,相对于第(N-2)次的发送速度,第(N-1)次的发送速度的增长率为:PN_1=(SN_1-SN_2)/SN_2;
13)则,第N次发送条数可计算得到为:QN=QN_1*(1+PN_1),其中计算结果QN取整数。
以上介绍了根据网络发送速度的变化率确定发送数据条数的方式,变化率即增长率P根据前两次的网络发送速度计算得到,增长率越大,说明当前网络状况越好,可发送的数据越多,不会影响APP运行流畅度;反之,增长率越小,甚至为负数,说明当前网络状况差,网络资源少,为保证APP正常运行,应相应减少数据发送条数,具体可按照上述第13)项中的计算式确定发送条数。
更详细地,表1列出了利用本发明的优选实施例向服务器上传APP数据的相关数据记录,包括从首次到第13次发送过程中,每一次的数据发送条数、发送耗时、网络发送速度以及增长率。按照本发明,首次和 第二次发送条数为服务器基础发送参数配置规定的最小条数,为10条。为了确定第3次的发送条数,计算增长率P2=(6.66-8.33)/8.33=-0.2,则第3次应发送10*(1+(-0.2))=8条。以第11、12和13次的发送情况为例,第11次的增长率P11=0.81,则第12次的发送条数明显增多(由17条增多到30条),然而伴随着网络发送速度的减慢(由34减小到5),P12=-0.85为负数,相应地第13次的发送条数由30大幅减少到了4条。可见,按照本发明进行数据处理能够根据网络状况自动调整数据发送量,使两者趋于动态平衡,在有限的网络资源条件下及时完成数据上传业务,避免数据丢失,有利于持续进行对新数据的收集和上传。
Figure PCTCN2015071349-appb-000001
表1
进一步地,对于确定好的发送条数,一方面,如果发送条数大于基 础发送参数配置规定的最大条数MaxNQ,则以MaxNQ为本次发送条数进行发送,控制可能因发送过大数据造成网络堵塞。
另一方面,如果计算出的发送条数小于或等于0条,则放弃本次发送,且不计入计算下一次发送条数的依据;发送流程等待下一次发送周期的到来,例如经过基础发送参数配置规定的最大时间间隔后发送线程轮询至下一周期,重新开始确定发送条数,即将下一次发送作为首次发送,之后的每次发送条数仍按照本发明图2实施例的步骤S102确定,进行APP数据的动态上传。
图3和图4分别以用户安装APP后首次和第二次启动APP之后的情况为例,示出了启动APP之后的数据发送流程图。对于APP的启动、验证和基础发送参数配置请求、数据发送和数据处理服务,优选地,本发明实施例中,APP启动和数据处理服务在APP主线程中进行,APP验证和基础发送参数配置请求、数据发送在APP子线程中进行,在子线程执行的处理不占用主线程。
具体来看,如图3,APP首次启动后,一方面,启动APP验证和基础发送参数配置请求子线程,在该子线程中执行下述处理:请求服务器验证APP,请求服务器发送基础发送参数配置信息,收到服务器返回信息后写缓存策略文件,判断APP是否通过验证,通过验证则启动APP数据发送子线程,否则结束流程。另外,如果未收到服务器返回信息,则直接退出当前子线程,结束流程。对于APP数据发送子线程,子线程启动后检测是否有待发送数据,如有,则判断是否强制使用服务器配置,如无,则等待下一次发送周期到来(等待时间为最大时间间隔)。对于有待发送数据的情况,如果系统指定强制使用服务器配置,则按照服务器配置进行数据发送,即每次发送最小条数的数据;如果系统未指定强制使用服务器配置,则按照本发明提供的方案进行数据发送,即对发送数据条数进行动态调整,直至待发送数据全部上传完毕,等待下一次发送周期到来(等待时间为最小时间间隔)。
另一方面,APP首次启动后,还启动APP数据处理服务主线程,在该主线程中执行下述处理:对APP数据进行采集和压缩等处理,判断处 理后的数据条数是否大于最小条数,如果未达到最小条数,则继续采集、压缩数据,达到最小条数后判断APP数据发送子线程是否处于待唤醒状态,如是,则将APP数据发送子线程唤醒,将采集压缩后的数据作为待发送数据,进入APP数据发送子线程进行数据发送。
图4为第二次启动APP之后的数据发送流程图,与图3首次启动后的处理类似地,请求服务器验证APP、请求服务器发送基础发送参数配置信息以及验证通过后启动APP数据发送子线程的处理在APP验证和基础发送参数配置请求子线程中进行,数据发送在APP数据发送子线程中进行。
根据上述处理流程,在不需要使用本发明的APP数据发送条数动态调整机制时,可将系统设置为“强制使用服务器端配置”,则在APP数据发送子线程中,每一次发送数据都按照基础发送参数配置进行。反之,将系统设置为“不强制使用服务器端配置”,则在APP数据发送子线程中将按照本发明的动态调整机制确定发送条数。以上作为传统发送模式和动态发送模式的转换,用户可根据具体应用场合设置发送模式。
除此之外,本发明还提供一种用于终端应用的数据处理装置,图5示出了该装置的结构框图,包括:
信息获取模块11,用于从服务器获取基础发送参数配置信息,所述基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据时的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔;
发送条数确定模块12,用于对于首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的最小条数,对于第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据的条数;其中,网络发送速度为单次向服务器发送数据时,发送数据的条数与发送耗时的比值。
进一步地,图5实施例的数据处理装置还可包括第一发送条数设置模块13,如图6,其用于当发送条数确定模块所确定的第M次向服务器 发送数据的条数大于所述最大条数时,将基础发送参数配置信息包含的最大条数设置为第M次的发送条数。
进一步地,图5实施例的数据处理装置还可包括第二发送条数设置模块14,如图7,其用于当所述发送条数确定模块所确定的第M次向服务器发送数据的条数小于或等于0时,放弃第M次发送,并且将第M+1次发送视为首次向服务器发送数据。
以上,结合具体实施例对本发明的技术方案进行了详细介绍,所描述的具体实施例用于帮助理解本发明的思想。本领域技术人员在本发明具体实施例的基础上做出的推导和变型也属于本发明保护范围之内。

Claims (12)

  1. 一种用于终端应用的数据处理方法,其特征在于,包括:
    信息获取步骤,从服务器获取基础发送参数配置信息,所述基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔;
    发送条数确定步骤,对于首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的所述最小条数,对于第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据的条数;其中,所述网络发送速度为单次向服务器发送数据时,发送数据的条数与发送耗时的比值。
  2. 如权利要求1所述的用于终端应用的数据处理方法,其特征在于,其中,基于第N-2次和第N-1次的网络发送速度确定出的第N次向服务器发送数据的条数QN为:
    QN=QN-1(1+PN-1),
    其中,PN-1=(SN-1-SN-2)/SN-2,N为正整数,且N>2,
    其中,SN-2和SN-1分别为第N-2次和第N-1次向服务器发送数据时的网络发送速度。
  3. 如权利要求1所述的用于终端应用的数据处理方法,其特征在于,在所述发送条数确定步骤之后,还包括:如果所确定的发送条数大于所述最大条数,将所述最大条数设置为发送条数。
  4. 如权利要求1所述的用于终端应用的数据处理方法,其特征在于,在所述发送条数确定步骤之后,还包括:如果所确定的发送条数小于或等于0,放弃发送,并且将下一次发送视为首次向服务器发送数据。
  5. 如权利要求4所述的用于终端应用的数据处理方法,其特征在于,其中:放弃发送之后,经过所述最大时间间隔进行下一次发送。
  6. 如权利要求1所述的用于终端应用的数据处理方法,其特征在于,其中:所述信息获取步骤和所述发送条数确定步骤在所述应用的子线程中进行。
  7. 一种用于终端应用的数据处理装置,其特征在于,包括:
    信息获取模块,用于从服务器获取基础发送参数配置信息,所述基础发送参数配置信息包含终端向服务器上传数据时,单次向服务器发送数据的最小条数和最大条数,以及连续发送数据时两次发送之间的最小时间间隔和最大时间间隔;
    发送条数确定模块,用于对于首次和第二次向服务器发送数据,将首次和第二次向服务器发送数据的条数确定为所述基础发送参数配置信息包含的所述最小条数,对于第二次向服务器发送数据之后的每一次发送,都根据前两次的网络发送速度确定本次向服务器发送数据的条数;其中,所述网络发送速度为单次向服务器发送数据时,发送数据的条数与发送耗时的比值。
  8. 如权利要求7所述的用于终端应用的数据处理装置,其特征在于:其中,所述发送条数确定模块基于第N-2次和第N-1次的网络发送速度确定出的第N次向服务器发送数据的条数QN为:
    QN=QN-1(1+PN-1),
    其中,PN-1=(SN-1-SN-2)/SN-2,N为正整数,且N>2,
    其中,SN-2和SN-1分别为第N-2次和第N-1次向服务器发送数据时的网络发送速度。
  9. 如权利要求7所述的用于终端应用的数据处理装置,其特征在于,还包括:第一发送条数设置模块,用于如果所述发送条数确定模块所确定的发送条数大于所述最大条数,将所述最大条数设置为发送条数。
  10. 如权利要求7所述的用于终端应用的数据处理装置,其特征在于,还包括:第二发送条数设置模块,用于如果所述发送条数确定模块所确定的发送条数小于或等于0,放弃发送,并且将下一次发送视为首次向服务器发送数据。
  11. 如权利要求10所述的用于终端应用的数据处理装置,其特征在 于,其中:所述第二发送条数设置模块放弃发送之后,经过所述最大时间间隔进行下一次发送。
  12. 如权利要求7所述的用于终端应用的数据处理装置,其特征在于,其中:所述信息获取模块和所述发送条数确定模块在所述应用的子线程中起作用。
PCT/CN2015/071349 2014-01-22 2015-01-22 一种用于终端应用的数据处理方法和装置 WO2015110047A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US15/113,496 US10044833B2 (en) 2014-01-22 2015-01-22 Data processing method and apparatus used for terminal application
RU2016133990A RU2632420C1 (ru) 2014-01-22 2015-01-22 Способ обработки данных и устройство, используемое для приложения терминала

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410030339.6 2014-01-22
CN201410030339.6A CN103856558B (zh) 2014-01-22 2014-01-22 一种用于终端应用的数据处理方法和装置

Publications (1)

Publication Number Publication Date
WO2015110047A1 true WO2015110047A1 (zh) 2015-07-30

Family

ID=50863762

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/071349 WO2015110047A1 (zh) 2014-01-22 2015-01-22 一种用于终端应用的数据处理方法和装置

Country Status (4)

Country Link
US (1) US10044833B2 (zh)
CN (1) CN103856558B (zh)
RU (1) RU2632420C1 (zh)
WO (1) WO2015110047A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856558B (zh) 2014-01-22 2017-07-14 北京京东尚科信息技术有限公司 一种用于终端应用的数据处理方法和装置
CN111835913B (zh) * 2016-03-01 2021-04-27 创新先进技术有限公司 一种设备信息收集方法、智能终端、服务器及系统
CN109977334B (zh) * 2019-03-26 2023-10-20 浙江度衍信息技术有限公司 检索速度优化方法
CN112199898B (zh) * 2020-11-11 2021-06-15 北京三维天地科技股份有限公司 一种基于大数据的仪器设备故障预测与健康管理方法
CN115695445A (zh) * 2021-07-31 2023-02-03 华为技术有限公司 一种数据同步方法、终端和系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594216A (zh) * 2008-05-28 2009-12-02 华为技术有限公司 子包传输方法、发送端、接收端及网络系统
CN101764746A (zh) * 2009-12-17 2010-06-30 中国电力科学研究院 一种发送数据的方法及装置
CN102546832A (zh) * 2012-02-29 2012-07-04 北京快网科技有限公司 基于tcp协议的报文发送方法
CN103856558A (zh) * 2014-01-22 2014-06-11 北京京东尚科信息技术有限公司 一种用于终端应用的数据处理方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FI100443B (fi) * 1995-04-10 1997-11-28 Nokia Telecommunications Oy Liikenteen väylöitys tietoliikenneverkon solmussa
CN101656756B (zh) * 2009-09-17 2012-09-05 中国科学院声学研究所 一种发送速率自适应控制的文件传输方法及其系统
CN102958116B (zh) * 2011-08-25 2016-10-26 华为技术有限公司 一种控制参数的调整方法、终端及基站和系统
CN103051955B (zh) * 2012-12-21 2016-08-03 华为技术有限公司 流媒体播放方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594216A (zh) * 2008-05-28 2009-12-02 华为技术有限公司 子包传输方法、发送端、接收端及网络系统
CN101764746A (zh) * 2009-12-17 2010-06-30 中国电力科学研究院 一种发送数据的方法及装置
CN102546832A (zh) * 2012-02-29 2012-07-04 北京快网科技有限公司 基于tcp协议的报文发送方法
CN103856558A (zh) * 2014-01-22 2014-06-11 北京京东尚科信息技术有限公司 一种用于终端应用的数据处理方法和装置

Also Published As

Publication number Publication date
RU2632420C1 (ru) 2017-10-04
CN103856558A (zh) 2014-06-11
CN103856558B (zh) 2017-07-14
US20170013083A1 (en) 2017-01-12
US10044833B2 (en) 2018-08-07

Similar Documents

Publication Publication Date Title
WO2015110047A1 (zh) 一种用于终端应用的数据处理方法和装置
US9596281B2 (en) Transport accelerator implementing request manager and connection manager functionality
US8897144B2 (en) Quality of user experience testing for video transmissions
US9813936B2 (en) System and method for scheduling time-shifting traffic in a mobile cellular network
US20150271231A1 (en) Transport accelerator implementing enhanced signaling
US10212194B2 (en) Server controlled throttling of client to server requests
US20150271226A1 (en) Transport accelerator implementing a multiple interface architecture
JP2022036307A (ja) クライアント、サーバ、受信方法及び送信方法
US20150134846A1 (en) Method and apparatus for media segment request retry control
WO2015169186A1 (en) File transmission method and system
US10033882B2 (en) System and method for time shifting cellular data transfers
WO2020026018A1 (zh) 文件的下载方法、装置、设备/终端/服务器及存储介质
US11653057B2 (en) Systems and methods for reducing latency of a video transmission system
CN107920108A (zh) 一种媒体资源的推送方法、客户端及服务器
US9363199B1 (en) Bandwidth management for data services operating on a local network
WO2014068863A1 (ja) 情報処理装置、情報処理方法及びプログラム
US9930565B2 (en) Controlling apparatus for communication-quality measuring, communication apparatus, and program
FR3016108A1 (zh)
CN108540273B (zh) 一种数据包重传的方法和装置
US20130176880A1 (en) Phy bandwidth estimation from backpressure patterns
US20030061273A1 (en) Extended content storage method and apparatus
CN113727152A (zh) 调整码率的方法、装置及存储介质
RU2608881C2 (ru) Способ и система для управления турборежимом
US20180103085A1 (en) Data Transfer in a Communication System
WO2018152753A1 (zh) 一种网络能力指标和用户体验指标的映射方法及装置

Legal Events

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

Ref document number: 15740667

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: IDP00201604758

Country of ref document: ID

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 15113496

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2016133990

Country of ref document: RU

Kind code of ref document: A

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

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 31/10/2016)

122 Ep: pct application non-entry in european phase

Ref document number: 15740667

Country of ref document: EP

Kind code of ref document: A1