WO2018233141A1 - 数据通信处理终端、方法及计算机可读存储介质 - Google Patents

数据通信处理终端、方法及计算机可读存储介质 Download PDF

Info

Publication number
WO2018233141A1
WO2018233141A1 PCT/CN2017/105023 CN2017105023W WO2018233141A1 WO 2018233141 A1 WO2018233141 A1 WO 2018233141A1 CN 2017105023 W CN2017105023 W CN 2017105023W WO 2018233141 A1 WO2018233141 A1 WO 2018233141A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
terminal
data request
server
network mode
Prior art date
Application number
PCT/CN2017/105023
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 平安科技(深圳)有限公司
Publication of WO2018233141A1 publication Critical patent/WO2018233141A1/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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • H04L67/5651Reducing the amount or size of exchanged application data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/04Protocols for data compression, e.g. ROHC

Definitions

  • the present invention relates to the field of mobile communications technologies, and in particular, to a data communication processing terminal, method, and computer readable storage medium.
  • the APP makes a data acquisition request, it often does not distinguish the network environment.
  • the data acquisition request is sent to the server in the same manner, and the network is loaded from the server.
  • Data which results in the maximum consumption of user traffic in all network modes, resulting in users in the network mode with traffic restrictions, such as in the cellular network, the traffic used exceeds the traffic limit, and additional charges are required. , causing unnecessary losses to the user.
  • the present invention provides a data communication processing terminal, method and computer readable storage medium, the main purpose of which is to reduce user traffic consumption in a network mode with traffic limitation.
  • the present invention provides a data communication processing terminal, the terminal comprising: a memory, a processor, and a data communication processing program stored on the memory and operable on the processor, the data communication processing
  • the program implements the following steps when executed by the processor:
  • the current network mode of the terminal is the first preset mode, determining a parameter group that needs to be uploaded to the server according to the data request instruction, and filtering out parameters belonging to the preset type in the parameter group, after filtering
  • the parameter group is subjected to compression processing to obtain a first parameter compression package, wherein the first preset mode is a network mode with flow restriction;
  • the processor is further configured to execute the data communication processing program to determine the current network mode of the terminal when the data request instruction is detected, and further implement the following steps:
  • the processor is further configured to execute the data communication processing program, after the step of generating a data request based on the first parameter compressed packet, and uploading the generated data request to the server, further implementing the following steps :
  • the picture is loaded from the server according to the current network mode of the terminal and the network address.
  • the step of loading a picture from the server according to a current network mode of the terminal and the network address includes:
  • determining the current network mode of the terminal includes:
  • the present invention further provides a data communication processing method, the method comprising:
  • the current network mode of the terminal is the first preset mode, determining a parameter group that needs to be uploaded to the server according to the data request instruction, and filtering out parameters belonging to the preset type in the parameter group, after filtering
  • the parameter group is compressed to obtain a first parameter compression package
  • the method further includes the steps of:
  • the method further includes the steps of:
  • the step of loading a picture from the server according to a current network mode of the terminal and the network address includes:
  • the present invention further provides a computer readable storage medium having a data communication processing program stored thereon, and when the data communication processing program is executed by a processor, the following steps are implemented:
  • the current network mode of the terminal is the first preset mode, determining a parameter group that needs to be uploaded to the server according to the data request instruction, and filtering out parameters belonging to the preset type in the parameter group, after filtering
  • the parameter group is subjected to compression processing to obtain a first parameter compression package, wherein the first preset mode is a network mode with flow restriction;
  • the data communication processing terminal, the method and the computer readable storage medium provided by the present invention determine the current network mode of the terminal when the data request instruction is detected, if the current network mode is the first preset mode, wherein the first preset mode For the network mode with the traffic restriction, the parameter group that needs to be uploaded to the server is determined according to the data request command, the parameters belonging to the preset type in the parameter group are filtered out, and the filtered parameter group is compressed to obtain the first
  • the parameter compression package generates a data request based on the first parameter compression package, uploads the data request to the server, so that the server parses the data request and returns the corresponding data, and the invention adopts the above solution, in the network mode with flow restriction, When the data is requested, the parameter group uploaded to the server is simplified and filtered, some parameters are omitted, and the parameters are compressed to reduce the consumption of user traffic and save traffic for the user.
  • FIG. 1 is a schematic diagram of a preferred embodiment of a data communication processing terminal according to the present invention.
  • FIG. 2 is a flow chart of a first embodiment of a data communication processing method of the present invention.
  • the invention provides a data communication processing terminal.
  • FIG. 1 a schematic diagram of a preferred embodiment of a data communication processing terminal of the present invention is shown.
  • the data communication processing terminal may be a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, and an MP4 (Moving Picture Experts).
  • Group Audio Layer IV dynamic video experts compress standard audio layers 3) Players, portable computers and other portable terminal devices with display functions.
  • the data communication processing terminal includes a memory 11, a processor 12, and a network interface 13.
  • the memory 11 may be a high speed RAM memory or a non-volatile memory such as a disk memory.
  • the memory 11 may be an internal storage unit of the terminal, such as a hard disk or a memory of the terminal, and optionally may be a storage terminal independent of the processor 12 described above.
  • the network interface 13 can optionally include a standard wired interface, a wireless interface (such as a WI-FI interface).
  • the memory 11 may be an internal storage unit of a data communication processing terminal, such as a hard disk or memory of the data communication processing terminal, in some embodiments.
  • the memory 11 may also be an external storage device of the data communication processing terminal in other embodiments, such as a plug-in hard disk equipped with a data communication processing terminal, a smart memory card (SMC), and a secure digital (Secure Digital, SD) card, flash card, etc.
  • the memory 11 may also include both an internal storage unit of the data communication processing terminal and an external storage device.
  • the memory 11 can be used not only for storing application software installed in the data communication processing terminal and various types of data, such as codes of a data communication processing program, but also for temporarily storing data that has been output or is to be output.
  • the processor 12 in some embodiments, may be a Central Processing Unit (CPU), microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing data communication processing. Programs, etc.
  • CPU Central Processing Unit
  • microprocessor or other data processing chip for running program code or processing data stored in the memory 11, such as performing data communication processing. Programs, etc.
  • FIG. 1 shows only data communication processing terminals having components 11-13 and data communication processing programs, but it should be understood that not all illustrated components may be implemented, and more or fewer components may be implemented instead.
  • the terminal may further include a user interface
  • the user interface may include a display
  • an input unit such as a keyboard
  • the optional user interface may further include a standard wired interface and a wireless interface.
  • the data communication processing terminal may further include a display, which may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch in some embodiments. And so on.
  • the display is used to display information processed in the data communication processing terminal and a user interface for displaying the visualization.
  • the terminal may further include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.
  • sensors such as light sensors, motion sensors, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein if the terminal is a mobile terminal, the ambient light sensor may adjust according to the brightness of the ambient light. The brightness of the screen, the proximity sensor can turn off the display and/or backlight when the mobile terminal moves to the ear.
  • the gravity acceleration sensor can detect the magnitude of acceleration in each direction (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, Related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc. No longer.
  • the memory 11 as a computer storage medium may include an operating system and a data communication processing program;
  • the network interface 13 is mainly used to connect to a server, perform data communication with the server, for example, The network interface 13 sends a data request to the server; when the processor 12 executes the data communication processing program stored in the memory 11, the following steps are implemented:
  • the current network mode of the terminal is the first preset mode, determining a parameter group that needs to be uploaded to the server according to the data request instruction, and filtering out parameters belonging to the preset type in the parameter group, after filtering
  • the parameter group is subjected to compression processing to obtain a first parameter compression package, wherein the first preset mode is a network mode with flow restriction;
  • the terminal proposed in this embodiment may process data communication of all installed applications according to the data communication processing program, or may only process data communication of the set one or more application programs. If you only need to process the data communication of some applications, you can configure it in advance.
  • the first preset mode is a network mode with traffic limitation, and the 2G network (second generation mobile communication technology), the 3G network (third generation mobile communication technology), 4G in the cellular network can be used.
  • One or more networks in the network are set to the first preset mode. If the mobile phone is under the wifi network, it is not necessary to process its data communication according to the above steps.
  • the mobile phone detects the data request instruction of the local end.
  • the mobile phone When detecting the data request instruction, for example, the user triggers an instruction for requesting data from the server based on the control, the network address, etc., the mobile phone first determines the current network when detecting the above instruction.
  • a mode wherein, regarding the determination of the network mode, the following may be adopted: when a data request instruction is detected, traversing an attribute item in a status bar of the terminal based on a KVC (Key-Value-Coding) mechanism to Obtaining an attribute item indicating a network mode; determining a current network mode of the terminal based on the obtained attribute item.
  • KVC Key-Value-Coding
  • the key value encoding mechanism is used to access various attribute values on the current status bar of the terminal, such as network mode, power, etc., and obtain the attribute item indicating the network mode in the status bar, and can determine whether the network is a 2G network, a 3G network, a 4G network, or WiFi network.
  • the mobile APP accesses the network, it needs to upload some parameters to the server, including geographic location information.
  • Basic parameters such as the backup ID and system version, as well as necessary parameters such as user account, network interface parameters, and resource location data.
  • the necessary parameters are resource location data for explaining the network location of the mobile phone and the requested data to the server, and therefore the necessary parameters. It must be uploaded to the server in order to successfully request the data; and the above basic parameters are uploaded to the server to facilitate more precise positioning of the resource.
  • the type of the parameter that can be omitted can be determined according to actual needs, and set to a preset type.
  • the geographical location information, the device ID, the system version, the terminal model, and the like are set as parameters of a preset type.
  • the parameters belonging to the preset type are filtered out according to the preset type set above.
  • the parameter group after the filtering process is compressed to obtain a first parameter compression package to further reduce the traffic occupied by the uploaded parameter group.
  • a data request including the first parameter compression package is generated, and the generated data request is uploaded to the server, which is parsed by the server and returns corresponding data.
  • the solution of this embodiment is described by taking a specific application scenario as an example.
  • the first preset network mode is a 2G/3G network.
  • the network communication of a news app on the mobile phone is monitored.
  • the user browses the app if the news needs to be viewed, when the link of the news is clicked, the data request command is triggered.
  • the processor 12 detects Go to the instruction, call the data communication processing program to determine the current network mode of the terminal, and determine whether the network mode is the first preset mode, and if yes, determine the parameter group that needs to be uploaded to the server for requesting the news data, and filter out the pre-predetermined Setting parameters such as device information and operating system information does not affect the parameters of the news data that the server determines to be transmitted, but uses the user account, network interface parameters, resource positioning parameters, etc. for the server to locate the resource and determine the mobile phone.
  • the pre-predetermined Setting parameters such as device information and operating system information does not affect the parameters of the news data that the server determines to be transmitted, but uses the user account, network interface parameters, resource positioning parameters, etc.
  • the first parameter compression package is generated and uploaded to the server for the server to parse the compressed package, and the corresponding data is searched according to the parameters, and the found data is sent to the mobile phone, and the mobile phone receives the data. , for display.
  • the processor 12 is further configured to execute the data communication processing program to determine the current network mode of the terminal when the data request instruction is detected, and further implement the following steps:
  • the 2G network in the cellular network can be set to the first preset mode
  • the 3G and 4G networks are set to the second preset mode
  • the network speed is slow
  • the parameters are omitted and compressed and uploaded.
  • the network speed is faster. Therefore, the second parameter compression packet generated by the parameter group compression can be directly filtered without parameter filtering, and the data request including the second parameter compression packet is generated and uploaded to the service. Server.
  • the processor is further configured to execute the data communication processing program, after the step of generating a data request based on the first parameter compressed packet, and uploading the generated data request to the server , also implement the following steps:
  • the picture is loaded from the server according to the current network mode of the terminal and the network address.
  • the step of loading a picture from the server according to the current network mode of the terminal and the network address may include: acquiring a network address for loading a picture from the data, and obtaining a match with the current network mode from the local storage. Address splicing data; splicing the address splicing data with the network address, requesting a corresponding picture from the server based on the spliced address, and loading the picture.
  • the terminal of the embodiment may include various data that needs to be displayed, such as text information, picture data, etc., where the picture data is generally a network address for loading the picture.
  • the terminal needs to request a picture from the server and load it according to the network address.
  • the picture is obtained by splicing the network address.
  • the network address splicing mechanism is preset, and the image addresses adapted to the large image and the small image are configured in the server, respectively corresponding to different network modes. For example, for the cellular network, the data of the small image can be displayed in the form of a small image. The amount is small, and the occupied traffic is also small.
  • a complete network address includes a common part and address stitching data, a common part of the website is stored in the server, and the address stitching data for different network modes is stored on the mobile phone.
  • the server sends the common part of the website as the network address to the mobile phone.
  • the mobile phone selects the appropriate URL splicing data and the network address according to the current network mode, and sends the spliced address to the server to obtain the corresponding address.
  • the picture is loaded.
  • the address splicing data corresponding to the WiFi network stored on the mobile phone is spliced with the network address and sent to the server. After receiving the message, the server sends the corresponding big picture to the mobile phone.
  • the data communication processing terminal proposed in this embodiment determines the current network mode of the terminal when the data request command is detected, if the current network mode is the first preset mode, where the first preset mode is a network mode with traffic limitation. And determining, according to the data request instruction, a parameter group that needs to be uploaded to the server, filtering out parameters belonging to the preset type in the parameter group, and compressing the filtered parameter group to obtain a first parameter compression package, based on the first A parameter compression package generates a data request, uploads the data request to the server, and the server parses the data request and returns the corresponding data.
  • the invention is implemented by the above solution, and in the network mode with flow restriction, when the data is requested, it is uploaded to The server's parameter group performs simplified filtering, omits some parameters, and compresses the parameters to reduce the consumption of user traffic and save traffic for users.
  • the data communication processing program may also be divided into one or A plurality of modules, one or more modules, are stored in the memory 11 and executed by one or more processors (the processor 12 in the present embodiment) to complete the present invention.
  • module refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the message push terminal in the data communication processing terminal.
  • the data communication processing program can be divided into a determination module, a data processing module, and a transmission module, wherein:
  • a determining module configured to determine a current network mode of the terminal when the data request instruction is detected
  • a data processing module configured to determine, according to the data request instruction, a parameter group that needs to be uploaded to the server, and filter out parameters belonging to the preset type in the parameter group, if the current network mode of the terminal is the first preset mode. And compressing the filtered parameter group to obtain a first parameter compression package, where the first preset mode is a network mode with flow restriction;
  • a sending module configured to generate a data request based on the first parameter compressed packet, and upload the generated data request to a server, so that the server parses the data request and returns corresponding data.
  • the present invention also provides a data communication processing method.
  • FIG. 2 it is a flowchart of a first embodiment of a data communication processing method according to the present invention.
  • the method can be performed by a terminal, which can be implemented by software and/or hardware.
  • the data communication processing method includes:
  • Step S10 when the data request instruction is detected, determine the current network mode of the terminal.
  • Step S20 If the current network mode of the terminal is the first preset mode, determine a parameter group that needs to be uploaded to the server according to the data request instruction, and filter out parameters belonging to the preset type in the parameter group, and The parameter group after the filtering process is subjected to compression processing to obtain a first parameter compression package, wherein the first preset mode is a network mode with flow restriction.
  • Step S30 generating a data request based on the first parameter compression package, and uploading the generated data request to a server, so that the server parses the data request and returns corresponding data.
  • the method proposed in this embodiment can process the data communication of all installed applications according to the data communication processing program, or can only process the data communication of the set one or more application programs. If you only need to process the data communication of some applications, you can configure it in advance.
  • the first preset mode is a network mode with traffic limitation, and the 2G network (second generation mobile communication technology), the 3G network (third generation mobile communication technology), 4G in the cellular network can be used.
  • One or more networks in the network are set to the first preset mode. If the mobile phone is under the wifi network, it is not necessary to process its data communication according to the above steps.
  • the mobile phone detects the data request instruction of the local end.
  • the mobile phone When detecting the data request instruction, for example, the user triggers an instruction for requesting data from the server based on the control, the network address, etc., the mobile phone first determines the current network when detecting the above instruction.
  • a mode wherein, regarding the determination of the network mode, the following may be adopted: when a data request instruction is detected, traversing an attribute item in a status bar of the terminal based on a KVC (Key-Value-Coding) mechanism to Obtaining an attribute item representing a network mode; determining based on the obtained attribute item The current network mode of the terminal.
  • KVC Key-Value-Coding
  • the key value encoding mechanism is used to access various attribute values on the current status bar of the terminal, such as network mode, power, etc., and obtain the attribute item indicating the network mode in the status bar, and can determine whether the network is a 2G network, a 3G network, a 4G network, or WiFi network.
  • the mobile APP accesses the network, it needs to upload some parameters to the server, including basic parameters such as geographic location information, device ID, and system version, as well as necessary parameters such as user accounts, network interface parameters, and resource positioning data. It is used to explain to the server the network location of the mobile phone and the resource location data of the requested data, so the necessary parameters must be uploaded to the server in order to successfully request the data; and the above basic parameters are uploaded to the server for the purpose of more accurate positioning of resources.
  • the type of the parameter that can be omitted can be determined according to actual needs, and set to a preset type.
  • the geographical location information, the device ID, the system version, the terminal model, and the like are set as parameters of a preset type.
  • the parameters belonging to the preset type are filtered out according to the preset type set above.
  • the parameter group after the filtering process is compressed to obtain a first parameter compression package to further reduce the traffic occupied by the uploaded parameter group.
  • a data request including the first parameter compression package is generated, and the generated data request is uploaded to the server, which is parsed by the server and returns corresponding data.
  • the solution of this embodiment is described by taking a specific application scenario as an example.
  • the first preset network mode is a 2G/3G network. Monitoring the network communication of a news app on the mobile phone. If the user needs to view a certain news when browsing the app, when the link of the news is clicked, a data request command is triggered. At this time, the mobile phone detects the message.
  • the instruction determines the current network mode of the terminal, and determines whether the network mode is the first preset mode, and if yes, determines a parameter group that needs to be uploaded by requesting the data of the news from the server, and filters out parameters that belong to the preset type, for example,
  • the device information and the operating system information and the like do not affect the parameters of the news data that the server determines to be transmitted, but the user account, the network interface parameter, the resource positioning parameter, and the like are used for the server to locate the resource and determine the parameters of the mobile phone network.
  • the first parameter compression package is generated and uploaded to the server for the server to parse the compressed package, and the corresponding data is searched according to the parameters, and the found data is sent to the mobile phone, and the mobile phone receives the data and displays it.
  • step S10 the method further includes the steps of:
  • the 2G network in the cellular network can be set to the first preset mode, and the 3G and 4G networks are set to the second preset mode.
  • the network speed is slow, and the parameters are omitted.
  • compression upload not only can save traffic, but also improve the speed of the network to some extent.
  • the 3G or 4G network mode the network speed is fast. Therefore, the second parameter compression packet generated by compressing the parameter group can be directly filtered without parameter filtering, and a data request including the second parameter compression packet is generated and uploaded to the server.
  • step S30 the method further includes the following steps:
  • the picture is loaded from the server according to the current network mode of the terminal and the network address.
  • the step of loading a picture from the server according to the current network mode of the terminal and the network address may include: acquiring a network address for loading a picture from the data, and obtaining a match with the current network mode from the local storage. Address splicing data; splicing the address splicing data with the network address, requesting a corresponding picture from the server based on the spliced address, and loading the picture.
  • the data when receiving data returned by the server according to the data request, the data may include various data that needs to be displayed, such as text information, image data, etc., wherein the image data is generally a network address for loading the image.
  • the terminal needs to request a picture from the server and load it according to the network address.
  • the picture is obtained by splicing the network address.
  • the network address splicing mechanism is preset, and the image addresses adapted to the large image and the small image are configured in the server, respectively corresponding to different network modes. For example, for the cellular network, the data of the small image can be displayed in the form of a small image. The amount is small, and the occupied traffic is also small.
  • a complete network address includes a common part and address stitching data, a common part of the website is stored in the server, and the address stitching data for different network modes is stored on the mobile phone.
  • the server sends the common part of the website as the network address to the mobile phone.
  • the mobile phone selects the appropriate URL splicing data and the network address according to the current network mode, and sends the spliced address to the server to obtain the corresponding address.
  • the picture is loaded.
  • the address splicing data corresponding to the WiFi network stored on the mobile phone is spliced with the network address and sent to the server. After receiving the message, the server sends the corresponding big picture to the mobile phone.
  • the data communication processing method of the present embodiment determines the current network mode of the terminal when the data request command is detected, if the current network mode is the first preset mode, where the first preset mode is a network mode with traffic limitation. And determining, according to the data request instruction, a parameter group that needs to be uploaded to the server, filtering out parameters belonging to the preset type in the parameter group, and compressing the filtered parameter group to obtain a first parameter compression package, based on the first A parameter compression package generates a data request, uploads the data request to the server, and the server parses the data request and returns the corresponding data.
  • the invention is implemented by the above solution, and in the network mode with flow restriction, when the data is requested, it is uploaded to The server's parameter group performs simplified filtering, omits some parameters, and compresses the parameters to reduce the consumption of user traffic and save traffic for users.
  • an embodiment of the present invention further provides a computer readable storage medium, where the data readable processing program is stored, and when the data communication processing program is executed by the processor, the following operations are implemented:
  • the current network mode of the terminal is the first preset mode, determining a parameter group that needs to be uploaded to the server according to the data request instruction, and filtering out parameters belonging to the preset type in the parameter group, after filtering
  • the parameter group is subjected to compression processing to obtain a first parameter compression package, wherein the first preset mode is a network mode with flow restriction;
  • the picture is loaded from the server according to the current network mode of the terminal and the network address.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本发明公开了一种数据通信处理终端,包括:存储器、处理器及存储在存储器上并可在处理器上运行的数据通信处理程序,数据通信处理程序被处理器执行时实现如下步骤:在检测到数据请求指令时,确定终端当前的网络模式;若终端当前的网络模式为第一预设模式,则根据数据请求指令确定需要上传至服务器的参数组,并过滤掉参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,基于第一参数压缩包生成数据请求,并上传至服务器,以供服务器解析数据请求并返回对应的数据。本发明还提出一种数据通信处理方法以及一种计算机可读存储介质。本发明实现了在有流量限制的网络模式下,减少用户流量的消耗。

Description

数据通信处理终端、方法及计算机可读存储介质
优先权申明
本申请基于巴黎公约申明享有2017年06月24日递交的申请号为CN201710489772.X、名称为“数据通信处理终端、方法及计算机可读存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。
技术领域
本发明涉及移动通信技术领域,尤其涉及一种数据通信处理终端、方法及计算机可读存储介质。
背景技术
一般情况下,APP在进行数据获取请求时,往往是不区分网络环境的,为了显示效果,无论在何种网络模式下,都是按照同样的方式向服务器发送数据获取请求,并从服务器加载网络数据,这就导致所有的网络模式下,都是最大程度的消耗用户的流量,导致用户在有流量限制的网络模式下,如在蜂窝网络,使用的流量超过流量限额,而需要支付额外的费用,给用户造成不必要的损失。
发明内容
本发明提供一种数据通信处理终端、方法及计算机可读存储介质,其主要目的在于实现在有流量限制的网络模式下,减少用户流量的消耗。
为实现上述目的,本发明提供一种数据通信处理终端,该终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据通信处理程序,所述数据通信处理程序被所述处理器执行时实现如下步骤:
在检测到数据请求指令时,确定终端当前的网络模式;
若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
可选地,所述处理器还用于执行所述数据通信处理程序,以在检测到数据请求指令时,确定终端当前的网络模式的步骤之后,还实现以下步骤:
若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服 务器,以供服务器解析所述数据请求并返回对应的数据。
可选地,所述处理器还用于执行所述数据通信处理程序,以在基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器的步骤之后,还实现以下步骤:
在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
可选地,所述根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤包括:
从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;
将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
可选地,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
基于获取的属性项确定所述终端当前的网络模式。
此外,为实现上述目的,本发明还提供一种数据通信处理方法,该方法包括:
在检测到数据请求指令时,确定终端当前的网络模式;
若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包;
基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
可选地,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤之后,所述方法还包括步骤:
若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
可选地,所述基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器的步骤之后,所述方法还包括步骤:
在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载 图片。
可选地,所述根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤包括:
从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;
将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
此外,为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有数据通信处理程序,所述数据通信处理程序被处理器执行时实现如下步骤:
在检测到数据请求指令时,确定终端当前的网络模式;
若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
本发明提出的数据通信处理终端、方法及计算机可读存储介质,检测到数据请求指令时,确定终端当前的网络模式,如果当前的网络模式为第一预设模式,其中,第一预设模式为具有流量限制的网络模式,则根据该数据请求指令确定需要上传至服务器的参数组,过滤掉参数组中的属于预设类型的参数,并将过滤处理后的参数组进行压缩,得到第一参数压缩包,基于该第一参数压缩包生成数据请求,将该数据请求上传至服务器,以供服务器解析数据请求并返回对应的数据,发明通过上述方案,在具有流量限制的网络模式下,在数据请求时,将上传至服务器的参数组进行简化过滤,省略掉一部分参数,同时对参数进行压缩,以减少对用户流量的消耗,为用户节省流量。
附图说明
图1为本发明数据通信处理终端较佳实施例的示意图;
图2为本发明数据通信处理方法第一实施例的流程图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种数据通信处理终端。参照图1所示,为本发明数据通信处理终端较佳实施例的示意图。
在本实施例中,数据通信处理终端可以是智能手机、平板电脑、电子书阅读器、MP3(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)播放器、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面3)播放器、便携计算机等具有显示功能的可移动式终端设备。
该数据通信处理终端包括存储器11、处理器12,以及网络接口13。其中,存储器11可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器11可以是该终端的内部存储单元,例如终端的硬盘或者内存,可选的还可以是独立于前述处理器12的存储终端。网络接口13可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。
存储器11在一些实施例中可以是数据通信处理终端的内部存储单元,例如该数据通信处理终端的硬盘或内存。存储器11在另一些实施例中也可以是数据通信处理终端的外部存储设备,例如数据通信处理终端上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,存储器11还可以既包括数据通信处理终端的内部存储单元也包括外部存储设备。存储器11不仅可以用于存储安装于数据通信处理终端的应用软件及各类数据,例如数据通信处理程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
处理器12在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器11中存储的程序代码或处理数据,例如执行数据通信处理程序等。
图1仅示出了具有组件11-13以及数据通信处理程序的数据通信处理终端,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
可选的,该终端还可以包括用户接口,用户接口可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。
可选地,该实施例中,数据通信处理终端还可以包括显示器,在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器用于显示在数据通信处理终端中处理的信息以及用于显示可视化的用户界面。
可选地,该终端还可以包括摄像头、RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。其中,传感器比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,若该终端为移动终端,环境光传感器可根据环境光线的明暗来调节显 示屏的亮度,接近传感器可在移动终端移动到耳边时,关闭显示屏和/或背光。作为运动传感器的一种,重力加速度传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;当然,移动终端还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
在图1所示的终端实施例中,作为一种计算机存储介质的存储器11中可以包括操作***、以及数据通信处理程序;网络接口13主要用于连接服务器,与服务器进行数据通信,例如,通过网络接口13向服务器发送数据请求;处理器12执行存储器11中存储的数据通信处理程序时实现如下步骤:
在检测到数据请求指令时,确定终端当前的网络模式;
若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
本实施例提出的终端可以按照数据通信处理程序,对其安装的全部应用程序的数据通信进行处理,也可以只对设置的一个或者多个应用程序的数据通信进行处理。若只需要对部分应用程序的数据通信进行处理,则可以预先进行配置。此外,在该实施例中,第一预设模式为具有流量限制的网络模式,可以将蜂窝网络中的2G网络(第二代移动通信技术)、3G网络(第三代移动通信技术)、4G网络(***移动通信技术)中的一种或者多种网络设置为第一预设模式。若手机处在wifi网络下,则不需要按照上述步骤对其数据通信进行处理。
以下以数据通信处理终端为手机为例,对本实施例进行说明。手机对本端的数据请求指令进行检测,在检测到数据请求指令时,例如,用户基于控件、网络地址等触发的用于向服务器请求数据的指令,手机在检测到上述指令时,先确定当前的网络模式,其中,关于网络模式的确定,可以采用如下方式:在检测到数据请求指令时,基于KVC(Key-Value-Coding,键值编码)机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;基于获取的属性项确定所述终端当前的网络模式。
通过键值编码机制访问终端当前的状态栏上的各个属性值,如网络模式、电量等等,获取到状态栏中表示网络模式的属性项,可以判断网络是2G网络、3G网络、4G网络还是WiFi网络。
在确定网络模式后,判断网络模式是否为第一预设模式,若是,则确定该数据请求指令触发的数据请求需要上传至服务器的参数组。一般情况下,手机APP访问网络时,需要向服务器上传一些参数,包括地理位置信息、设 备ID、***版本等基本参数,以及用户账户、网络接口参数、资源定位数据等必要参数,其中,必要参数是用于向服务器说明手机的网络位置以及请求的数据的资源定位数据,因此必要参数必须上传至服务器,才能成功的请求到数据;而上述基础参数上传至服务器只是便于进行资源更精确的定位,即使不上传,也不影响从服务器请求数据,因此,可以将其省略。故,在本实施例中,可以根据实际需要确定可以省略的参数的类型,设置为预设类型。如将地理位置信息、设备ID、***版本、终端型号等信息设置为预设类型的参数。
在确定参数组后,按照上述设置的预设类型,将其中属于预设类型的参数过滤掉。将过滤处理后的参数组进行压缩处理,得到第一参数压缩包,以进一步地减小上传的参数组占用的流量。得到第一参数压缩包之后,生成包含有第一参数压缩包的数据请求,将生成的数据请求上传至服务器,由服务器对其进行解析并返回对应的数据。
以下以一个具体的应用场景为例对本实施例的方案进行说明,其中,第一预设网络模式为2G/3G网络。对手机上的一个新闻类APP的网络通信进行监测,用户在浏览该APP时,如果需要查看某个新闻,当点击了该新闻的链接时,会触发数据请求指令,此时,处理器12检测到该指令,调用数据通信处理程序确定终端当前的网络模式,并判断网络模式是否为第一预设模式,若是,则确定向服务器请求该新闻的数据需要上传的参数组,过滤掉其中属于预设类型的参数,例如,设备信息以及操作***信息等不影响服务器确定需要传输的新闻数据的参数,而将用户账号、网络接口参数、资源定位参数等对于服务器来说用来资源定位并确定手机网络位置的参数压缩处理后生成第一参数压缩包,上传至服务器,以供服务器解析该压缩包,并根据这些参数查找对应的数据,将查找到的数据发送给手机,手机接收到该数据后,进行展示。
可选的,在另一实施例中,处理器12还用于执行所述数据通信处理程序,以在检测到数据请求指令时,确定终端当前的网络模式的步骤之后,还实现以下步骤:
若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
在该实施例中,可以将蜂窝网络下的2G网络设置为第一预设模式,3G和4G网络设置为第二预设模式,2G网络模式下,网速较慢,进行参数省略并压缩上传,不仅能够节省流量,也在一定程度上提高了网速。而3G或者4G网络模式下,网速较快,因此可以不作参数的过滤,直接将参数组压缩后生成的第二参数压缩包,并生成包含有第二参数压缩包的数据请求上传至服 务器。
可选的,在另一实施例中,处理器还用于执行所述数据通信处理程序,以在基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器的步骤之后,还实现以下步骤:
在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
其中,根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤可以包括:从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
该实施例的终端在接收到服务器依据数据请求返回的数据时,里面可能包含有各种需要展示的数据,例如文本信息、图片数据等,其中,图片数据一般为用于加载图片的网络地址,该终端需要根据网络地址从服务器请求图片并加载。在该实施例中,采用网络地址拼接的方式获取图片。预先设置网络地址拼接机制,在服务器中配置好适应于大图和小图的图片地址,分别对应于不同的网络模式,例如,对于蜂窝网络来说,可以小图的形式展示,小图的数据量小,占用的流量也少,对于WiFi网络,可以大图的形式展示,大图的数据量大,占用的流量也多。一个完整的网络地址包括共同部分和地址拼接数据,服务器中存储有网址的共同部分,手机上存储有用于不同网络模式的地址拼接数据。服务器将网址的共同部分作为网络地址发送给手机,手机接收到网络地址之后,根据当前的网络模式,选择合适的网址拼接数据与网络地址进行拼接,将拼接后的地址发送给服务器,以获取对应的图片并加载。例如,当前的网络模式为WiFi网络,则将手机上存储的与WiFi网络对应的地址拼接数据与网络地址拼接后发送给服务器,服务器接收到后,将对应的大图发送给手机。
本实施例提出的数据通信处理终端,检测到数据请求指令时,确定终端当前的网络模式,如果当前的网络模式为第一预设模式,其中,第一预设模式为具有流量限制的网络模式,则根据该数据请求指令确定需要上传至服务器的参数组,过滤掉参数组中的属于预设类型的参数,并将过滤处理后的参数组进行压缩,得到第一参数压缩包,基于该第一参数压缩包生成数据请求,将该数据请求上传至服务器,以供服务器解析数据请求并返回对应的数据,发明通过上述方案,在具有流量限制的网络模式下,在数据请求时,将上传至服务器的参数组进行简化过滤,省略掉一部分参数,同时对参数进行压缩,以减少对用户流量的消耗,为用户节省流量。
可选地,在其他的实施例中,数据通信处理程序还可以被分割为一个或 者多个模块,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例为处理器12)所执行,以完成本发明。本发明所称的模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述消息推送终端在数据通信处理终端中的执行过程。
例如,在一实施例中,数据通信处理程序可以被分割为确定模块、数据处理模块以及发送模块,其中:
确定模块,用于在检测到数据请求指令时,确定终端当前的网络模式;
数据处理模块,用于若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
发送模块,用于基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
此外,本发明还提供一种数据通信处理方法。参照图2所示,为本发明数据通信处理方法第一实施例的流程图。该方法可以由一个终端执行,该终端可以由软件和/或硬件实现。
在本实施例中,数据通信处理方法包括:
步骤S10,在检测到数据请求指令时,确定终端当前的网络模式。
步骤S20,若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式。
步骤S30,基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
本实施例提出的方法可以按照数据通信处理程序,对其安装的全部应用程序的数据通信进行处理,也可以只对设置的一个或者多个应用程序的数据通信进行处理。若只需要对部分应用程序的数据通信进行处理,则可以预先进行配置。此外,在该实施例中,第一预设模式为具有流量限制的网络模式,可以将蜂窝网络中的2G网络(第二代移动通信技术)、3G网络(第三代移动通信技术)、4G网络(***移动通信技术)中的一种或者多种网络设置为第一预设模式。若手机处在wifi网络下,则不需要按照上述步骤对其数据通信进行处理。
以下以手机为例对本实施例进行说明。手机对本端的数据请求指令进行检测,在检测到数据请求指令时,例如,用户基于控件、网络地址等触发的用于向服务器请求数据的指令,手机在检测到上述指令时,先确定当前的网络模式,其中,关于网络模式的确定,可以采用如下方式:在检测到数据请求指令时,基于KVC(Key-Value-Coding,键值编码)机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;基于获取的属性项确定 所述终端当前的网络模式。
通过键值编码机制访问终端当前的状态栏上的各个属性值,如网络模式、电量等等,获取到状态栏中表示网络模式的属性项,可以判断网络是2G网络、3G网络、4G网络还是WiFi网络。
在确定网络模式后,判断网络模式是否为第一预设模式,若是,则确定该数据请求指令触发的数据请求需要上传至服务器的参数组。一般情况下,手机APP访问网络时,需要向服务器上传一些参数,包括地理位置信息、设备ID、***版本等基本参数,以及用户账户、网络接口参数、资源定位数据等必要参数,其中,必要参数是用于向服务器说明手机的网络位置以及请求的数据的资源定位数据,因此必要参数必须上传至服务器,才能成功的请求到数据;而上述基础参数上传至服务器只是便于进行资源更精确的定位,即使不上传,也不影响从服务器请求数据,因此,可以将其省略。故,在本实施例中,可以根据实际需要确定可以省略的参数的类型,设置为预设类型。如将地理位置信息、设备ID、***版本、终端型号等信息设置为预设类型的参数。
在确定参数组后,按照上述设置的预设类型,将其中属于预设类型的参数过滤掉。将过滤处理后的参数组进行压缩处理,得到第一参数压缩包,以进一步地减小上传的参数组占用的流量。得到第一参数压缩包之后,生成包含有第一参数压缩包的数据请求,将生成的数据请求上传至服务器,由服务器对其进行解析并返回对应的数据。
以下以一个具体的应用场景为例对本实施例的方案进行说明,其中,第一预设网络模式为2G/3G网络。对手机上的一个新闻类APP的网络通信进行监测,用户在浏览该APP时,如果需要查看某个新闻,当点击了该新闻的链接时,会触发数据请求指令,此时,手机检测到该指令,确定终端当前的网络模式,并判断网络模式是否为第一预设模式,若是,则确定向服务器请求该新闻的数据需要上传的参数组,过滤掉其中属于预设类型的参数,例如,设备信息以及操作***信息等不影响服务器确定需要传输的新闻数据的参数,而将用户账号、网络接口参数、资源定位参数等对于服务器来说用来资源定位并确定手机网络位置的参数压缩处理后生成第一参数压缩包,上传至服务器,以供服务器解析该压缩包,并根据这些参数查找对应的数据,将查找到的数据发送给手机,手机接收到该数据后,进行展示。
可选的,在另一实施例中,步骤S10之后,所述方法还包括步骤:
若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
在该实施例中,可以将蜂窝网络下的2G网络设置为第一预设模式,3G和4G网络设置为第二预设模式,2G网络模式下,网速较慢,进行参数省略 并压缩上传,不仅能够节省流量,也在一定程度上提高了网速。而3G或者4G网络模式下,网速较快,因此可以不作参数的过滤,直接将参数组压缩后生成的第二参数压缩包,并生成包含有第二参数压缩包的数据请求上传至服务器。
可选的,在另一实施例中,在步骤S30之后,该方法还包括以下步骤:
在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
其中,根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤可以包括:从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
本实施例中,在接收到服务器依据数据请求返回的数据时,数据中可能包含有各种需要展示的数据,例如文本信息、图片数据等,其中,图片数据一般为用于加载图片的网络地址,该终端需要根据网络地址从服务器请求图片并加载。在该实施例中,采用网络地址拼接的方式获取图片。预先设置网络地址拼接机制,在服务器中配置好适应于大图和小图的图片地址,分别对应于不同的网络模式,例如,对于蜂窝网络来说,可以小图的形式展示,小图的数据量小,占用的流量也少,对于WiFi网络,可以大图的形式展示,大图的数据量大,占用的流量也多。一个完整的网络地址包括共同部分和地址拼接数据,服务器中存储有网址的共同部分,手机上存储有用于不同网络模式的地址拼接数据。服务器将网址的共同部分作为网络地址发送给手机,手机接收到网络地址之后,根据当前的网络模式,选择合适的网址拼接数据与网络地址进行拼接,将拼接后的地址发送给服务器,以获取对应的图片并加载。例如,当前的网络模式为WiFi网络,则将手机上存储的与WiFi网络对应的地址拼接数据与网络地址拼接后发送给服务器,服务器接收到后,将对应的大图发送给手机。
本实施例提出的数据通信处理方法,检测到数据请求指令时,确定终端当前的网络模式,如果当前的网络模式为第一预设模式,其中,第一预设模式为具有流量限制的网络模式,则根据该数据请求指令确定需要上传至服务器的参数组,过滤掉参数组中的属于预设类型的参数,并将过滤处理后的参数组进行压缩,得到第一参数压缩包,基于该第一参数压缩包生成数据请求,将该数据请求上传至服务器,以供服务器解析数据请求并返回对应的数据,发明通过上述方案,在具有流量限制的网络模式下,在数据请求时,将上传至服务器的参数组进行简化过滤,省略掉一部分参数,同时对参数进行压缩,以减少对用户流量的消耗,为用户节省流量。
此外,本发明实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有数据通信处理程序,所述数据通信处理程序被处理器执行时实现如下操作:
在检测到数据请求指令时,确定终端当前的网络模式;
若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
进一步地,所述数据通信处理程序被处理器执行时还实现如下操作:
若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
进一步地,所述数据通信处理程序被处理器执行时还实现如下操作:
在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
进一步地,所述数据通信处理程序被处理器执行时还实现如下操作:
从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;
将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、终端、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、终端、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、终端、物品或者方法中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当人认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (20)

  1. 一种数据通信处理终端,其特征在于,所述终端包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据通信处理程序,所述数据通信处理程序被所述处理器执行时实现如下步骤:
    在检测到数据请求指令时,确定终端当前的网络模式;
    若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
    基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
  2. 根据权利要求1所述的数据通信处理终端,其特征在于,所述处理器还用于执行所述数据通信处理程序,以在检测到数据请求指令时,确定终端当前的网络模式的步骤之后,还实现以下步骤:
    若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
    基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
  3. 根据权利要求1所述的数据通信处理程序终端,其特征在于,所述处理器还用于执行所述数据通信处理程序,以在基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器的步骤之后,还实现以下步骤:
    在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
    若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
  4. 根据权利要求3所述的数据通信处理终端,其特征在于,所述根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤包括:
    从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;
    将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
  5. 根据权利要求2所述的数据通信处理终端,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属 性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  6. 根据权利要求3所述的数据通信处理终端,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  7. 根据权利要求4所述的数据通信处理终端,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  8. 一种数据通信处理方法,其特征在于,所述方法包括:
    在检测到数据请求指令时,确定终端当前的网络模式;
    若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
    基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
  9. 根据权利要求8所述的数据通信处理方法,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤之后,所述方法还包括步骤:
    若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
    基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
  10. 根据权利要求8所述的数据通信处理方法,其特征在于,所述基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器的步骤之后,所述方法还包括步骤:
    在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
    若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
  11. 根据权利要求9所述的数据通信处理方法,其特征在于,所述根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤包括:
    从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;
    将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
  12. 根据权利要求9所述的数据通信处理方法,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  13. 根据权利要求10所述的数据通信处理方法,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  14. 根据权利要求11所述的数据通信处理方法,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有数据通信处理程序,所述数据通信处理程序被处理器执行时实现如下步骤:
    在检测到数据请求指令时,确定终端当前的网络模式;
    若终端当前的网络模式为第一预设模式,则根据所述数据请求指令确定需要上传至服务器的参数组,并过滤掉所述参数组中的属于预设类型的参数,将经过过滤处理后的参数组进行压缩处理,得到第一参数压缩包,其中,所述第一预设模式为具有流量限制的网络模式;
    基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
  16. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述数据通信处理程序被处理器执行,以在检测到数据请求指令时,确定终端当前 的网络模式的步骤之后,还实现以下步骤:
    若所述终端当前的网络模式为第二预设模式,则将所述参数组压缩处理得到第二参数压缩包;
    基于所述第二参数压缩包生成数据请求,并将生成的数据请求上传至服务器,以供服务器解析所述数据请求并返回对应的数据。
  17. 根据权利要求15所述的计算机可读存储介质,其特征在于,所述数据通信处理程序被处理器执行,以在基于所述第一参数压缩包生成数据请求,并将生成的数据请求上传至服务器的步骤之后,还实现以下步骤:
    在接收到所述服务器基于所述数据请求返回的数据时,检测所述数据中是否包含有用于加载图片的网络地址;
    若是,则根据终端当前的网络模式以及所述网络地址从所述服务器加载图片。
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述根据终端当前的网络模式以及所述网络地址从所述服务器加载图片的步骤包括:
    从所述数据中获取用于加载图片的网络地址,并从本地存储中获取与当前的网络模式匹配的地址拼接数据;
    将所述地址拼接数据与所述网络地址进行拼接,基于拼接得到的地址从服务器请求对应的图片并加载所述图片。
  19. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
  20. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述在检测到数据请求指令时,确定终端当前的网络模式的步骤包括:
    在检测到数据请求指令时,基于KVC机制遍历所述终端的状态栏中的属性项,以获取表示网络模式的属性项;
    基于获取的属性项确定所述终端当前的网络模式。
