CN107707602A - Data communication process terminal, method and computer-readable recording medium - Google Patents

Data communication process terminal, method and computer-readable recording medium Download PDF

Info

Publication number
CN107707602A
CN107707602A CN201710489772.XA CN201710489772A CN107707602A CN 107707602 A CN107707602 A CN 107707602A CN 201710489772 A CN201710489772 A CN 201710489772A CN 107707602 A CN107707602 A CN 107707602A
Authority
CN
China
Prior art keywords
data
terminal
request
server
network
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
Application number
CN201710489772.XA
Other languages
Chinese (zh)
Other versions
CN107707602B (en
Inventor
何兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201710489772.XA priority Critical patent/CN107707602B/en
Priority to PCT/CN2017/105023 priority patent/WO2018233141A1/en
Publication of CN107707602A publication Critical patent/CN107707602A/en
Application granted granted Critical
Publication of CN107707602B publication Critical patent/CN107707602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The invention discloses a kind of data communication process terminal, including:Memory, processor and storage are on a memory and the data communication processing program that can run on a processor, data communication processing program realize following steps when being executed by processor:When detecting data requesting instructions, the current network mode of terminal is determined;If the current network mode of terminal is the first preset mode, then determined to need the parameter group to upload onto the server according to data requesting instructions, and filter out the parameter for belonging to preset kind in parameter group, parameter group after filtration treatment is compressed processing, obtain the first compression of parameters bag, request of data is generated based on the first compression of parameters bag, and uploaded onto the server, so that server parses data corresponding to request of data and return.The present invention also proposes a kind of data communication processing method and a kind of computer-readable recording medium.The present invention is realized under the network mode for having flow restriction, reduces the consumption of customer flow.

Description

Data communication process terminal, method and computer-readable recording medium
Technical field
The present invention relates to mobile communication technology field, more particularly to a kind of data communication process terminal, method and computer Readable storage medium storing program for executing.
Background technology
Generally, APP does not differentiate between network environment often when carrying out data acquisition request, in order to show effect Fruit, all it is to send data acquisition request to server in the same way no matter under which kind of network mode, and from server Load networks data, this is resulted under all network modes, is all the flow of maximum consumption user, is caused user to exist Have under the network mode of flow restriction, such as in cellular network, the flow used exceedes flow limit, and needs outside amount paid Expense, unnecessary loss is caused to user.
The content of the invention
The present invention provides a kind of data communication process terminal, method and computer-readable recording medium, its main purpose and existed In reality now with the consumption under the network mode of flow restriction, reducing customer flow.
To achieve the above object, the present invention provides a kind of data communication process terminal, and the terminal includes:Memory, processing Device and the data communication processing program that can be run on the memory and on the processor is stored in, the data mailing address Following steps are realized when managing program by the computing device:
When detecting data requesting instructions, the current network mode of terminal is determined;
If the current network mode of terminal is the first preset mode, determine to need to upload according to the data requesting instructions To the parameter group of server, and the parameter for belonging to preset kind in the parameter group is filtered out, by after filtration treatment Parameter group is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode is the net with flow restriction Network pattern;
Request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
Alternatively, the processor is additionally operable to perform the data communication processing program, to detect that request of data refers to When making, after the step of determining terminal current network mode, following steps are also realized:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain second Compression of parameters bag;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
Alternatively, the processor is additionally operable to perform the data communication processing program, with based on first parameter Compressed package generates request of data, and the step of the request of data of generation is uploaded onto the server after, also realize following steps:
When receiving the data that the server is returned based on the request of data, detect in the data and whether include There is the network address for Loading Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
Alternatively, the network mode current according to terminal and the network address Load Image from the server The step of include:
Obtain the network address for Loading Image from the data, and from middle acquisition and current network is locally stored The address splicing data of pattern match;
Address splicing data are spliced with the network address, please from server based on the address that splicing obtains Picture corresponding to asking simultaneously loads the picture.
Alternatively, described when detecting data requesting instructions, the step of determining terminal current network mode, includes:
When detecting data requesting instructions, the attribute item in the status bar of the terminal is traveled through based on KVC mechanism, to obtain Take the attribute item for representing network mode;
Attribute item based on acquisition determines the current network mode of the terminal.
In addition, to achieve the above object, the present invention also provides a kind of data communication processing method, and this method includes:
When detecting data requesting instructions, the current network mode of terminal is determined;
If the current network mode of terminal is the first preset mode, determine to need to upload according to the data requesting instructions To the parameter group of server, and the parameter for belonging to preset kind in the parameter group is filtered out, by after filtration treatment Parameter group is compressed processing, obtains the first compression of parameters bag;
Request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
Alternatively, it is described when detecting data requesting instructions, after the step of determining terminal current network mode, institute Stating method also includes step:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain second Compression of parameters bag;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
Alternatively, it is described based on the first compression of parameters bag generation request of data, and the request of data of generation is uploaded The step of server, methods described also includes step:
When receiving the data that the server is returned based on the request of data, detect in the data and whether include There is the network address for Loading Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
Alternatively, the network mode current according to terminal and the network address Load Image from the server The step of include:
Obtain the network address for Loading Image from the data, and from middle acquisition and current network is locally stored The address splicing data of pattern match;
Address splicing data are spliced with the network address, please from server based on the address that splicing obtains Picture corresponding to asking simultaneously loads the picture.
In addition, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, described computer-readable Data communication processing program is stored with storage medium, as above institute is realized when the data communication processing program is executed by processor The step of data communication processing method stated.
Data communication process terminal, method and computer-readable recording medium proposed by the present invention, detect request of data During instruction, the current network mode of terminal is determined, if current network mode is the first preset mode, wherein, first is default Pattern is the network mode with flow restriction, then is determined to need the parameter to upload onto the server according to the request of data will woods Group, the parameter for belonging to preset kind in parameter group is filtered out, and the parameter group after filtration treatment is compressed, obtain first Compression of parameters bag, request of data is generated based on the first compression of parameters bag, the request of data is uploaded onto the server, for service Device parses data corresponding to request of data and return, and invention passes through such scheme, under the network mode with flow restriction, During request of data, the parameter group to upload onto the server is carried out to simplify filtering, dispense a part of parameter, while parameter is carried out Compression, to reduce the consumption to customer flow, flow is saved for user.
Brief description of the drawings
Fig. 1 is the schematic diagram of data communication process terminal preferred embodiment of the present invention;
Fig. 2 is the flow chart of data communication processing method first embodiment of the present invention.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of data communication process terminal.Shown in reference picture 1, be data communication process terminal of the present invention compared with The schematic diagram of good embodiment.
In the present embodiment, data communication process terminal can be smart mobile phone, tablet personal computer, E-book reader, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio aspect 3) Player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard sound Frequency aspect 4) player, pocket computer etc. have the packaged type terminal device of display function.
The data communication process terminal includes memory 11, processor 12, and network interface 13.Wherein, memory 11 Can be high-speed RAM memory or stable memory (non-volatile memory), such as magnetic disk storage. Memory 11 can be the internal storage unit of the terminal, such as the hard disk or internal memory of terminal, optionally can also be independent In the storage terminal of aforementioned processor 12.Network interface 13 can optionally include the wireline interface of standard, wave point (such as WI-FI interfaces).
Memory 11 can be the internal storage unit of data communication process terminal in certain embodiments, such as the data The hard disk or internal memory of communication process terminal.Memory 11 can also be the outer of data communication process terminal in further embodiments The plug-in type hard disk being equipped with portion's storage device, such as data communication process terminal, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include the internal storage unit of data communication process terminal or including External memory equipment.Memory 11 not only may be used The application software and Various types of data of data communication process terminal, such as the generation of data communication processing program are installed on for storage Code etc., can be also used for temporarily storing the data that has exported or will export.
Processor 12 can be in certain embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, for the program code or processing data stored in run memory 11, example Such as perform data communication processing program.
Fig. 1 illustrate only the data communication process terminal with component 11-13 and data communication processing program, but should What is understood is, it is not required that implements all components shown, the more or less component of the implementation that can be substituted.
Alternatively, the terminal can also include user interface, and user interface can include display (Display), input Unit such as keyboard (Keyboard), optional user interface can also include wireline interface, the wave point of standard.At some Display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic in embodiment Light-Emitting Diode, Organic Light Emitting Diode) touch device etc..Display is used to be shown in data communication process terminal The information of middle processing and for showing visual user interface.
Alternatively, the terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, sound Frequency circuit, WiFi module etc..Wherein, sensor ratio such as optical sensor, motion sensor and other sensors.Specifically, Optical sensor may include ambient light sensor and proximity transducer, wherein, if the terminal is mobile terminal, ambient light sensor can The brightness of display screen is adjusted according to the light and shade of ambient light, proximity transducer can be closed when mobile terminal is moved in one's ear Display screen and/or backlight.As one kind of motion sensor, gravity accelerometer can detect in all directions (generally Three axles) acceleration size, size and the direction of gravity are can detect that when static, available for identification mobile terminal posture application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; Certainly, mobile terminal can also configure the other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, This is repeated no more.
In the terminal embodiment shown in Fig. 1, as in a kind of memory 11 of computer-readable storage medium can include behaviour Make system and data communication processing program;Network interface 13 is mainly used in connection server, and carrying out data with server leads to Letter, for example, sending request of data to server by network interface 13;Processor 12 performs the data stored in memory 11 and led to Following steps are realized when believing processing routine:
When detecting data requesting instructions, the current network mode of terminal is determined;
If the current network mode of terminal is the first preset mode, determine to need to upload according to the data requesting instructions To the parameter group of server, and the parameter for belonging to preset kind in the parameter group is filtered out, by after filtration treatment Parameter group is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode is the net with flow restriction Network pattern;
Request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
The terminal that the present embodiment proposes can be according to data communication processing program, the number for the whole application programs installed to it Handled according to communication, data communication that can also be only to one or more application program of setting is handled.If only need The data communication of certain applications program is handled, then can be configured in advance.In addition, in this embodiment, first Preset mode is the network mode with flow restriction, can be by 2G networks (the Generation Mobile Telecommunication System skill in cellular network Art), 3G network (3rd generation mobile communication technology), one or more kinds of networks in 4G networks (fourth generation mobile communication technology) It is arranged to the first preset mode.If mobile phone is under wifi network, its data need not be communicated according to above-mentioned steps and carried out Processing.
Below so that data communication process terminal is mobile phone as an example, the present embodiment is illustrated.Data of the mobile phone to local terminal Request instruction is detected, when detecting data requesting instructions, for example, use of the user based on triggerings such as control, network address In the instruction to server request data, mobile phone first determines current network mode when detecting above-mentioned instruction, wherein, close , can be in the following way in the determination of network mode:When detecting data requesting instructions, based on KVC (Key-Value- Coding, key assignments coding) mechanism travels through attribute item in the status bar of the terminal, to obtain the attribute for representing network mode ;Attribute item based on acquisition determines the current network mode of the terminal.
Each property value on the current status bar of terminal, such as network mode, electricity are accessed by key assignments encoding mechanism Deng, get in status bar represent network mode attribute item, it can be determined that network be 2G networks, 3G network, 4G networks or WiFi network.
It is determined that after network mode, judge whether network mode is the first preset mode, if, it is determined that the request of data The request of data of instruction triggers needs the parameter group to upload onto the server.Generally, cell phone application access network when, it is necessary to Some parameters, including the basic parameter such as geographical location information, device id, system version are uploaded to server, and user account, The call parameters such as network interface parameters, Resource orientation data, wherein, call parameter is the network for illustrating mobile phone to server The Resource orientation data of the data of position and request, therefore call parameter must upload onto the server, and could successfully ask To data;And above-mentioned underlying parameter upload onto the server simply facilitate carry out resource more accurately position, even if not uploading, also not Influence from server request data, therefore, can be omitted.Therefore in the present embodiment, can according to be actually needed determination can With the type of the parameter of omission, preset kind is arranged to.Such as by geographical location information, device id, system version, terminal models Information is arranged to the parameter of preset kind.
It is determined that after parameter group, according to the preset kind of above-mentioned setting, the parameter for wherein belonging to preset kind is filtered out. Parameter group after filtration treatment is compressed processing, obtains the first compression of parameters bag, further to reduce the parameter of upload The flow that group takes.After obtaining the first compression of parameters bag, generation includes the request of data of the first compression of parameters bag, will generate Request of data upload onto the server, it is parsed by server and returns to corresponding data.
The scheme of the present embodiment is illustrated by taking a specific application scenarios as an example below, wherein, the first default net Network pattern is 2G/3G networks.Network service to a news category APP on mobile phone is monitored, and user is browsing the APP When, some news is checked if desired, when clicking the link of the news, meeting trigger data request instruction, now, processor 12 detect the instruction, call data communication processing program to determine the current network mode of terminal, and whether judge network mode For the first preset mode, if, it is determined that ask the data of the news to need the parameter group uploaded to server, filter out wherein Belong to the parameter of preset kind, determine to need what is transmitted for example, facility information and operation system information etc. do not influence server The parameter of news data, and resource will be used for for the cuckoo servers such as user account, network interface parameters, Resource orientation parameter Position and determine cell phone network position compression of parameters processing after generate the first compression of parameters bag, upload onto the server, for clothes Business device parses the compressed package, and the data according to corresponding to searching these parameters, the data found is sent into mobile phone, mobile phone connects After receiving the data, it is shown.
Optionally, in another embodiment, processor 12 is additionally operable to perform the data communication processing program, to detect During to data requesting instructions, after the step of determining terminal current network mode, following steps are also realized:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain second Compression of parameters bag;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
In this embodiment it is possible to it is the first preset mode by the 2G network settings under cellular network, 3G and 4G networks are set It is set to the second preset mode, under 2G network modes, network speed is slower, carries out parameter omission and simultaneously compresses upload, can not only save stream Amount, also improves network speed to a certain extent.And under 3G or 4G network modes, network speed is very fast, therefore can not make parameter Filtering, the second compression of parameters bag generated after directly parameter group is compressed, and generate the data for including the second compression of parameters bag Request uploads onto the server.
Optionally, in another embodiment, processor is additionally operable to perform the data communication processing program, with based on institute After the step of stating the first compression of parameters bag generation request of data, and the request of data of generation is uploaded onto the server, also realize Following steps:
When receiving the data that the server is returned based on the request of data, detect in the data and whether include There is the network address for Loading Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
Wherein, according to the current network mode of terminal and the network address from the server Load Image the step of It can include:Obtain the network address for Loading Image from the data, and from middle acquisition and current net is locally stored The address splicing data of network pattern match;Address splicing data are spliced with the network address, based on splicing To address from server request corresponding to picture and load the picture.
When receiving the data that server returns according to request of data, the inside may include respectively the terminal of the embodiment Kind needs the data shown, such as text message, image data etc., wherein, image data is generally the net for being used for Loading Image Network address, the terminal need to ask picture from server according to network address and loaded.In this embodiment, using network address The mode of splicing obtains picture.Network address splicing mechanism is pre-set, configuration is good in the server is adapted to big figure and small figure Picture address, correspond respectively to different network modes, for example, for cellular network, can be shown in the form of small figure, The data volume of small figure is small, and the flow of occupancy is also few, for WiFi network, can the form of figure greatly show that the data volume of big figure is big, The flow of occupancy is also more.One complete network address includes common ground and address splicing data, and net is stored with server The common ground of location, it is stored with mobile phone and splices data for the address of heterogeneous networks pattern.Server is by the common portion of network address It is allocated as being sent to mobile phone for network address, it is suitable according to current network mode, selection after mobile phone receives network address Network address splicing data are spliced with network address, spliced address are sent into server, with picture corresponding to acquisition simultaneously Loading.For example, current network mode is WiFi network, then address splicing number corresponding with WiFi network will be stored on mobile phone According to server is sent to after splicing with network address, after server receives, corresponding big figure is sent to mobile phone.
The data communication process terminal that the present embodiment proposes, when detecting data requesting instructions, determines the current net of terminal Network pattern, if current network mode is the first preset mode, wherein, the first preset mode is the network with flow restriction Pattern, then determined to need the parameter group to upload onto the server according to the request of data will woods, filter out in parameter group and belong to pre- If the parameter of type, and the parameter group after filtration treatment is compressed, the first compression of parameters bag is obtained, based on first parameter Compressed package generates request of data, and the request of data is uploaded onto the server, so that server parses request of data and returns correspondingly Data, invention pass through such scheme, under the network mode with flow restriction, in request of data, service will be uploaded to The parameter group of device is carried out simplifying filtering, dispenses a part of parameter, while parameter is compressed, to reduce to customer flow Consumption, flow is saved for user.
Alternatively, in other examples, data communication processing program can also be divided into one or more mould Block, one or more module are stored in memory 11, and (the present embodiment is processor by one or more processors 12) it is performed, to complete the present invention.Module alleged by the present invention is the series of computation machine program for referring to complete specific function Instruction segment, than implementation procedure of the program more suitable for description message push terminal in data communication process terminal.
For example, in one embodiment, data communication processing program can be divided into determining module, data processing module with And sending module, wherein:
Determining module, for when detecting data requesting instructions, determining the current network mode of terminal;
Data processing module, please according to the data if the network mode current for terminal is the first preset mode Ask instruction to determine to need the parameter group to upload onto the server, and filter out the parameter for belonging to preset kind in the parameter group, Parameter group after filtration treatment is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode For the network mode with flow restriction;
Sending module, for generating request of data based on the first compression of parameters bag, and by the request of data of generation Server is reached, so that server parses data corresponding to the request of data and return.
In addition, the present invention also provides a kind of data communication processing method.It is data mailing address of the present invention shown in reference picture 2 The flow chart of reason method first embodiment.This method can be performed by a terminal, and the terminal can be real by software and/or hardware It is existing.
In the present embodiment, data communication processing method includes:
Step S10, when detecting data requesting instructions, determine the current network mode of terminal.
Step S20, if the current network mode of terminal is the first preset mode, determined according to the data requesting instructions The parameter group to upload onto the server is needed, and filters out the parameter for belonging to preset kind in the parameter group, filtering will be passed through Parameter group after processing is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode is with flow The network mode of limitation.
Step S30, request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded to clothes Business device, so that server parses data corresponding to the request of data and return.
The method that the present embodiment proposes can be according to data communication processing program, the number for the whole application programs installed to it Handled according to communication, data communication that can also be only to one or more application program of setting is handled.If only need The data communication of certain applications program is handled, then can be configured in advance.In addition, in this embodiment, first Preset mode is the network mode with flow restriction, can be by 2G networks (the Generation Mobile Telecommunication System skill in cellular network Art), 3G network (3rd generation mobile communication technology), one or more kinds of networks in 4G networks (fourth generation mobile communication technology) It is arranged to the first preset mode.If mobile phone is under wifi network, its data need not be communicated according to above-mentioned steps and carried out Processing.
The present embodiment is illustrated by taking mobile phone as an example below.Mobile phone detects to the data requesting instructions of local terminal, When detecting data requesting instructions, for example, user is used for server request data based on triggerings such as control, network address Instruction, mobile phone first determines current network mode when detecting above-mentioned instruction, wherein, can be with the determination of network mode In the following way:When detecting data requesting instructions, based on KVC (Key-Value-Coding, key assignments coding) mechanism time The attribute item gone through in the status bar of the terminal, to obtain the attribute item for representing network mode;Attribute item based on acquisition determines The current network mode of the terminal.
Each property value on the current status bar of terminal, such as network mode, electricity are accessed by key assignments encoding mechanism Deng, get in status bar represent network mode attribute item, it can be determined that network be 2G networks, 3G network, 4G networks or WiFi network.
It is determined that after network mode, judge whether network mode is the first preset mode, if, it is determined that the request of data The request of data of instruction triggers needs the parameter group to upload onto the server.Generally, cell phone application access network when, it is necessary to Some parameters, including the basic parameter such as geographical location information, device id, system version are uploaded to server, and user account, The call parameters such as network interface parameters, Resource orientation data, wherein, call parameter is the network for illustrating mobile phone to server The Resource orientation data of the data of position and request, therefore call parameter must upload onto the server, and could successfully ask To data;And above-mentioned underlying parameter upload onto the server simply facilitate carry out resource more accurately position, even if not uploading, also not Influence from server request data, therefore, can be omitted.Therefore in the present embodiment, can according to be actually needed determination can With the type of the parameter of omission, preset kind is arranged to.Such as by geographical location information, device id, system version, terminal models Information is arranged to the parameter of preset kind.
It is determined that after parameter group, according to the preset kind of above-mentioned setting, the parameter for wherein belonging to preset kind is filtered out. Parameter group after filtration treatment is compressed processing, obtains the first compression of parameters bag, further to reduce the parameter of upload The flow that group takes.After obtaining the first compression of parameters bag, generation includes the request of data of the first compression of parameters bag, will generate Request of data upload onto the server, it is parsed by server and returns to corresponding data.
The scheme of the present embodiment is illustrated by taking a specific application scenarios as an example below, wherein, the first default net Network pattern is 2G/3G networks.Network service to a news category APP on mobile phone is monitored, and user is browsing the APP When, some news is checked if desired, when clicking the link of the news, meeting trigger data request instruction, now, mobile phone inspection The instruction is measured, determines the current network mode of terminal, and judges whether network mode is the first preset mode, if so, then true Orientation server asks the data of the news to need the parameter group uploaded, filters out the parameter for wherein belonging to preset kind, for example, Facility information and operation system information etc. do not influence server and determine to need the parameter of news data transmitted, and by user's account Number, be used for Resource orientation for the cuckoo server such as network interface parameters, Resource orientation parameter and determine cell phone network position The first compression of parameters bag is generated after compression of parameters processing, is uploaded onto the server, so that server parses the compressed package, and according to this The data found are sent to mobile phone, after mobile phone receives the data, are shown by data corresponding to a little parameters lookups.
Alternatively, in another embodiment, after step S10, methods described also includes step:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain second Compression of parameters bag;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
In this embodiment it is possible to it is the first preset mode by the 2G network settings under cellular network, 3G and 4G networks are set It is set to the second preset mode, under 2G network modes, network speed is slower, carries out parameter omission and simultaneously compresses upload, can not only save stream Amount, also improves network speed to a certain extent.And under 3G or 4G network modes, network speed is very fast, therefore can not make parameter Filtering, the second compression of parameters bag generated after directly parameter group is compressed, and generate the data for including the second compression of parameters bag Request uploads onto the server.
Alternatively, in another embodiment, after step S30, this method is further comprising the steps of:
When receiving the data that the server is returned based on the request of data, detect in the data and whether include There is the network address for Loading Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
Wherein, according to the current network mode of terminal and the network address from the server Load Image the step of It can include:Obtain the network address for Loading Image from the data, and from middle acquisition and current net is locally stored The address splicing data of network pattern match;Address splicing data are spliced with the network address, based on splicing To address from server request corresponding to picture and load the picture.
In the present embodiment, when receiving the data that server returns according to request of data, it may include in data each Kind needs the data shown, such as text message, image data etc., wherein, image data is generally the net for being used for Loading Image Network address, the terminal need to ask picture from server according to network address and loaded.In this embodiment, using network address The mode of splicing obtains picture.Network address splicing mechanism is pre-set, configuration is good in the server is adapted to big figure and small figure Picture address, correspond respectively to different network modes, for example, for cellular network, can be shown in the form of small figure, The data volume of small figure is small, and the flow of occupancy is also few, for WiFi network, can the form of figure greatly show that the data volume of big figure is big, The flow of occupancy is also more.One complete network address includes common ground and address splicing data, and net is stored with server The common ground of location, it is stored with mobile phone and splices data for the address of heterogeneous networks pattern.Server is by the common portion of network address It is allocated as being sent to mobile phone for network address, it is suitable according to current network mode, selection after mobile phone receives network address Network address splicing data are spliced with network address, spliced address are sent into server, with picture corresponding to acquisition simultaneously Loading.For example, current network mode is WiFi network, then address splicing number corresponding with WiFi network will be stored on mobile phone According to server is sent to after splicing with network address, after server receives, corresponding big figure is sent to mobile phone.
The data communication processing method that the present embodiment proposes, when detecting data requesting instructions, determines the current net of terminal Network pattern, if current network mode is the first preset mode, wherein, the first preset mode is the network with flow restriction Pattern, then determined to need the parameter group to upload onto the server according to the request of data will woods, filter out in parameter group and belong to pre- If the parameter of type, and the parameter group after filtration treatment is compressed, the first compression of parameters bag is obtained, based on first parameter Compressed package generates request of data, and the request of data is uploaded onto the server, so that server parses request of data and returns correspondingly Data, invention pass through such scheme, under the network mode with flow restriction, in request of data, service will be uploaded to The parameter group of device is carried out simplifying filtering, dispenses a part of parameter, while parameter is compressed, to reduce to customer flow Consumption, flow is saved for user.
In addition, the embodiment of the present invention also proposes a kind of computer-readable recording medium, the computer-readable recording medium On be stored with data communication processing program, following operation is realized when the data communication processing program is executed by processor:
When detecting data requesting instructions, the current network mode of terminal is determined;
If the current network mode of terminal is the first preset mode, determine to need to upload according to the data requesting instructions To the parameter group of server, and the parameter for belonging to preset kind in the parameter group is filtered out, by after filtration treatment Parameter group is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode is the net with flow restriction Network pattern;
Request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
Further, following operation is also realized when the data communication processing program is executed by processor:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain second Compression of parameters bag;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, with Data corresponding to the request of data and return are parsed for server.
Further, following operation is also realized when the data communication processing program is executed by processor:
When receiving the data that the server is returned based on the request of data, detect in the data and whether include There is the network address for Loading Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
Further, following operation is also realized when the data communication processing program is executed by processor:
Obtain the network address for Loading Image from the data, and from middle acquisition and current network is locally stored The address splicing data of pattern match;
Address splicing data are spliced with the network address, please from server based on the address that splicing obtains Picture corresponding to asking simultaneously loads the picture.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, terminal, article or method including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, terminal, article or method institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, terminal, article or method.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.Embodiment party more than The description of formula, it is required general that those skilled in the art can be understood that above-described embodiment method can add by software The mode of hardware platform is realized, naturally it is also possible to which by hardware, but the former is more preferably embodiment in many cases.It is based on Such understanding, the part that technical scheme substantially contributes to prior art in other words can be with software products Form embody, the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, light as described above Disk) in, including some instructions are make it that a station terminal equipment (can be mobile phone, computer, server, or the network equipment Deng) perform method described in each embodiment of the present invention.
In addition, the technical scheme between each embodiment can be combined with each other, but must be with ordinary skill Personnel can be implemented as basis, when the combination of technical scheme occur it is conflicting or when can not realize should people think this technology The combination of scheme is not present, also not within the protection domain of application claims.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of data communication process terminal, it is characterised in that the terminal includes:Memory, processor and it is stored in described On memory and the data communication processing program that can run on the processor, the data communication processing program is by the place Reason device realizes following steps when performing:
When detecting data requesting instructions, the current network mode of terminal is determined;
If the current network mode of terminal is the first preset mode, determine that needs are uploaded to clothes according to the data requesting instructions The parameter group of business device, and the parameter for belonging to preset kind in the parameter group is filtered out, by the parameter after filtration treatment Group is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode is the network mould with flow restriction Formula;
Request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded onto the server, for clothes Business device parses data corresponding to the request of data and return.
2. data communication process terminal according to claim 1, it is characterised in that the processor is additionally operable to described in execution Data communication processing program, the step of when detecting data requesting instructions, to determine terminal current network mode after, also Realize following steps:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain the second parameter Compressed package;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, for clothes Business device parses data corresponding to the request of data and return.
3. according to claim 1 data communication processing program terminal, it is characterised in that the processor is additionally operable to perform the number According to communication processing program, to generate request of data based on the first compression of parameters bag, and the request of data of generation is uploaded The step of server, following steps are also realized:
When receiving the data that the server is returned based on the request of data, detect in the data whether include use In the network address to Load Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
4. data communication process terminal according to claim 3, it is characterised in that the network mould current according to terminal The step of formula and the network address Load Image from the server includes:
Obtain the network address for Loading Image from the data, and from middle acquisition and current network mode is locally stored The address splicing data of matching;
Address splicing data are spliced with the network address, asked pair from server based on the obtained address of splicing The picture answered simultaneously loads the picture.
5. data communication process terminal according to any one of claim 1 to 4, it is characterised in that described to detect During data requesting instructions, the step of determining terminal current network mode, includes:
When detecting data requesting instructions, the attribute item in the status bar of the terminal is traveled through based on KVC mechanism, to obtain table Show the attribute item of network mode;
Attribute item based on acquisition determines the current network mode of the terminal.
6. a kind of data communication processing method, it is characterised in that methods described includes:
When detecting data requesting instructions, the current network mode of terminal is determined;
If the current network mode of terminal is the first preset mode, determine that needs are uploaded to clothes according to the data requesting instructions The parameter group of business device, and the parameter for belonging to preset kind in the parameter group is filtered out, by the parameter after filtration treatment Group is compressed processing, obtains the first compression of parameters bag, wherein, first preset mode is the network mould with flow restriction Formula;
Request of data is generated based on the first compression of parameters bag, and the request of data of generation is uploaded onto the server, for clothes Business device parses data corresponding to the request of data and return.
7. data communication processing method according to claim 6, it is characterised in that described to detect data requesting instructions When, after the step of determining terminal current network mode, methods described also includes step:
If the current network mode of the terminal is the second preset mode, the parameter group compression is handled to obtain the second parameter Compressed package;
Request of data is generated based on the second compression of parameters bag, and the request of data of generation is uploaded onto the server, for clothes Business device parses data corresponding to the request of data and return.
8. the data communication processing method according to claim 6 or 7, it is characterised in that described to be based on first parameter Compressed package generates request of data, and the step of the request of data of generation is uploaded onto the server after, methods described also includes step Suddenly:
When receiving the data that the server is returned based on the request of data, detect in the data whether include use In the network address to Load Image;
If so, then Loaded Image according to the current network mode of terminal and the network address from the server.
9. data communication processing method according to claim 8, it is characterised in that the network mould current according to terminal The step of formula and the network address Load Image from the server includes:
Obtain the network address for Loading Image from the data, and from middle acquisition and current network mode is locally stored The address splicing data of matching;
Address splicing data are spliced with the network address, asked pair from server based on the obtained address of splicing The picture answered simultaneously loads the picture.
10. a kind of computer-readable recording medium, it is characterised in that be stored with data on the computer-readable recording medium and lead to Believe processing routine, realized when the data communication processing program is executed by processor as any one of claim 6 to 9 The step of data communication processing method.
CN201710489772.XA 2017-06-24 2017-06-24 Data communication processing terminal, method and computer readable storage medium Active CN107707602B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710489772.XA CN107707602B (en) 2017-06-24 2017-06-24 Data communication processing terminal, method and computer readable storage medium
PCT/CN2017/105023 WO2018233141A1 (en) 2017-06-24 2017-09-30 Data communication processing terminal and method and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710489772.XA CN107707602B (en) 2017-06-24 2017-06-24 Data communication processing terminal, method and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107707602A true CN107707602A (en) 2018-02-16
CN107707602B CN107707602B (en) 2021-06-04

