CN107612670A - A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium - Google Patents

A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107612670A
CN107612670A CN201710909313.2A CN201710909313A CN107612670A CN 107612670 A CN107612670 A CN 107612670A CN 201710909313 A CN201710909313 A CN 201710909313A CN 107612670 A CN107612670 A CN 107612670A
Authority
CN
China
Prior art keywords
port
socket
control
data
application
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.)
Pending
Application number
CN201710909313.2A
Other languages
Chinese (zh)
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710909313.2A priority Critical patent/CN107612670A/en
Publication of CN107612670A publication Critical patent/CN107612670A/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention discloses a kind of receiving/transmission method of data, methods described includes:Obtain the control instruction for the application being currently running in terminal;It is determined that the port of socket corresponding to application;Determine the port of TCP/UDP corresponding to the port of socket;Control application performs the first operation corresponding with control instruction to the port of socket, and/or, control TCP/UDP port to perform the second operation corresponding with control instruction to the port of socket, whether the port of socket and TCP/UDP port transceiving data are passed through with control application.The embodiment of the present invention further simultaneously discloses a kind of R-T unit of data, terminal and computer-readable recording medium;Enhance in terminal using management and control ability during progress data transmit-receive, ensure that the normal operation applied in terminal.

Description

A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium
Technical field
The present invention relates to the transmission technology of data in the application of terminal, more particularly to a kind of receiving/transmission method of data, device, Terminal and computer-readable recording medium.
Background technology
At present, a variety of applications are installed in terminal, most of applications can utilize network to send data or receive data, In order to reduce the power consumption of terminal, iptables when existing terminal puts out screen by changing terminal establishes fire wall to control application Transceiving data, but in the method, when terminal puts out screen, bright screen operation, scene of the fire wall to data transmit-receive failure be present, So as to cause terminal can not access network;It can thus be seen that each application is controlled to utilize net by fire wall in existing terminal Control efficiency low technical problem during network transceiving data be present.
The content of the invention
In view of this, it is a primary object of the present invention to propose a kind of method, apparatus of data transmit-receive, terminal and computer Readable storage medium storing program for executing, it is intended to eliminate in existing terminal and control each application control to be present when utilizing network transceiving data by fire wall The low technical problem of efficiency processed, strengthen in terminal using management and control ability during progress data transmit-receive.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
In a first aspect, the embodiment of the present invention provides a kind of receiving/transmission method of data, including:Obtain what is be currently running in terminal The control instruction of application;Determine the port of socket corresponding to the application;Determine to transmit corresponding to the port of the socket Control protocol TCP/ UDPs UDP port;Control the application port of the socket is performed with it is described First operation corresponding to control instruction, and/or, the port of the TCP/UDP is controlled to the port execution of the socket and institute State corresponding to control instruction the second operation, with control the application whether port by the socket and the TCP/UDP Port transceiving data.
Alternatively, the control instruction includes:Send instruction, forbid sending instruction, reception instruction and forbidding receiving instructing.
Alternatively, when the control instruction instructs for the transmission, the first operation corresponding to the transmission instruction is to write Enter operation, the second operation corresponding to the transmission instruction is read operation, when the control instruction forbids transmission to instruct to be described When, it is described forbid sending instruct corresponding to the first operation to forbid write operation, it is described forbid sending instruct corresponding to the second behaviour As forbidding read operation;Correspondingly, the control application performs and the control instruction to the port of the socket Corresponding first operation, and/or, control the port of the TCP/UDP to perform the port of the socket and refer to the control Second operation corresponding to order, to control whether the application is received by the port of the socket and the port of the TCP/UDP Data are sent out, including:When the control instruction instructs for the transmission, the control port write-in applied to the socket Data, the port of the TCP/UDP is controlled to read data from the port of the socket, to control the application to pass through the set Connect the port of word and the port of the TCP/UDP and send data;When the control instruction forbids sending for described in be instructed, control Described apply to the port blocking of the socket writes data, and/or, the port of the TCP/UDP is controlled from the socket The port blocking read operation of word, to control the application to prohibit by the port of the socket and the port of the TCP/UDP Only send data.
Alternatively, when the control instruction instructs for the reception, the first operation corresponding to the reception instruction is reading Extract operation, the second operation corresponding to the reception instruction is write operation, when the control instruction forbids reception to instruct to be described When, it is described forbid receiving instruct corresponding to the first operation to forbid read operation, it is described forbid receiving instruct corresponding to the second behaviour As forbidding write operation;Correspondingly, the control application performs and the control instruction to the port of the socket Corresponding first operation, and/or, control the port of the TCP/UDP to perform the port of the socket and refer to the control Second operation corresponding to order, to control whether the application is received by the port of the socket and the port of the TCP/UDP Data are sent out, including:When the control instruction for it is described receive instruction when, control the port of the TCP/UDP to the socket Port write-in data, control the application to read data from the port of the socket, it is described to control the application to pass through The port of socket and the port of the TCP/UDP receive data;When the control instruction forbids receiving for described in be instructed, control The port for making the TCP/UDP writes data to the port blocking of the socket, and/or, the application is controlled from the set The port blocking for connecing word reads data, to control the application to pass through the port of the socket and the port of the TCP/UDP Forbid receiving data.
Alternatively, the control instruction for obtaining the application being currently running in terminal, including:Receive the control of the application Instruction;Or when determining that the running situation of the application meets preparatory condition, generate the control instruction of the application.
Alternatively, when the running situation for determining the application meets preparatory condition, the control for generating the application refers to Order, including:When determining that the running situation of the application meets the first preparatory condition, the transmission instruction or the reception are generated Instruction;When determining that the running situation of the application meets the second preparatory condition, forbid sending instruction or the taboo described in generation Only receive instruction.
Alternatively, the running situation of the application meets the first preparatory condition, including:The application receives request of data Or the application sends request of data;The running situation of the application meets the second preparatory condition, including:The application is worked as Preceding network signal intensity is less than or equal to predetermined threshold value.
Second aspect, the embodiment of the present invention provide a kind of R-T unit of data, including:Memory, processor and storage On the memory and the transmitting/receiving program of data that can run on the processor, the transmitting/receiving program of the data are described The step of receiving/transmission method of the data any one of one or more embodiments as described above is realized during computing device.
The third aspect, the embodiment of the present invention provide a kind of terminal, and it is total that the terminal includes processor, memory and communication Line;The communication bus is used to realize the connection communication between processor and memory;The processor is used to perform memory The transmitting/receiving program of the data of middle storage, to realize following steps:
Obtain the control instruction for the application being currently running in terminal;Determine the port of socket corresponding to the application;Really Transmission control protocol TCP/UDP UDP port corresponding to the port of the fixed socket;Control the application Corresponding with the control instruction first is performed to the port of the socket to operate, and/or, control the end of the TCP/UDP Mouth performs the second operation corresponding with the control instruction to the port of the socket, to control whether the application passes through institute State the port of socket and the port transceiving data of the TCP/UDP.
Alternatively, the control instruction includes:Instruction is sent, forbids sending instruction, receive instruction and forbid reception to refer to Order..
Alternatively, when the control instruction instructs for the transmission, the first operation corresponding to the transmission instruction is to write Enter operation, the second operation corresponding to the transmission instruction is read operation, when the control instruction forbids transmission to instruct to be described When, it is described forbid sending instruct corresponding to the first operation to forbid write operation, it is described forbid sending instruct corresponding to the second behaviour As forbidding read operation;Correspondingly, the control application performs and the control instruction to the port of the socket Corresponding first operation, and/or, control the port of the TCP/UDP to perform the port of the socket and refer to the control Second operation corresponding to order, to control whether the application is received by the port of the socket and the port of the TCP/UDP Send out in data, the processor is additionally operable to perform the transmitting/receiving program of the data, to realize following steps:When the control instruction When being instructed for the transmission, described apply to the port of the socket of control writes data, controls the port of the TCP/UDP Data are read from the port of the socket, to control the application to pass through the port of the socket and the TCP/UDP Port sends data;When the control instruction forbids sending for described in be instructed, the end applied to the socket is controlled Lockjaw only writes data, and/or, the port of the TCP/UDP is controlled from the port blocking read operation of the socket, with control Make the application and data are sent by the port of the socket and the port blocking of the TCP/UDP.
Alternatively, when the control instruction instructs for the reception, the first operation corresponding to the reception instruction is reading Extract operation, the second operation corresponding to the reception instruction is write operation, when the control instruction forbids reception to instruct to be described When, it is described forbid receiving instruct corresponding to the first operation to forbid read operation, it is described forbid receiving instruct corresponding to the second behaviour As forbidding write operation;Correspondingly, the control application performs and the control instruction to the port of the socket Corresponding first operation, and/or, control the port of the TCP/UDP to perform the port of the socket and refer to the control Second operation corresponding to order, to control whether the application is received by the port of the socket and the port of the TCP/UDP Send out in data, the processor is additionally operable to perform the transmitting/receiving program of the data, to realize following steps:When the control instruction When being instructed for the reception, control the port of the TCP/UDP to write data to the port of the socket, control the application Data are read from the port of the socket, to control the application to pass through the port of the socket and the TCP/UDP Port receives data;When the control instruction for it is described forbid receiving instruct when, control the port of the TCP/UDP to the set The port blocking write-in data of word are connect, and/or, control the application to read data from the port blocking of the socket, with control Make the application and data are received by the port of the socket and the port blocking of the TCP/UDP.
Alternatively, in the control instruction for obtaining the application being currently running in terminal, the processor is additionally operable to perform The transmitting/receiving program of the data, to realize following steps:Receive the control instruction of the application;Or determine the application When running situation meets preparatory condition, the control instruction of the application is generated.
Alternatively, when the running situation for determining the application meets preparatory condition, the control for generating the application refers to In order, the processor is additionally operable to perform the transmitting/receiving program of the data, to realize following steps:Determine the operation of the application When situation meets the first preparatory condition, the transmission instruction or the reception instruction are generated;Determine the operation feelings of the application Forbid sending when condition meets the second preparatory condition, described in generation instruct or it is described forbid receiving instruct.
Alternatively, the running situation of the application meets in the first preparatory condition that the processor is additionally operable to described in execution The transmitting/receiving program of data, to realize following steps:The application receives request of data or the application sends request of data; The running situation of the application meets in the second preparatory condition that the processor is additionally operable to perform the transmitting/receiving program of the data, To realize following steps:The current network signal intensity of the application is less than or equal to predetermined threshold value.
Fourth aspect, the embodiment of the present invention provide a kind of computer-readable recording medium, and the computer-readable medium is deposited The transmitting/receiving program of data is contained, one or more embodiments as described above are realized when the transmitting/receiving program of the data is executed by processor Described in data receiving/transmission method the step of.
Receiving/transmission method, device, terminal and the computer-readable recording medium for a kind of data that the embodiment of the present invention is provided, First, the control instruction for the application being currently running in terminal is obtained, then, it is determined that the port of socket corresponding to application, it is determined that TCP/UDP port corresponding to the port of socket, that is, determine to apply the port of the socket for transceiving data in terminal With TCP/UDP port, finally, the second operation corresponding to the first operation corresponding to control instruction and control instruction, control are determined System application performs the first operation to the port of socket, and/or, control TCP/UDP port to perform the to the port of socket Whether two operations, so, control application pass through the port of socket and TCP/UDP port transceiving data;That is, at this In inventive embodiments, by the first operation corresponding to control instruction and the corresponding second operation, to control using to socket Port performs the first operation, controls the port of TCP/UDP corresponding to the port of socket to perform the second behaviour to the port of socket Make, because applying in transceiving data for terminal is come transceiving data by the port for controlling socket and TCP/UDP port , so, here by controlling the port of socket and TCP/UDP port so that control the application of terminal from source Whether transceiving data, eliminate in existing terminal and control each application control to be present when utilizing network transceiving data by fire wall The low technical problem of efficiency, enhance in terminal using management and control ability during progress data transmit-receive, ensure that in terminal and apply Normal operation.
Brief description of the drawings
Fig. 1 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the receiving/transmission method of the data in the embodiment of the present invention one;
Fig. 4 is a kind of optional arrangement schematic diagram for sending data in the embodiment of the present invention two;
Fig. 5 is a kind of optional arrangement schematic diagram for forbidding sending data in the embodiment of the present invention two;
Fig. 6 is the optional arrangement schematic diagram for forbidding sending data of the another kind in the embodiment of the present invention two;
Fig. 7 is a kind of optional arrangement schematic diagram for receiving data in the embodiment of the present invention two;
Fig. 8 is a kind of optional arrangement schematic diagram for forbidding receiving data in the embodiment of the present invention two;
Fig. 9 is the optional arrangement schematic diagram for forbidding receiving data of the another kind in the embodiment of the present invention two;
Figure 10 is the structural representation of the terminal in the embodiment of the present invention three;
Figure 11 is the structural representation of the data transmitter-receiver set in the embodiment of the present invention four;
Figure 12 is the structural representation of the computer-readable recording medium in the embodiment of the present invention four.
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.
In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (PDA, Personal Digital Assistant), portable Media player (PMP, Portable Media Player), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:Radio frequency (RF, Radio Frequency) unit 101, Wireless Fidelity (WiFi, Wireless- Fidelity) module 102, audio output unit 103, A/V (audio/video) input block 104, sensor 105, display unit 106th, the part such as user input unit 107, interface unit 108, memory 109, processor 110 and power supply 111.This area Technical staff is appreciated that the mobile terminal structure shown in Fig. 1 does not form the restriction to mobile terminal, and mobile terminal can be with Including than illustrating more or less parts, either combining some parts or different parts arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to global system for mobile communications (GSM, Global System of Mobile Communication), general packet radio service (GPRS, General Packet Radio Service), CDMA 2000 (CDMA2000, Code Division Multiple Access 2000), WCDMA (WCDMA, Wideband Code Division Multiple Access), TD SDMA (TD-SCDMA, Time Division- Synchronous Code Division Multiple Access), FDD Long Term Evolution (FDD-LTE, Frequency Division Duplexing-Long Term Evolution) and time division duplex Long Term Evolution (TDD-LTE, Time Division Duplexing-Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (GPU, Graphics Processing Unit) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.
Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (LCD, Liquid Crystal Display), Organic Light Emitting Diode can be used Forms such as (OLED, Organic Light-Emitting Diode) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system being based on below to the mobile terminal of the present invention enters Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite includes communicating user equipment (UE, the User of connection successively for the LTE system of universal mobile communications technology, the LTE system Equipment) 201, evolved UMTS Terrestrial radio access network (E-UTRAN, Evolved UMTS Terrestrial Radio Access Network) 202, the IP industry of evolved packet-based core networks (EPC, Evolved Packet Core) 203 and operator Business 204.
Specifically, UE201 can be above-mentioned terminal 100, and here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can include mobility management entity (MME, Mobility Management Entity) 2031, ownership Client server (HSS, Home Subscriber Server) 2032, other MME2033, gateway (SGW, Serving Gate Way) 2034, grouped data network gateway (PGW, PDN Gate Way) 2035 and policy and rate functional entity (PCRF, Policy and Charging Rules Function) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling between EPC203, there is provided carrying and connection management.HSS2032 is all to manage for providing some registers Such as the function of attaching position register (not shown) etc, and some are preserved about service features, data rate etc. The special information of user.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE's 201 IP address is distributed and other functions, and PCRF2036 is that business data flow and the tactful of IP bearing resources are determined with charging control strategy Plan point, it selects and provided available strategy with charge execution function unit (not shown) for strategy and charging control is determined Plan.
IP operation 204 can include internet, Intranet, IP multimedia subsystem (IMS, IP Multimedia ) or other IP operations etc. Subsystem.
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the inventive method is proposed.
Embodiment one
Based on foregoing embodiment, the embodiment of the present invention provides a kind of receiving/transmission method of data, and this method can apply to In terminal, the function that the receiving/transmission method of the data is realized can be realized by the processor caller code in terminal, Certain program code can be stored in computer-readable storage medium, it is seen then that the terminal comprises at least processor and storage medium.
The present embodiment provides a kind of receiving/transmission method of data, and Fig. 3 is the receiving/transmission method of the data in the embodiment of the present invention one Schematic flow sheet, with reference to shown in figure 3, the receiving/transmission method of above-mentioned data can include:
S301:Obtain the control instruction for the application being currently running in terminal;
When user's using terminal, for example, some application in opening a terminal so that this is applied transports in terminal OK, here, above-mentioned application can be the third-party application in terminal, for example, being in browser client or terminal System application, for example, address list, here, the embodiment of the present invention are not especially limited to this.
Application in being currently running needs to access network regularly, to realize the mesh using transceiving data being currently running , in order to realize the management and control ability to application transceiving data, occur to avoid occurring regularly the problem of can not accessing network, First obtain the control instruction for the application being currently running in terminal.
Wherein, above-mentioned control instruction be used for control be currently running application send data or forbid send data or Receive data or forbid receiving data.
In addition, the control instruction for the application that above-mentioned acquisition terminal is currently running can directly receive the control that user sends The running situation of system instruction or the application being currently running meets the control instruction of preparatory condition generation, here, the present invention Embodiment is not especially limited to this.
Wherein, above-mentioned running situation can include network signal intensity, the dump energy of terminal, the committed memory feelings of terminal Condition etc., here, the embodiment of the present invention are not especially limited to this.
Wherein, above-mentioned preparatory condition can be a preparatory condition or a plurality of preparatory condition, for example, when The running situation for the application being currently running meets preparatory condition, can include:The current network signal for the application being currently running is strong Degree is more than or equal to the first given threshold, and the dump energy of the affiliated terminal for the application being currently running is less than or equal to the second setting threshold Value;Here, the embodiment of the present invention is not especially limited to preparatory condition.
S302:It is determined that the port of socket corresponding to application;
Specifically, the port socket for having socket is created in the terminal, also, each application in the terminal is right There should be socket port, in S302, application according to belonging to the control instruction received can be to determine correspondingly Socket, the application being currently running writes data to corresponding socket port, or the application being currently running is from corresponding Socket port read data, to cause the transmission data between the application that is currently running and network.
S303:Determine the port of TCP/UDP corresponding to the port of socket;
Specifically, because in the terminal, each socket port corresponds to TCP/UDP port, then, , can be with according to the socket determined port after socket port corresponding to the application that is currently running is determined in S303 TCP/UDP port corresponding to determining.
In actual applications, when the application being currently running in terminal sends data, first, write data into corresponding Socket, then, corresponding TCP/UDP port read data from socket port, are sent out data using TCP/UDP agreements See off.
S304:Control application performs the first operation corresponding with control instruction to the port of socket, and/or, control TCP/UDP port performs the second operation corresponding with control instruction to the port of socket, whether passes through set with control application Connect the port of word and TCP/UDP port transceiving data.
Here, every kind of control instruction is corresponding with the first operation and the second operation, and different control instructions corresponds to different the One operation, the different second operation.
Wherein, above-mentioned control instruction can include:Instruction is sent, forbids sending instruction, receives instruction, forbids reception to refer to Order;
Correspondingly, it is write operation to send the first operation corresponding to instruction, sends the second operation corresponding to instruction to read Operation;Forbid sending instruct corresponding to the first operation to forbid write operation, forbid sending instruct corresponding to the second operation to prohibit Only read operation;It is read operation to receive the first operation corresponding to instruction, and it is write operation to receive the second operation corresponding to instruction; Forbid receiving instruct corresponding to the first operation to forbid read operation, forbid receiving instruct corresponding to the second operation to forbid writing Operation.
Correspondingly, S304 can be accomplished by the following way:
When receive send instruction when, control application writes data to socket port, control TCP/UDP port from Data are read in socket port, so as to which data be sent using TCP/UDP agreements.
When receive forbid send instruct when, control application to socket port blocking write data, and/or, control Data are read in TCP/UDP port from socket port blocking, so as to forbid sending out data using TCP/UDP agreements Go.
When receive receive instruction when, control TCP/UDP port to write data to socket port, control application from Data are read in socket port, so as to cause data receiver using TCP/UDP agreements.
When receive forbid receiving instruct when, control TCP/UDP port to write data to socket port blocking, And/or control application reads data from socket port blocking, so as to forbid receiving data using TCP/UDP agreements.
So, the management and control utilized to socket port and TCP/UDP port is just realized, is realized to being currently running Application be controlled.
A kind of receiving/transmission method for data that the embodiment of the present invention is provided, first, obtain the application being currently running in terminal Control instruction, then, it is determined that the port of socket corresponding to application, determines the end of TCP/UDP corresponding to the port of socket Mouthful, that is, determine to apply the port of socket and TCP/UDP port for transceiving data in terminal, finally, determine to control Second operation corresponding to first operation corresponding to system instruction and control instruction, control application perform the first behaviour to the port of socket Make, and/or, control TCP/UDP port to perform the second operation to the port of socket, so, whether control application passes through set Connect the port of word and TCP/UDP port transceiving data;That is, in embodiments of the present invention, it is corresponding by control instruction The first operation and the corresponding second operation, to control using the first operation is performed to the port of socket, control socket The port of TCP/UDP corresponding to port performs the second operation to the port of socket, due to applying in transceiving data for terminal Be by the port for controlling socket and TCP/UDP port come transceiving data, so, here by controlling the end of socket Mouthful and TCP/UDP port so that controlled from source terminal application whether transceiving data, eliminate in existing terminal Control efficiency low technical problem when controlling each application using network transceiving data by fire wall be present, enhance in terminal Using management and control ability during progress data transmit-receive, the normal operation applied in terminal ensure that.
Embodiment two
Based on foregoing embodiment, the present embodiment provides a kind of receiving/transmission method of data, and this method can apply to terminal In, the function that the receiving/transmission method of the data is realized can be realized by the processor caller code of terminal, certain journey Sequence code can be stored in computer-readable storage medium, it is seen then that the terminal comprises at least processor and storage medium.
, can in one kind in order to obtain the control instruction for the application that terminal is currently running on the basis of above-described embodiment one In the embodiment of choosing, S301 can include:
Receive the control instruction of application;
Or it is determined that when the running situation of application meets preparatory condition, generate the control instruction of application.
In specific implementation process, two kinds of situations can be divided into by obtaining control instruction, and one kind is sent out by receiving user The control instruction gone out, here, terminal provide and provide the user interactive interface, and user can be to being currently running by the interactive interface Application send control instruction;Also one kind is that terminal automatically generates control instruction.
Specifically, it is determined that the running situation of application is when meeting preparatory condition, generate the control instruction of application, it is above-mentioned The running situation of application can include:The request of data for the application being currently running, the current Network signal for the application being currently running Intensity, dump energy of terminal etc. belonging to the application being currently running.
When it is determined that the running situation of application meets preparatory condition, in order to generate the control instruction of application, a kind of optional Embodiment in, it is determined that the running situation of application generates the control instruction of application, can included when meeting preparatory condition:
It is determined that when the running situation of application meets the first preparatory condition, generation sends instruction or receives instruction;
It is determined that when the running situation of application meets the second preparatory condition, generation, which is forbidden sending, to be instructed or forbids reception to refer to Order.
Here, when the running situation for application meets the first preparatory condition, i.e. generation sends instruction or receives instruction, That is, now terminal allows using transmitting data between network;Meet the second default bar for the running situation of application During part, that is, generate and forbid sending instruction or forbidding receiving instructing, that is to say, that now terminal is forbidden applying and passed between network Transmission of data.
So, the first preparatory condition and the second preparatory condition of setting are passed through, it may be determined that go out whether to allow answering for terminal Use transceiving data.
In order to determine which kind of situation allows the transceiving data of applying of terminal, which kind of situation forbids the application transmitting-receiving number of terminal According to, in a kind of optional embodiment, the running situation of application meets the first preparatory condition, including:Please using data are received Ask or using transmission request of data;
The running situation of application meets the second preparatory condition, including:The current network signal intensity of application is less than or equal to pre- If threshold value.
Specifically, request of data is sent when application receives request of data or applied, illustrates the application being currently running The transmission of the progress data between network is needed, now for meet demand, generates the transmission instruction of application or connecing for application Instruction is received, make it that asking for network can not be accessed by avoiding the occurrence of terminal using can normally send data or receive data Topic.
When the current network signal intensity of application is less than or equal to predetermined threshold value, illustrate that now network signal is poor, terminal Relatively low using the efficiency of transmission that data are transmitted between network, generation, which is forbidden sending instructing or forbidding receiving, to be instructed so that eventually End be applied to network between be transmitted data, to avoid the problem of efficiency of transmission is relatively low between the application of terminal and network.
It is pointed out here that the running situation of above-mentioned application meets that the second preparatory condition can also include:Transport When the dump energy of the affiliated terminal of capable application is less than the first setting value, considers to save electricity, can generate and forbid sending out Send instruction or forbid receiving and instruct, to save electricity;The running situation of above-mentioned application meets that the second preparatory condition can also wrap Include:When the EMS memory occupation ratio of the affiliated terminal for the application being currently running is less than the second setting value, for the response speed to terminal The consideration of degree, it can generate and forbid sending instruction or forbidding receiving instructing, to ensure the response speed of terminal.
In addition, after the type of control instruction is determined, in order to realize between the application being currently running and network The control of data transfer, in a kind of optional embodiment, the above method can also include:
When control instruction is sends instruction, it is write operation to send the first operation corresponding to instruction, and it is corresponding to send instruction Second operation be read operation, when control instruction for forbid send instruct when, forbid send instruct corresponding to first operate be Forbid write operation, forbid sending the second operation corresponding to instruction to forbid read operation;
Correspondingly, control application performs the first operation corresponding with control instruction to the port of socket, and/or, control TCP/UDP port performs the second operation corresponding with control instruction to the port of socket, whether passes through set with control application The port of word and TCP/UDP port transceiving data are connect, including:
When control instruction is sends instruction, control application writes data to the port of the socket, controls TCP/UDP Port read data from the port of socket, to control application to send number by the port of socket and TCP/UDP port According to;
When control instruction instructs to forbid sending, control application writes data to the port blocking of socket, or, And/or TCP/UDP port is controlled from the port blocking read operation of socket, to control port of the application by socket Data are sent with TCP/UDP port blocking.
When control instruction is receives instruction, it is read operation to receive the first operation corresponding to instruction, and it is corresponding to receive instruction Second operation be write operation, when control instruction for forbid receive instruct when, forbid receive instruct corresponding to first operate be Forbid read operation, forbid receiving the second operation corresponding to instruction to forbid write operation;
Correspondingly, control application performs the first operation corresponding with control instruction to the port of socket, and/or, control TCP/UDP port performs the second operation corresponding with control instruction to the port of socket, whether passes through set with control application The port of word and the port transceiving data of the TCP/UDP are connect, including:
When control instruction is receives instruction, TCP/UDP port is controlled to write data to the port of socket, control should Data are read with from the port of socket, to control application to receive data by the port of socket and TCP/UDP port;
When control instruction instructs to forbid receiving, TCP/UDP port is controlled to write number to the port blocking of socket According to, and/or, control application reads data from the port blocking of socket, to control port and TCP/ of the application by socket UDP port blocking receives data.
In actual applications, control instruction is corresponding with the first operation and the second operation, after control instruction is got, just Second operation corresponding to determining the first operation corresponding to control instruction and control instruction, can be accomplished by the following way logarithm According to the control of transmission:
When control instruction for send instruct, illustrate that the application of terminal sends data, send out data to realize See off, it is necessary to control and write data using to socket port, and control TCP/UDP port to be read from socket port Fetch evidence, so, by controlling socket port and TCP/UDP port so that transmission link is a path, Neng Goushi Now data are sent;For example, Fig. 4 is a kind of optional arrangement signal for sending data in the embodiment of the present invention two Figure;As shown in figure 4, occur the port of socket corresponding to browser and TCP/UDP port on interactive interface, wherein, when connecing When receiving transmission instruction, the port of socket corresponding to browser is set to " enabling " by terminal, and terminal is by corresponding to browser Socket port is set to " enabling ", wherein, arrow to the right represents transmission link.
When control instruction to forbid sending instruction, illustrate to forbid using data are sent, forbid to realize by number Write data using to socket port blocking according to sending, it is necessary to control, and/or, control TCP/UDP port from Socket port blocking reads data, so, by controlling socket port and TCP/UDP port so that send chain The open circuit of Lu Weiyi bars, can not send data;For example, Fig. 5 is the optional taboo of one kind in the embodiment of the present invention two Only send the arrangement schematic diagram of data;As shown in figure 5, occur port and the TCP/ of socket corresponding to browser on interactive interface UDP port, wherein, when receive forbid sending instruct when, the port of socket corresponding to browser is set to by terminal " prohibits With ", the port of socket corresponding to browser is set to " disabling " by terminal, wherein, arrow to the right represents transmission link;Fig. 6 For the optional arrangement schematic diagram for forbidding sending data of the another kind in the embodiment of the present invention two;As shown in fig. 6, on interactive interface Occur browser corresponding to socket port and TCP/UDP port, wherein, when receive forbid send instruct when, terminal The port of socket corresponding to browser is set to " startup ", the port of socket corresponding to browser is set to by terminal " prohibits With ", wherein, arrow to the right represents transmission link.
When control instruction instructs to receive, illustrating to apply is needed to receive data, and data are received, it is necessary to control to realize TCP/UDP port writes data to socket port, and controls application to read data from socket port, so, leads to Cross control socket port and TCP/UDP port so that receives link is a path, can realize reception data;Lift For example, Fig. 7 is a kind of optional arrangement schematic diagram for receiving data in the embodiment of the present invention two;As shown in fig. 7, interaction circle Occur the port of socket corresponding to browser and TCP/UDP port on face, wherein, when receiving reception instruction, terminal The port of socket corresponding to browser is set to " enabling ", the port of socket corresponding to browser is set to and " opened by terminal With ", wherein, arrow to the left represents receives link.
When control instruction to forbid receiving instruction, illustrate to forbid receiving data, forbid receiving data, it is necessary to control to realize TCP/UDP processed port writes data to socket port blocking, and/or, control application is read from socket port blocking Fetch evidence, so, by controlling socket port and TCP/UDP port so that receives link is an open circuit, Wu Fajie Receive data;For example, Fig. 8 is a kind of optional arrangement schematic diagram for forbidding receiving data in the embodiment of the present invention two;Such as Occur the port of socket corresponding to browser and TCP/UDP port shown in Fig. 8, on interactive interface, wherein, prohibit when receiving When only receiving instruction, the port of socket corresponding to browser is set to " disabling " by terminal, and terminal is by corresponding to browser Socket port is set to " disabling ", wherein, arrow to the left represents receives link;Fig. 9 is another in the embodiment of the present invention two A kind of optional arrangement schematic diagram for forbidding receiving data;As shown in figure 9, occurs socket corresponding to browser on interactive interface Port and TCP/UDP port, wherein, when receive receive instruction when, terminal is by the port of socket corresponding to browser It is set to " disabling ", the port of socket corresponding to browser is set to " enabling " by terminal, wherein, arrow to the left represents reception chain Road.
In addition, the interactive interface that terminal provides the user, can also show process corresponding to all applications of present terminal The data transmission scenarios of corresponding socket port and TCP/UDP port.
Embodiment three
Based on foregoing embodiment of the method, the present embodiment provides a kind of terminal, and Figure 10 is the end in the embodiment of the present invention three The structural representation at end, with reference to shown in figure 10, the terminal includes processor 101, memory 102 and communication bus 103;It is above-mentioned logical Letter bus 103 is used to realize the connection communication between processor 101 and memory 102;Above-mentioned processor 101 is used to perform storage The program of the foundation connection stored in device 102, to realize following steps:
Obtain the control instruction for the application being currently running in terminal;It is determined that the port of socket corresponding to application;It is determined that set Connect the port of TCP/UDP corresponding to the port of word;Control application performs corresponding with control instruction first to the port of socket Operation, and/or, control TCP/UDP port to perform the second operation corresponding with control instruction to the port of socket, with control Using whether passing through the port of socket and TCP/UDP port transceiving data.
Wherein, control instruction includes:Send instruction, forbid sending instruction, reception instruction and forbidding receiving instructing.
In a kind of optional embodiment, when control instruction is sends instruction, sending the first operation corresponding to instruction is Write operation, it is read operation to send the second operation corresponding to instruction, when control instruction instructs to forbid sending, forbids sending First operation corresponding to instruction forbids sending the second operation corresponding to instruction to forbid read operation to forbid write operation;Phase Ying Di, control application perform corresponding with control instruction first to the port of socket and operated, and/or, control TCP/UDP end Mouthful the second operation corresponding with control instruction is performed to the port of socket, with control application whether by the port of socket with In TCP/UDP port transceiving data, above-mentioned processor 101 is additionally operable to perform the transmitting/receiving program of the data, following to realize Step:
When control instruction is sends instruction, control application writes data to the port of socket, controls TCP/UDP end Mouth reads data from the port of socket, to control application to pass through the port of socket and TCP/UDP port transmission data;When When control instruction instructs to forbid sending, control application writes data to the port blocking of socket, and/or, control TCP/UDP Port from the port blocking read operation of socket, to control application to prohibit by the port of socket and TCP/UDP port Only send data.
In a kind of optional embodiment, when control instruction is receives instruction, receiving the first operation corresponding to instruction is Read operation, it is write operation to receive the second operation corresponding to instruction, when control instruction instructs to forbid receiving, forbids receiving First operation corresponding to instruction forbids receiving the second operation corresponding to instruction to forbid write operation, phase to forbid read operation Ying Di, control application perform corresponding with control instruction first to the port of socket and operated, and/or, control TCP/UDP end Mouthful the second operation corresponding with control instruction is performed to the port of socket, with control application whether by the port of socket with In TCP/UDP port transceiving data, above-mentioned processor 101 is additionally operable to perform the transmitting/receiving program of the data, following to realize Step:
When control instruction is receives instruction, TCP/UDP port is controlled to write data to the port of socket, control should Data are read with from the port of socket, to control application to receive data by the port of socket and TCP/UDP port;When When control instruction instructs to forbid receiving, TCP/UDP port is controlled to write data to the port blocking of socket, and/or, control System application reads data from the port blocking of socket, to control application to prohibit by the port of socket and TCP/UDP port Only receive data.
In a kind of optional embodiment, in the control instruction for obtaining the application being currently running in terminal, above-mentioned processor 101 are additionally operable to perform the transmitting/receiving program of the data, to realize following steps:
Receive the control instruction of application;Or it is determined that when the running situation of application meets preparatory condition, generate the control of application System instruction.
In a kind of optional embodiment, it is determined that when the running situation of application meets preparatory condition, the control of application is generated In instruction, above-mentioned processor 101 is additionally operable to perform the transmitting/receiving program of the data, to realize following steps:
It is determined that when the running situation of application meets the first preparatory condition, generation sends instruction or receives instruction;It is determined that should When running situation meets the second preparatory condition, generation, which is forbidden sending instructing or forbidding receiving, to be instructed.
In a kind of optional embodiment, the running situation of application meets in the first preparatory condition, and above-mentioned processor 101 is also For performing the transmitting/receiving program of the data, to realize following steps:Data are sent using receiving request of data or applying Request;
The running situation of application meets in the second preparatory condition that above-mentioned processor 101 is additionally operable to perform the transmitting-receiving journey of data Sequence, to realize following steps:Request of data is sent using receiving request of data or applying;The current network signal of application is strong Degree is less than or equal to predetermined threshold value.
Example IV
Based on foregoing embodiment of the method, the present embodiment provides a kind of R-T unit of data, and Figure 11 is implemented for the present invention The structural representation of the R-T unit of data in example four, as shown in figure 11, the R-T unit 110 of the data are stored with data Transmitting/receiving program, the number described in one or more embodiments as described above is realized when the transmitting/receiving program of above-mentioned data is executed by processor According to receiving/transmission method the step of.
Based on foregoing embodiment of the method, the present embodiment provides a kind of computer-readable recording medium, and Figure 12 is the present invention The structural representation of computer-readable recording medium in example IV, as shown in figure 12, the computer-readable recording medium 120 The transmitting/receiving program of data is stored with, one or more as described above implement is realized when the transmitting/receiving program of above-mentioned data is executed by processor The step of receiving/transmission method of data described in example.
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, method, article or device 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, method, article or device 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, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot Form, these are belonged within the protection of the present invention.

Claims (10)

1. a kind of receiving/transmission method of data, it is characterised in that methods described includes:
Obtain the control instruction for the application being currently running in terminal;
Determine the port of socket corresponding to the application;
Determine transmission control protocol TCP corresponding to the port of the socket/UDP UDP port;
The application is controlled to perform the first operation corresponding with the control instruction to the port of the socket, and/or, control The port of the TCP/UDP performs the second operation corresponding with the control instruction to the port of the socket, to control State using whether by the port of the socket and the port transceiving data of the TCP/UDP.
2. according to the method for claim 1, it is characterised in that the control instruction includes:Send instruction, forbid transmission to refer to Make, receive instruction and forbid receiving instruction.
3. according to the method for claim 2, it is characterised in that
When the control instruction instructs for the transmission, the first operation corresponding to the transmission instruction is write operation, described It is read operation to send the second operation corresponding to instruction, described to forbid when the control instruction forbids sending for described in be instructed First operation corresponding to transmission instruction is described to forbid sending the second operation corresponding to instruction to forbid reading to forbid write operation Operation;
Correspondingly, the control application performs the first behaviour corresponding with the control instruction to the port of the socket Make, and/or, control the port of the TCP/UDP to perform corresponding with the control instruction second to the port of the socket Operation, whether to control the application by the port of the socket and the port transceiving data of the TCP/UDP, including:
When the control instruction instructs for the transmission, described apply to the port of the socket of control writes data, control Data are read in the port for making the TCP/UDP from the port of the socket, to control the application to pass through the socket Port and the port of the TCP/UDP send data;
When the control instruction forbids sending for described in be instructed, the control port blocking write-in applied to the socket Data, and/or, the port of the TCP/UDP is controlled from the port blocking read operation of the socket, to control the application Data are sent by the port of the socket and the port blocking of the TCP/UDP.
4. according to the method for claim 2, it is characterised in that
When the control instruction instructs for the reception, the first operation corresponding to the reception instruction is read operation, described It is write operation to receive the second operation corresponding to instruction, described to forbid when the control instruction forbids receiving for described in be instructed First operation corresponding to reception instruction is described to forbid receiving the second operation corresponding to instruction to forbid writing to forbid read operation Operation;
Correspondingly, the control application performs the first behaviour corresponding with the control instruction to the port of the socket Make, and/or, control the port of the TCP/UDP to perform corresponding with the control instruction second to the port of the socket Operation, whether to control the application by the port of the socket and the port transceiving data of the TCP/UDP, including:
When the control instruction instructs for the reception, the port of the TCP/UDP is controlled to the port write of the socket Enter data, control the application to read data from the port of the socket, to control the application to pass through the socket Port and the port of the TCP/UDP receive data;
When the control instruction for it is described forbid receiving instruct when, control the port of the TCP/UDP to the end of the socket Lockjaw only writes data, and/or, the control application reads data from the port blocking of the socket, to control described answer Data are received with the port by the socket and the TCP/UDP port blocking.
5. according to the method for claim 2, it is characterised in that the control for obtaining the application being currently running in terminal refers to Order, including:
Receive the control instruction of the application;
Or when determining that the running situation of the application meets preparatory condition, generate the control instruction of the application.
6. according to the method for claim 5, it is characterised in that the running situation for determining the application meets default bar During part, the control instruction of the application is generated, including:
When determining that the running situation of the application meets the first preparatory condition, generate the transmission instruction or the reception refers to Order;
When determining that the running situation of the application meets the second preparatory condition, forbid described in generation sending and instruct or described forbid Receive instruction.
7. according to the method for claim 6, it is characterised in that
The running situation of the application meets the first preparatory condition, including:The application receive request of data or it is described should With transmission request of data;
The running situation of the application meets the second preparatory condition, including:The current network signal intensity of the application be less than etc. In predetermined threshold value.
A kind of 8. R-T unit of data, it is characterised in that including:Memory, processor and it is stored on the memory simultaneously The transmitting/receiving program for the data that can be run on the processor, realized when the transmitting/receiving program of the data is by the computing device The step of receiving/transmission method of data as any one of claim 1 to 7.
9. a kind of terminal, it is characterised in that the terminal includes processor, memory and communication bus;
The communication bus is used to realize the connection communication between processor and memory;
The processor is used for the processing routine for performing the process stored in memory, to realize following steps:
Obtain the control instruction for the application being currently running in terminal;
Determine the port of socket corresponding to the application;
Determine transmission control protocol TCP corresponding to the port of the socket/UDP UDP port;
The application is controlled to perform the first operation corresponding with the control instruction to the port of the socket, and/or, control The port of the TCP/UDP performs the second operation corresponding with the control instruction to the port of the socket, to control State using whether by the port of the socket and the port transceiving data of the TCP/UDP.
10. a kind of computer-readable recording medium, it is characterised in that the computer-readable medium storage has the transmitting-receiving journey of data Sequence, the transmitting-receiving of the data as any one of claim 1 to 7 is realized when the transmitting/receiving program of the data is executed by processor The step of method.
CN201710909313.2A 2017-09-29 2017-09-29 A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium Pending CN107612670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710909313.2A CN107612670A (en) 2017-09-29 2017-09-29 A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710909313.2A CN107612670A (en) 2017-09-29 2017-09-29 A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107612670A true CN107612670A (en) 2018-01-19

Family

ID=61067254

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710909313.2A Pending CN107612670A (en) 2017-09-29 2017-09-29 A kind of receiving/transmission method of data, device, terminal and computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107612670A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020199019A1 (en) * 2001-06-22 2002-12-26 Battin Robert D. Method and apparatus for transmitting data in a communication system
CN104346137A (en) * 2013-07-24 2015-02-11 腾讯科技(深圳)有限公司 Application network management method, system, and computer readable storage medium
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method and apparatus for adjusting network speed of application of intelligent terminal and intelligent terminal
CN107197482A (en) * 2017-05-10 2017-09-22 努比亚技术有限公司 Data transmission method, terminal, the network equipment and computer-readable recording medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020199019A1 (en) * 2001-06-22 2002-12-26 Battin Robert D. Method and apparatus for transmitting data in a communication system
CN104346137A (en) * 2013-07-24 2015-02-11 腾讯科技(深圳)有限公司 Application network management method, system, and computer readable storage medium
CN105159781A (en) * 2015-08-25 2015-12-16 广东欧珀移动通信有限公司 Method and apparatus for adjusting network speed of application of intelligent terminal and intelligent terminal
CN107197482A (en) * 2017-05-10 2017-09-22 努比亚技术有限公司 Data transmission method, terminal, the network equipment and computer-readable recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
包怀忠: ""IP 组播关键技术研究"", 《计算机技术与发展》 *

Similar Documents

Publication Publication Date Title
CN107562336A (en) A kind of method, equipment and computer-readable recording medium for controlling suspension ball
CN107229402A (en) Dynamic screenshotss method, device and the readable storage medium storing program for executing of terminal
CN106961706A (en) Method, mobile terminal and the computer-readable recording medium of communication pattern switching
CN107027114A (en) A kind of SIM card switching method, equipment and computer-readable recording medium
CN107133092A (en) Multi-thread synchronization processing method, terminal and computer-readable recording medium
CN107436779A (en) A kind of application management method, equipment and computer-readable recording medium
CN107343083A (en) One kind lifting game experiencing method, apparatus and computer-readable recording medium
CN107145385A (en) A kind of multitask interface display methods, mobile terminal and computer-readable storage medium
CN107566635A (en) Screen intensity method to set up, mobile terminal and computer-readable recording medium
CN107340833A (en) Terminal temperature control method, terminal and computer-readable recording medium
CN107678654A (en) A kind of Application Program Interface display methods, equipment and computer-readable recording medium
CN107181700A (en) Control method, mobile terminal and the storage medium of application program for mobile terminal
CN107329682A (en) Edge exchange method and mobile terminal
CN107257510A (en) Video unifies player method, terminal and computer-readable recording medium
CN107807767A (en) A kind of processing method of communication traffic, terminal and computer-readable recording medium
CN107181865A (en) Processing method, terminal and the computer-readable recording medium of unread short messages
CN107390856A (en) A kind of method, mobile terminal and storage medium for reducing mobile terminal power consumption
CN107172605A (en) A kind of Emmergency call method, mobile terminal and computer-readable recording medium
CN107124513A (en) Breath screen method, mobile terminal and computer-readable recording medium under talking state
CN107124428A (en) A kind of method, equipment and the storage medium of raising VoLTE call successful rates
CN107766202A (en) Daily record write-in method, apparatus and computer-readable recording medium based on Log4j
CN107360558A (en) Emergency call control method, communication terminal and computer-readable recording medium
CN107124466A (en) One kind prevents caching penetrating method and device, computer-readable recording medium
CN107613206A (en) A kind of image processing method, mobile terminal and computer-readable recording medium
CN107368241A (en) A kind of information processing method, equipment and computer-readable recording medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180119