PCT/CN2017/105023 2017-06-24 2017-09-30 数据通信处理终端、方法及计算机可读存储介质 WO2018233141A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710489772.XA CN107707602B (zh) 2017-06-24 2017-06-24 数据通信处理终端、方法及计算机可读存储介质
CN201710489772.X 2017-06-24

Publications (1)

Publication Number Publication Date
WO2018233141A1 true WO2018233141A1 (zh) 2018-12-27

Family

ID=61170474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/105023 WO2018233141A1 (zh) 2017-06-24 2017-09-30 数据通信处理终端、方法及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN107707602B (zh)
WO (1) WO2018233141A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126572A (zh) * 2019-12-26 2020-05-08 北京奇艺世纪科技有限公司 一种模型参数处理方法、装置、电子设备及存储介质
CN113942548A (zh) * 2021-09-08 2022-01-18 卡斯柯信号有限公司 一种临时限速服务器标准化维护终端的实现方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108773181B (zh) * 2018-05-18 2020-06-26 禧图纸品印刷(深圳)有限公司 印刷电算化标准方法、装置、终端与计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468769A (zh) * 2014-12-03 2015-03-25 北京奇虎科技有限公司 进行网络数据内容获取的方法、装置、客户端和***
CN105142184A (zh) * 2015-06-12 2015-12-09 联想(北京)有限公司 一种流量控制方法及电子设备
CN105391642A (zh) * 2015-10-16 2016-03-09 百度在线网络技术(北京)有限公司 流量节省方法以及装置
CN105554819A (zh) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 一种数据传输方法、装置和移动终端

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10291545B2 (en) * 2014-12-08 2019-05-14 Samsung Electronics Co., Ltd. Method and apparatus for setting communicating session

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468769A (zh) * 2014-12-03 2015-03-25 北京奇虎科技有限公司 进行网络数据内容获取的方法、装置、客户端和***
CN105142184A (zh) * 2015-06-12 2015-12-09 联想(北京)有限公司 一种流量控制方法及电子设备
CN105391642A (zh) * 2015-10-16 2016-03-09 百度在线网络技术(北京)有限公司 流量节省方法以及装置
CN105554819A (zh) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 一种数据传输方法、装置和移动终端

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126572A (zh) * 2019-12-26 2020-05-08 北京奇艺世纪科技有限公司 一种模型参数处理方法、装置、电子设备及存储介质
CN111126572B (zh) * 2019-12-26 2023-12-08 北京奇艺世纪科技有限公司 一种模型参数处理方法、装置、电子设备及存储介质
CN113942548A (zh) * 2021-09-08 2022-01-18 卡斯柯信号有限公司 一种临时限速服务器标准化维护终端的实现方法及装置

Also Published As

Publication number Publication date
CN107707602A (zh) 2018-02-16
CN107707602B (zh) 2021-06-04

Similar Documents

Publication Publication Date Title
CN103617165B (zh) 一种加载图片的方法、装置及终端
EP3514684A1 (en) Memory recovery method and apparatus
CN106708496B (zh) 图形界面中标签页的处理方法和装置
EP2977893B1 (en) Lightweight app offline updating method, device and terminal
CN110020293B (zh) 多媒体数据展示方法、装置及存储介质
WO2015014185A1 (en) Method, device and system for detecting malware in mobile terminal
CN104123276B (zh) 一种浏览器中弹窗的拦截方法、装置和***
US20150091935A1 (en) Method and device for browsing web under weak light with mobile terminal browser
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
US20200244759A1 (en) User behavior data processing method and device, and computer-readable storage medium
US9672026B2 (en) Light app offline updating method, device and terminal
US9582584B2 (en) Method, apparatus and system for filtering data of web page
CN113313804B (zh) 一种图像渲染方法、装置、电子设备和存储介质
CN104281621A (zh) 网页浏览方法及装置
WO2018233141A1 (zh) 数据通信处理终端、方法及计算机可读存储介质
CN105302802A (zh) 图片上传方法、***及浏览器
CN108268232B (zh) 一种图片显示方法、装置、***和存储介质
WO2020061731A1 (zh) 资源处理方法、电子设备和计算机可读存储介质
CN105094872B (zh) 一种显示网页应用的方法和装置
CN110309454B (zh) 一种界面显示方法、装置、设备及存储介质
CN109145182B (zh) 数据采集方法、装置、计算机设备及***
CN107798008B (zh) 内容推送***、方法及装置
CN108563712B (zh) 网页图片查看方法、装置及存储设备
CN106068506B (zh) 用于提高电子装置中的加载时间的设备和方法
CN114510417A (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: 17914864

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 17914864

Country of ref document: EP

Kind code of ref document: A1