Family

ID=61170474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710489772.XA Active CN107707602B (en) 2017-06-24 2017-06-24 Data communication processing terminal, method and computer readable storage medium

Country Status (2)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108773181A (en) * 2018-05-18 2018-11-09 禧图纸品印刷(深圳)有限公司 Print Electronic Data Processing standard method, device, terminal and computer readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126572B (en) * 2019-12-26 2023-12-08 北京奇艺世纪科技有限公司 Model parameter processing method and device, electronic equipment and storage medium
CN113942548A (en) * 2021-09-08 2022-01-18 卡斯柯信号有限公司 Method and device for realizing standardized maintenance terminal of temporary speed limiting server

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468769A (en) * 2014-12-03 2015-03-25 北京奇虎科技有限公司 Method, device and system for acquiring network data content and client side
CN105142184A (en) * 2015-06-12 2015-12-09 联想(北京)有限公司 Flow control method and electronic device
CN105554819A (en) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 Data transmission method and device and mobile terminal
US20160164801A1 (en) * 2014-12-08 2016-06-09 Samsung Electronics Co., Ltd. Method and apparatus for setting communicating session

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391642A (en) * 2015-10-16 2016-03-09 百度在线网络技术(北京)有限公司 Data traffic saving method and data traffic saving device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104468769A (en) * 2014-12-03 2015-03-25 北京奇虎科技有限公司 Method, device and system for acquiring network data content and client side
US20160164801A1 (en) * 2014-12-08 2016-06-09 Samsung Electronics Co., Ltd. Method and apparatus for setting communicating session
CN105142184A (en) * 2015-06-12 2015-12-09 联想(北京)有限公司 Flow control method and electronic device
CN105554819A (en) * 2015-11-30 2016-05-04 东莞酷派软件技术有限公司 Data transmission method and device and mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108773181A (en) * 2018-05-18 2018-11-09 禧图纸品印刷(深圳)有限公司 Print Electronic Data Processing standard method, device, terminal and computer readable storage medium

