CN110278278A - A kind of data transmission method, system, device and computer media - Google Patents
A kind of data transmission method, system, device and computer media Download PDFInfo
- Publication number
- CN110278278A CN110278278A CN201910561213.4A CN201910561213A CN110278278A CN 110278278 A CN110278278 A CN 110278278A CN 201910561213 A CN201910561213 A CN 201910561213A CN 110278278 A CN110278278 A CN 110278278A
- Authority
- CN
- China
- Prior art keywords
- data
- destination server
- long connection
- server
- php
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
Abstract
This application discloses a kind of data transmission method, system, device and computer readable storage mediums, are applied to PHP server, using the long connection between destination server pre-established, send request of data to destination server;Utilize the long data for connecting and receiving destination server and sending.Data transmission method provided by the present application, the long connection between destination server that PHP server by utilizing pre-establishes, request of data is sent to destination server, and the data that destination server is sent are received using long connection, namely PHP server exchanges data by long connection between destination server, in this way after PHP server establishes vice-minister connection, it can repeatedly be communicated with destination server, the number that PHP server disconnected, re-established connection is reduced, the stability of PHP server is improved.A kind of data transmission system, device and computer readable storage medium provided by the present application also solve the problems, such as relevant art.
Description
Technical field
This application involves fields of communication technology, more specifically to a kind of data transmission method, system, device and meter
Calculation machine medium.
Background technique
PHP (Hypertext Preprocessor, HyperText Preprocessor) is a kind of general open source scripting language, is inhaled
The characteristics of having received C language, Java and Perl is conducive to study, using extensive.The unique grammer of PHP be mixed with C language, Java,
Perl and PHP can more quickly perform dynamic web page than CGI or Perl from the grammer of wound;With other programming languages
It compares, PHP is to be embedded into program in HTML (application under standard generalized markup language) document to go to execute, execution efficiency
CGI than generating HTML markup completely is many higher;PHP can also be performed compiled code, and compiling can achieve encryption and excellent
Change code operation, makes code operation faster.Due to these advantages of PHP, PHP is used in the equipment such as server.
When communicating with destination server, PHP server passes through a kind of existing application PHP server with destination server
TCP (Transmission Control Protocol, transmission control protocol) agreement establishes a communication connection, and data are sent
After the completion, this communication connection is just disconnected.
However, PHP server with destination server when being communicated, it may be necessary to repeatedly carry out data transmission, thus
So that PHP server need to repeatedly establish communication connection with destination server, Internet resources are wasted, reduce the stabilization of PHP server
Property.
In conclusion the stability for how improving PHP server is a problem to be solved by those skilled in the art.
Summary of the invention
The purpose of the application is to provide a kind of data transmission method, can solve how to improve PHP clothes to a certain extent
The technical issues of stability of business device.Present invention also provides a kind of data transmission system, device and computer-readable storage mediums
Matter.
To achieve the goals above, the application provides a kind of data transmission method, is applied to PHP server, the method
Include:
Using the long connection between destination server pre-established, Xiang Suoshu destination server sends request of data;
The data that the destination server is sent are received using the long connection.
Preferably, the long connection between the destination server pre-established in the utilization, Xiang Suoshu target clothes
It is engaged in front of device transmission request of data, the method also includes:
When needing to the destination server request data, that establishes between the destination server long is connected.
Preferably, the long connection between the foundation and the destination server, comprising:
Establish long connection middleware;
Establish the long connection between the long connection middleware and the destination server.
Preferably, the long connection between destination server that the utilization pre-establishes, Xiang Suoshu destination server hair
Send request of data, comprising:
The request of data is sent to the long connection middleware, so that the long connection middleware utilizes the long connection
The request of data is sent to the destination server;
It is described to include: using the long data for connecting the reception destination server transmission
Receive the data from the destination server of the long connection middleware forwarding.
Preferably, the long connection middleware of the foundation, comprising:
Establish the long connection middleware that type is process;
It is described to send the request of data to the long connection middleware, comprising:
The request of data is sent to the long connection middleware by Unix domain socket agreement.
Preferably, after the data that the destination server transmission is received using the long connection, further includes:
The accumulation duration not carried out data transmission between accumulation and the destination server;
Judge whether the accumulation duration is more than or equal to preset duration;
If so, sending detection data packet to the destination server, and the transmission result based on the detection data packet
Judge whether the long connection is in an off state, if the long junction re-establishes the long connection in off-state.
To achieve the above object, the application further provides for a kind of data transmission system, is applied to PHP server, described
System includes:
First sending module, for utilizing the long connection between destination server pre-established, Xiang Suoshu target clothes
Business device sends request of data;
First receiving module, for receiving the data that the destination server is sent using the long connection.
Preferably, further includes:
First establishes module, pre-establishing with the destination server in the utilization for first sending module
Between long connection, before Xiang Suoshu destination server sends request of data, when needing to the destination server request data
When, it establishes and the long connection between the destination server.
Preferably, it described first establishes module and includes:
First setting up submodule, for establishing long connection middleware;
Second setting up submodule, for establishing the long connection between the long connection middleware and the destination server.
Preferably, first sending module includes:
First sending submodule, for sending the request of data to the long connection middleware, so that the long connection
Middleware is connected to the destination server using the length and sends the request of data;
First receiving module includes:
First receiving unit, for receiving the data from the destination server of the long connection middleware forwarding.
Preferably, first setting up submodule, comprising:
First establishing unit, for establishing the long connection middleware that type is process;
First sending submodule, comprising:
First transmission unit, for being connected described in middleware transmission by Unix domain socket agreement to the length
Request of data.
Preferably, further includes:
First accumulation module receives the destination server using the long connection for first receiving module and sends
Data after, the accumulation duration that does not carry out data transmission between accumulating the destination server;
First judgment module, for judging whether the accumulation duration is more than or equal to preset duration;If so, sending detection
Data packet to the destination server, and the transmission result based on the detection data packet judges whether the long connection is in disconnected
Open state, if the long junction re-establishes the long connection in off-state.
To achieve the above object, the application further provides for a kind of data transmission device, is applied to PHP server, comprising:
Memory, for storing computer program;
Processor, when for executing the computer program realize as above any data transmission method the step of.
To achieve the above object, the application further provides for a kind of computer readable storage medium, described computer-readable
It is stored with computer program in storage medium, realizes that as above any data pass when the computer program is executed by processor
The step of transmission method.
A kind of data transmission method provided by the present application is applied to PHP server, utilizes pre-establish and destination service
Long connection between device, sends request of data to destination server;Utilize the long data for connecting and receiving destination server and sending.This
A kind of data transmission method provided is provided, the length between destination server that PHP server by utilizing pre-establishes connects, to
Destination server sends request of data, and receives the data namely PHP server and mesh that destination server is sent using long connection
Data are exchanged by long connection between mark server, it, can repeatedly and target in this way after PHP server establishes vice-minister connection
Server is communicated, and compared with prior art, reduces the number that PHP server disconnected, re-established connection, is improved
The stability of PHP server.A kind of data transmission system, device and computer readable storage medium provided by the present application also solve
Relevant art of having determined problem.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow diagram of the application first embodiment;
Fig. 2 is the structural schematic diagram for the data transmission system that one embodiment of the application discloses;
Fig. 3 is the schematic diagram of internal structure for the data transmission device that one embodiment of the application discloses.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall in the protection scope of this application.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing
The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage
The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein
Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that
Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit
In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce
The other step or units of product or equipment inherently.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot
It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment
Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution
Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims
Protection scope within.
PHP (Hypertext Preprocessor, HyperText Preprocessor) is a kind of general open source scripting language, is inhaled
The characteristics of having received C language, Java and Perl is conducive to study, using extensive.The unique grammer of PHP be mixed with C language, Java,
Perl and PHP can more quickly perform dynamic web page than CGI or Perl from the grammer of wound;With other programming languages
It compares, PHP is to be embedded into program in HTML (application under standard generalized markup language) document to go to execute, execution efficiency
CGI than generating HTML markup completely is many higher;PHP can also be performed compiled code, and compiling can achieve encryption and excellent
Change code operation, makes code operation faster.Due to these advantages of PHP, PHP is used in the equipment such as server.It is existing
When communicating with destination server, PHP server and destination server pass through TCP for a kind of application PHP server
(Transmission Control Protocol, transmission control protocol) agreement establishes a communication connection, and data are sent completely
Afterwards, this communication connection is just disconnected.However, PHP server with destination server when being communicated, it may be necessary to repeatedly be counted
According to transmission, so that PHP server need to repeatedly establish communication connection with destination server, Internet resources are wasted, reduce PHP clothes
The stability of business device.The stability of PHP server can be improved in data transmission method provided by the present application.
The application provides a kind of data transmission method, is applied to PHP server.
Referring to Fig.1, Fig. 1 is the flow diagram of the application first embodiment.
In the first embodiment, this method may comprise steps of:
Step S101: using the long connection between destination server pre-established, data are sent to destination server
Request.
In practical application, PHP server can be first with the long connection between destination server pre-established, to mesh
Mark server send request of data so that destination server respond the request of data and obtain PHP server needed for data.
The time and mode that long connection is established between PHP server and destination server can be determine according to actual needs.
Step S102: the data that destination server is sent are received using long connection.
In practical application, PHP server is after being sent to destination server for request of data using long connection, target clothes
Business device can search data corresponding with the request of data, and the data found are sent to PHP service by length connection
Device, correspondingly, the long connection of PHP server by utilizing receives the data that destination server is sent.
A kind of data transmission method provided by the present application is applied to PHP server, utilizes pre-establish and destination service
Long connection between device, sends request of data to destination server;Utilize the long data for connecting and receiving destination server and sending.This
A kind of data transmission method provided is provided, the length between destination server that PHP server by utilizing pre-establishes connects, to
Destination server sends request of data, and receives the data namely PHP server and mesh that destination server is sent using long connection
Data are exchanged by long connection between mark server, it, can repeatedly and target in this way after PHP server establishes vice-minister connection
Server is communicated, and compared with prior art, reduces the number that PHP server disconnected, re-established connection, is improved
The stability of PHP server.
In the first embodiment, the condition that PHP server pre-establishes the long connection between destination server can basis
Actual needs determines, for example can periodically establish length connection, and length connection etc., concrete application field are established under extraneous control
Jing Zhong, PHP server send data to destination server and ask using the long connection between destination server pre-established
Before asking, long it can also be connected when needing to destination server request data, establish between destination server.Namely
PHP resettles the long connection between destination server when needing to destination server request data, correspondingly, the external world can lead to
Cross to the instruction that PHP server is sent to destination server request data and give PFP server, with control PHP server establish with
Long connection between destination server etc..
In the first embodiment, it establishes for the ease of PHP server and is connected the length between destination server, and in order to just
It can establish when length of the PHP server between foundation and destination server connects in management of the PHP server to long connection
Long connection middleware;Establish the long connection between long connection middleware and destination server.Namely PHP server is creating itself
Long connection middleware, and the length established between long connection middleware and destination server connects, in this way, subsequent PHP server exists
When needing to communicate with destination server, length connection middleware can be called directly and communicated with destination server, and
When not needing to keep be long and connecting, can directly destroy length connection middleware and then disconnect long connection namely PHP server can be with
By long connection Middleware implementation to the centralized management of long connection.
In concrete application scene, PHP server is connected using the length between destination server pre-established, to mesh
When marking server transmission request of data, request of data can be sent to long connection middleware, so that the long middleware that connects is using length
It connects to destination server and sends request of data;It, can be with correspondingly, when receiving the data that destination server is sent using long connection
Receive the data from destination server of long connection middleware forwarding.
In concrete application scene, PHP server can be according to practical need in the type of the long connection middleware itself created
It flexibly to determine, for example the type of long connection middleware can be the process etc. in PHP server, then PHP server is being established
When long connection middleware, the long connection middleware that type is process can establish;Correspondingly, sending number to long connection middleware
When according to request, request of data can be sent to long connection middleware by Unix domain socket agreement.It can certainly
Request of data etc. is sent to long connection middleware by port numbers agreement.
In the first embodiment, in order to improve the stability of PHP server, PHP server can keep long connection to continue
In connected state, in addition, being easy to appear disconnection after the long connection between PHP server and destination server continues for some time
The case where, it is based on such situation, in order to guarantee that long connection is continuously in connected state, and is kept to mitigate PHP server
Long junction in the service pressure of connected state, PHP server using long connection receive data that destination server is sent it
Afterwards, the accumulation duration not carried out data transmission between destination server can also be accumulated;Judge to accumulate whether duration is more than or equal to
Preset duration;If so, send detection data packet to destination server, and the transmission result judgement based on detection data packet is long connects
It connects and whether is in an off state, if long junction re-establishes long connection in off-state.Preset duration and detection data packet
Can flexibly it determine according to actual needs.
On the other hand, the application provides a kind of data transmission system, is applied to PHP server.
It is the structural schematic diagram for the data transmission system that one embodiment of the application discloses referring to Fig. 2, Fig. 2.
A kind of data transmission system provided by the embodiments of the present application, is applied to PHP server, and system may include:
First sending module 101, for being connected using the length between destination server pre-established, to destination service
Device sends request of data;
First receiving module 102, for receiving the data that destination server is sent using long connection.
A kind of data transmission system provided by the embodiments of the present application is applied to PHP server, can also include:
First establishes module, is utilizing the long company between destination server pre-established for the first sending module
It connects, before sending request of data to destination server, when needing to destination server request data, establishes and destination server
Between long connection.
A kind of data transmission system provided by the embodiments of the present application is applied to PHP server, and first, which establishes module, can wrap
It includes:
First setting up submodule, for establishing long connection middleware;
Second setting up submodule, for establishing the long connection between long connection middleware and destination server.
A kind of data transmission system provided by the embodiments of the present application, is applied to PHP server, and the first sending module can wrap
It includes:
First sending submodule, for sending request of data to long connection middleware, so that long connection middleware utilizes length
It connects to destination server and sends request of data;
First receiving module includes:
First receiving unit, for receiving the data from destination server of long connection middleware forwarding.
A kind of data transmission system provided by the embodiments of the present application is applied to PHP server, and the first setting up submodule can
To include:
First establishing unit, for establishing the long connection middleware that type is process;
First sending submodule may include:
First transmission unit is asked for sending data to long connection middleware by Unix domain socket agreement
It asks.
A kind of data transmission system provided by the embodiments of the present application is applied to PHP server, can also include:
First accumulation module, after receiving the data that destination server is sent using long connection for the first receiving module,
The accumulation duration not carried out data transmission between accumulation and destination server;
First judgment module accumulates whether duration is more than or equal to preset duration for judging;If so, sending detection data
Packet to destination server, and the transmission result based on detection data packet judges whether long connection is in an off state, if long connection
It is in an off state, then re-establishes long connection.
On the other hand, the application provides a kind of data transmission device.
It is the schematic diagram of internal structure for the data transmission device that one embodiment of the application discloses referring to Fig. 3, Fig. 3.
In the present embodiment, data transmission device 1 can be PC (Personal Computer, PC), be also possible to
Smart phone, tablet computer, palm PC, portable computer, intelligent router, mine machine, network storage equipment terminal device.
The data transmission device 1 may include memory 11, processor 12 and bus 13.
Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, and readable storage medium storing program for executing includes flash memory, hard
Disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 exists
It can be the internal storage unit of data transmission device 1, such as the hard disk of the data transmission device 1 in some embodiments.Storage
Device 11 is also possible to match on the External memory equipment of data transmission device 1, such as data transmission device 1 in further embodiments
Standby plug-in type hard disk, 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 storage inside of data transmission device 1
Unit also includes External memory equipment.Memory 11 can be not only used for the application software that storage is installed on data transmission device 1
And Various types of data, such as the code of data distributing program 01 etc., it can be also used for temporarily storing and exported or will be defeated
Data out.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11
Code or processing data, such as execute data distributing program 01 etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 3 only with one slightly
Line indicates, it is not intended that an only bus or a type of bus.
Further, data transmission device can also include network interface 14, and network interface 14 may include optionally having
Line interface and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the device 1 and other electronic equipments it
Between establish communication connection.
Optionally, which can also include user interface, and user interface may include display
(Display), input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface,
Wireless interface.Optionally, in some embodiments, it is aobvious to can be light-emitting diode display, liquid crystal display, touch control type LCD for display
Show that device and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touch device etc..Wherein, display
Appropriate it can also be known as display screen or display unit, for being shown in the information handled in data transmission device 1 and being used for
Show visual user interface.
Fig. 3 illustrates only the data transmission device 1 with component 11-14 and data distributing program 01, art technology
Personnel it is understood that structure shown in Fig. 3 not structure paired data transmitting device 1 restriction, may include than illustrating more
Perhaps more component perhaps combines certain components or different component layouts less.
A kind of computer readable storage medium provided by the present application is stored with data transmission on computer readable storage medium
Program, data transmission can be executed by one or more processor, to realize that data described in any embodiment as above are transmitted
Method.
Computer readable storage medium referred to herein includes random access memory (RAM), memory, read-only memory
(ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
Any other form of storage medium well known to interior.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Load and execute on computers the meter
When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can
To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited
Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium
Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center
Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website
Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit
Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set
It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead
Body medium (such as solid state hard disk Solid State Disk (SSD)) etc..
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application
Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only
Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey
The medium of sequence code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed
Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more
In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element
Or there is also other identical elements in method.
The foregoing description of the disclosed embodiments makes those skilled in the art can be realized or use the application.To this
A variety of modifications of a little embodiments will be apparent for a person skilled in the art, and the general principles defined herein can
Without departing from the spirit or scope of the application, to realize in other embodiments.Therefore, the application will not be limited
It is formed on the embodiments shown herein, and is to fit to consistent with the principles and novel features disclosed in this article widest
Range.
Claims (10)
1. a kind of data transmission method, which is characterized in that be applied to PHP server, which comprises
Using the long connection between destination server pre-established, Xiang Suoshu destination server sends request of data;
The data that the destination server is sent are received using the long connection.
2. the method according to claim 1, wherein pre-establishing with the destination server in the utilization
Between long connection, before Xiang Suoshu destination server sends request of data, the method also includes:
When needing to the destination server request data, that establishes between the destination server long is connected.
3. according to the method described in claim 2, it is characterized in that, the length between the foundation and the destination server connects
It connects, comprising:
Establish long connection middleware;
Establish the long connection between the long connection middleware and the destination server.
4. according to the method described in claim 3, it is characterized in that, the utilization pre-establish between destination server
Long connection, Xiang Suoshu destination server send request of data, comprising:
The request of data is sent to the long connection middleware, so that the long connection middleware is connected using the length to institute
It states destination server and sends the request of data;
It is described to include: using the long data for connecting the reception destination server transmission
Receive the data from the destination server of the long connection middleware forwarding.
5. according to the method described in claim 4, it is characterized in that, the long connection middleware of the foundation, comprising:
Establish the long connection middleware that type is process;
It is described to send the request of data to the long connection middleware, comprising:
The request of data is sent to the long connection middleware by Unix domain socket agreement.
6. method according to any one of claims 1 to 5, which is characterized in that described using described in the long connection reception
After the data that destination server is sent, further includes:
The accumulation duration not carried out data transmission between accumulation and the destination server;
Judge whether the accumulation duration is more than or equal to preset duration;
If so, sending detection data packet to the destination server, and judge based on the transmission result of the detection data packet
Whether the long connection is in an off state, if the long junction re-establishes the long connection in off-state.
7. a kind of data transmission system, which is characterized in that it is applied to PHP server, the system comprises:
First sending module, for utilizing the long connection between destination server pre-established, Xiang Suoshu destination server
Send request of data;
First receiving module, for receiving the data that the destination server is sent using the long connection.
8. system according to claim 7, which is characterized in that further include:
First establishes module, for first sending module the utilization pre-establish between the destination server
Long connection, before Xiang Suoshu destination server sends request of data, when needing to the destination server request data, build
Long connection between the vertical and described destination server.
9. a kind of data transmission device, which is characterized in that be applied to PHP server, comprising:
Memory, for storing computer program;
Processor, realizing the data transmission method as described in any one of claim 1 to 6 when for executing the computer program
Step.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes the step of the data transmission method as described in any one of claim 1 to 6 when the computer program is executed by processor
Suddenly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910561213.4A CN110278278A (en) | 2019-06-26 | 2019-06-26 | A kind of data transmission method, system, device and computer media |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910561213.4A CN110278278A (en) | 2019-06-26 | 2019-06-26 | A kind of data transmission method, system, device and computer media |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110278278A true CN110278278A (en) | 2019-09-24 |
Family
ID=67963369
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910561213.4A Pending CN110278278A (en) | 2019-06-26 | 2019-06-26 | A kind of data transmission method, system, device and computer media |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110278278A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110913008A (en) * | 2019-11-29 | 2020-03-24 | 成都知道创宇信息技术有限公司 | Data transmission method and device |
CN111629059A (en) * | 2020-05-27 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Cluster communication method, system, equipment and computer readable storage medium |
CN111669438A (en) * | 2020-05-27 | 2020-09-15 | 北京百度网讯科技有限公司 | Live broadcast message transmission method and device, electronic equipment and medium |
CN112468585A (en) * | 2020-11-26 | 2021-03-09 | 五八同城信息技术有限公司 | Data transmission method and device, electronic equipment and storage medium |
CN114040005A (en) * | 2021-10-18 | 2022-02-11 | 中国联合网络通信集团有限公司 | Data transmission method, device and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102594912A (en) * | 2012-03-15 | 2012-07-18 | 北京昆仑万维科技股份有限公司 | Data processing method under server architecture, server and server architecture |
WO2013144608A1 (en) * | 2012-03-26 | 2013-10-03 | Aviasys Limited | Data server |
US20130318277A1 (en) * | 2012-05-22 | 2013-11-28 | Xockets IP, LLC | Processing structured and unstructured data using offload processors |
CN105677397A (en) * | 2015-12-30 | 2016-06-15 | 南京途牛科技有限公司 | Method for optimizing PHP remote procedure call through local gateway program |
CN106161611A (en) * | 2016-06-30 | 2016-11-23 | 武汉斗鱼网络科技有限公司 | The system and method for image are uploaded and obtained to live platform |
CN108347445A (en) * | 2018-03-19 | 2018-07-31 | 武汉斗鱼网络科技有限公司 | Realize the method and device of far call |
CN109766062A (en) * | 2018-12-15 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Web page contents Method of printing, device, equipment and storage medium based on PHP service |
-
2019
- 2019-06-26 CN CN201910561213.4A patent/CN110278278A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102594912A (en) * | 2012-03-15 | 2012-07-18 | 北京昆仑万维科技股份有限公司 | Data processing method under server architecture, server and server architecture |
WO2013144608A1 (en) * | 2012-03-26 | 2013-10-03 | Aviasys Limited | Data server |
US20150052192A1 (en) * | 2012-03-26 | 2015-02-19 | A Viasys Limited | Data server |
US20130318277A1 (en) * | 2012-05-22 | 2013-11-28 | Xockets IP, LLC | Processing structured and unstructured data using offload processors |
CN105677397A (en) * | 2015-12-30 | 2016-06-15 | 南京途牛科技有限公司 | Method for optimizing PHP remote procedure call through local gateway program |
CN106161611A (en) * | 2016-06-30 | 2016-11-23 | 武汉斗鱼网络科技有限公司 | The system and method for image are uploaded and obtained to live platform |
CN108347445A (en) * | 2018-03-19 | 2018-07-31 | 武汉斗鱼网络科技有限公司 | Realize the method and device of far call |
CN109766062A (en) * | 2018-12-15 | 2019-05-17 | 深圳壹账通智能科技有限公司 | Web page contents Method of printing, device, equipment and storage medium based on PHP service |
Non-Patent Citations (2)
Title |
---|
VALENTIN PUPEZESCU, RADU RDESCU: ""Enhanced Protection Level by Database Replication in the Easy-Learning Online Platform"", 《 2015 9TH INTERNATIONAL SYMPOSIUM ON ADVANCED TOPICS IN ELECTRICAL ENGINEERING 》 * |
陈云: ""移动办公系统的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110913008A (en) * | 2019-11-29 | 2020-03-24 | 成都知道创宇信息技术有限公司 | Data transmission method and device |
CN110913008B (en) * | 2019-11-29 | 2023-02-28 | 成都知道创宇信息技术有限公司 | Data transmission method and device |
CN111629059A (en) * | 2020-05-27 | 2020-09-04 | 浪潮电子信息产业股份有限公司 | Cluster communication method, system, equipment and computer readable storage medium |
CN111669438A (en) * | 2020-05-27 | 2020-09-15 | 北京百度网讯科技有限公司 | Live broadcast message transmission method and device, electronic equipment and medium |
CN111629059B (en) * | 2020-05-27 | 2022-12-16 | 浪潮电子信息产业股份有限公司 | Cluster communication method, system, equipment and computer readable storage medium |
US11750541B2 (en) | 2020-05-27 | 2023-09-05 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Method for transmitting live message, apparatus, electronic device and medium |
CN112468585A (en) * | 2020-11-26 | 2021-03-09 | 五八同城信息技术有限公司 | Data transmission method and device, electronic equipment and storage medium |
CN114040005A (en) * | 2021-10-18 | 2022-02-11 | 中国联合网络通信集团有限公司 | Data transmission method, device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110278278A (en) | A kind of data transmission method, system, device and computer media | |
WO2018192487A1 (en) | Method and apparatus for controlling smart device linkage | |
CN103514010A (en) | Automatic application updates | |
CN109918203A (en) | Access server memory management optimization method, access server and communication system | |
CN106851779A (en) | A kind of method and mobile terminal for recognizing access point and focus | |
CN109617959A (en) | A kind of data load method, device, system and storage medium | |
CN103051716A (en) | Method and system for redirecting network-oriented serial device | |
CN110191204A (en) | A kind of Intranet communication between devices method, system, device and computer storage medium | |
CN110740057A (en) | service deployment method and block chain platform | |
CN110290399A (en) | A kind of data distributing method, system, device and computer readable storage medium | |
CN109951562A (en) | NAT penetrating method and system, electronic equipment and storage medium | |
CN108391302A (en) | One kind matching network method, system and terminal device | |
CN103562859A (en) | Application activation framework | |
CN108563668A (en) | The method, apparatus and terminal device of the Hybrid page jump H5 pages | |
CN104915302B (en) | Data transmission processing method and data link | |
CN110417789A (en) | Server connection method, electronic equipment, system and medium | |
CN110336888A (en) | A kind of server distribution method, device, system and medium | |
CN109639801A (en) | Back end distribution and data capture method and system | |
CN108965403A (en) | O&M monitors establishment of connection method and terminal device | |
CN109740342A (en) | Obtain method, system, computer installation and storage medium that shell executes permission | |
CN110809045B (en) | Data communication method and related equipment thereof | |
CN109684115A (en) | A kind of communication means and relevant device applied between plug-in unit | |
CN110166575A (en) | A kind of http Proxy Method, system, device and computer media | |
CN109587269A (en) | A kind of hold-up interception method, unit, system and the storage medium of downloading behavior | |
CN115905095A (en) | USB drive-free communication method, device, electronic equipment and storage 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: 20190924 |