Also Published As

Publication number Publication date
WO2018233141A1 (en) 2018-12-27
CN107707602B (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN104794396B (en) Across standing posture script loophole detection method and device
CN108768875A (en) Gray scale dissemination method, device and the computer readable storage medium of application
US10489844B2 (en) Method, apparatus, and system for processing services
CN108304205A (en) A kind of update method of application program, terminal and computer readable storage medium
CN111178012A (en) Form rendering method, device and equipment and storage medium
CN108399074A (en) A kind of update method of application program, terminal and computer readable storage medium
CN110020293B (en) Multimedia data display method, device and storage medium
CN111596998A (en) Page processing method of ink screen and terminal
CN108595203A (en) Application function executes method, mobile terminal and computer readable storage medium
CN107864066A (en) Offline H5 pages monitoring method, device, equipment and readable storage medium storing program for executing
CN108519886A (en) A kind of APK application installation packages configuration method, server, system and storage medium
CN107707602A (en) Data communication process terminal, method and computer-readable recording medium
CN109062468A (en) Multi-screen display method, device, storage medium and electronic equipment
CN109067981A (en) Split screen application switching method, device, storage medium and electronic equipment
CN110035181A (en) It is a kind of to apply card theme setting method and terminal fastly
CN113313804A (en) Image rendering method and device, electronic equipment and storage medium
CN107277031A (en) A kind of Internet video method for down loading, device, storage medium and terminal
CN108182090B (en) Flash plug-in loading method and device based on blink kernel
CN108230104A (en) Using category feature generation method, mobile terminal and readable storage medium storing program for executing
CN104391629B (en) The method of directive sending message, the method for display message, server and terminal
CN108595672A (en) The method, apparatus and readable storage medium storing program for executing of file type are downloaded in a kind of identification
CN107484144A (en) A kind of information acquisition method, terminal, server and computer-readable storage medium
CN108427586A (en) Using push terminal, method and the computer readable storage medium of theme
CN108959062A (en) Web page element acquisition methods and device
CN104123308A (en) Webpage generation method and webpage generation device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant